{"version":3,"file":"ngx-persian.mjs","sources":["../../../projects/ngx-persian/src/lib/Services/InvalidServiceInput.error.ts","../../../projects/ngx-persian/src/lib/Services/persian-number.service.ts","../../../projects/ngx-persian/src/lib/Services/persian-letter.service.ts","../../../projects/ngx-persian/src/lib/Validators/persian-validators.ts","../../../projects/ngx-persian/src/lib/Validators/persian-directives.ts","../../../projects/ngx-persian/src/lib/Pipes/faNum.pipe.ts","../../../projects/ngx-persian/src/lib/Pipes/enNum.pipe.ts","../../../projects/ngx-persian/src/lib/Pipes/IRCurrency.pipe.ts","../../../projects/ngx-persian/src/lib/Pipes/nationalCode.pipe.ts","../../../projects/ngx-persian/src/lib/JDate/ArithmeticUtils.ts","../../../projects/ngx-persian/src/lib/JDate/InvalidJalaliDate.error.ts","../../../projects/ngx-persian/src/lib/JDate/jalali-date-validator.service.ts","../../../projects/ngx-persian/src/lib/JDate/jalali-date-calculator.service.ts","../../../projects/ngx-persian/src/lib/JDate/jdate.ts","../../../projects/ngx-persian/src/lib/Pipes/jdate.pipe.ts","../../../projects/ngx-persian/src/lib/ngx-persian.module.ts","../../../projects/ngx-persian/src/lib/Services/InvalidMobilePhoneNumber.error.ts","../../../projects/ngx-persian/src/lib/Services/InvalidMobileOperator.error.ts","../../../projects/ngx-persian/src/lib/Services/mobile-phone-number.service.ts","../../../projects/ngx-persian/src/lib/Services/InvalidNationalCode.error.ts","../../../projects/ngx-persian/src/lib/Services/national-code.service.ts","../../../projects/ngx-persian/src/public-api.ts","../../../projects/ngx-persian/src/ngx-persian.ts"],"sourcesContent":["/**\n * This error will throw when input value of the service method is not a valid value.\n */\nexport class InvalidServiceInputError extends Error {\n    constructor() {\n        super('Invalid value has been passed to the service.');\n    }\n}\n","import {Injectable} from '@angular/core';\nimport {PersianService} from './persian-service';\nimport {InvalidServiceInputError} from './InvalidServiceInput.error';\n\n@Injectable({\n    providedIn: 'root'\n})\nexport class PersianNumberService implements PersianService {\n    static persianNumberPattern = '\\u06F0-\\u06F9';\n    private static persianNumbersTable = ['\\u06F0', '\\u06F1', '\\u06F2', '\\u06F3', '\\u06F4', '\\u06F5', '\\u06F6', '\\u06F7', '\\u06F8', '\\u06F9'];\n    private static englishNumbersTable = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];\n\n    /**\n     * Splits input value by persian letters and then returns length of matched array.\n     *\n     * @param value\n     * @return 0 if input value has no persian letter, numbers of persian letters in the input value otherwise.\n     */\n    private static _getMatchedPatternLength(value: string): number {\n        // Language=JSRegexp\n        const matchResult = value.match(new RegExp(`[${PersianNumberService.persianNumberPattern}]`, 'g'));\n        return matchResult ? matchResult.length : 0;\n    }\n\n    /**\n     * Checks if input value contains any persian number or not.\n     *\n     * @param value\n     * @return true if input value contains any persian number. false otherwise.\n     */\n    containsPersian(value: string): boolean {\n        if (!value) {\n            return false;\n        }\n        // Language=JSRegexp\n        const persianRegex = new RegExp(`[${PersianNumberService.persianNumberPattern}]`);\n        return persianRegex.test(value);\n    }\n\n    /**\n     * Checks if input value contains only persian letters.\n     *\n     * @param value\n     */\n    isPersian(value: string): boolean {\n        if (!value) {\n            return false;\n        }\n        return value.length === PersianNumberService._getMatchedPatternLength(value);\n    }\n\n    /**\n     * Converts arabic numbers to the persian ones.\n     *\n     * @param value\n     */\n    arabicToPersian(value: string): string {\n        return value.replace(\n            /٤/g,\n            PersianNumberService.persianNumbersTable[4]\n        ).replace(\n            /٥/g,\n            PersianNumberService.persianNumbersTable[5]\n        ).replace(\n            /٦/g,\n            PersianNumberService.persianNumbersTable[6]\n        );\n    }\n\n    /**\n     * Converts all arabic and english numbers to the persian numbers.\n     *\n     * @param value\n     */\n    toPersian(value: string | number): string {\n        if (value === undefined || value === null) {\n            throw new InvalidServiceInputError();\n        }\n        let persianValue: string = value.toString();\n        persianValue = this.arabicToPersian(persianValue);\n        let regex: RegExp;\n        for (let i = 0; i < PersianNumberService.persianNumbersTable.length; i++) {\n            // Language=JSRegexp\n            regex = new RegExp(`[${PersianNumberService.englishNumbersTable[i]}]`, 'g');\n            persianValue = persianValue.replace(regex, PersianNumberService.persianNumbersTable[i]);\n        }\n        return persianValue;\n    }\n\n    /**\n     * Convert persian numbers in input value to the english numbers.\n     *\n     * @param value\n     */\n    toEnglish(value: string): string {\n        let englishValue: string = value;\n        let regex: RegExp;\n        for (let i = 0; i < PersianNumberService.englishNumbersTable.length; i++) {\n            // Language=JSRegexp\n            regex = new RegExp(`[${PersianNumberService.persianNumbersTable[i]}]`, 'g');\n            englishValue = englishValue.replace(regex, PersianNumberService.englishNumbersTable[i]);\n        }\n        return englishValue;\n    }\n}\n","import {Injectable} from '@angular/core';\nimport {PersianService} from './persian-service';\nimport {PersianNumberService} from './persian-number.service';\n\n/**\n * IsPersian options parameter object should implement this interface. Fields descriptions are in the isPersian method document.\n */\nexport interface PLOptions {\n    persianDigits?: boolean;\n    enDigits?: boolean;\n    symbols?: boolean;\n    whitespaces?: boolean;\n}\n\n@Injectable({\n    providedIn: 'root'\n})\n/**\n * This service brings validation of persian texts to the program and let you convert some not-persian letters with persian ones.\n *\n */\nexport class PersianLetterService implements PersianService {\n\n    static PERSIAN_LETTERS_PATTERN = '\\u06A9\\u06AF\\u06C0\\u06CC\\u060C\\u062A\\u062B\\u062C\\u062D\\u062E\\u062F\\u063A\\u064A\\u064B\\u064C' +\n        '\\u064D\\u064E\\u064F\\u067E\\u0670\\u0686\\u0698\\u200C\\u0621-\\u0629\\u0630-\\u0639\\u0641-\\u0654';\n    static WHITESPACES_PATTERN = '\\\\s';\n    private static SYMBOLS_PATTERN = '؟$-/:-?،{-~!\"^_`\\\\[\\\\]';\n\n    /**\n     * According to the options values, returns a RegExp object. The regex pattern of it contains regex of finding each of\n     * elements those specified in the options object plus persian letters.\n     *\n     * @return a RegExp object that can use in searching a string for special characters (persian letters and others specified in the options)\n     * @param options\n     */\n    private static _stringValidationRegex(options: PLOptions): RegExp {\n        let result = '';\n        if (options.enDigits) {\n            result += '0-9';\n        }\n        if (options.symbols) {\n            result += PersianLetterService.SYMBOLS_PATTERN;\n        }\n        if (options.whitespaces) {\n            result += PersianLetterService.WHITESPACES_PATTERN;\n        }\n        if (options.persianDigits) {\n            result += PersianNumberService.persianNumberPattern;\n        }\n        // Language=JSRegexp\n        return new RegExp(`[${result + PersianLetterService.PERSIAN_LETTERS_PATTERN}]`, 'g');\n    }\n\n    /**\n     * This method gets regex of persian letters and other chars specified in the options and then splits the input value by that regex.\n     *\n     * If match result is null - there is no match - returns 0. otherwise returns length of the match array that shows number of matched\n     * occurred in the input value.\n     *\n     * @param value\n     * @param options\n     * @return a number greater equal to 0 representing number of matches occurred in the input value.\n     */\n    private static _getMatchedPatternLength(value: string, options: PLOptions): number {\n        const matchResult = value.match(PersianLetterService._stringValidationRegex(options));\n        return matchResult ? matchResult.length : 0;\n    }\n\n    /**\n     * If input value contains any persian letter or is an empty string, returns true. otherwise returns false.\n     *\n     * @param value\n     */\n    containsPersian(value: string): boolean {\n        // Language=JSRegexp\n        const persianRegex = new RegExp(`[${PersianLetterService.PERSIAN_LETTERS_PATTERN}]`);\n        return value.trim() ? persianRegex.test(value) : true;\n    }\n\n    /**\n     * Checks if input value is a persian text or not. If input value contains any letter that is not persian, the output will be false.\n     * Result of validation on existence  of other characters controls by options parameter.\n     *\n     * @param value\n     * @param options controlling validation result on existence  of other characters controls by options parameter. Fields:\n     *\n     *        persianDigits: if sets to true, validation result will be true if input value contains persian digits plus persian letters.\n     *\n     *\n     *        enDigits: if sets to true, validation result will be true if input value contains english digits plus persian letters\n     *\n     *\n     *        symbols: if sets to true, validation result will be true if input value contains specific symbols plus persian letters.\n     *                 symbols list: ?$-/:؟!~\"'^_-[]{}()%&*><;\n     *\n     *\n     *        whitespaces: if sets to true, validation result will be true if input value contains white spaces plus persian letters\n     *\n     *\n     * You can combine any number of options field together.\n     */\n    isPersian(value: string, options: PLOptions = {\n        persianDigits: false,\n        enDigits: false,\n        symbols: true,\n        whitespaces: true\n    }): boolean {\n        return value.length === PersianLetterService._getMatchedPatternLength(value, options);\n    }\n\n    /**\n     * Converts arabic letters: ي and ك to persian corresponding letters.\n     *\n     * @param value\n     */\n    toPersian(value: string): string {\n        return value.replace(/ي/g, 'ی').replace(/ك/g, 'ک');\n    }\n\n}\n","import {AbstractControl, ValidationErrors, ValidatorFn} from '@angular/forms';\nimport {PersianNumberService} from '../Services/persian-number.service';\nimport {PersianLetterService, PLOptions} from '../Services/persian-letter.service';\n\n/**\n * Reactive form validator that checks form control value contains only persian numbers.\n *\n * @param persianNumberService\n */\nexport function persianNumbersValidator(persianNumberService: PersianNumberService = new PersianNumberService()): ValidatorFn { // eslint-disable-line prefer-arrow/prefer-arrow-functions\n    return (control: AbstractControl): ValidationErrors | null => persianNumberService.isPersian(control.value) ? null : {persianNumberValidation: control.value};\n}\n\n/**\n * Reactive form validator that checks form control value contains only persian letters and allowed characters in the options parameter.\n *\n * @param options see documents of isPersian method of the PersianLetterService for more info about options.\n * @param persianLetterService\n */\nexport function persianLettersValidator(         // eslint-disable-line prefer-arrow/prefer-arrow-functions\n    options: PLOptions = {persianDigits: false, whitespaces: false, symbols: false, enDigits: false},\n    persianLetterService: PersianLetterService = new PersianLetterService()\n): ValidatorFn {\n    return (control: AbstractControl): ValidationErrors | null => persianLetterService.isPersian(control.value, options) ? null : {persianLetterValidation: control.value};\n}\n","import {Directive, Input} from '@angular/core';\nimport {AbstractControl, NG_VALIDATORS, Validator} from '@angular/forms';\nimport {persianLettersValidator, persianNumbersValidator} from './persian-validators';\nimport {PLOptions} from '../Services/persian-letter.service';\n\n\n/**\n * You can add PersianNumbersDirective property to your input tag for using persianNumbersValidator function on its value.\n *\n * [For more information also see persianNumbersValidator]{@link persianNumbersValidator}\n */\n@Directive({\n    selector: '[ngxPersianNumbersDirective]',\n    providers: [{provide: NG_VALIDATORS, useExisting: PersianNumbersDirective}]         // eslint-disable-line no-use-before-define\n})\nexport class PersianNumbersDirective implements Validator {\n\n    /**\n     * Only a wrapper for persianNumbersValidator validator function.\n     *\n     * @param control\n     * @return null for success or ValidationError for invalid inputs\n     */\n    validate(control: AbstractControl): { [key: string]: any } | null {\n        return persianNumbersValidator()(control);\n    }\n}\n\n/**\n * You can add PersianLetterDirective property to your input tag for using persianNumbersValidator function on its value\n * For setting options value, you can simply set PersianLetterDirective property equal to the PLOptions object.\n * [For more information also see persianLettersValidator]{@link persianLettersValidator}\n */\n@Directive({\n    selector: '[ngxPersianLettersValidator]',\n    providers: [{provide: NG_VALIDATORS, useExisting: PersianLetterDirective}]         // eslint-disable-line no-use-before-define\n})\nexport class PersianLetterDirective implements Validator {\n\n    @Input('PersianLetterDirective') options!: PLOptions;        // eslint-disable-line @angular-eslint/no-input-rename\n\n    /**\n     * Only a wrapper for persianLettersValidator validator function.\n     *\n     * @param control\n     * @return null for success or ValidationError for invalid inputs\n     */\n    validate(control: AbstractControl): { [key: string]: any } | null {\n        return persianLettersValidator(this.options)(control);\n    }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {PersianNumberService} from '../Services/persian-number.service';\n\n/**\n * Replaces all arabic and english numbers with persian numbers.\n *\n * @example {{englishTextDigit | faNum}}\n */\n@Pipe({name: 'faNum'})\nexport class FaNumPipe implements PipeTransform {\n\n    constructor(private persianNumberService: PersianNumberService) {\n    }\n\n    /**\n     *\n     * @param value a number or string (probably empty).\n     * @return a string that all english and arabic numbers in the input has been replaced with persian digits.\n     */\n    transform(value: string | number): string {\n        const strValue = String(value);\n        return this.persianNumberService.toPersian(strValue);\n    }\n}\n\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {PersianNumberService} from '../Services/persian-number.service';\n\n/**\n * Replaces all persian numbers in the text to the english numbers.\n *\n * @example {{persianTextDigit | enNum}}\n */\n@Pipe({name: 'enNum'})\nexport class EnNumPipe implements PipeTransform {\n\n    constructor(private persianNumberService: PersianNumberService) {\n    }\n\n    /**\n     * @return input value replaced all persian digits with english digits.\n     * @param value a string containing one or more non-english digits. Could be an empty string.\n     */\n    transform(value: string): string {\n        const strValue = String(value);\n        return this.persianNumberService.toEnglish(strValue);\n    }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nexport enum IRCurrencies {      // eslint-disable-line no-shadow\n    RIAL = 'ریال',\n    R = 'ریال',\n    TOMAN = 'تومان',\n    T = 'تومان'\n}\n\n/**\n * Formats input as a currency value.\n * default type is rial. You can choose on of the following currency types:\n *\n *      R or RIAL for ریال\n *\n *      T or TOMAN for تومان\n *\n *  This pipe formats numbers like: 123,456,123\n */\n@Pipe({name: 'irc'})\nexport class IRCurrencyPipe implements PipeTransform {\n    /**\n     * @param value a number of a string only contains digits\n     * @param type currency type\n     * @example 1925100 -> 1,925,100 ریال\n     */\n    // transform(value: number | string, type?: keyof IRCurrencies, digitsInfo?: string): string | null;\n    transform(value: number | string | null | undefined, type: keyof typeof IRCurrencies = 'RIAL' as keyof typeof IRCurrencies): string {\n        const numericValue = Number(value);\n        if (isNaN(numericValue)) {\n            throw new Error(`NaN is not a acceptable number`);\n        }\n        return `${numericValue.toLocaleString('en-US')} ${IRCurrencies[type]}`;\n    }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Formats a 10-digit number or string to national code format.\n */\n@Pipe({name: 'nationalCode'})\nexport class NationalCodePipe implements PipeTransform {\n\n    /**\n     * @param value a 10-digit number or a string only contains 10 digits.\n     * @example 001-236547-5\n     * @return a formatted text from 10-digit input or an empty string if length of the input is not 10.\n     */\n    transform(value: string | number): string {\n        const normalizedValue = String(value);\n        if (normalizedValue.length !== 10) {\n            return '';\n        }\n        return `${normalizedValue.substring(0, 3)}-${normalizedValue.substring(3, 9)}-${normalizedValue[9]}`;\n    }\n}\n","/**\n * This function removes fraction part of the number if exists. So, for example, it will turn -145,455 to -145 and\n * 145,455 to 145.\n */\nexport function round(x: number): number {      // eslint-disable-line prefer-arrow/prefer-arrow-functions\n    if (x < 0) {\n        return Math.ceil(x);\n    } else {\n        return Math.floor(x);\n    }\n}\n\n/**\n * This function returns integer part of division result of num1 and num2 numbers.\n *\n * For example: div (10, 3) is equal to 3.\n */\nexport function div(num1: number, num2: number): number {      // eslint-disable-line prefer-arrow/prefer-arrow-functions\n    return round(num1 / num2);\n}\n\n/**\n * This function return arithmetic mod result of two inputs as a integer.\n */\nexport function mod(num1: number, num2: number): number {      // eslint-disable-line prefer-arrow/prefer-arrow-functions\n    return num1 - (div(num1, num2) * num2);\n}\n","/**\n * This Error will throw When inputted date is not a valid date according to the Jalali Calendar.\n */\nexport class InvalidJalaliDateError extends Error {\n    constructor() {\n        super('Invalid jalali date.');\n    }\n}\n","import {Injectable} from '@angular/core';\nimport {div, mod} from './ArithmeticUtils';\nimport {InvalidJalaliDateError} from './InvalidJalaliDate.error';\n\n\n/**\n * Methods of this Service doing validation stuff on a Jalali date. You can use this Service using DI in all around of your app for\n * validating Jalali dates without needing to convert them to the Georgian Date.\n */\n@Injectable({\n    providedIn: 'root'\n})\nexport class JalaliDateValidatorService {\n\n    private static _minAcceptableYear = -61;\n    private static _maxAcceptableYear = 3177;\n\n    constructor() {\n    }\n\n    /**\n     * Returns number of days in a given month counting from 1.\n     *\n     * @param jYear full jalali year like 1397\n     * @param jMonth number of month from 0 for Farvardin to 11 for Esfand.\n     */\n    jMonthLength(jYear: number, jMonth: number): number {\n        if (jMonth < 6) {\n            return 31;\n        }\n        if (jMonth < 11 || this.isJYearLeap(jYear)) {\n            return 30;\n        }\n        return 29;\n    }\n\n\n    /**\n     * Calculates the number of the leap years in jalali Calendar.\n     *\n     * @param targetJYear should be full year like: 1397 and should be between -61 to 3177.\n     *\n     * [Implementation in source code]{@link https://github.com/sijad/ts-jalaali/blob/296a7c2fa1816a5bbb0b11bbe3eb03ebc17059f6/src/jalaali.ts#L71}\n     */\n    numOfJLeapYears(targetJYear: number): number {\n        // Jalali years starting the 33-year rule.\n        const breaks = [\n            -61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210,\n            1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, 3178\n        ];\n\n        const breaksLength = breaks.length;\n        let jp = breaks[0];\n        let jump = 0;\n        let leapJ = -14;\n\n        if (!this.isValidJYear(targetJYear)) {\n            throw new InvalidJalaliDateError();\n        }\n\n        // Find the limiting years for the Jalali year jy.\n        for (let i = 1; i < breaksLength; i += 1) {\n            const jm = breaks[i];\n            jump = jm - jp;\n            if (targetJYear < jm) {\n                break;\n            }\n            leapJ = leapJ + (div(jump, 33) * 8) + div(mod(jump, 33), 4);\n            jp = jm;\n        }\n        const n = targetJYear - jp;\n\n        // Find the number of leap years from AD 621 to the beginning\n        // Of the current Jalali year in the Persian Calendar.\n        leapJ = leapJ + (div(n, 33) * 8) + div(mod(n, 33) + 3, 4);\n\n        if (mod(jump, 33) === 4 && jump - n === 4) {\n            leapJ += 1;\n        }\n        return leapJ;\n    }\n\n    /**\n     * If JYear is a leap year in jalali Calendar, return true. We using the fact that if a year is leap, number of leap years until that year\n     * and the year after it is not equal.\n     *\n     * @param jYear full jalali year like: 1397\n     */\n    isJYearLeap(jYear: number): boolean {\n        return this.numOfJLeapYears(jYear) !== this.numOfJLeapYears(jYear + 1);\n    }\n\n    /**\n     * Checks if jalali year is in acceptable range or not.\n     *\n     * [Implementation in source code]{@link https://github.com/sijad/ts-jalaali/blob/296a7c2fa1816a5bbb0b11bbe3eb03ebc17059f6/src/jalaali.ts#L27}\n     *\n     * @param jYear full jalali year like 1397\n     */\n    isValidJYear(jYear: number): boolean {\n        return jYear >= JalaliDateValidatorService._minAcceptableYear && jYear <= JalaliDateValidatorService._maxAcceptableYear;\n    }\n\n    /**\n     * Checks if jalali month is in valid range or not. In default, jMonth should start from zero.\n     * If you want to start month number from one instead of zero, you should make startFromZero parameter to false.\n     */\n    isValidJMonth(jMonth: number, startFromZero: boolean = true): boolean {\n        let minMonthNumber = 0;\n        let maxMonthNumber = 11;\n        if (!startFromZero) {\n            minMonthNumber++;\n            maxMonthNumber++;\n        }\n        return jMonth >= minMonthNumber && jMonth <= maxMonthNumber;\n    }\n\n    /**\n     * Checks if day number is in valid range according to the given year and month.\n     *\n     * @param jYear full jalali year like 1397\n     * @param jMonth month number starting from zero\n     * @param jDay day number starting from one\n     */\n    isValidJDay(jYear: number, jMonth: number, jDay: number): boolean {\n        return jDay <= this.jMonthLength(jYear, jMonth) && jDay > 0;\n    }\n\n    /**\n     * If Jalali date is not a valid Jalali date, return false. otherwise returns true.\n     *\n     * @param jYear full year number like: 1397\n     * @param jMonth starts from zero\n     * @param jDay starts from one\n     */\n    isValidJDate(jYear: number, jMonth: number, jDay: number): boolean {\n        return this.isValidJYear(jYear) && this.isValidJMonth(jMonth) && this.isValidJDay(jYear, jMonth, jDay);\n    }\n}\n","import {Injectable} from '@angular/core';\nimport {div, mod} from './ArithmeticUtils';\nimport {InvalidJalaliDateError} from './InvalidJalaliDate.error';\nimport {SimpleDateInterface} from './SimpleDate.interface';\nimport {JalaliDateValidatorService} from './jalali-date-validator.service';\n\n/**\n * This class converts Jalali date to Georgian and vase versa. You can use all of the methods as static methods.\n */\n@Injectable({\n    providedIn: 'root'\n})\nexport class JalaliDateCalculatorService {\n\n    constructor(public validator: JalaliDateValidatorService) {\n    }\n\n    /**\n     * Calculates the Julian Day number from Gregorian or Julian calendar dates.\n     *\n     * Only some code cleaning applied to the source code.\n     *\n     * The procedure was tested to be good since 1 March, -100100 (of both calendars) up to a few million years into the future.\n     *\n     * @param gDate an instance of javascript date representing a Georgian date.\n     *\n     * [Implementation in source code]{@link https://github.com/sijad/ts-jalaali/blob/296a7c2fa1816a5bbb0b11bbe3eb03ebc17059f6/src/jalaali.ts#L195}\n     */\n    numberOfPassedGDays(gDate: Date): number {\n        const gMonth = gDate.getMonth() - 7;\n        const gYear = gDate.getFullYear() + 100100;\n        const gMonthDiv = div(gMonth, 6);\n        const result = div((gYear + gMonthDiv) * 1461, 4) + div((153 * mod(gMonth + 17, 12)) + 2, 5) + gDate.getDate() - 34840408;\n        return result - div(div(gYear + gMonthDiv, 100) * 3, 4) + 752;\n    }\n\n    /**\n     * Returns number of passed days from source day in jalali calendar to the given jalali date.\n     *\n     * @param jYear full jalali year like 1397\n     * @param jMonth starts from zero\n     * @param jDay day number starts from one\n     */\n    numberOfPassedJDays(jYear: number, jMonth: number, jDay: number): number {\n        return this.numberOfPassedGDays(new Date(this.jalaliYearToGeorgianYear(jYear), 2, this.firstDayOfJYearInMarch(jYear))) +\n            (jMonth * 31) - (div(jMonth + 1, 7) * (jMonth - 6)) + jDay - 1;\n    }\n\n    /**\n     * Creates a javascript Date object from number of passed days in Georgian calendar representing Georgian date.\n     *\n     * [Implementation in source code]{@link https://github.com/sijad/ts-jalaali/blob/296a7c2fa1816a5bbb0b11bbe3eb03ebc17059f6/src/jalaali.ts#L213}\n     */\n    createGDateFromDays(numOfDays: number): Date {\n        const j = ((4 * numOfDays) + 139361631) + (div(div((4 * numOfDays) + 183187720, 146097) * 3, 4) * 4) - 3908;\n        const i = (div(mod(j, 1461), 4) * 5) + 308;\n        const gDay = div(mod(i, 153), 5) + 1;\n        const gMonth = mod(div(i, 153), 12);\n        const gYear = div(j, 1461) - 100100 + div(7 - gMonth, 6);\n        return new Date(gYear, gMonth, gDay);\n    }\n\n    /**\n     * This function returns number of passed leap years from AD 621 until targetGYear.\n     *\n     * @param targetGYear is full year number like 2018\n     *\n     * [Implementation in source code]{@link https://github.com/sijad/ts-jalaali/blob/296a7c2fa1816a5bbb0b11bbe3eb03ebc17059f6/src/jalaali.ts#L110}\n     */\n    numOfGLeapYears(targetGYear: number): number {\n        return div(targetGYear, 4) - div((div(targetGYear, 100) + 1) * 3, 4) - 150;\n    }\n\n    /**\n     * First day of the Farvardin month in Jalali calendar is in March month. This method returns the day number of new jalali year in March.\n     * The day number starts from 1 not zero and is equal to the real numbers in the calendar.\n     *\n     * @param jYear full jalali year like 1397\n     */\n    firstDayOfJYearInMarch(jYear: number): number {\n        const gYear = jYear + 621;\n        return this.validator.numOfJLeapYears(jYear) - this.numOfGLeapYears(gYear) + 20;\n    }\n\n    /**\n     * Converts jalali year number to the georgian year. Output year is the georgian year that jalali year starts within it, not the year\n     * that starts in the winter of jalali year.\n     *\n     * @param jYear full jalali year like 1397\n     */\n    jalaliYearToGeorgianYear(jYear: number): number {\n        return jYear + 621;\n    }\n\n    /**\n     * Converts georgian year to the jalali year. Output year is the jalali year that start within the Georgian year.\n     *\n     * @param gYear full georgian year like 2018\n     */\n    georgianYearToJalaliYear(gYear: number): number {\n        return gYear - 621;\n    }\n\n    /**\n     * This method converts Georgian date to the jalali date. Output is an object implementing SimpleDateInterface.\n     *\n     * ATTENTION: month number starts from 0, but day number starts from 1. Just like native javascript Date object.\n     *\n     * @param gDate Georgian date as a javascript Date object.\n     *\n     * [Implementation in source code]{@link https://github.com/sijad/ts-jalaali/blob/296a7c2fa1816a5bbb0b11bbe3eb03ebc17059f6/src/jalaali.ts#L149}\n     */\n    convertToJalali(gDate: Date): SimpleDateInterface {\n        const georgianYear = gDate.getFullYear();\n        let jalaliYear = this.georgianYearToJalaliYear(georgianYear);\n        const passedDays = this.numberOfPassedGDays(gDate);\n        const numOfPassedDaysTo1Farvardin = this.numberOfPassedGDays(new Date(georgianYear, 2, this.firstDayOfJYearInMarch(jalaliYear)));\n\n        let jalaliDay: number;\n        let jalaliMonth: number;\n\n        // Find number of days that passed since 1 Farvardin.\n        let numOfDayInJYear = passedDays - numOfPassedDaysTo1Farvardin;\n        if (numOfDayInJYear >= 0) {\n            if (numOfDayInJYear <= 185) {\n                // The first 6 months.\n                jalaliMonth = div(numOfDayInJYear, 31);\n                jalaliDay = mod(numOfDayInJYear, 31) + 1;\n                return {year: jalaliYear, month: jalaliMonth, day: jalaliDay};\n            } else {\n                // The remaining months.\n                numOfDayInJYear -= 186;\n            }\n        } else {\n            // Previous Jalali year.\n            jalaliYear -= 1;\n            numOfDayInJYear += 179;\n            if (this.validator.isJYearLeap(jalaliYear)) {\n                numOfDayInJYear += 1;\n            }\n        }\n        jalaliMonth = 6 + div(numOfDayInJYear, 30);\n        jalaliDay = mod(numOfDayInJYear, 30) + 1;\n        return {year: jalaliYear, month: jalaliMonth, day: jalaliDay};\n    }\n\n    /**\n     * Converts a valid jalali date to a javascript Date object representing a equivalent Georgian date.\n     *\n     * @param jYear a full Jalali year like 1397\n     * @param jMonth starts from zero\n     * @param jDay starts from 1\n     * @throws InvalidJalaliDateError when inputted date is not a valid Jalali date.\n     */\n    convertToGeorgian(jYear: number, jMonth: number, jDay: number): Date {\n        if (!this.validator.isValidJDate(jYear, jMonth, jDay)) {\n            throw new InvalidJalaliDateError();\n        }\n        return this.createGDateFromDays(this.numberOfPassedJDays(jYear, jMonth, jDay));\n    }\n\n}\n","import {JalaliDateCalculatorService} from './jalali-date-calculator.service';\nimport {InvalidJalaliDateError} from './InvalidJalaliDate.error';\nimport {JalaliDateValidatorService} from './jalali-date-validator.service';\n\n/**\n * This class represents a complete Date object for Jalali dates. It accepts jalali Dates, converts Georgian dates to jalali and implements\n * all the behaviours of default Date object of JavaScript for Jalali Date, plus some additional methods for developers convenience.\n *\n * ATTENTION:\n *\n * UTC methods are not implemented for Jalali date. They working directly on gDate object (Corresponding date in Georgian) and changing\n * properties of this. Then new JDate object will create from the modified Georgian Date. So they may Cause unpredictable behaviour.\n * Please don't use UTC methods with \"todo\" tag on them unless you are sure about the behaviour.\n * Recreating objects are safer than working with UTC methods.\n */\nexport class JDate implements Date {\n    private static EN_MONTHS = ['Farvardin', 'Ordibehesht', 'Khordad', 'Tir', 'Mordad', 'Shahrivar', 'Mehr', 'Aban', 'Azar', 'Dey', 'Behman', 'Esfand'];\n    private static FA_MONTHS = ['فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند'];\n    private static DAYS_OF_WEEK = ['جمعه', 'شنبه', 'یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنج‌شنبه'];\n    private static EN_DAYS_OF_WEEK = ['Jom\\'e', 'Shanbe', 'Yekshanbe', 'Doshanbe', 'Seshanbe', 'Cheharshanbe', 'Panjshanbe'];\n    private static COMPLETE_BEFORE_NOON = 'قبل از ظهر';\n    private static COMPLETE_AFTER_NOON = 'بعد از ظهر';\n    private static SHORT_BEFORE_NOON = 'ق.ظ';\n    private static SHORT_AFTER_NOON = 'ب.ظ';\n    getVarDate: (() => any) | undefined;\n    private _gregorianDate: Date | undefined;\n    private _jalaliYear: number | undefined;\n    private _jMonth?: number;\n    private _jDay?: number;\n    private _calculator: JalaliDateCalculatorService = new JalaliDateCalculatorService(new JalaliDateValidatorService());\n    private _timezone: string | null;\n\n    /**\n     * For creating a JDate object, you have 5 different options.\n     *\n     * 1- If you want to have current date and time, you can simply call new JDate() without any parameter.\n     *\n     * 2- If you want to create JDate object from a jalali date string as described in the `pars` method document, you can pass that string as\n     *    first parameter and leave others empty.\n     *\n     * 3 - If you want to create JDate object from number of passed milliseconds from UNIX epoch (for example creating a Jalali date object\n     *     from result of getTime method of another Date object), you can pass the number as first parameter and leave others alone.\n     *\n     * 4 - If you want to create JDate object from a Georgian Date object, you can simply pass that Date object as first parameter and leave\n     *     others empty.\n     *\n     * 5- If you want to create JDate object from date and time values, you can simply fill corresponding parameters of each date and time\n     * value to the constructor. You don't have to fill all of the parameters. only those you need. other parameters will fill with zero.\n     * Examples of all of those scenarios:\n     *\n     * @example new JDate()\n     * @example new JDate('11 دی 1348 00:00:00')\n     * @example new JDate(-12600000)\n     * @example new JDate(new Date(2018, 0, 1))\n     * @example new JDate(1397, 0, 25)\n     * @example new JDate(1397, 11, 25, 12, 32, 45, 123)\n     * @param jYear jalai\n     * @param jMonth Month number starting from 0 and should be LESSER than 12.\n     * @param jDay\n     * @param hours\n     * @param minutes\n     * @param seconds\n     * @param milliseconds\n     * @param timezone String name of desired timezone. The default value is Tehran.\n     * @throws InvalidJalaliDateError\n     */\n    constructor(\n        jYear?: number | string | Date,\n        jMonth?: number,\n        jDay?: number,\n        hours: number = 0,\n        minutes: number = 0,\n        seconds: number = 0,\n        milliseconds: number = 0,\n        timezone: string | null = null\n    ) {\n        this._timezone = timezone;\n        if (!jYear) {\n            this._createFromDate(JDate.changeTimeZone(new Date(), timezone));\n        } else if (typeof jYear === 'string' && jMonth === undefined) {\n            this._createFromDate(JDate.changeTimeZone(new Date(JDate.parse(jYear)), timezone));\n        } else if (typeof jYear === 'number' && jMonth === undefined) {\n            this._createFromDate(JDate.changeTimeZone(new Date(jYear), timezone));\n        } else if (jYear instanceof Date && jMonth === undefined) {\n            this._createFromDate(JDate.changeTimeZone(jYear, timezone));\n        } else {\n            const gregorianDate = this._calculator.convertToGeorgian(jYear as number, jMonth as number, jDay as number);\n            gregorianDate.setHours(hours, minutes, seconds, milliseconds);\n            this._createFromDate(JDate.changeTimeZone(gregorianDate, timezone));\n        }\n        this._checkDateIsValid();\n    }\n\n    /**\n     * Sets Jalali year value to the input parameter and recalculates gDate attribute.\n     *\n     * @param value full Jalali year like 1397\n     */\n    private set jalaliYear(value: number) {\n        this._jalaliYear = value;\n        this._checkDateIsValid();\n        this._renewGDate();\n    }\n\n    /**\n     * Sets Jalali month value to the input parameter and recalculates gDate attribute.\n     *\n     * @param value month number starting from zero\n     */\n    private set jMonth(value: number) {\n        this._jMonth = value;\n        this._checkDateIsValid();\n        this._renewGDate();\n    }\n\n    /**\n     * Sets Jalali day value to the input parameter and recalculates gDate attribute.\n     *\n     * @param value day number starting from 1.\n     */\n    private set jDay(value: number) {\n        this._jDay = value;\n        this._checkDateIsValid();\n        this._renewGDate();\n    }\n\n    /**\n     * If input value length is shorter than desiredLength, adds zeros at the beginning of it until meets desired length.\n     *\n     * @param value a number or string that we want have a specific length\n     * @param desiredLength length of output string. If be shorter than input length, input will return.\n     */\n    public static zeroPadding(value: number | string, desiredLength: number): string {\n        let strValue: string = value.toString();\n        while (strValue.length < desiredLength) {\n            strValue = '0' + strValue;\n        }\n        return strValue;\n    }\n\n    /**\n     * Extracts Georgian Date object from a Jalali date string.\n     *\n     * @param dateString a Jalali date string following this pattern:\n     *\n     *        \"yyyy mmm dd HH:MM:SS\"\n     *        or this pattern:\n     *\n     *        \"yyyy mmmm dd HH:MM:SS\".\n     * @example 11 دی 1348 00:00:00\n     * @example 11 Dey 1348 00:00:00\n     * @return a Georgian Date object.\n     */\n    public static parse(dateString: string): number {\n        const calculator = new JalaliDateCalculatorService(new JalaliDateValidatorService());\n        const dateArray = dateString.split(' ');\n        if (dateArray.length < 3) {\n            throw new InvalidJalaliDateError();\n        }\n        const day = parseInt(dateArray[0], 10);\n        let month = JDate.FA_MONTHS.indexOf(dateArray[1]);\n        if (month === -1) {\n            month = JDate.EN_MONTHS.indexOf(dateArray[1]);\n        }\n        if (month === -1) {\n            throw new InvalidJalaliDateError();\n        }\n        const year = parseInt(dateArray[2], 10);\n        const timeArray = dateArray.length > 3 ? dateArray[3].split(':') : ['0', '0', '0'];\n        const hour = parseInt(timeArray[0], 10);\n        const min = parseInt(timeArray[1], 10);\n        const sec = parseInt(timeArray[2], 10);\n        const gDate = calculator.convertToGeorgian(year, month, day);\n        gDate.setHours(hour, min, sec);\n        return gDate.getTime();\n    }\n\n    /**\n     * Converts given date to a specific timezone.\n     * If timezone is null, the original date object will return.\n     *\n     * @param date The date object we want to get its value to another timezone.\n     * @param timeZone Name of target timezone.\n     *\n     * @return a Georgian Date object in new timezone.\n     */\n    public static changeTimeZone(date: Date, timeZone: string | null): Date {\n        if (!timeZone) {\n            return date;\n        }\n        const localDate = new Date(date.toLocaleString('en-US', {timeZone}));\n        localDate.setSeconds(date.getSeconds(), date.getMilliseconds());    // The above line replaces these values to zero.\n        const timeDifference = date.getTime() - localDate.getTime();\n        return new Date(date.getTime() - timeDifference);\n    }\n\n    toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string {     // eslint-disable-line no-unused-vars\n        throw new Error('Method not implemented.');\n    }\n\n    [Symbol.toPrimitive](hint: 'default' | 'string'): string;       // eslint-disable-line no-unused-vars\n\n    [Symbol.toPrimitive](hint: 'number'): number;\n\n    [Symbol.toPrimitive](hint: string): string | number;\n\n    [Symbol.toPrimitive](hint: 'default' | 'string' | 'number' | string): string | number | undefined {              // eslint-disable-line no-unused-vars\n        return undefined;\n    }\n\n    /**\n     * @return a regular javascript Date object representing Georgian date corresponding to the Jalili date of the JDate object.\n     */\n    getGeorgianDate(): Date {\n        return this._gregorianDate as Date;\n    }\n\n    /**\n     * @return the day of the month for the specified date according to local time.\n     */\n    getDate(): number {\n        return this._jDay as number;\n    }\n\n    /**\n     *  @return the day of the week for the specified date according to local time, where 0 represents Friday and 6 is Thursday.\n     */\n    getDay(): number {\n        if (this._gregorianDate === undefined) {\n            throw InvalidJalaliDateError;\n        }\n        return (this._gregorianDate.getDay() + 2) % 7;\n    }\n\n    /**\n     * @return the year (4 digits for years greater than 999) of the specified date according to local time\n     * @example 1397\n     * @example 100\n     */\n    getFullYear(): number {\n        if (!this._jalaliYear) {\n            throw InvalidJalaliDateError;\n        }\n        return this._jalaliYear;\n    }\n\n    /**\n     * @return the hour for the specified date, according to local time.\n     * @example 10\n     */\n    getHours(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getHours();\n    }\n\n    /**\n     * Converts default 24-hour clock hour value to the 12-hour clock version.\n     *\n     * @return a number between 1 to 12\n     */\n    getHours12hourClock(): number {\n        const result = this.getHours() % 12;\n        return result ? result : 12;\n    }\n\n    /**\n     * @return the milliseconds in the specified date according to local time.\n     */\n    getMilliseconds(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getMilliseconds();\n    }\n\n    /**\n     * @Return the minutes in the specified date according to local time.\n     */\n    getMinutes(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getMinutes();\n    }\n\n    /**\n     * @return the month in the specified date according to local time, as a zero-based value\n     * where zero indicates the first month of the year.\n     */\n    getMonth(): number {\n        if (this._jMonth === undefined) {\n            throw InvalidJalaliDateError;\n        }\n        return this._jMonth;\n    }\n\n    /**\n     * @return the seconds in the specified date according to local time.\n     */\n    getSeconds(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getSeconds();\n    }\n\n    /**\n     * JavaScript uses milliseconds as the unit of measurement, whereas Unix Time is in seconds.\n     *\n     * getTime() always uses UTC for time representation. For example, a client browser in one timezone, getTime() will be the same as a\n     * client browser in any other timezone.\n     *\n     *You can use this method to help assign a date and time to another Date object. This method is functionally equivalent to the\n     *  valueOf() method.\n     *\n     * @return the number of milliseconds since the Unix Epoch.\n     */\n    getTime(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getTime();\n    }\n\n    getUTCTime(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return (this._gregorianDate.getTime() + (this._gregorianDate.getTimezoneOffset() * 60 * 1000))\n    }\n\n    /**\n     * Attention: Not implemented\n     *\n     * @return the time zone difference, in minutes, from current locale (host system settings) to UTC\n     * @todo add implementation\n     */\n    getTimezoneOffset(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getTimezoneOffset();\n    }\n\n    /**\n     * Output is not jalali day.\n     *\n     * @return getUTCDate of the corresponding Georgian date.\n     * @todo add implementation\n     */\n    getUTCDate(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getUTCDate();\n    }\n\n    /**\n     * Output is not jalali day.\n     *\n     * @return getUTCDay of the corresponding Georgian date.\n     * @todo add implementation\n     */\n    getUTCDay(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getUTCDay();\n    }\n\n    /**\n     * Output is not a Jalali Year.\n     *\n     * @return getUTCFullYear of the corresponding Georgian date.\n     * @todo add implementation\n     */\n    getUTCFullYear(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getUTCFullYear();\n    }\n\n    /**\n     * @return getUTCHours of the corresponding Georgian date.\n     * @todo add implementation\n     */\n    getUTCHours(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getUTCHours();\n    }\n\n    /**\n     * @return getUTCMilliseconds of the corresponding Georgian date.\n     * @todo add implementation\n     */\n    getUTCMilliseconds(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getUTCMilliseconds();\n    }\n\n    /**\n     * @return getUTCMinutes of the corresponding Georgian date.\n     * @todo add implementation\n     */\n    getUTCMinutes(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getUTCMinutes();\n    }\n\n    /**\n     * Output is not a Jalali Year.\n     *\n     * @return getUTCMonth of the corresponding Georgian date.\n     * @todo add implementation\n     */\n    getUTCMonth(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getUTCMonth();\n    }\n\n    /**\n     * @return getUTCSeconds of the corresponding Georgian date.\n     * @todo add implementation\n     */\n    getUTCSeconds(): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.getUTCSeconds();\n    }\n\n    /**\n     * Sets the day of the JDate object relative to the beginning of the currently set month.\n     *\n     * @param date day number starts from 1.\n     * @return The number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the Date object is also changed in place).\n     */\n    setDate(date: number): number {\n        this.jDay = date;\n        return this.getTime();\n    }\n\n    /**\n     * Sets the full year for a specified date according to local time. Returns new timestamp.\n     *\n     * @param year full Jalali year like 1397\n     * @param month number of month starting from 0\n     * @param date number of day starting from 1\n     */\n    setFullYear(year: number, month?: number, date?: number): number {\n        this.jalaliYear = year;\n        if (month) {\n            this.jMonth = month;\n        }\n        if (date) {\n            this.jDay = date;\n        }\n        return this.getTime();\n    }\n\n    /**\n     * Sets the hours for a specified date according to local time, and returns the number of milliseconds since\n     * January 1, 1970 00:00:00 UTC until the time represented by the updated JDate instance.\n     *\n     * @param hours An integer between 0 and 23, representing the hour\n     * @param min An integer between 0 and 59, representing the minutes.\n     * @param sec An integer between 0 and 59, representing the seconds.\n     * @param ms A number between 0 and 999, representing the milliseconds.\n     * @return The number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n     */\n    setHours(hours: number, min?: number, sec?: number, ms?: number): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        this._gregorianDate.setHours(hours);\n        if (min !== undefined) {\n            this.setMinutes(min);\n        }\n        if (sec !== undefined) {\n            this.setSeconds(sec);\n        }\n        if (ms !== undefined) {\n            this.setMilliseconds(ms);\n        }\n        return this.getTime();\n    }\n\n    /**\n     * Sets the milliseconds for a specified date according to local time.\n     *\n     * @param ms A number between 0 and 999, representing the milliseconds.\n     * @return The number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n     */\n    setMilliseconds(ms: number): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        this._gregorianDate.setMilliseconds(ms);\n        return this.getTime();\n    }\n\n    /**\n     * Sets the minutes for a specified date according to local time.\n     *\n     * @param min An integer between 0 and 59, representing the minutes.\n     * @param sec An integer between 0 and 59, representing the seconds.\n     * @param ms A number between 0 and 999, representing the milliseconds.\n     * @return The number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n     */\n    setMinutes(min: number, sec?: number, ms?: number): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        this._gregorianDate.setMinutes(min);\n        if (sec !== undefined) {\n            this.setSeconds(sec);\n        }\n        if (ms !== undefined) {\n            this.setMilliseconds(ms);\n        }\n        return this.getTime();\n    }\n\n    /**\n     * Sets the month for a specified date according to the currently set year.\n     *\n     * @param month An integer between 0 and 11, representing the months Farvardin through Esfand.\n     * @param date An integer from 1 to 31, representing the day of the month.\n     * @return The number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n     */\n    setMonth(month: number, date?: number): number {\n        this.jMonth = month;\n        if (date !== undefined) {\n            this.jDay = date;\n        }\n        return this.getTime();\n    }\n\n    /**\n     * Sets the seconds for a specified date according to local time.\n     *\n     * @param sec An integer between 0 and 59, representing the seconds.\n     * @param ms A number between 0 and 999, representing the milliseconds.\n     * @return The number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n     */\n    setSeconds(sec: number, ms?: number): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        this._gregorianDate.setSeconds(sec);\n        if (ms !== undefined) {\n            this.setMilliseconds(ms);\n        }\n        return this.getTime();\n    }\n\n    /**\n     * Sets the JDate object to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n     *\n     * @param time sets the Date object to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n     * @return The number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n     */\n    setTime(time: number): number {\n        this._createFromDate(new Date(time));\n        return time;\n    }\n\n    /**\n     * Sets the day of the month for a specified date according to universal time.\n     * Then recreate the JDate object from new Georgian object.\n     *\n     * @param  date An integer from 1 to 31, representing the day of the month.\n     * @return The number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n     * @todo add implementation\n     */\n    setUTCDate(date: number): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        this._gregorianDate.setUTCDate(date);\n        this._createFromDate(this._gregorianDate);\n        return this.getTime();\n    }\n\n    /**\n     * Sets the full year for a specified date according to universal time.\n     * Then recreate the JDate object from new Georgian object.\n     *\n     * @param year  An integer specifying the numeric value of the year, for example, 1995.\n     * @param month  Optional. An integer between 0 and 11 representing the months January through December.\n     * @param date An integer between 1 and 31 representing the day of the month. If you specify the dayValue parameter, you must also\n     * specify the monthValue.\n     * @todo add implementation\n     */\n    setUTCFullYear(year: number, month?: number, date?: number): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        this._gregorianDate.setUTCFullYear(year, month, date);\n        this._createFromDate(this._gregorianDate);\n        return this.getTime();\n    }\n\n    /**\n     * Sets the hour for a specified date according to universal time, and returns the number of milliseconds since\n     * January 1, 1970 00:00:00 UTC until the time represented by the updated Date instance.\n     * Then recreate the JDate object from new Georgian object.\n     *\n     * @param hours  An integer between 0 and 23, representing the hour.\n     * @param min Optional. An integer between 0 and 59, representing the minutes.\n     * @param sec Optional. An integer between 0 and 59, representing the seconds. If you specify the secondsValue parameter,\n     *        you must also specify the minutesValue.\n     * @param ms Optional. A number between 0 and 999, representing the milliseconds. If you specify the msValue parameter,\n     *        you must also specify the minutesValue and secondsValue.\n     * @return The number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n     * @todo add implementation\n     */\n    setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        this._gregorianDate.setUTCHours(hours, min, sec, ms);\n        this._createFromDate(this._gregorianDate);\n        return this.getTime();\n    }\n\n    /**\n     * Sets the milliseconds for a specified date according to universal time.\n     *\n     * Then recreate the JDate object from new Georgian object.\n     *\n     * @param ms A number between 0 and 999, representing the milliseconds.\n     * @return The number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n     * @todo add implementation\n     */\n    setUTCMilliseconds(ms: number): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        this._gregorianDate.setUTCMilliseconds(ms);\n        this._createFromDate(this._gregorianDate);\n        return this.getTime();\n    }\n\n    /**\n     * Sets the minutes for a specified date according to universal time.\n     *\n     * Then recreate the JDate object from new Georgian object.\n     *\n     * @param min An integer between 0 and 59, representing the minutes.\n     * @param sec Optional. An integer between 0 and 59, representing the seconds. If you specify the secondsValue parameter,\n     *        you must also specify the minutesValue.\n     * @param ms Optional. A number between 0 and 999, representing the milliseconds. If you specify the msValue parameter,\n     *        you must also specify the minutesValue and secondsValue.\n     * @return The number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n     * @todo add implementation\n     */\n    setUTCMinutes(min: number, sec?: number, ms?: number): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        this._gregorianDate.setUTCMinutes(min, sec, ms);\n        this._createFromDate(this._gregorianDate);\n        return this.getTime();\n    }\n\n    /**\n     * Sets the month for a specified date according to universal time.\n     *\n     * Then recreate the JDate object from new Georgian object.\n     *\n     * @param month An integer between 0 and 11, representing the months January through December.\n     * @param date Optional. An integer from 1 to 31, representing the day of the month.\n     * @return The number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n     * @todo add implementation\n     */\n    setUTCMonth(month: number, date?: number): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        this._gregorianDate.setUTCMonth(month, date);\n        this._createFromDate(this._gregorianDate);\n        return this.getTime();\n    }\n\n    /**\n     * Sets the seconds for a specified date according to universal time.\n     *\n     * Then recreate the JDate object from new Georgian object.\n     *\n     * @param sec An integer between 0 and 59, representing the seconds.\n     * @param ms Optional. A number between 0 and 999, representing the milliseconds.\n     * @todo add implementation\n     */\n    setUTCSeconds(sec: number, ms?: number): number {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        this._gregorianDate.setUTCSeconds(sec, ms);\n        this._createFromDate(this._gregorianDate);\n        return this.getTime();\n    }\n\n    /**\n     * @return name of the day of the week in persian.\n     * @example دوشنبه\n     */\n    getNameOfTheDay(): string {\n        return JDate.DAYS_OF_WEEK[this.getDay()];\n    }\n\n    /**\n     * @return name of the month in persian.\n     * @example مهر\n     */\n    getNameOfTheMonth(): string {\n        return JDate.FA_MONTHS[this.getMonth()];\n    }\n\n    /**\n     * Returns the date portion of a Date object in human readable form in Persian.\n     *\n     * @return a string following this pattern: \"nameOfTheDay nameOfTheMonth dayNumber fullYear\".\n     * @example پنج‌شنبه اسفند 30 1375\n     */\n    toDateString(): string {\n        return `${this.getNameOfTheDay()} ${this.getNameOfTheMonth()} ${this.getDate()} ${this.getFullYear()}`;\n    }\n\n    /**\n     * Returns time marker of object time. all hour numbers lesser than 12 are before noon and all greater than 12 are after noon.\n     *\n     * @param shortVersion controls output. if be true, output will be in short format like: ب.ظ if be false, output will be in complete\n     *        format like: بعد از ظهر\n     * @return time marker for showing if time is before noon or after it\n     */\n    getTimeMarker(shortVersion: boolean = false): string {\n        if (this.getHours() < 12) {\n            return shortVersion ? JDate.SHORT_BEFORE_NOON : JDate.COMPLETE_BEFORE_NOON;\n        }\n        return shortVersion ? JDate.SHORT_AFTER_NOON : JDate.COMPLETE_AFTER_NOON;\n    }\n\n    /**\n     * This method format date and time stored in the JDate object according to the entered pattern.\n     *\n     * Only masks will replace and all other characters will be unchanged after formatting.\n     *\n     * You can use masks several times in a pattern but be careful because if some of masks written immediately, they create new masks with\n     * different meaning. It's better to always have some splitter characters between different masks.\n     *\n     * @param pattern a string containing zero or more formatting mask.\n     *\n     * Masks:\n     *\n     *        yyyy -> Year number in 4-digit representation. Leading zero for years lesser than 1000 ex: 1397\n     *\n     *        yy -> Year number in 2-digit representation without Leading zeros. ex: 97\n     *\n     *        mmmm -> Name of the month in English representation. ex: Esfand\n     *\n     *        mmm -> Name of the month in Persian representation. ex: اسفند\n     *\n     *        mm -> 2-digit number of the month starting from 1. Leading zero for single-digit months.\n     *\n     *        m -> number of the month starting from 1 without Leading zeros.\n     *\n     *        dddd -> Name of the day in the week in English representation. ex: Shanbe\n     *\n     *        ddd -> Name of the day in the week id Persian representation. ex: شنبه\n     *\n     *        dd -> 2-digit number of the day in the month starting from 1. Leading zero for single-digit days.\n     *\n     *        d -> number of the day in the month starting from 1 without Leading zeros.\n     *\n     *        HH -> 2-digit form of hour number in 24-hour clock format. Leading zero for single-digit hours.\n     *\n     *        H -> non zero-padding form of hour number in 24-hour clock format without Leading zeros.\n     *\n     *        hh -> 2-digit form of hour number in 12-hour clock format. Leading zero for single-digit hours.\n     *\n     *        H -> non zero-padding form of hour number in 12-hour clock format without Leading zeros.\n     *\n     *        MM -> 2-digit form of minutes number. Leading zero for single-digit minutes.\n     *\n     *        M -> non zero-padding form of minutes number without Leading zeros.\n     *\n     *        SS -> 2-digit form of seconds number. Leading zero for single-digit seconds.\n     *\n     *        S -> non zero-padding form of seconds number without Leading zeros.\n     *\n     *        l -> number of milliseconds without Leading zeros.\n     *\n     *        T -> Time marker in full format like: قبل از ظهر\n     *\n     *        t -> Time marker in short format like: ق.ظ\n     *@return formatted dateTime string.\n     */\n    format(pattern: string): string {\n        return this._fromTime(this._fromDate(pattern));\n    }\n\n    /**\n     * @return a string in simplified extended ISO format (ISO 8601), which is always 24 or 27 characters long (yyyy-mm-ddTHH:MM:SS.lZ).\n     *        Be careful because that T in the middle of the pattern is not a format Mask and is a simple character.\n     */\n    toISOString(): string {\n        return this.format('yyyy-mm-dd') + 'T' + this.format('HH:MM:SS.l') + 'Z';\n    }\n\n    /**\n     * @return a string representation of the Date object.\n     * [see toString method]{@link toString}\n     */\n    toJSON(_?: any): string {\n        return this.toString();\n    }\n\n    /**\n     * Returns formatted date with following pattern: 'ddd mmm d yyyy HH:MM:SS'\n     */\n    toString(): string {\n        return this.format('ddd mmm d yyyy HH:MM:SS');\n    }\n\n    /**\n     * [For more information see javascript Date object documentation about this method]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString}\n     *\n     * The new locales and options arguments let applications specify the language whose formatting conventions\n     * should be used and allow to customize the behavior of the function. In older implementations,\n     * which ignore the locales and options arguments, the locale used and the form of the string returned are\n     * entirely implementation dependent.\n     *\n     * @return a string with a language sensitive representation of the date portion of this date.\n     */\n    toLocaleDateString(): string;\n    toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string {              // eslint-disable-line no-dupe-class-members\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.toLocaleDateString(locales, options);\n    }\n\n    /**\n     * @return toLocaleTimeString of Georgian Date .\n     * [For more information see javascript Date object documentation about this method]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString}\n     */\n    toLocaleTimeString(): string;\n    toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string {              // eslint-disable-line no-dupe-class-members\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.toLocaleTimeString(locales, options);\n    }\n\n    /**\n     * @return toTimeString of Georgian date\n     *\n     * [For more information see javascript Date object documentation about this\n     * method]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString}\n     */\n    toTimeString(): string {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.toTimeString();\n    }\n\n    /**\n     * @return toUTCString of Georgian date.\n     *\n     * [For more information see javascript Date object documentation about this\n     * method]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString}\n     * @todo add implementation\n     */\n    toUTCString(): string {\n        if (!this._gregorianDate) {\n            throw InvalidJalaliDateError;\n        }\n        return this._gregorianDate.toUTCString();\n    }\n\n    /**\n     * Similar to the getTime method.\n     *\n     * [For more information also see getTime method]{@link getTime}\n     */\n    valueOf(): number {\n        return this.getTime();\n    }\n\n    /**\n     * This method recalculates the gDate value with private attributes those storing Jalali date parts.\n     */\n    private _renewGDate(): void {\n        if (!this._jalaliYear || !this._jMonth || !this._jDay) {\n            throw InvalidJalaliDateError;\n        }\n        this._gregorianDate = this._calculator.convertToGeorgian(this._jalaliYear, this._jMonth, this._jDay);\n    }\n\n    /**\n     * Throws InvalidJalaliDateError when date values of this object won't represent a valid Jalali date.\n     * Otherwise nothing happens.\n     *\n     * @throws InvalidJalaliDateError\n     */\n    private _checkDateIsValid(): void {\n        if (this._jalaliYear === undefined|| this._jMonth === undefined || this._jDay === undefined) {\n            throw new InvalidJalaliDateError();\n        }\n        if (!this._calculator.validator.isValidJDate(this._jalaliYear, this._jMonth, this._jDay)) {\n            throw new InvalidJalaliDateError();\n        }\n    }\n\n    /**\n     * Calculates Jalali year from Georgian Date object and sets the attributes of the object to proper values.\n     *\n     * @param gDate: The default JS Date object.\n     */\n    private _createFromDate(gDate: Date) {\n        const conversionResult = this._calculator.convertToJalali(gDate);\n        this._jalaliYear = conversionResult.year;\n        this._jMonth = conversionResult.month;\n        this._jDay = conversionResult.day;\n        this._gregorianDate = gDate;\n    }\n\n    /**\n     * Replace patterns of date formatting with corresponding strings from JDate object values.\n     * In bi-character pattern parts, missed digits will fill with zero.\n     *\n     * @param pattern a pattern string with replaceable parts:\n     *\n     *        yyyy -> Year number in 4-digit representation. ex: 1397\n     *\n     *        yy -> Year number in 2-digit representation. ex: 97\n     *\n     *        mmmm -> Name of the month in English representation. ex: Esfand\n     *\n     *        mmm -> Name of the month in Persian representation. ex: اسفند\n     *\n     *        mm -> 2-digit number of the month starting from 1\n     *\n     *        m -> non zero-padding number of the month starting from 1\n     *\n     *        dddd -> Name of the day in the week in English representation. ex: Shanbe\n     *\n     *        ddd -> Name of the day in the week id Persian representation. ex: شنبه\n     *\n     *        dd -> 2-digit number of the day in the month starting from 1\n     *\n     *        d -> non zero-padding number of the day in the month starting from 1\n     *\n     * @return A formatted string that all Date pattern parts has been replaced. Other characters of the pattern will left unchanged.\n     */\n    private _fromDate(pattern: string): string {\n        return pattern.replace(/yyyy/g, JDate.zeroPadding(this.getFullYear(), 4)).\n            replace(/\\byy\\b/g, (this.getFullYear() % 100).toString()).\n            replace(/\\bmmmm\\b/g, JDate.EN_MONTHS[this.getMonth()]).\n            replace(/\\bmmm\\b/g, JDate.FA_MONTHS[this.getMonth()]).\n            replace(/\\bmm\\b/g, JDate.zeroPadding(this.getMonth() + 1, 2)).\n            replace(/\\bm\\b/g, (this.getMonth() + 1).toString()).\n            replace(/\\bdddd\\b/g, JDate.EN_DAYS_OF_WEEK[this.getDay()]).\n            replace(/\\bddd\\b/g, JDate.DAYS_OF_WEEK[this.getDay()]).\n            replace(/\\bdd\\b/g, JDate.zeroPadding(this.getDate(), 2)).\n            replace(/\\bd\\b/g, this.getDate().toString());\n    }\n\n    /**\n     * Replace patterns of time formatting with corresponding strings from JDate object values.\n     *\n     * In bi-character pattern parts, missed digits will fill with zero.\n     *\n     * @param pattern a pattern string with replaceable parts:\n     *\n     *        HH -> 2-digit form of hour number in 24-hour clock format.\n     *\n     *        H -> non zero-padding form of hour number in 24-hour clock format.\n     *\n     *        hh -> 2-digit form of hour number in 12-hour clock format.\n     *\n     *        h -> non zero-padding form of hour number in 12-hour clock format.\n     *\n     *        H -> non zero-padding form of hour number in 12-hour clock format.\n     *\n     *        MM -> 2-digit form of minutes number.\n     *\n     *        M -> non zero-padding form of minutes number\n     *\n     *        SS -> 2-digit form of seconds number.\n     *\n     *        S -> non zero-padding form of seconds number.\n     *\n     *        l -> number of milliseconds\n     *\n     *        T -> Time marker in full format like: قبل از ظهر\n     *\n     *        t -> Time marker in short format like: ق.ظ\n     */\n    private _fromTime(pattern: string): string {\n        return pattern.replace(/\\bHH\\b/g, JDate.zeroPadding(this.getHours(), 2)).\n            replace(/\\bH\\b/g, this.getHours().toString()).\n            replace(/\\bhh\\b/g, JDate.zeroPadding(this.getHours12hourClock(), 2)).\n            replace(/\\bh\\b/g, this.getHours12hourClock().toString()).\n            replace(/\\bMM\\b/g, JDate.zeroPadding(this.getMinutes(), 2)).\n            replace(/\\bM\\b/g, this.getMinutes().toString()).\n            replace(/\\bSS\\b/g, JDate.zeroPadding(this.getSeconds(), 2)).\n            replace(/\\bS\\b/g, this.getSeconds().toString()).\n            replace(/\\bl\\b/g, this.getMilliseconds().toString()).\n            replace(/\\bT\\b/g, this.getTimeMarker(false)).\n            replace(/\\bt\\b/g, this.getTimeMarker(true));\n    }\n\n}\n\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {JDate} from '../JDate/jdate';\n\n/**\n * Pre-defined formats date formats those can use for formatting JDate objects with jdate pipe.\n */\nenum JDateFormat {            // eslint-disable-line no-shadow\n    SHORT = 'yy/m/d h:M t',\n    SHORT_DATE = 'yy/m/d h:M t',\n    MEDIUM = 'd mmm yyyy، h:M t',\n    MEDIUM_DATE = 'd mmm yyyy، h:M t',\n    LONG = 'd mmm yyyy، h:M:S T',\n    LONG_DATE = 'd mmm yyyy، h:M:S T',\n    SHORT_TIME = 'h:M t',\n    MEDIUM_TIME = 'h:M:S t',\n    LONG_TIME = 'h:M:S.l T',\n}\n\n/**\n * Formats JDate objects or convert Date objects (or any instance of classes those implement that interface) to a `JDate` object and format\n * that according to the given format.\n *\n * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to reformat the date on every change-detection\n * cycle, treat the date as an immutable object and change the reference when the pipe needs to run again.\n *\n * You can pass a format pattern string like [JDate format method]{@link https://alihoseiny.github.io/ngx-persian/classes/JDate.html#format}\n *\n * Also you can use pre-defined format names described below:\n *\n *        'SHORT': equivalent to yy/m/d h:M t {@example '97/2/23 12:12 ب.ظ'}\n *\n *        'SHORT_DATE': same as short\n *\n *        'MEDIUM': equivalent to 'd mmm yyyy، h:M t' {@example '23 اردیبهشت 1397، 12:12 ب.ظ'}\n *\n *        'MEDIUM_DATE': same as medium\n *\n *        'LONG': equivalent to 'd mmm yyyy، h:M:S T' {@example '23 اردیبهشت 1397، 12:12:30 بعد از ظهر'}\n *\n *        'LONG_DATE': same as long\n *\n *        'SHORT_TIME': equivalent to 'h:M t' {@example '12:12 ب.ظ'}\n *\n *        'MEDIUM_TIME': equivalent to 'h:M:S t' {@example '12:12:30 ب.ظ'}\n *\n *        'LONG_TIME': equivalent to 'h:M:S.l T' {@example '12:12:30.300 بعد از ظهر'}\n *\n *  Default format is `medium`.\n */\n@Pipe({\n    name: 'jdate'\n})\nexport class JdatePipe implements PipeTransform {\n\n    /**\n     * Checks if `formatName` is in the `FormatNames` enum. If it is, returns related format string. Else returns `formatName` string\n     * without any change.\n     *\n     * @param formatName format name or format pattern string\n     * @return formatting pattern string\n     */\n    private static convertNameToFormat(formatName: keyof typeof JDateFormat): string {\n        if (!JDateFormat[formatName]) {\n            return formatName;\n        }\n        return JDateFormat[formatName];\n    }\n\n    /**\n     * Formatting the date using `format` method of it with proper formatting pattern created from `format`\n     *\n     * @param value a Jalali Date object or an instance of `Date` object or any class implementing that interface\n     * @param format format name or format pattern string\n     */\n    transform(value: Date, format: string = 'MEDIUM_DATE'): string {\n        let inputValue = value;\n        if (!(inputValue instanceof JDate)) {\n            inputValue = new JDate(inputValue);\n        }\n        // @ts-ignore\n        return inputValue.format(JdatePipe.convertNameToFormat(format));\n    }\n\n}\n","import {NgModule} from '@angular/core';\nimport {PersianLetterDirective, PersianNumbersDirective} from './Validators/persian-directives';\nimport {FaNumPipe} from './Pipes/faNum.pipe';\nimport {EnNumPipe} from './Pipes/enNum.pipe';\nimport {IRCurrencyPipe} from './Pipes/IRCurrency.pipe';\nimport {NationalCodePipe} from './Pipes/nationalCode.pipe';\nimport {JdatePipe} from './Pipes/jdate.pipe';\n\n\n@NgModule({\n    declarations: [\n        PersianLetterDirective,\n        PersianNumbersDirective,\n        FaNumPipe,\n        EnNumPipe,\n        IRCurrencyPipe,\n        NationalCodePipe,\n        JdatePipe\n    ],\n    imports: [],\n    exports: [\n        PersianLetterDirective,\n        PersianNumbersDirective,\n        FaNumPipe,\n        EnNumPipe,\n        IRCurrencyPipe,\n        NationalCodePipe,\n        JdatePipe\n    ]\n})\nexport class NgxPersianModule {\n}\n","/**\n * When mobile phone number is not valid this error will throw.\n */\nexport class InvalidMobilePhoneNumberError extends Error {\n    constructor() {\n        super('This phone number is not valid.');\n    }\n}\n","/**\n * This error will throw when there is no valid mobile operator for inputted mobile phone number.\n */\nexport class InvalidMobileOperatorError extends Error {\n    constructor() {\n        super('Operator of this number is not recognizable.');\n    }\n}\n","import {Injectable} from '@angular/core';\nimport {InvalidMobilePhoneNumberError} from './InvalidMobilePhoneNumber.error';\nimport {InvalidMobileOperatorError} from './InvalidMobileOperator.error';\n\n/**\n * English name of mobile operators are enum keys and persian name of them are values.\n * All characters of all of the keys are in lowercase\n */\nexport enum operatorsNames {        // eslint-disable-line no-shadow\n    IRANCELL = 'ایرانسل',\n    MCI = 'همراه اول',\n    TALIA = 'تالیا',\n    RIGHTEL = 'رایتل',\n    SPADAN = 'اسپادان',\n    TKC = 'شبکه مستقل تلفن همراه کیش',\n    SHATEL = 'شاتل',\n    APTEL = 'آپتل',\n    AZARTEL = 'آذرتل',\n    SAMANTEL = 'سامانتل',\n    LOTUSTEL = 'لوتوس‌تل',\n    ANARESTAN = 'انارستان'\n}\n\n/**\n * A constant object. Keys are Mobile operator names and values are arrays those keep mobile codes.\n */\nexport const MobileCodes = {\n    irancell: ['0901', '0902', '0903', '0904', '0905', '0930', '0933', '0935', '0936', '0937', '0938', '0939', '0941'],\n    mci: ['0910', '0911', '0912', '0913', '0914', '0915', '0916', '0917', '0918', '0919', '0990', '0991', '0992'],\n    talia: ['0932'],\n    rightel: ['0920', '0921', '0922'],\n    spadan: ['0931'],\n    tkc: ['0934'],\n    shatel: ['099810', '099811', '099812'],\n    aptel: ['099910', '099911', '099913'],\n    azartel: ['099914'],\n    samantel: ['099996', '099997', '099998', '099999'],\n    lotustel: ['09990'],\n    anarestan: ['09944']\n};\n\n/**\n * This service using for validating phone numbers sold by Iranian Mobile operators.\n *\n * You can get operator name and validation result of a phone number by methods of this service.\n */\n@Injectable({\n    providedIn: 'root'\n})\nexport class MobilePhoneNumberService {\n\n    /**\n     * This method only checks if phoneNumber follows valid pattern. means starting by +98 or 0, then a 9 digit and then 9 digits.\n     * This method will not check validity of the phoneNumber code and can accept invalid strings those only locking like phone numbers and\n     * in reality are not a valid phone number.\n     *\n     * @link isValidPhoneNumber\n     * @param phoneNumber Digits in this string should be english digits.\n     */\n    isPhoneNumberPatternValid(phoneNumber: string): boolean {\n        const generalRegex = new RegExp(/^((\\+98|0)9\\d{9})$/);\n        return generalRegex.test(phoneNumber);\n    }\n\n    /**\n     * Removes +98 from the phoneNumber and replaces it with a 0 character.\n     *\n     * @param phoneNumber Digits in this string should be english digits.\n     */\n    normalizePhoneNumber(phoneNumber: string): string {\n        return phoneNumber.replace('+98', '0');\n    }\n\n    /**\n     * Checks all codes of all operators in MobileCodes object. IF finds a matched code, returns persian or english name of that operator from\n     * operatorsNames enum.\n     *\n     * @return operator name in english or persian according to the nameInEnglish parameter\n     * @throws InvalidMobileOperatorError if pattern is correct but operator code is not valid.\n     * @throws InvalidMobilePhoneNumberError If pattern is not correct\n     * @param phoneNumber Digits in this string should be english digits.\n     * @param nameInEnglish if true, operator name will return in English. if false operator name will return in persian\n     * @link MobileCodes\n     * @link operatorsNames\n     */\n    getPhoneNumberOperator(phoneNumber: string, nameInEnglish: boolean = false): string {\n        if (!this.isPhoneNumberPatternValid(phoneNumber)) {\n            throw new InvalidMobilePhoneNumberError();\n        }\n        const NormalizedPhoneNumber = this.normalizePhoneNumber(phoneNumber);\n        for (const operator of Object.keys(MobileCodes)) {\n            for (const code of MobileCodes[operator as keyof typeof MobileCodes]) {\n                if (NormalizedPhoneNumber.indexOf(code) === 0) {\n                    return nameInEnglish ? operator : operatorsNames[operator as keyof typeof operatorsNames];\n                }\n            }\n        }\n        throw new InvalidMobileOperatorError();\n    }\n\n    /**\n     * @return If phoneNumber follows correct pattern and has valid operator, return true. Otherwise returns false.\n     * @param phoneNumber Digits in this string should be english digits.\n     * @link getPhoneNumberOperator\n     */\n    isValidPhoneNumber(phoneNumber: string): boolean {\n        try {\n            this.getPhoneNumberOperator(phoneNumber);\n            return true;\n        } catch (e) {\n            return false;\n        }\n    }\n}\n","/**\n * When mobile phone number is not valid this error will throw.\n */\nexport class InvalidNationalCodeError extends Error {\n    constructor(nationalCode: string = '') {\n        super(`The national code value (${nationalCode}) is not a valid national code.`);\n    }\n}\n","import {Injectable} from '@angular/core';\nimport {InvalidNationalCodeError} from './InvalidNationalCode.error';\n\n/**\n * For validating Iranian National code (number), you can use this service in your components or every other places using DI or not.\n */\n@Injectable({\n    providedIn: 'root'\n})\nexport class NationalCodeService {\n    /**\n     * This method adds zero character at the beginning of the input until the length of the result reach to 10.\n     *\n     * This method removes spaces from right and left sides of the input.\n     *\n     * ATTENTION: This method doesn't any validation about correctness of the input if it has correct length (between 8 and 10).\n     *\n     * @param nationalCode a number with at most 10 digits or a string with at most 10 character.\n     * @return a string with length equal to 10.\n     * @throws InvalidNationalCodeError when length of the input value is greater than 10.\n     */\n    normalize(nationalCode: number | string): string {\n        if (!nationalCode) {\n            throw new InvalidNationalCodeError();\n        }\n        let normalizedNationalCode= nationalCode.toString();\n        normalizedNationalCode = normalizedNationalCode.trim();\n        const nationalCodeLength = normalizedNationalCode.length;\n        if (nationalCodeLength > 10 || nationalCodeLength < 8) {\n            throw new InvalidNationalCodeError(normalizedNationalCode);\n        }\n        return '0'.repeat(10 - nationalCodeLength) + normalizedNationalCode;\n    }\n\n    /**\n     * This method first normalizes the input using `normalize` method and implicitly checks input length, So you DO NOT NEED to\n     * normalize input before, but this will not make any bad effect.\n     *\n     * [Then checking validation of the input using algorithm described in this link]{@link http://www.aliarash.com/article/codemeli/codemeli.htm}\n     *\n     * @param nationalCode\n     */\n    isValid(nationalCode: number | string): boolean {\n        if (!nationalCode) {\n            return false;\n        }\n        let NormalizedNationalCode = nationalCode.toString();\n        if (this._isRepetitive(NormalizedNationalCode)) {\n            return false;\n        }\n        try {\n            NormalizedNationalCode = this.normalize(NormalizedNationalCode); // Normalizing the input and checking input length validation implicitly.\n        } catch (e) {\n            return false; // Input length is not in the valid range.\n        }\n        let multiplicationResult = 0;\n        for (let i = 0; i < 9; i++) {\n            multiplicationResult += parseInt(NormalizedNationalCode.charAt(i), 10) * (10 - i);\n        }\n        const reminder = multiplicationResult % 11;\n        const controlNum = parseInt(NormalizedNationalCode.charAt(9), 10);\n        let desiredControlNum = reminder;\n        if (reminder > 1) {\n            desiredControlNum = 11 - reminder;\n        }\n        return desiredControlNum === controlNum;\n    }\n\n    /**\n     *\n     * [We are using for loop instead of match or split because it has better performance according to this link]{@link https://stackoverflow.com/a/46312614/5400597}\n     *\n     * @return true if all characters of the `input` are equal and input length is greater than 1. Otherwise returns false.\n     * @param input\n     */\n    private _isRepetitive(input: string): boolean {\n        if (input.length < 2) {\n            return false;\n        }\n        const firstChar = input.charAt(0);\n        for (let i = 1; i < input.length; i++) {\n            if (input.charAt(i) !== firstChar) {\n                return false;\n            }\n        }\n        return true;\n    }\n}\n","/*\n * Public API Surface of ngx-persian\n */\n\n\nexport {NgxPersianModule} from './lib/ngx-persian.module';\nexport {PersianLetterService} from './lib/Services/persian-letter.service';\nexport {PersianNumberService} from './lib/Services/persian-number.service';\nexport {JDate} from './lib/JDate/jdate';\nexport {JalaliDateCalculatorService} from './lib/JDate/jalali-date-calculator.service';\nexport {JalaliDateValidatorService} from './lib/JDate/jalali-date-validator.service';\nexport {MobileCodes, MobilePhoneNumberService, operatorsNames} from './lib/Services/mobile-phone-number.service';\nexport {NationalCodeService} from './lib/Services/national-code.service';\nexport {PersianLetterDirective, PersianNumbersDirective} from './lib/Validators/persian-directives';\nexport {FaNumPipe} from './lib/Pipes/faNum.pipe';\nexport {EnNumPipe} from './lib/Pipes/enNum.pipe';\nexport {IRCurrencyPipe, IRCurrencies} from './lib/Pipes/IRCurrency.pipe';\nexport {NationalCodePipe} from './lib/Pipes/nationalCode.pipe';\nexport {JdatePipe} from './lib/Pipes/jdate.pipe';\nexport {persianNumbersValidator, persianLettersValidator} from './lib/Validators/persian-validators';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;MAGa,iCAAiC,KAAK;IAC/C;QACI,KAAK,CAAC,+CAA+C,CAAC,CAAC;KAC1D;;;MCCQ,oBAAoB;;;;;;;IAWrB,OAAO,wBAAwB,CAAC,KAAa;;QAEjD,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,oBAAoB,CAAC,oBAAoB,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;QACnG,OAAO,WAAW,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC;KAC/C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