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AAgB0C,OAAOod,EAAc,6CAGrD,GADApkB,KAAKse,OACDte,KAAK6d,QACL,KAER,CACJ,EAEAvD,EAAOrf,UAAU2jB,UAAY,WACzB,MAAQ5e,KAAK6d,SAAWV,EAAcnd,KAAK8d,SACvC9d,KAAKse,MAEb,EAKAhE,EAAOrf,UAAU+iB,KAAO,WACpB,GAAIhe,KAAK6d,QACL,OAAO,KAEX,IAAIxB,EAAOrc,KAAK8d,OACZT,EAASrd,KAAKqd,SACdgH,EAAWrkB,KAAKtD,QAAQqgB,WAAWM,GAAUhB,GAAQ,MAAU,EAAI,IACvE,OAAOgI,QAA2CA,EAAW,IACjE,EACO/J,CACX,CA/yB4B,GAszB5B,SAAS6D,EAASyB,GACd,OAASA,GAAa,IAAMA,GAAa,KACpCA,GAAa,IAAMA,GAAa,EACzC,CA8BA,SAASzC,EAAcjU,GACnB,OAASA,GAAK,GAAUA,GAAK,IACnB,KAANA,GACM,MAANA,GACCA,GAAK,MAAUA,GAAK,MACf,OAANA,GACM,OAANA,CACR,CAKA,SAASkU,EAAiBlU,GACtB,OAASA,GAAK,IAAUA,GAAK,IACnB,KAANA,GACCA,GAAK,IAAUA,GAAK,IACf,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACCA,GAAK,IAAUA,GAAK,IACpBA,GAAK,IAAUA,GAAK,IACpBA,GAAK,IAAUA,GAAK,IACpBA,GAAK,IAAUA,GAAK,IACf,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACCA,GAAK,KAAUA,GAAK,KACf,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACCA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACf,OA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UA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACf,OAANA,GACCA,GAAK,MAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACCA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACCA,GAAK,OAAUA,GAAK,KAC7B,C,mCC1vCO,IAAI2R,EAAwB,8C,mCCC5B,IAAIxB,EAAW,CAClB,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,KAEJ,GAAM,CACF,IACA,KAEJ,GAAM,CACF,IACA,KAEJ,GAAM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,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,QAAS,CACL,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,QAAS,CACL,IACA,IACA,KACA,MAEJ,QAAS,CACL,IACA,IACA,KACA,MAEJ,QAAS,CACL,IACA,IACA,KACA,MAEJ,QAAS,CACL,IACA,IACA,KACA,MAEJ,QAAS,CACL,IACA,IACA,KACA,MAEJ,QAAS,CACL,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GAAM,CACF,IACA,IACA,KACA,MAEJ,GA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,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,IACA,MAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,SAAU,CACN,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,KACA,KAEJ,GAAM,CACF,IACA,KACA,K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AAKhG,IAAK,CAC1B,IAAIE,EAAM4F,EAAM9F,GAChB,GAAI4F,EAAK1F,KAAS2F,EAAK3F,KAClBZ,OAAOG,UAAUC,eAAemB,KAAKgF,EAAM3F,GAC5C,OAAO,CAEf,CACA,OAAO,CACX,C","sources":["../node_modules/react-fast-compare/index.js","../node_modules/react-intl/lib/src/components/provider.js","../node_modules/react-intl/lib/src/utils.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/262.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeLocaleList.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeTimeZoneName.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/CoerceOptionsToObject.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/DefaultNumberOption.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/GetNumberOption.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/GetOptionsObject.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/IsValidTimeZoneName.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/IsWellFormedCurrencyCode.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/IsWellFormedUnitIdentifier.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ComputeExponent.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ComputeExponentForMagnitude.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/CurrencyDigits.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/FormatNumericToParts.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/FormatNumericToString.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/InitializeNumberFormat.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/PartitionNumberPattern.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/SetNumberFormatDigitOptions.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/SetNumberFormatUnitOptions.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawFixed.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawPrecision.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/digit-mapping.generated.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/format_to_parts.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/PartitionPattern.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/SupportedLocales.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/data.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/types/date-time.js","../node_modules/react-intl/node_modules/@formatjs/ecma402-abstract/lib/utils.js","../node_modules/react-intl/node_modules/@formatjs/fast-memoize/lib/index.js","../node_modules/react-intl/node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js","../node_modules/react-intl/node_modules/@formatjs/icu-messageformat-parser/lib/error.js","../node_modules/react-intl/node_modules/@formatjs/icu-messageformat-parser/lib/index.js","../node_modules/react-intl/node_modules/@formatjs/icu-messageformat-parser/lib/parser.js","../node_modules/react-intl/node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js","../node_modules/react-intl/node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js","../node_modules/react-intl/node_modules/@formatjs/icu-messageformat-parser/lib/types.js","../node_modules/react-intl/node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js","../node_modules/react-intl/node_modules/@formatjs/icu-skeleton-parser/lib/number.js","../node_modules/react-intl/node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js","../node_modules/react-intl/node_modules/@formatjs/intl-localematcher/lib/abstract/BestAvailableLocale.js","../node_modules/react-intl/node_modules/@formatjs/intl-localematcher/lib/abstract/BestFitMatcher.js","../node_modules/react-intl/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupMatcher.js","../node_modules/react-intl/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupSupportedLocales.js","../node_modules/react-intl/node_modules/@formatjs/intl-localematcher/lib/abstract/ResolveLocale.js","../node_modules/react-intl/node_modules/@formatjs/intl-localematcher/lib/abstract/UnicodeExtensionValue.js","../node_modules/react-intl/node_modules/@formatjs/intl-localematcher/lib/abstract/utils.js","../node_modules/react-intl/node_modules/intl-messageformat/lib/index.js","../node_modules/react-intl/node_modules/intl-messageformat/lib/src/core.js","../node_modules/react-intl/node_modules/intl-messageformat/lib/src/error.js","../node_modules/react-intl/node_modules/intl-messageformat/lib/src/formatters.js","../node_modules/react-intl/src/components/injectIntl.js","../node_modules/react-intl/src/components/provider.js","../node_modules/react-intl/src/utils.js"],"sourcesContent":["'use strict';\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\nvar hasElementType = typeof Element !== 'undefined';\n\nfunction equal(a, b) {\n // fast-deep-equal index.js 2.0.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = isArray(a)\n , arrB = isArray(b)\n , i\n , length\n , key;\n\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n if (arrA != arrB) return false;\n\n var dateA = a instanceof Date\n , dateB = b instanceof Date;\n if (dateA != dateB) return false;\n if (dateA && dateB) return a.getTime() == b.getTime();\n\n var regexpA = a instanceof RegExp\n , regexpB = b instanceof RegExp;\n if (regexpA != regexpB) return false;\n if (regexpA && regexpB) return a.toString() == b.toString();\n\n var keys = keyList(a);\n length = keys.length;\n\n if (length !== keyList(b).length)\n return false;\n\n for (i = length; i-- !== 0;)\n if (!hasProp.call(b, keys[i])) return false;\n // end fast-deep-equal\n\n // start react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element && b instanceof Element)\n return a === b;\n\n // custom handling for React\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner.\n // _owner contains circular references\n // and is not needed when comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of a react element\n continue;\n } else {\n // all other properties should be traversed as usual\n if (!equal(a[key], b[key])) return false;\n }\n }\n // end react-fast-compare\n\n // fast-deep-equal index.js 2.0.1\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function exportedEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if ((error.message && error.message.match(/stack|recursion/i)) || (error.number === -2146828260)) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport { __assign, __extends, __rest, __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { Provider } from './injectIntl';\nimport { DEFAULT_INTL_CONFIG, invariantIntlContext, assignUniqueKeysToParts, shallowEqual, } from '../utils';\nimport { formatMessage as coreFormatMessage, createIntl as coreCreateIntl, createIntlCache, } from '@formatjs/intl';\nimport { isFormatXMLElementFn, } from 'intl-messageformat';\nfunction processIntlConfig(config) {\n return {\n locale: config.locale,\n timeZone: config.timeZone,\n fallbackOnEmptyString: config.fallbackOnEmptyString,\n formats: config.formats,\n textComponent: config.textComponent,\n messages: config.messages,\n defaultLocale: config.defaultLocale,\n defaultFormats: config.defaultFormats,\n onError: config.onError,\n onWarn: config.onWarn,\n wrapRichTextChunksInFragment: config.wrapRichTextChunksInFragment,\n defaultRichTextElements: config.defaultRichTextElements,\n };\n}\nfunction assignUniqueKeysToFormatXMLElementFnArgument(values) {\n if (!values) {\n return values;\n }\n return Object.keys(values).reduce(function (acc, k) {\n var v = values[k];\n acc[k] = isFormatXMLElementFn(v)\n ? assignUniqueKeysToParts(v)\n : v;\n return acc;\n }, {});\n}\nvar formatMessage = function (config, formatters, descriptor, rawValues) {\n var rest = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n rest[_i - 4] = arguments[_i];\n }\n var values = assignUniqueKeysToFormatXMLElementFnArgument(rawValues);\n var chunks = coreFormatMessage.apply(void 0, __spreadArray([config,\n formatters,\n descriptor,\n values], rest, false));\n if (Array.isArray(chunks)) {\n return React.Children.toArray(chunks);\n }\n return chunks;\n};\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nexport var createIntl = function (_a, cache) {\n var rawDefaultRichTextElements = _a.defaultRichTextElements, config = __rest(_a, [\"defaultRichTextElements\"]);\n var defaultRichTextElements = assignUniqueKeysToFormatXMLElementFnArgument(rawDefaultRichTextElements);\n var coreIntl = coreCreateIntl(__assign(__assign(__assign({}, DEFAULT_INTL_CONFIG), config), { defaultRichTextElements: defaultRichTextElements }), cache);\n return __assign(__assign({}, coreIntl), { formatMessage: formatMessage.bind(null, {\n locale: coreIntl.locale,\n timeZone: coreIntl.timeZone,\n fallbackOnEmptyString: coreIntl.fallbackOnEmptyString,\n formats: coreIntl.formats,\n defaultLocale: coreIntl.defaultLocale,\n defaultFormats: coreIntl.defaultFormats,\n messages: coreIntl.messages,\n onError: coreIntl.onError,\n defaultRichTextElements: defaultRichTextElements,\n }, coreIntl.formatters) });\n};\nvar IntlProvider = /** @class */ (function (_super) {\n __extends(IntlProvider, _super);\n function IntlProvider() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.cache = createIntlCache();\n _this.state = {\n cache: _this.cache,\n intl: createIntl(processIntlConfig(_this.props), _this.cache),\n prevConfig: processIntlConfig(_this.props),\n };\n return _this;\n }\n IntlProvider.getDerivedStateFromProps = function (props, _a) {\n var prevConfig = _a.prevConfig, cache = _a.cache;\n var config = processIntlConfig(props);\n if (!shallowEqual(prevConfig, config)) {\n return {\n intl: createIntl(config, cache),\n prevConfig: config,\n };\n }\n return null;\n };\n IntlProvider.prototype.render = function () {\n invariantIntlContext(this.state.intl);\n return React.createElement(Provider, { value: this.state.intl }, this.props.children);\n };\n IntlProvider.displayName = 'IntlProvider';\n IntlProvider.defaultProps = DEFAULT_INTL_CONFIG;\n return IntlProvider;\n}(React.PureComponent));\nexport default IntlProvider;\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { invariant } from '@formatjs/ecma402-abstract';\nimport { DEFAULT_INTL_CONFIG as CORE_DEFAULT_INTL_CONFIG } from '@formatjs/intl';\nexport function invariantIntlContext(intl) {\n invariant(intl, '[React Intl] Could not find required `intl` object. ' +\n ' needs to exist in the component ancestry.');\n}\nexport var DEFAULT_INTL_CONFIG = __assign(__assign({}, CORE_DEFAULT_INTL_CONFIG), { textComponent: React.Fragment });\n/**\n * Takes a `formatXMLElementFn`, and composes it in function, which passes\n * argument `parts` through, assigning unique key to each part, to prevent\n * \"Each child in a list should have a unique \"key\"\" React error.\n * @param formatXMLElementFn\n */\nexport function assignUniqueKeysToParts(formatXMLElementFn) {\n return function (parts) {\n // eslint-disable-next-line prefer-rest-params\n return formatXMLElementFn(React.Children.toArray(parts));\n };\n}\nexport function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n if (!objA || !objB) {\n return false;\n }\n var aKeys = Object.keys(objA);\n var bKeys = Object.keys(objB);\n var len = aKeys.length;\n if (bKeys.length !== len) {\n return false;\n }\n for (var i = 0; i < len; i++) {\n var key = aKeys[i];\n if (objA[key] !== objB[key] ||\n !Object.prototype.hasOwnProperty.call(objB, key)) {\n return false;\n }\n }\n return true;\n}\n","/**\n * https://tc39.es/ecma262/#sec-tostring\n */\nexport function ToString(o) {\n // Only symbol is irregular...\n if (typeof o === 'symbol') {\n throw TypeError('Cannot convert a Symbol value to a string');\n }\n return String(o);\n}\n/**\n * https://tc39.es/ecma262/#sec-tonumber\n * @param val\n */\nexport function ToNumber(val) {\n if (val === undefined) {\n return NaN;\n }\n if (val === null) {\n return +0;\n }\n if (typeof val === 'boolean') {\n return val ? 1 : +0;\n }\n if (typeof val === 'number') {\n return val;\n }\n if (typeof val === 'symbol' || typeof val === 'bigint') {\n throw new TypeError('Cannot convert symbol/bigint to number');\n }\n return Number(val);\n}\n/**\n * https://tc39.es/ecma262/#sec-tointeger\n * @param n\n */\nfunction ToInteger(n) {\n var number = ToNumber(n);\n if (isNaN(number) || SameValue(number, -0)) {\n return 0;\n }\n if (isFinite(number)) {\n return number;\n }\n var integer = Math.floor(Math.abs(number));\n if (number < 0) {\n integer = -integer;\n }\n if (SameValue(integer, -0)) {\n return 0;\n }\n return integer;\n}\n/**\n * https://tc39.es/ecma262/#sec-timeclip\n * @param time\n */\nexport function TimeClip(time) {\n if (!isFinite(time)) {\n return NaN;\n }\n if (Math.abs(time) > 8.64 * 1e15) {\n return NaN;\n }\n return ToInteger(time);\n}\n/**\n * https://tc39.es/ecma262/#sec-toobject\n * @param arg\n */\nexport function ToObject(arg) {\n if (arg == null) {\n throw new TypeError('undefined/null cannot be converted to object');\n }\n return Object(arg);\n}\n/**\n * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue\n * @param x\n * @param y\n */\nexport function SameValue(x, y) {\n if (Object.is) {\n return Object.is(x, y);\n }\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n }\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n}\n/**\n * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-arraycreate\n * @param len\n */\nexport function ArrayCreate(len) {\n return new Array(len);\n}\n/**\n * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-hasownproperty\n * @param o\n * @param prop\n */\nexport function HasOwnProperty(o, prop) {\n return Object.prototype.hasOwnProperty.call(o, prop);\n}\n/**\n * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type\n * @param x\n */\nexport function Type(x) {\n if (x === null) {\n return 'Null';\n }\n if (typeof x === 'undefined') {\n return 'Undefined';\n }\n if (typeof x === 'function' || typeof x === 'object') {\n return 'Object';\n }\n if (typeof x === 'number') {\n return 'Number';\n }\n if (typeof x === 'boolean') {\n return 'Boolean';\n }\n if (typeof x === 'string') {\n return 'String';\n }\n if (typeof x === 'symbol') {\n return 'Symbol';\n }\n if (typeof x === 'bigint') {\n return 'BigInt';\n }\n}\nvar MS_PER_DAY = 86400000;\n/**\n * https://www.ecma-international.org/ecma-262/11.0/index.html#eqn-modulo\n * @param x\n * @param y\n * @return k of the same sign as y\n */\nfunction mod(x, y) {\n return x - Math.floor(x / y) * y;\n}\n/**\n * https://tc39.es/ecma262/#eqn-Day\n * @param t\n */\nexport function Day(t) {\n return Math.floor(t / MS_PER_DAY);\n}\n/**\n * https://tc39.es/ecma262/#sec-week-day\n * @param t\n */\nexport function WeekDay(t) {\n return mod(Day(t) + 4, 7);\n}\n/**\n * https://tc39.es/ecma262/#sec-year-number\n * @param y\n */\nexport function DayFromYear(y) {\n return Date.UTC(y, 0) / MS_PER_DAY;\n}\n/**\n * https://tc39.es/ecma262/#sec-year-number\n * @param y\n */\nexport function TimeFromYear(y) {\n return Date.UTC(y, 0);\n}\n/**\n * https://tc39.es/ecma262/#sec-year-number\n * @param t\n */\nexport function YearFromTime(t) {\n return new Date(t).getUTCFullYear();\n}\nexport function DaysInYear(y) {\n if (y % 4 !== 0) {\n return 365;\n }\n if (y % 100 !== 0) {\n return 366;\n }\n if (y % 400 !== 0) {\n return 365;\n }\n return 366;\n}\nexport function DayWithinYear(t) {\n return Day(t) - DayFromYear(YearFromTime(t));\n}\nexport function InLeapYear(t) {\n return DaysInYear(YearFromTime(t)) === 365 ? 0 : 1;\n}\n/**\n * https://tc39.es/ecma262/#sec-month-number\n * @param t\n */\nexport function MonthFromTime(t) {\n var dwy = DayWithinYear(t);\n var leap = InLeapYear(t);\n if (dwy >= 0 && dwy < 31) {\n return 0;\n }\n if (dwy < 59 + leap) {\n return 1;\n }\n if (dwy < 90 + leap) {\n return 2;\n }\n if (dwy < 120 + leap) {\n return 3;\n }\n if (dwy < 151 + leap) {\n return 4;\n }\n if (dwy < 181 + leap) {\n return 5;\n }\n if (dwy < 212 + leap) {\n return 6;\n }\n if (dwy < 243 + leap) {\n return 7;\n }\n if (dwy < 273 + leap) {\n return 8;\n }\n if (dwy < 304 + leap) {\n return 9;\n }\n if (dwy < 334 + leap) {\n return 10;\n }\n if (dwy < 365 + leap) {\n return 11;\n }\n throw new Error('Invalid time');\n}\nexport function DateFromTime(t) {\n var dwy = DayWithinYear(t);\n var mft = MonthFromTime(t);\n var leap = InLeapYear(t);\n if (mft === 0) {\n return dwy + 1;\n }\n if (mft === 1) {\n return dwy - 30;\n }\n if (mft === 2) {\n return dwy - 58 - leap;\n }\n if (mft === 3) {\n return dwy - 89 - leap;\n }\n if (mft === 4) {\n return dwy - 119 - leap;\n }\n if (mft === 5) {\n return dwy - 150 - leap;\n }\n if (mft === 6) {\n return dwy - 180 - leap;\n }\n if (mft === 7) {\n return dwy - 211 - leap;\n }\n if (mft === 8) {\n return dwy - 242 - leap;\n }\n if (mft === 9) {\n return dwy - 272 - leap;\n }\n if (mft === 10) {\n return dwy - 303 - leap;\n }\n if (mft === 11) {\n return dwy - 333 - leap;\n }\n throw new Error('Invalid time');\n}\nvar HOURS_PER_DAY = 24;\nvar MINUTES_PER_HOUR = 60;\nvar SECONDS_PER_MINUTE = 60;\nvar MS_PER_SECOND = 1e3;\nvar MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;\nvar MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;\nexport function HourFromTime(t) {\n return mod(Math.floor(t / MS_PER_HOUR), HOURS_PER_DAY);\n}\nexport function MinFromTime(t) {\n return mod(Math.floor(t / MS_PER_MINUTE), MINUTES_PER_HOUR);\n}\nexport function SecFromTime(t) {\n return mod(Math.floor(t / MS_PER_SECOND), SECONDS_PER_MINUTE);\n}\nfunction IsCallable(fn) {\n return typeof fn === 'function';\n}\n/**\n * The abstract operation OrdinaryHasInstance implements\n * the default algorithm for determining if an object O\n * inherits from the instance object inheritance path\n * provided by constructor C.\n * @param C class\n * @param O object\n * @param internalSlots internalSlots\n */\nexport function OrdinaryHasInstance(C, O, internalSlots) {\n if (!IsCallable(C)) {\n return false;\n }\n if (internalSlots === null || internalSlots === void 0 ? void 0 : internalSlots.boundTargetFunction) {\n var BC = internalSlots === null || internalSlots === void 0 ? void 0 : internalSlots.boundTargetFunction;\n return O instanceof BC;\n }\n if (typeof O !== 'object') {\n return false;\n }\n var P = C.prototype;\n if (typeof P !== 'object') {\n throw new TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');\n }\n return Object.prototype.isPrototypeOf.call(P, O);\n}\nexport function msFromTime(t) {\n return mod(t, MS_PER_SECOND);\n}\n","/**\n * http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist\n * @param locales\n */\nexport function CanonicalizeLocaleList(locales) {\n // TODO\n return Intl.getCanonicalLocales(locales);\n}\n","/**\n * https://tc39.es/ecma402/#sec-canonicalizetimezonename\n * @param tz\n */\nexport function CanonicalizeTimeZoneName(tz, _a) {\n var tzData = _a.tzData, uppercaseLinks = _a.uppercaseLinks;\n var uppercasedTz = tz.toUpperCase();\n var uppercasedZones = Object.keys(tzData).reduce(function (all, z) {\n all[z.toUpperCase()] = z;\n return all;\n }, {});\n var ianaTimeZone = uppercaseLinks[uppercasedTz] || uppercasedZones[uppercasedTz];\n if (ianaTimeZone === 'Etc/UTC' || ianaTimeZone === 'Etc/GMT') {\n return 'UTC';\n }\n return ianaTimeZone;\n}\n","import { ToObject } from './262';\n/**\n * https://tc39.es/ecma402/#sec-coerceoptionstoobject\n * @param options\n * @returns\n */\nexport function CoerceOptionsToObject(options) {\n if (typeof options === 'undefined') {\n return Object.create(null);\n }\n return ToObject(options);\n}\n","export function DefaultNumberOption(val, min, max, fallback) {\n if (val !== undefined) {\n val = Number(val);\n if (isNaN(val) || val < min || val > max) {\n throw new RangeError(\"\".concat(val, \" is outside of range [\").concat(min, \", \").concat(max, \"]\"));\n }\n return Math.floor(val);\n }\n return fallback;\n}\n","/**\n * https://tc39.es/ecma402/#sec-getnumberoption\n * @param options\n * @param property\n * @param min\n * @param max\n * @param fallback\n */\nimport { DefaultNumberOption } from './DefaultNumberOption';\nexport function GetNumberOption(options, property, minimum, maximum, fallback) {\n var val = options[property];\n // @ts-expect-error\n return DefaultNumberOption(val, minimum, maximum, fallback);\n}\n","import { ToString } from './262';\n/**\n * https://tc39.es/ecma402/#sec-getoption\n * @param opts\n * @param prop\n * @param type\n * @param values\n * @param fallback\n */\nexport function GetOption(opts, prop, type, values, fallback) {\n if (typeof opts !== 'object') {\n throw new TypeError('Options must be an object');\n }\n var value = opts[prop];\n if (value !== undefined) {\n if (type !== 'boolean' && type !== 'string') {\n throw new TypeError('invalid type');\n }\n if (type === 'boolean') {\n value = Boolean(value);\n }\n if (type === 'string') {\n value = ToString(value);\n }\n if (values !== undefined && !values.filter(function (val) { return val == value; }).length) {\n throw new RangeError(\"\".concat(value, \" is not within \").concat(values.join(', ')));\n }\n return value;\n }\n return fallback;\n}\n","/**\n * https://tc39.es/ecma402/#sec-getoptionsobject\n * @param options\n * @returns\n */\nexport function GetOptionsObject(options) {\n if (typeof options === 'undefined') {\n return Object.create(null);\n }\n if (typeof options === 'object') {\n return options;\n }\n throw new TypeError('Options must be an object');\n}\n","/**\n * https://tc39.es/ecma402/#table-sanctioned-simple-unit-identifiers\n */\nexport var SANCTIONED_UNITS = [\n 'angle-degree',\n 'area-acre',\n 'area-hectare',\n 'concentr-percent',\n 'digital-bit',\n 'digital-byte',\n 'digital-gigabit',\n 'digital-gigabyte',\n 'digital-kilobit',\n 'digital-kilobyte',\n 'digital-megabit',\n 'digital-megabyte',\n 'digital-petabyte',\n 'digital-terabit',\n 'digital-terabyte',\n 'duration-day',\n 'duration-hour',\n 'duration-millisecond',\n 'duration-minute',\n 'duration-month',\n 'duration-second',\n 'duration-week',\n 'duration-year',\n 'length-centimeter',\n 'length-foot',\n 'length-inch',\n 'length-kilometer',\n 'length-meter',\n 'length-mile-scandinavian',\n 'length-mile',\n 'length-millimeter',\n 'length-yard',\n 'mass-gram',\n 'mass-kilogram',\n 'mass-ounce',\n 'mass-pound',\n 'mass-stone',\n 'temperature-celsius',\n 'temperature-fahrenheit',\n 'volume-fluid-ounce',\n 'volume-gallon',\n 'volume-liter',\n 'volume-milliliter',\n];\n// In CLDR, the unit name always follows the form `namespace-unit` pattern.\n// For example: `digital-bit` instead of `bit`. This function removes the namespace prefix.\nexport function removeUnitNamespace(unit) {\n return unit.slice(unit.indexOf('-') + 1);\n}\n/**\n * https://tc39.es/ecma402/#table-sanctioned-simple-unit-identifiers\n */\nexport var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);\n/**\n * https://tc39.es/ecma402/#sec-issanctionedsimpleunitidentifier\n */\nexport function IsSanctionedSimpleUnitIdentifier(unitIdentifier) {\n return SIMPLE_UNITS.indexOf(unitIdentifier) > -1;\n}\n","/**\n * https://tc39.es/ecma402/#sec-isvalidtimezonename\n * @param tz\n * @param implDetails implementation details\n */\nexport function IsValidTimeZoneName(tz, _a) {\n var tzData = _a.tzData, uppercaseLinks = _a.uppercaseLinks;\n var uppercasedTz = tz.toUpperCase();\n var zoneNames = new Set();\n var linkNames = new Set();\n Object.keys(tzData)\n .map(function (z) { return z.toUpperCase(); })\n .forEach(function (z) { return zoneNames.add(z); });\n Object.keys(uppercaseLinks).forEach(function (linkName) {\n linkNames.add(linkName.toUpperCase());\n zoneNames.add(uppercaseLinks[linkName].toUpperCase());\n });\n return zoneNames.has(uppercasedTz) || linkNames.has(uppercasedTz);\n}\n","/**\n * This follows https://tc39.es/ecma402/#sec-case-sensitivity-and-case-mapping\n * @param str string to convert\n */\nfunction toUpperCase(str) {\n return str.replace(/([a-z])/g, function (_, c) { return c.toUpperCase(); });\n}\nvar NOT_A_Z_REGEX = /[^A-Z]/;\n/**\n * https://tc39.es/ecma402/#sec-iswellformedcurrencycode\n */\nexport function IsWellFormedCurrencyCode(currency) {\n currency = toUpperCase(currency);\n if (currency.length !== 3) {\n return false;\n }\n if (NOT_A_Z_REGEX.test(currency)) {\n return false;\n }\n return true;\n}\n","import { IsSanctionedSimpleUnitIdentifier } from './IsSanctionedSimpleUnitIdentifier';\n/**\n * This follows https://tc39.es/ecma402/#sec-case-sensitivity-and-case-mapping\n * @param str string to convert\n */\nfunction toLowerCase(str) {\n return str.replace(/([A-Z])/g, function (_, c) { return c.toLowerCase(); });\n}\n/**\n * https://tc39.es/ecma402/#sec-iswellformedunitidentifier\n * @param unit\n */\nexport function IsWellFormedUnitIdentifier(unit) {\n unit = toLowerCase(unit);\n if (IsSanctionedSimpleUnitIdentifier(unit)) {\n return true;\n }\n var units = unit.split('-per-');\n if (units.length !== 2) {\n return false;\n }\n var numerator = units[0], denominator = units[1];\n if (!IsSanctionedSimpleUnitIdentifier(numerator) ||\n !IsSanctionedSimpleUnitIdentifier(denominator)) {\n return false;\n }\n return true;\n}\n","import { getMagnitude } from '../utils';\nimport { ComputeExponentForMagnitude } from './ComputeExponentForMagnitude';\nimport { FormatNumericToString } from './FormatNumericToString';\n/**\n * The abstract operation ComputeExponent computes an exponent (power of ten) by which to scale x\n * according to the number formatting settings. It handles cases such as 999 rounding up to 1000,\n * requiring a different exponent.\n *\n * NOT IN SPEC: it returns [exponent, magnitude].\n */\nexport function ComputeExponent(numberFormat, x, _a) {\n var getInternalSlots = _a.getInternalSlots;\n if (x === 0) {\n return [0, 0];\n }\n if (x < 0) {\n x = -x;\n }\n var magnitude = getMagnitude(x);\n var exponent = ComputeExponentForMagnitude(numberFormat, magnitude, {\n getInternalSlots: getInternalSlots,\n });\n // Preserve more precision by doing multiplication when exponent is negative.\n x = exponent < 0 ? x * Math.pow(10, -exponent) : x / Math.pow(10, exponent);\n var formatNumberResult = FormatNumericToString(getInternalSlots(numberFormat), x);\n if (formatNumberResult.roundedNumber === 0) {\n return [exponent, magnitude];\n }\n var newMagnitude = getMagnitude(formatNumberResult.roundedNumber);\n if (newMagnitude === magnitude - exponent) {\n return [exponent, magnitude];\n }\n return [\n ComputeExponentForMagnitude(numberFormat, magnitude + 1, {\n getInternalSlots: getInternalSlots,\n }),\n magnitude + 1,\n ];\n}\n","/**\n * The abstract operation ComputeExponentForMagnitude computes an exponent by which to scale a\n * number of the given magnitude (power of ten of the most significant digit) according to the\n * locale and the desired notation (scientific, engineering, or compact).\n */\nexport function ComputeExponentForMagnitude(numberFormat, magnitude, _a) {\n var getInternalSlots = _a.getInternalSlots;\n var internalSlots = getInternalSlots(numberFormat);\n var notation = internalSlots.notation, dataLocaleData = internalSlots.dataLocaleData, numberingSystem = internalSlots.numberingSystem;\n switch (notation) {\n case 'standard':\n return 0;\n case 'scientific':\n return magnitude;\n case 'engineering':\n return Math.floor(magnitude / 3) * 3;\n default: {\n // Let exponent be an implementation- and locale-dependent (ILD) integer by which to scale a\n // number of the given magnitude in compact notation for the current locale.\n var compactDisplay = internalSlots.compactDisplay, style = internalSlots.style, currencyDisplay = internalSlots.currencyDisplay;\n var thresholdMap = void 0;\n if (style === 'currency' && currencyDisplay !== 'name') {\n var currency = dataLocaleData.numbers.currency[numberingSystem] ||\n dataLocaleData.numbers.currency[dataLocaleData.numbers.nu[0]];\n thresholdMap = currency.short;\n }\n else {\n var decimal = dataLocaleData.numbers.decimal[numberingSystem] ||\n dataLocaleData.numbers.decimal[dataLocaleData.numbers.nu[0]];\n thresholdMap = compactDisplay === 'long' ? decimal.long : decimal.short;\n }\n if (!thresholdMap) {\n return 0;\n }\n var num = String(Math.pow(10, magnitude));\n var thresholds = Object.keys(thresholdMap); // TODO: this can be pre-processed\n if (num < thresholds[0]) {\n return 0;\n }\n if (num > thresholds[thresholds.length - 1]) {\n return thresholds[thresholds.length - 1].length - 1;\n }\n var i = thresholds.indexOf(num);\n if (i === -1) {\n return 0;\n }\n // See https://unicode.org/reports/tr35/tr35-numbers.html#Compact_Number_Formats\n // Special handling if the pattern is precisely `0`.\n var magnitudeKey = thresholds[i];\n // TODO: do we need to handle plural here?\n var compactPattern = thresholdMap[magnitudeKey].other;\n if (compactPattern === '0') {\n return 0;\n }\n // Example: in zh-TW, `10000000` maps to `0000萬`. So we need to return 8 - 4 = 4 here.\n return (magnitudeKey.length -\n thresholdMap[magnitudeKey].other.match(/0+/)[0].length);\n }\n }\n}\n","import { HasOwnProperty } from '../262';\n/**\n * https://tc39.es/ecma402/#sec-currencydigits\n */\nexport function CurrencyDigits(c, _a) {\n var currencyDigitsData = _a.currencyDigitsData;\n return HasOwnProperty(currencyDigitsData, c)\n ? currencyDigitsData[c]\n : 2;\n}\n","import { PartitionNumberPattern } from './PartitionNumberPattern';\nimport { ArrayCreate } from '../262';\nexport function FormatNumericToParts(nf, x, implDetails) {\n var parts = PartitionNumberPattern(nf, x, implDetails);\n var result = ArrayCreate(0);\n for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {\n var part = parts_1[_i];\n result.push({\n type: part.type,\n value: part.value,\n });\n }\n return result;\n}\n","import { SameValue } from '../262';\nimport { ToRawPrecision } from './ToRawPrecision';\nimport { repeat } from '../utils';\nimport { ToRawFixed } from './ToRawFixed';\n/**\n * https://tc39.es/ecma402/#sec-formatnumberstring\n */\nexport function FormatNumericToString(intlObject, x) {\n var isNegative = x < 0 || SameValue(x, -0);\n if (isNegative) {\n x = -x;\n }\n var result;\n var rourndingType = intlObject.roundingType;\n switch (rourndingType) {\n case 'significantDigits':\n result = ToRawPrecision(x, intlObject.minimumSignificantDigits, intlObject.maximumSignificantDigits);\n break;\n case 'fractionDigits':\n result = ToRawFixed(x, intlObject.minimumFractionDigits, intlObject.maximumFractionDigits);\n break;\n default:\n result = ToRawPrecision(x, 1, 2);\n if (result.integerDigitsCount > 1) {\n result = ToRawFixed(x, 0, 0);\n }\n break;\n }\n x = result.roundedNumber;\n var string = result.formattedString;\n var int = result.integerDigitsCount;\n var minInteger = intlObject.minimumIntegerDigits;\n if (int < minInteger) {\n var forwardZeros = repeat('0', minInteger - int);\n string = forwardZeros + string;\n }\n if (isNegative) {\n x = -x;\n }\n return { roundedNumber: x, formattedString: string };\n}\n","import { CanonicalizeLocaleList } from '../CanonicalizeLocaleList';\nimport { GetOption } from '../GetOption';\nimport { ResolveLocale } from '@formatjs/intl-localematcher';\nimport { SetNumberFormatUnitOptions } from './SetNumberFormatUnitOptions';\nimport { CurrencyDigits } from './CurrencyDigits';\nimport { SetNumberFormatDigitOptions } from './SetNumberFormatDigitOptions';\nimport { invariant } from '../utils';\nimport { CoerceOptionsToObject } from '../CoerceOptionsToObject';\n/**\n * https://tc39.es/ecma402/#sec-initializenumberformat\n */\nexport function InitializeNumberFormat(nf, locales, opts, _a) {\n var getInternalSlots = _a.getInternalSlots, localeData = _a.localeData, availableLocales = _a.availableLocales, numberingSystemNames = _a.numberingSystemNames, getDefaultLocale = _a.getDefaultLocale, currencyDigitsData = _a.currencyDigitsData;\n // @ts-ignore\n var requestedLocales = CanonicalizeLocaleList(locales);\n var options = CoerceOptionsToObject(opts);\n var opt = Object.create(null);\n var matcher = GetOption(options, 'localeMatcher', 'string', ['lookup', 'best fit'], 'best fit');\n opt.localeMatcher = matcher;\n var numberingSystem = GetOption(options, 'numberingSystem', 'string', undefined, undefined);\n if (numberingSystem !== undefined &&\n numberingSystemNames.indexOf(numberingSystem) < 0) {\n // 8.a. If numberingSystem does not match the Unicode Locale Identifier type nonterminal,\n // throw a RangeError exception.\n throw RangeError(\"Invalid numberingSystems: \".concat(numberingSystem));\n }\n opt.nu = numberingSystem;\n var r = ResolveLocale(availableLocales, requestedLocales, opt, \n // [[RelevantExtensionKeys]] slot, which is a constant\n ['nu'], localeData, getDefaultLocale);\n var dataLocaleData = localeData[r.dataLocale];\n invariant(!!dataLocaleData, \"Missing locale data for \".concat(r.dataLocale));\n var internalSlots = getInternalSlots(nf);\n internalSlots.locale = r.locale;\n internalSlots.dataLocale = r.dataLocale;\n internalSlots.numberingSystem = r.nu;\n internalSlots.dataLocaleData = dataLocaleData;\n SetNumberFormatUnitOptions(nf, options, { getInternalSlots: getInternalSlots });\n var style = internalSlots.style;\n var mnfdDefault;\n var mxfdDefault;\n if (style === 'currency') {\n var currency = internalSlots.currency;\n var cDigits = CurrencyDigits(currency, { currencyDigitsData: currencyDigitsData });\n mnfdDefault = cDigits;\n mxfdDefault = cDigits;\n }\n else {\n mnfdDefault = 0;\n mxfdDefault = style === 'percent' ? 0 : 3;\n }\n var notation = GetOption(options, 'notation', 'string', ['standard', 'scientific', 'engineering', 'compact'], 'standard');\n internalSlots.notation = notation;\n SetNumberFormatDigitOptions(internalSlots, options, mnfdDefault, mxfdDefault, notation);\n var compactDisplay = GetOption(options, 'compactDisplay', 'string', ['short', 'long'], 'short');\n if (notation === 'compact') {\n internalSlots.compactDisplay = compactDisplay;\n }\n var useGrouping = GetOption(options, 'useGrouping', 'boolean', undefined, true);\n internalSlots.useGrouping = useGrouping;\n var signDisplay = GetOption(options, 'signDisplay', 'string', ['auto', 'never', 'always', 'exceptZero'], 'auto');\n internalSlots.signDisplay = signDisplay;\n return nf;\n}\n","import { FormatNumericToString } from './FormatNumericToString';\nimport { SameValue } from '../262';\nimport { ComputeExponent } from './ComputeExponent';\nimport formatToParts from './format_to_parts';\n/**\n * https://tc39.es/ecma402/#sec-formatnumberstring\n */\nexport function PartitionNumberPattern(numberFormat, x, _a) {\n var _b;\n var getInternalSlots = _a.getInternalSlots;\n var internalSlots = getInternalSlots(numberFormat);\n var pl = internalSlots.pl, dataLocaleData = internalSlots.dataLocaleData, numberingSystem = internalSlots.numberingSystem;\n var symbols = dataLocaleData.numbers.symbols[numberingSystem] ||\n dataLocaleData.numbers.symbols[dataLocaleData.numbers.nu[0]];\n var magnitude = 0;\n var exponent = 0;\n var n;\n if (isNaN(x)) {\n n = symbols.nan;\n }\n else if (!isFinite(x)) {\n n = symbols.infinity;\n }\n else {\n if (internalSlots.style === 'percent') {\n x *= 100;\n }\n ;\n _b = ComputeExponent(numberFormat, x, {\n getInternalSlots: getInternalSlots,\n }), exponent = _b[0], magnitude = _b[1];\n // Preserve more precision by doing multiplication when exponent is negative.\n x = exponent < 0 ? x * Math.pow(10, -exponent) : x / Math.pow(10, exponent);\n var formatNumberResult = FormatNumericToString(internalSlots, x);\n n = formatNumberResult.formattedString;\n x = formatNumberResult.roundedNumber;\n }\n // Based on https://tc39.es/ecma402/#sec-getnumberformatpattern\n // We need to do this before `x` is rounded.\n var sign;\n var signDisplay = internalSlots.signDisplay;\n switch (signDisplay) {\n case 'never':\n sign = 0;\n break;\n case 'auto':\n if (SameValue(x, 0) || x > 0 || isNaN(x)) {\n sign = 0;\n }\n else {\n sign = -1;\n }\n break;\n case 'always':\n if (SameValue(x, 0) || x > 0 || isNaN(x)) {\n sign = 1;\n }\n else {\n sign = -1;\n }\n break;\n default:\n // x === 0 -> x is 0 or x is -0\n if (x === 0 || isNaN(x)) {\n sign = 0;\n }\n else if (x > 0) {\n sign = 1;\n }\n else {\n sign = -1;\n }\n }\n return formatToParts({ roundedNumber: x, formattedString: n, exponent: exponent, magnitude: magnitude, sign: sign }, internalSlots.dataLocaleData, pl, internalSlots);\n}\n","import { GetNumberOption } from '../GetNumberOption';\nimport { DefaultNumberOption } from '../DefaultNumberOption';\n/**\n * https://tc39.es/ecma402/#sec-setnfdigitoptions\n */\nexport function SetNumberFormatDigitOptions(internalSlots, opts, mnfdDefault, mxfdDefault, notation) {\n var mnid = GetNumberOption(opts, 'minimumIntegerDigits', 1, 21, 1);\n var mnfd = opts.minimumFractionDigits;\n var mxfd = opts.maximumFractionDigits;\n var mnsd = opts.minimumSignificantDigits;\n var mxsd = opts.maximumSignificantDigits;\n internalSlots.minimumIntegerDigits = mnid;\n if (mnsd !== undefined || mxsd !== undefined) {\n internalSlots.roundingType = 'significantDigits';\n mnsd = DefaultNumberOption(mnsd, 1, 21, 1);\n mxsd = DefaultNumberOption(mxsd, mnsd, 21, 21);\n internalSlots.minimumSignificantDigits = mnsd;\n internalSlots.maximumSignificantDigits = mxsd;\n }\n else if (mnfd !== undefined || mxfd !== undefined) {\n internalSlots.roundingType = 'fractionDigits';\n mnfd = DefaultNumberOption(mnfd, 0, 20, mnfdDefault);\n var mxfdActualDefault = Math.max(mnfd, mxfdDefault);\n mxfd = DefaultNumberOption(mxfd, mnfd, 20, mxfdActualDefault);\n internalSlots.minimumFractionDigits = mnfd;\n internalSlots.maximumFractionDigits = mxfd;\n }\n else if (notation === 'compact') {\n internalSlots.roundingType = 'compactRounding';\n }\n else {\n internalSlots.roundingType = 'fractionDigits';\n internalSlots.minimumFractionDigits = mnfdDefault;\n internalSlots.maximumFractionDigits = mxfdDefault;\n }\n}\n","import { GetOption } from '../GetOption';\nimport { IsWellFormedCurrencyCode } from '../IsWellFormedCurrencyCode';\nimport { IsWellFormedUnitIdentifier } from '../IsWellFormedUnitIdentifier';\n/**\n * https://tc39.es/ecma402/#sec-setnumberformatunitoptions\n */\nexport function SetNumberFormatUnitOptions(nf, options, _a) {\n if (options === void 0) { options = Object.create(null); }\n var getInternalSlots = _a.getInternalSlots;\n var internalSlots = getInternalSlots(nf);\n var style = GetOption(options, 'style', 'string', ['decimal', 'percent', 'currency', 'unit'], 'decimal');\n internalSlots.style = style;\n var currency = GetOption(options, 'currency', 'string', undefined, undefined);\n if (currency !== undefined && !IsWellFormedCurrencyCode(currency)) {\n throw RangeError('Malformed currency code');\n }\n if (style === 'currency' && currency === undefined) {\n throw TypeError('currency cannot be undefined');\n }\n var currencyDisplay = GetOption(options, 'currencyDisplay', 'string', ['code', 'symbol', 'narrowSymbol', 'name'], 'symbol');\n var currencySign = GetOption(options, 'currencySign', 'string', ['standard', 'accounting'], 'standard');\n var unit = GetOption(options, 'unit', 'string', undefined, undefined);\n if (unit !== undefined && !IsWellFormedUnitIdentifier(unit)) {\n throw RangeError('Invalid unit argument for Intl.NumberFormat()');\n }\n if (style === 'unit' && unit === undefined) {\n throw TypeError('unit cannot be undefined');\n }\n var unitDisplay = GetOption(options, 'unitDisplay', 'string', ['short', 'narrow', 'long'], 'short');\n if (style === 'currency') {\n internalSlots.currency = currency.toUpperCase();\n internalSlots.currencyDisplay = currencyDisplay;\n internalSlots.currencySign = currencySign;\n }\n if (style === 'unit') {\n internalSlots.unit = unit;\n internalSlots.unitDisplay = unitDisplay;\n }\n}\n","import { repeat } from '../utils';\n/**\n * TODO: dedup with intl-pluralrules and support BigInt\n * https://tc39.es/ecma402/#sec-torawfixed\n * @param x a finite non-negative Number or BigInt\n * @param minFraction and integer between 0 and 20\n * @param maxFraction and integer between 0 and 20\n */\nexport function ToRawFixed(x, minFraction, maxFraction) {\n var f = maxFraction;\n var n = Math.round(x * Math.pow(10, f));\n var xFinal = n / Math.pow(10, f);\n // n is a positive integer, but it is possible to be greater than 1e21.\n // In such case we will go the slow path.\n // See also: https://tc39.es/ecma262/#sec-numeric-types-number-tostring\n var m;\n if (n < 1e21) {\n m = n.toString();\n }\n else {\n m = n.toString();\n var _a = m.split('e'), mantissa = _a[0], exponent = _a[1];\n m = mantissa.replace('.', '');\n m = m + repeat('0', Math.max(+exponent - m.length + 1, 0));\n }\n var int;\n if (f !== 0) {\n var k = m.length;\n if (k <= f) {\n var z = repeat('0', f + 1 - k);\n m = z + m;\n k = f + 1;\n }\n var a = m.slice(0, k - f);\n var b = m.slice(k - f);\n m = \"\".concat(a, \".\").concat(b);\n int = a.length;\n }\n else {\n int = m.length;\n }\n var cut = maxFraction - minFraction;\n while (cut > 0 && m[m.length - 1] === '0') {\n m = m.slice(0, -1);\n cut--;\n }\n if (m[m.length - 1] === '.') {\n m = m.slice(0, -1);\n }\n return { formattedString: m, roundedNumber: xFinal, integerDigitsCount: int };\n}\n","import { repeat, getMagnitude } from '../utils';\nexport function ToRawPrecision(x, minPrecision, maxPrecision) {\n var p = maxPrecision;\n var m;\n var e;\n var xFinal;\n if (x === 0) {\n m = repeat('0', p);\n e = 0;\n xFinal = 0;\n }\n else {\n var xToString = x.toString();\n // If xToString is formatted as scientific notation, the number is either very small or very\n // large. If the precision of the formatted string is lower that requested max precision, we\n // should still infer them from the formatted string, otherwise the formatted result might have\n // precision loss (e.g. 1e41 will not have 0 in every trailing digits).\n var xToStringExponentIndex = xToString.indexOf('e');\n var _a = xToString.split('e'), xToStringMantissa = _a[0], xToStringExponent = _a[1];\n var xToStringMantissaWithoutDecimalPoint = xToStringMantissa.replace('.', '');\n if (xToStringExponentIndex >= 0 &&\n xToStringMantissaWithoutDecimalPoint.length <= p) {\n e = +xToStringExponent;\n m =\n xToStringMantissaWithoutDecimalPoint +\n repeat('0', p - xToStringMantissaWithoutDecimalPoint.length);\n xFinal = x;\n }\n else {\n e = getMagnitude(x);\n var decimalPlaceOffset = e - p + 1;\n // n is the integer containing the required precision digits. To derive the formatted string,\n // we will adjust its decimal place in the logic below.\n var n = Math.round(adjustDecimalPlace(x, decimalPlaceOffset));\n // The rounding caused the change of magnitude, so we should increment `e` by 1.\n if (adjustDecimalPlace(n, p - 1) >= 10) {\n e = e + 1;\n // Divide n by 10 to swallow one precision.\n n = Math.floor(n / 10);\n }\n m = n.toString();\n // Equivalent of n * 10 ** (e - p + 1)\n xFinal = adjustDecimalPlace(n, p - 1 - e);\n }\n }\n var int;\n if (e >= p - 1) {\n m = m + repeat('0', e - p + 1);\n int = e + 1;\n }\n else if (e >= 0) {\n m = \"\".concat(m.slice(0, e + 1), \".\").concat(m.slice(e + 1));\n int = e + 1;\n }\n else {\n m = \"0.\".concat(repeat('0', -e - 1)).concat(m);\n int = 1;\n }\n if (m.indexOf('.') >= 0 && maxPrecision > minPrecision) {\n var cut = maxPrecision - minPrecision;\n while (cut > 0 && m[m.length - 1] === '0') {\n m = m.slice(0, -1);\n cut--;\n }\n if (m[m.length - 1] === '.') {\n m = m.slice(0, -1);\n }\n }\n return { formattedString: m, roundedNumber: xFinal, integerDigitsCount: int };\n // x / (10 ** magnitude), but try to preserve as much floating point precision as possible.\n function adjustDecimalPlace(x, magnitude) {\n return magnitude < 0 ? x * Math.pow(10, -magnitude) : x / Math.pow(10, magnitude);\n }\n}\n","export var digitMapping = { \"adlm\": [\"𞥐\", \"𞥑\", \"𞥒\", \"𞥓\", \"𞥔\", \"𞥕\", \"𞥖\", \"𞥗\", \"𞥘\", \"𞥙\"], \"ahom\": [\"𑜰\", \"𑜱\", \"𑜲\", \"𑜳\", \"𑜴\", \"𑜵\", \"𑜶\", \"𑜷\", \"𑜸\", \"𑜹\"], \"arab\": [\"٠\", \"١\", \"٢\", \"٣\", \"٤\", \"٥\", \"٦\", \"٧\", \"٨\", \"٩\"], \"arabext\": [\"۰\", \"۱\", \"۲\", \"۳\", \"۴\", \"۵\", \"۶\", \"۷\", \"۸\", \"۹\"], \"bali\": [\"᭐\", \"᭑\", \"᭒\", \"᭓\", \"᭔\", \"᭕\", \"᭖\", \"᭗\", \"᭘\", \"᭙\"], \"beng\": [\"০\", \"১\", \"২\", \"৩\", \"৪\", \"৫\", \"৬\", \"৭\", \"৮\", \"৯\"], \"bhks\": [\"𑱐\", \"𑱑\", \"𑱒\", \"𑱓\", \"𑱔\", \"𑱕\", \"𑱖\", \"𑱗\", \"𑱘\", \"𑱙\"], \"brah\": [\"𑁦\", \"𑁧\", \"𑁨\", \"𑁩\", \"𑁪\", \"𑁫\", \"𑁬\", \"𑁭\", \"𑁮\", \"𑁯\"], \"cakm\": [\"𑄶\", \"𑄷\", \"𑄸\", \"𑄹\", \"𑄺\", \"𑄻\", \"𑄼\", \"𑄽\", \"𑄾\", \"𑄿\"], \"cham\": [\"꩐\", \"꩑\", \"꩒\", \"꩓\", \"꩔\", \"꩕\", \"꩖\", \"꩗\", \"꩘\", \"꩙\"], \"deva\": [\"०\", \"१\", \"२\", \"३\", \"४\", \"५\", \"६\", \"७\", \"८\", \"९\"], \"diak\": [\"𑥐\", \"𑥑\", \"𑥒\", \"𑥓\", \"𑥔\", \"𑥕\", \"𑥖\", \"𑥗\", \"𑥘\", \"𑥙\"], \"fullwide\": [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"], \"gong\": [\"𑶠\", \"𑶡\", \"𑶢\", \"𑶣\", \"𑶤\", \"𑶥\", \"𑶦\", \"𑶧\", \"𑶨\", \"𑶩\"], \"gonm\": [\"𑵐\", \"𑵑\", \"𑵒\", \"𑵓\", \"𑵔\", \"𑵕\", \"𑵖\", \"𑵗\", \"𑵘\", \"𑵙\"], \"gujr\": [\"૦\", \"૧\", \"૨\", \"૩\", \"૪\", \"૫\", \"૬\", \"૭\", \"૮\", \"૯\"], \"guru\": [\"੦\", \"੧\", \"੨\", \"੩\", \"੪\", \"੫\", \"੬\", \"੭\", \"੮\", \"੯\"], \"hanidec\": [\"〇\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\", \"七\", \"八\", \"九\"], \"hmng\": [\"𖭐\", \"𖭑\", \"𖭒\", \"𖭓\", \"𖭔\", \"𖭕\", \"𖭖\", \"𖭗\", \"𖭘\", \"𖭙\"], \"hmnp\": [\"𞅀\", \"𞅁\", \"𞅂\", \"𞅃\", \"𞅄\", \"𞅅\", \"𞅆\", \"𞅇\", \"𞅈\", \"𞅉\"], \"java\": [\"꧐\", \"꧑\", \"꧒\", \"꧓\", \"꧔\", \"꧕\", \"꧖\", \"꧗\", \"꧘\", \"꧙\"], \"kali\": [\"꤀\", \"꤁\", \"꤂\", \"꤃\", \"꤄\", \"꤅\", \"꤆\", \"꤇\", \"꤈\", \"꤉\"], \"khmr\": [\"០\", \"១\", \"២\", \"៣\", \"៤\", \"៥\", \"៦\", \"៧\", \"៨\", \"៩\"], \"knda\": [\"೦\", \"೧\", \"೨\", \"೩\", \"೪\", \"೫\", \"೬\", \"೭\", \"೮\", \"೯\"], \"lana\": [\"᪀\", \"᪁\", \"᪂\", \"᪃\", \"᪄\", \"᪅\", \"᪆\", \"᪇\", \"᪈\", \"᪉\"], \"lanatham\": [\"᪐\", \"᪑\", \"᪒\", \"᪓\", \"᪔\", \"᪕\", \"᪖\", \"᪗\", \"᪘\", \"᪙\"], \"laoo\": [\"໐\", \"໑\", \"໒\", \"໓\", \"໔\", \"໕\", \"໖\", \"໗\", \"໘\", \"໙\"], \"lepc\": [\"᪐\", \"᪑\", \"᪒\", \"᪓\", \"᪔\", \"᪕\", \"᪖\", \"᪗\", \"᪘\", \"᪙\"], \"limb\": [\"᥆\", \"᥇\", \"᥈\", \"᥉\", \"᥊\", \"᥋\", \"᥌\", \"᥍\", \"᥎\", \"᥏\"], \"mathbold\": [\"𝟎\", \"𝟏\", \"𝟐\", \"𝟑\", \"𝟒\", \"𝟓\", \"𝟔\", \"𝟕\", \"𝟖\", \"𝟗\"], \"mathdbl\": [\"𝟘\", \"𝟙\", \"𝟚\", \"𝟛\", \"𝟜\", \"𝟝\", \"𝟞\", \"𝟟\", \"𝟠\", \"𝟡\"], \"mathmono\": [\"𝟶\", \"𝟷\", \"𝟸\", \"𝟹\", \"𝟺\", \"𝟻\", \"𝟼\", \"𝟽\", \"𝟾\", \"𝟿\"], \"mathsanb\": [\"𝟬\", \"𝟭\", \"𝟮\", \"𝟯\", \"𝟰\", \"𝟱\", \"𝟲\", \"𝟳\", \"𝟴\", \"𝟵\"], \"mathsans\": [\"𝟢\", \"𝟣\", \"𝟤\", \"𝟥\", \"𝟦\", \"𝟧\", \"𝟨\", \"𝟩\", \"𝟪\", \"𝟫\"], \"mlym\": [\"൦\", \"൧\", \"൨\", \"൩\", \"൪\", \"൫\", \"൬\", \"൭\", \"൮\", \"൯\"], \"modi\": [\"𑙐\", \"𑙑\", \"𑙒\", \"𑙓\", \"𑙔\", \"𑙕\", \"𑙖\", \"𑙗\", \"𑙘\", \"𑙙\"], \"mong\": [\"᠐\", \"᠑\", \"᠒\", \"᠓\", \"᠔\", \"᠕\", \"᠖\", \"᠗\", \"᠘\", \"᠙\"], \"mroo\": [\"𖩠\", \"𖩡\", \"𖩢\", \"𖩣\", \"𖩤\", \"𖩥\", \"𖩦\", \"𖩧\", \"𖩨\", \"𖩩\"], \"mtei\": [\"꯰\", \"꯱\", \"꯲\", \"꯳\", \"꯴\", \"꯵\", \"꯶\", \"꯷\", \"꯸\", \"꯹\"], \"mymr\": [\"၀\", \"၁\", \"၂\", \"၃\", \"၄\", \"၅\", \"၆\", \"၇\", \"၈\", \"၉\"], \"mymrshan\": [\"႐\", \"႑\", \"႒\", \"႓\", \"႔\", \"႕\", \"႖\", \"႗\", \"႘\", \"႙\"], \"mymrtlng\": [\"꧰\", \"꧱\", \"꧲\", \"꧳\", \"꧴\", \"꧵\", \"꧶\", \"꧷\", \"꧸\", \"꧹\"], \"newa\": [\"𑑐\", \"𑑑\", \"𑑒\", \"𑑓\", \"𑑔\", \"𑑕\", \"𑑖\", \"𑑗\", \"𑑘\", \"𑑙\"], \"nkoo\": [\"߀\", \"߁\", \"߂\", \"߃\", \"߄\", \"߅\", \"߆\", \"߇\", \"߈\", \"߉\"], \"olck\": [\"᱐\", \"᱑\", \"᱒\", \"᱓\", \"᱔\", \"᱕\", \"᱖\", \"᱗\", \"᱘\", \"᱙\"], \"orya\": [\"୦\", \"୧\", \"୨\", \"୩\", \"୪\", \"୫\", \"୬\", \"୭\", \"୮\", \"୯\"], \"osma\": [\"𐒠\", \"𐒡\", \"𐒢\", \"𐒣\", \"𐒤\", \"𐒥\", \"𐒦\", \"𐒧\", \"𐒨\", \"𐒩\"], \"rohg\": [\"𐴰\", \"𐴱\", \"𐴲\", \"𐴳\", \"𐴴\", \"𐴵\", \"𐴶\", \"𐴷\", \"𐴸\", \"𐴹\"], \"saur\": [\"꣐\", \"꣑\", \"꣒\", \"꣓\", \"꣔\", \"꣕\", \"꣖\", \"꣗\", \"꣘\", \"꣙\"], \"segment\": [\"🯰\", \"🯱\", \"🯲\", \"🯳\", \"🯴\", \"🯵\", \"🯶\", \"🯷\", \"🯸\", \"🯹\"], \"shrd\": [\"𑇐\", \"𑇑\", \"𑇒\", \"𑇓\", \"𑇔\", \"𑇕\", \"𑇖\", \"𑇗\", \"𑇘\", \"𑇙\"], \"sind\": [\"𑋰\", \"𑋱\", \"𑋲\", \"𑋳\", \"𑋴\", \"𑋵\", \"𑋶\", \"𑋷\", \"𑋸\", \"𑋹\"], \"sinh\": [\"෦\", \"෧\", \"෨\", \"෩\", \"෪\", \"෫\", \"෬\", \"෭\", \"෮\", \"෯\"], \"sora\": [\"𑃰\", \"𑃱\", \"𑃲\", \"𑃳\", \"𑃴\", \"𑃵\", \"𑃶\", \"𑃷\", \"𑃸\", \"𑃹\"], \"sund\": [\"᮰\", \"᮱\", \"᮲\", \"᮳\", \"᮴\", \"᮵\", \"᮶\", \"᮷\", \"᮸\", \"᮹\"], \"takr\": [\"𑛀\", \"𑛁\", \"𑛂\", \"𑛃\", \"𑛄\", \"𑛅\", \"𑛆\", \"𑛇\", \"𑛈\", \"𑛉\"], \"talu\": [\"᧐\", \"᧑\", \"᧒\", \"᧓\", \"᧔\", \"᧕\", \"᧖\", \"᧗\", \"᧘\", \"᧙\"], \"tamldec\": [\"௦\", \"௧\", \"௨\", \"௩\", \"௪\", \"௫\", \"௬\", \"௭\", \"௮\", \"௯\"], \"telu\": [\"౦\", \"౧\", \"౨\", \"౩\", \"౪\", \"౫\", \"౬\", \"౭\", \"౮\", \"౯\"], \"thai\": [\"๐\", \"๑\", \"๒\", \"๓\", \"๔\", \"๕\", \"๖\", \"๗\", \"๘\", \"๙\"], \"tibt\": [\"༠\", \"༡\", \"༢\", \"༣\", \"༤\", \"༥\", \"༦\", \"༧\", \"༨\", \"༩\"], \"tirh\": [\"𑓐\", \"𑓑\", \"𑓒\", \"𑓓\", \"𑓔\", \"𑓕\", \"𑓖\", \"𑓗\", \"𑓘\", \"𑓙\"], \"vaii\": [\"ᘠ\", \"ᘡ\", \"ᘢ\", \"ᘣ\", \"ᘤ\", \"ᘥ\", \"ᘦ\", \"ᘧ\", \"ᘨ\", \"ᘩ\"], \"wara\": [\"𑣠\", \"𑣡\", \"𑣢\", \"𑣣\", \"𑣤\", \"𑣥\", \"𑣦\", \"𑣧\", \"𑣨\", \"𑣩\"], \"wcho\": [\"𞋰\", \"𞋱\", \"𞋲\", \"𞋳\", \"𞋴\", \"𞋵\", \"𞋶\", \"𞋷\", \"𞋸\", \"𞋹\"] };\n","import { ToRawFixed } from './ToRawFixed';\nimport { digitMapping } from './digit-mapping.generated';\nimport { S_UNICODE_REGEX } from '../regex.generated';\n// This is from: unicode-12.1.0/General_Category/Symbol/regex.js\n// IE11 does not support unicode flag, otherwise this is just /\\p{S}/u.\n// /^\\p{S}/u\nvar CARET_S_UNICODE_REGEX = new RegExp(\"^\".concat(S_UNICODE_REGEX.source));\n// /\\p{S}$/u\nvar S_DOLLAR_UNICODE_REGEX = new RegExp(\"\".concat(S_UNICODE_REGEX.source, \"$\"));\nvar CLDR_NUMBER_PATTERN = /[#0](?:[\\.,][#0]+)*/g;\nexport default function formatToParts(numberResult, data, pl, options) {\n var sign = numberResult.sign, exponent = numberResult.exponent, magnitude = numberResult.magnitude;\n var notation = options.notation, style = options.style, numberingSystem = options.numberingSystem;\n var defaultNumberingSystem = data.numbers.nu[0];\n // #region Part 1: partition and interpolate the CLDR number pattern.\n // ----------------------------------------------------------\n var compactNumberPattern = null;\n if (notation === 'compact' && magnitude) {\n compactNumberPattern = getCompactDisplayPattern(numberResult, pl, data, style, options.compactDisplay, options.currencyDisplay, numberingSystem);\n }\n // This is used multiple times\n var nonNameCurrencyPart;\n if (style === 'currency' && options.currencyDisplay !== 'name') {\n var byCurrencyDisplay = data.currencies[options.currency];\n if (byCurrencyDisplay) {\n switch (options.currencyDisplay) {\n case 'code':\n nonNameCurrencyPart = options.currency;\n break;\n case 'symbol':\n nonNameCurrencyPart = byCurrencyDisplay.symbol;\n break;\n default:\n nonNameCurrencyPart = byCurrencyDisplay.narrow;\n break;\n }\n }\n else {\n // Fallback for unknown currency\n nonNameCurrencyPart = options.currency;\n }\n }\n var numberPattern;\n if (!compactNumberPattern) {\n // Note: if the style is unit, or is currency and the currency display is name,\n // its unit parts will be interpolated in part 2. So here we can fallback to decimal.\n if (style === 'decimal' ||\n style === 'unit' ||\n (style === 'currency' && options.currencyDisplay === 'name')) {\n // Shortcut for decimal\n var decimalData = data.numbers.decimal[numberingSystem] ||\n data.numbers.decimal[defaultNumberingSystem];\n numberPattern = getPatternForSign(decimalData.standard, sign);\n }\n else if (style === 'currency') {\n var currencyData = data.numbers.currency[numberingSystem] ||\n data.numbers.currency[defaultNumberingSystem];\n // We replace number pattern part with `0` for easier postprocessing.\n numberPattern = getPatternForSign(currencyData[options.currencySign], sign);\n }\n else {\n // percent\n var percentPattern = data.numbers.percent[numberingSystem] ||\n data.numbers.percent[defaultNumberingSystem];\n numberPattern = getPatternForSign(percentPattern, sign);\n }\n }\n else {\n numberPattern = compactNumberPattern;\n }\n // Extract the decimal number pattern string. It looks like \"#,##0,00\", which will later be\n // used to infer decimal group sizes.\n var decimalNumberPattern = CLDR_NUMBER_PATTERN.exec(numberPattern)[0];\n // Now we start to substitute patterns\n // 1. replace strings like `0` and `#,##0.00` with `{0}`\n // 2. unquote characters (invariant: the quoted characters does not contain the special tokens)\n numberPattern = numberPattern\n .replace(CLDR_NUMBER_PATTERN, '{0}')\n .replace(/'(.)'/g, '$1');\n // Handle currency spacing (both compact and non-compact).\n if (style === 'currency' && options.currencyDisplay !== 'name') {\n var currencyData = data.numbers.currency[numberingSystem] ||\n data.numbers.currency[defaultNumberingSystem];\n // See `currencySpacing` substitution rule in TR-35.\n // Here we always assume the currencyMatch is \"[:^S:]\" and surroundingMatch is \"[:digit:]\".\n //\n // Example 1: for pattern \"#,##0.00¤\" with symbol \"US$\", we replace \"¤\" with the symbol,\n // but insert an extra non-break space before the symbol, because \"[:^S:]\" matches \"U\" in\n // \"US$\" and \"[:digit:]\" matches the latn numbering system digits.\n //\n // Example 2: for pattern \"¤#,##0.00\" with symbol \"US$\", there is no spacing between symbol\n // and number, because `$` does not match \"[:^S:]\".\n //\n // Implementation note: here we do the best effort to infer the insertion.\n // We also assume that `beforeInsertBetween` and `afterInsertBetween` will never be `;`.\n var afterCurrency = currencyData.currencySpacing.afterInsertBetween;\n if (afterCurrency && !S_DOLLAR_UNICODE_REGEX.test(nonNameCurrencyPart)) {\n numberPattern = numberPattern.replace('¤{0}', \"\\u00A4\".concat(afterCurrency, \"{0}\"));\n }\n var beforeCurrency = currencyData.currencySpacing.beforeInsertBetween;\n if (beforeCurrency && !CARET_S_UNICODE_REGEX.test(nonNameCurrencyPart)) {\n numberPattern = numberPattern.replace('{0}¤', \"{0}\".concat(beforeCurrency, \"\\u00A4\"));\n }\n }\n // The following tokens are special: `{0}`, `¤`, `%`, `-`, `+`, `{c:...}.\n var numberPatternParts = numberPattern.split(/({c:[^}]+}|\\{0\\}|[¤%\\-\\+])/g);\n var numberParts = [];\n var symbols = data.numbers.symbols[numberingSystem] ||\n data.numbers.symbols[defaultNumberingSystem];\n for (var _i = 0, numberPatternParts_1 = numberPatternParts; _i < numberPatternParts_1.length; _i++) {\n var part = numberPatternParts_1[_i];\n if (!part) {\n continue;\n }\n switch (part) {\n case '{0}': {\n // We only need to handle scientific and engineering notation here.\n numberParts.push.apply(numberParts, paritionNumberIntoParts(symbols, numberResult, notation, exponent, numberingSystem, \n // If compact number pattern exists, do not insert group separators.\n !compactNumberPattern && options.useGrouping, decimalNumberPattern));\n break;\n }\n case '-':\n numberParts.push({ type: 'minusSign', value: symbols.minusSign });\n break;\n case '+':\n numberParts.push({ type: 'plusSign', value: symbols.plusSign });\n break;\n case '%':\n numberParts.push({ type: 'percentSign', value: symbols.percentSign });\n break;\n case '¤':\n // Computed above when handling currency spacing.\n numberParts.push({ type: 'currency', value: nonNameCurrencyPart });\n break;\n default:\n if (/^\\{c:/.test(part)) {\n numberParts.push({\n type: 'compact',\n value: part.substring(3, part.length - 1),\n });\n }\n else {\n // literal\n numberParts.push({ type: 'literal', value: part });\n }\n break;\n }\n }\n // #endregion\n // #region Part 2: interpolate unit pattern if necessary.\n // ----------------------------------------------\n switch (style) {\n case 'currency': {\n // `currencyDisplay: 'name'` has similar pattern handling as units.\n if (options.currencyDisplay === 'name') {\n var unitPattern = (data.numbers.currency[numberingSystem] ||\n data.numbers.currency[defaultNumberingSystem]).unitPattern;\n // Select plural\n var unitName = void 0;\n var currencyNameData = data.currencies[options.currency];\n if (currencyNameData) {\n unitName = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), currencyNameData.displayName);\n }\n else {\n // Fallback for unknown currency\n unitName = options.currency;\n }\n // Do {0} and {1} substitution\n var unitPatternParts = unitPattern.split(/(\\{[01]\\})/g);\n var result = [];\n for (var _a = 0, unitPatternParts_1 = unitPatternParts; _a < unitPatternParts_1.length; _a++) {\n var part = unitPatternParts_1[_a];\n switch (part) {\n case '{0}':\n result.push.apply(result, numberParts);\n break;\n case '{1}':\n result.push({ type: 'currency', value: unitName });\n break;\n default:\n if (part) {\n result.push({ type: 'literal', value: part });\n }\n break;\n }\n }\n return result;\n }\n else {\n return numberParts;\n }\n }\n case 'unit': {\n var unit = options.unit, unitDisplay = options.unitDisplay;\n var unitData = data.units.simple[unit];\n var unitPattern = void 0;\n if (unitData) {\n // Simple unit pattern\n unitPattern = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), data.units.simple[unit][unitDisplay]);\n }\n else {\n // See: http://unicode.org/reports/tr35/tr35-general.html#perUnitPatterns\n // If cannot find unit in the simple pattern, it must be \"per\" compound pattern.\n // Implementation note: we are not following TR-35 here because we need to format to parts!\n var _b = unit.split('-per-'), numeratorUnit = _b[0], denominatorUnit = _b[1];\n unitData = data.units.simple[numeratorUnit];\n var numeratorUnitPattern = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), data.units.simple[numeratorUnit][unitDisplay]);\n var perUnitPattern = data.units.simple[denominatorUnit].perUnit[unitDisplay];\n if (perUnitPattern) {\n // perUnitPattern exists, combine it with numeratorUnitPattern\n unitPattern = perUnitPattern.replace('{0}', numeratorUnitPattern);\n }\n else {\n // get compoundUnit pattern (e.g. \"{0} per {1}\"), repalce {0} with numerator pattern and {1} with\n // the denominator pattern in singular form.\n var perPattern = data.units.compound.per[unitDisplay];\n var denominatorPattern = selectPlural(pl, 1, data.units.simple[denominatorUnit][unitDisplay]);\n unitPattern = unitPattern = perPattern\n .replace('{0}', numeratorUnitPattern)\n .replace('{1}', denominatorPattern.replace('{0}', ''));\n }\n }\n var result = [];\n // We need spacing around \"{0}\" because they are not treated as \"unit\" parts, but \"literal\".\n for (var _c = 0, _d = unitPattern.split(/(\\s*\\{0\\}\\s*)/); _c < _d.length; _c++) {\n var part = _d[_c];\n var interpolateMatch = /^(\\s*)\\{0\\}(\\s*)$/.exec(part);\n if (interpolateMatch) {\n // Space before \"{0}\"\n if (interpolateMatch[1]) {\n result.push({ type: 'literal', value: interpolateMatch[1] });\n }\n // \"{0}\" itself\n result.push.apply(result, numberParts);\n // Space after \"{0}\"\n if (interpolateMatch[2]) {\n result.push({ type: 'literal', value: interpolateMatch[2] });\n }\n }\n else if (part) {\n result.push({ type: 'unit', value: part });\n }\n }\n return result;\n }\n default:\n return numberParts;\n }\n // #endregion\n}\n// A subset of https://tc39.es/ecma402/#sec-partitionnotationsubpattern\n// Plus the exponent parts handling.\nfunction paritionNumberIntoParts(symbols, numberResult, notation, exponent, numberingSystem, useGrouping, \n/**\n * This is the decimal number pattern without signs or symbols.\n * It is used to infer the group size when `useGrouping` is true.\n *\n * A typical value looks like \"#,##0.00\" (primary group size is 3).\n * Some locales like Hindi has secondary group size of 2 (e.g. \"#,##,##0.00\").\n */\ndecimalNumberPattern) {\n var result = [];\n // eslint-disable-next-line prefer-const\n var n = numberResult.formattedString, x = numberResult.roundedNumber;\n if (isNaN(x)) {\n return [{ type: 'nan', value: n }];\n }\n else if (!isFinite(x)) {\n return [{ type: 'infinity', value: n }];\n }\n var digitReplacementTable = digitMapping[numberingSystem];\n if (digitReplacementTable) {\n n = n.replace(/\\d/g, function (digit) { return digitReplacementTable[+digit] || digit; });\n }\n // TODO: Else use an implementation dependent algorithm to map n to the appropriate\n // representation of n in the given numbering system.\n var decimalSepIndex = n.indexOf('.');\n var integer;\n var fraction;\n if (decimalSepIndex > 0) {\n integer = n.slice(0, decimalSepIndex);\n fraction = n.slice(decimalSepIndex + 1);\n }\n else {\n integer = n;\n }\n // #region Grouping integer digits\n // The weird compact and x >= 10000 check is to ensure consistency with Node.js and Chrome.\n // Note that `de` does not have compact form for thousands, but Node.js does not insert grouping separator\n // unless the rounded number is greater than 10000:\n // NumberFormat('de', {notation: 'compact', compactDisplay: 'short'}).format(1234) //=> \"1234\"\n // NumberFormat('de').format(1234) //=> \"1.234\"\n if (useGrouping && (notation !== 'compact' || x >= 10000)) {\n var groupSepSymbol = symbols.group;\n var groups = [];\n // > There may be two different grouping sizes: The primary grouping size used for the least\n // > significant integer group, and the secondary grouping size used for more significant groups.\n // > If a pattern contains multiple grouping separators, the interval between the last one and the\n // > end of the integer defines the primary grouping size, and the interval between the last two\n // > defines the secondary grouping size. All others are ignored.\n var integerNumberPattern = decimalNumberPattern.split('.')[0];\n var patternGroups = integerNumberPattern.split(',');\n var primaryGroupingSize = 3;\n var secondaryGroupingSize = 3;\n if (patternGroups.length > 1) {\n primaryGroupingSize = patternGroups[patternGroups.length - 1].length;\n }\n if (patternGroups.length > 2) {\n secondaryGroupingSize = patternGroups[patternGroups.length - 2].length;\n }\n var i = integer.length - primaryGroupingSize;\n if (i > 0) {\n // Slice the least significant integer group\n groups.push(integer.slice(i, i + primaryGroupingSize));\n // Then iteratively push the more signicant groups\n // TODO: handle surrogate pairs in some numbering system digits\n for (i -= secondaryGroupingSize; i > 0; i -= secondaryGroupingSize) {\n groups.push(integer.slice(i, i + secondaryGroupingSize));\n }\n groups.push(integer.slice(0, i + secondaryGroupingSize));\n }\n else {\n groups.push(integer);\n }\n while (groups.length > 0) {\n var integerGroup = groups.pop();\n result.push({ type: 'integer', value: integerGroup });\n if (groups.length > 0) {\n result.push({ type: 'group', value: groupSepSymbol });\n }\n }\n }\n else {\n result.push({ type: 'integer', value: integer });\n }\n // #endregion\n if (fraction !== undefined) {\n result.push({ type: 'decimal', value: symbols.decimal }, { type: 'fraction', value: fraction });\n }\n if ((notation === 'scientific' || notation === 'engineering') &&\n isFinite(x)) {\n result.push({ type: 'exponentSeparator', value: symbols.exponential });\n if (exponent < 0) {\n result.push({ type: 'exponentMinusSign', value: symbols.minusSign });\n exponent = -exponent;\n }\n var exponentResult = ToRawFixed(exponent, 0, 0);\n result.push({\n type: 'exponentInteger',\n value: exponentResult.formattedString,\n });\n }\n return result;\n}\nfunction getPatternForSign(pattern, sign) {\n if (pattern.indexOf(';') < 0) {\n pattern = \"\".concat(pattern, \";-\").concat(pattern);\n }\n var _a = pattern.split(';'), zeroPattern = _a[0], negativePattern = _a[1];\n switch (sign) {\n case 0:\n return zeroPattern;\n case -1:\n return negativePattern;\n default:\n return negativePattern.indexOf('-') >= 0\n ? negativePattern.replace(/-/g, '+')\n : \"+\".concat(zeroPattern);\n }\n}\n// Find the CLDR pattern for compact notation based on the magnitude of data and style.\n//\n// Example return value: \"¤ {c:laki}000;¤{c:laki} -0\" (`sw` locale):\n// - Notice the `{c:...}` token that wraps the compact literal.\n// - The consecutive zeros are normalized to single zero to match CLDR_NUMBER_PATTERN.\n//\n// Returning null means the compact display pattern cannot be found.\nfunction getCompactDisplayPattern(numberResult, pl, data, style, compactDisplay, currencyDisplay, numberingSystem) {\n var _a;\n var roundedNumber = numberResult.roundedNumber, sign = numberResult.sign, magnitude = numberResult.magnitude;\n var magnitudeKey = String(Math.pow(10, magnitude));\n var defaultNumberingSystem = data.numbers.nu[0];\n var pattern;\n if (style === 'currency' && currencyDisplay !== 'name') {\n var byNumberingSystem = data.numbers.currency;\n var currencyData = byNumberingSystem[numberingSystem] ||\n byNumberingSystem[defaultNumberingSystem];\n // NOTE: compact notation ignores currencySign!\n var compactPluralRules = (_a = currencyData.short) === null || _a === void 0 ? void 0 : _a[magnitudeKey];\n if (!compactPluralRules) {\n return null;\n }\n pattern = selectPlural(pl, roundedNumber, compactPluralRules);\n }\n else {\n var byNumberingSystem = data.numbers.decimal;\n var byCompactDisplay = byNumberingSystem[numberingSystem] ||\n byNumberingSystem[defaultNumberingSystem];\n var compactPlaralRule = byCompactDisplay[compactDisplay][magnitudeKey];\n if (!compactPlaralRule) {\n return null;\n }\n pattern = selectPlural(pl, roundedNumber, compactPlaralRule);\n }\n // See https://unicode.org/reports/tr35/tr35-numbers.html#Compact_Number_Formats\n // > If the value is precisely “0”, either explicit or defaulted, then the normal number format\n // > pattern for that sort of object is supplied.\n if (pattern === '0') {\n return null;\n }\n pattern = getPatternForSign(pattern, sign)\n // Extract compact literal from the pattern\n .replace(/([^\\s;\\-\\+\\d¤]+)/g, '{c:$1}')\n // We replace one or more zeros with a single zero so it matches `CLDR_NUMBER_PATTERN`.\n .replace(/0+/, '0');\n return pattern;\n}\nfunction selectPlural(pl, x, rules) {\n return rules[pl.select(x)] || rules.other;\n}\n","import { invariant } from './utils';\n/**\n * https://tc39.es/ecma402/#sec-partitionpattern\n * @param pattern\n */\nexport function PartitionPattern(pattern) {\n var result = [];\n var beginIndex = pattern.indexOf('{');\n var endIndex = 0;\n var nextIndex = 0;\n var length = pattern.length;\n while (beginIndex < pattern.length && beginIndex > -1) {\n endIndex = pattern.indexOf('}', beginIndex);\n invariant(endIndex > beginIndex, \"Invalid pattern \".concat(pattern));\n if (beginIndex > nextIndex) {\n result.push({\n type: 'literal',\n value: pattern.substring(nextIndex, beginIndex),\n });\n }\n result.push({\n type: pattern.substring(beginIndex + 1, endIndex),\n value: undefined,\n });\n nextIndex = endIndex + 1;\n beginIndex = pattern.indexOf('{', nextIndex);\n }\n if (nextIndex < length) {\n result.push({\n type: 'literal',\n value: pattern.substring(nextIndex, length),\n });\n }\n return result;\n}\n","import { ToObject } from './262';\nimport { GetOption } from './GetOption';\nimport { LookupSupportedLocales } from '@formatjs/intl-localematcher';\n/**\n * https://tc39.es/ecma402/#sec-supportedlocales\n * @param availableLocales\n * @param requestedLocales\n * @param options\n */\nexport function SupportedLocales(availableLocales, requestedLocales, options) {\n var matcher = 'best fit';\n if (options !== undefined) {\n options = ToObject(options);\n matcher = GetOption(options, 'localeMatcher', 'string', ['lookup', 'best fit'], 'best fit');\n }\n if (matcher === 'best fit') {\n return LookupSupportedLocales(availableLocales, requestedLocales);\n }\n return LookupSupportedLocales(availableLocales, requestedLocales);\n}\n","import { __extends } from \"tslib\";\nvar MissingLocaleDataError = /** @class */ (function (_super) {\n __extends(MissingLocaleDataError, _super);\n function MissingLocaleDataError() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'MISSING_LOCALE_DATA';\n return _this;\n }\n return MissingLocaleDataError;\n}(Error));\nexport function isMissingLocaleDataError(e) {\n return e.type === 'MISSING_LOCALE_DATA';\n}\n","// @generated from regex-gen.ts\nexport var S_UNICODE_REGEX = /[\\$\\+<->\\^`\\|~\\xA2-\\xA6\\xA8\\xA9\\xAC\\xAE-\\xB1\\xB4\\xB8\\xD7\\xF7\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0384\\u0385\\u03F6\\u0482\\u058D-\\u058F\\u0606-\\u0608\\u060B\\u060E\\u060F\\u06DE\\u06E9\\u06FD\\u06FE\\u07F6\\u07FE\\u07FF\\u09F2\\u09F3\\u09FA\\u09FB\\u0AF1\\u0B70\\u0BF3-\\u0BFA\\u0C7F\\u0D4F\\u0D79\\u0E3F\\u0F01-\\u0F03\\u0F13\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F34\\u0F36\\u0F38\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE\\u0FCF\\u0FD5-\\u0FD8\\u109E\\u109F\\u1390-\\u1399\\u166D\\u17DB\\u1940\\u19DE-\\u19FF\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD\\u1FFE\\u2044\\u2052\\u207A-\\u207C\\u208A-\\u208C\\u20A0-\\u20BF\\u2100\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u214F\\u218A\\u218B\\u2190-\\u2307\\u230C-\\u2328\\u232B-\\u2426\\u2440-\\u244A\\u249C-\\u24E9\\u2500-\\u2767\\u2794-\\u27C4\\u27C7-\\u27E5\\u27F0-\\u2982\\u2999-\\u29D7\\u29DC-\\u29FB\\u29FE-\\u2B73\\u2B76-\\u2B95\\u2B97-\\u2BFF\\u2CE5-\\u2CEA\\u2E50\\u2E51\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3004\\u3012\\u3013\\u3020\\u3036\\u3037\\u303E\\u303F\\u309B\\u309C\\u3190\\u3191\\u3196-\\u319F\\u31C0-\\u31E3\\u3200-\\u321E\\u322A-\\u3247\\u3250\\u3260-\\u327F\\u328A-\\u32B0\\u32C0-\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA700-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uA828-\\uA82B\\uA836-\\uA839\\uAA77-\\uAA79\\uAB5B\\uAB6A\\uAB6B\\uFB29\\uFBB2-\\uFBC1\\uFDFC\\u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DC90-\\uDCAD\\uDCB0\\uDCB1\\uDD00-\\uDD78\\uDD7A-\\uDDCB\\uDDCD-\\uDE53\\uDE60-\\uDE6D\\uDE70-\\uDE74\\uDE78-\\uDE7A\\uDE80-\\uDE86\\uDE90-\\uDEA8\\uDEB0-\\uDEB6\\uDEC0-\\uDEC2\\uDED0-\\uDED6\\uDF00-\\uDF92\\uDF94-\\uDFCA]/;\n","export var RangePatternType;\n(function (RangePatternType) {\n RangePatternType[\"startRange\"] = \"startRange\";\n RangePatternType[\"shared\"] = \"shared\";\n RangePatternType[\"endRange\"] = \"endRange\";\n})(RangePatternType || (RangePatternType = {}));\n","/**\n * Cannot do Math.log(x) / Math.log(10) bc if IEEE floating point issue\n * @param x number\n */\nexport function getMagnitude(x) {\n // Cannot count string length via Number.toString because it may use scientific notation\n // for very small or very large numbers.\n return Math.floor(Math.log(x) * Math.LOG10E);\n}\nexport function repeat(s, times) {\n if (typeof s.repeat === 'function') {\n return s.repeat(times);\n }\n var arr = new Array(times);\n for (var i = 0; i < arr.length; i++) {\n arr[i] = s;\n }\n return arr.join('');\n}\nexport function setInternalSlot(map, pl, field, value) {\n if (!map.get(pl)) {\n map.set(pl, Object.create(null));\n }\n var slots = map.get(pl);\n slots[field] = value;\n}\nexport function setMultiInternalSlots(map, pl, props) {\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\n var k = _a[_i];\n setInternalSlot(map, pl, k, props[k]);\n }\n}\nexport function getInternalSlot(map, pl, field) {\n return getMultiInternalSlots(map, pl, field)[field];\n}\nexport function getMultiInternalSlots(map, pl) {\n var fields = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n fields[_i - 2] = arguments[_i];\n }\n var slots = map.get(pl);\n if (!slots) {\n throw new TypeError(\"\".concat(pl, \" InternalSlot has not been initialized\"));\n }\n return fields.reduce(function (all, f) {\n all[f] = slots[f];\n return all;\n }, Object.create(null));\n}\nexport function isLiteralPart(patternPart) {\n return patternPart.type === 'literal';\n}\n/*\n 17 ECMAScript Standard Built-in Objects:\n Every built-in Function object, including constructors, that is not\n identified as an anonymous function has a name property whose value\n is a String.\n\n Unless otherwise specified, the name property of a built-in Function\n object, if it exists, has the attributes { [[Writable]]: false,\n [[Enumerable]]: false, [[Configurable]]: true }.\n*/\nexport function defineProperty(target, name, _a) {\n var value = _a.value;\n Object.defineProperty(target, name, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: value,\n });\n}\nexport var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;\nexport function invariant(condition, message, Err) {\n if (Err === void 0) { Err = Error; }\n if (!condition) {\n throw new Err(message);\n }\n}\n","//\n// Main\n//\nexport default function memoize(fn, options) {\n var cache = options && options.cache ? options.cache : cacheDefault;\n var serializer = options && options.serializer ? options.serializer : serializerDefault;\n var strategy = options && options.strategy ? options.strategy : strategyDefault;\n return strategy(fn, {\n cache: cache,\n serializer: serializer,\n });\n}\n//\n// Strategy\n//\nfunction isPrimitive(value) {\n return (value == null || typeof value === 'number' || typeof value === 'boolean'); // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\nfunction monadic(fn, cache, serializer, arg) {\n var cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.call(this, arg);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n var args = Array.prototype.slice.call(arguments, 3);\n var cacheKey = serializer(args);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.apply(this, args);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n return strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n var strategy = fn.length === 1 ? monadic : variadic;\n return assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n return assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n return assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\n//\n// Serializer\n//\nvar serializerDefault = function () {\n return JSON.stringify(arguments);\n};\n//\n// Cache\n//\nfunction ObjectWithoutPrototypeCache() {\n this.cache = Object.create(null);\n}\nObjectWithoutPrototypeCache.prototype.get = function (key) {\n return this.cache[key];\n};\nObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n this.cache[key] = value;\n};\nvar cacheDefault = {\n create: function create() {\n // @ts-ignore\n return new ObjectWithoutPrototypeCache();\n },\n};\nexport var strategies = {\n variadic: strategyVariadic,\n monadic: strategyMonadic,\n};\n","import { timeData } from './time-data.generated';\n/**\n * Returns the best matching date time pattern if a date time skeleton\n * pattern is provided with a locale. Follows the Unicode specification:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns\n * @param skeleton date time skeleton pattern that possibly includes j, J or C\n * @param locale\n */\nexport function getBestPattern(skeleton, locale) {\n var skeletonCopy = '';\n for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {\n var patternChar = skeleton.charAt(patternPos);\n if (patternChar === 'j') {\n var extraLength = 0;\n while (patternPos + 1 < skeleton.length &&\n skeleton.charAt(patternPos + 1) === patternChar) {\n extraLength++;\n patternPos++;\n }\n var hourLen = 1 + (extraLength & 1);\n var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);\n var dayPeriodChar = 'a';\n var hourChar = getDefaultHourSymbolFromLocale(locale);\n if (hourChar == 'H' || hourChar == 'k') {\n dayPeriodLen = 0;\n }\n while (dayPeriodLen-- > 0) {\n skeletonCopy += dayPeriodChar;\n }\n while (hourLen-- > 0) {\n skeletonCopy = hourChar + skeletonCopy;\n }\n }\n else if (patternChar === 'J') {\n skeletonCopy += 'H';\n }\n else {\n skeletonCopy += patternChar;\n }\n }\n return skeletonCopy;\n}\n/**\n * Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)\n * of the given `locale` to the corresponding time pattern.\n * @param locale\n */\nfunction getDefaultHourSymbolFromLocale(locale) {\n var hourCycle = locale.hourCycle;\n if (hourCycle === undefined &&\n // @ts-ignore hourCycle(s) is not identified yet\n locale.hourCycles &&\n // @ts-ignore\n locale.hourCycles.length) {\n // @ts-ignore\n hourCycle = locale.hourCycles[0];\n }\n if (hourCycle) {\n switch (hourCycle) {\n case 'h24':\n return 'k';\n case 'h23':\n return 'H';\n case 'h12':\n return 'h';\n case 'h11':\n return 'K';\n default:\n throw new Error('Invalid hourCycle');\n }\n }\n // TODO: Once hourCycle is fully supported remove the following with data generation\n var languageTag = locale.language;\n var regionTag;\n if (languageTag !== 'root') {\n regionTag = locale.maximize().region;\n }\n var hourCycles = timeData[regionTag || ''] ||\n timeData[languageTag || ''] ||\n timeData[\"\".concat(languageTag, \"-001\")] ||\n timeData['001'];\n return hourCycles[0];\n}\n","export var ErrorKind;\n(function (ErrorKind) {\n /** Argument is unclosed (e.g. `{0`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_CLOSING_BRACE\"] = 1] = \"EXPECT_ARGUMENT_CLOSING_BRACE\";\n /** Argument is empty (e.g. `{}`). */\n ErrorKind[ErrorKind[\"EMPTY_ARGUMENT\"] = 2] = \"EMPTY_ARGUMENT\";\n /** Argument is malformed (e.g. `{foo!}``) */\n ErrorKind[ErrorKind[\"MALFORMED_ARGUMENT\"] = 3] = \"MALFORMED_ARGUMENT\";\n /** Expect an argument type (e.g. `{foo,}`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_TYPE\"] = 4] = \"EXPECT_ARGUMENT_TYPE\";\n /** Unsupported argument type (e.g. `{foo,foo}`) */\n ErrorKind[ErrorKind[\"INVALID_ARGUMENT_TYPE\"] = 5] = \"INVALID_ARGUMENT_TYPE\";\n /** Expect an argument style (e.g. `{foo, number, }`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_STYLE\"] = 6] = \"EXPECT_ARGUMENT_STYLE\";\n /** The number skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_NUMBER_SKELETON\"] = 7] = \"INVALID_NUMBER_SKELETON\";\n /** The date time skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_DATE_TIME_SKELETON\"] = 8] = \"INVALID_DATE_TIME_SKELETON\";\n /** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_NUMBER_SKELETON\"] = 9] = \"EXPECT_NUMBER_SKELETON\";\n /** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_DATE_TIME_SKELETON\"] = 10] = \"EXPECT_DATE_TIME_SKELETON\";\n /** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */\n ErrorKind[ErrorKind[\"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\"] = 11] = \"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\";\n /** Missing select argument options (e.g. `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_OPTIONS\"] = 12] = \"EXPECT_SELECT_ARGUMENT_OPTIONS\";\n /** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 13] = \"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 14] = \"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Expecting a selector in `select` argument (e.g `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR\"] = 15] = \"EXPECT_SELECT_ARGUMENT_SELECTOR\";\n /** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR\"] = 16] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR\";\n /** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\"] = 17] = \"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\";\n /**\n * Expecting a message fragment after the `plural` or `selectordinal` selector\n * (e.g. `{foo, plural, one}`)\n */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\"] = 18] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\";\n /** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_SELECTOR\"] = 19] = \"INVALID_PLURAL_ARGUMENT_SELECTOR\";\n /**\n * Duplicate selectors in `plural` or `selectordinal` argument.\n * (e.g. {foo, plural, one {#} one {#}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\"] = 20] = \"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\";\n /** Duplicate selectors in `select` argument.\n * (e.g. {foo, select, apple {apple} apple {apple}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_SELECT_ARGUMENT_SELECTOR\"] = 21] = \"DUPLICATE_SELECT_ARGUMENT_SELECTOR\";\n /** Plural or select argument option must have `other` clause. */\n ErrorKind[ErrorKind[\"MISSING_OTHER_CLAUSE\"] = 22] = \"MISSING_OTHER_CLAUSE\";\n /** The tag is malformed. (e.g. `foo) */\n ErrorKind[ErrorKind[\"INVALID_TAG\"] = 23] = \"INVALID_TAG\";\n /** The tag name is invalid. (e.g. `<123>foo`) */\n ErrorKind[ErrorKind[\"INVALID_TAG_NAME\"] = 25] = \"INVALID_TAG_NAME\";\n /** The closing tag does not match the opening tag. (e.g. `foo`) */\n ErrorKind[ErrorKind[\"UNMATCHED_CLOSING_TAG\"] = 26] = \"UNMATCHED_CLOSING_TAG\";\n /** The opening tag has unmatched closing tag. (e.g. `foo`) */\n ErrorKind[ErrorKind[\"UNCLOSED_TAG\"] = 27] = \"UNCLOSED_TAG\";\n})(ErrorKind || (ErrorKind = {}));\n","import { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { Parser } from './parser';\nimport { isDateElement, isDateTimeSkeleton, isNumberElement, isNumberSkeleton, isPluralElement, isSelectElement, isTagElement, isTimeElement, } from './types';\nfunction pruneLocation(els) {\n els.forEach(function (el) {\n delete el.location;\n if (isSelectElement(el) || isPluralElement(el)) {\n for (var k in el.options) {\n delete el.options[k].location;\n pruneLocation(el.options[k].value);\n }\n }\n else if (isNumberElement(el) && isNumberSkeleton(el.style)) {\n delete el.style.location;\n }\n else if ((isDateElement(el) || isTimeElement(el)) &&\n isDateTimeSkeleton(el.style)) {\n delete el.style.location;\n }\n else if (isTagElement(el)) {\n pruneLocation(el.children);\n }\n });\n}\nexport function parse(message, opts) {\n if (opts === void 0) { opts = {}; }\n opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);\n var result = new Parser(message, opts).parse();\n if (result.err) {\n var error = SyntaxError(ErrorKind[result.err.kind]);\n // @ts-expect-error Assign to error object\n error.location = result.err.location;\n // @ts-expect-error Assign to error object\n error.originalMessage = result.err.message;\n throw error;\n }\n if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {\n pruneLocation(result.val);\n }\n return result.val;\n}\nexport * from './types';\n","var _a;\nimport { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { SKELETON_TYPE, TYPE, } from './types';\nimport { SPACE_SEPARATOR_REGEX } from './regex.generated';\nimport { parseNumberSkeleton, parseNumberSkeletonFromString, parseDateTimeSkeleton, } from '@formatjs/icu-skeleton-parser';\nimport { getBestPattern } from './date-time-pattern-generator';\nvar SPACE_SEPARATOR_START_REGEX = new RegExp(\"^\".concat(SPACE_SEPARATOR_REGEX.source, \"*\"));\nvar SPACE_SEPARATOR_END_REGEX = new RegExp(\"\".concat(SPACE_SEPARATOR_REGEX.source, \"*$\"));\nfunction createLocation(start, end) {\n return { start: start, end: end };\n}\n// #region Ponyfills\n// Consolidate these variables up top for easier toggling during debugging\nvar hasNativeStartsWith = !!String.prototype.startsWith;\nvar hasNativeFromCodePoint = !!String.fromCodePoint;\nvar hasNativeFromEntries = !!Object.fromEntries;\nvar hasNativeCodePointAt = !!String.prototype.codePointAt;\nvar hasTrimStart = !!String.prototype.trimStart;\nvar hasTrimEnd = !!String.prototype.trimEnd;\nvar hasNativeIsSafeInteger = !!Number.isSafeInteger;\nvar isSafeInteger = hasNativeIsSafeInteger\n ? Number.isSafeInteger\n : function (n) {\n return (typeof n === 'number' &&\n isFinite(n) &&\n Math.floor(n) === n &&\n Math.abs(n) <= 0x1fffffffffffff);\n };\n// IE11 does not support y and u.\nvar REGEX_SUPPORTS_U_AND_Y = true;\ntry {\n var re = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n /**\n * legacy Edge or Xbox One browser\n * Unicode flag support: supported\n * Pattern_Syntax support: not supported\n * See https://github.com/formatjs/formatjs/issues/2822\n */\n REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec('a')) === null || _a === void 0 ? void 0 : _a[0]) === 'a';\n}\ncatch (_) {\n REGEX_SUPPORTS_U_AND_Y = false;\n}\nvar startsWith = hasNativeStartsWith\n ? // Native\n function startsWith(s, search, position) {\n return s.startsWith(search, position);\n }\n : // For IE11\n function startsWith(s, search, position) {\n return s.slice(position, position + search.length) === search;\n };\nvar fromCodePoint = hasNativeFromCodePoint\n ? String.fromCodePoint\n : // IE11\n function fromCodePoint() {\n var codePoints = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n codePoints[_i] = arguments[_i];\n }\n var elements = '';\n var length = codePoints.length;\n var i = 0;\n var code;\n while (length > i) {\n code = codePoints[i++];\n if (code > 0x10ffff)\n throw RangeError(code + ' is not a valid code point');\n elements +=\n code < 0x10000\n ? String.fromCharCode(code)\n : String.fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00);\n }\n return elements;\n };\nvar fromEntries = \n// native\nhasNativeFromEntries\n ? Object.fromEntries\n : // Ponyfill\n function fromEntries(entries) {\n var obj = {};\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var _a = entries_1[_i], k = _a[0], v = _a[1];\n obj[k] = v;\n }\n return obj;\n };\nvar codePointAt = hasNativeCodePointAt\n ? // Native\n function codePointAt(s, index) {\n return s.codePointAt(index);\n }\n : // IE 11\n function codePointAt(s, index) {\n var size = s.length;\n if (index < 0 || index >= size) {\n return undefined;\n }\n var first = s.charCodeAt(index);\n var second;\n return first < 0xd800 ||\n first > 0xdbff ||\n index + 1 === size ||\n (second = s.charCodeAt(index + 1)) < 0xdc00 ||\n second > 0xdfff\n ? first\n : ((first - 0xd800) << 10) + (second - 0xdc00) + 0x10000;\n };\nvar trimStart = hasTrimStart\n ? // Native\n function trimStart(s) {\n return s.trimStart();\n }\n : // Ponyfill\n function trimStart(s) {\n return s.replace(SPACE_SEPARATOR_START_REGEX, '');\n };\nvar trimEnd = hasTrimEnd\n ? // Native\n function trimEnd(s) {\n return s.trimEnd();\n }\n : // Ponyfill\n function trimEnd(s) {\n return s.replace(SPACE_SEPARATOR_END_REGEX, '');\n };\n// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.\nfunction RE(s, flag) {\n return new RegExp(s, flag);\n}\n// #endregion\nvar matchIdentifierAtIndex;\nif (REGEX_SUPPORTS_U_AND_Y) {\n // Native\n var IDENTIFIER_PREFIX_RE_1 = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var _a;\n IDENTIFIER_PREFIX_RE_1.lastIndex = index;\n var match = IDENTIFIER_PREFIX_RE_1.exec(s);\n return (_a = match[1]) !== null && _a !== void 0 ? _a : '';\n };\n}\nelse {\n // IE11\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var match = [];\n while (true) {\n var c = codePointAt(s, index);\n if (c === undefined || _isWhiteSpace(c) || _isPatternSyntax(c)) {\n break;\n }\n match.push(c);\n index += c >= 0x10000 ? 2 : 1;\n }\n return fromCodePoint.apply(void 0, match);\n };\n}\nvar Parser = /** @class */ (function () {\n function Parser(message, options) {\n if (options === void 0) { options = {}; }\n this.message = message;\n this.position = { offset: 0, line: 1, column: 1 };\n this.ignoreTag = !!options.ignoreTag;\n this.locale = options.locale;\n this.requiresOtherClause = !!options.requiresOtherClause;\n this.shouldParseSkeletons = !!options.shouldParseSkeletons;\n }\n Parser.prototype.parse = function () {\n if (this.offset() !== 0) {\n throw Error('parser can only be used once');\n }\n return this.parseMessage(0, '', false);\n };\n Parser.prototype.parseMessage = function (nestingLevel, parentArgType, expectingCloseTag) {\n var elements = [];\n while (!this.isEOF()) {\n var char = this.char();\n if (char === 123 /* `{` */) {\n var result = this.parseArgument(nestingLevel, expectingCloseTag);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else if (char === 125 /* `}` */ && nestingLevel > 0) {\n break;\n }\n else if (char === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) {\n var position = this.clonePosition();\n this.bump();\n elements.push({\n type: TYPE.pound,\n location: createLocation(position, this.clonePosition()),\n });\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n this.peek() === 47 // char code for '/'\n ) {\n if (expectingCloseTag) {\n break;\n }\n else {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));\n }\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n _isAlpha(this.peek() || 0)) {\n var result = this.parseTag(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else {\n var result = this.parseLiteral(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n }\n return { val: elements, err: null };\n };\n /**\n * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the\n * [custom element name][] except that a dash is NOT always mandatory and uppercase letters\n * are accepted:\n *\n * ```\n * tag ::= \"<\" tagName (whitespace)* \"/>\" | \"<\" tagName (whitespace)* \">\" message \"\"\n * tagName ::= [a-z] (PENChar)*\n * PENChar ::=\n * \"-\" | \".\" | [0-9] | \"_\" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |\n * [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |\n * [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n * ```\n *\n * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do\n * since other tag-based engines like React allow it\n */\n Parser.prototype.parseTag = function (nestingLevel, parentArgType) {\n var startPosition = this.clonePosition();\n this.bump(); // `<`\n var tagName = this.parseTagName();\n this.bumpSpace();\n if (this.bumpIf('/>')) {\n // Self closing tag\n return {\n val: {\n type: TYPE.literal,\n value: \"<\".concat(tagName, \"/>\"),\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else if (this.bumpIf('>')) {\n var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);\n if (childrenResult.err) {\n return childrenResult;\n }\n var children = childrenResult.val;\n // Expecting a close tag\n var endTagStartPosition = this.clonePosition();\n if (this.bumpIf('')) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n return {\n val: {\n type: TYPE.tag,\n value: tagName,\n children: children,\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else {\n return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));\n }\n }\n else {\n return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));\n }\n };\n /**\n * This method assumes that the caller has peeked ahead for the first tag character.\n */\n Parser.prototype.parseTagName = function () {\n var startOffset = this.offset();\n this.bump(); // the first tag name character\n while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {\n this.bump();\n }\n return this.message.slice(startOffset, this.offset());\n };\n Parser.prototype.parseLiteral = function (nestingLevel, parentArgType) {\n var start = this.clonePosition();\n var value = '';\n while (true) {\n var parseQuoteResult = this.tryParseQuote(parentArgType);\n if (parseQuoteResult) {\n value += parseQuoteResult;\n continue;\n }\n var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);\n if (parseUnquotedResult) {\n value += parseUnquotedResult;\n continue;\n }\n var parseLeftAngleResult = this.tryParseLeftAngleBracket();\n if (parseLeftAngleResult) {\n value += parseLeftAngleResult;\n continue;\n }\n break;\n }\n var location = createLocation(start, this.clonePosition());\n return {\n val: { type: TYPE.literal, value: value, location: location },\n err: null,\n };\n };\n Parser.prototype.tryParseLeftAngleBracket = function () {\n if (!this.isEOF() &&\n this.char() === 60 /* `<` */ &&\n (this.ignoreTag ||\n // If at the opening tag or closing tag position, bail.\n !_isAlphaOrSlash(this.peek() || 0))) {\n this.bump(); // `<`\n return '<';\n }\n return null;\n };\n /**\n * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes\n * a character that requires quoting (that is, \"only where needed\"), and works the same in\n * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.\n */\n Parser.prototype.tryParseQuote = function (parentArgType) {\n if (this.isEOF() || this.char() !== 39 /* `'` */) {\n return null;\n }\n // Parse escaped char following the apostrophe, or early return if there is no escaped char.\n // Check if is valid escaped character\n switch (this.peek()) {\n case 39 /* `'` */:\n // double quote, should return as a single quote.\n this.bump();\n this.bump();\n return \"'\";\n // '{', '<', '>', '}'\n case 123:\n case 60:\n case 62:\n case 125:\n break;\n case 35: // '#'\n if (parentArgType === 'plural' || parentArgType === 'selectordinal') {\n break;\n }\n return null;\n default:\n return null;\n }\n this.bump(); // apostrophe\n var codePoints = [this.char()]; // escaped char\n this.bump();\n // read chars until the optional closing apostrophe is found\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch === 39 /* `'` */) {\n if (this.peek() === 39 /* `'` */) {\n codePoints.push(39);\n // Bump one more time because we need to skip 2 characters.\n this.bump();\n }\n else {\n // Optional closing apostrophe.\n this.bump();\n break;\n }\n }\n else {\n codePoints.push(ch);\n }\n this.bump();\n }\n return fromCodePoint.apply(void 0, codePoints);\n };\n Parser.prototype.tryParseUnquoted = function (nestingLevel, parentArgType) {\n if (this.isEOF()) {\n return null;\n }\n var ch = this.char();\n if (ch === 60 /* `<` */ ||\n ch === 123 /* `{` */ ||\n (ch === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) ||\n (ch === 125 /* `}` */ && nestingLevel > 0)) {\n return null;\n }\n else {\n this.bump();\n return fromCodePoint(ch);\n }\n };\n Parser.prototype.parseArgument = function (nestingLevel, expectingCloseTag) {\n var openingBracePosition = this.clonePosition();\n this.bump(); // `{`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n if (this.char() === 125 /* `}` */) {\n this.bump();\n return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n // argument name\n var value = this.parseIdentifierIfPossible().value;\n if (!value) {\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n switch (this.char()) {\n // Simple argument: `{name}`\n case 125 /* `}` */: {\n this.bump(); // `}`\n return {\n val: {\n type: TYPE.argument,\n // value does not include the opening and closing braces.\n value: value,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n err: null,\n };\n }\n // Argument with options: `{name, format, ...}`\n case 44 /* `,` */: {\n this.bump(); // `,`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);\n }\n default:\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n };\n /**\n * Advance the parser until the end of the identifier, if it is currently on\n * an identifier character. Return an empty string otherwise.\n */\n Parser.prototype.parseIdentifierIfPossible = function () {\n var startingPosition = this.clonePosition();\n var startOffset = this.offset();\n var value = matchIdentifierAtIndex(this.message, startOffset);\n var endOffset = startOffset + value.length;\n this.bumpTo(endOffset);\n var endPosition = this.clonePosition();\n var location = createLocation(startingPosition, endPosition);\n return { value: value, location: location };\n };\n Parser.prototype.parseArgumentOptions = function (nestingLevel, expectingCloseTag, value, openingBracePosition) {\n var _a;\n // Parse this range:\n // {name, type, style}\n // ^---^\n var typeStartPosition = this.clonePosition();\n var argType = this.parseIdentifierIfPossible().value;\n var typeEndPosition = this.clonePosition();\n switch (argType) {\n case '':\n // Expecting a style string number, date, time, plural, selectordinal, or select.\n return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n case 'number':\n case 'date':\n case 'time': {\n // Parse this range:\n // {name, number, style}\n // ^-------^\n this.bumpSpace();\n var styleAndLocation = null;\n if (this.bumpIf(',')) {\n this.bumpSpace();\n var styleStartPosition = this.clonePosition();\n var result = this.parseSimpleArgStyleIfPossible();\n if (result.err) {\n return result;\n }\n var style = trimEnd(result.val);\n if (style.length === 0) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var styleLocation = createLocation(styleStartPosition, this.clonePosition());\n styleAndLocation = { style: style, styleLocation: styleLocation };\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_1 = createLocation(openingBracePosition, this.clonePosition());\n // Extract style or skeleton\n if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, '::', 0)) {\n // Skeleton starts with `::`.\n var skeleton = trimStart(styleAndLocation.style.slice(2));\n if (argType === 'number') {\n var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);\n if (result.err) {\n return result;\n }\n return {\n val: { type: TYPE.number, value: value, location: location_1, style: result.val },\n err: null,\n };\n }\n else {\n if (skeleton.length === 0) {\n return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);\n }\n var dateTimePattern = skeleton;\n // Get \"best match\" pattern only if locale is passed, if not, let it\n // pass as-is where `parseDateTimeSkeleton()` will throw an error\n // for unsupported patterns.\n if (this.locale) {\n dateTimePattern = getBestPattern(skeleton, this.locale);\n }\n var style = {\n type: SKELETON_TYPE.dateTime,\n pattern: dateTimePattern,\n location: styleAndLocation.styleLocation,\n parsedOptions: this.shouldParseSkeletons\n ? parseDateTimeSkeleton(dateTimePattern)\n : {},\n };\n var type = argType === 'date' ? TYPE.date : TYPE.time;\n return {\n val: { type: type, value: value, location: location_1, style: style },\n err: null,\n };\n }\n }\n // Regular style or no style.\n return {\n val: {\n type: argType === 'number'\n ? TYPE.number\n : argType === 'date'\n ? TYPE.date\n : TYPE.time,\n value: value,\n location: location_1,\n style: (_a = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a !== void 0 ? _a : null,\n },\n err: null,\n };\n }\n case 'plural':\n case 'selectordinal':\n case 'select': {\n // Parse this range:\n // {name, plural, options}\n // ^---------^\n var typeEndPosition_1 = this.clonePosition();\n this.bumpSpace();\n if (!this.bumpIf(',')) {\n return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));\n }\n this.bumpSpace();\n // Parse offset:\n // {name, plural, offset:1, options}\n // ^-----^\n //\n // or the first option:\n //\n // {name, plural, one {...} other {...}}\n // ^--^\n var identifierAndLocation = this.parseIdentifierIfPossible();\n var pluralOffset = 0;\n if (argType !== 'select' && identifierAndLocation.value === 'offset') {\n if (!this.bumpIf(':')) {\n return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n this.bumpSpace();\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);\n if (result.err) {\n return result;\n }\n // Parse another identifier for option parsing\n this.bumpSpace();\n identifierAndLocation = this.parseIdentifierIfPossible();\n pluralOffset = result.val;\n }\n var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);\n if (optionsResult.err) {\n return optionsResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_2 = createLocation(openingBracePosition, this.clonePosition());\n if (argType === 'select') {\n return {\n val: {\n type: TYPE.select,\n value: value,\n options: fromEntries(optionsResult.val),\n location: location_2,\n },\n err: null,\n };\n }\n else {\n return {\n val: {\n type: TYPE.plural,\n value: value,\n options: fromEntries(optionsResult.val),\n offset: pluralOffset,\n pluralType: argType === 'plural' ? 'cardinal' : 'ordinal',\n location: location_2,\n },\n err: null,\n };\n }\n }\n default:\n return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n }\n };\n Parser.prototype.tryParseArgumentClose = function (openingBracePosition) {\n // Parse: {value, number, ::currency/GBP }\n //\n if (this.isEOF() || this.char() !== 125 /* `}` */) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bump(); // `}`\n return { val: true, err: null };\n };\n /**\n * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659\n */\n Parser.prototype.parseSimpleArgStyleIfPossible = function () {\n var nestedBraces = 0;\n var startPosition = this.clonePosition();\n while (!this.isEOF()) {\n var ch = this.char();\n switch (ch) {\n case 39 /* `'` */: {\n // Treat apostrophe as quoting but include it in the style part.\n // Find the end of the quoted literal text.\n this.bump();\n var apostrophePosition = this.clonePosition();\n if (!this.bumpUntil(\"'\")) {\n return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));\n }\n this.bump();\n break;\n }\n case 123 /* `{` */: {\n nestedBraces += 1;\n this.bump();\n break;\n }\n case 125 /* `}` */: {\n if (nestedBraces > 0) {\n nestedBraces -= 1;\n }\n else {\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n }\n break;\n }\n default:\n this.bump();\n break;\n }\n }\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n };\n Parser.prototype.parseNumberSkeletonFromString = function (skeleton, location) {\n var tokens = [];\n try {\n tokens = parseNumberSkeletonFromString(skeleton);\n }\n catch (e) {\n return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);\n }\n return {\n val: {\n type: SKELETON_TYPE.number,\n tokens: tokens,\n location: location,\n parsedOptions: this.shouldParseSkeletons\n ? parseNumberSkeleton(tokens)\n : {},\n },\n err: null,\n };\n };\n /**\n * @param nesting_level The current nesting level of messages.\n * This can be positive when parsing message fragment in select or plural argument options.\n * @param parent_arg_type The parent argument's type.\n * @param parsed_first_identifier If provided, this is the first identifier-like selector of\n * the argument. It is a by-product of a previous parsing attempt.\n * @param expecting_close_tag If true, this message is directly or indirectly nested inside\n * between a pair of opening and closing tags. The nested message will not parse beyond\n * the closing tag boundary.\n */\n Parser.prototype.tryParsePluralOrSelectOptions = function (nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {\n var _a;\n var hasOtherClause = false;\n var options = [];\n var parsedSelectors = new Set();\n var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;\n // Parse:\n // one {one apple}\n // ^--^\n while (true) {\n if (selector.length === 0) {\n var startPosition = this.clonePosition();\n if (parentArgType !== 'select' && this.bumpIf('=')) {\n // Try parse `={number}` selector\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);\n if (result.err) {\n return result;\n }\n selectorLocation = createLocation(startPosition, this.clonePosition());\n selector = this.message.slice(startPosition.offset, this.offset());\n }\n else {\n break;\n }\n }\n // Duplicate selector clauses\n if (parsedSelectors.has(selector)) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);\n }\n if (selector === 'other') {\n hasOtherClause = true;\n }\n // Parse:\n // one {one apple}\n // ^----------^\n this.bumpSpace();\n var openingBracePosition = this.clonePosition();\n if (!this.bumpIf('{')) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);\n if (fragmentResult.err) {\n return fragmentResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n options.push([\n selector,\n {\n value: fragmentResult.val,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n ]);\n // Keep track of the existing selectors\n parsedSelectors.add(selector);\n // Prep next selector clause.\n this.bumpSpace();\n (_a = this.parseIdentifierIfPossible(), selector = _a.value, selectorLocation = _a.location);\n }\n if (options.length === 0) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));\n }\n if (this.requiresOtherClause && !hasOtherClause) {\n return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n return { val: options, err: null };\n };\n Parser.prototype.tryParseDecimalInteger = function (expectNumberError, invalidNumberError) {\n var sign = 1;\n var startingPosition = this.clonePosition();\n if (this.bumpIf('+')) {\n }\n else if (this.bumpIf('-')) {\n sign = -1;\n }\n var hasDigits = false;\n var decimal = 0;\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch >= 48 /* `0` */ && ch <= 57 /* `9` */) {\n hasDigits = true;\n decimal = decimal * 10 + (ch - 48);\n this.bump();\n }\n else {\n break;\n }\n }\n var location = createLocation(startingPosition, this.clonePosition());\n if (!hasDigits) {\n return this.error(expectNumberError, location);\n }\n decimal *= sign;\n if (!isSafeInteger(decimal)) {\n return this.error(invalidNumberError, location);\n }\n return { val: decimal, err: null };\n };\n Parser.prototype.offset = function () {\n return this.position.offset;\n };\n Parser.prototype.isEOF = function () {\n return this.offset() === this.message.length;\n };\n Parser.prototype.clonePosition = function () {\n // This is much faster than `Object.assign` or spread.\n return {\n offset: this.position.offset,\n line: this.position.line,\n column: this.position.column,\n };\n };\n /**\n * Return the code point at the current position of the parser.\n * Throws if the index is out of bound.\n */\n Parser.prototype.char = function () {\n var offset = this.position.offset;\n if (offset >= this.message.length) {\n throw Error('out of bound');\n }\n var code = codePointAt(this.message, offset);\n if (code === undefined) {\n throw Error(\"Offset \".concat(offset, \" is at invalid UTF-16 code unit boundary\"));\n }\n return code;\n };\n Parser.prototype.error = function (kind, location) {\n return {\n val: null,\n err: {\n kind: kind,\n message: this.message,\n location: location,\n },\n };\n };\n /** Bump the parser to the next UTF-16 code unit. */\n Parser.prototype.bump = function () {\n if (this.isEOF()) {\n return;\n }\n var code = this.char();\n if (code === 10 /* '\\n' */) {\n this.position.line += 1;\n this.position.column = 1;\n this.position.offset += 1;\n }\n else {\n this.position.column += 1;\n // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.\n this.position.offset += code < 0x10000 ? 1 : 2;\n }\n };\n /**\n * If the substring starting at the current position of the parser has\n * the given prefix, then bump the parser to the character immediately\n * following the prefix and return true. Otherwise, don't bump the parser\n * and return false.\n */\n Parser.prototype.bumpIf = function (prefix) {\n if (startsWith(this.message, prefix, this.offset())) {\n for (var i = 0; i < prefix.length; i++) {\n this.bump();\n }\n return true;\n }\n return false;\n };\n /**\n * Bump the parser until the pattern character is found and return `true`.\n * Otherwise bump to the end of the file and return `false`.\n */\n Parser.prototype.bumpUntil = function (pattern) {\n var currentOffset = this.offset();\n var index = this.message.indexOf(pattern, currentOffset);\n if (index >= 0) {\n this.bumpTo(index);\n return true;\n }\n else {\n this.bumpTo(this.message.length);\n return false;\n }\n };\n /**\n * Bump the parser to the target offset.\n * If target offset is beyond the end of the input, bump the parser to the end of the input.\n */\n Parser.prototype.bumpTo = function (targetOffset) {\n if (this.offset() > targetOffset) {\n throw Error(\"targetOffset \".concat(targetOffset, \" must be greater than or equal to the current offset \").concat(this.offset()));\n }\n targetOffset = Math.min(targetOffset, this.message.length);\n while (true) {\n var offset = this.offset();\n if (offset === targetOffset) {\n break;\n }\n if (offset > targetOffset) {\n throw Error(\"targetOffset \".concat(targetOffset, \" is at invalid UTF-16 code unit boundary\"));\n }\n this.bump();\n if (this.isEOF()) {\n break;\n }\n }\n };\n /** advance the parser through all whitespace to the next non-whitespace code unit. */\n Parser.prototype.bumpSpace = function () {\n while (!this.isEOF() && _isWhiteSpace(this.char())) {\n this.bump();\n }\n };\n /**\n * Peek at the *next* Unicode codepoint in the input without advancing the parser.\n * If the input has been exhausted, then this returns null.\n */\n Parser.prototype.peek = function () {\n if (this.isEOF()) {\n return null;\n }\n var code = this.char();\n var offset = this.offset();\n var nextCode = this.message.charCodeAt(offset + (code >= 0x10000 ? 2 : 1));\n return nextCode !== null && nextCode !== void 0 ? nextCode : null;\n };\n return Parser;\n}());\nexport { Parser };\n/**\n * This check if codepoint is alphabet (lower & uppercase)\n * @param codepoint\n * @returns\n */\nfunction _isAlpha(codepoint) {\n return ((codepoint >= 97 && codepoint <= 122) ||\n (codepoint >= 65 && codepoint <= 90));\n}\nfunction _isAlphaOrSlash(codepoint) {\n return _isAlpha(codepoint) || codepoint === 47; /* '/' */\n}\n/** See `parseTag` function docs. */\nfunction _isPotentialElementNameChar(c) {\n return (c === 45 /* '-' */ ||\n c === 46 /* '.' */ ||\n (c >= 48 && c <= 57) /* 0..9 */ ||\n c === 95 /* '_' */ ||\n (c >= 97 && c <= 122) /** a..z */ ||\n (c >= 65 && c <= 90) /* A..Z */ ||\n c == 0xb7 ||\n (c >= 0xc0 && c <= 0xd6) ||\n (c >= 0xd8 && c <= 0xf6) ||\n (c >= 0xf8 && c <= 0x37d) ||\n (c >= 0x37f && c <= 0x1fff) ||\n (c >= 0x200c && c <= 0x200d) ||\n (c >= 0x203f && c <= 0x2040) ||\n (c >= 0x2070 && c <= 0x218f) ||\n (c >= 0x2c00 && c <= 0x2fef) ||\n (c >= 0x3001 && c <= 0xd7ff) ||\n (c >= 0xf900 && c <= 0xfdcf) ||\n (c >= 0xfdf0 && c <= 0xfffd) ||\n (c >= 0x10000 && c <= 0xeffff));\n}\n/**\n * Code point equivalent of regex `\\p{White_Space}`.\n * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isWhiteSpace(c) {\n return ((c >= 0x0009 && c <= 0x000d) ||\n c === 0x0020 ||\n c === 0x0085 ||\n (c >= 0x200e && c <= 0x200f) ||\n c === 0x2028 ||\n c === 0x2029);\n}\n/**\n * Code point equivalent of regex `\\p{Pattern_Syntax}`.\n * See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isPatternSyntax(c) {\n return ((c >= 0x0021 && c <= 0x0023) ||\n c === 0x0024 ||\n (c >= 0x0025 && c <= 0x0027) ||\n c === 0x0028 ||\n c === 0x0029 ||\n c === 0x002a ||\n c === 0x002b ||\n c === 0x002c ||\n c === 0x002d ||\n (c >= 0x002e && c <= 0x002f) ||\n (c >= 0x003a && c <= 0x003b) ||\n (c >= 0x003c && c <= 0x003e) ||\n (c >= 0x003f && c <= 0x0040) ||\n c === 0x005b ||\n c === 0x005c ||\n c === 0x005d ||\n c === 0x005e ||\n c === 0x0060 ||\n c === 0x007b ||\n c === 0x007c ||\n c === 0x007d ||\n c === 0x007e ||\n c === 0x00a1 ||\n (c >= 0x00a2 && c <= 0x00a5) ||\n c === 0x00a6 ||\n c === 0x00a7 ||\n c === 0x00a9 ||\n c === 0x00ab ||\n c === 0x00ac ||\n c === 0x00ae ||\n c === 0x00b0 ||\n c === 0x00b1 ||\n c === 0x00b6 ||\n c === 0x00bb ||\n c === 0x00bf ||\n c === 0x00d7 ||\n c === 0x00f7 ||\n (c >= 0x2010 && c <= 0x2015) ||\n (c >= 0x2016 && c <= 0x2017) ||\n c === 0x2018 ||\n c === 0x2019 ||\n c === 0x201a ||\n (c >= 0x201b && c <= 0x201c) ||\n c === 0x201d ||\n c === 0x201e ||\n c === 0x201f ||\n (c >= 0x2020 && c <= 0x2027) ||\n (c >= 0x2030 && c <= 0x2038) ||\n c === 0x2039 ||\n c === 0x203a ||\n (c >= 0x203b && c <= 0x203e) ||\n (c >= 0x2041 && c <= 0x2043) ||\n c === 0x2044 ||\n c === 0x2045 ||\n c === 0x2046 ||\n (c >= 0x2047 && c <= 0x2051) ||\n c === 0x2052 ||\n c === 0x2053 ||\n (c >= 0x2055 && c <= 0x205e) ||\n (c >= 0x2190 && c <= 0x2194) ||\n (c >= 0x2195 && c <= 0x2199) ||\n (c >= 0x219a && c <= 0x219b) ||\n (c >= 0x219c && c <= 0x219f) ||\n c === 0x21a0 ||\n (c >= 0x21a1 && c <= 0x21a2) ||\n c === 0x21a3 ||\n (c >= 0x21a4 && c <= 0x21a5) ||\n c === 0x21a6 ||\n (c >= 0x21a7 && c <= 0x21ad) ||\n c === 0x21ae ||\n (c >= 0x21af && c <= 0x21cd) ||\n (c >= 0x21ce && c <= 0x21cf) ||\n (c >= 0x21d0 && c <= 0x21d1) ||\n c === 0x21d2 ||\n c === 0x21d3 ||\n c === 0x21d4 ||\n (c >= 0x21d5 && c <= 0x21f3) ||\n (c >= 0x21f4 && c <= 0x22ff) ||\n (c >= 0x2300 && c <= 0x2307) ||\n c === 0x2308 ||\n c === 0x2309 ||\n c === 0x230a ||\n c === 0x230b ||\n (c >= 0x230c && c <= 0x231f) ||\n (c >= 0x2320 && c <= 0x2321) ||\n (c >= 0x2322 && c <= 0x2328) ||\n c === 0x2329 ||\n c === 0x232a ||\n (c >= 0x232b && c <= 0x237b) ||\n c === 0x237c ||\n (c >= 0x237d && c <= 0x239a) ||\n (c >= 0x239b && c <= 0x23b3) ||\n (c >= 0x23b4 && c <= 0x23db) ||\n (c >= 0x23dc && c <= 0x23e1) ||\n (c >= 0x23e2 && c <= 0x2426) ||\n (c >= 0x2427 && c <= 0x243f) ||\n (c >= 0x2440 && c <= 0x244a) ||\n (c >= 0x244b && c <= 0x245f) ||\n (c >= 0x2500 && c <= 0x25b6) ||\n c === 0x25b7 ||\n (c >= 0x25b8 && c <= 0x25c0) ||\n c === 0x25c1 ||\n (c >= 0x25c2 && c <= 0x25f7) ||\n (c >= 0x25f8 && c <= 0x25ff) ||\n (c >= 0x2600 && c <= 0x266e) ||\n c === 0x266f ||\n (c >= 0x2670 && c <= 0x2767) ||\n c === 0x2768 ||\n c === 0x2769 ||\n c === 0x276a ||\n c === 0x276b ||\n c === 0x276c ||\n c === 0x276d ||\n c === 0x276e ||\n c === 0x276f ||\n c === 0x2770 ||\n c === 0x2771 ||\n c === 0x2772 ||\n c === 0x2773 ||\n c === 0x2774 ||\n c === 0x2775 ||\n (c >= 0x2794 && c <= 0x27bf) ||\n (c >= 0x27c0 && c <= 0x27c4) ||\n c === 0x27c5 ||\n c === 0x27c6 ||\n (c >= 0x27c7 && c <= 0x27e5) ||\n c === 0x27e6 ||\n c === 0x27e7 ||\n c === 0x27e8 ||\n c === 0x27e9 ||\n c === 0x27ea ||\n c === 0x27eb ||\n c === 0x27ec ||\n c === 0x27ed ||\n c === 0x27ee ||\n c === 0x27ef ||\n (c >= 0x27f0 && c <= 0x27ff) ||\n (c >= 0x2800 && c <= 0x28ff) ||\n (c >= 0x2900 && c <= 0x2982) ||\n c === 0x2983 ||\n c === 0x2984 ||\n c === 0x2985 ||\n c === 0x2986 ||\n c === 0x2987 ||\n c === 0x2988 ||\n c === 0x2989 ||\n c === 0x298a ||\n c === 0x298b ||\n c === 0x298c ||\n c === 0x298d ||\n c === 0x298e ||\n c === 0x298f ||\n c === 0x2990 ||\n c === 0x2991 ||\n c === 0x2992 ||\n c === 0x2993 ||\n c === 0x2994 ||\n c === 0x2995 ||\n c === 0x2996 ||\n c === 0x2997 ||\n c === 0x2998 ||\n (c >= 0x2999 && c <= 0x29d7) ||\n c === 0x29d8 ||\n c === 0x29d9 ||\n c === 0x29da ||\n c === 0x29db ||\n (c >= 0x29dc && c <= 0x29fb) ||\n c === 0x29fc ||\n c === 0x29fd ||\n (c >= 0x29fe && c <= 0x2aff) ||\n (c >= 0x2b00 && c <= 0x2b2f) ||\n (c >= 0x2b30 && c <= 0x2b44) ||\n (c >= 0x2b45 && c <= 0x2b46) ||\n (c >= 0x2b47 && c <= 0x2b4c) ||\n (c >= 0x2b4d && c <= 0x2b73) ||\n (c >= 0x2b74 && c <= 0x2b75) ||\n (c >= 0x2b76 && c <= 0x2b95) ||\n c === 0x2b96 ||\n (c >= 0x2b97 && c <= 0x2bff) ||\n (c >= 0x2e00 && c <= 0x2e01) ||\n c === 0x2e02 ||\n c === 0x2e03 ||\n c === 0x2e04 ||\n c === 0x2e05 ||\n (c >= 0x2e06 && c <= 0x2e08) ||\n c === 0x2e09 ||\n c === 0x2e0a ||\n c === 0x2e0b ||\n c === 0x2e0c ||\n c === 0x2e0d ||\n (c >= 0x2e0e && c <= 0x2e16) ||\n c === 0x2e17 ||\n (c >= 0x2e18 && c <= 0x2e19) ||\n c === 0x2e1a ||\n c === 0x2e1b ||\n c === 0x2e1c ||\n c === 0x2e1d ||\n (c >= 0x2e1e && c <= 0x2e1f) ||\n c === 0x2e20 ||\n c === 0x2e21 ||\n c === 0x2e22 ||\n c === 0x2e23 ||\n c === 0x2e24 ||\n c === 0x2e25 ||\n c === 0x2e26 ||\n c === 0x2e27 ||\n c === 0x2e28 ||\n c === 0x2e29 ||\n (c >= 0x2e2a && c <= 0x2e2e) ||\n c === 0x2e2f ||\n (c >= 0x2e30 && c <= 0x2e39) ||\n (c >= 0x2e3a && c <= 0x2e3b) ||\n (c >= 0x2e3c && c <= 0x2e3f) ||\n c === 0x2e40 ||\n c === 0x2e41 ||\n c === 0x2e42 ||\n (c >= 0x2e43 && c <= 0x2e4f) ||\n (c >= 0x2e50 && c <= 0x2e51) ||\n c === 0x2e52 ||\n (c >= 0x2e53 && c <= 0x2e7f) ||\n (c >= 0x3001 && c <= 0x3003) ||\n c === 0x3008 ||\n c === 0x3009 ||\n c === 0x300a ||\n c === 0x300b ||\n c === 0x300c ||\n c === 0x300d ||\n c === 0x300e ||\n c === 0x300f ||\n c === 0x3010 ||\n c === 0x3011 ||\n (c >= 0x3012 && c <= 0x3013) ||\n c === 0x3014 ||\n c === 0x3015 ||\n c === 0x3016 ||\n c === 0x3017 ||\n c === 0x3018 ||\n c === 0x3019 ||\n c === 0x301a ||\n c === 0x301b ||\n c === 0x301c ||\n c === 0x301d ||\n (c >= 0x301e && c <= 0x301f) ||\n c === 0x3020 ||\n c === 0x3030 ||\n c === 0xfd3e ||\n c === 0xfd3f ||\n (c >= 0xfe45 && c <= 0xfe46));\n}\n","// @generated from regex-gen.ts\nexport var SPACE_SEPARATOR_REGEX = /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/;\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/;\n","// @generated from time-data-gen.ts\n// prettier-ignore \nexport var timeData = {\n \"AX\": [\n \"H\"\n ],\n \"BQ\": [\n \"H\"\n ],\n \"CP\": [\n \"H\"\n ],\n \"CZ\": [\n \"H\"\n ],\n \"DK\": [\n \"H\"\n ],\n \"FI\": [\n \"H\"\n ],\n \"ID\": [\n \"H\"\n ],\n \"IS\": [\n \"H\"\n ],\n \"ML\": [\n \"H\"\n ],\n \"NE\": [\n \"H\"\n ],\n \"RU\": [\n \"H\"\n ],\n \"SE\": [\n \"H\"\n ],\n \"SJ\": [\n \"H\"\n ],\n \"SK\": [\n \"H\"\n ],\n \"AS\": [\n \"h\",\n \"H\"\n ],\n \"BT\": [\n \"h\",\n \"H\"\n ],\n \"DJ\": [\n \"h\",\n \"H\"\n ],\n \"ER\": [\n \"h\",\n \"H\"\n ],\n \"GH\": [\n \"h\",\n \"H\"\n ],\n \"IN\": [\n \"h\",\n \"H\"\n ],\n \"LS\": [\n \"h\",\n \"H\"\n ],\n \"PG\": [\n \"h\",\n \"H\"\n ],\n \"PW\": [\n \"h\",\n \"H\"\n ],\n \"SO\": [\n \"h\",\n \"H\"\n ],\n \"TO\": [\n \"h\",\n \"H\"\n ],\n \"VU\": [\n \"h\",\n \"H\"\n ],\n \"WS\": [\n \"h\",\n \"H\"\n ],\n \"001\": [\n \"H\",\n \"h\"\n ],\n \"AL\": [\n \"h\",\n \"H\",\n \"hB\"\n ],\n \"TD\": [\n \"h\",\n \"H\",\n \"hB\"\n ],\n \"ca-ES\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"CF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"CM\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"fr-CA\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"gl-ES\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"it-CH\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"it-IT\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"LU\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"NP\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"PF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SC\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SM\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SN\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"TF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"VA\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"CY\": [\n \"h\",\n \"H\",\n \"hb\",\n \"hB\"\n ],\n \"GR\": [\n \"h\",\n \"H\",\n \"hb\",\n \"hB\"\n ],\n \"CO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"DO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"KP\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"KR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"NA\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PA\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"VE\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"AC\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"AI\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"BW\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"BZ\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CC\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CX\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"DG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"FK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GB\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GI\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IE\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IM\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IO\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"JE\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"LT\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"MK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"MN\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"MS\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NF\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NR\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NU\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"PN\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"SH\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"SX\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"TA\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"ZA\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"af-ZA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"AR\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"CL\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"CR\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"CU\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"EA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-BO\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-BR\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-EC\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-ES\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-GQ\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-PE\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"GT\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"HN\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"IC\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"KG\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"KM\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"LK\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"MA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"MX\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"NI\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"PY\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"SV\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"UY\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"JP\": [\n \"H\",\n \"h\",\n \"K\"\n ],\n \"AD\": [\n \"H\",\n \"hB\"\n ],\n \"AM\": [\n \"H\",\n \"hB\"\n ],\n \"AO\": [\n \"H\",\n \"hB\"\n ],\n \"AT\": [\n \"H\",\n \"hB\"\n ],\n \"AW\": [\n \"H\",\n \"hB\"\n ],\n \"BE\": [\n \"H\",\n \"hB\"\n ],\n \"BF\": [\n \"H\",\n \"hB\"\n ],\n \"BJ\": [\n \"H\",\n \"hB\"\n ],\n \"BL\": [\n \"H\",\n \"hB\"\n ],\n \"BR\": [\n \"H\",\n \"hB\"\n ],\n \"CG\": [\n \"H\",\n \"hB\"\n ],\n \"CI\": [\n \"H\",\n \"hB\"\n ],\n \"CV\": [\n \"H\",\n \"hB\"\n ],\n \"DE\": [\n \"H\",\n \"hB\"\n ],\n \"EE\": [\n \"H\",\n \"hB\"\n ],\n \"FR\": [\n \"H\",\n \"hB\"\n ],\n \"GA\": [\n \"H\",\n \"hB\"\n ],\n \"GF\": [\n \"H\",\n \"hB\"\n ],\n \"GN\": [\n \"H\",\n \"hB\"\n ],\n \"GP\": [\n \"H\",\n \"hB\"\n ],\n \"GW\": [\n \"H\",\n \"hB\"\n ],\n \"HR\": [\n \"H\",\n \"hB\"\n ],\n \"IL\": [\n \"H\",\n \"hB\"\n ],\n \"IT\": [\n \"H\",\n \"hB\"\n ],\n \"KZ\": [\n \"H\",\n \"hB\"\n ],\n \"MC\": [\n \"H\",\n \"hB\"\n ],\n \"MD\": [\n \"H\",\n \"hB\"\n ],\n \"MF\": [\n \"H\",\n \"hB\"\n ],\n \"MQ\": [\n \"H\",\n \"hB\"\n ],\n \"MZ\": [\n \"H\",\n \"hB\"\n ],\n \"NC\": [\n \"H\",\n \"hB\"\n ],\n \"NL\": [\n \"H\",\n \"hB\"\n ],\n \"PM\": [\n \"H\",\n \"hB\"\n ],\n \"PT\": [\n \"H\",\n \"hB\"\n ],\n \"RE\": [\n \"H\",\n \"hB\"\n ],\n \"RO\": [\n \"H\",\n \"hB\"\n ],\n \"SI\": [\n \"H\",\n \"hB\"\n ],\n \"SR\": [\n \"H\",\n \"hB\"\n ],\n \"ST\": [\n \"H\",\n \"hB\"\n ],\n \"TG\": [\n \"H\",\n \"hB\"\n ],\n \"TR\": [\n \"H\",\n \"hB\"\n ],\n \"WF\": [\n \"H\",\n \"hB\"\n ],\n \"YT\": [\n \"H\",\n \"hB\"\n ],\n \"BD\": [\n \"h\",\n \"hB\",\n \"H\"\n ],\n \"PK\": [\n \"h\",\n \"hB\",\n \"H\"\n ],\n \"AZ\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BA\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BG\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"CH\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"GE\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"LI\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"ME\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"RS\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"UA\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"UZ\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"XK\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"AG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"AU\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BB\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BS\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"CA\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"DM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"en-001\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"FJ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"FM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GD\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GU\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"JM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KI\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KN\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"LC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"LR\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MH\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MP\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MW\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"NZ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SB\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SL\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SS\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SZ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TT\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"UM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"US\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VI\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"ZM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BO\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"EC\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"ES\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"GQ\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"PE\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"AE\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"ar-001\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"BH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"DZ\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"EG\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"EH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"HK\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"IQ\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"JO\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"KW\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"LB\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"LY\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MO\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MR\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"OM\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PS\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"QA\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SA\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SD\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SY\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"TN\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"YE\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"AF\": [\n \"H\",\n \"hb\",\n \"hB\",\n \"h\"\n ],\n \"LA\": [\n \"H\",\n \"hb\",\n \"hB\",\n \"h\"\n ],\n \"CN\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"LV\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"TL\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"zu-ZA\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"CD\": [\n \"hB\",\n \"H\"\n ],\n \"IR\": [\n \"hB\",\n \"H\"\n ],\n \"hi-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"kn-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"ml-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"te-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"KH\": [\n \"hB\",\n \"h\",\n \"H\",\n \"hb\"\n ],\n \"ta-IN\": [\n \"hB\",\n \"h\",\n \"hb\",\n \"H\"\n ],\n \"BN\": [\n \"hb\",\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"MY\": [\n \"hb\",\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"ET\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"gu-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"mr-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"pa-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"TW\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"KE\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"MM\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"TZ\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"UG\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ]\n};\n","export var TYPE;\n(function (TYPE) {\n /**\n * Raw text\n */\n TYPE[TYPE[\"literal\"] = 0] = \"literal\";\n /**\n * Variable w/o any format, e.g `var` in `this is a {var}`\n */\n TYPE[TYPE[\"argument\"] = 1] = \"argument\";\n /**\n * Variable w/ number format\n */\n TYPE[TYPE[\"number\"] = 2] = \"number\";\n /**\n * Variable w/ date format\n */\n TYPE[TYPE[\"date\"] = 3] = \"date\";\n /**\n * Variable w/ time format\n */\n TYPE[TYPE[\"time\"] = 4] = \"time\";\n /**\n * Variable w/ select format\n */\n TYPE[TYPE[\"select\"] = 5] = \"select\";\n /**\n * Variable w/ plural format\n */\n TYPE[TYPE[\"plural\"] = 6] = \"plural\";\n /**\n * Only possible within plural argument.\n * This is the `#` symbol that will be substituted with the count.\n */\n TYPE[TYPE[\"pound\"] = 7] = \"pound\";\n /**\n * XML-like tag\n */\n TYPE[TYPE[\"tag\"] = 8] = \"tag\";\n})(TYPE || (TYPE = {}));\nexport var SKELETON_TYPE;\n(function (SKELETON_TYPE) {\n SKELETON_TYPE[SKELETON_TYPE[\"number\"] = 0] = \"number\";\n SKELETON_TYPE[SKELETON_TYPE[\"dateTime\"] = 1] = \"dateTime\";\n})(SKELETON_TYPE || (SKELETON_TYPE = {}));\n/**\n * Type Guards\n */\nexport function isLiteralElement(el) {\n return el.type === TYPE.literal;\n}\nexport function isArgumentElement(el) {\n return el.type === TYPE.argument;\n}\nexport function isNumberElement(el) {\n return el.type === TYPE.number;\n}\nexport function isDateElement(el) {\n return el.type === TYPE.date;\n}\nexport function isTimeElement(el) {\n return el.type === TYPE.time;\n}\nexport function isSelectElement(el) {\n return el.type === TYPE.select;\n}\nexport function isPluralElement(el) {\n return el.type === TYPE.plural;\n}\nexport function isPoundElement(el) {\n return el.type === TYPE.pound;\n}\nexport function isTagElement(el) {\n return el.type === TYPE.tag;\n}\nexport function isNumberSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number);\n}\nexport function isDateTimeSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime);\n}\nexport function createLiteralElement(value) {\n return {\n type: TYPE.literal,\n value: value,\n };\n}\nexport function createNumberElement(value, style) {\n return {\n type: TYPE.number,\n value: value,\n style: style,\n };\n}\n","/**\n * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n * with some tweaks\n */\nvar DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n * Parse Date time skeleton into Intl.DateTimeFormatOptions\n * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * @public\n * @param skeleton skeleton string\n */\nexport function parseDateTimeSkeleton(skeleton) {\n var result = {};\n skeleton.replace(DATE_TIME_REGEX, function (match) {\n var len = match.length;\n switch (match[0]) {\n // Era\n case 'G':\n result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n // Year\n case 'y':\n result.year = len === 2 ? '2-digit' : 'numeric';\n break;\n case 'Y':\n case 'u':\n case 'U':\n case 'r':\n throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');\n // Quarter\n case 'q':\n case 'Q':\n throw new RangeError('`q/Q` (quarter) patterns are not supported');\n // Month\n case 'M':\n case 'L':\n result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];\n break;\n // Week\n case 'w':\n case 'W':\n throw new RangeError('`w/W` (week) patterns are not supported');\n case 'd':\n result.day = ['numeric', '2-digit'][len - 1];\n break;\n case 'D':\n case 'F':\n case 'g':\n throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');\n // Weekday\n case 'E':\n result.weekday = len === 4 ? 'short' : len === 5 ? 'narrow' : 'short';\n break;\n case 'e':\n if (len < 4) {\n throw new RangeError('`e..eee` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n case 'c':\n if (len < 4) {\n throw new RangeError('`c..ccc` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n // Period\n case 'a': // AM, PM\n result.hour12 = true;\n break;\n case 'b': // am, pm, noon, midnight\n case 'B': // flexible day periods\n throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');\n // Hour\n case 'h':\n result.hourCycle = 'h12';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'H':\n result.hourCycle = 'h23';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'K':\n result.hourCycle = 'h11';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'k':\n result.hourCycle = 'h24';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'j':\n case 'J':\n case 'C':\n throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');\n // Minute\n case 'm':\n result.minute = ['numeric', '2-digit'][len - 1];\n break;\n // Second\n case 's':\n result.second = ['numeric', '2-digit'][len - 1];\n break;\n case 'S':\n case 'A':\n throw new RangeError('`S/A` (second) patterns are not supported, use `s` instead');\n // Zone\n case 'z': // 1..3, 4: specific non-location format\n result.timeZoneName = len < 4 ? 'short' : 'long';\n break;\n case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n case 'O': // 1, 4: miliseconds in day short, long\n case 'v': // 1, 4: generic non-location format\n case 'V': // 1, 2, 3, 4: time zone ID or city\n case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n case 'x': // 1, 2, 3, 4: The ISO8601 varios formats\n throw new RangeError('`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead');\n }\n return '';\n });\n return result;\n}\n","import { __assign } from \"tslib\";\nimport { WHITE_SPACE_REGEX } from './regex.generated';\nexport function parseNumberSkeletonFromString(skeleton) {\n if (skeleton.length === 0) {\n throw new Error('Number skeleton cannot be empty');\n }\n // Parse the skeleton\n var stringTokens = skeleton\n .split(WHITE_SPACE_REGEX)\n .filter(function (x) { return x.length > 0; });\n var tokens = [];\n for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {\n var stringToken = stringTokens_1[_i];\n var stemAndOptions = stringToken.split('/');\n if (stemAndOptions.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n var stem = stemAndOptions[0], options = stemAndOptions.slice(1);\n for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {\n var option = options_1[_a];\n if (option.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n }\n tokens.push({ stem: stem, options: options });\n }\n return tokens;\n}\nfunction icuUnitToEcma(unit) {\n return unit.replace(/^(.*?)-/, '');\n}\nvar FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g;\nvar SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?[rs]?$/g;\nvar INTEGER_WIDTH_REGEX = /(\\*)(0+)|(#+)(0+)|(0+)/g;\nvar CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;\nfunction parseSignificantPrecision(str) {\n var result = {};\n if (str[str.length - 1] === 'r') {\n result.roundingPriority = 'morePrecision';\n }\n else if (str[str.length - 1] === 's') {\n result.roundingPriority = 'lessPrecision';\n }\n str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {\n // @@@ case\n if (typeof g2 !== 'string') {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits = g1.length;\n }\n // @@@+ case\n else if (g2 === '+') {\n result.minimumSignificantDigits = g1.length;\n }\n // .### case\n else if (g1[0] === '#') {\n result.maximumSignificantDigits = g1.length;\n }\n // .@@## or .@@@ case\n else {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits =\n g1.length + (typeof g2 === 'string' ? g2.length : 0);\n }\n return '';\n });\n return result;\n}\nfunction parseSign(str) {\n switch (str) {\n case 'sign-auto':\n return {\n signDisplay: 'auto',\n };\n case 'sign-accounting':\n case '()':\n return {\n currencySign: 'accounting',\n };\n case 'sign-always':\n case '+!':\n return {\n signDisplay: 'always',\n };\n case 'sign-accounting-always':\n case '()!':\n return {\n signDisplay: 'always',\n currencySign: 'accounting',\n };\n case 'sign-except-zero':\n case '+?':\n return {\n signDisplay: 'exceptZero',\n };\n case 'sign-accounting-except-zero':\n case '()?':\n return {\n signDisplay: 'exceptZero',\n currencySign: 'accounting',\n };\n case 'sign-never':\n case '+_':\n return {\n signDisplay: 'never',\n };\n }\n}\nfunction parseConciseScientificAndEngineeringStem(stem) {\n // Engineering\n var result;\n if (stem[0] === 'E' && stem[1] === 'E') {\n result = {\n notation: 'engineering',\n };\n stem = stem.slice(2);\n }\n else if (stem[0] === 'E') {\n result = {\n notation: 'scientific',\n };\n stem = stem.slice(1);\n }\n if (result) {\n var signDisplay = stem.slice(0, 2);\n if (signDisplay === '+!') {\n result.signDisplay = 'always';\n stem = stem.slice(2);\n }\n else if (signDisplay === '+?') {\n result.signDisplay = 'exceptZero';\n stem = stem.slice(2);\n }\n if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {\n throw new Error('Malformed concise eng/scientific notation');\n }\n result.minimumIntegerDigits = stem.length;\n }\n return result;\n}\nfunction parseNotationOptions(opt) {\n var result = {};\n var signOpts = parseSign(opt);\n if (signOpts) {\n return signOpts;\n }\n return result;\n}\n/**\n * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n */\nexport function parseNumberSkeleton(tokens) {\n var result = {};\n for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n var token = tokens_1[_i];\n switch (token.stem) {\n case 'percent':\n case '%':\n result.style = 'percent';\n continue;\n case '%x100':\n result.style = 'percent';\n result.scale = 100;\n continue;\n case 'currency':\n result.style = 'currency';\n result.currency = token.options[0];\n continue;\n case 'group-off':\n case ',_':\n result.useGrouping = false;\n continue;\n case 'precision-integer':\n case '.':\n result.maximumFractionDigits = 0;\n continue;\n case 'measure-unit':\n case 'unit':\n result.style = 'unit';\n result.unit = icuUnitToEcma(token.options[0]);\n continue;\n case 'compact-short':\n case 'K':\n result.notation = 'compact';\n result.compactDisplay = 'short';\n continue;\n case 'compact-long':\n case 'KK':\n result.notation = 'compact';\n result.compactDisplay = 'long';\n continue;\n case 'scientific':\n result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'engineering':\n result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'notation-simple':\n result.notation = 'standard';\n continue;\n // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h\n case 'unit-width-narrow':\n result.currencyDisplay = 'narrowSymbol';\n result.unitDisplay = 'narrow';\n continue;\n case 'unit-width-short':\n result.currencyDisplay = 'code';\n result.unitDisplay = 'short';\n continue;\n case 'unit-width-full-name':\n result.currencyDisplay = 'name';\n result.unitDisplay = 'long';\n continue;\n case 'unit-width-iso-code':\n result.currencyDisplay = 'symbol';\n continue;\n case 'scale':\n result.scale = parseFloat(token.options[0]);\n continue;\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n case 'integer-width':\n if (token.options.length > 1) {\n throw new RangeError('integer-width stems only accept a single optional option');\n }\n token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) {\n if (g1) {\n result.minimumIntegerDigits = g2.length;\n }\n else if (g3 && g4) {\n throw new Error('We currently do not support maximum integer digits');\n }\n else if (g5) {\n throw new Error('We currently do not support exact integer digits');\n }\n return '';\n });\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {\n result.minimumIntegerDigits = token.stem.length;\n continue;\n }\n if (FRACTION_PRECISION_REGEX.test(token.stem)) {\n // Precision\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision\n // precision-integer case\n if (token.options.length > 1) {\n throw new RangeError('Fraction-precision stems only accept a single optional option');\n }\n token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) {\n // .000* case (before ICU67 it was .000+)\n if (g2 === '*') {\n result.minimumFractionDigits = g1.length;\n }\n // .### case\n else if (g3 && g3[0] === '#') {\n result.maximumFractionDigits = g3.length;\n }\n // .00## case\n else if (g4 && g5) {\n result.minimumFractionDigits = g4.length;\n result.maximumFractionDigits = g4.length + g5.length;\n }\n else {\n result.minimumFractionDigits = g1.length;\n result.maximumFractionDigits = g1.length;\n }\n return '';\n });\n var opt = token.options[0];\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display\n if (opt === 'w') {\n result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });\n }\n else if (opt) {\n result = __assign(__assign({}, result), parseSignificantPrecision(opt));\n }\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision\n if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));\n continue;\n }\n var signOpts = parseSign(token.stem);\n if (signOpts) {\n result = __assign(__assign({}, result), signOpts);\n }\n var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);\n if (conciseScientificAndEngineeringOpts) {\n result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);\n }\n }\n return result;\n}\n","// @generated from regex-gen.ts\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;\n","/**\n * https://tc39.es/ecma402/#sec-bestavailablelocale\n * @param availableLocales\n * @param locale\n */\nexport function BestAvailableLocale(availableLocales, locale) {\n var candidate = locale;\n while (true) {\n if (availableLocales.has(candidate)) {\n return candidate;\n }\n var pos = candidate.lastIndexOf('-');\n if (!~pos) {\n return undefined;\n }\n if (pos >= 2 && candidate[pos - 2] === '-') {\n pos -= 2;\n }\n candidate = candidate.slice(0, pos);\n }\n}\n","import { BestAvailableLocale } from './BestAvailableLocale';\nimport { UNICODE_EXTENSION_SEQUENCE_REGEX } from './utils';\n/**\n * https://tc39.es/ecma402/#sec-bestfitmatcher\n * @param availableLocales\n * @param requestedLocales\n * @param getDefaultLocale\n */\nexport function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {\n var minimizedAvailableLocaleMap = {};\n var availableLocaleMap = {};\n var canonicalizedLocaleMap = {};\n var minimizedAvailableLocales = new Set();\n availableLocales.forEach(function (locale) {\n var minimizedLocale = new Intl.Locale(locale)\n .minimize()\n .toString();\n var canonicalizedLocale = Intl.getCanonicalLocales(locale)[0] || locale;\n minimizedAvailableLocaleMap[minimizedLocale] = locale;\n availableLocaleMap[locale] = locale;\n canonicalizedLocaleMap[canonicalizedLocale] = locale;\n minimizedAvailableLocales.add(minimizedLocale);\n minimizedAvailableLocales.add(locale);\n minimizedAvailableLocales.add(canonicalizedLocale);\n });\n var foundLocale;\n for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {\n var l = requestedLocales_1[_i];\n if (foundLocale) {\n break;\n }\n var noExtensionLocale = l.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, '');\n if (availableLocales.has(noExtensionLocale)) {\n foundLocale = noExtensionLocale;\n break;\n }\n if (minimizedAvailableLocales.has(noExtensionLocale)) {\n foundLocale = noExtensionLocale;\n break;\n }\n var locale = new Intl.Locale(noExtensionLocale);\n var maximizedRequestedLocale = locale.maximize().toString();\n var minimizedRequestedLocale = locale.minimize().toString();\n // Check minimized locale\n if (minimizedAvailableLocales.has(minimizedRequestedLocale)) {\n foundLocale = minimizedRequestedLocale;\n break;\n }\n // Lookup algo on maximized locale\n foundLocale = BestAvailableLocale(minimizedAvailableLocales, maximizedRequestedLocale);\n }\n if (!foundLocale) {\n return { locale: getDefaultLocale() };\n }\n return {\n locale: availableLocaleMap[foundLocale] ||\n canonicalizedLocaleMap[foundLocale] ||\n minimizedAvailableLocaleMap[foundLocale] ||\n foundLocale,\n };\n}\n","import { UNICODE_EXTENSION_SEQUENCE_REGEX } from './utils';\nimport { BestAvailableLocale } from './BestAvailableLocale';\n/**\n * https://tc39.es/ecma402/#sec-lookupmatcher\n * @param availableLocales\n * @param requestedLocales\n * @param getDefaultLocale\n */\nexport function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {\n var result = { locale: '' };\n for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {\n var locale = requestedLocales_1[_i];\n var noExtensionLocale = locale.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, '');\n var availableLocale = BestAvailableLocale(availableLocales, noExtensionLocale);\n if (availableLocale) {\n result.locale = availableLocale;\n if (locale !== noExtensionLocale) {\n result.extension = locale.slice(noExtensionLocale.length + 1, locale.length);\n }\n return result;\n }\n }\n result.locale = getDefaultLocale();\n return result;\n}\n","import { UNICODE_EXTENSION_SEQUENCE_REGEX } from './utils';\nimport { BestAvailableLocale } from './BestAvailableLocale';\n/**\n * https://tc39.es/ecma402/#sec-lookupsupportedlocales\n * @param availableLocales\n * @param requestedLocales\n */\nexport function LookupSupportedLocales(availableLocales, requestedLocales) {\n var subset = [];\n for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {\n var locale = requestedLocales_1[_i];\n var noExtensionLocale = locale.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, '');\n var availableLocale = BestAvailableLocale(availableLocales, noExtensionLocale);\n if (availableLocale) {\n subset.push(availableLocale);\n }\n }\n return subset;\n}\n","import { LookupMatcher } from './LookupMatcher';\nimport { BestFitMatcher } from './BestFitMatcher';\nimport { invariant } from './utils';\nimport { UnicodeExtensionValue } from './UnicodeExtensionValue';\n/**\n * https://tc39.es/ecma402/#sec-resolvelocale\n */\nexport function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {\n var matcher = options.localeMatcher;\n var r;\n if (matcher === 'lookup') {\n r = LookupMatcher(availableLocales, requestedLocales, getDefaultLocale);\n }\n else {\n r = BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale);\n }\n var foundLocale = r.locale;\n var result = { locale: '', dataLocale: foundLocale };\n var supportedExtension = '-u';\n for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {\n var key = relevantExtensionKeys_1[_i];\n invariant(foundLocale in localeData, \"Missing locale data for \".concat(foundLocale));\n var foundLocaleData = localeData[foundLocale];\n invariant(typeof foundLocaleData === 'object' && foundLocaleData !== null, \"locale data \".concat(key, \" must be an object\"));\n var keyLocaleData = foundLocaleData[key];\n invariant(Array.isArray(keyLocaleData), \"keyLocaleData for \".concat(key, \" must be an array\"));\n var value = keyLocaleData[0];\n invariant(typeof value === 'string' || value === null, \"value must be string or null but got \".concat(typeof value, \" in key \").concat(key));\n var supportedExtensionAddition = '';\n if (r.extension) {\n var requestedValue = UnicodeExtensionValue(r.extension, key);\n if (requestedValue !== undefined) {\n if (requestedValue !== '') {\n if (~keyLocaleData.indexOf(requestedValue)) {\n value = requestedValue;\n supportedExtensionAddition = \"-\".concat(key, \"-\").concat(value);\n }\n }\n else if (~requestedValue.indexOf('true')) {\n value = 'true';\n supportedExtensionAddition = \"-\".concat(key);\n }\n }\n }\n if (key in options) {\n var optionsValue = options[key];\n invariant(typeof optionsValue === 'string' ||\n typeof optionsValue === 'undefined' ||\n optionsValue === null, 'optionsValue must be String, Undefined or Null');\n if (~keyLocaleData.indexOf(optionsValue)) {\n if (optionsValue !== value) {\n value = optionsValue;\n supportedExtensionAddition = '';\n }\n }\n }\n result[key] = value;\n supportedExtension += supportedExtensionAddition;\n }\n if (supportedExtension.length > 2) {\n var privateIndex = foundLocale.indexOf('-x-');\n if (privateIndex === -1) {\n foundLocale = foundLocale + supportedExtension;\n }\n else {\n var preExtension = foundLocale.slice(0, privateIndex);\n var postExtension = foundLocale.slice(privateIndex, foundLocale.length);\n foundLocale = preExtension + supportedExtension + postExtension;\n }\n foundLocale = Intl.getCanonicalLocales(foundLocale)[0];\n }\n result.locale = foundLocale;\n return result;\n}\n","import { invariant } from './utils';\n/**\n * https://tc39.es/ecma402/#sec-unicodeextensionvalue\n * @param extension\n * @param key\n */\nexport function UnicodeExtensionValue(extension, key) {\n invariant(key.length === 2, 'key must have 2 elements');\n var size = extension.length;\n var searchValue = \"-\".concat(key, \"-\");\n var pos = extension.indexOf(searchValue);\n if (pos !== -1) {\n var start = pos + 4;\n var end = start;\n var k = start;\n var done = false;\n while (!done) {\n var e = extension.indexOf('-', k);\n var len = void 0;\n if (e === -1) {\n len = size - k;\n }\n else {\n len = e - k;\n }\n if (len === 2) {\n done = true;\n }\n else if (e === -1) {\n end = size;\n done = true;\n }\n else {\n end = e;\n k = e + 1;\n }\n }\n return extension.slice(start, end);\n }\n searchValue = \"-\".concat(key);\n pos = extension.indexOf(searchValue);\n if (pos !== -1 && pos + 3 === size) {\n return '';\n }\n return undefined;\n}\n","export var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;\nexport function invariant(condition, message, Err) {\n if (Err === void 0) { Err = Error; }\n if (!condition) {\n throw new Err(message);\n }\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nimport { IntlMessageFormat } from './src/core';\nexport * from './src/formatters';\nexport * from './src/core';\nexport * from './src/error';\nexport default IntlMessageFormat;\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nimport { __assign, __spreadArray } from \"tslib\";\nimport { parse } from '@formatjs/icu-messageformat-parser';\nimport memoize, { strategies } from '@formatjs/fast-memoize';\nimport { formatToParts, PART_TYPE, } from './formatters';\n// -- MessageFormat --------------------------------------------------------\nfunction mergeConfig(c1, c2) {\n if (!c2) {\n return c1;\n }\n return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {\n all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));\n return all;\n }, {}));\n}\nfunction mergeConfigs(defaultConfig, configs) {\n if (!configs) {\n return defaultConfig;\n }\n return Object.keys(defaultConfig).reduce(function (all, k) {\n all[k] = mergeConfig(defaultConfig[k], configs[k]);\n return all;\n }, __assign({}, defaultConfig));\n}\nfunction createFastMemoizeCache(store) {\n return {\n create: function () {\n return {\n get: function (key) {\n return store[key];\n },\n set: function (key, value) {\n store[key] = value;\n },\n };\n },\n };\n}\nfunction createDefaultFormatters(cache) {\n if (cache === void 0) { cache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n }; }\n return {\n getNumberFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.number),\n strategy: strategies.variadic,\n }),\n getDateTimeFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: strategies.variadic,\n }),\n getPluralRules: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: strategies.variadic,\n }),\n };\n}\nvar IntlMessageFormat = /** @class */ (function () {\n function IntlMessageFormat(message, locales, overrideFormats, opts) {\n var _this = this;\n if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }\n this.formatterCache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n };\n this.format = function (values) {\n var parts = _this.formatToParts(values);\n // Hot path for straight simple msg translations\n if (parts.length === 1) {\n return parts[0].value;\n }\n var result = parts.reduce(function (all, part) {\n if (!all.length ||\n part.type !== PART_TYPE.literal ||\n typeof all[all.length - 1] !== 'string') {\n all.push(part.value);\n }\n else {\n all[all.length - 1] += part.value;\n }\n return all;\n }, []);\n if (result.length <= 1) {\n return result[0] || '';\n }\n return result;\n };\n this.formatToParts = function (values) {\n return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);\n };\n this.resolvedOptions = function () { return ({\n locale: _this.resolvedLocale.toString(),\n }); };\n this.getAst = function () { return _this.ast; };\n // Defined first because it's used to build the format pattern.\n this.locales = locales;\n this.resolvedLocale = IntlMessageFormat.resolveLocale(locales);\n if (typeof message === 'string') {\n this.message = message;\n if (!IntlMessageFormat.__parse) {\n throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');\n }\n // Parse string messages into an AST.\n this.ast = IntlMessageFormat.__parse(message, {\n ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag,\n locale: this.resolvedLocale,\n });\n }\n else {\n this.ast = message;\n }\n if (!Array.isArray(this.ast)) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n this.formatters =\n (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);\n }\n Object.defineProperty(IntlMessageFormat, \"defaultLocale\", {\n get: function () {\n if (!IntlMessageFormat.memoizedDefaultLocale) {\n IntlMessageFormat.memoizedDefaultLocale =\n new Intl.NumberFormat().resolvedOptions().locale;\n }\n return IntlMessageFormat.memoizedDefaultLocale;\n },\n enumerable: false,\n configurable: true\n });\n IntlMessageFormat.memoizedDefaultLocale = null;\n IntlMessageFormat.resolveLocale = function (locales) {\n var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);\n if (supportedLocales.length > 0) {\n return new Intl.Locale(supportedLocales[0]);\n }\n return new Intl.Locale(typeof locales === 'string' ? locales : locales[0]);\n };\n IntlMessageFormat.__parse = parse;\n // Default format options used as the prototype of the `formats` provided to the\n // constructor. These are used when constructing the internal Intl.NumberFormat\n // and Intl.DateTimeFormat instances.\n IntlMessageFormat.formats = {\n number: {\n integer: {\n maximumFractionDigits: 0,\n },\n currency: {\n style: 'currency',\n },\n percent: {\n style: 'percent',\n },\n },\n date: {\n short: {\n month: 'numeric',\n day: 'numeric',\n year: '2-digit',\n },\n medium: {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n },\n long: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n full: {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n time: {\n short: {\n hour: 'numeric',\n minute: 'numeric',\n },\n medium: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n long: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n full: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n },\n };\n return IntlMessageFormat;\n}());\nexport { IntlMessageFormat };\n","import { __extends } from \"tslib\";\nexport var ErrorCode;\n(function (ErrorCode) {\n // When we have a placeholder but no value to format\n ErrorCode[\"MISSING_VALUE\"] = \"MISSING_VALUE\";\n // When value supplied is invalid\n ErrorCode[\"INVALID_VALUE\"] = \"INVALID_VALUE\";\n // When we need specific Intl API but it's not available\n ErrorCode[\"MISSING_INTL_API\"] = \"MISSING_INTL_API\";\n})(ErrorCode || (ErrorCode = {}));\nvar FormatError = /** @class */ (function (_super) {\n __extends(FormatError, _super);\n function FormatError(msg, code, originalMessage) {\n var _this = _super.call(this, msg) || this;\n _this.code = code;\n _this.originalMessage = originalMessage;\n return _this;\n }\n FormatError.prototype.toString = function () {\n return \"[formatjs Error: \".concat(this.code, \"] \").concat(this.message);\n };\n return FormatError;\n}(Error));\nexport { FormatError };\nvar InvalidValueError = /** @class */ (function (_super) {\n __extends(InvalidValueError, _super);\n function InvalidValueError(variableId, value, options, originalMessage) {\n return _super.call(this, \"Invalid values for \\\"\".concat(variableId, \"\\\": \\\"\").concat(value, \"\\\". Options are \\\"\").concat(Object.keys(options).join('\", \"'), \"\\\"\"), ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueError;\n}(FormatError));\nexport { InvalidValueError };\nvar InvalidValueTypeError = /** @class */ (function (_super) {\n __extends(InvalidValueTypeError, _super);\n function InvalidValueTypeError(value, type, originalMessage) {\n return _super.call(this, \"Value for \\\"\".concat(value, \"\\\" must be of type \").concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueTypeError;\n}(FormatError));\nexport { InvalidValueTypeError };\nvar MissingValueError = /** @class */ (function (_super) {\n __extends(MissingValueError, _super);\n function MissingValueError(variableId, originalMessage) {\n return _super.call(this, \"The intl string context variable \\\"\".concat(variableId, \"\\\" was not provided to the string \\\"\").concat(originalMessage, \"\\\"\"), ErrorCode.MISSING_VALUE, originalMessage) || this;\n }\n return MissingValueError;\n}(FormatError));\nexport { MissingValueError };\n","import { isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTimeElement, isTagElement, } from '@formatjs/icu-messageformat-parser';\nimport { MissingValueError, InvalidValueError, ErrorCode, FormatError, InvalidValueTypeError, } from './error';\nexport var PART_TYPE;\n(function (PART_TYPE) {\n PART_TYPE[PART_TYPE[\"literal\"] = 0] = \"literal\";\n PART_TYPE[PART_TYPE[\"object\"] = 1] = \"object\";\n})(PART_TYPE || (PART_TYPE = {}));\nfunction mergeLiteral(parts) {\n if (parts.length < 2) {\n return parts;\n }\n return parts.reduce(function (all, part) {\n var lastPart = all[all.length - 1];\n if (!lastPart ||\n lastPart.type !== PART_TYPE.literal ||\n part.type !== PART_TYPE.literal) {\n all.push(part);\n }\n else {\n lastPart.value += part.value;\n }\n return all;\n }, []);\n}\nexport function isFormatXMLElementFn(el) {\n return typeof el === 'function';\n}\n// TODO(skeleton): add skeleton support\nexport function formatToParts(els, locales, formatters, formats, values, currentPluralValue, \n// For debugging\noriginalMessage) {\n // Hot path for straight simple msg translations\n if (els.length === 1 && isLiteralElement(els[0])) {\n return [\n {\n type: PART_TYPE.literal,\n value: els[0].value,\n },\n ];\n }\n var result = [];\n for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {\n var el = els_1[_i];\n // Exit early for string parts.\n if (isLiteralElement(el)) {\n result.push({\n type: PART_TYPE.literal,\n value: el.value,\n });\n continue;\n }\n // TODO: should this part be literal type?\n // Replace `#` in plural rules with the actual numeric value.\n if (isPoundElement(el)) {\n if (typeof currentPluralValue === 'number') {\n result.push({\n type: PART_TYPE.literal,\n value: formatters.getNumberFormat(locales).format(currentPluralValue),\n });\n }\n continue;\n }\n var varName = el.value;\n // Enforce that all required values are provided by the caller.\n if (!(values && varName in values)) {\n throw new MissingValueError(varName, originalMessage);\n }\n var value = values[varName];\n if (isArgumentElement(el)) {\n if (!value || typeof value === 'string' || typeof value === 'number') {\n value =\n typeof value === 'string' || typeof value === 'number'\n ? String(value)\n : '';\n }\n result.push({\n type: typeof value === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: value,\n });\n continue;\n }\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (isDateElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.date[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTimeElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.time[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : formats.time.medium;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isNumberElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.number[el.style]\n : isNumberSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n if (style && style.scale) {\n value =\n value *\n (style.scale || 1);\n }\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getNumberFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTagElement(el)) {\n var children = el.children, value_1 = el.value;\n var formatFn = values[value_1];\n if (!isFormatXMLElementFn(formatFn)) {\n throw new InvalidValueTypeError(value_1, 'function', originalMessage);\n }\n var parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue);\n var chunks = formatFn(parts.map(function (p) { return p.value; }));\n if (!Array.isArray(chunks)) {\n chunks = [chunks];\n }\n result.push.apply(result, chunks.map(function (c) {\n return {\n type: typeof c === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: c,\n };\n }));\n }\n if (isSelectElement(el)) {\n var opt = el.options[value] || el.options.other;\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));\n continue;\n }\n if (isPluralElement(el)) {\n var opt = el.options[\"=\".concat(value)];\n if (!opt) {\n if (!Intl.PluralRules) {\n throw new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API, originalMessage);\n }\n var rule = formatters\n .getPluralRules(locales, { type: el.pluralType })\n .select(value - (el.offset || 0));\n opt = el.options[rule] || el.options.other;\n }\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));\n continue;\n }\n }\n return mergeLiteral(result);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = exports.Provider = void 0;\nvar tslib_1 = require(\"tslib\");\nvar React = (0, tslib_1.__importStar)(require(\"react\"));\nvar hoist_non_react_statics_1 = (0, tslib_1.__importDefault)(require(\"hoist-non-react-statics\"));\nvar utils_1 = require(\"../utils\");\nfunction getDisplayName(Component) {\n return Component.displayName || Component.name || 'Component';\n}\n// TODO: We should provide initial value here\nvar IntlContext = React.createContext(null);\nvar IntlConsumer = IntlContext.Consumer, IntlProvider = IntlContext.Provider;\nexports.Provider = IntlProvider;\nexports.Context = IntlContext;\nfunction injectIntl(WrappedComponent, options) {\n var _a = options || {}, _b = _a.intlPropName, intlPropName = _b === void 0 ? 'intl' : _b, _c = _a.forwardRef, forwardRef = _c === void 0 ? false : _c, _d = _a.enforceContext, enforceContext = _d === void 0 ? true : _d;\n var WithIntl = function (props) { return (React.createElement(IntlConsumer, null, function (intl) {\n var _a;\n if (enforceContext) {\n (0, utils_1.invariantIntlContext)(intl);\n }\n var intlProp = (_a = {}, _a[intlPropName] = intl, _a);\n return (React.createElement(WrappedComponent, (0, tslib_1.__assign)({}, props, intlProp, { ref: forwardRef ? props.forwardedRef : null })));\n })); };\n WithIntl.displayName = \"injectIntl(\".concat(getDisplayName(WrappedComponent), \")\");\n WithIntl.WrappedComponent = WrappedComponent;\n if (forwardRef) {\n return (0, hoist_non_react_statics_1.default)(React.forwardRef(function (props, ref) { return (React.createElement(WithIntl, (0, tslib_1.__assign)({}, props, { forwardedRef: ref }))); }), WrappedComponent);\n }\n return (0, hoist_non_react_statics_1.default)(WithIntl, WrappedComponent);\n}\nexports.default = injectIntl;\n","\"use strict\";\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createIntl = void 0;\nvar tslib_1 = require(\"tslib\");\nvar React = (0, tslib_1.__importStar)(require(\"react\"));\nvar injectIntl_1 = require(\"./injectIntl\");\nvar utils_1 = require(\"../utils\");\nvar intl_1 = require(\"@formatjs/intl\");\nvar intl_messageformat_1 = require(\"intl-messageformat\");\nfunction processIntlConfig(config) {\n return {\n locale: config.locale,\n timeZone: config.timeZone,\n fallbackOnEmptyString: config.fallbackOnEmptyString,\n formats: config.formats,\n textComponent: config.textComponent,\n messages: config.messages,\n defaultLocale: config.defaultLocale,\n defaultFormats: config.defaultFormats,\n onError: config.onError,\n onWarn: config.onWarn,\n wrapRichTextChunksInFragment: config.wrapRichTextChunksInFragment,\n defaultRichTextElements: config.defaultRichTextElements,\n };\n}\nfunction assignUniqueKeysToFormatXMLElementFnArgument(values) {\n if (!values) {\n return values;\n }\n return Object.keys(values).reduce(function (acc, k) {\n var v = values[k];\n acc[k] = (0, intl_messageformat_1.isFormatXMLElementFn)(v)\n ? (0, utils_1.assignUniqueKeysToParts)(v)\n : v;\n return acc;\n }, {});\n}\nvar formatMessage = function (config, formatters, descriptor, rawValues) {\n var rest = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n rest[_i - 4] = arguments[_i];\n }\n var values = assignUniqueKeysToFormatXMLElementFnArgument(rawValues);\n var chunks = intl_1.formatMessage.apply(void 0, (0, tslib_1.__spreadArray)([config,\n formatters,\n descriptor,\n values], rest, false));\n if (Array.isArray(chunks)) {\n return React.Children.toArray(chunks);\n }\n return chunks;\n};\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nvar createIntl = function (_a, cache) {\n var rawDefaultRichTextElements = _a.defaultRichTextElements, config = (0, tslib_1.__rest)(_a, [\"defaultRichTextElements\"]);\n var defaultRichTextElements = assignUniqueKeysToFormatXMLElementFnArgument(rawDefaultRichTextElements);\n var coreIntl = (0, intl_1.createIntl)((0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, utils_1.DEFAULT_INTL_CONFIG), config), { defaultRichTextElements: defaultRichTextElements }), cache);\n return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, coreIntl), { formatMessage: formatMessage.bind(null, {\n locale: coreIntl.locale,\n timeZone: coreIntl.timeZone,\n fallbackOnEmptyString: coreIntl.fallbackOnEmptyString,\n formats: coreIntl.formats,\n defaultLocale: coreIntl.defaultLocale,\n defaultFormats: coreIntl.defaultFormats,\n messages: coreIntl.messages,\n onError: coreIntl.onError,\n defaultRichTextElements: defaultRichTextElements,\n }, coreIntl.formatters) });\n};\nexports.createIntl = createIntl;\nvar IntlProvider = /** @class */ (function (_super) {\n (0, tslib_1.__extends)(IntlProvider, _super);\n function IntlProvider() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.cache = (0, intl_1.createIntlCache)();\n _this.state = {\n cache: _this.cache,\n intl: (0, exports.createIntl)(processIntlConfig(_this.props), _this.cache),\n prevConfig: processIntlConfig(_this.props),\n };\n return _this;\n }\n IntlProvider.getDerivedStateFromProps = function (props, _a) {\n var prevConfig = _a.prevConfig, cache = _a.cache;\n var config = processIntlConfig(props);\n if (!(0, utils_1.shallowEqual)(prevConfig, config)) {\n return {\n intl: (0, exports.createIntl)(config, cache),\n prevConfig: config,\n };\n }\n return null;\n };\n IntlProvider.prototype.render = function () {\n (0, utils_1.invariantIntlContext)(this.state.intl);\n return React.createElement(injectIntl_1.Provider, { value: this.state.intl }, this.props.children);\n };\n IntlProvider.displayName = 'IntlProvider';\n IntlProvider.defaultProps = utils_1.DEFAULT_INTL_CONFIG;\n return IntlProvider;\n}(React.PureComponent));\nexports.default = IntlProvider;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.shallowEqual = exports.assignUniqueKeysToParts = exports.DEFAULT_INTL_CONFIG = exports.invariantIntlContext = void 0;\nvar tslib_1 = require(\"tslib\");\nvar React = (0, tslib_1.__importStar)(require(\"react\"));\nvar ecma402_abstract_1 = require(\"@formatjs/ecma402-abstract\");\nvar intl_1 = require(\"@formatjs/intl\");\nfunction invariantIntlContext(intl) {\n (0, ecma402_abstract_1.invariant)(intl, '[React Intl] Could not find required `intl` object. ' +\n ' needs to exist in the component ancestry.');\n}\nexports.invariantIntlContext = invariantIntlContext;\nexports.DEFAULT_INTL_CONFIG = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, intl_1.DEFAULT_INTL_CONFIG), { textComponent: React.Fragment });\n/**\n * Takes a `formatXMLElementFn`, and composes it in function, which passes\n * argument `parts` through, assigning unique key to each part, to prevent\n * \"Each child in a list should have a unique \"key\"\" React error.\n * @param formatXMLElementFn\n */\nfunction assignUniqueKeysToParts(formatXMLElementFn) {\n return function (parts) {\n // eslint-disable-next-line prefer-rest-params\n return formatXMLElementFn(React.Children.toArray(parts));\n };\n}\nexports.assignUniqueKeysToParts = assignUniqueKeysToParts;\nfunction shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n if (!objA || !objB) {\n return false;\n }\n var aKeys = Object.keys(objA);\n var bKeys = Object.keys(objB);\n var len = aKeys.length;\n if (bKeys.length !== len) {\n return false;\n }\n for (var i = 0; i < len; i++) {\n var key = aKeys[i];\n if (objA[key] !== objB[key] ||\n !Object.prototype.hasOwnProperty.call(objB, key)) {\n return false;\n }\n }\n return true;\n}\nexports.shallowEqual = shallowEqual;\n"],"names":["isArray","Array","keyList","Object","keys","hasProp","prototype","hasOwnProperty","hasElementType","Element","equal","a","b","i","length","key","arrA","arrB","dateA","Date","dateB","getTime","regexpA","RegExp","regexpB","toString","call","$$typeof","module","exports","error","message","match","number","console","warn","name","processIntlConfig","config","locale","timeZone","fallbackOnEmptyString","formats","textComponent","messages","defaultLocale","defaultFormats","onError","onWarn","wrapRichTextChunksInFragment","defaultRichTextElements","assignUniqueKeysToFormatXMLElementFnArgument","values","reduce","acc","k","v","isFormatXMLElementFn","assignUniqueKeysToParts","formatMessage","formatters","descriptor","rawValues","rest","_i","arguments","chunks","coreFormatMessage","apply","__spreadArray","React","toArray","createIntl","_a","cache","rawDefaultRichTextElements","__rest","coreIntl","coreCreateIntl","__assign","DEFAULT_INTL_CONFIG","bind","_super","IntlProvider","_this","this","createIntlCache","state","intl","props","prevConfig","__extends","getDerivedStateFromProps","shallowEqual","render","invariantIntlContext","Provider","value","children","displayName","defaultProps","invariant","CORE_DEFAULT_INTL_CONFIG","formatXMLElementFn","parts","objA","objB","aKeys","bKeys","len","ToString","o","TypeError","String","ToNumber","val","undefined","NaN","Number","TimeClip","time","isFinite","Math","abs","n","isNaN","SameValue","integer","floor","ToInteger","ToObject","arg","x","y","is","ArrayCreate","HasOwnProperty","prop","Type","MS_PER_DAY","mod","Day","t","WeekDay","DayFromYear","UTC","TimeFromYear","YearFromTime","getUTCFullYear","DaysInYear","DayWithinYear","InLeapYear","MonthFromTime","dwy","leap","Error","DateFromTime","mft","HOURS_PER_DAY","MINUTES_PER_HOUR","SECONDS_PER_MINUTE","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","HourFromTime","MinFromTime","SecFromTime","OrdinaryHasInstance","C","O","internalSlots","boundTargetFunction","P","isPrototypeOf","msFromTime","CanonicalizeLocaleList","locales","Intl","getCanonicalLocales","CanonicalizeTimeZoneName","tz","tzData","uppercaseLinks","uppercasedTz","toUpperCase","uppercasedZones","all","z","ianaTimeZone","CoerceOptionsToObject","options","create","DefaultNumberOption","min","max","fallback","RangeError","concat","GetNumberOption","property","minimum","maximum","GetOption","opts","type","Boolean","filter","join","GetOptionsObject","SANCTIONED_UNITS","removeUnitNamespace","unit","slice","indexOf","SIMPLE_UNITS","map","IsSanctionedSimpleUnitIdentifier","unitIdentifier","IsValidTimeZoneName","zoneNames","Set","linkNames","forEach","add","linkName","has","NOT_A_Z_REGEX","IsWellFormedCurrencyCode","currency","replace","_","c","test","IsWellFormedUnitIdentifier","toLowerCase","units","split","numerator","denominator","ComputeExponent","numberFormat","getInternalSlots","magnitude","getMagnitude","exponent","ComputeExponentForMagnitude","pow","formatNumberResult","FormatNumericToString","roundedNumber","notation","dataLocaleData","numberingSystem","compactDisplay","style","currencyDisplay","thresholdMap","numbers","nu","short","decimal","long","num","thresholds","magnitudeKey","other","CurrencyDigits","currencyDigitsData","FormatNumericToParts","nf","implDetails","PartitionNumberPattern","result","parts_1","part","push","intlObject","isNegative","roundingType","ToRawPrecision","minimumSignificantDigits","maximumSignificantDigits","ToRawFixed","minimumFractionDigits","maximumFractionDigits","integerDigitsCount","string","formattedString","int","minInteger","minimumIntegerDigits","repeat","InitializeNumberFormat","localeData","availableLocales","numberingSystemNames","getDefaultLocale","requestedLocales","opt","matcher","localeMatcher","r","ResolveLocale","dataLocale","SetNumberFormatUnitOptions","mnfdDefault","mxfdDefault","cDigits","SetNumberFormatDigitOptions","useGrouping","signDisplay","_b","sign","pl","symbols","nan","infinity","formatToParts","mnid","mnfd","mxfd","mnsd","mxsd","mxfdActualDefault","currencySign","unitDisplay","minFraction","maxFraction","m","f","round","xFinal","mantissa","cut","minPrecision","maxPrecision","e","p","xToString","xToStringExponentIndex","xToStringMantissa","xToStringExponent","xToStringMantissaWithoutDecimalPoint","decimalPlaceOffset","adjustDecimalPlace","digitMapping","CARET_S_UNICODE_REGEX","S_UNICODE_REGEX","source","S_DOLLAR_UNICODE_REGEX","CLDR_NUMBER_PATTERN","numberResult","data","nonNameCurrencyPart","numberPattern","defaultNumberingSystem","compactNumberPattern","pattern","compactPluralRules","byNumberingSystem","selectPlural","compactPlaralRule","getPatternForSign","getCompactDisplayPattern","byCurrencyDisplay","currencies","symbol","narrow","standard","currencyData","percent","decimalNumberPattern","exec","afterCurrency","currencySpacing","afterInsertBetween","beforeCurrency","beforeInsertBetween","numberPatternParts","numberParts","numberPatternParts_1","paritionNumberIntoParts","minusSign","plusSign","percentSign","substring","unitName","unitPattern","currencyNameData","unitPatternParts_1","unitData","simple","numeratorUnit","denominatorUnit","numeratorUnitPattern","perUnitPattern","perUnit","perPattern","compound","per","denominatorPattern","_c","_d","interpolateMatch","digitReplacementTable","digit","fraction","decimalSepIndex","groupSepSymbol","group","groups","patternGroups","primaryGroupingSize","secondaryGroupingSize","integerGroup","pop","exponential","exponentResult","zeroPattern","negativePattern","rules","select","PartitionPattern","beginIndex","endIndex","nextIndex","SupportedLocales","LookupSupportedLocales","isMissingLocaleDataError","RangePatternType","log","LOG10E","s","times","arr","setInternalSlot","field","get","set","setMultiInternalSlots","getInternalSlot","getMultiInternalSlots","fields","slots","isLiteralPart","patternPart","defineProperty","target","configurable","enumerable","writable","condition","Err","memoize","fn","cacheDefault","serializer","serializerDefault","strategy","strategyDefault","monadic","cacheKey","computedValue","variadic","args","assemble","context","serialize","JSON","stringify","ObjectWithoutPrototypeCache","strategies","getBestPattern","skeleton","skeletonCopy","patternPos","patternChar","charAt","extraLength","hourLen","dayPeriodLen","hourChar","getDefaultHourSymbolFromLocale","hourCycle","hourCycles","regionTag","languageTag","language","maximize","region","timeData","ErrorKind","pruneLocation","els","el","location","isSelectElement","isPluralElement","isNumberElement","isNumberSkeleton","isDateElement","isTimeElement","isDateTimeSkeleton","isTagElement","parse","shouldParseSkeletons","requiresOtherClause","Parser","err","SyntaxError","kind","originalMessage","captureLocation","SPACE_SEPARATOR_START_REGEX","SPACE_SEPARATOR_REGEX","SPACE_SEPARATOR_END_REGEX","createLocation","start","end","hasNativeStartsWith","startsWith","hasNativeFromCodePoint","fromCodePoint","hasNativeFromEntries","fromEntries","hasNativeCodePointAt","codePointAt","hasTrimStart","trimStart","hasTrimEnd","trimEnd","isSafeInteger","REGEX_SUPPORTS_U_AND_Y","RE","matchIdentifierAtIndex","search","position","codePoints","code","elements","fromCharCode","entries","obj","entries_1","index","size","second","first","charCodeAt","flag","IDENTIFIER_PREFIX_RE_1","lastIndex","_isWhiteSpace","_isPatternSyntax","offset","line","column","ignoreTag","parseMessage","nestingLevel","parentArgType","expectingCloseTag","isEOF","char","parseArgument","peek","UNMATCHED_CLOSING_TAG","clonePosition","_isAlpha","parseTag","parseLiteral","bump","TYPE","pound","startPosition","tagName","parseTagName","bumpSpace","bumpIf","literal","childrenResult","endTagStartPosition","INVALID_TAG","closingTagNameStartPosition","tag","UNCLOSED_TAG","startOffset","parseQuoteResult","tryParseQuote","parseUnquotedResult","tryParseUnquoted","parseLeftAngleResult","tryParseLeftAngleBracket","codepoint","ch","openingBracePosition","EXPECT_ARGUMENT_CLOSING_BRACE","EMPTY_ARGUMENT","parseIdentifierIfPossible","MALFORMED_ARGUMENT","argument","parseArgumentOptions","startingPosition","endOffset","bumpTo","typeStartPosition","argType","typeEndPosition","EXPECT_ARGUMENT_TYPE","styleAndLocation","styleStartPosition","parseSimpleArgStyleIfPossible","EXPECT_ARGUMENT_STYLE","styleLocation","argCloseResult","tryParseArgumentClose","location_1","parseNumberSkeletonFromString","EXPECT_DATE_TIME_SKELETON","dateTimePattern","SKELETON_TYPE","dateTime","parsedOptions","parseDateTimeSkeleton","date","typeEndPosition_1","EXPECT_SELECT_ARGUMENT_OPTIONS","identifierAndLocation","pluralOffset","EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE","tryParseDecimalInteger","INVALID_PLURAL_ARGUMENT_OFFSET_VALUE","optionsResult","tryParsePluralOrSelectOptions","location_2","plural","pluralType","INVALID_ARGUMENT_TYPE","nestedBraces","apostrophePosition","bumpUntil","UNCLOSED_QUOTE_IN_ARGUMENT_STYLE","tokens","INVALID_NUMBER_SKELETON","parseNumberSkeleton","expectCloseTag","parsedFirstIdentifier","hasOtherClause","parsedSelectors","selector","selectorLocation","EXPECT_PLURAL_ARGUMENT_SELECTOR","INVALID_PLURAL_ARGUMENT_SELECTOR","DUPLICATE_SELECT_ARGUMENT_SELECTOR","DUPLICATE_PLURAL_ARGUMENT_SELECTOR","EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT","EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT","fragmentResult","EXPECT_SELECT_ARGUMENT_SELECTOR","MISSING_OTHER_CLAUSE","expectNumberError","invalidNumberError","hasDigits","prefix","currentOffset","targetOffset","nextCode","isLiteralElement","isArgumentElement","isPoundElement","DATE_TIME_REGEX","era","year","month","day","weekday","hour12","hour","minute","timeZoneName","stringTokens_1","WHITE_SPACE_REGEX","stemAndOptions","stem","options_1","FRACTION_PRECISION_REGEX","SIGNIFICANT_PRECISION_REGEX","INTEGER_WIDTH_REGEX","CONCISE_INTEGER_WIDTH_REGEX","parseSignificantPrecision","str","roundingPriority","g1","g2","parseSign","parseConciseScientificAndEngineeringStem","parseNotationOptions","tokens_1","token","scale","parseFloat","g3","g4","g5","trailingZeroDisplay","signOpts","conciseScientificAndEngineeringOpts","BestAvailableLocale","candidate","pos","lastIndexOf","BestFitMatcher","foundLocale","minimizedAvailableLocaleMap","availableLocaleMap","canonicalizedLocaleMap","minimizedAvailableLocales","minimizedLocale","Locale","minimize","canonicalizedLocale","requestedLocales_1","l","noExtensionLocale","UNICODE_EXTENSION_SEQUENCE_REGEX","maximizedRequestedLocale","minimizedRequestedLocale","LookupMatcher","availableLocale","extension","subset","relevantExtensionKeys","supportedExtension","relevantExtensionKeys_1","foundLocaleData","keyLocaleData","supportedExtensionAddition","requestedValue","UnicodeExtensionValue","optionsValue","privateIndex","preExtension","postExtension","searchValue","done","IntlMessageFormat","createFastMemoizeCache","store","overrideFormats","defaultConfig","configs","formatterCache","pluralRules","format","PART_TYPE","ast","resolvedOptions","resolvedLocale","getAst","resolveLocale","__parse","c1","c2","getNumberFormat","NumberFormat","getDateTimeFormat","DateTimeFormat","getPluralRules","PluralRules","memoizedDefaultLocale","supportedLocales","supportedLocalesOf","medium","full","ErrorCode","FormatError","msg","InvalidValueError","variableId","INVALID_VALUE","InvalidValueTypeError","MissingValueError","MISSING_VALUE","currentPluralValue","els_1","varName","object","value_1","formatFn","MISSING_INTL_API","rule","lastPart","Context","tslib_1","require","__importStar","hoist_non_react_statics_1","__importDefault","utils_1","IntlContext","createContext","IntlConsumer","Consumer","WrappedComponent","Component","intlPropName","forwardRef","enforceContext","WithIntl","createElement","intlProp","ref","forwardedRef","default","injectIntl_1","intl_1","intl_messageformat_1","Children","PureComponent","ecma402_abstract_1","Fragment"],"sourceRoot":""}