{"version":3,"file":"ngx-mask.mjs","sources":["../../../projects/ngx-mask-lib/src/lib/ngx-mask-expression.enum.ts","../../../projects/ngx-mask-lib/src/lib/ngx-mask.config.ts","../../../projects/ngx-mask-lib/src/lib/mask-handlers/cpf-cnpj.handler.ts","../../../projects/ngx-mask-lib/src/lib/mask-handlers/generic-pattern.handler.ts","../../../projects/ngx-mask-lib/src/lib/mask-handlers/ip.handler.ts","../../../projects/ngx-mask-lib/src/lib/mask-handlers/percent.handler.ts","../../../projects/ngx-mask-lib/src/lib/mask-handlers/separator.handler.ts","../../../projects/ngx-mask-lib/src/lib/mask-handlers/mask-handlers.registry.ts","../../../projects/ngx-mask-lib/src/lib/ngx-mask-applier.service.ts","../../../projects/ngx-mask-lib/src/lib/ngx-mask.service.ts","../../../projects/ngx-mask-lib/src/lib/ngx-mask.providers.ts","../../../projects/ngx-mask-lib/src/lib/ngx-mask.directive.ts","../../../projects/ngx-mask-lib/src/lib/ngx-mask.pipe.ts","../../../projects/ngx-mask-lib/src/ngx-mask.ts"],"sourcesContent":["export const enum MaskExpression {\n    SEPARATOR = 'separator',\n    PERCENT = 'percent',\n    IP = 'IP',\n    CPF_CNPJ = 'CPF_CNPJ',\n    CPF_CNPJ_ALPHA = 'CPF_CNPJ_ALPHA',\n    MONTH = 'M',\n    MONTHS = 'M0',\n    MINUTE = 'm',\n    HOUR = 'h',\n    HOURS = 'H',\n    MINUTES = 'm0',\n    HOURS_HOUR = 'Hh',\n    SECONDS = 's0',\n    HOURS_MINUTES_SECONDS = 'Hh:m0:s0',\n    EMAIL_MASK = 'A*@A*.A*',\n    HOURS_MINUTES = 'Hh:m0',\n    MINUTES_SECONDS = 'm0:s0',\n    DAYS_MONTHS_YEARS = 'd0/M0/0000',\n    DAYS_MONTHS = 'd0/M0',\n    DAYS = 'd0',\n    DAY = 'd',\n    SECOND = 's',\n    LETTER_S = 'S',\n    DOT = '.',\n    NUMPAD_DECIMAL = 'Decimal',\n    NUMPAD_DECIMAL_CODE = 'NumpadDecimal',\n    COMMA = ',',\n    CURLY_BRACKETS_LEFT = '{',\n    CURLY_BRACKETS_RIGHT = '}',\n    MINUS = '-',\n    OR = '||',\n    HASH = '#',\n    EMPTY_STRING = '',\n    SYMBOL_STAR = '*',\n    SYMBOL_QUESTION = '?',\n    SLASH = '/',\n    WHITE_SPACE = ' ',\n    NUMBER_ZERO = '0',\n    NUMBER_NINE = '9',\n    BACKSPACE = 'Backspace',\n    DELETE = 'Delete',\n    ARROW_LEFT = 'ArrowLeft',\n    ARROW_UP = 'ArrowUp',\n    DOUBLE_ZERO = '00',\n}\n","import { EventEmitter, InjectionToken } from '@angular/core';\nimport { MaskExpression } from './ngx-mask-expression.enum';\n\nexport type InputTransformFn = (value: unknown) => string | number;\n\nexport type OutputTransformFn = (value: string | number | undefined | null) => unknown;\n\n/** Single decimal marker character accepted when `decimalMarker` is given as an array. */\nexport type DecimalMarkerChar = '.' | ',';\n\nexport type NgxMaskConfig = {\n    suffix: string;\n    prefix: string;\n    thousandSeparator: string;\n    decimalMarker: DecimalMarkerChar | [DecimalMarkerChar, DecimalMarkerChar];\n    clearIfNotMatch: boolean;\n    showMaskTyped: boolean;\n    placeHolderCharacter: string;\n    shownMaskExpression: string;\n    specialCharacters: string[] | readonly string[];\n    dropSpecialCharacters: boolean | string[] | readonly string[];\n    hiddenInput: boolean;\n    validation: boolean;\n    instantPrefix: boolean;\n    separatorLimit: string;\n    apm: boolean;\n    allowNegativeNumbers: boolean;\n    leadZeroDateTime: boolean;\n    leadZero: boolean;\n    /**\n     * Opt-in \"banking\" typing mode for separator masks with a fixed precision\n     * (`separator.N`, N > 0): typed digits fill the value from the decimal end,\n     * ATM/calculator style (5 -> 0.05 -> 0.57 -> 5.73); backspace shifts digits\n     * back to the right. Pasted and model-written values keep the regular\n     * separator formatting. Config-only option (provideNgxMask / pipe config) —\n     * it has no directive input.\n     */\n    typeFromDecimals: boolean;\n    triggerOnMaskChange: boolean;\n    keepCharacterPositions: boolean;\n    inputTransformFn: InputTransformFn;\n    outputTransformFn: OutputTransformFn;\n    maskFilled: EventEmitter<void>;\n    /**\n     * User-defined named mask aliases resolved at the DI-config level (static per injector).\n     * When the `mask` input (or pipe mask argument) exactly matches an alias key, the aliased\n     * expression is substituted before any other mask processing (including `||` multi-masks).\n     * Alias keys must not shadow built-in tokens (IP, CPF_CNPJ, CPF_CNPJ_ALPHA, ...) — such\n     * aliases are ignored with a one-time console warning.\n     */\n    maskAliases: Record<string, string>;\n    /**\n     * When set, this raw value is written through the regular mask pipeline on blur\n     * whenever the control's unmasked value is empty (covers '', a bare prefix/suffix and\n     * the showMaskTyped skeleton): the display shows the masked default and the model\n     * receives the usual output (dropSpecialCharacters/outputTransformFn applied). The\n     * write keeps the control's pristine state. `null` (default) keeps current behavior.\n     */\n    defaultValueOnBlur: string | null;\n    patterns: Record<\n        string,\n        {\n            pattern: RegExp;\n            optional?: boolean;\n            symbol?: string;\n        }\n    >;\n};\n\nexport type NgxMaskOptions = Partial<NgxMaskConfig>;\nexport const NGX_MASK_CONFIG = new InjectionToken<NgxMaskConfig>('ngx-mask config');\nexport const NEW_CONFIG = new InjectionToken<NgxMaskConfig>('new ngx-mask config');\nexport const INITIAL_CONFIG = new InjectionToken<NgxMaskConfig>('initial ngx-mask config');\n\nexport const initialConfig: NgxMaskConfig = {\n    suffix: '',\n    prefix: '',\n    thousandSeparator: ' ',\n    decimalMarker: ['.', ','],\n    clearIfNotMatch: false,\n    showMaskTyped: false,\n    instantPrefix: false,\n    placeHolderCharacter: '_',\n    dropSpecialCharacters: true,\n    hiddenInput: false,\n    shownMaskExpression: '',\n    separatorLimit: '',\n    allowNegativeNumbers: false,\n    validation: true,\n    specialCharacters: ['-', '/', '(', ')', '.', ':', ' ', '+', ',', '@', '[', ']', '\"', \"'\"],\n    leadZeroDateTime: false,\n    apm: false,\n    leadZero: false,\n    typeFromDecimals: false,\n    keepCharacterPositions: false,\n    triggerOnMaskChange: false,\n    inputTransformFn: (value: unknown) => value as string | number,\n    outputTransformFn: (value: string | number | undefined | null) => value,\n    maskFilled: new EventEmitter<void>(),\n    maskAliases: {},\n    defaultValueOnBlur: null,\n    patterns: {\n        '0': {\n            pattern: new RegExp('\\\\d'),\n        },\n        '9': {\n            pattern: new RegExp('\\\\d'),\n            optional: true,\n        },\n        X: {\n            pattern: new RegExp('\\\\d'),\n            symbol: '*',\n        },\n        A: {\n            pattern: new RegExp('[a-zA-Z0-9]'),\n        },\n        S: {\n            pattern: new RegExp('[a-zA-Z]'),\n        },\n        U: {\n            pattern: new RegExp('[A-Z]'),\n        },\n        L: {\n            pattern: new RegExp('[a-z]'),\n        },\n        d: {\n            pattern: new RegExp('\\\\d'),\n            symbol: '*',\n        },\n        m: {\n            pattern: new RegExp('\\\\d'),\n        },\n        M: {\n            pattern: new RegExp('\\\\d'),\n            symbol: '*',\n        },\n        H: {\n            pattern: new RegExp('\\\\d'),\n        },\n        h: {\n            pattern: new RegExp('\\\\d'),\n        },\n        s: {\n            pattern: new RegExp('\\\\d'),\n        },\n    },\n};\n\n/**\n * Built-in mask tokens dispatched by exact equality (IP, CPF_CNPJ, CPF_CNPJ_ALPHA, email)\n * or by a reserved prefix (separator, percent) inside the mask pipeline. User-defined\n * aliases must not shadow them — substituting e.g. 'IP' early would break the built-in\n * exact-equality dispatch deep in the applier.\n */\nconst RESERVED_MASK_TOKENS: ReadonlySet<string> = new Set([\n    MaskExpression.IP,\n    MaskExpression.CPF_CNPJ,\n    MaskExpression.CPF_CNPJ_ALPHA,\n    MaskExpression.EMAIL_MASK,\n    MaskExpression.SEPARATOR,\n    MaskExpression.PERCENT,\n]);\n\n/** Tracks alias keys already warned about, so the shadowing warning fires once per key. */\nconst warnedShadowedAliases = new Set<string>();\n\n/**\n * Resolves a user-defined mask alias to its mask expression. Returns the input expression\n * unchanged when no alias matches or when the alias key shadows a built-in token (in which\n * case a console warning is emitted once per key and the built-in wins).\n */\nexport function resolveMaskAlias(\n    maskExpression: string | null | undefined,\n    maskAliases: Record<string, string> | undefined\n): string {\n    const expression = maskExpression ?? MaskExpression.EMPTY_STRING;\n    if (!expression || !maskAliases) {\n        return expression;\n    }\n    const aliased = maskAliases[expression];\n    if (typeof aliased !== 'string') {\n        return expression;\n    }\n    if (RESERVED_MASK_TOKENS.has(expression)) {\n        if (!warnedShadowedAliases.has(expression)) {\n            warnedShadowedAliases.add(expression);\n            // eslint-disable-next-line no-console\n            console.warn(\n                `ngx-mask: mask alias \"${expression}\" shadows a built-in mask token and is ignored. Rename the alias.`\n            );\n        }\n        return expression;\n    }\n    return aliased;\n}\n\nexport const timeMasks: string[] = [\n    MaskExpression.HOURS_MINUTES_SECONDS,\n    MaskExpression.HOURS_MINUTES,\n    MaskExpression.MINUTES_SECONDS,\n];\n\nexport const withoutValidation: string[] = [\n    MaskExpression.PERCENT,\n    MaskExpression.HOURS_HOUR,\n    MaskExpression.SECONDS,\n    MaskExpression.MINUTES,\n    MaskExpression.SEPARATOR,\n    MaskExpression.DAYS_MONTHS_YEARS,\n    MaskExpression.DAYS_MONTHS,\n    MaskExpression.DAYS,\n    MaskExpression.MONTHS,\n];\n","import { MaskExpression } from '../ngx-mask-expression.enum';\nimport type { MaskHandlerFn } from './mask-handler.types';\n\n/** CPF_CNPJ / CPF_CNPJ_ALPHA pre-processor (moved verbatim from applyMask). Sets\n *  `this.cpfCnpjError`, rewrites the mask, then falls through to the generic loop.\n *  Discriminated by exact equality BEFORE any startsWith handler — the 'H' of HOURS\n *  would otherwise catch CPF_CNPJ_ALPHA by substring (CODEBASE_NOTES #3/#4). */\nexport const cpfCnpjHandler: MaskHandlerFn = function (state, params) {\n    const isCpfCnpjAlpha = state.maskExpression === MaskExpression.CPF_CNPJ_ALPHA;\n    this.cpfCnpjError = params.arr.length !== 11 && params.arr.length !== 14;\n    const valueHasAnyLetter = /[a-zA-Z]/.test(state.processedValue);\n    if (valueHasAnyLetter && isCpfCnpjAlpha) {\n        state.maskExpression = 'AA.AAA.AAA/AAAA-00';\n    } else if (params.arr.length > 11) {\n        state.maskExpression = isCpfCnpjAlpha ? 'AA.AAA.AAA/AAAA-00' : '00.000.000/0000-00';\n    } else {\n        state.maskExpression = '000.000.000-00';\n    }\n    return state;\n};\n","import { MaskExpression } from '../ngx-mask-expression.enum';\nimport type { MaskHandlerFn } from './mask-handler.types';\n\n/**\n * Generic character-by-character pattern loop (moved verbatim from applyMask,\n * original lines 581-968). This is the default/fallback handler — always runs when\n * no exact/startsWith handler matched. IP and CPF_CNPJ pre-processors rewrite\n * `state.maskExpression` and then fall through into this loop.\n *\n * The inline HOURS/HOUR/MINUTE/SECOND/DAY/MONTH sub-branches (including the day-window\n * anchor flow-gating of #1611/#1513, CODEBASE_NOTES.md #20) are preserved unmodified —\n * they are explicitly out of scope for the phase-1 extraction boundary.\n *\n * Note: several branches read `this.maskExpression` (the instance field) rather than\n * the local `maskExpression` — this distinction is preserved exactly as in the\n * original source.\n */\nexport const genericPatternHandler: MaskHandlerFn = function (state, params) {\n    const { inputArray } = params;\n    const maskExpression = state.maskExpression;\n    const processedValue = state.processedValue;\n    let { cursor, result, multi, processedPosition, stepBack } = state;\n\n    for (\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        let i = 0, inputSymbol: string = inputArray[0]!;\n        i < inputArray.length;\n        i++, inputSymbol = inputArray[i] ?? MaskExpression.EMPTY_STRING\n    ) {\n        if (cursor === maskExpression.length) {\n            break;\n        }\n\n        const symbolStarInPattern: boolean = MaskExpression.SYMBOL_STAR in this.patterns;\n        if (\n            this._checkSymbolMask(\n                inputSymbol,\n                maskExpression[cursor] ?? MaskExpression.EMPTY_STRING\n            ) &&\n            maskExpression[cursor + 1] === MaskExpression.SYMBOL_QUESTION\n        ) {\n            result += inputSymbol;\n            cursor += 2;\n        } else if (\n            maskExpression[cursor + 1] === MaskExpression.SYMBOL_STAR &&\n            multi &&\n            this._checkSymbolMask(\n                inputSymbol,\n                maskExpression[cursor + 2] ?? MaskExpression.EMPTY_STRING\n            )\n        ) {\n            result += inputSymbol;\n            cursor += 3;\n            multi = false;\n        } else if (\n            this._checkSymbolMask(\n                inputSymbol,\n                maskExpression[cursor] ?? MaskExpression.EMPTY_STRING\n            ) &&\n            maskExpression[cursor + 1] === MaskExpression.SYMBOL_STAR &&\n            !symbolStarInPattern\n        ) {\n            result += inputSymbol;\n            multi = true;\n        } else if (\n            maskExpression[cursor + 1] === MaskExpression.SYMBOL_QUESTION &&\n            this._checkSymbolMask(\n                inputSymbol,\n                maskExpression[cursor + 2] ?? MaskExpression.EMPTY_STRING\n            )\n        ) {\n            result += inputSymbol;\n            cursor += 3;\n        } else if (\n            this._checkSymbolMask(\n                inputSymbol,\n                maskExpression[cursor] ?? MaskExpression.EMPTY_STRING\n            )\n        ) {\n            if (maskExpression[cursor] === MaskExpression.HOURS) {\n                if (this.apm ? Number(inputSymbol) > 9 : Number(inputSymbol) > 2) {\n                    processedPosition = !this.leadZeroDateTime\n                        ? processedPosition + 1\n                        : processedPosition;\n                    cursor += 1;\n                    this._shiftStep(cursor);\n                    i--;\n                    if (this.leadZeroDateTime) {\n                        result += '0';\n                    }\n                    continue;\n                }\n            }\n            if (maskExpression[cursor] === MaskExpression.HOUR) {\n                if (\n                    this.apm\n                        ? (result.length === 1 && Number(result) > 1) ||\n                          (result === '1' && Number(inputSymbol) > 2) ||\n                          (processedValue.slice(cursor - 1, cursor).length === 1 &&\n                              Number(processedValue.slice(cursor - 1, cursor)) > 2) ||\n                          (processedValue.slice(cursor - 1, cursor) === '1' &&\n                              Number(inputSymbol) > 2)\n                        : (result === '2' && Number(inputSymbol) > 3) ||\n                          ((result.slice(cursor - 2, cursor) === '2' ||\n                              result.slice(cursor - 3, cursor) === '2' ||\n                              result.slice(cursor - 4, cursor) === '2' ||\n                              result.slice(cursor - 1, cursor) === '2') &&\n                              Number(inputSymbol) > 3 &&\n                              cursor > 10)\n                ) {\n                    processedPosition = processedPosition + 1;\n                    cursor += 1;\n                    i--;\n                    continue;\n                }\n            }\n            if (\n                maskExpression[cursor] === MaskExpression.MINUTE ||\n                maskExpression[cursor] === MaskExpression.SECOND\n            ) {\n                if (Number(inputSymbol) > 5) {\n                    processedPosition = !this.leadZeroDateTime\n                        ? processedPosition + 1\n                        : processedPosition;\n                    cursor += 1;\n                    this._shiftStep(cursor);\n                    i--;\n                    if (this.leadZeroDateTime) {\n                        result += '0';\n                    }\n                    continue;\n                }\n            }\n            const daysCount = 31;\n            const inputValueCursor = processedValue[cursor] as string;\n            const inputValueCursorPlusOne = processedValue[cursor + 1] as string;\n            const inputValueCursorPlusTwo = processedValue[cursor + 2] as string;\n            const inputValueCursorMinusOne = processedValue[cursor - 1] as string;\n            const inputValueCursorMinusTwo = processedValue[cursor - 2] as string;\n            const inputValueSliceMinusThreeMinusOne = processedValue.slice(cursor - 3, cursor - 1);\n            const inputValueSliceMinusOnePlusOne = processedValue.slice(cursor - 1, cursor + 1);\n            const inputValueSliceCursorPlusTwo = processedValue.slice(cursor, cursor + 2);\n            const inputValueSliceMinusTwoCursor = processedValue.slice(cursor - 2, cursor);\n            // Issue #1523: when the date token directly abuts a plain digit\n            // token (year-first masks without separators like 00M0d0 or\n            // 0000M0d0), the backward-looking windows below read the previous\n            // field's digits (year) as day/month digits and skip valid input.\n            // Disable only those backward heuristics in that layout.\n            const tokenAbutsDigitField = maskExpression[cursor - 1] === MaskExpression.NUMBER_ZERO;\n            if (maskExpression[cursor] === MaskExpression.DAY) {\n                const maskStartWithMonth = maskExpression.slice(0, 2) === MaskExpression.MONTHS;\n                const startWithMonthInput: boolean =\n                    maskExpression.slice(0, 2) === MaskExpression.MONTHS &&\n                    this.specialCharacters.includes(inputValueCursorMinusTwo);\n                // Issue #1611: `cursor` indexes the mask, `i` indexes the input.\n                // On paste/writeValue of a bare digit string the cursor runs\n                // ahead of the input by every emitted separator, so cursor-based\n                // slices read year digits instead of the day — anchor the day\n                // window on the input index in those flows. Keystroke flows keep\n                // the historical cursor anchor (with showMaskTyped the value also\n                // carries placeholder chars, where the input anchor misreads).\n                const dayWindowStart = params.justPasted || this.writingValue ? i : cursor;\n                const dayWindowSlice = processedValue.slice(dayWindowStart, dayWindowStart + 2);\n                const dayWindowNext = processedValue[dayWindowStart + 1] as string;\n                if (\n                    (Number(inputSymbol) > 3 && this.leadZeroDateTime) ||\n                    (!maskStartWithMonth &&\n                        (Number(inputValueSliceCursorPlusTwo) > daysCount ||\n                            (!tokenAbutsDigitField &&\n                                Number(inputValueSliceMinusOnePlusOne) > daysCount) ||\n                            this.specialCharacters.includes(inputValueCursorPlusOne))) ||\n                    (startWithMonthInput\n                        ? Number(inputValueSliceMinusOnePlusOne) > daysCount ||\n                          (!this.specialCharacters.includes(inputValueCursor) &&\n                              this.specialCharacters.includes(inputValueCursorPlusTwo)) ||\n                          this.specialCharacters.includes(inputValueCursor)\n                        : Number(dayWindowSlice) > daysCount ||\n                          (this.specialCharacters.includes(dayWindowNext) && !params.backspaced))\n                ) {\n                    processedPosition = !this.leadZeroDateTime\n                        ? processedPosition + 1\n                        : processedPosition;\n                    cursor += 1;\n                    this._shiftStep(cursor);\n                    i--;\n\n                    if (this.leadZeroDateTime) {\n                        result += '0';\n                    }\n                    continue;\n                }\n            }\n            if (maskExpression[cursor] === MaskExpression.MONTH) {\n                const monthsCount = 12;\n                // Issue #1513: the backward-looking day/month windows below\n                // assume the digits before the MONTH token belong to a DAY\n                // field. In year-first masks with separators (e.g. 0000-M0-d0)\n                // they read YEAR digits through the separator and shove a\n                // spurious leading zero into the month. tokenAbutsDigitField\n                // (#1523) only covers separator-less layouts, so derive field\n                // ownership from the mask itself: locate the field (maximal\n                // run of non-special tokens) immediately preceding this MONTH\n                // token — a plain digit run of 3+ characters is a year, not a\n                // day, and the day-based heuristics must not fire.\n                let precedingFieldEnd = cursor - 1;\n                while (\n                    precedingFieldEnd >= 0 &&\n                    this.specialCharacters.includes(maskExpression[precedingFieldEnd] as string)\n                ) {\n                    precedingFieldEnd--;\n                }\n                let precedingFieldStart = precedingFieldEnd;\n                while (\n                    precedingFieldStart >= 0 &&\n                    !this.specialCharacters.includes(maskExpression[precedingFieldStart] as string)\n                ) {\n                    precedingFieldStart--;\n                }\n                const precedingField = maskExpression.slice(\n                    precedingFieldStart + 1,\n                    precedingFieldEnd + 1\n                );\n                const yearFieldPrecedesMonth =\n                    precedingField.length > 2 &&\n                    precedingField\n                        .split(MaskExpression.EMPTY_STRING)\n                        .every((token) => token === MaskExpression.NUMBER_ZERO);\n                // mask without day\n                const withoutDays: boolean =\n                    cursor === 0 &&\n                    (Number(inputSymbol) > 2 ||\n                        Number(inputValueSliceCursorPlusTwo) > monthsCount ||\n                        (this.specialCharacters.includes(inputValueCursorPlusOne) &&\n                            !params.backspaced));\n                // day<10 && month<12 for input\n                const specialChart = maskExpression.slice(cursor + 2, cursor + 3);\n                const day1monthInput: boolean =\n                    inputValueSliceMinusThreeMinusOne.includes(specialChart) &&\n                    maskExpression.includes('d0') &&\n                    ((this.specialCharacters.includes(inputValueCursorMinusTwo) &&\n                        Number(inputValueSliceMinusOnePlusOne) > monthsCount &&\n                        !this.specialCharacters.includes(inputValueCursor)) ||\n                        this.specialCharacters.includes(inputValueCursor));\n                //  month<12 && day<10 for input\n                const day2monthInput: boolean =\n                    !tokenAbutsDigitField &&\n                    !yearFieldPrecedesMonth &&\n                    Number(inputValueSliceMinusThreeMinusOne) <= daysCount &&\n                    !this.specialCharacters.includes(inputValueSliceMinusThreeMinusOne as string) &&\n                    this.specialCharacters.includes(inputValueCursorMinusOne) &&\n                    (Number(inputValueSliceCursorPlusTwo) > monthsCount ||\n                        this.specialCharacters.includes(inputValueCursorPlusOne));\n                // cursor === 5 && without days\n                const day2monthInputDot: boolean =\n                    (Number(inputValueSliceCursorPlusTwo) > monthsCount && cursor === 5) ||\n                    (this.specialCharacters.includes(inputValueCursorPlusOne) && cursor === 5);\n                // // day<10 && month<12 for paste whole data\n                const day1monthPaste: boolean =\n                    !tokenAbutsDigitField &&\n                    !yearFieldPrecedesMonth &&\n                    Number(inputValueSliceMinusThreeMinusOne) > daysCount &&\n                    !this.specialCharacters.includes(inputValueSliceMinusThreeMinusOne as string) &&\n                    !this.specialCharacters.includes(inputValueSliceMinusTwoCursor as string) &&\n                    Number(inputValueSliceMinusTwoCursor) > monthsCount &&\n                    maskExpression.includes('d0');\n                // 10<day<31 && month<12 for paste whole data\n                const day2monthPaste: boolean =\n                    !tokenAbutsDigitField &&\n                    !yearFieldPrecedesMonth &&\n                    Number(inputValueSliceMinusThreeMinusOne) <= daysCount &&\n                    !this.specialCharacters.includes(inputValueSliceMinusThreeMinusOne as string) &&\n                    !this.specialCharacters.includes(inputValueCursorMinusOne) &&\n                    Number(inputValueSliceMinusOnePlusOne) > monthsCount;\n                if (\n                    (Number(inputSymbol) > 1 && this.leadZeroDateTime) ||\n                    withoutDays ||\n                    day1monthInput ||\n                    day2monthPaste ||\n                    day1monthPaste ||\n                    day2monthInput ||\n                    (day2monthInputDot && !this.leadZeroDateTime)\n                ) {\n                    processedPosition = !this.leadZeroDateTime\n                        ? processedPosition + 1\n                        : processedPosition;\n                    cursor += 1;\n                    this._shiftStep(cursor);\n                    i--;\n                    if (this.leadZeroDateTime) {\n                        result += '0';\n                    }\n                    continue;\n                }\n            }\n            result += inputSymbol;\n            cursor++;\n        } else if (\n            this.specialCharacters.includes(inputSymbol) &&\n            maskExpression[cursor] === inputSymbol\n        ) {\n            result += inputSymbol;\n            cursor++;\n        } else if (\n            this.specialCharacters.indexOf(\n                maskExpression[cursor] ?? MaskExpression.EMPTY_STRING\n            ) !== -1\n        ) {\n            result += maskExpression[cursor];\n            cursor++;\n            this._shiftStep(cursor);\n            i--;\n        } else if (maskExpression[cursor] === MaskExpression.NUMBER_NINE && this.showMaskTyped) {\n            this._shiftStep(cursor);\n        } else if (\n            this.patterns[maskExpression[cursor] ?? MaskExpression.EMPTY_STRING] &&\n            this.patterns[maskExpression[cursor] ?? MaskExpression.EMPTY_STRING]?.optional\n        ) {\n            // If the input symbol is whitespace or doesn't match the pattern,\n            // skip it without consuming the mask position\n            if (inputSymbol.trim() === MaskExpression.EMPTY_STRING) {\n                // Skip whitespace input, don't advance mask cursor\n                continue;\n            }\n            if (\n                !!inputArray[cursor] &&\n                maskExpression !== '099.099.099.099' &&\n                maskExpression !== '000.000.000-00' &&\n                maskExpression !== '00.000.000/0000-00' &&\n                !maskExpression.match(/^9+\\.0+$/) &&\n                !this.patterns[maskExpression[cursor] ?? MaskExpression.EMPTY_STRING]?.optional\n            ) {\n                result += inputArray[cursor];\n            }\n            if (\n                maskExpression.includes(MaskExpression.NUMBER_NINE + MaskExpression.SYMBOL_STAR) &&\n                maskExpression.includes(MaskExpression.NUMBER_ZERO + MaskExpression.SYMBOL_STAR)\n            ) {\n                cursor++;\n            }\n\n            cursor++;\n            i--;\n        } else if (\n            this.maskExpression[cursor + 1] === MaskExpression.SYMBOL_STAR &&\n            // A typed char that exactly matches the mask's literal char at cursor+2\n            // (e.g. the '@' in 'A*@A*.A*') always terminates the 'A*' run, regardless\n            // of whether that literal is registered in `specialCharacters` — an\n            // explicitly empty `specialCharacters` list must not make mask literals\n            // unmatchable (#1512).\n            (this._findSpecialChar(this.maskExpression[cursor + 2] ?? MaskExpression.EMPTY_STRING)\n                ? this._findSpecialChar(inputSymbol) === this.maskExpression[cursor + 2]\n                : inputSymbol === this.maskExpression[cursor + 2]) &&\n            multi\n        ) {\n            cursor += 3;\n            result += inputSymbol;\n        } else if (\n            this.maskExpression[cursor + 1] === MaskExpression.SYMBOL_QUESTION &&\n            (this._findSpecialChar(this.maskExpression[cursor + 2] ?? MaskExpression.EMPTY_STRING)\n                ? this._findSpecialChar(inputSymbol) === this.maskExpression[cursor + 2]\n                : inputSymbol === this.maskExpression[cursor + 2]) &&\n            multi\n        ) {\n            cursor += 3;\n            result += inputSymbol;\n        } else if (\n            this.showMaskTyped &&\n            this.specialCharacters.indexOf(inputSymbol) < 0 &&\n            inputSymbol !== this.placeHolderCharacter &&\n            this.placeHolderCharacter.length === 1\n        ) {\n            stepBack = true;\n        }\n    }\n\n    state.cursor = cursor;\n    state.result = result;\n    state.multi = multi;\n    state.processedPosition = processedPosition;\n    state.stepBack = stepBack;\n    return state;\n};\n","import { MaskExpression } from '../ngx-mask-expression.enum';\nimport type { MaskHandlerFn } from './mask-handler.types';\n\n/** IP pre-processor (moved verbatim from applyMask). Sets `this.ipError`, rewrites\n *  the mask to `099.099.099.099`, then falls through to the generic loop. */\nexport const ipHandler: MaskHandlerFn = function (state) {\n    const valuesIP = state.processedValue.split(MaskExpression.DOT);\n    this.ipError = this._validIP(valuesIP);\n\n    state.maskExpression = '099.099.099.099';\n    return state;\n};\n","import { MaskExpression } from '../ngx-mask-expression.enum';\nimport type { MaskHandlerFn } from './mask-handler.types';\n\n/** PERCENT handler (moved verbatim from applyMask). startsWith(PERCENT); terminal —\n *  produces the final `result`, no fallthrough. */\nexport const percentHandler: MaskHandlerFn = function (state, params) {\n    const { backspaced } = params;\n    const { cursor } = state;\n    let processedValue = state.processedValue;\n    if (\n        processedValue.match('[a-z]|[A-Z]') ||\n        // eslint-disable-next-line no-useless-escape\n        (processedValue.match(/[-!$%^&*()_+|~=`{}\\[\\]:\";'<>?,\\/.]/) && !backspaced)\n    ) {\n        processedValue = this._stripToDecimal(processedValue);\n        const precision: number = this.getPrecision(state.maskExpression);\n\n        processedValue = this.checkInputPrecision(processedValue, precision);\n    }\n    const decimalMarker = this._activeDecimalMarker(processedValue);\n    if (\n        processedValue.indexOf(decimalMarker) > 0 &&\n        !this.percentage(processedValue.substring(0, processedValue.indexOf(decimalMarker)))\n    ) {\n        let base: string = processedValue.substring(0, processedValue.indexOf(decimalMarker) - 1);\n        if (\n            this.allowNegativeNumbers &&\n            processedValue.slice(cursor, cursor + 1) === MaskExpression.MINUS &&\n            !backspaced\n        ) {\n            base = processedValue.substring(0, processedValue.indexOf(decimalMarker));\n        }\n\n        processedValue = `${base}${processedValue.substring(\n            processedValue.indexOf(decimalMarker),\n            processedValue.length\n        )}`;\n    }\n    let value: string;\n    // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n    this.allowNegativeNumbers && processedValue.slice(cursor, cursor + 1) === MaskExpression.MINUS\n        ? (value = `${MaskExpression.MINUS}${processedValue.slice(cursor + 1, cursor + processedValue.length)}`)\n        : (value = processedValue);\n    if (this.percentage(value)) {\n        state.result = this._splitPercentZero(processedValue);\n    } else {\n        state.result = this._splitPercentZero(\n            processedValue.substring(0, processedValue.length - 1)\n        );\n    }\n    state.processedValue = processedValue;\n    return state;\n};\n","import { MaskExpression } from '../ngx-mask-expression.enum';\nimport type { MaskHandlerFn } from './mask-handler.types';\n\n/**\n * SEPARATOR handler (moved verbatim from applyMask, original lines 219-580).\n * Discriminator: `maskExpression.startsWith(MaskExpression.SEPARATOR)`. Produces the\n * final `result` for this call.\n *\n * Two sequential zero-handling stages are preserved together, in original relative\n * order (CODEBASE_NOTES.md #13): the `if (backspaced)` guard block and the\n * precision-0 leading-zero stripper.\n *\n * The `typeFromDecimals` sub-case (#733/#1414/#1315) early-returns the final string\n * via `state.earlyReturn` after calling `cb()` — this must bypass the shared\n * post-processing in `applyMask` exactly, or the caret-pin `cb()` contract breaks.\n */\nexport const separatorHandler: MaskHandlerFn = function (state, params) {\n    const {\n        backspaced,\n        justPasted,\n        startsWithPrefix,\n        prefixAlreadyRemovedByCaller,\n        cb,\n        inputValue,\n    } = params;\n    let { processedValue, processedPosition, backspaceShift, shift, stepBack } = state;\n    let result: string;\n\n    if (\n        processedValue.match('[wа-яА-Я]') ||\n        processedValue.match('[ЁёА-я]') ||\n        processedValue.match('[a-z]|[A-Z]') ||\n        processedValue.match(/[-@#!$%\\\\^&*()_£¬'+|~=`{}\\]:\";<>.?/]/) ||\n        processedValue.match('[^A-Za-z0-9,]')\n    ) {\n        processedValue = this._stripToDecimal(processedValue);\n    }\n\n    const precision: number = this.getPrecision(state.maskExpression);\n    let decimalMarker = this.decimalMarker;\n\n    if (Array.isArray(this.decimalMarker)) {\n        decimalMarker = this._activeDecimalMarker(this.actualValue);\n    }\n\n    // Issues #733/#1414/#1315: opt-in \"banking\" typing mode — typed digits fill\n    // the value from the decimal end, ATM/calculator style (5 -> 0.05 -> 0.57\n    // -> 5.73); backspace shifts digits back to the right. Only keystroke and\n    // backspace flows are reinterpreted; paste and writeValue keep the regular\n    // separator formatting. The early return leaves every existing separator\n    // path byte-identical when the option is off.\n    if (\n        this.typeFromDecimals &&\n        Number.isFinite(precision) &&\n        precision > 0 &&\n        !justPasted &&\n        !this.writingValue\n    ) {\n        result = this._formatFromDecimals(processedValue, precision, decimalMarker as string);\n        this._shift.clear();\n        const res =\n            result.includes(MaskExpression.MINUS) && this.prefix && this.allowNegativeNumbers\n                ? `${MaskExpression.MINUS}${this.prefix}${result\n                      .split(MaskExpression.MINUS)\n                      .join(MaskExpression.EMPTY_STRING)}${this.suffix}`\n                : result.length\n                  ? `${this.prefix}${result}${this.suffix}`\n                  : this.instantPrefix\n                    ? this.prefix\n                    : MaskExpression.EMPTY_STRING;\n        // Pin the caret to the end of the value part: every keystroke reshapes\n        // the whole string, so the in-place caret position is meaningless here.\n        cb(res.length - this.suffix.length - processedPosition, true);\n        state.earlyReturn = res;\n        return state;\n    }\n\n    // Issue #1250: typing an additional decimal marker into a value that\n    // already contains one must be a no-op — otherwise everything after the\n    // new marker is re-parsed as a fresh decimal part and the value is\n    // mangled (15.000,53 + ',' typed after the '1' -> 1,5). Remove the newly\n    // typed marker (the char right before the caret) and step the caret back.\n    // Paste keeps its own semantics (#1547 below: last marker wins), and\n    // backspace/writeValue flows cannot introduce a new marker.\n    if (!justPasted && !backspaced && !this.writingValue) {\n        const isDecimalMarkerChar = (char: string | undefined): boolean =>\n            !!char &&\n            char !== this.thousandSeparator &&\n            (Array.isArray(this.decimalMarker)\n                ? this.decimalMarker.includes(char as MaskExpression.COMMA | MaskExpression.DOT)\n                : char === this.decimalMarker);\n        const prefixOffset =\n            startsWithPrefix && !prefixAlreadyRemovedByCaller ? this.prefix.length : 0;\n        const typedMarkerIndex = processedPosition - prefixOffset - 1;\n        if (typedMarkerIndex >= 0 && isDecimalMarkerChar(processedValue[typedMarkerIndex])) {\n            let markerCount = 0;\n            for (const char of processedValue) {\n                if (isDecimalMarkerChar(char)) {\n                    markerCount++;\n                }\n            }\n            if (markerCount > 1) {\n                processedValue =\n                    processedValue.slice(0, typedMarkerIndex) +\n                    processedValue.slice(typedMarkerIndex + 1);\n                stepBack = true;\n            }\n        }\n    }\n\n    // Issue #1547: a pasted value may contain grouping separators that are\n    // also configured decimal markers (default decimalMarker is ['.', ',']),\n    // e.g. '1,234.56'. Only the last marker character can actually be the\n    // decimal marker — treat the earlier ones as thousand separators and\n    // strip them, otherwise formatting cuts the value off at the first one.\n    if (justPasted && Array.isArray(this.decimalMarker)) {\n        const markerPositions: number[] = [];\n        for (let i = 0; i < processedValue.length; i++) {\n            const char = processedValue[i] as string;\n            if (\n                char !== this.thousandSeparator &&\n                this.decimalMarker.includes(char as MaskExpression.COMMA | MaskExpression.DOT)\n            ) {\n                markerPositions.push(i);\n            }\n        }\n        if (markerPositions.length > 1) {\n            const lastMarkerPosition = markerPositions[markerPositions.length - 1];\n            processedValue = processedValue\n                .split(MaskExpression.EMPTY_STRING)\n                .filter(\n                    (_, index) => index === lastMarkerPosition || !markerPositions.includes(index)\n                )\n                .join(MaskExpression.EMPTY_STRING);\n        }\n    }\n\n    if (backspaced) {\n        const { decimalMarkerIndex, nonZeroIndex } = this._findFirstNonZeroAndDecimalIndex(\n            processedValue,\n            decimalMarker as '.' | ','\n        );\n        const zeroIndexMinus = processedValue[0] === MaskExpression.MINUS;\n        const zeroIndexDecimalMarker = processedValue[0] === decimalMarker;\n        const firstIndexDecimalMarker = processedValue[1] === decimalMarker;\n\n        // Issues #1355/#1578: an all-zero remainder (e.g. '00' from '500', '00,000'\n        // from '100,000') must keep its zeros, matching the ',000,000' case.\n        // Only collapse when nothing but a bare decimal marker (or '-.') remains.\n        if (\n            (zeroIndexDecimalMarker && !nonZeroIndex) ||\n            (zeroIndexMinus && firstIndexDecimalMarker && !nonZeroIndex)\n        ) {\n            processedValue = MaskExpression.NUMBER_ZERO;\n        }\n\n        if (decimalMarkerIndex && nonZeroIndex && zeroIndexMinus && processedPosition === 1) {\n            if (decimalMarkerIndex < nonZeroIndex || decimalMarkerIndex > nonZeroIndex) {\n                processedValue = MaskExpression.MINUS + processedValue.slice(nonZeroIndex);\n            }\n        }\n\n        // Issue #1516: decimalMarkerIndex is 0 when the remainder starts with\n        // the decimal marker (',34' after deleting the integer part) — a truthy\n        // check would treat it as \"no decimal marker\" and slice the marker off.\n        if (decimalMarkerIndex === null && nonZeroIndex && processedValue.length > nonZeroIndex) {\n            processedValue = zeroIndexMinus\n                ? MaskExpression.MINUS + processedValue.slice(nonZeroIndex)\n                : processedValue.slice(nonZeroIndex);\n        }\n\n        if (decimalMarkerIndex && nonZeroIndex && processedPosition === 0) {\n            if (decimalMarkerIndex < nonZeroIndex) {\n                processedValue = processedValue.slice(decimalMarkerIndex - 1);\n            }\n            if (decimalMarkerIndex > nonZeroIndex) {\n                processedValue = processedValue.slice(nonZeroIndex);\n            }\n        }\n    }\n\n    // Leading-zero stripping is a typing-time rule ('05' -> '5'). When backspaced,\n    // leading zeros before a non-zero digit were already removed above, and an\n    // all-zero remainder must keep its zeros (issues #1355/#1578).\n    if (precision === 0 && !backspaced) {\n        processedValue = this.allowNegativeNumbers\n            ? processedValue.length > 2 &&\n              processedValue[0] === MaskExpression.MINUS &&\n              processedValue[1] === MaskExpression.NUMBER_ZERO &&\n              processedValue[2] !== this.thousandSeparator &&\n              processedValue[2] !== MaskExpression.COMMA &&\n              processedValue[2] !== MaskExpression.DOT\n                ? '-' + processedValue.slice(2, processedValue.length)\n                : processedValue[0] === MaskExpression.NUMBER_ZERO &&\n                    processedValue.length > 1 &&\n                    processedValue[1] !== this.thousandSeparator &&\n                    processedValue[1] !== MaskExpression.COMMA &&\n                    processedValue[1] !== MaskExpression.DOT\n                  ? processedValue.slice(1, processedValue.length)\n                  : processedValue\n            : processedValue.length > 1 &&\n                processedValue[0] === MaskExpression.NUMBER_ZERO &&\n                processedValue[1] !== this.thousandSeparator &&\n                processedValue[1] !== MaskExpression.COMMA &&\n                processedValue[1] !== MaskExpression.DOT\n              ? processedValue.slice(1, processedValue.length)\n              : processedValue;\n    } else {\n        if (processedValue[0] === decimalMarker && processedValue.length > 1 && !backspaced) {\n            processedValue =\n                MaskExpression.NUMBER_ZERO + processedValue.slice(0, processedValue.length + 1);\n            this.plusOnePosition = true;\n        }\n        if (\n            processedValue[0] === MaskExpression.NUMBER_ZERO &&\n            processedValue[1] !== decimalMarker &&\n            processedValue[1] !== this.thousandSeparator &&\n            !backspaced\n        ) {\n            processedValue =\n                processedValue.length > 1\n                    ? processedValue.slice(0, 1) +\n                      decimalMarker +\n                      processedValue.slice(1, processedValue.length + 1)\n                    : processedValue;\n            this.plusOnePosition = true;\n        }\n        if (\n            this.allowNegativeNumbers &&\n            !backspaced &&\n            processedValue[0] === MaskExpression.MINUS &&\n            (processedValue[1] === decimalMarker ||\n                processedValue[1] === MaskExpression.NUMBER_ZERO)\n        ) {\n            processedValue =\n                processedValue[1] === decimalMarker && processedValue.length > 2\n                    ? processedValue.slice(0, 1) +\n                      MaskExpression.NUMBER_ZERO +\n                      processedValue.slice(1, processedValue.length)\n                    : processedValue[1] === MaskExpression.NUMBER_ZERO &&\n                        processedValue.length > 2 &&\n                        processedValue[2] !== decimalMarker\n                      ? processedValue.slice(0, 2) +\n                        decimalMarker +\n                        processedValue.slice(2, processedValue.length)\n                      : processedValue;\n            this.plusOnePosition = true;\n        }\n    }\n\n    // Historical note: pre-refactor code used different allowed-character regexes\n    // per config (plain separator: no COMMA; dot thousand-sep: no SPACE, COMMA OK;\n    // comma thousand-sep: no SPACE, COMMA OK). The unified regex below removes\n    // exactly the active thousandSeparator + decimalMarker(s) from the invalid set,\n    // so each config already accepts its own chars and rejects the others —\n    // verified by the \"unified invalidChars regex\" cases in separator.spec.ts.\n    const thousandSeparatorCharEscaped: string = this._charToRegExpExpression(\n        this.thousandSeparator\n    );\n    let invalidChars: string = '@#!$%^&*()_+|~=`{}\\\\[\\\\]:\\\\s,\\\\.\";<>?\\\\/'.replace(\n        thousandSeparatorCharEscaped,\n        ''\n    );\n    //.replace(decimalMarkerEscaped, '');\n    if (Array.isArray(this.decimalMarker)) {\n        for (const marker of this.decimalMarker) {\n            invalidChars = invalidChars.replace(\n                this._charToRegExpExpression(marker),\n                MaskExpression.EMPTY_STRING\n            );\n        }\n    } else {\n        invalidChars = invalidChars.replace(this._charToRegExpExpression(this.decimalMarker), '');\n    }\n\n    const invalidCharRegexp = new RegExp('[' + invalidChars + ']');\n    if (processedValue.match(invalidCharRegexp)) {\n        processedValue = processedValue.substring(0, processedValue.length - 1);\n    }\n\n    processedValue = this.checkInputPrecision(processedValue, precision);\n    const strForSep: string = processedValue.replace(\n        new RegExp(thousandSeparatorCharEscaped, 'g'),\n        ''\n    );\n\n    result = this._formatWithSeparators(\n        strForSep,\n        this.thousandSeparator,\n        this.decimalMarker,\n        precision\n    );\n\n    const commaShift: number =\n        result.indexOf(MaskExpression.COMMA) - processedValue.indexOf(MaskExpression.COMMA);\n    const shiftStep: number = result.length - processedValue.length;\n    const backspacedDecimalMarkerWithSeparatorLimit =\n        backspaced && result.length < inputValue.length - this.suffix.length && this.separatorLimit;\n\n    if (\n        (result[processedPosition - 1] === this.thousandSeparator ||\n            result[processedPosition - this.prefix.length]) &&\n        this.prefix &&\n        backspaced\n    ) {\n        processedPosition = processedPosition - 1;\n    } else if (\n        (shiftStep > 0 && result[processedPosition] !== this.thousandSeparator) ||\n        backspacedDecimalMarkerWithSeparatorLimit\n    ) {\n        backspaceShift = true;\n        let _shift = 0;\n        do {\n            this._shift.add(processedPosition + _shift);\n            _shift++;\n        } while (_shift < shiftStep);\n    } else if (\n        result[processedPosition - 1] === this.thousandSeparator ||\n        shiftStep === -4 ||\n        shiftStep === -3 ||\n        result[processedPosition] === this.thousandSeparator\n    ) {\n        this._shift.clear();\n        this._shift.add(processedPosition - 1);\n    } else if (\n        (commaShift !== 0 &&\n            processedPosition > 0 &&\n            !(\n                result.indexOf(MaskExpression.COMMA) >= processedPosition && processedPosition > 3\n            )) ||\n        (!(result.indexOf(MaskExpression.DOT) >= processedPosition && processedPosition > 3) &&\n            shiftStep <= 0)\n    ) {\n        this._shift.clear();\n        backspaceShift = true;\n        shift = shiftStep;\n\n        processedPosition += shiftStep;\n        this._shift.add(processedPosition);\n    } else {\n        this._shift.clear();\n    }\n\n    state.processedValue = processedValue;\n    state.processedPosition = processedPosition;\n    state.result = result;\n    state.backspaceShift = backspaceShift;\n    state.shift = shift;\n    state.stepBack = stepBack;\n    return state;\n};\n","import { MaskExpression } from '../ngx-mask-expression.enum';\nimport type { NgxMaskApplierService } from '../ngx-mask-applier.service';\nimport { cpfCnpjHandler } from './cpf-cnpj.handler';\nimport { genericPatternHandler } from './generic-pattern.handler';\nimport { ipHandler } from './ip.handler';\nimport type { MaskHandlerEntry, MaskHandlerParams, MaskHandlerState } from './mask-handler.types';\nimport { percentHandler } from './percent.handler';\nimport { separatorHandler } from './separator.handler';\n\n/** Ordered dispatch table. Exact-match entries (IP, CPF_CNPJ) MUST precede\n *  startsWith entries (PERCENT, SEPARATOR) — mirrors the original `if/else if` order\n *  and preserves the exact-before-substring guarantee (CODEBASE_NOTES #3/#4).\n *  `terminal: false` = pre-processor (rewrites mask, falls through to generic loop);\n *  `terminal: true` = resolves `result` and skips the generic loop. */\ntype RegistryEntry = MaskHandlerEntry & {\n    readonly terminal: boolean;\n};\n\nconst MASK_HANDLERS: readonly RegistryEntry[] = [\n    {\n        id: 'ip',\n        terminal: false,\n        match: (maskExpression) => maskExpression === MaskExpression.IP,\n        handle: ipHandler,\n    },\n    {\n        id: 'cpf-cnpj',\n        terminal: false,\n        match: (maskExpression) =>\n            maskExpression === MaskExpression.CPF_CNPJ ||\n            maskExpression === MaskExpression.CPF_CNPJ_ALPHA,\n        handle: cpfCnpjHandler,\n    },\n    {\n        id: 'percent',\n        terminal: true,\n        match: (maskExpression) => maskExpression.startsWith(MaskExpression.PERCENT),\n        handle: percentHandler,\n    },\n    {\n        id: 'separator',\n        terminal: true,\n        match: (maskExpression) => maskExpression.startsWith(MaskExpression.SEPARATOR),\n        handle: separatorHandler,\n    },\n];\n\n/** Runs mask-type dispatch: first matching entry wins. IP/CPF_CNPJ pre-process then\n *  fall through to the generic loop; PERCENT/SEPARATOR resolve terminally; no match →\n *  generic loop directly (the original `else`). IP and CPF_CNPJ are mutually exclusive\n *  exact matches, so scanning the ordered table is behavior-identical to the original\n *  IP → CPF_CNPJ → PERCENT → SEPARATOR → else chain. */\nexport function dispatchMaskHandler(\n    self: NgxMaskApplierService,\n    state: MaskHandlerState,\n    params: MaskHandlerParams\n): MaskHandlerState {\n    for (const entry of MASK_HANDLERS) {\n        if (entry.match(state.maskExpression)) {\n            const next = entry.handle.call(self, state, params);\n            return entry.terminal ? next : genericPatternHandler.call(self, next, params);\n        }\n    }\n    return genericPatternHandler.call(self, state, params);\n}\n","import { inject, Injectable } from '@angular/core';\nimport type { DecimalMarkerChar, NgxMaskConfig } from './ngx-mask.config';\nimport { NGX_MASK_CONFIG } from './ngx-mask.config';\nimport { MaskExpression } from './ngx-mask-expression.enum';\nimport { dispatchMaskHandler } from './mask-handlers/mask-handlers.registry';\nimport type { MaskHandlerState } from './mask-handlers/mask-handler.types';\n\n@Injectable()\nexport class NgxMaskApplierService {\n    protected _config = inject<NgxMaskConfig>(NGX_MASK_CONFIG);\n\n    public dropSpecialCharacters: NgxMaskConfig['dropSpecialCharacters'] =\n        this._config.dropSpecialCharacters;\n\n    public hiddenInput: NgxMaskConfig['hiddenInput'] = this._config.hiddenInput;\n\n    public clearIfNotMatch: NgxMaskConfig['clearIfNotMatch'] = this._config.clearIfNotMatch;\n\n    public specialCharacters: NgxMaskConfig['specialCharacters'] = this._config.specialCharacters;\n\n    public patterns: NgxMaskConfig['patterns'] = this._config.patterns;\n\n    public prefix: NgxMaskConfig['prefix'] = this._config.prefix;\n\n    public suffix: NgxMaskConfig['suffix'] = this._config.suffix;\n\n    public thousandSeparator: NgxMaskConfig['thousandSeparator'] = this._config.thousandSeparator;\n\n    public decimalMarker: NgxMaskConfig['decimalMarker'] = this._config.decimalMarker;\n\n    public customPattern!: NgxMaskConfig['patterns'];\n\n    public showMaskTyped: NgxMaskConfig['showMaskTyped'] = this._config.showMaskTyped;\n\n    public placeHolderCharacter: NgxMaskConfig['placeHolderCharacter'] =\n        this._config.placeHolderCharacter;\n\n    public validation: NgxMaskConfig['validation'] = this._config.validation;\n\n    public separatorLimit: NgxMaskConfig['separatorLimit'] = this._config.separatorLimit;\n\n    public allowNegativeNumbers: NgxMaskConfig['allowNegativeNumbers'] =\n        this._config.allowNegativeNumbers;\n\n    public leadZeroDateTime: NgxMaskConfig['leadZeroDateTime'] = this._config.leadZeroDateTime;\n\n    public leadZero: NgxMaskConfig['leadZero'] = this._config.leadZero;\n\n    public typeFromDecimals: NgxMaskConfig['typeFromDecimals'] = this._config.typeFromDecimals;\n\n    public apm: NgxMaskConfig['apm'] = this._config.apm;\n\n    public inputTransformFn: NgxMaskConfig['inputTransformFn'] | null =\n        this._config.inputTransformFn;\n\n    public outputTransformFn: NgxMaskConfig['outputTransformFn'] | null =\n        this._config.outputTransformFn;\n\n    public keepCharacterPositions: NgxMaskConfig['keepCharacterPositions'] =\n        this._config.keepCharacterPositions;\n\n    public instantPrefix: NgxMaskConfig['instantPrefix'] = this._config.instantPrefix;\n\n    public triggerOnMaskChange: NgxMaskConfig['triggerOnMaskChange'] =\n        this._config.triggerOnMaskChange;\n\n    protected _shift = new Set<number>();\n\n    public plusOnePosition = false;\n\n    public maskExpression = '';\n\n    public actualValue = '';\n\n    public showKeepCharacterExp = '';\n\n    public shownMaskExpression: NgxMaskConfig['shownMaskExpression'] =\n        this._config.shownMaskExpression;\n\n    public deletedSpecialCharacter = false;\n\n    /**\n     * Whether we are currently in writeValue function, in this case when applying the mask we don't want to trigger onChange function,\n     * since writeValue should be a one way only process of writing the DOM value based on the Angular model value.\n     */\n    public writingValue = false;\n\n    public ipError?: boolean;\n\n    public cpfCnpjError?: boolean;\n\n    public applyMask(\n        inputValue: string | object | boolean | null | undefined,\n        maskExpression: string,\n        position = 0,\n        justPasted = false,\n        backspaced = false,\n        // eslint-disable-next-line @typescript-eslint/no-empty-function\n        cb: (actualShift: number, backspaceShift: boolean) => void = () => {}\n    ): string {\n        if (!maskExpression || typeof inputValue !== 'string') {\n            return MaskExpression.EMPTY_STRING;\n        }\n        let cursor = 0;\n        let result = '';\n        const multi = false;\n        let backspaceShift = false;\n        let shift = 1;\n        let stepBack = false;\n        let processedValue = inputValue;\n        let processedPosition = position;\n\n        const startsWithPrefix = processedValue.slice(0, this.prefix.length) === this.prefix;\n        // On paste with showMaskTyped, NgxMaskService.applyMask has already removed the\n        // prefix via removeMask() before delegating here (unless the value consisted of\n        // the prefix alone, in which case the raw value falls through). Stripping again\n        // would eat leading characters that merely look like the prefix (#1551).\n        const prefixAlreadyRemovedByCaller =\n            justPasted &&\n            this.showMaskTyped &&\n            this.placeHolderCharacter.length === 1 &&\n            !this.leadZeroDateTime &&\n            processedValue !== this.prefix;\n\n        if (startsWithPrefix && !prefixAlreadyRemovedByCaller) {\n            processedValue = processedValue.slice(this.prefix.length);\n        }\n        if (!!this.suffix && processedValue.length > 0) {\n            processedValue = this.checkAndRemoveSuffix(processedValue);\n        }\n        if (processedValue === '(' && this.prefix) {\n            processedValue = '';\n        }\n        const inputArray: string[] = processedValue.toString().split(MaskExpression.EMPTY_STRING);\n        if (\n            this.allowNegativeNumbers &&\n            processedValue.slice(cursor, cursor + 1) === MaskExpression.MINUS\n        ) {\n            result += processedValue.slice(cursor, cursor + 1);\n        }\n        const arr: string[] = [];\n        // eslint-disable-next-line @typescript-eslint/prefer-for-of\n        for (let i = 0; i < processedValue.length; i++) {\n            if (processedValue[i]?.match('\\\\d')) {\n                arr.push(processedValue[i] ?? MaskExpression.EMPTY_STRING);\n            }\n        }\n\n        // Per-mask-type dispatch (IP/CPF_CNPJ pre-processors → generic loop; PERCENT and\n        // SEPARATOR terminal handlers; generic pattern loop as fallback). See\n        // ./mask-handlers/mask-handlers.registry.ts.\n        const state: MaskHandlerState = {\n            processedValue,\n            processedPosition,\n            cursor,\n            result,\n            multi,\n            backspaceShift,\n            shift,\n            stepBack,\n            maskExpression,\n        };\n        const resolved = dispatchMaskHandler(this, state, {\n            inputValue,\n            position,\n            justPasted,\n            backspaced,\n            cb,\n            inputArray,\n            arr,\n            startsWithPrefix,\n            prefixAlreadyRemovedByCaller,\n        });\n        if (typeof resolved.earlyReturn === 'string') {\n            return resolved.earlyReturn;\n        }\n        processedValue = resolved.processedValue;\n        processedPosition = resolved.processedPosition;\n        cursor = resolved.cursor;\n        result = resolved.result;\n        backspaceShift = resolved.backspaceShift;\n        shift = resolved.shift;\n        stepBack = resolved.stepBack;\n        // eslint-disable-next-line no-param-reassign\n        maskExpression = resolved.maskExpression;\n        if (\n            result[processedPosition - 1] &&\n            result.length + 1 === maskExpression.length &&\n            this.specialCharacters.indexOf(\n                maskExpression[maskExpression.length - 1] ?? MaskExpression.EMPTY_STRING\n            ) !== -1\n        ) {\n            result += maskExpression[maskExpression.length - 1];\n        }\n        let newPosition: number = processedPosition + 1;\n\n        while (this._shift.has(newPosition)) {\n            shift++;\n            newPosition++;\n        }\n\n        let actualShift: number =\n            justPasted && !maskExpression.startsWith(MaskExpression.SEPARATOR)\n                ? cursor\n                : this._shift.has(processedPosition)\n                  ? shift\n                  : 0;\n        if (stepBack) {\n            actualShift--;\n        }\n\n        cb(actualShift, backspaceShift);\n        if (shift < 0) {\n            this._shift.clear();\n        }\n        let onlySpecial = false;\n        if (backspaced) {\n            onlySpecial = inputArray.every((char) => this.specialCharacters.includes(char));\n        }\n\n        let res = `${this.prefix}${onlySpecial ? MaskExpression.EMPTY_STRING : result}${\n            this.showMaskTyped ? '' : this.suffix\n        }`;\n\n        if (result.length === 0) {\n            res = this.instantPrefix ? `${this.prefix}${result}` : `${result}`;\n        }\n\n        const isSpecialCharacterMaskFirstSymbol =\n            processedValue.length === 1 &&\n            this.specialCharacters.includes(maskExpression[0] as string) &&\n            processedValue !== maskExpression[0];\n\n        if (isSpecialCharacterMaskFirstSymbol) {\n            // The mask may start with several literal special characters in a row\n            // (e.g. '+(000) 000-0000'). A single typed character must be checked\n            // against the first PATTERN position of the mask, not literally against\n            // index 1 — otherwise a valid digit is rejected and the leading literals\n            // are never auto-filled (#1498).\n            let firstPatternIndex = 1;\n            while (\n                firstPatternIndex < maskExpression.length &&\n                this.specialCharacters.includes(maskExpression[firstPatternIndex] as string)\n            ) {\n                firstPatternIndex++;\n            }\n            if (\n                !this._checkSymbolMask(\n                    processedValue,\n                    maskExpression[firstPatternIndex] ?? MaskExpression.EMPTY_STRING\n                )\n            ) {\n                return '';\n            }\n        }\n\n        if (result.includes(MaskExpression.MINUS) && this.prefix && this.allowNegativeNumbers) {\n            if (backspaced && result === MaskExpression.MINUS) {\n                return '';\n            }\n            res = `${MaskExpression.MINUS}${this.prefix}${result\n                .split(MaskExpression.MINUS)\n                .join(MaskExpression.EMPTY_STRING)}${this.suffix}`;\n        }\n        return res;\n    }\n\n    public _findDropSpecialChar(inputSymbol: string): undefined | string {\n        if (Array.isArray(this.dropSpecialCharacters)) {\n            return this.dropSpecialCharacters.find((val: string) => val === inputSymbol);\n        }\n        return this._findSpecialChar(inputSymbol);\n    }\n\n    public _findSpecialChar(inputSymbol: string): undefined | string {\n        return this.specialCharacters.find((val: string) => val === inputSymbol);\n    }\n\n    public _checkSymbolMask(inputSymbol: string, maskSymbol: string): boolean {\n        this.patterns = this.customPattern ? this.customPattern : this.patterns;\n        return (\n            (this.patterns[maskSymbol]?.pattern &&\n                this.patterns[maskSymbol]?.pattern.test(inputSymbol)) ??\n            false\n        );\n    }\n\n    protected _formatWithSeparators = (\n        str: string,\n        thousandSeparatorChar: string,\n        decimalChars: string | string[],\n        precision: number\n    ) => {\n        let x: string[];\n        let decimalChar: string;\n\n        if (Array.isArray(decimalChars)) {\n            const regExp = new RegExp(\n                decimalChars.map((v) => ('[\\\\^$.|?*+()'.indexOf(v) >= 0 ? `\\\\${v}` : v)).join('|')\n            );\n            x = str.split(regExp);\n            decimalChar = str.match(regExp)?.[0] ?? MaskExpression.EMPTY_STRING;\n        } else {\n            x = str.split(decimalChars);\n            decimalChar = decimalChars;\n        }\n        const decimals: string =\n            x.length > 1 ? `${decimalChar}${x[1]}` : MaskExpression.EMPTY_STRING;\n        let res: string = x[0] ?? MaskExpression.EMPTY_STRING;\n        const separatorLimit: string = this.separatorLimit.replace(\n            /\\s/g,\n            MaskExpression.EMPTY_STRING\n        );\n        if (separatorLimit && +separatorLimit) {\n            if (res[0] === MaskExpression.MINUS) {\n                res = `-${res.slice(1, res.length).slice(0, separatorLimit.length)}`;\n            } else {\n                res = res.slice(0, separatorLimit.length);\n            }\n        }\n        res = this._applyThousandGrouping(res, thousandSeparatorChar);\n\n        if (typeof precision === 'undefined') {\n            return res + decimals;\n        } else if (precision === 0) {\n            return res;\n        }\n        return res + decimals.substring(0, precision + 1);\n    };\n\n    /**\n     * Formats a value for the `typeFromDecimals` mode: every digit of the raw value is\n     * read as one integer that is then split `precision` digits from the right\n     * (ATM/calculator style). Non-digit characters are ignored, so plain typing,\n     * mid-string edits and backspace all reduce to \"digits shifted through the\n     * decimal marker\".\n     */\n    protected _formatFromDecimals(value: string, precision: number, decimalMarker: string): string {\n        const negative = this.allowNegativeNumbers && value.startsWith(MaskExpression.MINUS);\n        let digits = value.replace(/\\D+/g, MaskExpression.EMPTY_STRING).replace(/^0+/, '');\n        if (!digits) {\n            return negative ? MaskExpression.MINUS : MaskExpression.EMPTY_STRING;\n        }\n        const separatorLimit: string = this.separatorLimit.replace(\n            /\\s/g,\n            MaskExpression.EMPTY_STRING\n        );\n        if (separatorLimit && +separatorLimit) {\n            // Dropping the overflow from the right rejects the most recently typed\n            // digits once the integer part has reached the configured limit.\n            digits = digits.slice(0, separatorLimit.length + precision);\n        }\n        digits = digits.padStart(precision + 1, MaskExpression.NUMBER_ZERO);\n        const integerPart = this._applyThousandGrouping(\n            digits.slice(0, digits.length - precision),\n            this.thousandSeparator\n        );\n        const decimalPart = digits.slice(digits.length - precision);\n        return `${negative ? MaskExpression.MINUS : MaskExpression.EMPTY_STRING}${integerPart}${decimalMarker}${decimalPart}`;\n    }\n\n    /** Inserts `separator` between every 3-digit group of an integer-digit string. */\n    private _applyThousandGrouping(digits: string, separator: string): string {\n        const rgx = /(\\d+)(\\d{3})/;\n        let grouped = digits;\n        while (separator && rgx.test(grouped)) {\n            grouped = grouped.replace(rgx, '$1' + separator + '$2');\n        }\n        return grouped;\n    }\n\n    protected percentage = (str: string): boolean => {\n        const sanitizedStr = str.replace(',', '.');\n        const value = Number(\n            this.allowNegativeNumbers && str.includes(MaskExpression.MINUS)\n                ? sanitizedStr.slice(1, str.length)\n                : sanitizedStr\n        );\n\n        return !isNaN(value) && value >= 0 && value <= 100;\n    };\n\n    public getPrecision = (maskExpression: string): number => {\n        const x: string[] = maskExpression.split(MaskExpression.DOT);\n        if (x.length > 1) {\n            return Number(x[x.length - 1]);\n        }\n\n        return Infinity;\n    };\n\n    private checkAndRemoveSuffix = (inputValue: string): string => {\n        for (let i = this.suffix?.length - 1; i >= 0; i--) {\n            const substr = this.suffix.substring(i, this.suffix?.length);\n            if (\n                inputValue.endsWith(substr) &&\n                i !== this.suffix?.length - 1 &&\n                // A partial suffix tail (i > 0) that makes up the WHOLE value is a\n                // leftover of the displayed suffix only when the previous rendered\n                // value ended with the suffix AND the edit shrank the value to (or\n                // below) the old value-part length, i.e. it was a deletion of the\n                // suffix head. Otherwise it is fresh user input that merely collides\n                // with the suffix text and must be kept (#1495).\n                (i === 0 ||\n                    inputValue.length > substr.length ||\n                    (this.actualValue.endsWith(this.suffix) &&\n                        inputValue.length <= this.actualValue.length - this.suffix.length)) &&\n                (i - 1 < 0 ||\n                    !inputValue.endsWith(this.suffix.substring(i - 1, this.suffix?.length)))\n            ) {\n                return inputValue.slice(0, inputValue.length - substr.length);\n            }\n        }\n        return inputValue;\n    };\n\n    protected checkInputPrecision = (inputValue: string, precision: number): string => {\n        let processedInputValue = inputValue;\n\n        if (precision < Infinity) {\n            const decimalMarker = this._activeDecimalMarker(inputValue);\n            const precisionRegEx = new RegExp(\n                this._charToRegExpExpression(decimalMarker) + `\\\\d{${precision}}.*$`\n            );\n            const precisionMatch: RegExpMatchArray | null =\n                processedInputValue.match(precisionRegEx);\n            const precisionMatchLength: number = (precisionMatch && precisionMatch[0]?.length) ?? 0;\n            if (precisionMatchLength - 1 > precision) {\n                const diff = precisionMatchLength - 1 - precision;\n\n                processedInputValue = processedInputValue.substring(\n                    0,\n                    processedInputValue.length - diff\n                );\n            }\n            if (\n                precision === 0 &&\n                this._compareOrIncludes(\n                    processedInputValue[processedInputValue.length - 1],\n                    decimalMarker,\n                    this.thousandSeparator\n                )\n            ) {\n                processedInputValue = processedInputValue.substring(\n                    0,\n                    processedInputValue.length - 1\n                );\n            }\n        }\n        return processedInputValue;\n    };\n\n    protected _stripToDecimal(str: string): string {\n        const isDecimalMarkerChar = (char: string): char is DecimalMarkerChar =>\n            char === MaskExpression.DOT || char === MaskExpression.COMMA;\n\n        return str\n            .split(MaskExpression.EMPTY_STRING)\n            .filter((i: string, idx: number) => {\n                const isDecimalMarker =\n                    typeof this.decimalMarker === 'string'\n                        ? i === this.decimalMarker\n                        : isDecimalMarkerChar(i) && this.decimalMarker.includes(i);\n                return (\n                    i.match('^-?\\\\d') ||\n                    i === this.thousandSeparator ||\n                    isDecimalMarker ||\n                    (i === MaskExpression.MINUS && idx === 0 && this.allowNegativeNumbers)\n                );\n            })\n            .join(MaskExpression.EMPTY_STRING);\n    }\n\n    protected _charToRegExpExpression(char: string): string {\n        // if (Array.isArray(char)) {\n        // \treturn char.map((v) => ('[\\\\^$.|?*+()'.indexOf(v) >= 0 ? `\\\\${v}` : v)).join('|');\n        // }\n        if (char) {\n            const charsToEscape = '[\\\\^$.|?*+()';\n            return char === ' ' ? '\\\\s' : charsToEscape.indexOf(char) >= 0 ? `\\\\${char}` : char;\n        }\n        return char;\n    }\n\n    protected _shiftStep(cursor: number) {\n        this._shift.add(cursor + this.prefix.length || 0);\n    }\n\n    protected _compareOrIncludes<T>(value: T, comparedValue: T | T[], excludedValue: T): boolean {\n        return Array.isArray(comparedValue)\n            ? comparedValue.filter((v) => v !== excludedValue).includes(value)\n            : value === comparedValue;\n    }\n\n    protected _validIP(valuesIP: string[]): boolean {\n        return !(\n            valuesIP.length === 4 &&\n            !valuesIP.some((value: string, index: number) => {\n                if (valuesIP.length !== index + 1) {\n                    return value === MaskExpression.EMPTY_STRING || Number(value) > 255;\n                }\n                return value === MaskExpression.EMPTY_STRING || Number(value.substring(0, 3)) > 255;\n            })\n        );\n    }\n\n    /**\n     * The single rule for \"which decimal marker is active\": the configured marker, or — for an\n     * array — the first configured marker present in `value` that is not the thousandSeparator,\n     * else the first configured marker that is not the thousandSeparator (#1653).\n     */\n    protected _activeDecimalMarker(value: string): DecimalMarkerChar {\n        if (!Array.isArray(this.decimalMarker)) {\n            return this.decimalMarker;\n        }\n        const candidates = this.decimalMarker.filter((dm) => dm !== this.thousandSeparator);\n        return (\n            candidates.find((dm) => value.includes(dm)) ?? candidates[0] ?? this.decimalMarker[0]\n        );\n    }\n\n    protected _splitPercentZero(value: string): string {\n        if (value === MaskExpression.MINUS && this.allowNegativeNumbers) {\n            return value;\n        }\n        const decimal = this._activeDecimalMarker(value);\n        const decimalIndex = value.indexOf(decimal);\n        const emptyOrMinus =\n            this.allowNegativeNumbers && value.includes(MaskExpression.MINUS) ? '-' : '';\n        if (decimalIndex === -1) {\n            const parsedValue = parseInt(emptyOrMinus ? value.slice(1, value.length) : value, 10);\n            return isNaN(parsedValue)\n                ? MaskExpression.EMPTY_STRING\n                : `${emptyOrMinus}${parsedValue}`;\n        } else {\n            const integerPart = parseInt(value.replace('-', '').substring(0, decimalIndex), 10);\n            const decimalPart = value.substring(decimalIndex + 1);\n            const integerString = isNaN(integerPart) ? '' : integerPart.toString();\n\n            return integerString === MaskExpression.EMPTY_STRING\n                ? MaskExpression.EMPTY_STRING\n                : `${emptyOrMinus}${integerString}${decimal}${decimalPart}`;\n        }\n    }\n\n    protected _findFirstNonZeroAndDecimalIndex(inputString: string, decimalMarker: '.' | ',') {\n        let decimalMarkerIndex: number | null = null;\n        let nonZeroIndex: number | null = null;\n\n        for (let i = 0; i < inputString.length; i++) {\n            const char = inputString[i];\n\n            if (char === decimalMarker && decimalMarkerIndex === null) {\n                decimalMarkerIndex = i;\n            }\n\n            if (char && char >= '1' && char <= '9' && nonZeroIndex === null) {\n                nonZeroIndex = i;\n            }\n\n            if (decimalMarkerIndex !== null && nonZeroIndex !== null) {\n                break;\n            }\n        }\n\n        return {\n            decimalMarkerIndex,\n            nonZeroIndex,\n        };\n    }\n}\n","import { ElementRef, inject, Injectable, Renderer2, signal } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport type { NgxMaskConfig } from './ngx-mask.config';\nimport { NGX_MASK_CONFIG } from './ngx-mask.config';\nimport { NgxMaskApplierService } from './ngx-mask-applier.service';\nimport { MaskExpression } from './ngx-mask-expression.enum';\n\n@Injectable()\nexport class NgxMaskService extends NgxMaskApplierService {\n    public isNumberValue = false;\n    public maskIsShown = '';\n    public selStart: number | null = null;\n    public selEnd: number | null = null;\n    public maskChanged = false;\n    public maskExpressionArray: string[] = [];\n    public previousValue = '';\n    public currentValue = '';\n    // `writingValue` is declared on NgxMaskApplierService: applyMask needs it to\n    // distinguish the writeValue flow from keystroke flows (#1611).\n    public isInitialized = false;\n    /**\n     * Set by the directive's keepCharacterPositions handling for the current edit:\n     * true — the directive fully resolved the resulting display value into actualValue,\n     * so applyMask must short-circuit and render actualValue as-is;\n     * false — the edit must flow through regular masking (no short-circuit);\n     * null — the directive was not involved in this applyMask call (legacy behavior).\n     * Consumed and reset by applyMask. This lets keepCharacterPositions work without\n     * showMaskTyped (#1545, #1543).\n     */\n    public keepCharacterPositionsHandled: boolean | null = null;\n\n    public _isFocused = signal<boolean>(false);\n\n    private _emitValue = false;\n    private _start!: number;\n    private _end!: number;\n\n    // eslint-disable-next-line @typescript-eslint/no-empty-function\n    public onChange = (_: unknown) => {};\n\n    public readonly _elementRef = inject(ElementRef, { optional: true });\n\n    private readonly document = inject(DOCUMENT);\n\n    protected override _config = inject<NgxMaskConfig>(NGX_MASK_CONFIG);\n\n    private readonly _renderer = inject(Renderer2, { optional: true });\n\n    /**\n     * Applies the mask to the input value.\n     * @param inputValue The input value to be masked.\n     * @param maskExpression The mask expression to apply.\n     * @param position The position in the input value.\n     * @param justPasted Whether the value was just pasted.\n     * @param backspaced Whether the value was backspaced.\n     * @param cb Callback function.\n     * @returns The masked value.\n     */\n    public override applyMask(\n        inputValue: string,\n        maskExpression: string,\n        position = 0,\n        justPasted = false,\n        backspaced = false,\n        // eslint-disable-next-line @typescript-eslint/no-empty-function\n        cb: (actualShift: number, backspaceShift: boolean) => void = () => {}\n    ): string {\n        // Consume the directive's keepCharacterPositions verdict for this edit (see the\n        // keepCharacterPositionsHandled doc). Reset immediately so it never leaks into\n        // applyMask calls that do not originate from the directive's input handling.\n        const kcpHandled = this.keepCharacterPositionsHandled;\n        this.keepCharacterPositionsHandled = null;\n\n        // If no mask expression, return the input value or the actual value\n        if (!maskExpression) {\n            // A RECONFIGURATION to an empty mask (mask was non-empty, now swapped to '') must\n            // revert the display/model to the raw unmasked value, not the stale masked\n            // `actualValue` from the mask that no longer applies (#1616: mask signal set to ''\n            // on a populated control left the masked display/FormControl unchanged forever,\n            // since this early return short-circuited before the `maskChanged`/emit logic\n            // below ever ran). Only strip when a mask genuinely changed — a directive with no\n            // mask ever configured must keep returning verbatim `actualValue`/`inputValue`.\n            if (this.maskChanged) {\n                const rawValue = this.removeMask(inputValue);\n                this.previousValue = this.currentValue;\n                this.currentValue = rawValue;\n                this.actualValue = rawValue;\n                this._emitValue = this.previousValue !== this.currentValue;\n                if (this._emitValue && this.triggerOnMaskChange) {\n                    this.formControlResult(rawValue);\n                }\n                if (!this.triggerOnMaskChange) {\n                    this.maskChanged = false;\n                }\n                return rawValue;\n            }\n            return inputValue !== this.actualValue ? this.actualValue : inputValue;\n        }\n\n        // #1492: a numeric FormControl value like 0.0000007 or 1e21 stringifies to\n        // exponential notation ('7e-7'); separator masking would strip the 'e'/'-' and\n        // render garbage ('77'). Expand scientific notation to plain decimal form before\n        // masking. Covers writeValue-driven flows and the pipe; a keystroke value can\n        // never match, since separator masking never lets a letter through.\n        if (\n            maskExpression.startsWith(MaskExpression.SEPARATOR) &&\n            inputValue &&\n            /\\d[eE][+-]?\\d/.test(inputValue)\n        ) {\n            const expandedNumber = Number(this._replaceDecimalMarkerToDot(inputValue));\n            if (!Number.isNaN(expandedNumber)) {\n                // eslint-disable-next-line no-param-reassign\n                inputValue = this._toPlainDecimalString(expandedNumber);\n                if (\n                    this.decimalMarker === MaskExpression.COMMA ||\n                    (Array.isArray(this.decimalMarker) &&\n                        this.thousandSeparator === MaskExpression.DOT)\n                ) {\n                    // eslint-disable-next-line no-param-reassign\n                    inputValue = inputValue.replace(MaskExpression.DOT, MaskExpression.COMMA);\n                }\n            }\n        }\n\n        // Show mask in input if required\n        this.maskIsShown = this.showMaskTyped\n            ? this.showMaskInInput()\n            : MaskExpression.EMPTY_STRING;\n\n        // Handle specific mask expressions\n        if (this.maskExpression === MaskExpression.IP && this.showMaskTyped) {\n            this.maskIsShown = this.showMaskInInput(inputValue || MaskExpression.HASH);\n        }\n        const isCpfCnpjMask =\n            this.maskExpression === MaskExpression.CPF_CNPJ ||\n            this.maskExpression === MaskExpression.CPF_CNPJ_ALPHA;\n        if (isCpfCnpjMask && this.showMaskTyped) {\n            this.maskIsShown = this.showMaskInInput(inputValue || MaskExpression.HASH);\n        }\n\n        // Handle empty input value with mask typed\n        if (!inputValue && this.showMaskTyped) {\n            // #1590: only a USER-driven clear may propagate back to the model. When this\n            // skeleton render originates from writeValue() (writingValue), emitting '' here\n            // would be a view->model write inside a model->view sync — with nested CVA\n            // wrappers the real initial value arrives in a LATER microtask than the initial\n            // null write, and this echo overwrote it before it ever reached the view.\n            if (!this.writingValue) {\n                this.formControlResult(this.prefix);\n            }\n            return `${this.prefix}${this.maskIsShown}${this.suffix}`;\n        }\n\n        const getSymbol: string =\n            !!inputValue && typeof this.selStart === 'number'\n                ? (inputValue[this.selStart] ?? MaskExpression.EMPTY_STRING)\n                : MaskExpression.EMPTY_STRING;\n        let newInputValue = '';\n        let newPosition = position;\n\n        // Handle hidden input or input with asterisk symbol\n        if (\n            (this.hiddenInput ||\n                (inputValue && inputValue.indexOf(MaskExpression.SYMBOL_STAR) >= 0)) &&\n            !this.writingValue\n        ) {\n            // Seed from the raw input only when the user typed the FIRST character (the\n            // single char is the raw symbol, actualValue is empty/stale). On backspace a\n            // length-1 value is the remaining masked display (e.g. '*'), so the hidden\n            // characters must come from actualValue or the deletion destroys both (#1612).\n            let actualResult: string[] =\n                inputValue && inputValue.length === 1 && !backspaced\n                    ? inputValue.split(MaskExpression.EMPTY_STRING)\n                    : this.actualValue.split(MaskExpression.EMPTY_STRING);\n\n            // Handle backspace\n            if (backspaced) {\n                actualResult = actualResult\n                    .slice(0, position)\n                    .concat(actualResult.slice(position + 1));\n            }\n\n            // Remove mask if showMaskTyped is true\n            if (this.showMaskTyped) {\n                // eslint-disable-next-line no-param-reassign\n                inputValue = this.removeMask(inputValue);\n                actualResult = this.removeMask(actualResult.join('')).split(\n                    MaskExpression.EMPTY_STRING\n                );\n            }\n\n            // Handle selection start and end\n            if (typeof this.selStart === 'object' && typeof this.selEnd === 'object') {\n                this.selStart = Number(this.selStart);\n                this.selEnd = Number(this.selEnd);\n            } else {\n                if (inputValue !== MaskExpression.EMPTY_STRING && actualResult.length) {\n                    if (typeof this.selStart === 'number' && typeof this.selEnd === 'number') {\n                        if (inputValue.length > actualResult.length) {\n                            actualResult.splice(this.selStart, 0, getSymbol);\n                        } else if (inputValue.length < actualResult.length) {\n                            if (actualResult.length - inputValue.length === 1) {\n                                if (backspaced) {\n                                    actualResult.splice(this.selStart - 1, 1);\n                                } else {\n                                    actualResult.splice(inputValue.length - 1, 1);\n                                }\n                            } else {\n                                actualResult.splice(this.selStart, this.selEnd - this.selStart);\n                            }\n                        }\n                    }\n                } else {\n                    actualResult = [];\n                }\n            }\n\n            // Handle actual value length\n            if (this.actualValue.length) {\n                if (actualResult.length < inputValue.length) {\n                    newInputValue = this.shiftTypedSymbols(\n                        actualResult.join(MaskExpression.EMPTY_STRING)\n                    );\n                } else if (actualResult.length === inputValue.length) {\n                    newInputValue = actualResult.join(MaskExpression.EMPTY_STRING);\n                } else {\n                    newInputValue = inputValue;\n                }\n            } else {\n                newInputValue = inputValue;\n            }\n        }\n\n        // Handle just pasted input\n        if (justPasted && (this.hiddenInput || !this.hiddenInput)) {\n            newInputValue = inputValue;\n        }\n\n        // Handle backspace with special characters\n        if (\n            backspaced &&\n            this.specialCharacters.indexOf(\n                this.maskExpression[newPosition] ?? MaskExpression.EMPTY_STRING\n            ) !== -1 &&\n            this.showMaskTyped &&\n            !this.prefix\n        ) {\n            newInputValue = this.currentValue;\n        }\n\n        // Handle deleted special character\n        if (this.deletedSpecialCharacter && newPosition) {\n            if (\n                this.specialCharacters.includes(\n                    this.actualValue.slice(newPosition, newPosition + 1)\n                )\n            ) {\n                newPosition = newPosition + 1;\n            } else if (\n                maskExpression.slice(newPosition - 1, newPosition + 1) !== MaskExpression.MONTHS\n            ) {\n                newPosition = newPosition - 2;\n            }\n\n            this.deletedSpecialCharacter = false;\n        }\n\n        // Remove mask if showMaskTyped is true and placeHolderCharacter length is 1\n        if (\n            this.showMaskTyped &&\n            this.placeHolderCharacter.length === 1 &&\n            !this.leadZeroDateTime\n        ) {\n            newInputValue = this.removeMask(newInputValue);\n        }\n\n        // Handle mask changed\n        if (this.maskChanged) {\n            newInputValue = inputValue;\n        } else {\n            newInputValue =\n                Boolean(newInputValue) && newInputValue.length ? newInputValue : inputValue;\n        }\n\n        // Handle keepCharacterPositions: when the directive resolved the display for this\n        // edit (kcpHandled === true), or legacily whenever showMaskTyped is on and the\n        // directive gave no explicit verdict, render actualValue as-is.\n        if (\n            (kcpHandled ?? this.showMaskTyped) &&\n            this.keepCharacterPositions &&\n            this.actualValue &&\n            !justPasted &&\n            !this.writingValue\n        ) {\n            const value = this.dropSpecialCharacters\n                ? this.removeMask(this.actualValue)\n                : this.actualValue;\n            this.formControlResult(value);\n            return this.actualValue\n                ? this.actualValue\n                : `${this.prefix}${this.maskIsShown}${this.suffix}`;\n        }\n\n        // Apply the mask using the parent class method\n        const result: string = super.applyMask(\n            newInputValue,\n            maskExpression,\n            newPosition,\n            justPasted,\n            backspaced,\n            cb\n        );\n\n        // #1615: a value the mask cannot process AT ALL (masking leaves nothing of it) is\n        // rendered verbatim instead of being destroyed, and must not reach formControlResult\n        // — the empty remnant would clobber the model that holds the sentinel (e.g.\n        // setValue('ONGOING') on a digits mask). Values that PARTIALLY match keep regular\n        // masking. Two cases reach this:\n        // 1. this.writingValue: the originating writeValue() call itself.\n        // 2. currentValue === inputValue (and the mask didn't just change): a LATER re-render\n        //    replaying the exact same already-verbatim value outside of writeValue (e.g.\n        //    ngOnChanges re-running applyMask via the directive's _applyMask() when an\n        //    UNRELATED input like `disabled` changes) — without this, that pass would fall\n        //    through to regular masking, emit the empty result via onChange, and clobber the\n        //    model even though the DOM would still show the sentinel correctly.\n        if (\n            (this.writingValue || (!this.maskChanged && inputValue === this.currentValue)) &&\n            inputValue &&\n            !result &&\n            this.removeMask(inputValue)\n        ) {\n            this.actualValue = inputValue;\n            this.previousValue = this.currentValue;\n            this.currentValue = inputValue;\n            return inputValue;\n        }\n\n        this.actualValue = this.getActualValue(result);\n\n        // handle some separator implications:\n        // a.) adjust decimalMarker default (. -> ,) if thousandSeparator is a dot\n        if (\n            this.thousandSeparator === MaskExpression.DOT &&\n            this.decimalMarker === MaskExpression.DOT\n        ) {\n            this.decimalMarker = MaskExpression.COMMA;\n        }\n        // b) remove decimal marker from list of special characters to mask\n        if (\n            this.maskExpression.startsWith(MaskExpression.SEPARATOR) &&\n            this.dropSpecialCharacters === true\n        ) {\n            this.specialCharacters = this.specialCharacters.filter(\n                (item: string) =>\n                    !this._compareOrIncludes(item, this.decimalMarker, this.thousandSeparator) //item !== this.decimalMarker, // !\n            );\n        }\n\n        // Update previous and current values\n        if (result || result === '') {\n            this.previousValue = this.currentValue;\n            this.currentValue = result;\n\n            this._emitValue =\n                this.previousValue !== this.currentValue ||\n                (this.previousValue === this.currentValue && justPasted);\n        }\n\n        // Propagate the input value back to the Angular model\n        // Only emit if:\n        // 1. _emitValue is true (value changed), AND\n        // 2. Either mask didn't change, OR triggerOnMaskChange is true\n        const shouldEmit = this._emitValue && (!this.maskChanged || this.triggerOnMaskChange);\n        if (shouldEmit) {\n            this.formControlResult(result);\n        }\n        // Reset maskChanged flag even if we didn't emit\n        if (this.maskChanged && !this.triggerOnMaskChange) {\n            this.maskChanged = false;\n        }\n\n        // Handle hidden input and showMaskTyped\n        if (!this.showMaskTyped || (this.showMaskTyped && this.hiddenInput)) {\n            if (this.hiddenInput) {\n                return `${this.hideInput(result, this.maskExpression)}${this.maskIsShown.slice(result.length)}`;\n            }\n            return result;\n        }\n\n        const resLen: number = result.length;\n        const prefNmask = `${this.prefix}${this.maskIsShown}${this.suffix}`;\n\n        // Handle specific mask expressions\n        // NOTE: IP/CPF_CNPJ/CPF_CNPJ_ALPHA are checked via exact equality BEFORE the HOURS\n        // substring check below, because MaskExpression.HOURS is the single character 'H' and\n        // 'CPF_CNPJ_ALPHA' contains 'H' (from \"ALPHA\"), which previously caused CPF_CNPJ_ALPHA\n        // to be misrouted into the HOURS branch instead of its own branch.\n        if (\n            this.maskExpression === MaskExpression.IP ||\n            this.maskExpression === MaskExpression.CPF_CNPJ ||\n            this.maskExpression === MaskExpression.CPF_CNPJ_ALPHA\n        ) {\n            return `${result}${prefNmask}`;\n        } else if (this.maskExpression.includes(MaskExpression.HOURS)) {\n            const countSkipedSymbol = this._numberSkipedSymbols(result);\n            return `${result}${prefNmask.slice(resLen + countSkipedSymbol)}`;\n        }\n\n        return `${result}${prefNmask.slice(resLen)}`;\n    }\n\n    // get the number of characters that were shifted\n    private _numberSkipedSymbols(value: string): number {\n        const regex = /(^|\\D)(\\d\\D)/g;\n        let match = regex.exec(value);\n        let countSkipedSymbol = 0;\n        while (match != null) {\n            countSkipedSymbol += 1;\n            match = regex.exec(value);\n        }\n        return countSkipedSymbol;\n    }\n\n    public applyValueChanges(\n        position: number,\n        justPasted: boolean,\n        backspaced: boolean,\n        // eslint-disable-next-line @typescript-eslint/no-empty-function\n        cb: (actualShift: number, backspaceShift: boolean) => void = () => {}\n    ): void {\n        const formElement = this._elementRef?.nativeElement;\n        if (!formElement) {\n            return;\n        }\n\n        formElement.value = this.applyMask(\n            formElement.value,\n            this.maskExpression,\n            position,\n            justPasted,\n            backspaced,\n            cb\n        );\n        if (formElement === this._getActiveElement()) {\n            return;\n        }\n        this.clearIfNotMatchFn();\n    }\n\n    public hideInput(inputValue: string, maskExpression: string): string {\n        return inputValue\n            .split(MaskExpression.EMPTY_STRING)\n            .map((curr: string, index: number) => {\n                const maskChar = maskExpression[index] ?? MaskExpression.EMPTY_STRING;\n                const pattern = this.patterns?.[maskChar];\n                if (pattern?.symbol) {\n                    return pattern.symbol;\n                }\n                // #1574: a '0' immediately following a concealed DAY/MONTH token\n                // is that field's second digit (d0/M0) — conceal it too so the\n                // whole 2-digit field is hidden, not just its first character.\n                // Display-only: does not touch maskExpression/processedValue, so\n                // date validation/leadZero clamping in generic-pattern.handler.ts\n                // is unaffected.\n                const prevMaskChar = maskExpression[index - 1];\n                const prevPattern = prevMaskChar ? this.patterns?.[prevMaskChar] : null;\n                if (\n                    maskChar === MaskExpression.NUMBER_ZERO &&\n                    (prevMaskChar === MaskExpression.DAY ||\n                        prevMaskChar === MaskExpression.MONTH) &&\n                    prevPattern?.symbol\n                ) {\n                    return prevPattern.symbol;\n                }\n                return curr;\n            })\n            .join(MaskExpression.EMPTY_STRING);\n    }\n\n    // this function is not necessary, it checks result against maskExpression\n    public getActualValue(res: string): string {\n        const compare: string[] = res\n            .split(MaskExpression.EMPTY_STRING)\n            .filter((symbol: string, i: number) => {\n                const maskChar = this.maskExpression[i] ?? MaskExpression.EMPTY_STRING;\n                return (\n                    this._checkSymbolMask(symbol, maskChar) ||\n                    (this.specialCharacters.includes(maskChar) && symbol === maskChar)\n                );\n            });\n        if (compare.join(MaskExpression.EMPTY_STRING) === res) {\n            return compare.join(MaskExpression.EMPTY_STRING);\n        }\n        return res;\n    }\n\n    public shiftTypedSymbols(inputValue: string): string {\n        let symbolToReplace = '';\n        const newInputValue: (string | undefined)[] =\n            (inputValue &&\n                inputValue\n                    .split(MaskExpression.EMPTY_STRING)\n                    .map((currSymbol: string, index: number) => {\n                        if (\n                            this.specialCharacters.includes(\n                                inputValue[index + 1] ?? MaskExpression.EMPTY_STRING\n                            ) &&\n                            inputValue[index + 1] !== this.maskExpression[index + 1]\n                        ) {\n                            symbolToReplace = currSymbol;\n                            return inputValue[index + 1];\n                        }\n                        if (symbolToReplace.length) {\n                            const replaceSymbol: string = symbolToReplace;\n                            symbolToReplace = MaskExpression.EMPTY_STRING;\n                            return replaceSymbol;\n                        }\n                        return currSymbol;\n                    })) ||\n            [];\n        return newInputValue.join(MaskExpression.EMPTY_STRING);\n    }\n\n    /**\n     * Convert number value to string\n     * 3.1415 -> '3.1415'\n     * 1e-7 -> '0.0000001'\n     */\n    public numberToString(value: number | string): string {\n        if (\n            (!value && value !== 0) ||\n            (this.maskExpression.startsWith(MaskExpression.SEPARATOR) &&\n                (this.leadZero || !this.dropSpecialCharacters)) ||\n            (this.maskExpression.startsWith(MaskExpression.SEPARATOR) &&\n                this.separatorLimit.length > 14 &&\n                String(value).length > 14)\n        ) {\n            return String(value);\n        }\n        // #1573: toLocaleString('fullwide', ...) is NOT locale-independent — 'fullwide' is\n        // not a real locale tag, so Intl silently falls back to the runtime DEFAULT locale\n        // (e.g. de-AT on Edge with Austrian regional format emits '0,5'). Expand exponential\n        // notation with pure string math instead; the decimal marker is always '.'.\n        return this._toPlainDecimalString(Number(value));\n    }\n\n    /**\n     * Locale-independent replacement for toLocaleString('fullwide', { useGrouping: false,\n     * maximumFractionDigits: 20 }) (#1573): expands exponential notation ('7e-7', '1e+21')\n     * to plain decimal form using '.' as decimal marker, regardless of the runtime locale.\n     */\n    private _toPlainDecimalString(value: number): string {\n        const stringValue = String(value);\n        const match = /^(-?)(\\d+)(?:\\.(\\d+))?[eE]([+-]?\\d+)$/.exec(stringValue);\n        if (!match) {\n            return stringValue;\n        }\n        const [, sign, integerPart, fractionPart = '', exponentPart] = match;\n        const exponent = Number(exponentPart);\n        const digits = `${integerPart}${fractionPart}`;\n        const pointIndex = (integerPart as string).length + exponent;\n        if (pointIndex <= 0) {\n            return `${sign}0.${'0'.repeat(-pointIndex)}${digits}`;\n        }\n        if (pointIndex >= digits.length) {\n            return `${sign}${digits}${'0'.repeat(pointIndex - digits.length)}`;\n        }\n        return `${sign}${digits.slice(0, pointIndex)}.${digits.slice(pointIndex)}`;\n    }\n\n    public showMaskInInput(inputVal?: string): string {\n        if (this.showMaskTyped && !!this.shownMaskExpression) {\n            if (this.maskExpression.length !== this.shownMaskExpression.length) {\n                throw new Error('Mask expression must match mask placeholder length');\n            } else {\n                return this.shownMaskExpression;\n            }\n        } else if (this.showMaskTyped) {\n            if (inputVal) {\n                if (this.maskExpression === MaskExpression.IP) {\n                    return this._checkForIp(inputVal);\n                }\n                if (\n                    this.maskExpression === MaskExpression.CPF_CNPJ ||\n                    this.maskExpression === MaskExpression.CPF_CNPJ_ALPHA\n                ) {\n                    return this._checkForCpfCnpj(inputVal);\n                }\n            }\n            if (this.placeHolderCharacter.length === this.maskExpression.length) {\n                return this.placeHolderCharacter;\n            }\n            return this.maskExpression.replace(/\\w/g, this.placeHolderCharacter);\n        }\n        return '';\n    }\n\n    public clearIfNotMatchFn(): void {\n        const formElement = this._elementRef?.nativeElement;\n        if (!formElement) {\n            return;\n        }\n        if (\n            this.clearIfNotMatch &&\n            this.prefix.length + this.maskExpression.length + this.suffix.length !==\n                formElement.value.replace(this.placeHolderCharacter, MaskExpression.EMPTY_STRING)\n                    .length\n        ) {\n            this.formElementProperty = ['value', MaskExpression.EMPTY_STRING];\n            this.applyMask('', this.maskExpression);\n        }\n    }\n\n    public set formElementProperty([name, value]: [string, string | boolean]) {\n        if (!this._renderer || !this._elementRef) {\n            return;\n        }\n        // Use queueMicrotask to defer DOM updates to next microtask.\n        // This prevents ExpressionChangedAfterItHasBeenCheckedError\n        // and ensures proper timing with Angular's change detection.\n        queueMicrotask(() => {\n            this._renderer?.setProperty(this._elementRef?.nativeElement, name, value);\n        });\n    }\n\n    public checkDropSpecialCharAmount(mask: string): number {\n        const chars: string[] = mask\n            .split(MaskExpression.EMPTY_STRING)\n            .filter((item: string) => this._findDropSpecialChar(item));\n        return chars.length;\n    }\n\n    public removeMask(inputValue: string): string {\n        return this._removeMask(\n            this._removeSuffix(this._removePrefix(inputValue)),\n            this.specialCharacters.concat('_').concat(this.placeHolderCharacter)\n        );\n    }\n\n    private _checkForIp(inputVal: string): string {\n        if (inputVal === MaskExpression.HASH) {\n            return `${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}`;\n        }\n        const arr: string[] = [];\n        // eslint-disable-next-line @typescript-eslint/prefer-for-of\n        for (let i = 0; i < inputVal.length; i++) {\n            const value = inputVal[i] ?? MaskExpression.EMPTY_STRING;\n            if (!value) {\n                continue;\n            }\n            if (value.match('\\\\d')) {\n                arr.push(value);\n            }\n        }\n        if (arr.length <= 3) {\n            return `${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}`;\n        }\n        if (arr.length > 3 && arr.length <= 6) {\n            return `${this.placeHolderCharacter}.${this.placeHolderCharacter}`;\n        }\n        if (arr.length > 6 && arr.length <= 9) {\n            return this.placeHolderCharacter;\n        }\n        if (arr.length > 9 && arr.length <= 12) {\n            return '';\n        }\n        return '';\n    }\n\n    private _checkForCpfCnpj(inputVal: string): string {\n        const cpf =\n            `${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n            `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n            `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n            `-${this.placeHolderCharacter}${this.placeHolderCharacter}`;\n        const cnpj =\n            `${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n            `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n            `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n            `/${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` +\n            `-${this.placeHolderCharacter}${this.placeHolderCharacter}`;\n\n        if (inputVal === MaskExpression.HASH) {\n            return cpf;\n        }\n\n        const isCpfCnpjAlpha = this.maskExpression === MaskExpression.CPF_CNPJ_ALPHA;\n        const hasAnyLetter = /[a-zA-Z]/.test(inputVal);\n        const arr = this._countCpfCnpjTypedChars(inputVal, isCpfCnpjAlpha);\n        if (isCpfCnpjAlpha && hasAnyLetter) {\n            // CNPJ_ALPHA shape is \"AA.AAA.AAA/AAAA-00\": separators fall after the 2nd, 5th,\n            // 8th and 12th typed character, so the placeholder slice offset must account for\n            // however many separators `result` has already passed through, mirroring the\n            // numeric CPF/CNPJ bucketed offsets below.\n            if (arr.length <= 2) {\n                return cnpj.slice(arr.length, cnpj.length);\n            }\n            if (arr.length > 2 && arr.length <= 5) {\n                return cnpj.slice(arr.length + 1, cnpj.length);\n            }\n            if (arr.length > 5 && arr.length <= 8) {\n                return cnpj.slice(arr.length + 2, cnpj.length);\n            }\n            if (arr.length > 8 && arr.length <= 12) {\n                return cnpj.slice(arr.length + 3, cnpj.length);\n            }\n            return cnpj.slice(arr.length + 4, cnpj.length);\n        } else {\n            if (arr.length <= 3) {\n                return cpf.slice(arr.length, cpf.length);\n            }\n            if (arr.length > 3 && arr.length <= 6) {\n                return cpf.slice(arr.length + 1, cpf.length);\n            }\n            if (arr.length > 6 && arr.length <= 9) {\n                return cpf.slice(arr.length + 2, cpf.length);\n            }\n            if (arr.length > 9 && arr.length < 11) {\n                return cpf.slice(arr.length + 3, cpf.length);\n            }\n        }\n        if (arr.length === 11) {\n            return '';\n        }\n        if (arr.length === 12) {\n            if (inputVal.length === 17) {\n                return cnpj.slice(16, cnpj.length);\n            }\n            return cnpj.slice(15, cnpj.length);\n        }\n        if (arr.length > 12 && arr.length <= 14) {\n            return cnpj.slice(arr.length + 4, cnpj.length);\n        }\n        return '';\n    }\n\n    /** Collects the characters counted as \"typed\" for CPF/CNPJ progress tracking: digits only\n     *  for the numeric mask, alphanumerics for CPF_CNPJ_ALPHA. */\n    private _countCpfCnpjTypedChars(inputVal: string, isCpfCnpjAlpha: boolean): string[] {\n        const arr: string[] = [];\n        // eslint-disable-next-line @typescript-eslint/prefer-for-of\n        for (let i = 0; i < inputVal.length; i++) {\n            const value = inputVal[i] ?? MaskExpression.EMPTY_STRING;\n            if (!value) {\n                continue;\n            }\n            if (isCpfCnpjAlpha ? value.match('[a-zA-Z0-9]') : value.match('\\\\d')) {\n                arr.push(value);\n            }\n        }\n        return arr;\n    }\n\n    /**\n     * Recursively determine the current active element by navigating the Shadow DOM until the Active Element is found.\n     */\n    private _getActiveElement(document: DocumentOrShadowRoot = this.document): Element | null {\n        const shadowRootEl = document?.activeElement?.shadowRoot;\n        if (!shadowRootEl?.activeElement) {\n            return document.activeElement;\n        } else {\n            return this._getActiveElement(shadowRootEl);\n        }\n    }\n\n    /**\n     * Propogates the input value back to the Angular model by triggering the onChange function. It won't do this if writingValue\n     * is true. If that is true it means we are currently in the writeValue function, which is supposed to only update the actual\n     * DOM element based on the Angular model value. It should be a one way process, i.e. writeValue should not be modifying the Angular\n     * model value too. Therefore, we don't trigger onChange in this scenario.\n     * @param inputValue the current form input value\n     */\n    public formControlResult(inputValue: string): void {\n        const outputTransformFn = this.outputTransformFn\n            ? this.outputTransformFn\n            : (v: unknown) => v;\n\n        this.writingValue = false;\n        this.maskChanged = false;\n\n        if (!this.isInitialized && this._emitValue) {\n            return;\n        }\n\n        // #1519: a non-special placeHolderCharacter (e.g. 'X') is never something the user\n        // typed — it's the showMaskTyped fill character for unfilled slots — so it must never\n        // reach the model, regardless of dropSpecialCharacters. The default '_' placeholder is\n        // already covered by specialCharacters/removeMask; a custom single-char placeholder\n        // that isn't a special character is not, since none of the branches below include it\n        // in their removal set.\n        if (\n            this.showMaskTyped &&\n            this.placeHolderCharacter.length === 1 &&\n            this.specialCharacters.indexOf(this.placeHolderCharacter) === -1\n        ) {\n            // eslint-disable-next-line no-param-reassign\n            inputValue = inputValue\n                .split(this.placeHolderCharacter)\n                .join(MaskExpression.EMPTY_STRING);\n        }\n\n        if (Array.isArray(this.dropSpecialCharacters)) {\n            this.onChange(\n                outputTransformFn(\n                    this._toNumber(\n                        this._checkSymbols(\n                            this._removeMask(\n                                this._removeSuffix(this._removePrefix(inputValue)),\n                                this.dropSpecialCharacters\n                            )\n                        )\n                    )\n                )\n            );\n        } else if (\n            this.dropSpecialCharacters ||\n            (!this.dropSpecialCharacters && this.prefix === inputValue)\n        ) {\n            this.onChange(\n                outputTransformFn(\n                    this._toNumber(\n                        this._checkSymbols(this._removeSuffix(this._removePrefix(inputValue)))\n                    )\n                )\n            );\n        } else {\n            this.onChange(outputTransformFn(this._toNumber(inputValue)));\n        }\n    }\n\n    private _toNumber(value: string | number | undefined | null) {\n        if (!this.isNumberValue || value === MaskExpression.EMPTY_STRING) {\n            return value;\n        }\n        if (\n            this.maskExpression.startsWith(MaskExpression.SEPARATOR) &&\n            (this.leadZero || !this.dropSpecialCharacters)\n        ) {\n            return value;\n        }\n\n        if (String(value).length > 14 && this.maskExpression.startsWith(MaskExpression.SEPARATOR)) {\n            return String(value);\n        }\n\n        const num = Number(value);\n        if (this.maskExpression.startsWith(MaskExpression.SEPARATOR) && Number.isNaN(num)) {\n            const val = String(value).replace(',', '.');\n            return Number(val);\n        }\n\n        return Number.isNaN(num) ? value : num;\n    }\n\n    private _removeMask(value: string, specialCharactersForRemove: string[]): string {\n        if (\n            this.maskExpression.startsWith(MaskExpression.PERCENT) &&\n            (value.includes(MaskExpression.DOT) ||\n                (Array.isArray(this.decimalMarker) &&\n                    value.includes(MaskExpression.COMMA) &&\n                    this._activeDecimalMarker(value) === MaskExpression.COMMA))\n        ) {\n            return value;\n        }\n\n        return value\n            ? value.replace(\n                  this._regExpForRemove(specialCharactersForRemove),\n                  MaskExpression.EMPTY_STRING\n              )\n            : value;\n    }\n\n    private _removePrefix(value: string): string {\n        if (!this.prefix) {\n            return value;\n        }\n        return value ? value.replace(this.prefix, MaskExpression.EMPTY_STRING) : value;\n    }\n\n    private _removeSuffix(value: string): string {\n        if (!this.suffix) {\n            return value;\n        }\n        return value ? value.replace(this.suffix, MaskExpression.EMPTY_STRING) : value;\n    }\n\n    private _retrieveSeparatorValue(result: string): string {\n        let specialCharacters = Array.isArray(this.dropSpecialCharacters)\n            ? this.specialCharacters.filter((v) => {\n                  return (this.dropSpecialCharacters as string[]).includes(v);\n              })\n            : this.specialCharacters;\n        if (\n            !this.deletedSpecialCharacter &&\n            this._checkPatternForSpace() &&\n            result.includes(MaskExpression.WHITE_SPACE) &&\n            this.maskExpression.includes(MaskExpression.SYMBOL_STAR)\n        ) {\n            specialCharacters = specialCharacters.filter(\n                (char) => char !== MaskExpression.WHITE_SPACE\n            );\n        }\n\n        return this._removeMask(result, specialCharacters as string[]);\n    }\n\n    private _regExpForRemove(specialCharactersForRemove: string[]): RegExp {\n        return new RegExp(\n            specialCharactersForRemove\n                .map((item: string) => {\n                    // Only escape characters that have special meaning in regex\n                    if (/[.*+?^${}()|[\\]\\\\/-]/.test(item)) {\n                        return `\\\\${item}`;\n                    }\n                    return item;\n                })\n                .join('|'),\n            'gi'\n        );\n    }\n\n    private _replaceDecimalMarkerToDot(value: string): string {\n        const markers = Array.isArray(this.decimalMarker)\n            ? this.decimalMarker\n            : [this.decimalMarker];\n\n        return value.replace(this._regExpForRemove(markers), MaskExpression.DOT);\n    }\n\n    public _checkSymbols(result: string): string | number | undefined | null {\n        let processedResult = result;\n\n        if (processedResult === MaskExpression.EMPTY_STRING) {\n            return processedResult;\n        }\n\n        if (\n            this.maskExpression.startsWith(MaskExpression.PERCENT) &&\n            this._activeDecimalMarker(processedResult) === MaskExpression.COMMA\n        ) {\n            processedResult = processedResult.replace(MaskExpression.COMMA, MaskExpression.DOT);\n        }\n        const separatorPrecision: number | null = this._retrieveSeparatorPrecision(\n            this.maskExpression\n        );\n\n        const separatorValue: string =\n            this.specialCharacters.length === 0\n                ? this._retrieveSeparatorValue(processedResult)\n                : this._replaceDecimalMarkerToDot(this._retrieveSeparatorValue(processedResult));\n\n        if (!this.isNumberValue) {\n            return separatorValue;\n        }\n        if (separatorPrecision) {\n            if (processedResult === this.decimalMarker) {\n                return null;\n            }\n            if (separatorValue.length > 14) {\n                return String(separatorValue);\n            }\n            return this._checkPrecision(this.maskExpression, separatorValue);\n        } else {\n            return separatorValue;\n        }\n    }\n\n    private _checkPatternForSpace(): boolean {\n        for (const key in this.patterns) {\n            // eslint-disable-next-line no-prototype-builtins\n            if (this.patterns[key] && this.patterns[key]?.hasOwnProperty('pattern')) {\n                const patternString = this.patterns[key]?.pattern.toString();\n                const pattern = this.patterns[key]?.pattern;\n                if (\n                    (patternString?.includes(MaskExpression.WHITE_SPACE) as boolean) &&\n                    pattern?.test(this.maskExpression)\n                ) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n    private _retrieveSeparatorPrecision(maskExpression: string): number | null {\n        const matcher: RegExpMatchArray | null = maskExpression.match(\n            new RegExp(`^separator\\\\.([^d]*)`)\n        );\n        return matcher ? Number(matcher[1]) : null;\n    }\n\n    public _checkPrecision(separatorExpression: string, separatorValue: string): number | string {\n        const separatorPrecision = this.getPrecision(separatorExpression);\n        let value = separatorValue;\n\n        if (\n            (separatorExpression.indexOf('2') > 0 && !this._isFocused()) ||\n            (this.leadZero &&\n                !this._isFocused() &&\n                Number(separatorPrecision) > 0 &&\n                Number.isFinite(separatorPrecision))\n        ) {\n            if (this.decimalMarker === MaskExpression.COMMA && this.leadZero) {\n                value = value.replace(',', '.');\n            }\n            const precision = this.leadZero ? Number(separatorPrecision) : 2;\n            // #1567: Number(value).toFixed() corrupts values with more significant digits\n            // than an IEEE-754 double can hold (e.g. '999999999999999.99' becomes\n            // '1000000000000000.00'). Round such values textually instead; safe-range\n            // values keep the original toFixed() semantics.\n            if (this._exceedsDoublePrecision(value)) {\n                return this._stringToFixed(value, precision);\n            }\n            return Number(value).toFixed(precision);\n        }\n        return this.numberToString(value);\n    }\n\n    /**\n     * True when the plain decimal string carries more significant digits than an IEEE-754\n     * double can represent exactly (15 is the guaranteed round-trip digit count), meaning a\n     * Number() round-trip would corrupt it (#1567).\n     */\n    private _exceedsDoublePrecision(value: string): boolean {\n        if (!/^-?\\d+(\\.\\d+)?$/.test(value)) {\n            return false;\n        }\n        const significantDigits = value.replace(/\\D/g, '').replace(/^0+/, '');\n        return significantDigits.length > 15;\n    }\n\n    /**\n     * Exact string-based equivalent of Number.prototype.toFixed (round half away from zero)\n     * for plain decimal strings beyond double precision (#1567).\n     */\n    private _stringToFixed(value: string, precision: number): string {\n        const isNegative = value.startsWith(MaskExpression.MINUS);\n        const absValue = isNegative ? value.slice(1) : value;\n        const [integerPart = '0', fractionPart = ''] = absValue.split(MaskExpression.DOT);\n        const paddedFraction = fractionPart.padEnd(precision + 1, '0');\n        const keptFraction = paddedFraction.slice(0, precision);\n        const shouldRoundUp = (paddedFraction.charCodeAt(precision) || 0) >= 53; // '5'\n        let scaled = BigInt(integerPart + keptFraction);\n        if (shouldRoundUp) {\n            scaled += 1n;\n        }\n        const digits = scaled.toString().padStart(precision + 1, '0');\n        const sign = isNegative && scaled > 0n ? MaskExpression.MINUS : '';\n        return precision > 0\n            ? `${sign}${digits.slice(0, -precision)}.${digits.slice(-precision)}`\n            : `${sign}${digits}`;\n    }\n\n    public _repeatPatternSymbols(maskExp: string): string {\n        return (\n            (maskExp.match(/{[0-9]+}/) &&\n                maskExp\n                    .split(MaskExpression.EMPTY_STRING)\n                    .reduce((accum: string, currVal: string, index: number): string => {\n                        this._start =\n                            currVal === MaskExpression.CURLY_BRACKETS_LEFT ? index : this._start;\n                        if (currVal !== MaskExpression.CURLY_BRACKETS_RIGHT) {\n                            return this._findSpecialChar(currVal) ? accum + currVal : accum;\n                        }\n                        this._end = index;\n                        const repeatNumber = Number(maskExp.slice(this._start + 1, this._end));\n                        const replaceWith: string = new Array(repeatNumber + 1).join(\n                            maskExp[this._start - 1]\n                        );\n                        if (\n                            maskExp.slice(0, this._start).length > 1 &&\n                            maskExp.includes(MaskExpression.LETTER_S)\n                        ) {\n                            const symbols = maskExp.slice(0, this._start - 1);\n                            return symbols.includes(MaskExpression.CURLY_BRACKETS_LEFT)\n                                ? accum + replaceWith\n                                : symbols + accum + replaceWith;\n                        } else {\n                            return accum + replaceWith;\n                        }\n                    }, '')) ||\n            maskExp\n        );\n    }\n\n    /**\n     * Decimal marker of the value being normalized in writeValue/pipe flows.\n     *\n     * #1573: this used to return the RUNTIME default locale's decimal marker\n     * ((1.1).toLocaleString().substring(1, 2)), which made mask behavior depend on the\n     * OS/browser regional format: under a comma-decimal locale (e.g. Edge + Austrian\n     * regional settings) a preformatted value like '10,000' (thousandSeparator ',')\n     * had its ',' replaced by the configured '.' decimalMarker, corrupting the value\n     * 1000x. JS number stringification (String(n)) always uses '.', and string values\n     * are expected to use the configured markers — the runtime locale is never the\n     * right source, so this is always '.'.\n     */\n    public currentLocaleDecimalMarker(): string {\n        return MaskExpression.DOT;\n    }\n}\n","import type { EnvironmentProviders, Provider } from '@angular/core';\nimport { inject, makeEnvironmentProviders } from '@angular/core';\n\nimport type { NgxMaskOptions } from './ngx-mask.config';\nimport { NGX_MASK_CONFIG, INITIAL_CONFIG, initialConfig, NEW_CONFIG } from './ngx-mask.config';\nimport { NgxMaskService } from './ngx-mask.service';\n\n/**\n * @internal\n */\nfunction _configFactory(): NgxMaskOptions {\n    const initConfig = inject<NgxMaskOptions>(INITIAL_CONFIG);\n    const configValue = inject<NgxMaskOptions | (() => NgxMaskOptions)>(NEW_CONFIG);\n\n    return configValue instanceof Function\n        ? { ...initConfig, ...configValue() }\n        : { ...initConfig, ...configValue };\n}\n\nexport function provideNgxMask(configValue?: NgxMaskOptions | (() => NgxMaskOptions)): Provider[] {\n    return [\n        {\n            provide: NEW_CONFIG,\n            useValue: configValue,\n        },\n        {\n            provide: INITIAL_CONFIG,\n            useValue: initialConfig,\n        },\n        {\n            provide: NGX_MASK_CONFIG,\n            useFactory: _configFactory,\n        },\n        NgxMaskService,\n    ];\n}\n\nexport function provideEnvironmentNgxMask(\n    configValue?: NgxMaskOptions | (() => NgxMaskOptions)\n): EnvironmentProviders {\n    return makeEnvironmentProviders(provideNgxMask(configValue));\n}\n","import { DOCUMENT } from '@angular/common';\nimport type { OnChanges, SimpleChanges } from '@angular/core';\nimport {\n    Injector,\n    signal,\n    input,\n    output,\n    model,\n    effect,\n    Directive,\n    HostListener,\n    inject,\n    untracked,\n    booleanAttribute,\n    ChangeDetectorRef,\n    ElementRef,\n    Renderer2,\n} from '@angular/core';\nimport type {\n    ControlValueAccessor,\n    FormControl,\n    ValidationErrors,\n    Validator,\n} from '@angular/forms';\nimport { NgControl } from '@angular/forms';\nimport { NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport type { NgxMaskConfig } from './ngx-mask.config';\nimport { NGX_MASK_CONFIG, resolveMaskAlias, timeMasks, withoutValidation } from './ngx-mask.config';\nimport { NgxMaskService } from './ngx-mask.service';\nimport { MaskExpression } from './ngx-mask-expression.enum';\n\n// #1488: a date/time field located within `maskExpression` for the generalized\n// caret-shift-past-separator fix (see `_findDateTimeFieldAt`/`_isFieldOverflowing`).\ntype DateTimeField = {\n    token: 'd' | 'M' | 'H' | 'h' | 'm' | 's';\n    start: number; // index of the field's first char in maskExpression\n    end: number; // index one past the field's digit run (start of separator/next field)\n};\n\n@Directive({\n    selector: 'input[mask], textarea[mask]',\n    standalone: true,\n    providers: [\n        {\n            provide: NG_VALUE_ACCESSOR,\n            useExisting: NgxMaskDirective,\n            multi: true,\n        },\n        {\n            provide: NG_VALIDATORS,\n            useExisting: NgxMaskDirective,\n            multi: true,\n        },\n        NgxMaskService,\n    ],\n    exportAs: 'mask,ngxMask',\n})\nexport class NgxMaskDirective\n    implements\n        ControlValueAccessor,\n        OnChanges,\n        Validator,\n        FormValueControl<string | number | null | undefined>\n{\n    // ===== Mask Configuration Inputs =====\n    public mask = input<string | undefined | null>('');\n    public specialCharacters = input<NgxMaskConfig['specialCharacters']>([]);\n    public patterns = input<NgxMaskConfig['patterns']>({});\n    public prefix = input<NgxMaskConfig['prefix']>('');\n    public suffix = input<NgxMaskConfig['suffix']>('');\n    public thousandSeparator = input<NgxMaskConfig['thousandSeparator']>(' ');\n    public decimalMarker = input<NgxMaskConfig['decimalMarker']>('.');\n    public dropSpecialCharacters = input<NgxMaskConfig['dropSpecialCharacters'] | null>(null);\n    public hiddenInput = input<NgxMaskConfig['hiddenInput'] | null>(null);\n    public showMaskTyped = input<NgxMaskConfig['showMaskTyped'] | null>(null);\n    public placeHolderCharacter = input<NgxMaskConfig['placeHolderCharacter'] | null>(null);\n    public shownMaskExpression = input<NgxMaskConfig['shownMaskExpression'] | null>(null);\n    public clearIfNotMatch = input<NgxMaskConfig['clearIfNotMatch'] | null>(null);\n    public validation = input<NgxMaskConfig['validation'] | null>(null);\n    public separatorLimit = input<NgxMaskConfig['separatorLimit'] | null>('');\n    public typeFromDecimals = input<NgxMaskConfig['typeFromDecimals'] | null>(null);\n    public allowNegativeNumbers = input<NgxMaskConfig['allowNegativeNumbers'] | null>(null);\n    public leadZeroDateTime = input<NgxMaskConfig['leadZeroDateTime'] | null>(null);\n    public leadZero = input<NgxMaskConfig['leadZero'] | null>(null);\n    public triggerOnMaskChange = input<NgxMaskConfig['triggerOnMaskChange'] | null>(null);\n    public apm = input<NgxMaskConfig['apm'] | null>(null);\n    public inputTransformFn = input<NgxMaskConfig['inputTransformFn'] | null>(null);\n    public outputTransformFn = input<NgxMaskConfig['outputTransformFn'] | null>(null);\n    public keepCharacterPositions = input<NgxMaskConfig['keepCharacterPositions'] | null>(null);\n    public instantPrefix = input<NgxMaskConfig['instantPrefix'] | null>(null);\n    // Read directly at blur time (signal is always current) and falls back to the DI\n    // config, so no ngOnChanges mirroring into the service is needed (#1435).\n    public defaultValueOnBlur = input<NgxMaskConfig['defaultValueOnBlur']>(null);\n\n    /**\n     * Signal Forms `FormValueControl` surface. At runtime `FormField` never drives this model\n     * when the directive is bound (it prefers the `NG_VALUE_ACCESSOR` provided above, see\n     * `_isCvaMode`), but the template type-checker treats any directive owning a `value` model\n     * as the field's custom control and checks the bound field's value type against it (#1640).\n     * The model therefore accepts exactly what `writeValue()` accepts — `string | number | null |\n     * undefined` — so numeric and nullable fields (`signal({ amount: 0 })`,\n     * `signal<number | null>(null)`, `signal<string | null>(null)`) compile under\n     * `strictTemplates`. Values pushed back into the model are always the unmasked string (see\n     * `_propagateToValueModel`), i.e. `value()` / `valueChange` are declared wider than what is\n     * emitted.\n     */\n    public value = model<string | number | null | undefined>('');\n    public disabled = input(false, { transform: booleanAttribute });\n    public touched = model<boolean>(false);\n\n    public maskFilled = output<void>();\n\n    private _maskValue = signal<string>('');\n    private _inputValue = signal<string>('');\n    private _position = signal<number | null>(null);\n    private _code = signal<string>('');\n    private _maskExpressionArray = signal<string[]>([]);\n    private _justPasted = signal<boolean>(false);\n    private _isFocused = signal<boolean>(false);\n    /** For IME composition event */\n    private _isComposing = signal<boolean>(false);\n    /**\n     * True once Angular has driven this directive through the `ControlValueAccessor` contract\n     * (`registerOnChange`). NOTE: Signal Forms' `FormField` ALSO takes this path — it prefers a\n     * host-provided `NG_VALUE_ACCESSOR` over the custom-control `value` model binding (see\n     * `FormField.ɵngControlCreate`), so it calls `registerOnChange`/`writeValue` too and this\n     * flag is `true` in both modes. That is fine: with the flag set, the `value`-model effect\n     * below is a no-op and all rendering goes through `writeValue()`. The `value` model is only\n     * driven directly (flag stays `false`) when the directive is used standalone with a\n     * `[(value)]` binding and no forms integration.\n     */\n    private _isCvaMode = signal<boolean>(false);\n    /** Guards against the value effect echoing back a value we just propagated ourselves. */\n    private _skipNextValueEffect = signal<boolean>(false);\n    /**\n     * The exact stringified value last pushed through `onChange` (view → model). Signal Forms'\n     * `FormField` echoes every model update back through `writeValue()` — including updates that\n     * originated from the view. Re-masking that unmasked echo is at best a redundant re-render\n     * and at worst destructive for masks whose unmasked form is ambiguous (e.g. IP:\n     * '192168178' cannot reconstruct the typed dots of '192.168.1.78'). `writeValue()` consumes\n     * this marker to skip exactly that echo. `null` = no pending propagation.\n     */\n    private _lastPropagatedValue: string | null = null;\n    /**\n     * True once the first `ngOnChanges` pass has applied the mask configuration to the service.\n     * Signal Forms' `FormField` syncs its field value through the template `ɵɵcontrol` update\n     * instruction, which runs BEFORE the sibling directives' first `ngOnChanges` on the same\n     * element — so the very first `writeValue()` would otherwise see an unconfigured service\n     * (empty `maskExpression`, default `leadZero`/`thousandSeparator`/...) and render the raw\n     * value. Until this flag is set, `writeValue()` stashes the incoming value and `ngOnChanges`\n     * replays it once the configuration is in place.\n     */\n    private _configApplied = false;\n    private _pendingInitialValue: unknown;\n    private _hasPendingInitialValue = false;\n    /**\n     * True once the `disabled` input has ever delivered `true`. The disabled effect's very\n     * first run fires with the input's default `false` even when nothing binds `[disabled]`.\n     * Because effects run after Angular Forms' `setUpControl` (which calls\n     * `setDisabledState(true)` for initially-disabled controls) and both DOM writes are\n     * queueMicrotask-deferred in FIFO order, forwarding that default `false` would land last\n     * and re-enable an initially-disabled control (#1607, #1614). An initial `false` write is\n     * never needed — inputs are enabled by default — so `false` is only forwarded after the\n     * input has explicitly driven the state to `true` at least once.\n     */\n    private _disabledEverSet = false;\n    /** Ensures the multi-character placeHolderCharacter warning (#1347) is emitted only once. */\n    private _warnedAboutMultiCharPlaceholder = false;\n\n    public _maskService = inject(NgxMaskService, { self: true });\n    private readonly document = inject(DOCUMENT);\n    protected _config = inject<NgxMaskConfig>(NGX_MASK_CONFIG);\n    /**\n     * Under zoneless change detection, writing to the underlying FormControl programmatically\n     * (e.g. `setValue`/`patchValue` from outside a signal/effect context, or from a callback\n     * zone.js used to auto-flush like `requestAnimationFrame`/`queueMicrotask`) does not itself\n     * trigger a CD run. Bindings that read `form.pristine`/`form.dirty`/`form.value` on the host\n     * template need an explicit `markForCheck()` once the directive finishes reacting to a\n     * programmatic value write, otherwise the view stays stale until something else schedules CD.\n     */\n    private readonly _changeDetectorRef = inject(ChangeDetectorRef);\n    private readonly _elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef);\n    private readonly _renderer = inject(Renderer2);\n\n    // Injector is used to lazily resolve NgControl. NgControl cannot be injected directly:\n    // this directive is registered as the control's NG_VALUE_ACCESSOR, so a direct\n    // inject(NgControl) would form a circular dependency. Resolving it lazily on first use\n    // (after the control graph is wired) sidesteps the cycle.\n    private readonly _injector = inject(Injector);\n\n    private _ngControl: NgControl | null | undefined;\n\n    private _resolveNgControl(): NgControl | null {\n        if (typeof this._ngControl === 'undefined') {\n            this._ngControl = this._injector.get(NgControl, null);\n        }\n        return this._ngControl;\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-empty-function\n    public onChange = (_: unknown) => {};\n\n    // eslint-disable-next-line @typescript-eslint/no-empty-function\n    public onTouch = () => {};\n\n    public constructor() {\n        // Default onChange used in Signal Forms mode, where Angular never calls registerOnChange.\n        // It pushes the unmasked value into the `value` model so the `valueChange` output fires.\n        // registerOnChange() overrides this to additionally invoke Angular's CVA callback.\n        this._maskService.onChange = this.onChange = (value: unknown) => {\n            this._propagateToValueModel(value);\n        };\n\n        // Signal Forms drives the `value` model input directly (custom-control mode).\n        // In classic CVA mode `writeValue` handles rendering instead, so this effect is a no-op\n        // there. We skip the pass immediately following our own onChange propagation to avoid\n        // clobbering the raw `_inputValue` with the masked value echoed back from the model.\n        effect(() => {\n            const signalValue = this.value();\n            untracked(() => {\n                if (this._isCvaMode()) {\n                    return;\n                }\n                if (this._skipNextValueEffect()) {\n                    this._skipNextValueEffect.set(false);\n                    return;\n                }\n                if (String(signalValue) !== String(this._inputValue())) {\n                    this.writeValue(signalValue);\n                }\n            });\n        });\n\n        effect(() => {\n            const isDisabled = this.disabled();\n            untracked(() => {\n                // Never force-enable on the default `false`: it would clobber Angular Forms'\n                // own setDisabledState(true) for initially-disabled controls (see\n                // _disabledEverSet). `false` is forwarded only after an explicit `true`.\n                if (!isDisabled && !this._disabledEverSet) {\n                    return;\n                }\n                this._disabledEverSet = true;\n                this.setDisabledState(isDisabled);\n            });\n        });\n    }\n\n    public ngOnChanges(changes: SimpleChanges): void {\n        const {\n            mask,\n            specialCharacters,\n            patterns,\n            prefix,\n            suffix,\n            thousandSeparator,\n            decimalMarker,\n            dropSpecialCharacters,\n            hiddenInput,\n            showMaskTyped,\n            placeHolderCharacter,\n            shownMaskExpression,\n            clearIfNotMatch,\n            validation,\n            separatorLimit,\n            typeFromDecimals,\n            allowNegativeNumbers,\n            leadZeroDateTime,\n            leadZero,\n            triggerOnMaskChange,\n            apm,\n            inputTransformFn,\n            outputTransformFn,\n            keepCharacterPositions,\n            instantPrefix,\n        } = changes;\n        if (mask) {\n            if (mask.currentValue !== mask.previousValue && !mask.firstChange) {\n                this._maskService.maskChanged = true;\n            }\n            // User-defined aliases (config maskAliases) expand BEFORE any other processing,\n            // including the `||` multi-mask split — an alias may expand to a multi-mask.\n            const resolvedMask = this._resolvedMaskInput();\n            const maskParts = resolvedMask.split(MaskExpression.OR);\n            if (maskParts.length > 1) {\n                this._maskExpressionArray.set(\n                    maskParts.sort((a: string, b: string) => a.length - b.length)\n                );\n                this._setMask();\n            } else {\n                this._maskExpressionArray.set([]);\n                this._maskValue.set(resolvedMask);\n                this._maskService.maskExpression = this._maskValue();\n            }\n        }\n        if (specialCharacters) {\n            if (Array.isArray(specialCharacters.currentValue)) {\n                this._maskService.specialCharacters = specialCharacters.currentValue;\n            }\n            // A non-array value (e.g. null from an unset dynamic config) keeps the current\n            // service value (config defaults) and must not abort the whole ngOnChanges pass,\n            // otherwise sibling inputs changed in the same cycle would be silently ignored (#1512).\n        }\n        if (allowNegativeNumbers) {\n            this._maskService.allowNegativeNumbers = allowNegativeNumbers.currentValue;\n            if (this._maskService.allowNegativeNumbers) {\n                this._maskService.specialCharacters = this._maskService.specialCharacters.filter(\n                    (c: string) => c !== MaskExpression.MINUS\n                );\n            }\n        }\n        // Only overwrite the mask available patterns if a pattern has actually been passed in\n        if (patterns && patterns.currentValue) {\n            this._maskService.patterns = patterns.currentValue;\n        }\n        if (apm && apm.currentValue) {\n            this._maskService.apm = apm.currentValue;\n        }\n\n        if (instantPrefix) {\n            this._maskService.instantPrefix = instantPrefix.currentValue;\n        }\n        if (prefix) {\n            this._maskService.prefix = prefix.currentValue;\n        }\n        if (suffix) {\n            this._maskService.suffix = suffix.currentValue;\n        }\n        if (thousandSeparator) {\n            this._maskService.thousandSeparator = thousandSeparator.currentValue;\n            if (thousandSeparator.previousValue && thousandSeparator.currentValue) {\n                const previousDecimalMarker = this._maskService.decimalMarker;\n\n                if (thousandSeparator.currentValue === this._maskService.decimalMarker) {\n                    this._maskService.decimalMarker =\n                        thousandSeparator.currentValue === MaskExpression.COMMA\n                            ? MaskExpression.DOT\n                            : MaskExpression.COMMA;\n                }\n                if (this._maskService.dropSpecialCharacters === true) {\n                    this._maskService.specialCharacters = this._config.specialCharacters;\n                }\n                if (\n                    typeof previousDecimalMarker === 'string' &&\n                    typeof this._maskService.decimalMarker === 'string'\n                ) {\n                    this._inputValue.set(\n                        this._inputValue()\n                            .split(thousandSeparator.previousValue)\n                            .join('')\n                            .replace(previousDecimalMarker, this._maskService.decimalMarker)\n                    );\n                    this._maskService.actualValue = this._inputValue();\n                }\n                this._maskService.writingValue = true;\n            }\n        }\n        if (decimalMarker) {\n            this._maskService.decimalMarker = decimalMarker.currentValue;\n        }\n        if (dropSpecialCharacters) {\n            this._maskService.dropSpecialCharacters = dropSpecialCharacters.currentValue;\n        }\n        if (hiddenInput) {\n            this._maskService.hiddenInput = hiddenInput.currentValue;\n            if (hiddenInput.previousValue === true && hiddenInput.currentValue === false) {\n                this._inputValue.set(this._maskService.actualValue);\n            }\n        }\n        if (showMaskTyped) {\n            this._maskService.showMaskTyped = showMaskTyped.currentValue;\n            if (\n                showMaskTyped.previousValue === false &&\n                showMaskTyped.currentValue === true &&\n                this._isFocused()\n            ) {\n                requestAnimationFrame(() => {\n                    this._maskService._elementRef?.nativeElement.click();\n                });\n            }\n        }\n        if (placeHolderCharacter) {\n            // `null`/`undefined` means \"no custom placeholder\" (#1643): fall back to the default\n            // instead of storing null, which broke every `.length` read on the service.\n            this._maskService.placeHolderCharacter =\n                placeHolderCharacter.currentValue ?? this._config.placeHolderCharacter;\n            if (\n                typeof placeHolderCharacter.currentValue === 'string' &&\n                placeHolderCharacter.currentValue.length > 1 &&\n                !this._warnedAboutMultiCharPlaceholder\n            ) {\n                this._warnedAboutMultiCharPlaceholder = true;\n                // eslint-disable-next-line no-console\n                console.warn(\n                    'Ngx-mask: placeHolderCharacter should be a single character; behavior with multi-character values is undefined (e.g. keepCharacterPositions will not work). Current value:',\n                    placeHolderCharacter.currentValue\n                );\n            }\n        }\n        if (shownMaskExpression) {\n            this._maskService.shownMaskExpression = shownMaskExpression.currentValue;\n        }\n        if (clearIfNotMatch) {\n            this._maskService.clearIfNotMatch = clearIfNotMatch.currentValue;\n        }\n        if (validation) {\n            this._maskService.validation = validation.currentValue;\n        }\n        if (separatorLimit) {\n            this._maskService.separatorLimit = separatorLimit.currentValue;\n        }\n        if (typeFromDecimals) {\n            this._maskService.typeFromDecimals = typeFromDecimals.currentValue;\n        }\n        if (leadZeroDateTime) {\n            this._maskService.leadZeroDateTime = leadZeroDateTime.currentValue;\n        }\n        if (leadZero) {\n            this._maskService.leadZero = leadZero.currentValue;\n        }\n        if (triggerOnMaskChange) {\n            this._maskService.triggerOnMaskChange = triggerOnMaskChange.currentValue;\n        }\n        if (inputTransformFn) {\n            this._maskService.inputTransformFn = inputTransformFn.currentValue;\n        }\n        if (outputTransformFn) {\n            this._maskService.outputTransformFn = outputTransformFn.currentValue;\n        }\n        if (keepCharacterPositions) {\n            this._maskService.keepCharacterPositions = keepCharacterPositions.currentValue;\n        }\n        this._applyMask();\n        if (!this._configApplied) {\n            this._configApplied = true;\n            if (this._hasPendingInitialValue) {\n                // Replay the writeValue() call that arrived before this first ngOnChanges pass\n                // (see _configApplied) now that the mask configuration is applied.\n                this._hasPendingInitialValue = false;\n                const pendingValue = this._pendingInitialValue;\n                this._pendingInitialValue = null;\n                this.writeValue(pendingValue);\n            }\n        }\n    }\n\n    public validate({ value }: FormControl): ValidationErrors | null {\n        const processedValue: string = typeof value === 'number' ? String(value) : value;\n        const maskValue = this._maskValue();\n\n        if (!this._maskService.validation || !maskValue) {\n            return null;\n        }\n        if (this._maskService.ipError) {\n            return this._createValidationError(processedValue);\n        }\n        if (this._maskService.cpfCnpjError) {\n            return this._createValidationError(processedValue);\n        }\n        if (maskValue.startsWith(MaskExpression.SEPARATOR)) {\n            return null;\n        }\n        if (withoutValidation.includes(maskValue)) {\n            return null;\n        }\n        if (this._maskService.clearIfNotMatch) {\n            return null;\n        }\n        if (timeMasks.includes(maskValue)) {\n            return this._validateTime(processedValue);\n        }\n        if (maskValue === MaskExpression.EMAIL_MASK) {\n            const emailPattern = /^[^@]+@[^@]+\\.[^@]+$/;\n\n            if (!emailPattern.test(processedValue) && processedValue) {\n                return this._createValidationError(processedValue);\n            } else {\n                return null;\n            }\n        }\n        if (processedValue && processedValue.length >= 1) {\n            let counterOfOpt = 0;\n\n            if (\n                maskValue.includes(MaskExpression.CURLY_BRACKETS_LEFT) &&\n                maskValue.includes(MaskExpression.CURLY_BRACKETS_RIGHT)\n            ) {\n                const lengthInsideCurlyBrackets = maskValue.slice(\n                    maskValue.indexOf(MaskExpression.CURLY_BRACKETS_LEFT) + 1,\n                    maskValue.indexOf(MaskExpression.CURLY_BRACKETS_RIGHT)\n                );\n\n                return lengthInsideCurlyBrackets === String(processedValue.length)\n                    ? null\n                    : this._createValidationError(processedValue);\n            }\n            if (maskValue.startsWith(MaskExpression.PERCENT)) {\n                return null;\n            }\n            for (const key in this._maskService.patterns) {\n                if (this._maskService.patterns[key]?.optional) {\n                    if (maskValue.indexOf(key) !== maskValue.lastIndexOf(key)) {\n                        const opt: string = maskValue\n                            .split(MaskExpression.EMPTY_STRING)\n                            .filter((i: string) => i === key)\n                            .join(MaskExpression.EMPTY_STRING);\n                        counterOfOpt += opt.length;\n                    } else if (maskValue.indexOf(key) !== -1) {\n                        counterOfOpt++;\n                    }\n                    const firstOptionalIndex = maskValue.indexOf(key);\n                    if (firstOptionalIndex !== -1 && processedValue.length >= firstOptionalIndex) {\n                        // #1515: the early \"everything before the first optional token is\n                        // filled\" return is only sound for trailing-optional layouts. When a\n                        // mandatory token follows the first optional one (e.g. `999SSS`,\n                        // indexOf === 0) it used to mark EVERY value as valid.\n                        const hasMandatoryAfterOptional = maskValue\n                            .slice(firstOptionalIndex)\n                            .split(MaskExpression.EMPTY_STRING)\n                            .some(\n                                (symbol: string) =>\n                                    !!this._maskService.patterns[symbol] &&\n                                    !this._maskService.patterns[symbol]?.optional\n                            );\n                        if (!hasMandatoryAfterOptional) {\n                            return null;\n                        }\n                        if (!this.prefix() && !this.suffix() && this._isPlainTokenMask(maskValue)) {\n                            // Position-aware check: match the value against the mask allowing\n                            // optional tokens to be skipped; every mandatory token must be\n                            // consumed (catches `12a` for `999SSS`, which a pure length\n                            // check cannot).\n                            return this._matchesMaskWithOptionalSkip(processedValue, maskValue)\n                                ? null\n                                : this._createValidationError(processedValue);\n                        }\n                        // Non-plain masks (prefix/suffix, exotic symbols) fall through to the\n                        // legacy length check below (`maskValue.length - counterOfOpt`).\n                    }\n                    if (counterOfOpt === maskValue.length) {\n                        return null;\n                    }\n                }\n            }\n            if (\n                (maskValue.indexOf(MaskExpression.SYMBOL_STAR) > 1 &&\n                    processedValue.length < maskValue.indexOf(MaskExpression.SYMBOL_STAR)) ||\n                (maskValue.indexOf(MaskExpression.SYMBOL_QUESTION) > 1 &&\n                    processedValue.length < maskValue.indexOf(MaskExpression.SYMBOL_QUESTION))\n            ) {\n                return this._createValidationError(processedValue);\n            }\n            if (\n                maskValue.indexOf(MaskExpression.SYMBOL_STAR) === -1 ||\n                maskValue.indexOf(MaskExpression.SYMBOL_QUESTION) === -1\n            ) {\n                const array = maskValue.split('*');\n                const length: number = this._maskService.dropSpecialCharacters\n                    ? maskValue.length -\n                      this._maskService.checkDropSpecialCharAmount(maskValue) -\n                      counterOfOpt\n                    : this.prefix()\n                      ? maskValue.length + this.prefix().length - counterOfOpt\n                      : maskValue.length - counterOfOpt;\n\n                if (array.length === 1) {\n                    if (processedValue.length < length) {\n                        // #1583: for `||` multi-masks, a value shorter than the selected\n                        // alternative can still be complete: it must stop exactly at a\n                        // special-character boundary of the selected alternative and satisfy\n                        // the length requirement of another (shorter) alternative.\n                        if (this._isCompleteAlternativeBoundary(processedValue)) {\n                            return null;\n                        }\n                        return this._createValidationError(processedValue);\n                    }\n                }\n                if (array.length > 1) {\n                    const lastIndexArray = array[array.length - 1];\n                    if (\n                        lastIndexArray &&\n                        this._maskService.specialCharacters.includes(lastIndexArray[0] as string) &&\n                        String(processedValue).includes(lastIndexArray[0] ?? '') &&\n                        !this.dropSpecialCharacters()\n                    ) {\n                        const special = value.split(lastIndexArray[0]);\n                        return special[special.length - 1].length === lastIndexArray.length - 1\n                            ? null\n                            : this._createValidationError(processedValue);\n                    } else if (\n                        ((lastIndexArray &&\n                            !this._maskService.specialCharacters.includes(\n                                lastIndexArray[0] as string\n                            )) ||\n                            !lastIndexArray ||\n                            this._maskService.dropSpecialCharacters) &&\n                        processedValue.length >= length - 1\n                    ) {\n                        return null;\n                    } else {\n                        return this._createValidationError(processedValue);\n                    }\n                }\n            }\n            if (\n                maskValue.indexOf(MaskExpression.SYMBOL_STAR) === 1 ||\n                maskValue.indexOf(MaskExpression.SYMBOL_QUESTION) === 1\n            ) {\n                return null;\n            }\n        }\n        if (value) {\n            this.maskFilled.emit();\n            return null;\n        }\n        return null;\n    }\n\n    @HostListener('paste')\n    public onPaste() {\n        this._justPasted.set(true);\n    }\n\n    @HostListener('focus')\n    public onFocus(): void {\n        this._isFocused.set(true);\n        this._maskService._isFocused.set(true);\n    }\n\n    @HostListener('ngModelChange', ['$event'])\n    public onModelChange(value: unknown): void {\n        // on form reset we need to update the actualValue\n        if (\n            (value === MaskExpression.EMPTY_STRING ||\n                value === null ||\n                typeof value === 'undefined') &&\n            this._maskService.actualValue\n        ) {\n            this._maskService.actualValue = this._maskService.getActualValue(\n                MaskExpression.EMPTY_STRING\n            );\n        }\n    }\n\n    @HostListener('input', ['$event'])\n    public onInput(e: Event): void {\n        this._maskService.isInitialized = true;\n        // Android IMEs report every keydown as key 'Unidentified' / keyCode 229, so a\n        // backspace is undetectable from keydown alone and all _code()-based deletion\n        // branches misfire (cursor jumps, \"stuck\" backspace — #1497). The input event's\n        // inputType is the reliable source: derive the deletion code from it.\n        const inputType: string | undefined = (e as InputEvent).inputType;\n        if (inputType === 'deleteContentBackward') {\n            this._code.set(MaskExpression.BACKSPACE);\n        } else if (inputType === 'deleteContentForward') {\n            this._code.set(MaskExpression.DELETE);\n        } else if (\n            inputType &&\n            (this._code() === MaskExpression.BACKSPACE || this._code() === MaskExpression.DELETE)\n        ) {\n            // A non-delete edit that produced no meaningful keydown (IME insertion,\n            // context-menu paste): clear the stale deletion code so the edit is not\n            // processed as a backspace.\n            this._code.set(inputType);\n        }\n        // If IME is composing text, we wait for the composed text — but only when the mask\n        // can actually accept letters. Purely numeric masks gain nothing from composition,\n        // and some Android IMEs (Samsung Keyboard) deliver every keystroke as\n        // insertCompositionText without firing compositionend until blur, which would leave\n        // the FormControl stale for the whole edit (#1293).\n        if (this._isComposing() && this._maskAcceptsLetterInput()) {\n            return;\n        }\n        const el: HTMLInputElement = (e as InputEvent).target as HTMLInputElement;\n\n        const transformedValue = this._maskService.inputTransformFn\n            ? this._maskService.inputTransformFn(el.value)\n            : el.value;\n\n        if (el.type !== 'number') {\n            if (typeof transformedValue === 'string' || typeof transformedValue === 'number') {\n                const transformedString = transformedValue.toString();\n                // Only rewrite el.value when the transform actually changed it: any\n                // programmatic `.value =` assignment clears the browser's \"last changed\n                // by a user edit\" flag, which silently disables native constraint\n                // validation (minlength -> validity.tooShort) even when the mask is a\n                // no-op (#1379). With an empty mask the directive must stay a pure\n                // passthrough for the native input.\n                if (el.value !== transformedString) {\n                    el.value = transformedString;\n                }\n\n                this._inputValue.set(el.value);\n                this._setMask();\n\n                if (!this._maskValue()) {\n                    this.onChange(el.value);\n                    return;\n                }\n\n                // On paste of a raw value that does not yet carry the prefix, the caret\n                // position reported by the element is prefix.length short of where it must\n                // land once applyMask prepends the prefix (#1571). Captured here because the\n                // applyValueChanges callback below resets the _justPasted flag.\n                const pastedValueWithoutPrefix =\n                    this._justPasted() &&\n                    !!this._maskService.prefix &&\n                    !el.value.startsWith(this._maskService.prefix);\n\n                let position: number =\n                    el.selectionStart === 1\n                        ? (el.selectionStart as number) + this._maskService.prefix.length\n                        : (el.selectionStart as number);\n\n                if (\n                    this.keepCharacterPositions() &&\n                    this._maskService.placeHolderCharacter.length === 1 &&\n                    !this._justPasted()\n                ) {\n                    const suffix = this.suffix();\n                    const prefix = this.prefix();\n                    const inputSymbol = el.value.slice(position - 1, position);\n                    const prefixLength = prefix.length;\n                    const showMaskTyped = this.showMaskTyped();\n                    const maskExpression = this._maskService.maskExpression;\n                    // Placeholder skeleton of the mask (special chars kept, fillable slots\n                    // replaced by the placeholder character). With showMaskTyped the service\n                    // renders it as maskIsShown; without showMaskTyped it is derived locally so\n                    // keepCharacterPositions works on its own (#1545, #1543).\n                    const maskSkeleton: string = this._maskService.maskIsShown.length\n                        ? this._maskService.maskIsShown\n                        : maskExpression.replace(/\\w/g, this._maskService.placeHolderCharacter);\n\n                    const hasSelection: boolean =\n                        this._maskService.selStart !== this._maskService.selEnd;\n                    const selStartAbs = Number(this._maskService.selStart);\n                    const selEndAbs = Number(this._maskService.selEnd);\n                    const selStart = selStartAbs - prefixLength;\n                    const selEnd = selEndAbs - prefixLength;\n\n                    const backspaceOrDelete =\n                        this._code() === MaskExpression.BACKSPACE ||\n                        this._code() === MaskExpression.DELETE;\n\n                    // Whether this block fully resolved the resulting display value into\n                    // this._maskService.actualValue. When true, applyMask short-circuits and\n                    // renders actualValue as-is; when false the edit flows through regular\n                    // masking (e.g. appending at the end, or clearing the whole value).\n                    let kcpHandled = true;\n\n                    if (backspaceOrDelete) {\n                        if (hasSelection) {\n                            const preEditLength = el.value.length + (selEndAbs - selStartAbs);\n                            if (\n                                !showMaskTyped &&\n                                selStartAbs <= prefixLength &&\n                                selEndAbs >= preEditLength\n                            ) {\n                                // The whole value was selected and deleted: clear through the\n                                // regular path instead of showing a placeholder skeleton.\n                                kcpHandled = false;\n                            } else if (this._maskService.selStart === prefixLength) {\n                                this._maskService.actualValue = `${prefix}${maskSkeleton.slice(0, selEnd)}${this._inputValue().split(prefix).join('')}`;\n                            } else if (\n                                this._maskService.selStart ===\n                                maskSkeleton.length + prefixLength\n                            ) {\n                                this._maskService.actualValue = `${this._inputValue()}${maskSkeleton.slice(selStart, selEnd)}`;\n                            } else {\n                                this._maskService.actualValue = `${prefix}${this._inputValue()\n                                    .split(prefix)\n                                    .join('')\n                                    .slice(\n                                        0,\n                                        selStart\n                                    )}${maskSkeleton.slice(selStart, selEnd)}${this._maskService.actualValue.slice(\n                                    selEnd + prefixLength,\n                                    maskSkeleton.length + prefixLength\n                                )}${suffix}`;\n                            }\n                        } else if (\n                            !this._maskService.specialCharacters.includes(\n                                maskExpression.slice(\n                                    position - prefixLength,\n                                    position + 1 - prefixLength\n                                )\n                            )\n                        ) {\n                            if (!showMaskTyped && position >= el.value.length) {\n                                // Deleting the last character: no gap needs to be kept.\n                                kcpHandled = false;\n                            } else if (selStart === 1 && prefix) {\n                                this._maskService.actualValue = `${prefix}${this._maskService.placeHolderCharacter}${el.value\n                                    .split(prefix)\n                                    .join('')\n                                    .split(suffix)\n                                    .join('')}${suffix}`;\n\n                                position = position - 1;\n                            } else {\n                                const part1 = el.value.substring(0, position);\n                                const part2 = el.value.substring(position);\n                                this._maskService.actualValue = `${part1}${this._maskService.placeHolderCharacter}${part2}`;\n                            }\n                        }\n                        position = this._code() === MaskExpression.DELETE ? position + 1 : position;\n                    } else if (hasSelection) {\n                        // A selected range was replaced by the typed symbol. Keep the layout:\n                        // blank the selection to the mask skeleton and put the typed symbol\n                        // into the first fillable slot of the selection (#1527, #1489).\n                        const preEditLength = el.value.length - 1 + (selEndAbs - selStartAbs);\n                        if (\n                            !showMaskTyped &&\n                            selStartAbs <= prefixLength &&\n                            selEndAbs >= preEditLength\n                        ) {\n                            // The whole value was replaced: mask it through the regular path.\n                            kcpHandled = false;\n                        } else {\n                            let maskIdx = Math.max(selStart, 0);\n                            while (\n                                maskIdx < maskExpression.length &&\n                                this._maskService.specialCharacters.includes(\n                                    maskExpression[maskIdx] ?? MaskExpression.EMPTY_STRING\n                                )\n                            ) {\n                                maskIdx += 1;\n                            }\n                            const blanked = `${el.value.slice(0, selStartAbs)}${maskSkeleton.slice(\n                                Math.max(selStart, 0),\n                                selEnd\n                            )}${el.value.slice(selStartAbs + 1)}`;\n                            const targetAbs = maskIdx + prefixLength;\n                            if (\n                                targetAbs < blanked.length - suffix.length &&\n                                this._maskService._checkSymbolMask(\n                                    inputSymbol,\n                                    maskExpression[maskIdx] ?? MaskExpression.EMPTY_STRING\n                                )\n                            ) {\n                                this._maskService.actualValue = `${blanked.slice(0, targetAbs)}${inputSymbol}${blanked.slice(targetAbs + 1)}`;\n                                position = targetAbs + 1;\n                            } else {\n                                this._maskService.actualValue = blanked;\n                                position = selStartAbs;\n                            }\n                        }\n                    } else {\n                        // Single-caret insert (overwrite mode): the typed symbol lands in the\n                        // first fillable mask slot at or after the caret, skipping any number\n                        // of special characters (#1544, #1489).\n                        const oldDisplay = `${el.value.slice(0, position - 1)}${el.value.slice(position)}`;\n                        const oldDisplayNoSuffix = suffix\n                            ? oldDisplay.split(suffix).join('')\n                            : oldDisplay;\n                        let maskIdx = position - 1 - prefixLength;\n                        if (maskIdx < 0) {\n                            // Typed inside the prefix: reject the symbol.\n                            position = position - 1;\n                        } else {\n                            while (\n                                maskIdx < maskExpression.length &&\n                                this._maskService.specialCharacters.includes(\n                                    maskExpression[maskIdx] ?? MaskExpression.EMPTY_STRING\n                                )\n                            ) {\n                                maskIdx += 1;\n                            }\n                            const targetAbs = maskIdx + prefixLength;\n                            if (targetAbs >= oldDisplayNoSuffix.length) {\n                                if (oldDisplayNoSuffix.length <= prefixLength || !showMaskTyped) {\n                                    // First symbol, or appending at the end without\n                                    // showMaskTyped: regular masking handles it (including\n                                    // leadZeroDateTime insertions).\n                                    kcpHandled = false;\n                                } else {\n                                    // All slots of the rendered mask are already consumed.\n                                    position = position - 1;\n                                }\n                            } else if (\n                                this._maskService._checkSymbolMask(\n                                    inputSymbol,\n                                    maskExpression[maskIdx] ?? MaskExpression.EMPTY_STRING\n                                )\n                            ) {\n                                this._maskService.actualValue = `${oldDisplayNoSuffix.slice(0, targetAbs)}${inputSymbol}${oldDisplayNoSuffix.slice(targetAbs + 1)}${suffix}`;\n                                position = targetAbs + 1;\n                            } else {\n                                // Rejected symbol: keep the current display.\n                                position = position - 1;\n                            }\n                        }\n                    }\n                    this._maskService.keepCharacterPositionsHandled = kcpHandled;\n                }\n\n                // A literal '*' typed into the VALUE (custom pattern allowing asterisks) makes\n                // the service's applyMask take its hiddenInput shadow-value branch, whose\n                // equal/shorter-length cases restore the stale pre-edit actualValue and discard\n                // a selection replacement (#1504). Without hiddenInput there is no shadow state\n                // to preserve, so drop it and let the edited value flow through regular masking.\n                if (\n                    !this._maskService.hiddenInput &&\n                    !this._maskService.showMaskTyped &&\n                    !this.keepCharacterPositions() &&\n                    this._maskService.selStart !== this._maskService.selEnd &&\n                    el.value.includes(MaskExpression.SYMBOL_STAR)\n                ) {\n                    this._maskService.actualValue = MaskExpression.EMPTY_STRING;\n                }\n\n                let caretShift = 0;\n                let backspaceShift = false;\n                if (this._code() === MaskExpression.DELETE && MaskExpression.SEPARATOR) {\n                    this._maskService.deletedSpecialCharacter = true;\n                }\n                if (\n                    this._inputValue().length >= this._maskService.maskExpression.length - 1 &&\n                    this._code() !== MaskExpression.BACKSPACE &&\n                    this._maskService.maskExpression === MaskExpression.DAYS_MONTHS_YEARS &&\n                    position < 10\n                ) {\n                    const inputSymbol = this._inputValue().slice(position - 1, position);\n                    el.value =\n                        this._inputValue().slice(0, position - 1) +\n                        inputSymbol +\n                        this._inputValue().slice(position + 1);\n                }\n                // #1488: generalizes the single-mask (d0/M0/0000) caret-shift-past-separator\n                // fix to any date/time field. Locates the date/time field containing\n                // `position` by scanning maskExpression for a DAY/MONTH/HOURS/HOUR/MINUTE/\n                // SECOND token followed by its digit run, then checks overflow against the\n                // same per-field thresholds generic-pattern.handler.ts already establishes\n                // (day 31, month 12, hour 23/12 w/ apm, minute/second 59). Read-only against\n                // generic-pattern.handler.ts — mirrors its thresholds, does not import from it.\n                if (this.leadZeroDateTime()) {\n                    const field = this._findDateTimeFieldAt(\n                        this._maskService.maskExpression,\n                        position\n                    );\n                    if (\n                        field &&\n                        this._isFieldOverflowing(\n                            field,\n                            position,\n                            el.value,\n                            this._inputValue(),\n                            !!this.apm()\n                        )\n                    ) {\n                        position = position + 2;\n                    }\n                }\n                if (\n                    this._maskService.maskExpression === MaskExpression.HOURS_MINUTES_SECONDS &&\n                    this.apm()\n                ) {\n                    if (this._justPasted() && el.value.slice(0, 2) === MaskExpression.DOUBLE_ZERO) {\n                        el.value = el.value.slice(1, 2) + el.value.slice(2, el.value.length);\n                    }\n                    el.value =\n                        el.value === MaskExpression.DOUBLE_ZERO\n                            ? MaskExpression.NUMBER_ZERO\n                            : el.value;\n                }\n\n                this._maskService.applyValueChanges(\n                    position,\n                    this._justPasted(),\n                    this._code() === MaskExpression.BACKSPACE ||\n                        this._code() === MaskExpression.DELETE,\n                    (shift: number, _backspaceShift: boolean) => {\n                        this._justPasted.set(false);\n                        caretShift = shift;\n                        backspaceShift = _backspaceShift;\n                    }\n                );\n                // only set the selection if the element is active\n                if (this._getActiveElement() !== el) {\n                    return;\n                }\n\n                if (this._maskService.plusOnePosition) {\n                    position = position + 1;\n                    this._maskService.plusOnePosition = false;\n                }\n                // update position after applyValueChanges to prevent cursor on wrong position when it has an array of maskExpression\n                if (this._maskExpressionArray().length) {\n                    if (this._code() === MaskExpression.BACKSPACE) {\n                        const specialChartMinusOne = this.specialCharacters().includes(\n                            this._maskService.actualValue.slice(position - 1, position)\n                        );\n                        const allowFewMaskChangeMask =\n                            this._maskService.removeMask(this._inputValue())?.length ===\n                            this._maskService.removeMask(this._maskService.maskExpression)?.length;\n\n                        const specialChartPlusOne = this.specialCharacters().includes(\n                            this._maskService.actualValue.slice(position, position + 1)\n                        );\n                        if (allowFewMaskChangeMask && !specialChartPlusOne) {\n                            position = (el.selectionStart as number) + 1;\n                        } else {\n                            position = specialChartMinusOne ? position - 1 : position;\n                        }\n                    } else {\n                        position =\n                            el.selectionStart === 1\n                                ? (el.selectionStart as number) + this._maskService.prefix.length\n                                : (el.selectionStart as number);\n                    }\n                }\n                this._position.set(\n                    this._position() === 1 && this._inputValue().length === 1\n                        ? null\n                        : this._position()\n                );\n                let positionToApply: number = this._position()\n                    ? this._inputValue().length + position + caretShift\n                    : position +\n                      (this._code() === MaskExpression.BACKSPACE && !backspaceShift\n                          ? 0\n                          : caretShift);\n                // For separator masks the applier's caret shift is computed on the raw\n                // (prefix-less) value, so account for the prefix the mask just added (#1571).\n                if (\n                    pastedValueWithoutPrefix &&\n                    this._maskValue().startsWith(MaskExpression.SEPARATOR)\n                ) {\n                    positionToApply += this._maskService.prefix.length;\n                }\n                if (positionToApply > this._getActualInputLength()) {\n                    // A bare decimal marker ('.' or, with a prefix, '$.') is not a number:\n                    // formControlResult has just emitted null for it, which the ngModelChange\n                    // reset handler treats as a form reset and clears actualValue. The plain\n                    // length clamp would then land the caret BEFORE the marker — keep it right\n                    // after the marker instead (#1572).\n                    const decimalMarker = this._maskService.decimalMarker;\n                    const prefix = this._maskService.prefix;\n                    const valueWithoutPrefix = el.value.startsWith(prefix)\n                        ? el.value.slice(prefix.length)\n                        : el.value;\n                    const isBareDecimalMarker =\n                        valueWithoutPrefix.length === 1 &&\n                        (Array.isArray(decimalMarker)\n                            ? decimalMarker.includes(\n                                  valueWithoutPrefix as MaskExpression.DOT | MaskExpression.COMMA\n                              )\n                            : valueWithoutPrefix === decimalMarker);\n                    positionToApply = isBareDecimalMarker\n                        ? this._getActualInputLength() + 1\n                        : this._getActualInputLength();\n                }\n                if (positionToApply < 0) {\n                    positionToApply = 0;\n                }\n                el.setSelectionRange(positionToApply, positionToApply);\n                this._position.set(null);\n            } else {\n                // eslint-disable-next-line no-console\n                console.warn(\n                    'Ngx-mask writeValue work with string | number, your current value:',\n                    typeof transformedValue\n                );\n            }\n        } else {\n            if (!this._maskValue()) {\n                this.onChange(el.value);\n                return;\n            }\n            this._maskService.applyValueChanges(\n                el.value.length,\n                this._justPasted(),\n                this._code() === MaskExpression.BACKSPACE || this._code() === MaskExpression.DELETE\n            );\n        }\n    }\n\n    /**\n     * #1488: locates the date/time field (DAY/MONTH/HOURS/HOUR/MINUTE/SECOND) that\n     * `position` falls within, scanning `maskExpression` left-to-right. A field spans\n     * its token plus its digit-pair companion — `0` for DAY/MONTH/MINUTE/SECOND (e.g.\n     * `d0`, `M0`, `m0`, `s0`), or `HOUR` for the combined `Hh` hour field. Matches any\n     * position from the field's first char up to and including its end (separator index),\n     * so both a still-mid-typing caret and the just-completed field are covered — the\n     * precise overflow decision (single first digit vs. completed 2-digit value) happens\n     * in `_isFieldOverflowing`. Returns null for non-date/time masks, a no-op for the caller.\n     */\n    private _findDateTimeFieldAt(maskExpression: string, position: number): DateTimeField | null {\n        const dateTimeTokens: readonly string[] = [\n            MaskExpression.DAY,\n            MaskExpression.MONTH,\n            MaskExpression.HOURS,\n            MaskExpression.HOUR,\n            MaskExpression.MINUTE,\n            MaskExpression.SECOND,\n        ];\n        let index = 0;\n        while (index < maskExpression.length) {\n            const token = maskExpression[index] ?? MaskExpression.EMPTY_STRING;\n            if (dateTimeTokens.includes(token)) {\n                const next = maskExpression[index + 1];\n                const isCombinedHour =\n                    token === MaskExpression.HOURS && next === MaskExpression.HOUR;\n                const end =\n                    next === MaskExpression.NUMBER_ZERO || isCombinedHour ? index + 2 : index + 1;\n                if (position >= index && position <= end) {\n                    return {\n                        token: token as DateTimeField['token'],\n                        start: index,\n                        end,\n                    };\n                }\n                index = end;\n                continue;\n            }\n            index++;\n        }\n        return null;\n    }\n\n    /**\n     * Per-token overflow thresholds, mirroring the ones `generic-pattern.handler.ts`\n     * already establishes (day 31, month 12, hour 23/12 w/ apm, minute/second 59) — kept\n     * as a small local table rather than importing from the handler (see design's\n     * Rejected Alternatives: the directive and the handler stay on separate sides of the\n     * display/parse boundary).\n     *\n     * Two overflow shapes are checked, mirroring how the handler itself decides mid-type:\n     * - `firstDigitValue`: when `position` is exactly one char past the field's start (the\n     *   just-typed char is the field's first digit), an out-of-range first digit alone\n     *   (e.g. month digit `3`, day digit `4`) already triggers the handler's own leadZero\n     *   pad within this same keystroke — `el.value` hasn't caught up yet at this point in\n     *   the pipeline, so the raw typed digit (`inputValue`) must be read instead.\n     * - `fieldValue`: once both digits of the field are present in `el.value`, an\n     *   out-of-range 2-digit value (e.g. day `33`, month `13`) triggers the shift directly.\n     */\n    private _isFieldOverflowing(\n        field: DateTimeField,\n        position: number,\n        elValue: string,\n        inputValue: string,\n        apm: boolean\n    ): boolean {\n        const fieldValue = Number(elValue.slice(field.start, field.end));\n        const isFirstDigitOfField = position === field.start + 1;\n        const firstDigitValue = isFirstDigitOfField\n            ? Number(inputValue.slice(position - 1, position))\n            : NaN;\n        switch (field.token) {\n            case MaskExpression.DAY:\n                return (fieldValue > 31 && fieldValue < 40) || firstDigitValue > 3;\n            case MaskExpression.MONTH:\n                return fieldValue > 12 || firstDigitValue > 1;\n            case MaskExpression.HOURS:\n                return apm\n                    ? fieldValue > 9 || firstDigitValue > 9\n                    : fieldValue > 23 || firstDigitValue > 2;\n            case MaskExpression.HOUR:\n                return apm ? fieldValue > 12 : fieldValue > 23;\n            case MaskExpression.MINUTE:\n            case MaskExpression.SECOND:\n                return fieldValue > 59 || firstDigitValue > 5;\n            default:\n                return false;\n        }\n    }\n\n    /**\n     * Whether any pattern slot of the current mask expression can accept a letter.\n     * IME composition is only meaningful for such masks; for purely numeric masks\n     * (digit patterns, separator, date/time, IP, CPF_CNPJ) waiting for compositionend\n     * only delays the model sync — and Samsung Keyboard may never fire it until blur\n     * (#1293). Unknown/letterless probe failures fall back to `false` (process live).\n     */\n    private _maskAcceptsLetterInput(): boolean {\n        const patterns = this._maskService.patterns;\n        const maskExpression = this._maskService.maskExpression;\n        for (const symbol of maskExpression) {\n            const pattern = patterns[symbol]?.pattern;\n            if (!pattern) {\n                continue;\n            }\n            // Re-create without sticky/global flags: test() on those is stateful.\n            const probe = new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, ''));\n            if (probe.test('a') || probe.test('A')) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    // IME starts\n    @HostListener('compositionstart')\n    public onCompositionStart(): void {\n        this._isComposing.set(true);\n    }\n\n    // IME completes\n    @HostListener('compositionend', ['$event'])\n    public onCompositionEnd(e: Event): void {\n        this._isComposing.set(false);\n        if (!this._maskAcceptsLetterInput()) {\n            // For letterless masks every edit was already processed live in onInput\n            // (#1293); reprocessing the same value through the paste path would\n            // double-apply the mask.\n            return;\n        }\n        this._justPasted.set(true);\n        this.onInput(e);\n    }\n\n    @HostListener('blur', ['$event'])\n    public onBlur(e: Event): void {\n        if (this._maskValue()) {\n            const el: HTMLInputElement = (e as FocusEvent).target as HTMLInputElement;\n            const pristineBeforeDefault = this._applyDefaultValueOnBlur(el);\n            if (\n                this._maskService.leadZero &&\n                el.value.length > 0 &&\n                typeof this._maskService.decimalMarker === 'string'\n            ) {\n                const maskExpression = this._maskService.maskExpression;\n                const decimalMarker = this._maskService.decimalMarker as string;\n                const suffix = this._maskService.suffix;\n                const precision = Number(\n                    this._maskService.maskExpression.slice(\n                        maskExpression.length - 1,\n                        maskExpression.length\n                    )\n                );\n\n                if (precision > 0) {\n                    el.value = suffix ? el.value.split(suffix).join('') : el.value;\n                    const decimalPart = el.value.split(decimalMarker)[1] as string;\n\n                    el.value = el.value.includes(decimalMarker)\n                        ? el.value +\n                          MaskExpression.NUMBER_ZERO.repeat(\n                              precision - (decimalPart?.length || 0)\n                          ) +\n                          suffix\n                        : el.value +\n                          decimalMarker +\n                          MaskExpression.NUMBER_ZERO.repeat(precision) +\n                          suffix;\n                    this._maskService.actualValue = el.value;\n                    // #1634: propagate through the regular formControlResult pipeline (not a\n                    // raw onChange) so outputTransformFn runs on this blur-time reformat, same\n                    // as every typing-time emission. A raw onChange here sent the masked display\n                    // string straight to the model, bypassing outputTransformFn entirely.\n                    this._maskService.formControlResult(this._maskService.actualValue);\n                }\n            }\n            this._maskService.clearIfNotMatchFn();\n            if (pristineBeforeDefault !== null) {\n                // The default-value emission (and a possible leadZero padding pass above)\n                // ran through the view-change pipeline, which dirties the control. A\n                // blur-time programmatic write must not change dirtiness, so restore the\n                // pre-write pristine state. Touched is NOT restored — blur legitimately\n                // touches the control (onTouch below).\n                this._restoreControlStateAfterWrite(pristineBeforeDefault, false);\n                this._changeDetectorRef.markForCheck();\n            }\n        }\n        this._isFocused.set(false);\n        this._maskService._isFocused.set(false);\n        this.onTouch();\n    }\n\n    /**\n     * Issue #1435 (defaultValueOnBlur): when configured — via the directive input or the\n     * DI config — and the control's unmasked value is empty on blur (covers '', a bare\n     * prefix/suffix and the showMaskTyped skeleton), writes the default through the\n     * regular mask pipeline: applyMask renders the masked display and emits the usual\n     * model output (dropSpecialCharacters/outputTransformFn applied) via formControlResult.\n     * Returns the control's pre-write pristine state for the caller to restore once the\n     * whole blur pass is done, or `null` when no default was applied.\n     */\n    private _applyDefaultValueOnBlur(el: HTMLInputElement): boolean | null {\n        const defaultValue = this.defaultValueOnBlur() ?? this._config.defaultValueOnBlur;\n        if (!defaultValue || this._maskService.removeMask(el.value)) {\n            return null;\n        }\n        const ngControl = this._resolveNgControl();\n        const wasPristine = ngControl ? Boolean(ngControl.pristine) : true;\n        const displayValue = this._maskService.applyMask(\n            defaultValue,\n            this._maskService.maskExpression\n        );\n        el.value = displayValue;\n        this._inputValue.set(displayValue);\n        return wasPristine;\n    }\n\n    @HostListener('click', ['$event'])\n    public onClick(e: Event): void {\n        if (!this._maskValue()) {\n            return;\n        }\n\n        const el: HTMLInputElement = (e as MouseEvent).target as HTMLInputElement;\n        const posStart = 0;\n        const posEnd = 0;\n\n        if (\n            el !== null &&\n            el.selectionStart !== null &&\n            el.selectionStart === el.selectionEnd &&\n            el.selectionStart > this._maskService.prefix.length &&\n            (e as unknown as { keyCode?: number }).keyCode !== 38\n        ) {\n            if (this._maskService.showMaskTyped && !this.keepCharacterPositions()) {\n                // We are showing the mask in the input\n                this._maskService.maskIsShown = this._maskService.showMaskInInput();\n                if (\n                    el.setSelectionRange &&\n                    this._maskService.prefix + this._maskService.maskIsShown === el.value\n                ) {\n                    // the input ONLY contains the mask, so position the cursor at the start\n                    el.focus();\n                    el.setSelectionRange(posStart, posEnd);\n                } else {\n                    // the input contains some characters already\n                    if (el.selectionStart > this._maskService.actualValue.length) {\n                        // if the user clicked beyond our value's length, position the cursor at the end of our value\n                        el.setSelectionRange(\n                            this._maskService.actualValue.length,\n                            this._maskService.actualValue.length\n                        );\n                    }\n                }\n            }\n        }\n        const nextValue: string | null =\n            el &&\n            (el.value === this._maskService.prefix\n                ? this._maskService.prefix + this._maskService.maskIsShown\n                : el.value);\n\n        /** Fix of cursor position jumping to end in most browsers no matter where cursor is inserted onFocus */\n        if (el && el.value !== nextValue) {\n            el.value = nextValue;\n        }\n        /** fix of cursor position with prefix when mouse click occur */\n        if (\n            el &&\n            el.type !== 'number' &&\n            ((el.selectionStart as number) || (el.selectionEnd as number)) <=\n                this._maskService.prefix.length\n        ) {\n            const specialCharactersAtTheStart =\n                this._maskService.maskExpression.match(\n                    new RegExp(\n                        `^[${this._maskService.specialCharacters.map((c) => `\\\\${c}`).join('')}]+`\n                    )\n                )?.[0].length || 0;\n\n            el.selectionStart = this._maskService.prefix.length + specialCharactersAtTheStart;\n            return;\n        }\n        /** select only inserted text */\n        if (el && (el.selectionEnd as number) > this._getActualInputLength()) {\n            el.selectionEnd = this._getActualInputLength();\n        }\n    }\n\n    @HostListener('keydown', ['$event'])\n    public onKeyDown(event: Event): void {\n        const e = event as KeyboardEvent;\n        if (!this._maskValue()) {\n            return;\n        }\n\n        if (this._isComposing()) {\n            // User finalize their choice from IME composition, so trigger onInput() for the composed text.\n            if (e.key === 'Enter') {\n                this.onCompositionEnd(event);\n                return;\n            }\n            // Android IMEs can keep a single composition open across many keystrokes\n            // (#1293): still capture the pre-edit value and selection that onInput\n            // relies on when it processes edits during composition.\n            const composingEl = e.target as HTMLInputElement;\n            this._inputValue.set(composingEl.value);\n            this._maskService.selStart = composingEl.selectionStart;\n            this._maskService.selEnd = composingEl.selectionEnd;\n            return;\n        }\n\n        this._code.set(e.code ? e.code : e.key);\n        const el: HTMLInputElement = e.target as HTMLInputElement;\n        this._inputValue.set(el.value);\n        this._setMask();\n\n        const isTextarea = el.tagName.toLowerCase() === 'textarea';\n\n        if (el.type !== 'number') {\n            if (this._insertNumpadDecimalMarker(e, el)) {\n                return;\n            }\n            if (e.key === MaskExpression.ARROW_UP && !isTextarea) {\n                e.preventDefault();\n            }\n            if (\n                e.key === MaskExpression.ARROW_LEFT ||\n                e.key === MaskExpression.BACKSPACE ||\n                e.key === MaskExpression.DELETE\n            ) {\n                if (e.key === MaskExpression.BACKSPACE && el.value.length === 0) {\n                    el.selectionStart = el.selectionEnd;\n                }\n                if (e.key === MaskExpression.BACKSPACE && (el.selectionStart as number) !== 0) {\n                    const prefixLength = this.prefix().length;\n                    // Use the service value: it holds the config defaults when the input is not\n                    // bound and the bound value otherwise, so an explicitly bound empty array is\n                    // respected instead of silently falling back to the defaults (#1512).\n                    const specialCharacters = this._maskService.specialCharacters;\n\n                    if (prefixLength > 1 && (el.selectionStart as number) <= prefixLength) {\n                        el.setSelectionRange(prefixLength, el.selectionEnd);\n                    } else {\n                        if (\n                            this._inputValue().length !== (el.selectionStart as number) &&\n                            (el.selectionStart as number) !== 1\n                        ) {\n                            while (\n                                specialCharacters.includes(\n                                    (\n                                        this._inputValue()[(el.selectionStart as number) - 1] ??\n                                        MaskExpression.EMPTY_STRING\n                                    ).toString()\n                                ) &&\n                                ((prefixLength >= 1 &&\n                                    (el.selectionStart as number) > prefixLength) ||\n                                    prefixLength === 0)\n                            ) {\n                                el.setSelectionRange(\n                                    (el.selectionStart as number) - 1,\n                                    el.selectionEnd\n                                );\n                            }\n                        }\n                    }\n                }\n                this.checkSelectionOnDeletion(el);\n                if (\n                    this._maskService.prefix.length &&\n                    (el.selectionStart as number) <= this._maskService.prefix.length &&\n                    (el.selectionEnd as number) <= this._maskService.prefix.length\n                ) {\n                    e.preventDefault();\n                }\n                const cursorStart: number | null = el.selectionStart;\n                if (\n                    e.key === MaskExpression.BACKSPACE &&\n                    !el.readOnly &&\n                    cursorStart === 0 &&\n                    el.selectionEnd === el.value.length &&\n                    el.value.length !== 0\n                ) {\n                    // Handle the clear fully here instead of emitting the model change and\n                    // relying on the browser's default deletion + input event to update the\n                    // view: Firefox can drop the default action after the emission below\n                    // triggers change detection (DOM churn around the input), leaving the\n                    // model empty but the view untouched until a second Backspace (#1350).\n                    e.preventDefault();\n                    // The default action (and its input event) is suppressed, so the\n                    // inputTransformFn would never see the cleared value; run it here (#1651).\n                    const transformedEmpty = this._maskService.inputTransformFn\n                        ? this._maskService.inputTransformFn(MaskExpression.EMPTY_STRING)\n                        : MaskExpression.EMPTY_STRING;\n                    const clearedValue =\n                        typeof transformedEmpty === 'string' || typeof transformedEmpty === 'number'\n                            ? String(transformedEmpty)\n                            : MaskExpression.EMPTY_STRING;\n                    const displayValue = this._maskService.applyMask(\n                        clearedValue,\n                        this._maskService.maskExpression,\n                        0,\n                        false,\n                        true\n                    );\n                    el.value = displayValue;\n                    this._inputValue.set(displayValue);\n                    const caret = Math.min(this._maskService.prefix.length, displayValue.length);\n                    el.setSelectionRange(caret, caret);\n                }\n            }\n            if (\n                !!this.suffix() &&\n                this.suffix().length > 1 &&\n                this._inputValue().length - this.suffix().length < (el.selectionStart as number)\n            ) {\n                el.setSelectionRange(\n                    this._inputValue().length - this.suffix().length,\n                    this._inputValue().length\n                );\n            } else if (\n                (e.code === 'KeyA' && e.ctrlKey) ||\n                (e.code === 'KeyA' && e.metaKey) // Cmd + A (Mac)\n            ) {\n                el.setSelectionRange(0, this._getActualInputLength());\n                e.preventDefault();\n            }\n            this._maskService.selStart = el.selectionStart;\n            this._maskService.selEnd = el.selectionEnd;\n        }\n    }\n\n    /**\n     * #1641: on layouts whose decimal separator is a comma, the numeric keypad still emits\n     * a period, which a separator mask configured with a comma decimal marker rejects. The\n     * keypad decimal key (`key: 'Decimal'`, or a `.` from `code: 'NumpadDecimal'`) is\n     * therefore turned into the configured marker. Only the keypad key is intercepted: a\n     * period typed on the main keyboard keeps its normal behavior (e.g. as a thousand\n     * separator). Returns true when the key press was handled.\n     */\n    private _insertNumpadDecimalMarker(e: KeyboardEvent, el: HTMLInputElement): boolean {\n        const isNumpadDecimal =\n            e.key === MaskExpression.NUMPAD_DECIMAL ||\n            (e.code === MaskExpression.NUMPAD_DECIMAL_CODE && e.key === MaskExpression.DOT);\n        if (\n            !isNumpadDecimal ||\n            e.ctrlKey ||\n            e.metaKey ||\n            e.altKey ||\n            el.readOnly ||\n            !this._maskValue().startsWith(MaskExpression.SEPARATOR)\n        ) {\n            return false;\n        }\n        const configuredMarker = this._maskService.decimalMarker;\n        const marker = Array.isArray(configuredMarker)\n            ? configuredMarker.find((item) => item !== this._maskService.thousandSeparator)\n            : configuredMarker;\n        if (marker !== MaskExpression.COMMA) {\n            return false;\n        }\n        const start = el.selectionStart ?? el.value.length;\n        const end = el.selectionEnd ?? start;\n        e.preventDefault();\n        this._code.set(MaskExpression.NUMPAD_DECIMAL_CODE);\n        this._inputValue.set(el.value);\n        this._maskService.selStart = start;\n        this._maskService.selEnd = end;\n        el.value = `${el.value.slice(0, start)}${marker}${el.value.slice(end)}`;\n        el.setSelectionRange(start + 1, start + 1);\n        el.dispatchEvent(\n            new InputEvent('input', { inputType: 'insertText', data: marker, bubbles: true })\n        );\n        return true;\n    }\n\n    /**\n     * Restores the control's pristine/untouched state after a writeValue-driven emission.\n     *\n     * writeValue is a one-way model->view sync. When the mask normalizes the written value\n     * (e.g. leadZero '10.2' -> '10.20'), the directive must still emit the corrected value so\n     * the model adopts it — but that emission runs through Angular's view-change pipeline, which\n     * calls markAsDirty()/markAsTouched(). A programmatic setValue/patchValue must leave the\n     * control pristine, so we undo that side effect here when the control was pristine before\n     * the write. `onlySelf: true` keeps parent group state untouched.\n     */\n    private _restoreControlStateAfterWrite(wasPristine: boolean, wasUntouched: boolean): void {\n        const ngControl = this._resolveNgControl();\n        const control = ngControl?.control;\n        if (!control) {\n            return;\n        }\n        if (wasPristine && ngControl.dirty && typeof control.markAsPristine === 'function') {\n            control.markAsPristine({ onlySelf: true });\n        }\n        if (wasUntouched && ngControl.touched && typeof control.markAsUntouched === 'function') {\n            control.markAsUntouched({ onlySelf: true });\n        }\n    }\n\n    /** It writes the value in the input */\n    public writeValue(controlValue: unknown): void {\n        if (!this._configApplied && this.mask()) {\n            // Called before the first ngOnChanges pass configured the mask service (happens with\n            // Signal Forms' [formField], whose control-sync instruction runs before sibling\n            // directives' ngOnChanges). Defer and replay once the configuration is applied.\n            this._pendingInitialValue = controlValue;\n            this._hasPendingInitialValue = true;\n            return;\n        }\n        // Skip the model echo of a value we just propagated ourselves (see the\n        // _lastPropagatedValue doc). Empty writes are never skipped: form reset('') must\n        // always clear the display and the currentValue/previousValue service state below.\n        const lastPropagated = this._lastPropagatedValue;\n        this._lastPropagatedValue = null;\n        if (\n            lastPropagated !== null &&\n            lastPropagated !== '' &&\n            (typeof controlValue === 'string' || typeof controlValue === 'number') &&\n            String(controlValue) === lastPropagated\n        ) {\n            return;\n        }\n        const ngControl = this._resolveNgControl();\n        const wasPristine = ngControl ? Boolean(ngControl.pristine) : true;\n        const wasUntouched = ngControl ? Boolean(ngControl.untouched) : true;\n        let value = controlValue;\n        const inputTransformFn = this._maskService.inputTransformFn;\n        if (typeof value === 'object' && value !== null && 'value' in value) {\n            if ('disable' in value) {\n                this.setDisabledState(Boolean(value.disable));\n            }\n\n            value = value.value;\n        }\n        if (value !== null) {\n            value = inputTransformFn ? inputTransformFn(value) : value;\n        }\n        if (\n            typeof value === 'string' ||\n            typeof value === 'number' ||\n            value === null ||\n            typeof value === 'undefined'\n        ) {\n            if (value === null || typeof value === 'undefined' || value === '') {\n                this._maskService.currentValue = '';\n                this._maskService.previousValue = '';\n            }\n\n            let inputValue: string | number | null | undefined = value;\n            if (\n                typeof inputValue === 'number' ||\n                this._maskValue().startsWith(MaskExpression.SEPARATOR)\n            ) {\n                inputValue = String(inputValue);\n                const localeDecimalMarker = this._maskService.currentLocaleDecimalMarker();\n                if (!Array.isArray(this._maskService.decimalMarker)) {\n                    inputValue =\n                        this._maskService.decimalMarker !== localeDecimalMarker\n                            ? inputValue.replace(\n                                  localeDecimalMarker,\n                                  this._maskService.decimalMarker\n                              )\n                            : inputValue;\n                }\n\n                if (\n                    this._maskService.leadZero &&\n                    inputValue &&\n                    this.mask() &&\n                    this.dropSpecialCharacters() !== false\n                ) {\n                    inputValue = this._maskService._checkPrecision(\n                        this._maskService.maskExpression,\n                        inputValue as string\n                    );\n                }\n\n                if (\n                    this._maskService.decimalMarker === MaskExpression.COMMA ||\n                    (Array.isArray(this._maskService.decimalMarker) &&\n                        this._maskService.thousandSeparator === MaskExpression.DOT)\n                ) {\n                    inputValue = inputValue\n                        .toString()\n                        .replace(MaskExpression.DOT, MaskExpression.COMMA);\n                }\n                if (\n                    this._resolvedMaskInput().startsWith(MaskExpression.SEPARATOR) &&\n                    this.leadZero()\n                ) {\n                    const isFirstWrite = !this._maskService.isInitialized;\n                    requestAnimationFrame(() => {\n                        // On initial load, temporarily set isInitialized to false\n                        // so formControlResult returns early and doesn't mark form as dirty.\n                        // On later writeValue-driven writes, leave isInitialized as-is: this pass\n                        // may legitimately need to push a leadZero-normalized value (e.g.\n                        // '10.2' -> '10.20') back to the FormControl, which Angular's forms\n                        // pipeline can only do via the same onChange callback used for real user\n                        // edits — see the `should change formValue` unit tests, which assert the\n                        // normalized value lands in `form.value` after a programmatic setValue.\n                        if (isFirstWrite) {\n                            this._maskService.isInitialized = false;\n                        }\n                        this._maskService.applyMask(\n                            inputValue?.toString() ?? '',\n                            this._maskService.maskExpression\n                        );\n                        if (isFirstWrite) {\n                            this._maskService.isInitialized = true;\n                        }\n                        // The leadZero normalization above emits the corrected value through the\n                        // view-change pipeline, which dirties/touches the control. Undo that so a\n                        // programmatic write stays pristine.\n                        this._restoreControlStateAfterWrite(wasPristine, wasUntouched);\n                        // Zoneless CD does not auto-flush after requestAnimationFrame; request\n                        // a check so form.pristine/form.value bindings reflect the new state.\n                        this._changeDetectorRef.markForCheck();\n                    });\n                }\n                this._maskService.isNumberValue = true;\n            }\n\n            if (typeof inputValue !== 'string' || value === null || typeof value === 'undefined') {\n                inputValue = '';\n            }\n\n            this._inputValue.set(inputValue);\n            this._setMask();\n\n            if (\n                (inputValue && this._maskService.maskExpression) ||\n                (this._maskService.maskExpression &&\n                    (this._maskService.prefix || this._maskService.showMaskTyped))\n            ) {\n                // Let the service we know we are writing value so that triggering onChange function won't happen during applyMask\n                this._maskService.writingValue = true;\n\n                const displayValue = this._maskedOrVerbatim(inputValue);\n                this._maskService.formElementProperty = ['value', displayValue];\n                this._writeElementValueSync(displayValue);\n                // Let the service know we've finished writing value\n                this._maskService.writingValue = false;\n                this._maskService.isInitialized = true;\n            } else {\n                this._maskService.formElementProperty = ['value', inputValue];\n                this._writeElementValueSync(inputValue);\n                this._maskService.isInitialized = true;\n            }\n            // A writeValue-driven emission may have dirtied/touched the control via the\n            // view-change pipeline; undo that so programmatic writes stay pristine.\n            this._restoreControlStateAfterWrite(wasPristine, wasUntouched);\n            // Programmatic writes (setValue/patchValue called outside a signal/effect context)\n            // don't schedule CD under zoneless change detection. Request a check so bindings\n            // reading form.pristine/form.dirty/form.value on the host template stay in sync.\n            this._changeDetectorRef.markForCheck();\n        } else {\n            // eslint-disable-next-line no-console\n            console.warn(\n                'Ngx-mask writeValue work with string | number, your current value:',\n                typeof value\n            );\n        }\n    }\n\n    /**\n     * Mirrors a writeValue-driven render into the DOM synchronously, in the same\n     * change-detection pass (#1305). The service's `formElementProperty` setter defers all\n     * writes via queueMicrotask (to keep FIFO ordering with config-driven re-renders and\n     * dodge ExpressionChanged issues), but consumers that read `nativeElement.value` DURING\n     * the CD pass — Angular Material's floating label (`MatInput.empty`), CDK autofill —\n     * never see a value that only lands in a later microtask. The deferred write still runs\n     * afterwards and re-applies the same final value, so ordering guarantees are preserved.\n     *\n     * Skipped while a mask reconfiguration is pending (`mask()` input changed but\n     * `ngOnChanges` has not applied it yet — e.g. `mask.set(...)` + `setValue(...)` before\n     * the next CD pass): the value just computed used the STALE mask config, and rendering\n     * it synchronously would expose an intermediate state that the deferred pipeline is\n     * about to supersede. Multi-masks (`||`) resolve `_maskValue` to one alternative and\n     * therefore also fall back to the deferred-only path.\n     */\n    private _writeElementValueSync(value: string): void {\n        if (this._resolvedMaskInput() !== this._maskValue()) {\n            return;\n        }\n        this._renderer.setProperty(this._elementRef.nativeElement, 'value', value);\n    }\n\n    /** The `mask` input with a user-defined alias (config maskAliases) expanded, if any. */\n    private _resolvedMaskInput(): string {\n        return resolveMaskAlias(this.mask(), this._config.maskAliases);\n    }\n\n    public registerOnChange(fn: typeof this.onChange): void {\n        // Angular only calls this in classic ControlValueAccessor mode (reactive/template forms).\n        // Its invocation is therefore our reliable signal that we are NOT in Signal Forms mode.\n        this._isCvaMode.set(true);\n        const originalFn = fn;\n        this._maskService.onChange = this.onChange = (value: unknown) => {\n            originalFn(value);\n            this._propagateToValueModel(value);\n        };\n    }\n\n    public registerOnTouched(fn: typeof this.onTouch): void {\n        this.onTouch = () => {\n            fn();\n            if (!this.touched()) {\n                this.touched.set(true);\n            }\n        };\n    }\n\n    /**\n     * Pushes the current unmasked value into the `value` model input. In Signal Forms mode this\n     * fires the `valueChange` output that Angular listens to; in CVA mode it is a harmless write\n     * to a model nobody reads. We flag `_skipNextValueEffect` so the resulting model change does\n     * not bounce back through the value effect and overwrite the raw `_inputValue`.\n     */\n    private _propagateToValueModel(value: unknown): void {\n        const stringValue = value === null || typeof value === 'undefined' ? '' : String(value);\n        this._lastPropagatedValue = stringValue;\n        untracked(() => {\n            if (String(this.value()) !== stringValue) {\n                this._skipNextValueEffect.set(true);\n                this.value.set(stringValue);\n            }\n        });\n    }\n\n    /**\n     * Focus the input element.\n     * Required by FormValueControl interface for Signal Forms.\n     */\n    public focus(): void {\n        this._maskService._elementRef?.nativeElement?.focus();\n    }\n\n    private _getActiveElement(document: DocumentOrShadowRoot = this.document): Element | null {\n        const shadowRootEl = document?.activeElement?.shadowRoot;\n        if (!shadowRootEl?.activeElement) {\n            return document.activeElement;\n        } else {\n            return this._getActiveElement(shadowRootEl);\n        }\n    }\n\n    public checkSelectionOnDeletion(el: HTMLInputElement): void {\n        const prefixLength = this.prefix().length;\n        const suffixLength = this.suffix().length;\n        const inputValueLength = this._inputValue().length;\n\n        el.selectionStart = Math.min(\n            Math.max(prefixLength, el.selectionStart as number),\n            inputValueLength - suffixLength\n        );\n        el.selectionEnd = Math.min(\n            Math.max(prefixLength, el.selectionEnd as number),\n            inputValueLength - suffixLength\n        );\n    }\n\n    /**\n     * It disables the input element.\n     *\n     * Mirrors `_writeElementValueSync` (#1305): the service's `formElementProperty` setter\n     * defers ALL DOM writes via `queueMicrotask` to dodge ExpressionChangedAfterItHasBeenChecked\n     * and keep FIFO ordering with config-driven re-renders. For `disabled` specifically, that\n     * deferral leaves `nativeElement.disabled` stale for at least one microtask after Angular\n     * Forms' `setUpControl` calls this method synchronously during init — long enough for a\n     * consumer reading the DOM property in the same synchronous phase (or another deferred write\n     * racing in FIFO order) to observe the wrong value, e.g. an initially-disabled FormControl\n     * whose native input briefly (or, depending on interleaving, persistently) reports\n     * `disabled === false` (#1633). Writing synchronously here closes that gap; the deferred\n     * write below still runs afterwards and re-applies the same final value, preserving the\n     * existing ordering guarantees other call sites rely on.\n     */\n    public setDisabledState(isDisabled: boolean): void {\n        this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n        this._maskService.formElementProperty = ['disabled', isDisabled];\n    }\n\n    private _applyMask(): void {\n        this._maskService.maskExpression = this._maskService._repeatPatternSymbols(\n            this._maskValue() || ''\n        );\n        this._maskService.formElementProperty = [\n            'value',\n            this._maskedOrVerbatim(this._inputValue()),\n        ];\n    }\n\n    /**\n     * Renders `inputValue` through the mask, falling back to the raw value verbatim when the\n     * mask cannot process ANY of it (#1615, e.g. a sentinel like 'ONGOING' written into a\n     * digits-only control). Values that PARTIALLY match keep regular masking.\n     *\n     * Shared by writeValue() and _applyMask() (called from every ngOnChanges pass, including\n     * ones triggered by an UNRELATED input like `disabled`) so the verbatim verdict for a\n     * value written once via writeValue() is not lost on a later re-render that replays the\n     * same raw `inputValue` outside of writeValue — which would otherwise re-run regular\n     * masking, produce an empty result, and emit it through onChange, clobbering the model.\n     *\n     * Excludes an actual mask RECONFIGURATION (`maskChanged`): when the mask itself just\n     * changed, a value that no longer matches must clear through the regular path (see\n     * trigger-on-mask-change.spec.ts) — verbatim passthrough only covers re-renders of the\n     * SAME mask.\n     */\n    private _maskedOrVerbatim(inputValue: string): string {\n        // Snapshot before applyMask(): it resets maskChanged internally as part of emitting\n        // (or skipping) the change, so it must be read before the call, not after.\n        const wasMaskChanged = this._maskService.maskChanged;\n        const maskedResult = this._maskService.applyMask(\n            inputValue,\n            this._maskService.maskExpression\n        );\n        return !maskedResult &&\n            inputValue &&\n            !wasMaskChanged &&\n            this._maskService.removeMask(inputValue)\n            ? inputValue\n            : maskedResult;\n    }\n\n    private _validateTime(value: string): ValidationErrors | null {\n        const rowMaskLen: number = this._maskValue()\n            .split(MaskExpression.EMPTY_STRING)\n            .filter((s: string) => s !== ':').length;\n        if (!value) {\n            return null; // Don't validate empty values to allow for optional form control\n        }\n\n        if (\n            (+(value[value.length - 1] ?? -1) === 0 && value.length < rowMaskLen) ||\n            value.length <= rowMaskLen - 2\n        ) {\n            return this._createValidationError(value);\n        }\n\n        return null;\n    }\n\n    private _getActualInputLength() {\n        return (\n            this._maskService.actualValue.length ||\n            this._maskService.actualValue.length + this._maskService.prefix.length\n        );\n    }\n\n    /**\n     * For `||` multi-masks only (#1583): a value shorter than the currently selected\n     * alternative is still valid when it is a pattern-valid prefix of that alternative\n     * ending exactly at a special-character boundary (e.g. `0` for `0,N`) and it meets\n     * the length requirement of at least one alternative (e.g. `1`). Values stopping\n     * mid-pattern-block (e.g. `112A` for `000SS`) remain invalid.\n     */\n    private _isCompleteAlternativeBoundary(processedValue: string): boolean {\n        const alternatives = this._maskExpressionArray();\n        if (!alternatives.length) {\n            return false;\n        }\n        const maskValue = this._maskValue();\n        const cleanValue = this._maskService.removeMask(processedValue);\n        const cleanMask = this._maskService.removeMask(maskValue);\n        const isPatternPrefix = cleanValue\n            .split(MaskExpression.EMPTY_STRING)\n            .every((character, index) =>\n                this._maskService._checkSymbolMask(character, cleanMask.charAt(index))\n            );\n        if (!isPatternPrefix) {\n            return false;\n        }\n        let patternCount = 0;\n        let boundaryCharacter: string = MaskExpression.EMPTY_STRING;\n        for (const maskCharacter of maskValue) {\n            if (patternCount === cleanValue.length) {\n                boundaryCharacter = maskCharacter;\n                break;\n            }\n            if (!this._maskService.specialCharacters.includes(maskCharacter)) {\n                patternCount++;\n            }\n        }\n        if (\n            !boundaryCharacter ||\n            !this._maskService.specialCharacters.includes(boundaryCharacter)\n        ) {\n            return false;\n        }\n        return alternatives.some((alternative) => {\n            const requiredLength = this._maskService.dropSpecialCharacters\n                ? alternative.length - this._maskService.checkDropSpecialCharAmount(alternative)\n                : this.prefix()\n                  ? alternative.length + this.prefix().length\n                  : alternative.length;\n            // Exact match, not `>=`: a longer value must not pass on the strength of a\n            // shorter alternative it has already outgrown (#1645, 7 digits vs `00000 9`).\n            return processedValue.length === requiredLength;\n        });\n    }\n\n    /**\n     * True when every character of the mask expression is either a pattern token or a\n     * special character — i.e. the mask has no quantifiers (`*`, `?`), curly-bracket\n     * repetitions or other constructs the position-aware matcher does not model.\n     */\n    private _isPlainTokenMask(mask: string): boolean {\n        return mask\n            .split(MaskExpression.EMPTY_STRING)\n            .every(\n                (symbol: string) =>\n                    !!this._maskService.patterns[symbol] ||\n                    this._maskService.specialCharacters.includes(symbol)\n            );\n    }\n\n    /**\n     * Backtracking match of a value against a mask mixing optional and mandatory pattern\n     * tokens (#1515, e.g. `999SSS`). Optional tokens may be left unfilled; special\n     * characters may be absent from the value (dropSpecialCharacters). The value is valid\n     * when it is fully consumed and every remaining mask token is optional or special.\n     */\n    private _matchesMaskWithOptionalSkip(value: string, mask: string): boolean {\n        const patterns = this._maskService.patterns;\n        const match = (maskIndex: number, valueIndex: number): boolean => {\n            if (valueIndex === value.length) {\n                return mask\n                    .slice(maskIndex)\n                    .split(MaskExpression.EMPTY_STRING)\n                    .every((symbol: string) => !patterns[symbol] || !!patterns[symbol]?.optional);\n            }\n            if (maskIndex === mask.length) {\n                return false;\n            }\n            const maskSymbol = mask[maskIndex] as string;\n            const valueSymbol = value[valueIndex] as string;\n            const pattern = patterns[maskSymbol];\n            if (pattern) {\n                if (pattern.pattern.test(valueSymbol) && match(maskIndex + 1, valueIndex + 1)) {\n                    return true;\n                }\n                return !!pattern.optional && match(maskIndex + 1, valueIndex);\n            }\n            // Special character: consume it when present in the value, otherwise treat it\n            // as dropped (dropSpecialCharacters).\n            if (valueSymbol === maskSymbol && match(maskIndex + 1, valueIndex + 1)) {\n                return true;\n            }\n            return match(maskIndex + 1, valueIndex);\n        };\n        return match(0, 0);\n    }\n\n    private _createValidationError(actualValue: string): ValidationErrors {\n        return {\n            mask: {\n                requiredMask: this._maskValue(),\n                actualValue,\n            },\n        };\n    }\n\n    private _setMask() {\n        this._maskExpressionArray().some((mask): boolean | void => {\n            const specialChart: boolean = mask\n                .split(MaskExpression.EMPTY_STRING)\n                .some((char) => this._maskService.specialCharacters.includes(char));\n            if (\n                (specialChart &&\n                    this._inputValue() &&\n                    this._areAllCharactersInEachStringSame(this._maskExpressionArray())) ||\n                mask.includes(MaskExpression.CURLY_BRACKETS_LEFT)\n            ) {\n                const test =\n                    this._maskService.removeMask(this._inputValue())?.length <=\n                    this._maskService.removeMask(mask)?.length;\n                if (test) {\n                    const maskValue = mask.includes(MaskExpression.CURLY_BRACKETS_LEFT)\n                        ? this._maskService._repeatPatternSymbols(mask)\n                        : mask;\n                    this._maskValue.set(maskValue);\n                    this._maskService.maskExpression = maskValue;\n                    return test;\n                } else {\n                    const expression =\n                        this._maskExpressionArray()[this._maskExpressionArray().length - 1] ??\n                        MaskExpression.EMPTY_STRING;\n\n                    const maskValue = expression.includes(MaskExpression.CURLY_BRACKETS_LEFT)\n                        ? this._maskService._repeatPatternSymbols(expression)\n                        : expression;\n                    this._maskValue.set(maskValue);\n                    this._maskService.maskExpression = maskValue;\n                }\n            } else {\n                const cleanMask = this._maskService.removeMask(mask);\n                const check: boolean = this._maskService\n                    .removeMask(this._inputValue())\n                    ?.split(MaskExpression.EMPTY_STRING)\n                    .every((character, index) => {\n                        const indexMask = cleanMask.charAt(index);\n                        return this._maskService._checkSymbolMask(character, indexMask);\n                    });\n\n                if (check || this._justPasted()) {\n                    this._maskValue.set(mask);\n                    this._maskService.maskExpression = mask;\n                    return check;\n                }\n            }\n        });\n    }\n\n    private _areAllCharactersInEachStringSame(array: string[]): boolean {\n        const specialCharacters = this._maskService.specialCharacters;\n\n        function removeSpecialCharacters(str: string): string {\n            const regex = new RegExp(`[${specialCharacters.map((ch) => `\\\\${ch}`).join('')}]`, 'g');\n            return str.replace(regex, '');\n        }\n\n        const processedArr = array.map(removeSpecialCharacters);\n\n        return processedArr.every((str) => {\n            const uniqueCharacters = new Set(str);\n            return uniqueCharacters.size === 1;\n        });\n    }\n}\n","import type { PipeTransform } from '@angular/core';\nimport { inject, Pipe } from '@angular/core';\n\nimport type { NgxMaskConfig } from './ngx-mask.config';\nimport { NGX_MASK_CONFIG, resolveMaskAlias } from './ngx-mask.config';\nimport { NgxMaskService } from './ngx-mask.service';\nimport { MaskExpression } from './ngx-mask-expression.enum';\n\n@Pipe({\n    name: 'mask',\n    pure: true,\n    standalone: true,\n})\nexport class NgxMaskPipe implements PipeTransform {\n    private readonly defaultOptions = inject<NgxMaskConfig>(NGX_MASK_CONFIG);\n\n    private readonly _maskService = inject(NgxMaskService);\n\n    private _maskExpressionArray: string[] = [];\n\n    private mask = '';\n\n    public transform(\n        value: string | number,\n        mask: string,\n        { patterns, maskAliases, ...config }: Partial<NgxMaskConfig> = {} as Partial<NgxMaskConfig>\n    ): string {\n        let processedValue: string | number = value;\n\n        // User-defined aliases expand BEFORE any other mask processing (incl. `||` handling).\n        const resolvedMask = resolveMaskAlias(mask, {\n            ...this.defaultOptions.maskAliases,\n            ...maskAliases,\n        });\n\n        const currentConfig = {\n            maskExpression: resolvedMask,\n            ...this.defaultOptions,\n            ...config,\n            patterns: {\n                ...this._maskService.patterns,\n                ...patterns,\n            },\n        };\n\n        Object.entries(currentConfig).forEach(([key, val]) => {\n            (this._maskService as unknown as Record<string, unknown>)[key] = val;\n        });\n\n        if (resolvedMask.includes('||')) {\n            const maskParts = resolvedMask.split('||');\n            if (maskParts.length > 1) {\n                this._maskExpressionArray = maskParts.sort(\n                    (a: string, b: string) => a.length - b.length\n                );\n                this._setMask(`${processedValue}`);\n                return this._maskService.applyMask(`${processedValue}`, this.mask);\n            } else {\n                this._maskExpressionArray = [];\n                return this._maskService.applyMask(`${processedValue}`, this.mask);\n            }\n        }\n\n        if (resolvedMask.includes(MaskExpression.CURLY_BRACKETS_LEFT)) {\n            return this._maskService.applyMask(\n                `${processedValue}`,\n                this._maskService._repeatPatternSymbols(resolvedMask)\n            );\n        }\n\n        if (resolvedMask.startsWith(MaskExpression.SEPARATOR)) {\n            if (config.decimalMarker) {\n                this._maskService.decimalMarker = config.decimalMarker;\n            }\n            if (config.thousandSeparator) {\n                this._maskService.thousandSeparator = config.thousandSeparator;\n            }\n            if (config.leadZero) {\n                this._maskService.leadZero = config.leadZero;\n            }\n\n            processedValue = String(processedValue);\n            const localeDecimalMarker = this._maskService.currentLocaleDecimalMarker();\n\n            if (!Array.isArray(this._maskService.decimalMarker)) {\n                processedValue =\n                    this._maskService.decimalMarker !== localeDecimalMarker\n                        ? (processedValue as string).replace(\n                              localeDecimalMarker,\n                              this._maskService.decimalMarker\n                          )\n                        : processedValue;\n            }\n\n            if (\n                this._maskService.leadZero &&\n                processedValue &&\n                this._maskService.dropSpecialCharacters !== false\n            ) {\n                processedValue = this._maskService._checkPrecision(\n                    resolvedMask,\n                    processedValue as string\n                );\n            }\n\n            if (this._maskService.decimalMarker === MaskExpression.COMMA) {\n                processedValue = (processedValue as string).replace(\n                    MaskExpression.DOT,\n                    MaskExpression.COMMA\n                );\n            }\n\n            this._maskService.isNumberValue = true;\n        }\n\n        if (processedValue === null || typeof processedValue === 'undefined') {\n            return this._maskService.applyMask('', resolvedMask);\n        }\n\n        return this._maskService.applyMask(`${processedValue}`, resolvedMask);\n    }\n\n    private _setMask(value: string) {\n        if (this._maskExpressionArray.length > 0) {\n            this._maskExpressionArray.some((mask): boolean | void => {\n                const test =\n                    this._maskService.removeMask(value)?.length <=\n                    this._maskService.removeMask(mask)?.length;\n                if (value && test) {\n                    this.mask = mask;\n                    return test;\n                } else {\n                    this.mask =\n                        this._maskExpressionArray[this._maskExpressionArray.length - 1] ??\n                        MaskExpression.EMPTY_STRING;\n                }\n            });\n        }\n    }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA,IAAkB,cA6CjB;AA7CD,CAAA,UAAkB,cAAc,EAAA;AAC5B,IAAA,cAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,cAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,cAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,cAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC;AACjC,IAAA,cAAA,CAAA,OAAA,CAAA,GAAA,GAAW;AACX,IAAA,cAAA,CAAA,QAAA,CAAA,GAAA,IAAa;AACb,IAAA,cAAA,CAAA,QAAA,CAAA,GAAA,GAAY;AACZ,IAAA,cAAA,CAAA,MAAA,CAAA,GAAA,GAAU;AACV,IAAA,cAAA,CAAA,OAAA,CAAA,GAAA,GAAW;AACX,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,IAAc;AACd,IAAA,cAAA,CAAA,YAAA,CAAA,GAAA,IAAiB;AACjB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,IAAc;AACd,IAAA,cAAA,CAAA,uBAAA,CAAA,GAAA,UAAkC;AAClC,IAAA,cAAA,CAAA,YAAA,CAAA,GAAA,UAAuB;AACvB,IAAA,cAAA,CAAA,eAAA,CAAA,GAAA,OAAuB;AACvB,IAAA,cAAA,CAAA,iBAAA,CAAA,GAAA,OAAyB;AACzB,IAAA,cAAA,CAAA,mBAAA,CAAA,GAAA,YAAgC;AAChC,IAAA,cAAA,CAAA,aAAA,CAAA,GAAA,OAAq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