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Aa,iBAA8B,IAAP,OAAgB,EAAS,EAAG,WACvB,QAApG,EAAK,aAAmD,EAAS,EAAa,wBAAqC,IAAP,OAAgB,EAAS,EAAG,MAAM,GAAS,IAAS,EAAM,UACzK,EAAM,KAAK,EAAa,YAGhC,EAAM,QAAQ,KAAK,gBAAgB,EAAW,EAAU,EAAW,KAEhE,CACX,CACA,OAAA,CAAQ,EAAQ,EAAY,GACxB,OAAO,OAAO,OAAO,GAAQ,QAAQ,GACzC,CACA,OAAA,CAAQ,GACJ,OAAO,OAAO,KAAY,GAAU,EAAS,GAAM,CACvD,CACA,aAAA,CAAc,GACV,OAAQ,MAAM,WAAW,KAAY,SAAS,EAClD,CACA,YAAA,CAAa,GACT,OAAO,GAAU,GAAK,EAAS,CACnC,EAEJ,QAAQ,QAAU","file":"/npm/to-words@4.10.0/dist/ToWords.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/to-words@4.10.0/dist/ToWords.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ToWords = exports.DefaultToWordsOptions = exports.DefaultConverterOptions = exports.LOCALES = void 0;\nconst locales_1 = __importDefault(require(\"./locales\"));\nexports.LOCALES = locales_1.default;\nexports.DefaultConverterOptions = {\n    currency: false,\n    ignoreDecimal: false,\n    ignoreZeroCurrency: false,\n    doNotAddOnly: false,\n};\nexports.DefaultToWordsOptions = {\n    localeCode: 'en-IN',\n    converterOptions: exports.DefaultConverterOptions,\n};\nclass ToWords {\n    constructor(options = {}) {\n        this.options = {};\n        this.locale = undefined;\n        this.options = Object.assign({}, exports.DefaultToWordsOptions, options);\n    }\n    getLocaleClass() {\n        if (!(this.options.localeCode in locales_1.default)) {\n            throw new Error(`Unknown Locale \"${this.options.localeCode}\"`);\n        }\n        return locales_1.default[this.options.localeCode];\n    }\n    getLocale() {\n        if (this.locale === undefined) {\n            const LocaleClass = this.getLocaleClass();\n            this.locale = new LocaleClass();\n        }\n        return this.locale;\n    }\n    convert(number, options = {}) {\n        var _a;\n        options = Object.assign({}, this.options.converterOptions, options);\n        if (!this.isValidNumber(number)) {\n            throw new Error(`Invalid Number \"${number}\"`);\n        }\n        if (options.ignoreDecimal) {\n            number = Number.parseInt(number.toString());\n        }\n        let words = [];\n        if (options.currency) {\n            words = this.convertCurrency(number, options);\n        }\n        else {\n            words = this.convertNumber(number);\n        }\n        if ((_a = this.locale) === null || _a === void 0 ? void 0 : _a.config.trim) {\n            return words.join('');\n        }\n        return words.join(' ');\n    }\n    convertNumber(number) {\n        var _a, _b;\n        const locale = this.getLocale();\n        const localeConfig = locale.config;\n        const isNegativeNumber = number < 0;\n        if (isNegativeNumber) {\n            number = Math.abs(number);\n        }\n        const isFloat = this.isFloat(number);\n        let integerPart = Math.trunc(number);\n        let fractionalPart = '';\n        if (isFloat) {\n            const segments = number.toString().split('.');\n            integerPart = Number(segments[0]);\n            fractionalPart = (_a = segments[1]) !== null && _a !== void 0 ? _a : '';\n        }\n        const ignoreZero = this.isNumberZero(number) && localeConfig.ignoreZeroInDecimals;\n        let words = this.convertInternal(integerPart, true, undefined, locale);\n        if (isFloat && ignoreZero) {\n            words = [];\n        }\n        const wordsWithDecimal = [];\n        if (isFloat) {\n            if (!ignoreZero) {\n                wordsWithDecimal.push(localeConfig.texts.point);\n            }\n            if (fractionalPart.startsWith('0') && !(localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.decimalLengthWordMapping)) {\n                const zeroWords = [];\n                for (const num of fractionalPart) {\n                    zeroWords.push(...this.convertInternal(Number(num), true, undefined, locale));\n                }\n                wordsWithDecimal.push(...zeroWords);\n            }\n            else if (fractionalPart.length) {\n                wordsWithDecimal.push(...this.convertInternal(Number(fractionalPart), true, undefined, locale));\n                const decimalLengthWord = (_b = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.decimalLengthWordMapping) === null || _b === void 0 ? void 0 : _b[fractionalPart.length];\n                if (decimalLengthWord) {\n                    wordsWithDecimal.push(decimalLengthWord);\n                }\n            }\n        }\n        const isEmpty = words.length <= 0;\n        if (!isEmpty && isNegativeNumber) {\n            words.unshift(localeConfig.texts.minus);\n        }\n        words.push(...wordsWithDecimal);\n        return words;\n    }\n    convertCurrency(number, options = {}) {\n        var _a, _b, _c, _d, _e;\n        const locale = this.getLocale();\n        const localeConfig = locale.config;\n        const currencyOptions = (_a = options.currencyOptions) !== null && _a !== void 0 ? _a : localeConfig.currency;\n        const isNegativeNumber = number < 0;\n        if (isNegativeNumber) {\n            number = Math.abs(number);\n        }\n        number = this.toFixed(number);\n        // Extra check for isFloat to overcome 1.999 rounding off to 2\n        const isFloat = this.isFloat(number);\n        let mainAmount = Math.trunc(number);\n        let fractionalPart = '';\n        if (isFloat) {\n            const segments = number.toString().split('.');\n            mainAmount = Number(segments[0]);\n            fractionalPart = (_b = segments[1]) !== null && _b !== void 0 ? _b : '';\n        }\n        let words = [];\n        if ((_c = currencyOptions.numberSpecificForms) === null || _c === void 0 ? void 0 : _c[mainAmount]) {\n            words = [currencyOptions.numberSpecificForms[mainAmount]];\n        }\n        else {\n            // Determine if the main currency should be in singular form\n            // e.g. 1 Dollar Only instead of 1 Dollars Only\n            words = [...this.convertInternal(mainAmount, false, undefined, locale)];\n            if (mainAmount === 1 && currencyOptions.singular) {\n                words.push(currencyOptions.singular);\n            }\n            else if (currencyOptions.plural) {\n                words.push(currencyOptions.plural);\n            }\n        }\n        const ignoreZero = this.isNumberZero(number) && (options.ignoreZeroCurrency || ((localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.ignoreZeroInDecimals) && number !== 0));\n        if (ignoreZero) {\n            words = [];\n        }\n        const wordsWithDecimal = [];\n        if (isFloat) {\n            if (!ignoreZero) {\n                wordsWithDecimal.push(localeConfig.texts.and);\n            }\n            const decimalBase = !localeConfig.decimalLengthWordMapping && fractionalPart.length\n                ? Math.pow(10, Math.max(0, 2 - fractionalPart.length))\n                : 1;\n            const decimalPart = Number(fractionalPart || '0') * decimalBase;\n            const decimalLengthWord = (_d = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.decimalLengthWordMapping) === null || _d === void 0 ? void 0 : _d[fractionalPart.length];\n            if ((_e = currencyOptions.fractionalUnit.numberSpecificForms) === null || _e === void 0 ? void 0 : _e[decimalPart]) {\n                wordsWithDecimal.push(currencyOptions.fractionalUnit.numberSpecificForms[decimalPart]);\n            }\n            else {\n                wordsWithDecimal.push(...this.convertInternal(decimalPart, false, undefined, locale));\n                if (decimalLengthWord === null || decimalLengthWord === void 0 ? void 0 : decimalLengthWord.length) {\n                    wordsWithDecimal.push(decimalLengthWord);\n                }\n                if (decimalPart === 1 && currencyOptions.fractionalUnit.singular) {\n                    wordsWithDecimal.push(currencyOptions.fractionalUnit.singular);\n                }\n                else {\n                    wordsWithDecimal.push(currencyOptions.fractionalUnit.plural);\n                }\n            }\n        }\n        else if (localeConfig.decimalLengthWordMapping && words.length) {\n            wordsWithDecimal.push(currencyOptions.fractionalUnit.plural);\n        }\n        const isEmpty = words.length <= 0 && wordsWithDecimal.length <= 0;\n        if (!isEmpty && isNegativeNumber) {\n            words.unshift(localeConfig.texts.minus);\n        }\n        if (!isEmpty && localeConfig.texts.only && !options.doNotAddOnly && !localeConfig.onlyInFront) {\n            wordsWithDecimal.push(localeConfig.texts.only);\n        }\n        if (wordsWithDecimal.length) {\n            words.push(...wordsWithDecimal);\n        }\n        if (!isEmpty && !options.doNotAddOnly && localeConfig.onlyInFront) {\n            words.splice(0, 0, localeConfig.texts.only);\n        }\n        return words;\n    }\n    convertInternal(number, trailing = false, overrides = {}, localeInstance) {\n        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n        const locale = localeInstance !== null && localeInstance !== void 0 ? localeInstance : this.getLocale();\n        const localeConfig = locale.config;\n        if (overrides[number]) {\n            return [overrides[number]];\n        }\n        if (localeConfig.exactWordsMapping) {\n            const exactMatch = (_a = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.exactWordsMapping) === null || _a === void 0 ? void 0 : _a.find((elem) => {\n                return number === elem.number;\n            });\n            if (exactMatch) {\n                return [Array.isArray(exactMatch.value) ? exactMatch.value[+trailing] : exactMatch.value];\n            }\n        }\n        const match = localeConfig.numberWordsMapping.find((elem) => {\n            return number >= elem.number;\n        });\n        const words = [];\n        if (number <= 100 || (number < 1000 && localeConfig.namedLessThan1000)) {\n            words.push(Array.isArray(match.value) ? match.value[0] : match.value);\n            number -= match.number;\n            if (number > 0) {\n                if ((_b = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.splitWord) === null || _b === void 0 ? void 0 : _b.length) {\n                    words.push(localeConfig.splitWord);\n                }\n                words.push(...this.convertInternal(number, trailing, overrides, locale));\n            }\n            return words;\n        }\n        const quotient = Math.floor(number / match.number);\n        const remainder = number % match.number;\n        let matchValue = Array.isArray(match.value) ? match.value[0] : match.value;\n        const pluralForms = (_c = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.pluralForms) === null || _c === void 0 ? void 0 : _c[match.number];\n        let usedPluralForm = false;\n        if (pluralForms) {\n            const lastTwoDigits = quotient % 100;\n            const useLastDigits = quotient >= 11 && lastTwoDigits >= 3 && lastTwoDigits <= 10;\n            if (quotient === 2 && pluralForms.dual) {\n                matchValue = pluralForms.dual;\n                usedPluralForm = true;\n            }\n            else if ((quotient >= ((_e = (_d = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.paucalConfig) === null || _d === void 0 ? void 0 : _d.min) !== null && _e !== void 0 ? _e : 3) && quotient <= ((_g = (_f = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.paucalConfig) === null || _f === void 0 ? void 0 : _f.max) !== null && _g !== void 0 ? _g : 10)) ||\n                useLastDigits) {\n                if (pluralForms.paucal) {\n                    matchValue = pluralForms.paucal;\n                }\n            }\n            else if (quotient >= 11 && pluralForms.plural) {\n                matchValue = pluralForms.plural;\n            }\n        }\n        else {\n            if (quotient > 1 && ((_h = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.pluralWords) === null || _h === void 0 ? void 0 : _h.find((word) => word === match.value)) && (localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.pluralMark)) {\n                matchValue += localeConfig.pluralMark;\n            }\n            if (quotient % 10 === 1) {\n                matchValue = match.singularValue || (Array.isArray(matchValue) ? matchValue[0] : matchValue);\n            }\n        }\n        if ((quotient === 1 && ((_j = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.ignoreOneForWords) === null || _j === void 0 ? void 0 : _j.includes(matchValue))) || usedPluralForm) {\n            words.push(matchValue);\n        }\n        else {\n            words.push(...this.convertInternal(quotient, false, overrides, locale), matchValue);\n        }\n        if (remainder > 0) {\n            if ((_k = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.splitWord) === null || _k === void 0 ? void 0 : _k.length) {\n                if (!((_l = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.noSplitWordAfter) === null || _l === void 0 ? void 0 : _l.find((word) => word === match.value))) {\n                    words.push(localeConfig.splitWord);\n                }\n            }\n            words.push(...this.convertInternal(remainder, trailing, overrides, locale));\n        }\n        return words;\n    }\n    toFixed(number, precision = 2) {\n        return Number(Number(number).toFixed(precision));\n    }\n    isFloat(number) {\n        return Number(number) === number && number % 1 !== 0;\n    }\n    isValidNumber(number) {\n        return !isNaN(parseFloat(number)) && isFinite(number);\n    }\n    isNumberZero(number) {\n        return number >= 0 && number < 1;\n    }\n}\nexports.ToWords = ToWords;\n"]}