{"version":3,"file":"eui-components-eui-input-number.mjs","sources":["../../eui-input-number/eui-input-number.component.ts","../../eui-input-number/eui-number-control.directive.ts","../../eui-input-number/index.ts","../../eui-input-number/eui-components-eui-input-number.ts"],"sourcesContent":["import {\n    booleanAttribute,\n    Component,\n    computed,\n    DoCheck,\n    effect,\n    ElementRef,\n    HostBinding,\n    HostListener,\n    inject,\n    input,\n    InputSignal,\n    LOCALE_ID,\n    numberAttribute,\n    OnChanges,\n    OnDestroy,\n    OnInit,\n    PLATFORM_ID,\n    Renderer2,\n    Signal,\n    signal,\n    SimpleChanges,\n} from '@angular/core';\nimport { LocaleService, LocaleState, injectOptional } from '@eui/core';\nimport { BooleanInput, coerceBooleanProperty, NumberInput } from '@angular/cdk/coercion';\nimport { type CleaveOptions } from 'cleave.js/options';\nimport Cleave from 'cleave.js';\nimport { CleaveEventOnChange } from './models/cleave-event-onchange.model';\nimport { InputDirective } from '@eui/components/shared';\nimport { DOCUMENT, isPlatformBrowser, isPlatformServer } from '@angular/common';\nimport { EuiClearableDirective, EuiLoadingDirective } from '@eui/components/directives';\nimport { NgControl } from '@angular/forms';\n\nexport interface CleaveInstance extends Cleave {\n    initSwapHiddenInput?: () => void;\n    initNumeralFormatter?: () => void;\n    initTimeFormatter?: () => void;\n    initDateFormatter?: () => void;\n    initPhoneFormatter?: () => void;\n    updateCreditCardPropsByValue?: () => void;\n    updateValueState?: () => void;\n    callOnValueChanged?: () => void;\n    onChange?: (event?: Event) => void;\n    onCut?: (event?: Event) => void;\n    onFocus?: (event?: Event) => void;\n    onCopy?: (event?: Event) => void;\n    onKeyDown?: (event?: Event) => void;\n    onChangeListener?: (event?: Event) => void;\n    onKeyDownListener?: (event?: Event) => void;\n    onFocusListener?: (event?: Event) => void;\n    onCutListener?: (event?: Event) => void;\n    onCopyListener?: (event?: Event) => void;\n}\n\n/**\n * Get the decimal separator based on the locale\n *\n * @param locale value of the locale based on ISO 639-1\n */\nfunction getDecimal(locale: string): string {\n    return getLocaleConfig(locale).decimal;\n}\n\n/**\n * Get the group separator based on the locale\n *\n * @param locale value of the locale based on ISO 639-1\n */\nfunction getGroup(locale: string): string {\n    return getLocaleConfig(locale).group;\n}\n\n/**\n * Returns the decimal and group separators for a given locale\n *\n * @param locale value of the locale based on ISO 639-1\n */\nfunction getLocaleConfig(locale: string): { group: string; decimal: string } {\n    const parts = new Intl.NumberFormat(locale, { useGrouping: true }).formatToParts(10000.1);\n\n    return {\n        group: parts.find(p => p.type === 'group')?.value || '',\n        decimal: parts.find(p => p.type === 'decimal')?.value || '.',\n    };\n}\n\n/**\n * @description\n * Input number component that allows the user to enter a number. It supports number\n * formatting and validation. It uses Cleave.js to format the number. It depends on\n * the {@link LocaleService} to get the current locale and format the number accordingly.\n *\n * It supports the following attributes:\n * - {@link min}: The minimum number can be entered. Blocks user's input if not in range.\n * - {@link max}: The maximum number can be entered. Blocks user's input if not in range.\n * - {@link leadingZero}: Adds leading zero to a number. Formatting will not work.\n * - {@link isInvalid}: Sets the invalid state of the input element.\n * - {@link fractionDigits}: Determines how many digits to show after the decimal point.\n * - {@link digits}: Determines how many digits to show before the decimal point.\n * - {@link fillFraction}: Fills the decimal part with zeros in case it's less than the fractionDigits.\n * - {@link roundUp}: Rounds a number with more than two decimals UP.\n * - {@link noFormat}: Disables the number formatting. It will be treated as a plain number.\n * - {@link value}: The value of the input element.\n * - {@link placeholder}: The placeholder value of the input element.\n * - {@link euiClearable}: Adds a clear button to the input element.\n * - {@link euiLoading}: Adds a loading spinner to the input element.\n * - {@link readonly}: Disables the input element.\n * - {@link disabled}: Disables the input element.\n * - {@link euiDanger}: Sets the invalid state of the input element.\n * - {@link euiSuccess}: Sets the success state of the input element.\n * - {@link euiWarning}: Sets the warning state of the input element.\n * - {@link euiInfo}: Sets the info state of the input element.\n * - {@link euiPrimary}: Sets the primary state of the input element.\n * - {@link euiSecondary}: Sets the secondary state of the input element.\n *\n * @usageNotes\n * ### Basic Usage\n * ```html\n * <input euiInputNumber [(ngModel)]=\"amount\" [fractionDigits]=\"2\" />\n * ```\n *\n * ### With Min/Max Range\n * ```html\n * <input euiInputNumber [min]=\"0\" [max]=\"100\" [(ngModel)]=\"percentage\" />\n * ```\n *\n * ### Currency Format\n * ```html\n * <input euiInputNumber [fractionDigits]=\"2\" [fillFraction]=\"true\" placeholder=\"0.00\" />\n * ```\n *\n * ### Accessibility\n * - Use associated `<label>` with `for` attribute\n * - Invalid state is communicated via `aria-invalid`\n * - Min/max constraints are enforced during input\n *\n * ### Notes\n * - Automatically formats numbers based on current locale\n * - Supports large numbers as strings to avoid precision loss\n * - Use `fillFraction` for consistent decimal display (e.g., currency)\n * - `roundUp` parameter controls decimal rounding behavior\n */\n@Component({\n    // eslint-disable-next-line @angular-eslint/component-selector\n    selector: 'input[euiInputNumber]',\n    styleUrls: ['./eui-input-number.scss'],\n    template: '',\n    hostDirectives: [\n        {\n            directive: EuiClearableDirective,\n            inputs: ['euiClearable', 'readonly', 'disabled'],\n        },\n        {\n            directive: EuiLoadingDirective,\n            inputs: ['euiLoading', 'readonly'],\n        },\n    ],\n    host: {\n        '(blur)': 'onTouched()',\n\t\t'[attr.type]': 'type',\n\t\t'(paste)': 'onPaste($event)',\n    },\n})\nexport class EuiInputNumberComponent extends InputDirective implements OnInit, OnDestroy, DoCheck, OnChanges {\n    /**\n     * The minimum number can be entered. Blocks user's input if not in range.\n     */\n    min = input<number, NumberInput>(undefined, { transform: numberAttribute });\n    /**\n     * The maximum number can be entered. Blocks user's input if not in range.\n     */\n    max = input<number, NumberInput>(undefined, { transform: numberAttribute });\n    /**\n     * Adds leading zero to a number. Formatting will not work.\n     *      e.g. with leadingZero=3 input number 5 => 005\n     * @default 0\n     */\n    leadingZero  = input<number, NumberInput>(0, { transform: (v: unknown) => numberAttribute(v, 0) });\n    isInvalid = input<boolean, BooleanInput>(undefined, { transform: this.invalidTransform });\n\n    /**\n     * CSS classes to be added to the host element.\n     */\n    @HostBinding('class')\n    public get cssClasses(): string {\n        return [super.getCssClasses('eui-input-number'), this._isInvalid() ? 'eui-input-number--invalid' : ''].join(' ').trim();\n    }\n\n    /**\n     *  determines how many digits to show after the decimal point\n     *  @default 0\n     */\n    fractionDigits = input<number, NumberInput>(0, { transform: (v: unknown) => numberAttribute(v, 0) });\n    /**\n     * determines how many digits to show before the decimal point\n     */\n    digits = input<number, NumberInput>(undefined, { transform: numberAttribute });\n    /**\n     * fills the decimal part with zeros in case it's less than the fractionDigits\n     */\n    fillFraction = input<boolean, BooleanInput>(undefined, { transform: booleanAttribute });\n    /**\n     * rounds a number with more than two decimals UP\n     */\n    roundUp = input<number, NumberInput>(undefined, { transform: numberAttribute });\n    /**\n     * Disables the number formatting. It will be treated as a plain number.\n     * Will do a thousand grouping of number.\n     */\n    noFormat = input<boolean, BooleanInput>(undefined, { transform: booleanAttribute });\n    /**\n     * The type of the input element.\n     * @default 'eui-number'\n     */\n\tprotected type = 'eui-number';\n    /**\n     * The value of the input element.\n     */\n    value: InputSignal<string> = input();\n    public onChangeCallback: <T>(_: T) => void;\n    /**\n     * holds an instance of cleave.js\n     */\n    cleaveInstance: CleaveInstance;\n\n    protected _elementRef: ElementRef = inject(ElementRef);\n    protected _renderer: Renderer2 = inject(Renderer2);\n    /**\n     * holds an instance of cleave options for the Cleave instance\n     */\n    private options: CleaveOptions;\n    /**\n     * Signal that tracks the invalid state of the associated form control.\n     * Used to reactively update the component's visual state when the form control's validity changes.\n     * @internal\n     */\n    private controlInvalid = signal(false);\n    /**\n     * Signal that tracks whether the associated form control has been touched.\n     * Used to determine when to show validation messages.\n     * Initialized with the control's touched state if available.\n     * @internal\n     */\n    private controlTouched = signal(this.control?.touched);\n    /** @internal */\n    private _isInvalid: Signal<boolean> = signal(false);\n    private localeService = injectOptional(LocaleService);\n    private locale_id = inject(LOCALE_ID);\n    private document = inject<Document>(DOCUMENT);\n    private platformId = inject(PLATFORM_ID);\n\n    constructor() {\n        super();\n        const locale_id = this.locale_id;\n\n        // set default options\n        this.options = {\n            numeral: true,\n            delimiter: getGroup(locale_id || 'en'),\n            numeralDecimalMark: getDecimal(locale_id || 'en'),\n            numeralDecimalScale: this.fractionDigits(),\n            numeralIntegerScale: this.digits(),\n        };\n\n        effect(() => {\n            this.euiDanger = this._isInvalid();\n        });\n    }\n\n    ngOnInit(): void {\n        super.ngOnInit();\n\n        this.control = this.injector.get(NgControl, undefined, { optional: true });\n\n        // instantiate cleave\n        if (!this.control) {\n            this.initCleave();\n        }\n\n        // subscribe to localization service and listen for locale change. De-construction of locale should happen here!\n        this.localeService?.getState().subscribe((state: LocaleState) => {\n            this.options = this.getCleaveOptsBasedOnLocale(state?.id);\n\n            // update the options on the cleave instance\n            this.updateOptions(true);\n        });\n\n        this._renderer.setProperty(this._elementRef.nativeElement, 'rootClassName', 'eui-input-number');\n\n        this._isInvalid = computed(() => {\n            const controlTouched = this.controlTouched();\n            const controlInvalid = this.controlInvalid();\n            const isInvalid = this.isInvalid();\n            // Check if the control is invalid and touched\n            return this.control ? controlInvalid && controlTouched : isInvalid;\n        });\n\n    }\n\n    ngDoCheck(): void {\n        if (!this.control) {\n            this.control = this.injector.get(NgControl, undefined, { optional: true });\n        }\n        if(this.control) {\n            this.controlInvalid.set(this.control.invalid);\n            this.controlTouched.set(this.control.touched);\n        }\n    }\n\n    ngOnChanges(changes: SimpleChanges): void {\n        if (Object.hasOwn(changes, 'value')) {\n            this._elementRef.nativeElement.value = this.value();\n            if (this.cleaveInstance) {\n                this.cleaveInstance.setRawValue(this.value());\n            }\n        }\n        if (Object.hasOwn(changes, 'fractionDigits')) {\n            this.options = { ...this.options, numeralDecimalScale: this.fractionDigits() };\n            this.updateOptions();\n        }\n        if (Object.hasOwn(changes, 'noFormat')) {\n            this.options = { ...this.options, numeralThousandsGroupStyle: this.noFormat() ? 'none' : 'thousand' };\n            this.updateOptions();\n        }\n        if (Object.hasOwn(changes, 'fillFraction') && this.cleaveInstance) {\n            this.applyFractionFill(this.cleaveInstance.getRawValue());\n        }\n        if (Object.hasOwn(changes, 'digits')) {\n            this.options = { ...this.options, numeralIntegerScale: this.digits() };\n            this.updateOptions();\n        }\n        if (Object.hasOwn(changes, 'min')) {\n            if (changes['min'].currentValue >= 0) {\n                if (this.cleaveInstance) {\n                    // take care of the sign symbol\n                    this.cleaveInstance.setRawValue(Math.abs(Number(this.cleaveInstance.getRawValue())).toString());\n                }\n            }\n        }\n        if (Object.hasOwn(changes, 'max')) {\n            // check if current value is in range\n            if (this.cleaveInstance) {\n                const number = Number(this.cleaveInstance.getRawValue());\n                if (number > this.max()) {\n                    this.cleaveInstance.setRawValue(this.max().toString());\n                }\n            }\n        }\n        if (Object.hasOwn(changes, 'roundUp')) {\n            if (changes['roundUp'].currentValue > 0) {\n                if (this.cleaveInstance) {\n                    let number = this.parseNumber(this.cleaveInstance.getRawValue(), false, false);\n                    number = this.decimalAdjust(number, this.roundUp());\n                    this.cleaveInstance.setRawValue(number.toString());\n                }\n            }\n        }\n        if (Object.hasOwn(changes, 'placeholder')) {\n            // parse number\n            const number = this.parseNumber(changes['placeholder'].currentValue?.toString() || undefined);\n            // set placeholder in case none is provided\n            this.setPlaceholderAttribute(!this.isItaNumber(number.toString()) ? changes['placeholder'].currentValue : number);\n        }\n    }\n\n    ngOnDestroy(): void {\n        super.ngOnDestroy();\n        // destroy cleave instance\n        if (this.cleaveInstance) {\n            this.cleaveInstance.destroy();\n        }\n    }\n\n    onChange: <T>(_: T) => void = <T>(_: T): void => {\n        if (this.control && (_ !== null || _ !== undefined)) {\n            // parse number\n            // const value = Number(_);\n            // run on next MicroTask to avoid NG0100 error TODO: deeper investigation\n            // Promise.resolve().then(() => this.control.viewToModelUpdate(value));\n            // in case control is FormControl\n            // this.control?.control.setValue(isNaN(value) ? null : value, { emitEvent: false, emitModelToViewChange: false });\n        }\n    };\n    onTouched: () => void = (): void => {\n        this.control?.control.markAsTouched();\n    };\n\n    onPaste(event: ClipboardEvent): void {\n        // get the value from clipboard\n        const value = (event.clipboardData || window['clipboardData']).getData('text');\n        // in case round UP is enabled\n        if (this.roundUp() > 0) {\n            const div = this.document.createElement('input');\n            // create a clone of cleaveInstance\n            const cloneInstance: CleaveInstance = new Cleave(div, { ...this.options, numeralDecimalScale: 8 });\n            cloneInstance.setRawValue(value.toString());\n            let number = this.parseNumber(cloneInstance.getRawValue(), false, false);\n            number = this.decimalAdjust(number, this.roundUp());\n            if (this.isItaNumber(number.toString())) {\n                // TODO: investigate in the future how can this be avoided\n                setTimeout(() => {\n                    this.cleaveInstance.setRawValue(number.toString());\n                    // this.writeValue(number.toString());\n                }, 0);\n            }\n        }\n    }\n\n    @HostListener('keydown', ['$event'])\n    protected onKeyDown(e: KeyboardEvent): void {\n        // check if it's a single symbol and not Special like (Ctrl, backspace etc.)\n        if (e?.key?.length <= 1 && !e.ctrlKey && !e.altKey && !e.metaKey) {\n            // stop event propagation if key pressed is not a number or locale character or minus sign\n            if (\n                Number.isNaN(Number.parseInt(e.key, 10)) &&\n                this.isMinusAllowed(e.key) &&\n                e.key !== getDecimal(this.localeService?.currentLocale || this.locale_id)\n            ) {\n                e.stopPropagation();\n                e.preventDefault();\n                // stop event propagation if key pressed exceeds the min/max value range\n            } else if (!Number.isNaN(Number.parseInt(e.key, 10)) && this.isOutSideRange(e)) {\n                e.stopPropagation();\n                e.preventDefault();\n            } else if (this.isOutSideRange(e)) {\n                e.stopPropagation();\n                e.preventDefault();\n            }\n        }\n\n        // protect decimal symbol deletion in case fillFraction is on\n        if (e.key === 'Delete' || e.key === 'Backspace') {\n            const element = this._elementRef.nativeElement;\n            // position of caret\n            const pos = element.selectionStart;\n            // get character about to be deleted\n            const char = element.value.charAt(pos - 1);\n            // in case the char is the decimal symbol prevent deletion and move caret in front\n            if (this.fillFraction() &&\n                char === getDecimal(this.localeService?.currentLocale || this.locale_id)) {\n                e.stopPropagation();\n                e.preventDefault();\n                element.setSelectionRange(pos - 1, pos - 1);\n            } else if (this.isOutSideRange(e)) {\n                // don't allow insertion that will put number out of range\n                e.stopPropagation();\n                e.preventDefault();\n            }\n        }\n    }\n\n    @HostListener('focusout')\n    protected onFocusout(): void {\n        // in case fillFraction feature is on and there's no integer part add leading 0\n        if (this.fillFraction() && this.cleaveInstance.getRawValue().match(/^\\.[0-9]+/g)) {\n            this.cleaveInstance.setRawValue('0' + this.cleaveInstance.getRawValue());\n        }\n\n        // in case round UP is enabled\n        if (this.roundUp() > 0) {\n            const number = this.parseNumber(this.cleaveInstance.getRawValue(), false, false);\n            this.cleaveInstance.setRawValue(this.decimalAdjust(number, this.roundUp()).toString());\n        }\n\n        // in case min is set and value is less than min reset to the min value\n        if (this.min() !== null && this.min() !== undefined && Number.parseFloat(this.cleaveInstance.getRawValue()) < this.min()) {\n            this.cleaveInstance.setRawValue(this.min().toString());\n        }\n\n        // in case max is set and value is greater than max reset to the max value\n        if (this.max() !== null && this.max() !== undefined && Number.parseFloat(this.cleaveInstance.getRawValue()) > this.max()) {\n            this.cleaveInstance.setRawValue(this.max().toString());\n        }\n    }\n\n    /**\n     * @Override setPlaceholder setPlaceholderAttribute of InputDirective\n     * Updates the placeholder value based on current number format and given value.\n     * If value passed contains characters it doesn't format placeholder.\n     * */\n    protected setPlaceholderAttribute(value: string | number): void {\n        // if value is a number, format the value based on current number format\n        if (typeof value === 'number' && !isNaN(value) && isPlatformBrowser(this.platformId)) {\n            const div = this.document.createElement('input');\n            // create a clone of cleaveInstance\n            const cloneInstance: CleaveInstance = new Cleave(div, this.options);\n            // BEWARE: by the time your setRawValue cleave options have changed thus number formatting\n            cloneInstance.setRawValue(value.toString());\n            // set the value with current format as placeholder\n            super.setPlaceholderAttribute(cloneInstance.getFormattedValue());\n        } else if (typeof value === 'string') {\n            super.setPlaceholderAttribute(value.toString());\n        } else if (isNaN(value)) {\n            value = this._elementRef.nativeElement.placeholder;\n            super.setPlaceholderAttribute(value.toString());\n        }\n    }\n\n    /**\n     * instantiate Cleave.js\n     */\n    private initCleave<T, P>(onChangeCallback?: (obj: T) => P): void {\n        if(isPlatformServer(this.platformId)) {\n            // in case it's not a browser environment\n            return;\n        }\n        // change the cleave prototype function to intercept onCut callback\n        // and allow based on the event bubbling and disabled state\n        // TIP: change behavior of onCut to stop in case bubble is canceled\n        // TODO: See relevant issue https://github.com/nosir/cleave.js/issues/675\n        const _onCut = Cleave.prototype['onCut'];\n        Cleave.prototype['onCut'] = function (e: Event): void {\n            /* eslint-enable no-invalid-this */\n            // Check if the event is composed and stopPropagation hasn't been called\n            if (!e.composed && !e.defaultPrevented && !this.element.disabled) {\n                _onCut.call(this, e);\n            }\n            /* eslint-disable no-invalid-this */\n        };\n\n        // in case options is undefined\n        const opts: CleaveOptions = { ...this.options };\n\n        // set the onValue change listener to keep the value at readOnly element in sync\n        opts.onValueChanged = onChangeCallback || this.onValueChanged.bind(this);\n\n        // in case round UP is enabled\n        if (this.roundUp() > 0) {\n            const number = this.parseNumber(this._elementRef.nativeElement.value);\n            this._elementRef.nativeElement.value = this.decimalAdjust(number, this.roundUp());\n        }\n\n        // create the Cleave instance with the new or updated options\n        this.cleaveInstance = new Cleave(this._elementRef.nativeElement, opts);\n    }\n\n    /**\n     * Updates the cleave options by destroying the current instance and creating another one while keeping the previous\n     * value.\n     */\n    private updateOptions(localeUpdated = false): void {\n        if (this.cleaveInstance) {\n            // the value before destroying cleave instance\n            const previousValue = this.cleaveInstance.getRawValue();\n\n            // update the Cleave instance with the new or updated options\n            this.cleaveInstance.properties = {\n                ...this.cleaveInstance.properties,\n                ...this.options,\n                initValue: previousValue,\n            };\n\n            // init number formatter with updated options\n            this.cleaveInstance.initNumeralFormatter();\n\n            // In case previous settings where numeralDecimalMark='.' with value 1000.99, and they changed to\n            // numeralDecimalMark=','; set initValue to 1000.99 or even 1000,99 will not be reflected and cleave will\n            // remove the decimal part. Set of the value after initialization causes reformat of number and works.\n            this.cleaveInstance.setRawValue(previousValue);\n\n            // parse number\n            const number = this.parseNumber(this._elementRef.nativeElement.placeholder || undefined, localeUpdated);\n            // set placeholder in case none is provided\n            this.setPlaceholderAttribute(number);\n        }\n    }\n\n    /**\n     * Callback function of the Cleave instance that is invoked when value is changed.\n     *\n     * @param event type of CleaveEventOnChange\n     */\n    private onValueChanged(event: CleaveEventOnChange): void {\n        const { target } = event;\n\n        if (this.fillFraction()) {\n            this.applyFractionFill(target.rawValue);\n        }\n        this.onChange(this.parseNumber(target.rawValue, false, false));\n        // fill leading zero\n        if (this.leadingZero()) {\n            const size = this.leadingZero() > this.digits() && this.digits() > 0 ? this.digits() : this.leadingZero();\n            this._elementRef.nativeElement.value = this.padZero(event.target.rawValue, size);\n        }\n    }\n\n    /**\n     * responsible to extract all locale information needed to build CleaveOptions related to number format.\n     *\n     * @param id The id of the locale\n     */\n    private getCleaveOptsBasedOnLocale(id: string): CleaveOptions {\n        if (!id || id === '') {\n            throw new Error('Locale id cannot be empty or undefined');\n        }\n        const opts: CleaveOptions = {\n            numeral: true,\n            delimiter: getGroup(id),\n            numeralDecimalMark: getDecimal(id),\n            numeralDecimalScale: this.fractionDigits(),\n            numeralIntegerScale: this.digits(),\n            numeralThousandsGroupStyle: this.noFormat() ? 'none' : 'thousand', // TODO: implement based on locale\n        };\n\n        return { ...this.options, ...opts };\n    }\n\n    /**\n     * Applies the fill of decimal part with zeros in case decimal part of given number has\n     * size less than the max fraction digits.\n     *\n     * @param number\n     * @param cleaveInstance\n     * @private\n     */\n    private applyFractionFill(number: string, cleaveInstance: CleaveInstance = this.cleaveInstance): void {\n        // if fill fraction is enabled and there's cleave instance\n        if (this.fillFraction()) {\n            if (this.cleaveInstance) {\n                number = number?.toString();\n                if (number === '' || !number) {\n                    return;\n                }\n                const hasDecimal = number.split('.').length > 1;\n                // in case there's already decimal point in number\n                if (hasDecimal) {\n                    const decimalSize = number.split('.')[1].length;\n                    // if size of decimal part of number is less than the max fraction digits\n                    if (decimalSize < this.fractionDigits()) {\n                        number = number + new Array(this.fractionDigits() - decimalSize).fill(0).join('');\n                        const pos = this._elementRef.nativeElement.selectionStart;\n                        cleaveInstance.setRawValue(number);\n                        this._elementRef.nativeElement.setSelectionRange(pos, pos);\n                    }\n                    // in case there's not, force it by filling it as much zero as the fraction digits\n                } else if (this.fractionDigits() > 0) {\n                    number = `${number}.${new Array(this.fractionDigits()).fill(0).join('')}`;\n                    const pos = this._elementRef.nativeElement.selectionStart;\n                    cleaveInstance.setRawValue(number);\n                    this._elementRef.nativeElement.setSelectionRange(pos, pos);\n                }\n            }\n        }\n    }\n\n    /**\n     * Parses a given formatted number and returns it as a number.\n     *\n     * @param value The formatted number you want to parse e.g. 111,888.22\n     * @param userPrevLocaleState Use previous locale state to parse the value. By default, is false\n     * @param replaceSymbol Replace the decimal symbol with a dot. By default, is false\n     * @private\n     */\n    private parseNumber(value: string, userPrevLocaleState = false, replaceSymbol = true): number | string {\n        // locale state\n        const locale = userPrevLocaleState ? this.localeService?.previousLocale : this.localeService?.currentLocale || this.locale_id || 'en';\n        // get decimal and group symbols\n        const decimalSymbol = getDecimal(locale);\n        const groupSymbol = getGroup(locale);\n        // replace symbols to parse number\n        const parsedNumber = value?.split(groupSymbol).join('').split(decimalSymbol).join('.');\n        return this.parseBigNumber(replaceSymbol ? parsedNumber : value);\n    }\n\n    /**\n     * Pad leading zero to the number\n     *\n     * @param num The number to add leading zero to\n     * @param size Number of number's leading zero\n     * @private\n     */\n    private padZero(num: string, size: number): string {\n        num = num.toString();\n        // get integer and decimal part\n        // eslint-disable-next-line prefer-const\n        let [integer, decimal] = num.split('.');\n        while (integer.length < size) {\n            integer = '0' + integer;\n        }\n        return decimal ? `${integer}.${decimal}` : integer;\n    }\n\n    /**\n     * checks whether the min symbol is allowed. It is allowed when minus symbol\n     * provided and min input is undefined or min provided and is negative.\n     *\n     * @param key The key string coming from an event\n     */\n    private isMinusAllowed(key: string): boolean {\n        return !this.min() || this.min() < 0 ? key !== '-' : true;\n    }\n\n    /**\n     * check whether the key entered is inside the min and\n     * max range. Returns true if it's out of range.\n     *\n     * @param e A keyboard event\n     */\n    private isOutSideRange(e: KeyboardEvent): boolean {\n        if (!this.cleaveInstance) {\n            return false;\n        }\n        // get caret position\n        const pos = e.target['selectionStart'];\n        // get caret position (in case there's text selected)\n        const endPos = e.target['selectionEnd'];\n        // get current value (formatted)\n        let value = e.target['value'];\n        // remove key from value\n        if (e.key === 'Delete' || e.key === 'Backspace') {\n            // check if there's selection of text to be removed\n            if (pos !== endPos) {\n                value = e.target['value'].substring(0, pos) + e.target['value'].substring(endPos, e.target['value'].length);\n            } else {\n                value = e.target['value'].substring(0, pos - 1) + e.target['value'].substring(endPos, e.target['value'].length);\n            }\n        } else {\n            // add key to the value\n            value = [value.slice(0, pos), e.key, value.slice(endPos)].join('');\n        }\n\n        // create a Cleave instance to extract the number from formatted value\n        const cleave: CleaveInstance = new Cleave(this.document.createElement('input'), { ...this.options });\n        cleave.setRawValue(value);\n        const number = Number(cleave.getRawValue());\n        // destroy cleave instance\n        cleave.destroy();\n        return !isNaN(number) &&\n            this.min() >= 0 ? (this.isDefined(this.max()) && this.max() < number) : (this.min() > number || this.max() < number) &&\n            this.max() <= 0 ? (this.isDefined(this.min()) && this.min() > number) : (this.min() > number || this.max() < number);\n    }\n\n    /**\n     * Decimal adjustment of a number.\n     *\n     * @param value The number or string representation of a number.\n     * @param exp   The exponent (the 10 logarithm of the adjustment base).\n     * @returns The adjusted value.\n     */\n    private decimalAdjust(value: number | string, exp: number): string {\n        // Ensure exp is a number\n        exp = +Number(exp);\n\n        // Convert input to string if it's a number\n        const valueStr = typeof value === 'number' ? value.toString() : String(value);\n\n        // Handle empty or invalid inputs\n        if (!valueStr || isNaN(Number(valueStr))) {\n            return '';\n        }\n\n        try {\n            // Check if the value is negative\n            const isNegative = valueStr.startsWith('-');\n            // Get the absolute value string\n            const absoluteValueStr = isNegative ? valueStr.substring(1) : valueStr;\n\n            // Split the number into integer and decimal parts\n            const parts = absoluteValueStr.split('.');\n            let integerPart = parts[0] || '0';  // Default to '0' if empty\n            let decimalPart = parts.length > 1 ? parts[1] : '';\n\n            // If there's no decimal part and exp > 0, we should add zeros\n            if (decimalPart === '' && exp > 0) {\n                decimalPart = '0'.repeat(exp);\n            }\n\n            // Pad decimal part with zeros if needed\n            if (decimalPart.length < exp) {\n                decimalPart = decimalPart.padEnd(exp, '0');\n            }\n\n            // Determine if we need to round up\n            let roundUp = false;\n            if (decimalPart.length > exp) {\n                const nextDigit = parseInt(decimalPart.charAt(exp), 10);\n                roundUp = nextDigit >= 5;\n            }\n\n            // Trim the decimal part to the required precision\n            decimalPart = decimalPart.substring(0, exp);\n\n            // Handle rounding\n            if (roundUp) {\n                if (exp === 0) {\n                    // If exp is 0, we need to round the integer part\n                    integerPart = (BigInt(integerPart) + 1n).toString();\n                } else {\n                    // Create a number from the decimal part\n                    let decimalNum = parseInt(decimalPart, 10);\n\n                    // Add 1 to the decimal part\n                    decimalNum += 1;\n\n                    // Check if we need to carry over to the integer part\n                    if (decimalNum.toString().length > exp) {\n                        integerPart = (BigInt(integerPart) + 1n).toString();\n                        decimalNum = 0;\n                    }\n\n                    // Convert back to string and pad with leading zeros if needed\n                    decimalPart = decimalNum.toString().padStart(exp, '0');\n                }\n            }\n\n            // Combine the parts\n            let result: string;\n            if (exp > 0) {\n                // Remove trailing zeros if they're not significant\n                let trimmedDecimalPart = decimalPart;\n                while (trimmedDecimalPart.length > 0 && trimmedDecimalPart.charAt(trimmedDecimalPart.length - 1) === '0') {\n                    trimmedDecimalPart = trimmedDecimalPart.substring(0, trimmedDecimalPart.length - 1);\n                }\n\n                result = trimmedDecimalPart.length > 0 ? `${integerPart}.${trimmedDecimalPart}` : integerPart;\n            } else {\n                result = integerPart;\n            }\n\n            // Restore the negative sign if needed\n            return isNegative ? '-' + result : result;\n        } catch (error) {\n            console.error('Error in decimalAdjust:', error);\n            // If there's an error, return a formatted original value or '0'\n            return valueStr || '0';\n        }\n    }\n\n    /**\n     * Checks whether a value is defined or not\n     *\n     * @param value\n     */\n    private isDefined(value: number): boolean {\n        return value !== undefined && value !== null;\n    }\n\n    /**\n     * Check if the value is a valid number. Take into account the Big numbers\n     * more than 16 digits. Check if string contains only digits and dots.\n     * The number value must not be formatted.\n     * @param value the value to check\n     * @private\n     */\n    private isItaNumber(value: string): boolean {\n        const length = value?.split('.')[0].length\n        return length > 15 ? /^\\d+(\\.\\d+)?$/.test(value) : !isNaN(Number(value));\n    }\n\n    /**\n     * Parse the value to a number. For large numbers, the value is a string.\n     * The number value must not be formatted.\n     * @param value the value to parse\n     * @private\n     */\n    private parseBigNumber(value: string): number | string {\n        // for large numbers, the value is a string\n        const length = value?.split('.')[0].length\n        return length > 15 ? value : Number.parseFloat(value);\n    }\n\n    /**\n     * @description\n     * Transforms the invalid state input to a boolean value\n     *\n     * @param state\n     * @private\n     */\n    private invalidTransform(state: BooleanInput): boolean {\n        // in case it's controlled by NgControl override\n        const value = coerceBooleanProperty(state);\n\n        // set BaseDirective Attribute\n        this.euiDanger = value;\n\n        return value;\n    }\n}\n","import { Directive, ElementRef, forwardRef, OnInit, PLATFORM_ID, inject } from '@angular/core';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { CleaveInstance, EuiInputNumberComponent } from './eui-input-number.component';\nimport Cleave from 'cleave.js';\nimport { DOCUMENT, isPlatformServer } from '@angular/common';\n\ninterface ConvertToNumberResult {\n\tcanConvert: boolean;\n\treason: string;\n\tvalue: number | null;\n\toriginal?: string;\n\tconverted?: number;\n}\n\n/**\n * @description\n * Directive for the {@link EuiInputNumberComponent}. This directive is used to\n * handle the value changes of the input element and update the value of the\n * directive and the form control. It also implements the ControlValueAccessor\n * interface to allow the directive to be used with reactive forms.\n *\n * @usageNotes\n * ### With Reactive Forms\n * ```typescript\n * form = new FormGroup({\n *   price: new FormControl(0)\n * });\n * ```\n *\n * ```html\n * <input euiInputNumber formControlName=\"price\" [fractionDigits]=\"2\" />\n * ```\n *\n * ### Accessibility\n * - Integrates with Angular Forms validation\n * - Automatically handles disabled state\n *\n * ### Notes\n * - Automatically applied when using formControl, formControlName, or ngModel\n * - Handles large number precision by returning strings when needed\n */\n@Directive({\n    selector: 'input[euiInputNumber][formControl],input[euiInputNumber][formControlName],input[euiInputNumber][ngModel]',\n    providers: [\n        {\n            provide: NG_VALUE_ACCESSOR,\n            useExisting: forwardRef(() => EuiInputNumberDirective),\n            multi: true,\n        },\n        {\n            provide: NG_VALIDATORS,\n            useExisting: forwardRef(() => EuiInputNumberDirective),\n            multi: true,\n        },\n    ],\n})\nexport class EuiInputNumberDirective implements ControlValueAccessor, Validator, OnInit {\n    private onValidatorChange: () => void;\n    private wasIncomplete = false;\n    /**\n     * holds a copy of the value\n     */\n    private value: number | string;\n    private onChange: (t: number | string) => void;\n    private elementRef = inject(ElementRef);\n    private euiNumberComponent = inject(EuiInputNumberComponent, { optional: true })!;\n    private document = inject<Document>(DOCUMENT);\n    private platformId = inject(PLATFORM_ID);\n\n    ngOnInit(): void {\n        this.euiNumberComponent['initCleave'](this.valueChanges.bind(this));\n    }\n\n    // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    writeValue(obj: any): void {\n        if (isPlatformServer(this.platformId)) {\n            return;\n        }\n        const cleave: CleaveInstance = new Cleave(this.document.createElement('input'), { ...this.euiNumberComponent['options'] });\n        cleave.setRawValue(obj);\n        if (this.euiNumberComponent.fillFraction() && obj !== '' && obj) {\n            this.euiNumberComponent['applyFractionFill'](obj, cleave);\n        }\n        let valueOfElement: string;\n        // fill leading zero\n        if (this.euiNumberComponent.leadingZero()) {\n            const size =\n                this.euiNumberComponent.leadingZero() > this.euiNumberComponent.digits() && this.euiNumberComponent.digits() > 0\n                    ? this.euiNumberComponent.digits()\n                    : this.euiNumberComponent.leadingZero();\n            valueOfElement = this.euiNumberComponent['padZero'](cleave.getFormattedValue(), size);\n        } else {\n            valueOfElement = cleave.getFormattedValue();\n        }\n        this.elementRef.nativeElement.value = valueOfElement;\n\t\tconst { canConvert } = this.canSafelyConvertToNumber(cleave.getRawValue())\n\t\tthis.value = !canConvert ? cleave.getRawValue() : Number.parseFloat(cleave.getRawValue());\n\t\tcleave.destroy();\n    }\n\n    // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    registerOnChange(fn: any): void {\n        this.onChange = (t): void => {\n            this.value = t;\n            fn(t);\n        };\n    }\n\n    // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    registerOnTouched(fn: any): void {\n        this.onTouched = fn;\n    }\n\n    /**\n     * Set the disabled state of the input element.\n     *\n     * @param isDisabled\n     */\n    setDisabledState(isDisabled: boolean): void {\n        this.euiNumberComponent.disabled = isDisabled;\n    }\n\n    validate(control: AbstractControl): ValidationErrors | null {\n        const raw = this.elementRef.nativeElement.value;\n        return raw !== '' && !/\\d/.test(raw) ? { incomplete: true } : null;\n    }\n\n    registerOnValidatorChange(fn: () => void): void {\n        this.onValidatorChange = fn;\n    }\n\n    private onTouched(): void {\n        // this.euiNumberComponent.isInvalid = this.control.invalid;\n    }\n\n    /**\n     * Handle the value changes of the input element and update the value of the\n     * directive and the form control. For large numbers, the value is a string.\n     *\n     * @param event\n     */\n    private valueChanges(event): void {\n        const { target } = event;\n\n        this.euiNumberComponent['onValueChanged'](event);\n\n        // Skip intermediate/incomplete values that contain no digit yet\n        const isIncomplete = target.rawValue !== '' && !/\\d/.test(target.rawValue);\n        if (isIncomplete !== this.wasIncomplete) {\n            this.wasIncomplete = isIncomplete;\n            this.onValidatorChange?.();\n        }\n        if (isIncomplete) {\n            return;\n        }\n\n\t\tconst { canConvert, value } = this.canSafelyConvertToNumber(target.rawValue);\n\t\t// Only emit change if the value has actually changed\n\t\tif (this.value !== target.rawValue && this.onChange) {\n\t\t\tthis.onChange(!canConvert ? target.rawValue: value);\n\t\t}\n    }\n\n\t/**\n\t * Check if a numeric string can be safely converted to a number without\n\t * losing precision or exceeding JavaScript's maximum safe integer limit.\n\t * This is important for very large numbers that may be represented\n\t * as strings to avoid precision loss.\n\t *\n\t * @param numString The numeric string to check\n\t * @return An object indicating if conversion is safe, the reason if not, and the converted value if safe\n\t */\n\tprivate canSafelyConvertToNumber(numString: string): ConvertToNumberResult {\n\t\t// Remove whitespace\n\t\tconst trimmed = numString.trim();\n\n\t\tif (trimmed === '') {\n\t\t\treturn {\n\t\t\t\tcanConvert: false,\n\t\t\t\treason: 'Empty string converts to null',\n\t\t\t\tvalue: null,\n\t\t\t};\n\t\t}\n\n\t\t// Convert to number\n\t\tconst numValue = Number(trimmed);\n\n\t\t// Check if it's infinity (exceeds MAX_VALUE)\n\t\tif (!isFinite(numValue)) {\n\t\t\treturn {\n\t\t\t\tcanConvert: false,\n\t\t\t\treason: 'Number exceeds maximum value',\n\t\t\t\tvalue: null,\n\t\t\t};\n\t\t}\n\n\t\t// Convert back to string\n\t\tconst convertedBack = numValue.toString();\n\n\t\t// Normalize BOTH strings without converting to number\n\t\tconst normalizedOriginal = this.normalizeStringOnly(trimmed);\n\t\tconst normalizedConverted = this.normalizeStringOnly(convertedBack);\n\n\t\tif (normalizedOriginal !== normalizedConverted) {\n\t\t\treturn {\n\t\t\t\tcanConvert: false,\n\t\t\t\treason: 'Precision loss detected',\n\t\t\t\tvalue: null,\n\t\t\t\toriginal: trimmed,\n\t\t\t\tconverted: numValue,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tcanConvert: true,\n\t\t\treason: 'Safe to convert',\n\t\t\tvalue: numValue,\n\t\t};\n\t}\n\n\t/**\n\t * Normalize a numeric string by removing leading/trailing zeros and signs,\n\t * without converting to a number. This helps compare the original and converted\n\t * strings for equivalence.\n\t *\n\t * @param str The numeric string to normalize\n\t * @returns The normalized string\n\t */\n\tprivate normalizeStringOnly(str: string): string {\n\t\tlet s = str.trim();\n\n\t\t// Remove leading + sign\n\t\tif (s.startsWith('+')) {\n\t\t\ts = s.substring(1);\n\t\t}\n\n\t\t// Handle decimal numbers\n\t\tif (s.includes('.')) {\n\t\t\tlet [intPart, decPart] = s.split('.');\n\n\t\t\t// Remove leading zeros from integer part (but keep at least one zero)\n\t\t\tintPart = intPart.replace(/^0+/, '') || '0';\n\n\t\t\t// Remove trailing zeros from decimal part\n\t\t\tdecPart = decPart.replace(/0+$/, '');\n\n\t\t\t// If no decimal digits left, return just integer\n\t\t\tif (decPart === '') {\n\t\t\t\treturn intPart;\n\t\t\t}\n\n\t\t\treturn intPart + '.' + decPart;\n\t\t} else {\n\t\t\t// Integer - remove leading zeros\n\t\t\treturn s.replace(/^0+/, '') || '0';\n\t\t}\n\t}\n\n}\n","import { EuiInputNumberComponent } from './eui-input-number.component';\nimport { EuiInputNumberDirective } from './eui-number-control.directive';\n\nexport * from './eui-input-number.component';\nexport * from './eui-number-control.directive';\n\nexport const EUI_INPUT_NUMBER = [\n    EuiInputNumberComponent,\n    EuiInputNumberDirective,\n] as const;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAsDA;;;;AAIG;AACH,SAAS,UAAU,CAAC,MAAc,EAAA;AAC9B,IAAA,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC,OAAO;AAC1C;AAEA;;;;AAIG;AACH,SAAS,QAAQ,CAAC,MAAc,EAAA;AAC5B,IAAA,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK;AACxC;AAEA;;;;AAIG;AACH,SAAS,eAAe,CAAC,MAAc,EAAA;IACnC,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC;IAEzF,OAAO;AACH,QAAA,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,EAAE,KAAK,IAAI,EAAE;AACvD,QAAA,OAAO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