{"version":3,"file":"vue-i18n-CgqWNaMY.js","sources":["../../node_modules/vue-i18n/dist/vue-i18n.esm-bundler.js"],"sourcesContent":["/*!\n * vue-i18n v9.2.0-beta.30\n * (c) 2022 kazuya kawaguchi\n * Released under the MIT License.\n */\nimport { getGlobalThis, format, makeSymbol, isObject, isPlainObject, isArray, isString, hasOwn, isBoolean, isRegExp, isFunction, assign, isNumber, warn, createEmitter, isEmptyObject } from '@intlify/shared';\nimport { CoreWarnCodes, createCompileError, CompileErrorCodes, DEFAULT_LOCALE, createCoreContext, updateFallbackLocale, clearDateTimeFormat, clearNumberFormat, setAdditionalMeta, NOT_REOSLVED, isTranslateFallbackWarn, isTranslateMissingWarn, parseTranslateArgs, translate, MISSING_RESOLVE_VALUE, parseDateTimeArgs, datetime, parseNumberArgs, number, fallbackWithLocaleChain, registerMessageCompiler, compileToFunction, registerMessageResolver, resolveValue, registerLocaleFallbacker, setDevToolsHook } from '@intlify/core-base';\nimport { createVNode, Text, ref, getCurrentInstance, computed, watch, Fragment, h, inject, onMounted, onUnmounted, isRef } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\nimport { VueDevToolsLabels, VueDevToolsPlaceholders, VueDevToolsTimelineColors } from '@intlify/vue-devtools';\n\n/**\r\n * Vue I18n Version\r\n *\r\n * @remarks\r\n * Semver format. Same format as the package.json `version` field.\r\n *\r\n * @VueI18nGeneral\r\n */\r\nconst VERSION = '9.2.0-beta.30';\r\n/**\r\n * This is only called in esm-bundler builds.\r\n * istanbul-ignore-next\r\n */\r\nfunction initFeatureFlags() {\r\n let needWarn = false;\r\n if (typeof __VUE_I18N_FULL_INSTALL__ !== 'boolean') {\r\n needWarn = true;\r\n getGlobalThis().__VUE_I18N_FULL_INSTALL__ = true;\r\n }\r\n if (typeof __VUE_I18N_LEGACY_API__ !== 'boolean') {\r\n needWarn = true;\r\n getGlobalThis().__VUE_I18N_LEGACY_API__ = true;\r\n }\r\n if (typeof __INTLIFY_PROD_DEVTOOLS__ !== 'boolean') {\r\n getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && needWarn) {\r\n console.warn(`You are running the esm-bundler build of vue-i18n. It is recommended to ` +\r\n `configure your bundler to explicitly replace feature flag globals ` +\r\n `with boolean literals to get proper tree-shaking in the final bundle.`);\r\n }\r\n}\n\nlet code$1 = CoreWarnCodes.__EXTEND_POINT__;\r\nconst inc$1 = () => ++code$1;\r\nconst I18nWarnCodes = {\r\n FALLBACK_TO_ROOT: code$1,\r\n NOT_SUPPORTED_PRESERVE: inc$1(),\r\n NOT_SUPPORTED_FORMATTER: inc$1(),\r\n NOT_SUPPORTED_PRESERVE_DIRECTIVE: inc$1(),\r\n NOT_SUPPORTED_GET_CHOICE_INDEX: inc$1(),\r\n COMPONENT_NAME_LEGACY_COMPATIBLE: inc$1(),\r\n NOT_FOUND_PARENT_SCOPE: inc$1(),\r\n NOT_SUPPORT_MULTI_I18N_INSTANCE: inc$1() // 14\r\n};\r\nconst warnMessages = {\r\n [I18nWarnCodes.FALLBACK_TO_ROOT]: `Fall back to {type} '{key}' with root locale.`,\r\n [I18nWarnCodes.NOT_SUPPORTED_PRESERVE]: `Not supported 'preserve'.`,\r\n [I18nWarnCodes.NOT_SUPPORTED_FORMATTER]: `Not supported 'formatter'.`,\r\n [I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE]: `Not supported 'preserveDirectiveContent'.`,\r\n [I18nWarnCodes.NOT_SUPPORTED_GET_CHOICE_INDEX]: `Not supported 'getChoiceIndex'.`,\r\n [I18nWarnCodes.COMPONENT_NAME_LEGACY_COMPATIBLE]: `Component name legacy compatible: '{name}' -> 'i18n'`,\r\n [I18nWarnCodes.NOT_FOUND_PARENT_SCOPE]: `Not found parent scope. use the global scope.`,\r\n [I18nWarnCodes.NOT_SUPPORT_MULTI_I18N_INSTANCE]: `Not support multi i18n instance.`\r\n};\r\nfunction getWarnMessage(code, ...args) {\r\n return format(warnMessages[code], ...args);\r\n}\n\nlet code = CompileErrorCodes.__EXTEND_POINT__;\r\nconst inc = () => ++code;\r\nconst I18nErrorCodes = {\r\n // composer module errors\r\n UNEXPECTED_RETURN_TYPE: code,\r\n // legacy module errors\r\n INVALID_ARGUMENT: inc(),\r\n // i18n module errors\r\n MUST_BE_CALL_SETUP_TOP: inc(),\r\n NOT_INSLALLED: inc(),\r\n NOT_AVAILABLE_IN_LEGACY_MODE: inc(),\r\n // directive module errors\r\n REQUIRED_VALUE: inc(),\r\n INVALID_VALUE: inc(),\r\n // vue-devtools errors\r\n CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: inc(),\r\n NOT_INSLALLED_WITH_PROVIDE: inc(),\r\n // unexpected error\r\n UNEXPECTED_ERROR: inc(),\r\n // not compatible legacy vue-i18n constructor\r\n NOT_COMPATIBLE_LEGACY_VUE_I18N: inc(),\r\n // bridge support vue 2.x only\r\n BRIDGE_SUPPORT_VUE_2_ONLY: inc(),\r\n // for enhancement\r\n __EXTEND_POINT__: inc() // 27\r\n};\r\nfunction createI18nError(code, ...args) {\r\n return createCompileError(code, null, (process.env.NODE_ENV !== 'production') ? { messages: errorMessages, args } : undefined);\r\n}\r\nconst errorMessages = {\r\n [I18nErrorCodes.UNEXPECTED_RETURN_TYPE]: 'Unexpected return type in composer',\r\n [I18nErrorCodes.INVALID_ARGUMENT]: 'Invalid argument',\r\n [I18nErrorCodes.MUST_BE_CALL_SETUP_TOP]: 'Must be called at the top of a `setup` function',\r\n [I18nErrorCodes.NOT_INSLALLED]: 'Need to install with `app.use` function',\r\n [I18nErrorCodes.UNEXPECTED_ERROR]: 'Unexpected error',\r\n [I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE]: 'Not available in legacy mode',\r\n [I18nErrorCodes.REQUIRED_VALUE]: `Required in value: {0}`,\r\n [I18nErrorCodes.INVALID_VALUE]: `Invalid value`,\r\n [I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: `Cannot setup vue-devtools plugin`,\r\n [I18nErrorCodes.NOT_INSLALLED_WITH_PROVIDE]: 'Need to install with `provide` function',\r\n [I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N]: 'Not compatible legacy VueI18n.',\r\n [I18nErrorCodes.BRIDGE_SUPPORT_VUE_2_ONLY]: 'vue-i18n-bridge support Vue 2.x only'\r\n};\n\nconst TransrateVNodeSymbol = \r\n/* #__PURE__*/ makeSymbol('__transrateVNode');\r\nconst DatetimePartsSymbol = /* #__PURE__*/ makeSymbol('__datetimeParts');\r\nconst NumberPartsSymbol = /* #__PURE__*/ makeSymbol('__numberParts');\r\nconst EnableEmitter = /* #__PURE__*/ makeSymbol('__enableEmitter');\r\nconst DisableEmitter = /* #__PURE__*/ makeSymbol('__disableEmitter');\r\nconst SetPluralRulesSymbol = makeSymbol('__setPluralRules');\r\nmakeSymbol('__intlifyMeta');\r\nconst InejctWithOption = /* #__PURE__*/ makeSymbol('__injectWithOption');\r\nconst __VUE_I18N_BRIDGE__ = '__VUE_I18N_BRIDGE__';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\r\n/**\r\n * Transform flat json in obj to normal json in obj\r\n */\r\nfunction handleFlatJson(obj) {\r\n // check obj\r\n if (!isObject(obj)) {\r\n return obj;\r\n }\r\n for (const key in obj) {\r\n // check key\r\n if (!hasOwn(obj, key)) {\r\n continue;\r\n }\r\n // handle for normal json\r\n if (!key.includes('.')) {\r\n // recursive process value if value is also a object\r\n if (isObject(obj[key])) {\r\n handleFlatJson(obj[key]);\r\n }\r\n }\r\n // handle for flat json, transform to normal json\r\n else {\r\n // go to the last object\r\n const subKeys = key.split('.');\r\n const lastIndex = subKeys.length - 1;\r\n let currentObj = obj;\r\n for (let i = 0; i < lastIndex; i++) {\r\n if (!(subKeys[i] in currentObj)) {\r\n currentObj[subKeys[i]] = {};\r\n }\r\n currentObj = currentObj[subKeys[i]];\r\n }\r\n // update last object value, delete old property\r\n currentObj[subKeys[lastIndex]] = obj[key];\r\n delete obj[key];\r\n // recursive process value if value is also a object\r\n if (isObject(currentObj[subKeys[lastIndex]])) {\r\n handleFlatJson(currentObj[subKeys[lastIndex]]);\r\n }\r\n }\r\n }\r\n return obj;\r\n}\r\nfunction getLocaleMessages(locale, options) {\r\n const { messages, __i18n, messageResolver, flatJson } = options;\r\n // prettier-ignore\r\n const ret = isPlainObject(messages)\r\n ? messages\r\n : isArray(__i18n)\r\n ? {}\r\n : { [locale]: {} };\r\n // merge locale messages of i18n custom block\r\n if (isArray(__i18n)) {\r\n __i18n.forEach(custom => {\r\n if ('locale' in custom && 'resource' in custom) {\r\n const { locale, resource } = custom;\r\n if (locale) {\r\n ret[locale] = ret[locale] || {};\r\n deepCopy(resource, ret[locale]);\r\n }\r\n else {\r\n deepCopy(resource, ret);\r\n }\r\n }\r\n else {\r\n isString(custom) && deepCopy(JSON.parse(custom), ret);\r\n }\r\n });\r\n }\r\n // handle messages for flat json\r\n if (messageResolver == null && flatJson) {\r\n for (const key in ret) {\r\n if (hasOwn(ret, key)) {\r\n handleFlatJson(ret[key]);\r\n }\r\n }\r\n }\r\n return ret;\r\n}\r\nconst isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\r\nfunction deepCopy(src, des) {\r\n // src and des should both be objects, and non of then can be a array\r\n if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {\r\n throw createI18nError(I18nErrorCodes.INVALID_VALUE);\r\n }\r\n for (const key in src) {\r\n if (hasOwn(src, key)) {\r\n if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {\r\n // replace with src[key] when:\r\n // src[key] or des[key] is not a object, or\r\n // src[key] or des[key] is a array\r\n des[key] = src[key];\r\n }\r\n else {\r\n // src[key] and des[key] are both object, merge them\r\n deepCopy(src[key], des[key]);\r\n }\r\n }\r\n }\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction getComponentOptions(instance) {\r\n return instance.type ;\r\n}\r\nfunction adjustI18nResources(global, options, componentOptions // eslint-disable-line @typescript-eslint/no-explicit-any\r\n) {\r\n let messages = isObject(options.messages) ? options.messages : {};\r\n if ('__i18nGlobal' in componentOptions) {\r\n messages = getLocaleMessages(global.locale.value, {\r\n messages,\r\n __i18n: componentOptions.__i18nGlobal\r\n });\r\n }\r\n // merge locale messages\r\n const locales = Object.keys(messages);\r\n if (locales.length) {\r\n locales.forEach(locale => {\r\n global.mergeLocaleMessage(locale, messages[locale]);\r\n });\r\n }\r\n {\r\n // merge datetime formats\r\n if (isObject(options.datetimeFormats)) {\r\n const locales = Object.keys(options.datetimeFormats);\r\n if (locales.length) {\r\n locales.forEach(locale => {\r\n global.mergeDateTimeFormat(locale, options.datetimeFormats[locale]);\r\n });\r\n }\r\n }\r\n // merge number formats\r\n if (isObject(options.numberFormats)) {\r\n const locales = Object.keys(options.numberFormats);\r\n if (locales.length) {\r\n locales.forEach(locale => {\r\n global.mergeNumberFormat(locale, options.numberFormats[locale]);\r\n });\r\n }\r\n }\r\n }\r\n}\r\nfunction createTextNode(key) {\r\n return createVNode(Text, null, key, 0)\r\n ;\r\n}\r\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\r\n// extend VNode interface\r\nconst DEVTOOLS_META = '__INTLIFY_META__';\r\nlet composerID = 0;\r\nfunction defineCoreMissingHandler(missing) {\r\n return ((ctx, locale, key, type) => {\r\n return missing(locale, key, getCurrentInstance() || undefined, type);\r\n });\r\n}\r\n// for Intlify DevTools\r\nconst getMetaInfo = () => {\r\n const instance = getCurrentInstance();\r\n let meta = null; // eslint-disable-line @typescript-eslint/no-explicit-any\r\n return instance && (meta = getComponentOptions(instance)[DEVTOOLS_META])\r\n ? { [DEVTOOLS_META]: meta } // eslint-disable-line @typescript-eslint/no-explicit-any\r\n : null;\r\n};\r\n/**\r\n * Create composer interface factory\r\n *\r\n * @internal\r\n */\r\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\r\nfunction createComposer(options = {}, VueI18nLegacy) {\r\n const { __root } = options;\r\n const _isGlobal = __root === undefined;\r\n let _inheritLocale = isBoolean(options.inheritLocale)\r\n ? options.inheritLocale\r\n : true;\r\n const _locale = ref(\r\n // prettier-ignore\r\n __root && _inheritLocale\r\n ? __root.locale.value\r\n : isString(options.locale)\r\n ? options.locale\r\n : DEFAULT_LOCALE);\r\n const _fallbackLocale = ref(\r\n // prettier-ignore\r\n __root && _inheritLocale\r\n ? __root.fallbackLocale.value\r\n : isString(options.fallbackLocale) ||\r\n isArray(options.fallbackLocale) ||\r\n isPlainObject(options.fallbackLocale) ||\r\n options.fallbackLocale === false\r\n ? options.fallbackLocale\r\n : _locale.value);\r\n const _messages = ref(getLocaleMessages(_locale.value, options));\r\n // prettier-ignore\r\n const _datetimeFormats = ref(isPlainObject(options.datetimeFormats)\r\n ? options.datetimeFormats\r\n : { [_locale.value]: {} })\r\n ;\r\n // prettier-ignore\r\n const _numberFormats = ref(isPlainObject(options.numberFormats)\r\n ? options.numberFormats\r\n : { [_locale.value]: {} })\r\n ;\r\n // warning suppress options\r\n // prettier-ignore\r\n let _missingWarn = __root\r\n ? __root.missingWarn\r\n : isBoolean(options.missingWarn) || isRegExp(options.missingWarn)\r\n ? options.missingWarn\r\n : true;\r\n // prettier-ignore\r\n let _fallbackWarn = __root\r\n ? __root.fallbackWarn\r\n : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)\r\n ? options.fallbackWarn\r\n : true;\r\n // prettier-ignore\r\n let _fallbackRoot = __root\r\n ? __root.fallbackRoot\r\n : isBoolean(options.fallbackRoot)\r\n ? options.fallbackRoot\r\n : true;\r\n // configure fall back to root\r\n let _fallbackFormat = !!options.fallbackFormat;\r\n // runtime missing\r\n let _missing = isFunction(options.missing) ? options.missing : null;\r\n let _runtimeMissing = isFunction(options.missing)\r\n ? defineCoreMissingHandler(options.missing)\r\n : null;\r\n // postTranslation handler\r\n let _postTranslation = isFunction(options.postTranslation)\r\n ? options.postTranslation\r\n : null;\r\n // prettier-ignore\r\n let _warnHtmlMessage = __root\r\n ? __root.warnHtmlMessage\r\n : isBoolean(options.warnHtmlMessage)\r\n ? options.warnHtmlMessage\r\n : true;\r\n let _escapeParameter = !!options.escapeParameter;\r\n // custom linked modifiers\r\n // prettier-ignore\r\n const _modifiers = __root\r\n ? __root.modifiers\r\n : isPlainObject(options.modifiers)\r\n ? options.modifiers\r\n : {};\r\n // pluralRules\r\n let _pluralRules = options.pluralRules || (__root && __root.pluralRules);\r\n // runtime context\r\n // eslint-disable-next-line prefer-const\r\n let _context;\r\n function getCoreContext() {\r\n const ctxOptions = {\r\n version: VERSION,\r\n locale: _locale.value,\r\n fallbackLocale: _fallbackLocale.value,\r\n messages: _messages.value,\r\n modifiers: _modifiers,\r\n pluralRules: _pluralRules,\r\n missing: _runtimeMissing === null ? undefined : _runtimeMissing,\r\n missingWarn: _missingWarn,\r\n fallbackWarn: _fallbackWarn,\r\n fallbackFormat: _fallbackFormat,\r\n unresolving: true,\r\n postTranslation: _postTranslation === null ? undefined : _postTranslation,\r\n warnHtmlMessage: _warnHtmlMessage,\r\n escapeParameter: _escapeParameter,\r\n messageResolver: options.messageResolver,\r\n __meta: { framework: 'vue' }\r\n };\r\n {\r\n ctxOptions.datetimeFormats = _datetimeFormats.value;\r\n ctxOptions.numberFormats = _numberFormats.value;\r\n ctxOptions.__datetimeFormatters = isPlainObject(_context)\r\n ? _context.__datetimeFormatters\r\n : undefined;\r\n ctxOptions.__numberFormatters = isPlainObject(_context)\r\n ? _context.__numberFormatters\r\n : undefined;\r\n }\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n ctxOptions.__v_emitter = isPlainObject(_context)\r\n ? _context.__v_emitter\r\n : undefined;\r\n }\r\n return createCoreContext(ctxOptions);\r\n }\r\n _context = getCoreContext();\r\n updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\r\n // track reactivity\r\n function trackReactivityValues() {\r\n return [\r\n _locale.value,\r\n _fallbackLocale.value,\r\n _messages.value,\r\n _datetimeFormats.value,\r\n _numberFormats.value\r\n ]\r\n ;\r\n }\r\n // locale\r\n const locale = computed({\r\n get: () => _locale.value,\r\n set: val => {\r\n _locale.value = val;\r\n _context.locale = _locale.value;\r\n }\r\n });\r\n // fallbackLocale\r\n const fallbackLocale = computed({\r\n get: () => _fallbackLocale.value,\r\n set: val => {\r\n _fallbackLocale.value = val;\r\n _context.fallbackLocale = _fallbackLocale.value;\r\n updateFallbackLocale(_context, _locale.value, val);\r\n }\r\n });\r\n // messages\r\n const messages = computed(() => _messages.value);\r\n // datetimeFormats\r\n const datetimeFormats = /* #__PURE__*/ computed(() => _datetimeFormats.value);\r\n // numberFormats\r\n const numberFormats = /* #__PURE__*/ computed(() => _numberFormats.value);\r\n // getPostTranslationHandler\r\n function getPostTranslationHandler() {\r\n return isFunction(_postTranslation) ? _postTranslation : null;\r\n }\r\n // setPostTranslationHandler\r\n function setPostTranslationHandler(handler) {\r\n _postTranslation = handler;\r\n _context.postTranslation = handler;\r\n }\r\n // getMissingHandler\r\n function getMissingHandler() {\r\n return _missing;\r\n }\r\n // setMissingHandler\r\n function setMissingHandler(handler) {\r\n if (handler !== null) {\r\n _runtimeMissing = defineCoreMissingHandler(handler);\r\n }\r\n _missing = handler;\r\n _context.missing = _runtimeMissing;\r\n }\r\n function isResolvedTranslateMessage(type, arg // eslint-disable-line @typescript-eslint/no-explicit-any\r\n ) {\r\n return type !== 'translate' || !arg.resolvedMessage;\r\n }\r\n function wrapWithDeps(fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) {\r\n trackReactivityValues(); // track reactive dependency\r\n // NOTE: experimental !!\r\n let ret;\r\n if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\r\n try {\r\n setAdditionalMeta(getMetaInfo());\r\n ret = fn(_context);\r\n }\r\n finally {\r\n setAdditionalMeta(null);\r\n }\r\n }\r\n else {\r\n ret = fn(_context);\r\n }\r\n if (isNumber(ret) && ret === NOT_REOSLVED) {\r\n const [key, arg2] = argumentParser();\r\n if ((process.env.NODE_ENV !== 'production') &&\r\n __root &&\r\n isString(key) &&\r\n isResolvedTranslateMessage(warnType, arg2)) {\r\n if (_fallbackRoot &&\r\n (isTranslateFallbackWarn(_fallbackWarn, key) ||\r\n isTranslateMissingWarn(_missingWarn, key))) {\r\n warn(getWarnMessage(I18nWarnCodes.FALLBACK_TO_ROOT, {\r\n key,\r\n type: warnType\r\n }));\r\n }\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n const { __v_emitter: emitter } = _context;\r\n if (emitter && _fallbackRoot) {\r\n emitter.emit(\"fallback\" /* FALBACK */, {\r\n type: warnType,\r\n key,\r\n to: 'global',\r\n groupId: `${warnType}:${key}`\r\n });\r\n }\r\n }\r\n }\r\n return __root && _fallbackRoot\r\n ? fallbackSuccess(__root)\r\n : fallbackFail(key);\r\n }\r\n else if (successCondition(ret)) {\r\n return ret;\r\n }\r\n else {\r\n /* istanbul ignore next */\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_RETURN_TYPE);\r\n }\r\n }\r\n // t\r\n function t(...args) {\r\n return wrapWithDeps(context => Reflect.apply(translate, null, [context, ...args]), () => parseTranslateArgs(...args), 'translate', root => Reflect.apply(root.t, root, [...args]), key => key, val => isString(val));\r\n }\r\n // rt\r\n function rt(...args) {\r\n const [arg1, arg2, arg3] = args;\r\n if (arg3 && !isObject(arg3)) {\r\n throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\r\n }\r\n return t(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]);\r\n }\r\n // d\r\n function d(...args) {\r\n return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', root => Reflect.apply(root.d, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString(val));\r\n }\r\n // n\r\n function n(...args) {\r\n return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => Reflect.apply(root.n, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString(val));\r\n }\r\n // for custom processor\r\n function normalize(values) {\r\n return values.map(val => (isString(val) ? createTextNode(val) : val));\r\n }\r\n const interpolate = (val) => val;\r\n const processor = {\r\n normalize,\r\n interpolate,\r\n type: 'vnode'\r\n };\r\n // transrateVNode, using for `i18n-t` component\r\n function transrateVNode(...args) {\r\n return wrapWithDeps(context => {\r\n let ret;\r\n const _context = context;\r\n try {\r\n _context.processor = processor;\r\n ret = Reflect.apply(translate, null, [_context, ...args]);\r\n }\r\n finally {\r\n _context.processor = null;\r\n }\r\n return ret;\r\n }, () => parseTranslateArgs(...args), 'translate', \r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n root => root[TransrateVNodeSymbol](...args), key => [createTextNode(key)], val => isArray(val));\r\n }\r\n // numberParts, using for `i18n-n` component\r\n function numberParts(...args) {\r\n return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', \r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n root => root[NumberPartsSymbol](...args), () => [], val => isString(val) || isArray(val));\r\n }\r\n // datetimeParts, using for `i18n-d` component\r\n function datetimeParts(...args) {\r\n return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', \r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n root => root[DatetimePartsSymbol](...args), () => [], val => isString(val) || isArray(val));\r\n }\r\n function setPluralRules(rules) {\r\n _pluralRules = rules;\r\n _context.pluralRules = _pluralRules;\r\n }\r\n // te\r\n function te(key, locale) {\r\n const targetLocale = isString(locale) ? locale : _locale.value;\r\n const message = getLocaleMessage(targetLocale);\r\n return _context.messageResolver(message, key) !== null;\r\n }\r\n function resolveMessages(key) {\r\n let messages = null;\r\n const locales = fallbackWithLocaleChain(_context, _fallbackLocale.value, _locale.value);\r\n for (let i = 0; i < locales.length; i++) {\r\n const targetLocaleMessages = _messages.value[locales[i]] || {};\r\n const messageValue = _context.messageResolver(targetLocaleMessages, key);\r\n if (messageValue != null) {\r\n messages = messageValue;\r\n break;\r\n }\r\n }\r\n return messages;\r\n }\r\n // tm\r\n function tm(key) {\r\n const messages = resolveMessages(key);\r\n // prettier-ignore\r\n return messages != null\r\n ? messages\r\n : __root\r\n ? __root.tm(key) || {}\r\n : {};\r\n }\r\n // getLocaleMessage\r\n function getLocaleMessage(locale) {\r\n return (_messages.value[locale] || {});\r\n }\r\n // setLocaleMessage\r\n function setLocaleMessage(locale, message) {\r\n _messages.value[locale] = message;\r\n _context.messages = _messages.value;\r\n }\r\n // mergeLocaleMessage\r\n function mergeLocaleMessage(locale, message) {\r\n _messages.value[locale] = _messages.value[locale] || {};\r\n deepCopy(message, _messages.value[locale]);\r\n _context.messages = _messages.value;\r\n }\r\n // getDateTimeFormat\r\n function getDateTimeFormat(locale) {\r\n return _datetimeFormats.value[locale] || {};\r\n }\r\n // setDateTimeFormat\r\n function setDateTimeFormat(locale, format) {\r\n _datetimeFormats.value[locale] = format;\r\n _context.datetimeFormats = _datetimeFormats.value;\r\n clearDateTimeFormat(_context, locale, format);\r\n }\r\n // mergeDateTimeFormat\r\n function mergeDateTimeFormat(locale, format) {\r\n _datetimeFormats.value[locale] = assign(_datetimeFormats.value[locale] || {}, format);\r\n _context.datetimeFormats = _datetimeFormats.value;\r\n clearDateTimeFormat(_context, locale, format);\r\n }\r\n // getNumberFormat\r\n function getNumberFormat(locale) {\r\n return _numberFormats.value[locale] || {};\r\n }\r\n // setNumberFormat\r\n function setNumberFormat(locale, format) {\r\n _numberFormats.value[locale] = format;\r\n _context.numberFormats = _numberFormats.value;\r\n clearNumberFormat(_context, locale, format);\r\n }\r\n // mergeNumberFormat\r\n function mergeNumberFormat(locale, format) {\r\n _numberFormats.value[locale] = assign(_numberFormats.value[locale] || {}, format);\r\n _context.numberFormats = _numberFormats.value;\r\n clearNumberFormat(_context, locale, format);\r\n }\r\n // for debug\r\n composerID++;\r\n // watch root locale & fallbackLocale\r\n if (__root) {\r\n watch(__root.locale, (val) => {\r\n if (_inheritLocale) {\r\n _locale.value = val;\r\n _context.locale = val;\r\n updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\r\n }\r\n });\r\n watch(__root.fallbackLocale, (val) => {\r\n if (_inheritLocale) {\r\n _fallbackLocale.value = val;\r\n _context.fallbackLocale = val;\r\n updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\r\n }\r\n });\r\n }\r\n // define basic composition API!\r\n const composer = {\r\n id: composerID,\r\n locale,\r\n fallbackLocale,\r\n get inheritLocale() {\r\n return _inheritLocale;\r\n },\r\n set inheritLocale(val) {\r\n _inheritLocale = val;\r\n if (val && __root) {\r\n _locale.value = __root.locale.value;\r\n _fallbackLocale.value = __root.fallbackLocale.value;\r\n updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\r\n }\r\n },\r\n get availableLocales() {\r\n return Object.keys(_messages.value).sort();\r\n },\r\n messages,\r\n get modifiers() {\r\n return _modifiers;\r\n },\r\n get pluralRules() {\r\n return _pluralRules || {};\r\n },\r\n get isGlobal() {\r\n return _isGlobal;\r\n },\r\n get missingWarn() {\r\n return _missingWarn;\r\n },\r\n set missingWarn(val) {\r\n _missingWarn = val;\r\n _context.missingWarn = _missingWarn;\r\n },\r\n get fallbackWarn() {\r\n return _fallbackWarn;\r\n },\r\n set fallbackWarn(val) {\r\n _fallbackWarn = val;\r\n _context.fallbackWarn = _fallbackWarn;\r\n },\r\n get fallbackRoot() {\r\n return _fallbackRoot;\r\n },\r\n set fallbackRoot(val) {\r\n _fallbackRoot = val;\r\n },\r\n get fallbackFormat() {\r\n return _fallbackFormat;\r\n },\r\n set fallbackFormat(val) {\r\n _fallbackFormat = val;\r\n _context.fallbackFormat = _fallbackFormat;\r\n },\r\n get warnHtmlMessage() {\r\n return _warnHtmlMessage;\r\n },\r\n set warnHtmlMessage(val) {\r\n _warnHtmlMessage = val;\r\n _context.warnHtmlMessage = val;\r\n },\r\n get escapeParameter() {\r\n return _escapeParameter;\r\n },\r\n set escapeParameter(val) {\r\n _escapeParameter = val;\r\n _context.escapeParameter = val;\r\n },\r\n t,\r\n getLocaleMessage,\r\n setLocaleMessage,\r\n mergeLocaleMessage,\r\n getPostTranslationHandler,\r\n setPostTranslationHandler,\r\n getMissingHandler,\r\n setMissingHandler,\r\n [SetPluralRulesSymbol]: setPluralRules\r\n };\r\n {\r\n composer.datetimeFormats = datetimeFormats;\r\n composer.numberFormats = numberFormats;\r\n composer.rt = rt;\r\n composer.te = te;\r\n composer.tm = tm;\r\n composer.d = d;\r\n composer.n = n;\r\n composer.getDateTimeFormat = getDateTimeFormat;\r\n composer.setDateTimeFormat = setDateTimeFormat;\r\n composer.mergeDateTimeFormat = mergeDateTimeFormat;\r\n composer.getNumberFormat = getNumberFormat;\r\n composer.setNumberFormat = setNumberFormat;\r\n composer.mergeNumberFormat = mergeNumberFormat;\r\n composer[InejctWithOption] = options.__injectWithOption;\r\n composer[TransrateVNodeSymbol] = transrateVNode;\r\n composer[DatetimePartsSymbol] = datetimeParts;\r\n composer[NumberPartsSymbol] = numberParts;\r\n }\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n composer[EnableEmitter] = (emitter) => {\r\n _context.__v_emitter = emitter;\r\n };\r\n composer[DisableEmitter] = () => {\r\n _context.__v_emitter = undefined;\r\n };\r\n }\r\n return composer;\r\n}\r\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\r\n/**\r\n * Convert to I18n Composer Options from VueI18n Options\r\n *\r\n * @internal\r\n */\r\nfunction convertComposerOptions(options) {\r\n const locale = isString(options.locale) ? options.locale : DEFAULT_LOCALE;\r\n const fallbackLocale = isString(options.fallbackLocale) ||\r\n isArray(options.fallbackLocale) ||\r\n isPlainObject(options.fallbackLocale) ||\r\n options.fallbackLocale === false\r\n ? options.fallbackLocale\r\n : locale;\r\n const missing = isFunction(options.missing) ? options.missing : undefined;\r\n const missingWarn = isBoolean(options.silentTranslationWarn) ||\r\n isRegExp(options.silentTranslationWarn)\r\n ? !options.silentTranslationWarn\r\n : true;\r\n const fallbackWarn = isBoolean(options.silentFallbackWarn) ||\r\n isRegExp(options.silentFallbackWarn)\r\n ? !options.silentFallbackWarn\r\n : true;\r\n const fallbackRoot = isBoolean(options.fallbackRoot)\r\n ? options.fallbackRoot\r\n : true;\r\n const fallbackFormat = !!options.formatFallbackMessages;\r\n const modifiers = isPlainObject(options.modifiers) ? options.modifiers : {};\r\n const pluralizationRules = options.pluralizationRules;\r\n const postTranslation = isFunction(options.postTranslation)\r\n ? options.postTranslation\r\n : undefined;\r\n const warnHtmlMessage = isString(options.warnHtmlInMessage)\r\n ? options.warnHtmlInMessage !== 'off'\r\n : true;\r\n const escapeParameter = !!options.escapeParameterHtml;\r\n const inheritLocale = isBoolean(options.sync) ? options.sync : true;\r\n if ((process.env.NODE_ENV !== 'production') && options.formatter) {\r\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));\r\n }\r\n if ((process.env.NODE_ENV !== 'production') && options.preserveDirectiveContent) {\r\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));\r\n }\r\n let messages = options.messages;\r\n if (isPlainObject(options.sharedMessages)) {\r\n const sharedMessages = options.sharedMessages;\r\n const locales = Object.keys(sharedMessages);\r\n messages = locales.reduce((messages, locale) => {\r\n const message = messages[locale] || (messages[locale] = {});\r\n assign(message, sharedMessages[locale]);\r\n return messages;\r\n }, (messages || {}));\r\n }\r\n const { __i18n, __root, __injectWithOption } = options;\r\n const datetimeFormats = options.datetimeFormats;\r\n const numberFormats = options.numberFormats;\r\n const flatJson = options.flatJson;\r\n return {\r\n locale,\r\n fallbackLocale,\r\n messages,\r\n flatJson,\r\n datetimeFormats,\r\n numberFormats,\r\n missing,\r\n missingWarn,\r\n fallbackWarn,\r\n fallbackRoot,\r\n fallbackFormat,\r\n modifiers,\r\n pluralRules: pluralizationRules,\r\n postTranslation,\r\n warnHtmlMessage,\r\n escapeParameter,\r\n messageResolver: options.messageResolver,\r\n inheritLocale,\r\n __i18n,\r\n __root,\r\n __injectWithOption\r\n };\r\n}\r\n/**\r\n * create VueI18n interface factory\r\n *\r\n * @internal\r\n */\r\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\r\nfunction createVueI18n(options = {}, VueI18nLegacy) {\r\n {\r\n const composer = createComposer(convertComposerOptions(options));\r\n // defines VueI18n\r\n const vueI18n = {\r\n // id\r\n id: composer.id,\r\n // locale\r\n get locale() {\r\n return composer.locale.value;\r\n },\r\n set locale(val) {\r\n composer.locale.value = val;\r\n },\r\n // fallbackLocale\r\n get fallbackLocale() {\r\n return composer.fallbackLocale.value;\r\n },\r\n set fallbackLocale(val) {\r\n composer.fallbackLocale.value = val;\r\n },\r\n // messages\r\n get messages() {\r\n return composer.messages.value;\r\n },\r\n // datetimeFormats\r\n get datetimeFormats() {\r\n return composer.datetimeFormats.value;\r\n },\r\n // numberFormats\r\n get numberFormats() {\r\n return composer.numberFormats.value;\r\n },\r\n // availableLocales\r\n get availableLocales() {\r\n return composer.availableLocales;\r\n },\r\n // formatter\r\n get formatter() {\r\n (process.env.NODE_ENV !== 'production') && warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));\r\n // dummy\r\n return {\r\n interpolate() {\r\n return [];\r\n }\r\n };\r\n },\r\n set formatter(val) {\r\n (process.env.NODE_ENV !== 'production') && warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));\r\n },\r\n // missing\r\n get missing() {\r\n return composer.getMissingHandler();\r\n },\r\n set missing(handler) {\r\n composer.setMissingHandler(handler);\r\n },\r\n // silentTranslationWarn\r\n get silentTranslationWarn() {\r\n return isBoolean(composer.missingWarn)\r\n ? !composer.missingWarn\r\n : composer.missingWarn;\r\n },\r\n set silentTranslationWarn(val) {\r\n composer.missingWarn = isBoolean(val) ? !val : val;\r\n },\r\n // silentFallbackWarn\r\n get silentFallbackWarn() {\r\n return isBoolean(composer.fallbackWarn)\r\n ? !composer.fallbackWarn\r\n : composer.fallbackWarn;\r\n },\r\n set silentFallbackWarn(val) {\r\n composer.fallbackWarn = isBoolean(val) ? !val : val;\r\n },\r\n // modifiers\r\n get modifiers() {\r\n return composer.modifiers;\r\n },\r\n // formatFallbackMessages\r\n get formatFallbackMessages() {\r\n return composer.fallbackFormat;\r\n },\r\n set formatFallbackMessages(val) {\r\n composer.fallbackFormat = val;\r\n },\r\n // postTranslation\r\n get postTranslation() {\r\n return composer.getPostTranslationHandler();\r\n },\r\n set postTranslation(handler) {\r\n composer.setPostTranslationHandler(handler);\r\n },\r\n // sync\r\n get sync() {\r\n return composer.inheritLocale;\r\n },\r\n set sync(val) {\r\n composer.inheritLocale = val;\r\n },\r\n // warnInHtmlMessage\r\n get warnHtmlInMessage() {\r\n return composer.warnHtmlMessage ? 'warn' : 'off';\r\n },\r\n set warnHtmlInMessage(val) {\r\n composer.warnHtmlMessage = val !== 'off';\r\n },\r\n // escapeParameterHtml\r\n get escapeParameterHtml() {\r\n return composer.escapeParameter;\r\n },\r\n set escapeParameterHtml(val) {\r\n composer.escapeParameter = val;\r\n },\r\n // preserveDirectiveContent\r\n get preserveDirectiveContent() {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));\r\n return true;\r\n },\r\n set preserveDirectiveContent(val) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));\r\n },\r\n // pluralizationRules\r\n get pluralizationRules() {\r\n return composer.pluralRules || {};\r\n },\r\n // for internal\r\n __composer: composer,\r\n // t\r\n t(...args) {\r\n const [arg1, arg2, arg3] = args;\r\n const options = {};\r\n let list = null;\r\n let named = null;\r\n if (!isString(arg1)) {\r\n throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\r\n }\r\n const key = arg1;\r\n if (isString(arg2)) {\r\n options.locale = arg2;\r\n }\r\n else if (isArray(arg2)) {\r\n list = arg2;\r\n }\r\n else if (isPlainObject(arg2)) {\r\n named = arg2;\r\n }\r\n if (isArray(arg3)) {\r\n list = arg3;\r\n }\r\n else if (isPlainObject(arg3)) {\r\n named = arg3;\r\n }\r\n // return composer.t(key, (list || named || {}) as any, options)\r\n return Reflect.apply(composer.t, composer, [\r\n key,\r\n (list || named || {}),\r\n options\r\n ]);\r\n },\r\n rt(...args) {\r\n return Reflect.apply(composer.rt, composer, [...args]);\r\n },\r\n // tc\r\n tc(...args) {\r\n const [arg1, arg2, arg3] = args;\r\n const options = { plural: 1 };\r\n let list = null;\r\n let named = null;\r\n if (!isString(arg1)) {\r\n throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\r\n }\r\n const key = arg1;\r\n if (isString(arg2)) {\r\n options.locale = arg2;\r\n }\r\n else if (isNumber(arg2)) {\r\n options.plural = arg2;\r\n }\r\n else if (isArray(arg2)) {\r\n list = arg2;\r\n }\r\n else if (isPlainObject(arg2)) {\r\n named = arg2;\r\n }\r\n if (isString(arg3)) {\r\n options.locale = arg3;\r\n }\r\n else if (isArray(arg3)) {\r\n list = arg3;\r\n }\r\n else if (isPlainObject(arg3)) {\r\n named = arg3;\r\n }\r\n // return composer.t(key, (list || named || {}) as any, options)\r\n return Reflect.apply(composer.t, composer, [\r\n key,\r\n (list || named || {}),\r\n options\r\n ]);\r\n },\r\n // te\r\n te(key, locale) {\r\n return composer.te(key, locale);\r\n },\r\n // tm\r\n tm(key) {\r\n return composer.tm(key);\r\n },\r\n // getLocaleMessage\r\n getLocaleMessage(locale) {\r\n return composer.getLocaleMessage(locale);\r\n },\r\n // setLocaleMessage\r\n setLocaleMessage(locale, message) {\r\n composer.setLocaleMessage(locale, message);\r\n },\r\n // mergeLocaleMessage\r\n mergeLocaleMessage(locale, message) {\r\n composer.mergeLocaleMessage(locale, message);\r\n },\r\n // d\r\n d(...args) {\r\n return Reflect.apply(composer.d, composer, [...args]);\r\n },\r\n // getDateTimeFormat\r\n getDateTimeFormat(locale) {\r\n return composer.getDateTimeFormat(locale);\r\n },\r\n // setDateTimeFormat\r\n setDateTimeFormat(locale, format) {\r\n composer.setDateTimeFormat(locale, format);\r\n },\r\n // mergeDateTimeFormat\r\n mergeDateTimeFormat(locale, format) {\r\n composer.mergeDateTimeFormat(locale, format);\r\n },\r\n // n\r\n n(...args) {\r\n return Reflect.apply(composer.n, composer, [...args]);\r\n },\r\n // getNumberFormat\r\n getNumberFormat(locale) {\r\n return composer.getNumberFormat(locale);\r\n },\r\n // setNumberFormat\r\n setNumberFormat(locale, format) {\r\n composer.setNumberFormat(locale, format);\r\n },\r\n // mergeNumberFormat\r\n mergeNumberFormat(locale, format) {\r\n composer.mergeNumberFormat(locale, format);\r\n },\r\n // getChoiceIndex\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n getChoiceIndex(choice, choicesLength) {\r\n (process.env.NODE_ENV !== 'production') &&\r\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_GET_CHOICE_INDEX));\r\n return -1;\r\n },\r\n // for internal\r\n __onComponentInstanceCreated(target) {\r\n const { componentInstanceCreatedListener } = options;\r\n if (componentInstanceCreatedListener) {\r\n componentInstanceCreatedListener(target, vueI18n);\r\n }\r\n }\r\n };\r\n // for vue-devtools timeline event\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n vueI18n.__enableEmitter = (emitter) => {\r\n const __composer = composer;\r\n __composer[EnableEmitter] && __composer[EnableEmitter](emitter);\r\n };\r\n vueI18n.__disableEmitter = () => {\r\n const __composer = composer;\r\n __composer[DisableEmitter] && __composer[DisableEmitter]();\r\n };\r\n }\r\n return vueI18n;\r\n }\r\n}\r\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst baseFormatProps = {\r\n tag: {\r\n type: [String, Object]\r\n },\r\n locale: {\r\n type: String\r\n },\r\n scope: {\r\n type: String,\r\n // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\r\n validator: (val /* ComponetI18nScope */) => val === 'parent' || val === 'global',\r\n default: 'parent' /* ComponetI18nScope */\r\n },\r\n i18n: {\r\n type: Object\r\n }\r\n};\n\nfunction getInterpolateArg(\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n{ slots }, // SetupContext,\r\nkeys) {\r\n if (keys.length === 1 && keys[0] === 'default') {\r\n // default slot with list\r\n const ret = slots.default ? slots.default() : [];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return ret.reduce((slot, current) => {\r\n return (slot = [\r\n ...slot,\r\n ...(isArray(current.children) ? current.children : [current])\r\n ]);\r\n }, []);\r\n }\r\n else {\r\n // named slots\r\n return keys.reduce((arg, key) => {\r\n const slot = slots[key];\r\n if (slot) {\r\n arg[key] = slot();\r\n }\r\n return arg;\r\n }, {});\r\n }\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction getFragmentableTag(tag) {\r\n return Fragment ;\r\n}\n\n/**\r\n * Translation Component\r\n *\r\n * @remarks\r\n * See the following items for property about details\r\n *\r\n * @VueI18nSee [TranslationProps](component#translationprops)\r\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\r\n * @VueI18nSee [Component Interpolation](../guide/advanced/component)\r\n *\r\n * @example\r\n * ```html\r\n *
\r\n * \r\n * \r\n * {{ $t('tos') }}\r\n * \r\n * \r\n *
\r\n * ```\r\n * ```js\r\n * import { createApp } from 'vue'\r\n * import { createI18n } from 'vue-i18n'\r\n *\r\n * const messages = {\r\n * en: {\r\n * tos: 'Term of Service',\r\n * term: 'I accept xxx {0}.'\r\n * },\r\n * ja: {\r\n * tos: '利用規約',\r\n * term: '私は xxx の{0}に同意します。'\r\n * }\r\n * }\r\n *\r\n * const i18n = createI18n({\r\n * locale: 'en',\r\n * messages\r\n * })\r\n *\r\n * const app = createApp({\r\n * data: {\r\n * url: '/term'\r\n * }\r\n * }).use(i18n).mount('#app')\r\n * ```\r\n *\r\n * @VueI18nComponent\r\n */\r\nconst Translation = /* defineComponent */ {\r\n /* eslint-disable */\r\n name: 'i18n-t',\r\n props: assign({\r\n keypath: {\r\n type: String,\r\n required: true\r\n },\r\n plural: {\r\n type: [Number, String],\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n validator: (val) => isNumber(val) || !isNaN(val)\r\n }\r\n }, baseFormatProps),\r\n /* eslint-enable */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setup(props, context) {\r\n const { slots, attrs } = context;\r\n // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\r\n const i18n = props.i18n ||\r\n useI18n({\r\n useScope: props.scope,\r\n __useComponent: true\r\n });\r\n const keys = Object.keys(slots).filter(key => key !== '_');\r\n return () => {\r\n const options = {};\r\n if (props.locale) {\r\n options.locale = props.locale;\r\n }\r\n if (props.plural !== undefined) {\r\n options.plural = isString(props.plural) ? +props.plural : props.plural;\r\n }\r\n const arg = getInterpolateArg(context, keys);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const children = i18n[TransrateVNodeSymbol](props.keypath, arg, options);\r\n const assignedAttrs = assign({}, attrs);\r\n const tag = isString(props.tag) || isObject(props.tag)\r\n ? props.tag\r\n : getFragmentableTag();\r\n return h(tag, assignedAttrs, children);\r\n };\r\n }\r\n};\n\nfunction renderFormatter(props, context, slotKeys, partFormatter) {\r\n const { slots, attrs } = context;\r\n return () => {\r\n const options = { part: true };\r\n let overrides = {};\r\n if (props.locale) {\r\n options.locale = props.locale;\r\n }\r\n if (isString(props.format)) {\r\n options.key = props.format;\r\n }\r\n else if (isObject(props.format)) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n if (isString(props.format.key)) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n options.key = props.format.key;\r\n }\r\n // Filter out number format options only\r\n overrides = Object.keys(props.format).reduce((options, prop) => {\r\n return slotKeys.includes(prop)\r\n ? assign({}, options, { [prop]: props.format[prop] }) // eslint-disable-line @typescript-eslint/no-explicit-any\r\n : options;\r\n }, {});\r\n }\r\n const parts = partFormatter(...[props.value, options, overrides]);\r\n let children = [options.key];\r\n if (isArray(parts)) {\r\n children = parts.map((part, index) => {\r\n const slot = slots[part.type];\r\n return slot\r\n ? slot({ [part.type]: part.value, index, parts })\r\n : [part.value];\r\n });\r\n }\r\n else if (isString(parts)) {\r\n children = [parts];\r\n }\r\n const assignedAttrs = assign({}, attrs);\r\n const tag = isString(props.tag) || isObject(props.tag)\r\n ? props.tag\r\n : getFragmentableTag();\r\n return h(tag, assignedAttrs, children);\r\n };\r\n}\n\nconst NUMBER_FORMAT_KEYS = [\r\n 'localeMatcher',\r\n 'style',\r\n 'unit',\r\n 'unitDisplay',\r\n 'currency',\r\n 'currencyDisplay',\r\n 'useGrouping',\r\n 'numberingSystem',\r\n 'minimumIntegerDigits',\r\n 'minimumFractionDigits',\r\n 'maximumFractionDigits',\r\n 'minimumSignificantDigits',\r\n 'maximumSignificantDigits',\r\n 'notation',\r\n 'formatMatcher'\r\n];\r\n/**\r\n * Number Format Component\r\n *\r\n * @remarks\r\n * See the following items for property about details\r\n *\r\n * @VueI18nSee [FormattableProps](component#formattableprops)\r\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\r\n * @VueI18nSee [Custom Formatting](../guide/essentials/number#custom-formatting)\r\n *\r\n * @VueI18nDanger\r\n * Not supported IE, due to no support `Intl.NumberFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatToParts)\r\n *\r\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-numberformat)\r\n *\r\n * @VueI18nComponent\r\n */\r\nconst NumberFormat = /* defineComponent */ {\r\n /* eslint-disable */\r\n name: 'i18n-n',\r\n props: assign({\r\n value: {\r\n type: Number,\r\n required: true\r\n },\r\n format: {\r\n type: [String, Object]\r\n }\r\n }, baseFormatProps),\r\n /* eslint-enable */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setup(props, context) {\r\n const i18n = props.i18n ||\r\n useI18n({ useScope: 'parent', __useComponent: true });\r\n return renderFormatter(props, context, NUMBER_FORMAT_KEYS, (...args) => \r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n i18n[NumberPartsSymbol](...args));\r\n }\r\n};\n\nconst DATETIME_FORMAT_KEYS = [\r\n 'dateStyle',\r\n 'timeStyle',\r\n 'fractionalSecondDigits',\r\n 'calendar',\r\n 'dayPeriod',\r\n 'numberingSystem',\r\n 'localeMatcher',\r\n 'timeZone',\r\n 'hour12',\r\n 'hourCycle',\r\n 'formatMatcher',\r\n 'weekday',\r\n 'era',\r\n 'year',\r\n 'month',\r\n 'day',\r\n 'hour',\r\n 'minute',\r\n 'second',\r\n 'timeZoneName'\r\n];\r\n/**\r\n * Datetime Format Component\r\n *\r\n * @remarks\r\n * See the following items for property about details\r\n *\r\n * @VueI18nSee [FormattableProps](component#formattableprops)\r\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\r\n * @VueI18nSee [Custom Formatting](../guide/essentials/datetime#custom-formatting)\r\n *\r\n * @VueI18nDanger\r\n * Not supported IE, due to no support `Intl.DateTimeFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts)\r\n *\r\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-datetimeformat)\r\n *\r\n * @VueI18nComponent\r\n */\r\nconst DatetimeFormat = /*defineComponent */ {\r\n /* eslint-disable */\r\n name: 'i18n-d',\r\n props: assign({\r\n value: {\r\n type: [Number, Date],\r\n required: true\r\n },\r\n format: {\r\n type: [String, Object]\r\n }\r\n }, baseFormatProps),\r\n /* eslint-enable */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setup(props, context) {\r\n const i18n = props.i18n ||\r\n useI18n({ useScope: 'parent', __useComponent: true });\r\n return renderFormatter(props, context, DATETIME_FORMAT_KEYS, (...args) => \r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n i18n[DatetimePartsSymbol](...args));\r\n }\r\n};\n\nfunction getComposer$2(i18n, instance) {\r\n const i18nInternal = i18n;\r\n if (i18n.mode === 'composition') {\r\n return (i18nInternal.__getInstance(instance) || i18n.global);\r\n }\r\n else {\r\n const vueI18n = i18nInternal.__getInstance(instance);\r\n return vueI18n != null\r\n ? vueI18n.__composer\r\n : i18n.global.__composer;\r\n }\r\n}\r\nfunction vTDirective(i18n) {\r\n const bind = (el, { instance, value, modifiers }) => {\r\n /* istanbul ignore if */\r\n if (!instance || !instance.$) {\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\r\n }\r\n const composer = getComposer$2(i18n, instance.$);\r\n if ((process.env.NODE_ENV !== 'production') && modifiers.preserve) {\r\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE));\r\n }\r\n const parsedValue = parseValue(value);\r\n // el.textContent = composer.t(...makeParams(parsedValue))\r\n el.textContent = Reflect.apply(composer.t, composer, [\r\n ...makeParams(parsedValue)\r\n ]);\r\n };\r\n return {\r\n beforeMount: bind,\r\n beforeUpdate: bind\r\n };\r\n}\r\nfunction parseValue(value) {\r\n if (isString(value)) {\r\n return { path: value };\r\n }\r\n else if (isPlainObject(value)) {\r\n if (!('path' in value)) {\r\n throw createI18nError(I18nErrorCodes.REQUIRED_VALUE, 'path');\r\n }\r\n return value;\r\n }\r\n else {\r\n throw createI18nError(I18nErrorCodes.INVALID_VALUE);\r\n }\r\n}\r\nfunction makeParams(value) {\r\n const { path, locale, args, choice, plural } = value;\r\n const options = {};\r\n const named = args || {};\r\n if (isString(locale)) {\r\n options.locale = locale;\r\n }\r\n if (isNumber(choice)) {\r\n options.plural = choice;\r\n }\r\n if (isNumber(plural)) {\r\n options.plural = plural;\r\n }\r\n return [path, named, options];\r\n}\n\nfunction apply(app, i18n, ...options) {\r\n const pluginOptions = isPlainObject(options[0])\r\n ? options[0]\r\n : {};\r\n const useI18nComponentName = !!pluginOptions.useI18nComponentName;\r\n const globalInstall = isBoolean(pluginOptions.globalInstall)\r\n ? pluginOptions.globalInstall\r\n : true;\r\n if ((process.env.NODE_ENV !== 'production') && globalInstall && useI18nComponentName) {\r\n warn(getWarnMessage(I18nWarnCodes.COMPONENT_NAME_LEGACY_COMPATIBLE, {\r\n name: Translation.name\r\n }));\r\n }\r\n if (globalInstall) {\r\n // install components\r\n app.component(!useI18nComponentName ? Translation.name : 'i18n', Translation);\r\n app.component(NumberFormat.name, NumberFormat);\r\n app.component(DatetimeFormat.name, DatetimeFormat);\r\n }\r\n // install directive\r\n {\r\n app.directive('t', vTDirective(i18n));\r\n }\r\n}\n\nconst VUE_I18N_COMPONENT_TYPES = 'vue-i18n: composer properties';\r\nlet devtoolsApi;\r\nasync function enableDevTools(app, i18n) {\r\n return new Promise((resolve, reject) => {\r\n try {\r\n setupDevtoolsPlugin({\r\n id: \"vue-devtools-plugin-vue-i18n\" /* PLUGIN */,\r\n label: VueDevToolsLabels[\"vue-devtools-plugin-vue-i18n\" /* PLUGIN */],\r\n packageName: 'vue-i18n',\r\n homepage: 'https://vue-i18n.intlify.dev',\r\n logo: 'https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png',\r\n componentStateTypes: [VUE_I18N_COMPONENT_TYPES],\r\n app\r\n }, api => {\r\n devtoolsApi = api;\r\n api.on.visitComponentTree(({ componentInstance, treeNode }) => {\r\n updateComponentTreeTags(componentInstance, treeNode, i18n);\r\n });\r\n api.on.inspectComponent(({ componentInstance, instanceData }) => {\r\n if (componentInstance.vnode.el &&\r\n componentInstance.vnode.el.__VUE_I18N__ &&\r\n instanceData) {\r\n if (i18n.mode === 'legacy') {\r\n // ignore global scope on legacy mode\r\n if (componentInstance.vnode.el.__VUE_I18N__ !==\r\n i18n.global.__composer) {\r\n inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);\r\n }\r\n }\r\n else {\r\n inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);\r\n }\r\n }\r\n });\r\n api.addInspector({\r\n id: \"vue-i18n-resource-inspector\" /* CUSTOM_INSPECTOR */,\r\n label: VueDevToolsLabels[\"vue-i18n-resource-inspector\" /* CUSTOM_INSPECTOR */],\r\n icon: 'language',\r\n treeFilterPlaceholder: VueDevToolsPlaceholders[\"vue-i18n-resource-inspector\" /* CUSTOM_INSPECTOR */]\r\n });\r\n api.on.getInspectorTree(payload => {\r\n if (payload.app === app &&\r\n payload.inspectorId === \"vue-i18n-resource-inspector\" /* CUSTOM_INSPECTOR */) {\r\n registerScope(payload, i18n);\r\n }\r\n });\r\n const roots = new Map();\r\n api.on.getInspectorState(async (payload) => {\r\n if (payload.app === app &&\r\n payload.inspectorId === \"vue-i18n-resource-inspector\" /* CUSTOM_INSPECTOR */) {\r\n api.unhighlightElement();\r\n inspectScope(payload, i18n);\r\n if (payload.nodeId === 'global') {\r\n if (!roots.has(payload.app)) {\r\n const [root] = await api.getComponentInstances(payload.app);\r\n roots.set(payload.app, root);\r\n }\r\n api.highlightElement(roots.get(payload.app));\r\n }\r\n else {\r\n const instance = getComponentInstance(payload.nodeId, i18n);\r\n instance && api.highlightElement(instance);\r\n }\r\n }\r\n });\r\n api.on.editInspectorState(payload => {\r\n if (payload.app === app &&\r\n payload.inspectorId === \"vue-i18n-resource-inspector\" /* CUSTOM_INSPECTOR */) {\r\n editScope(payload, i18n);\r\n }\r\n });\r\n api.addTimelineLayer({\r\n id: \"vue-i18n-timeline\" /* TIMELINE */,\r\n label: VueDevToolsLabels[\"vue-i18n-timeline\" /* TIMELINE */],\r\n color: VueDevToolsTimelineColors[\"vue-i18n-timeline\" /* TIMELINE */]\r\n });\r\n resolve(true);\r\n });\r\n }\r\n catch (e) {\r\n console.error(e);\r\n reject(false);\r\n }\r\n });\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction getI18nScopeLable(instance) {\r\n return (instance.type.name ||\r\n instance.type.displayName ||\r\n instance.type.__file ||\r\n 'Anonymous');\r\n}\r\nfunction updateComponentTreeTags(instance, // eslint-disable-line @typescript-eslint/no-explicit-any\r\ntreeNode, i18n) {\r\n // prettier-ignore\r\n const global = i18n.mode === 'composition'\r\n ? i18n.global\r\n : i18n.global.__composer;\r\n if (instance && instance.vnode.el && instance.vnode.el.__VUE_I18N__) {\r\n // add custom tags local scope only\r\n if (instance.vnode.el.__VUE_I18N__ !== global) {\r\n const tag = {\r\n label: `i18n (${getI18nScopeLable(instance)} Scope)`,\r\n textColor: 0x000000,\r\n backgroundColor: 0xffcd19\r\n };\r\n treeNode.tags.push(tag);\r\n }\r\n }\r\n}\r\nfunction inspectComposer(instanceData, composer) {\r\n const type = VUE_I18N_COMPONENT_TYPES;\r\n instanceData.state.push({\r\n type,\r\n key: 'locale',\r\n editable: true,\r\n value: composer.locale.value\r\n });\r\n instanceData.state.push({\r\n type,\r\n key: 'availableLocales',\r\n editable: false,\r\n value: composer.availableLocales\r\n });\r\n instanceData.state.push({\r\n type,\r\n key: 'fallbackLocale',\r\n editable: true,\r\n value: composer.fallbackLocale.value\r\n });\r\n instanceData.state.push({\r\n type,\r\n key: 'inheritLocale',\r\n editable: true,\r\n value: composer.inheritLocale\r\n });\r\n instanceData.state.push({\r\n type,\r\n key: 'messages',\r\n editable: false,\r\n value: getLocaleMessageValue(composer.messages.value)\r\n });\r\n {\r\n instanceData.state.push({\r\n type,\r\n key: 'datetimeFormats',\r\n editable: false,\r\n value: composer.datetimeFormats.value\r\n });\r\n instanceData.state.push({\r\n type,\r\n key: 'numberFormats',\r\n editable: false,\r\n value: composer.numberFormats.value\r\n });\r\n }\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction getLocaleMessageValue(messages) {\r\n const value = {};\r\n Object.keys(messages).forEach((key) => {\r\n const v = messages[key];\r\n if (isFunction(v) && 'source' in v) {\r\n value[key] = getMessageFunctionDetails(v);\r\n }\r\n else if (isObject(v)) {\r\n value[key] = getLocaleMessageValue(v);\r\n }\r\n else {\r\n value[key] = v;\r\n }\r\n });\r\n return value;\r\n}\r\nconst ESC = {\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"',\r\n '&': '&'\r\n};\r\nfunction escape(s) {\r\n return s.replace(/[<>\"&]/g, escapeChar);\r\n}\r\nfunction escapeChar(a) {\r\n return ESC[a] || a;\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction getMessageFunctionDetails(func) {\r\n const argString = func.source ? `(\"${escape(func.source)}\")` : `(?)`;\r\n return {\r\n _custom: {\r\n type: 'function',\r\n display: `ƒ ${argString}`\r\n }\r\n };\r\n}\r\nfunction registerScope(payload, i18n) {\r\n payload.rootNodes.push({\r\n id: 'global',\r\n label: 'Global Scope'\r\n });\r\n // prettier-ignore\r\n const global = i18n.mode === 'composition'\r\n ? i18n.global\r\n : i18n.global.__composer;\r\n for (const [keyInstance, instance] of i18n.__instances) {\r\n // prettier-ignore\r\n const composer = i18n.mode === 'composition'\r\n ? instance\r\n : instance.__composer;\r\n if (global === composer) {\r\n continue;\r\n }\r\n payload.rootNodes.push({\r\n id: composer.id.toString(),\r\n label: `${getI18nScopeLable(keyInstance)} Scope`\r\n });\r\n }\r\n}\r\nfunction getComponentInstance(nodeId, i18n) {\r\n let instance = null;\r\n if (nodeId !== 'global') {\r\n for (const [component, composer] of i18n.__instances.entries()) {\r\n if (composer.id.toString() === nodeId) {\r\n instance = component;\r\n break;\r\n }\r\n }\r\n }\r\n return instance;\r\n}\r\nfunction getComposer$1(nodeId, i18n) {\r\n if (nodeId === 'global') {\r\n return i18n.mode === 'composition'\r\n ? i18n.global\r\n : i18n.global.__composer;\r\n }\r\n else {\r\n const instance = Array.from(i18n.__instances.values()).find(item => item.id.toString() === nodeId);\r\n if (instance) {\r\n return i18n.mode === 'composition'\r\n ? instance\r\n : instance.__composer;\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n}\r\nfunction inspectScope(payload, i18n\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n) {\r\n const composer = getComposer$1(payload.nodeId, i18n);\r\n if (composer) {\r\n // TODO:\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n payload.state = makeScopeInspectState(composer);\r\n }\r\n return null;\r\n}\r\nfunction makeScopeInspectState(composer) {\r\n const state = {};\r\n const localeType = 'Locale related info';\r\n const localeStates = [\r\n {\r\n type: localeType,\r\n key: 'locale',\r\n editable: true,\r\n value: composer.locale.value\r\n },\r\n {\r\n type: localeType,\r\n key: 'fallbackLocale',\r\n editable: true,\r\n value: composer.fallbackLocale.value\r\n },\r\n {\r\n type: localeType,\r\n key: 'availableLocales',\r\n editable: false,\r\n value: composer.availableLocales\r\n },\r\n {\r\n type: localeType,\r\n key: 'inheritLocale',\r\n editable: true,\r\n value: composer.inheritLocale\r\n }\r\n ];\r\n state[localeType] = localeStates;\r\n const localeMessagesType = 'Locale messages info';\r\n const localeMessagesStates = [\r\n {\r\n type: localeMessagesType,\r\n key: 'messages',\r\n editable: false,\r\n value: getLocaleMessageValue(composer.messages.value)\r\n }\r\n ];\r\n state[localeMessagesType] = localeMessagesStates;\r\n {\r\n const datetimeFormatsType = 'Datetime formats info';\r\n const datetimeFormatsStates = [\r\n {\r\n type: datetimeFormatsType,\r\n key: 'datetimeFormats',\r\n editable: false,\r\n value: composer.datetimeFormats.value\r\n }\r\n ];\r\n state[datetimeFormatsType] = datetimeFormatsStates;\r\n const numberFormatsType = 'Datetime formats info';\r\n const numberFormatsStates = [\r\n {\r\n type: numberFormatsType,\r\n key: 'numberFormats',\r\n editable: false,\r\n value: composer.numberFormats.value\r\n }\r\n ];\r\n state[numberFormatsType] = numberFormatsStates;\r\n }\r\n return state;\r\n}\r\nfunction addTimelineEvent(event, payload) {\r\n if (devtoolsApi) {\r\n let groupId;\r\n if (payload && 'groupId' in payload) {\r\n groupId = payload.groupId;\r\n delete payload.groupId;\r\n }\r\n devtoolsApi.addTimelineEvent({\r\n layerId: \"vue-i18n-timeline\" /* TIMELINE */,\r\n event: {\r\n title: event,\r\n groupId,\r\n time: Date.now(),\r\n meta: {},\r\n data: payload || {},\r\n logType: event === \"compile-error\" /* COMPILE_ERROR */\r\n ? 'error'\r\n : event === \"fallback\" /* FALBACK */ ||\r\n event === \"missing\" /* MISSING */\r\n ? 'warning'\r\n : 'default'\r\n }\r\n });\r\n }\r\n}\r\nfunction editScope(payload, i18n) {\r\n const composer = getComposer$1(payload.nodeId, i18n);\r\n if (composer) {\r\n const [field] = payload.path;\r\n if (field === 'locale' && isString(payload.state.value)) {\r\n composer.locale.value = payload.state.value;\r\n }\r\n else if (field === 'fallbackLocale' &&\r\n (isString(payload.state.value) ||\r\n isArray(payload.state.value) ||\r\n isObject(payload.state.value))) {\r\n composer.fallbackLocale.value = payload.state.value;\r\n }\r\n else if (field === 'inheritLocale' && isBoolean(payload.state.value)) {\r\n composer.inheritLocale = payload.state.value;\r\n }\r\n }\r\n}\n\n/**\r\n * Supports compatibility for legacy vue-i18n APIs\r\n * This mixin is used when we use vue-i18n@v9.x or later\r\n */\r\nfunction defineMixin(vuei18n, composer, i18n) {\r\n return {\r\n beforeCreate() {\r\n const instance = getCurrentInstance();\r\n /* istanbul ignore if */\r\n if (!instance) {\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\r\n }\r\n const options = this.$options;\r\n if (options.i18n) {\r\n const optionsI18n = options.i18n;\r\n if (options.__i18n) {\r\n optionsI18n.__i18n = options.__i18n;\r\n }\r\n optionsI18n.__root = composer;\r\n if (this === this.$root) {\r\n this.$i18n = mergeToRoot(vuei18n, optionsI18n);\r\n }\r\n else {\r\n optionsI18n.__injectWithOption = true;\r\n this.$i18n = createVueI18n(optionsI18n);\r\n }\r\n }\r\n else if (options.__i18n) {\r\n if (this === this.$root) {\r\n this.$i18n = mergeToRoot(vuei18n, options);\r\n }\r\n else {\r\n this.$i18n = createVueI18n({\r\n __i18n: options.__i18n,\r\n __injectWithOption: true,\r\n __root: composer\r\n });\r\n }\r\n }\r\n else {\r\n // set global\r\n this.$i18n = vuei18n;\r\n }\r\n if (options.__i18nGlobal) {\r\n adjustI18nResources(composer, options, options);\r\n }\r\n vuei18n.__onComponentInstanceCreated(this.$i18n);\r\n i18n.__setInstance(instance, this.$i18n);\r\n // defines vue-i18n legacy APIs\r\n this.$t = (...args) => this.$i18n.t(...args);\r\n this.$rt = (...args) => this.$i18n.rt(...args);\r\n this.$tc = (...args) => this.$i18n.tc(...args);\r\n this.$te = (key, locale) => this.$i18n.te(key, locale);\r\n this.$d = (...args) => this.$i18n.d(...args);\r\n this.$n = (...args) => this.$i18n.n(...args);\r\n this.$tm = (key) => this.$i18n.tm(key);\r\n },\r\n mounted() {\r\n /* istanbul ignore if */\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n !false &&\r\n this.$el &&\r\n this.$i18n) {\r\n this.$el.__VUE_I18N__ = this.$i18n.__composer;\r\n const emitter = (this.__v_emitter =\r\n createEmitter());\r\n const _vueI18n = this.$i18n;\r\n _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);\r\n emitter.on('*', addTimelineEvent);\r\n }\r\n },\r\n unmounted() {\r\n const instance = getCurrentInstance();\r\n /* istanbul ignore if */\r\n if (!instance) {\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\r\n }\r\n /* istanbul ignore if */\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n !false &&\r\n this.$el &&\r\n this.$el.__VUE_I18N__) {\r\n if (this.__v_emitter) {\r\n this.__v_emitter.off('*', addTimelineEvent);\r\n delete this.__v_emitter;\r\n }\r\n if (this.$i18n) {\r\n const _vueI18n = this.$i18n;\r\n _vueI18n.__disableEmitter && _vueI18n.__disableEmitter();\r\n delete this.$el.__VUE_I18N__;\r\n }\r\n }\r\n delete this.$t;\r\n delete this.$rt;\r\n delete this.$tc;\r\n delete this.$te;\r\n delete this.$d;\r\n delete this.$n;\r\n delete this.$tm;\r\n i18n.__deleteInstance(instance);\r\n delete this.$i18n;\r\n }\r\n };\r\n}\r\nfunction mergeToRoot(root, options) {\r\n root.locale = options.locale || root.locale;\r\n root.fallbackLocale = options.fallbackLocale || root.fallbackLocale;\r\n root.missing = options.missing || root.missing;\r\n root.silentTranslationWarn =\r\n options.silentTranslationWarn || root.silentFallbackWarn;\r\n root.silentFallbackWarn =\r\n options.silentFallbackWarn || root.silentFallbackWarn;\r\n root.formatFallbackMessages =\r\n options.formatFallbackMessages || root.formatFallbackMessages;\r\n root.postTranslation = options.postTranslation || root.postTranslation;\r\n root.warnHtmlInMessage = options.warnHtmlInMessage || root.warnHtmlInMessage;\r\n root.escapeParameterHtml =\r\n options.escapeParameterHtml || root.escapeParameterHtml;\r\n root.sync = options.sync || root.sync;\r\n root.__composer[SetPluralRulesSymbol](options.pluralizationRules || root.pluralizationRules);\r\n const messages = getLocaleMessages(root.locale, {\r\n messages: options.messages,\r\n __i18n: options.__i18n\r\n });\r\n Object.keys(messages).forEach(locale => root.mergeLocaleMessage(locale, messages[locale]));\r\n if (options.datetimeFormats) {\r\n Object.keys(options.datetimeFormats).forEach(locale => root.mergeDateTimeFormat(locale, options.datetimeFormats[locale]));\r\n }\r\n if (options.numberFormats) {\r\n Object.keys(options.numberFormats).forEach(locale => root.mergeNumberFormat(locale, options.numberFormats[locale]));\r\n }\r\n return root;\r\n}\n\n/**\r\n * Injection key for {@link useI18n}\r\n *\r\n * @remarks\r\n * The global injection key for I18n instances with `useI18n`. this injection key is used in Web Components.\r\n * Specify the i18n instance created by {@link createI18n} together with `provide` function.\r\n *\r\n * @VueI18nGeneral\r\n */\r\nconst I18nInjectionKey = \r\n/* #__PURE__*/ makeSymbol('global-vue-i18n');\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\r\nfunction createI18n(options = {}, VueI18nLegacy) {\r\n // prettier-ignore\r\n const __legacyMode = __VUE_I18N_LEGACY_API__ && isBoolean(options.legacy)\r\n ? options.legacy\r\n : __VUE_I18N_LEGACY_API__;\r\n // prettier-ignore\r\n const __globalInjection = !!options.globalInjection\r\n ;\r\n const __instances = new Map();\r\n const __global = createGlobal(options, __legacyMode);\r\n const symbol = makeSymbol((process.env.NODE_ENV !== 'production') ? 'vue-i18n' : '');\r\n function __getInstance(component) {\r\n return __instances.get(component) || null;\r\n }\r\n function __setInstance(component, instance) {\r\n __instances.set(component, instance);\r\n }\r\n function __deleteInstance(component) {\r\n __instances.delete(component);\r\n }\r\n {\r\n const i18n = {\r\n // mode\r\n get mode() {\r\n return __VUE_I18N_LEGACY_API__ && __legacyMode\r\n ? 'legacy'\r\n : 'composition';\r\n },\r\n // install plugin\r\n async install(app, ...options) {\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n !false) {\r\n app.__VUE_I18N__ = i18n;\r\n }\r\n // setup global provider\r\n app.__VUE_I18N_SYMBOL__ = symbol;\r\n app.provide(app.__VUE_I18N_SYMBOL__, i18n);\r\n // global method and properties injection for Composition API\r\n if (!__legacyMode && __globalInjection) {\r\n injectGlobalFields(app, i18n.global);\r\n }\r\n // install built-in components and directive\r\n if (__VUE_I18N_FULL_INSTALL__) {\r\n apply(app, i18n, ...options);\r\n }\r\n // setup mixin for Legacy API\r\n if (__VUE_I18N_LEGACY_API__ && __legacyMode) {\r\n app.mixin(defineMixin(__global, __global.__composer, i18n));\r\n }\r\n // setup vue-devtools plugin\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && !false) {\r\n const ret = await enableDevTools(app, i18n);\r\n if (!ret) {\r\n throw createI18nError(I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);\r\n }\r\n const emitter = createEmitter();\r\n if (__legacyMode) {\r\n const _vueI18n = __global;\r\n _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);\r\n }\r\n else {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const _composer = __global;\r\n _composer[EnableEmitter] && _composer[EnableEmitter](emitter);\r\n }\r\n emitter.on('*', addTimelineEvent);\r\n }\r\n },\r\n // global accessor\r\n get global() {\r\n return __global;\r\n },\r\n // @internal\r\n __instances,\r\n // @internal\r\n __getInstance,\r\n // @internal\r\n __setInstance,\r\n // @internal\r\n __deleteInstance\r\n };\r\n return i18n;\r\n }\r\n}\r\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\r\nfunction useI18n(options = {}) {\r\n const instance = getCurrentInstance();\r\n if (instance == null) {\r\n throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);\r\n }\r\n if (!instance.isCE &&\r\n instance.appContext.app != null &&\r\n !instance.appContext.app.__VUE_I18N_SYMBOL__) {\r\n throw createI18nError(I18nErrorCodes.NOT_INSLALLED);\r\n }\r\n const i18n = getI18nInstance(instance);\r\n const global = getGlobalComposer(i18n);\r\n const componentOptions = getComponentOptions(instance);\r\n const scope = getScope(options, componentOptions);\r\n if (scope === 'global') {\r\n adjustI18nResources(global, options, componentOptions);\r\n return global;\r\n }\r\n if (scope === 'parent') {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n let composer = getComposer(i18n, instance, options.__useComponent);\r\n if (composer == null) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(getWarnMessage(I18nWarnCodes.NOT_FOUND_PARENT_SCOPE));\r\n }\r\n composer = global;\r\n }\r\n return composer;\r\n }\r\n // scope 'local' case\r\n if (i18n.mode === 'legacy') {\r\n throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);\r\n }\r\n const i18nInternal = i18n;\r\n let composer = i18nInternal.__getInstance(instance);\r\n if (composer == null) {\r\n const composerOptions = assign({}, options);\r\n if ('__i18n' in componentOptions) {\r\n composerOptions.__i18n = componentOptions.__i18n;\r\n }\r\n if (global) {\r\n composerOptions.__root = global;\r\n }\r\n composer = createComposer(composerOptions);\r\n setupLifeCycle(i18nInternal, instance, composer);\r\n i18nInternal.__setInstance(instance, composer);\r\n }\r\n return composer;\r\n}\r\n/**\r\n * Cast to VueI18n legacy compatible type\r\n *\r\n * @remarks\r\n * This API is provided only with [vue-i18n-bridge](https://vue-i18n.intlify.dev/guide/migration/ways.html#what-is-vue-i18n-bridge).\r\n *\r\n * The purpose of this function is to convert an {@link I18n} instance created with {@link createI18n | createI18n(legacy: true)} into a `vue-i18n@v8.x` compatible instance of `new VueI18n` in a TypeScript environment.\r\n *\r\n * @param i18n - An instance of {@link I18n}\r\n * @returns A i18n instance which is casted to {@link VueI18n} type\r\n *\r\n * @VueI18nTip\r\n * :new: provided by **vue-i18n-bridge only**\r\n *\r\n * @VueI18nGeneral\r\n */\r\nconst castToVueI18n = (i18n\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n) => {\r\n if (!(__VUE_I18N_BRIDGE__ in i18n)) {\r\n throw createI18nError(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);\r\n }\r\n return i18n;\r\n};\r\nfunction createGlobal(options, legacyMode, VueI18nLegacy // eslint-disable-line @typescript-eslint/no-explicit-any\r\n) {\r\n {\r\n return __VUE_I18N_LEGACY_API__ && legacyMode\r\n ? createVueI18n(options)\r\n : createComposer(options);\r\n }\r\n}\r\nfunction getI18nInstance(instance) {\r\n {\r\n const i18n = inject(!instance.isCE\r\n ? instance.appContext.app.__VUE_I18N_SYMBOL__\r\n : I18nInjectionKey);\r\n /* istanbul ignore if */\r\n if (!i18n) {\r\n throw createI18nError(!instance.isCE\r\n ? I18nErrorCodes.UNEXPECTED_ERROR\r\n : I18nErrorCodes.NOT_INSLALLED_WITH_PROVIDE);\r\n }\r\n return i18n;\r\n }\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction getScope(options, componentOptions) {\r\n // prettier-ignore\r\n return isEmptyObject(options)\r\n ? ('__i18n' in componentOptions)\r\n ? 'local'\r\n : 'global'\r\n : !options.useScope\r\n ? 'local'\r\n : options.useScope;\r\n}\r\nfunction getGlobalComposer(i18n) {\r\n // prettier-ignore\r\n return i18n.mode === 'composition'\r\n ? i18n.global\r\n : i18n.global.__composer\r\n ;\r\n}\r\nfunction getComposer(i18n, target, useComponent = false) {\r\n let composer = null;\r\n const root = target.root;\r\n let current = target.parent;\r\n while (current != null) {\r\n const i18nInternal = i18n;\r\n if (i18n.mode === 'composition') {\r\n composer = i18nInternal.__getInstance(current);\r\n }\r\n else {\r\n if (__VUE_I18N_LEGACY_API__) {\r\n const vueI18n = i18nInternal.__getInstance(current);\r\n if (vueI18n != null) {\r\n composer = vueI18n\r\n .__composer;\r\n if (useComponent &&\r\n composer &&\r\n !composer[InejctWithOption] // eslint-disable-line @typescript-eslint/no-explicit-any\r\n ) {\r\n composer = null;\r\n }\r\n }\r\n }\r\n }\r\n if (composer != null) {\r\n break;\r\n }\r\n if (root === current) {\r\n break;\r\n }\r\n current = current.parent;\r\n }\r\n return composer;\r\n}\r\nfunction setupLifeCycle(i18n, target, composer) {\r\n let emitter = null;\r\n {\r\n onMounted(() => {\r\n // inject composer instance to DOM for intlify-devtools\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n !false &&\r\n target.vnode.el) {\r\n target.vnode.el.__VUE_I18N__ = composer;\r\n emitter = createEmitter();\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const _composer = composer;\r\n _composer[EnableEmitter] && _composer[EnableEmitter](emitter);\r\n emitter.on('*', addTimelineEvent);\r\n }\r\n }, target);\r\n onUnmounted(() => {\r\n // remove composer instance from DOM for intlify-devtools\r\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\r\n !false &&\r\n target.vnode.el &&\r\n target.vnode.el.__VUE_I18N__) {\r\n emitter && emitter.off('*', addTimelineEvent);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const _composer = composer;\r\n _composer[DisableEmitter] && _composer[DisableEmitter]();\r\n delete target.vnode.el.__VUE_I18N__;\r\n }\r\n i18n.__deleteInstance(target);\r\n }, target);\r\n }\r\n}\r\nconst globalExportProps = [\r\n 'locale',\r\n 'fallbackLocale',\r\n 'availableLocales'\r\n];\r\nconst globalExportMethods = ['t', 'rt', 'd', 'n', 'tm'] ;\r\nfunction injectGlobalFields(app, composer) {\r\n const i18n = Object.create(null);\r\n globalExportProps.forEach(prop => {\r\n const desc = Object.getOwnPropertyDescriptor(composer, prop);\r\n if (!desc) {\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\r\n }\r\n const wrap = isRef(desc.value) // check computed props\r\n ? {\r\n get() {\r\n return desc.value.value;\r\n },\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n set(val) {\r\n desc.value.value = val;\r\n }\r\n }\r\n : {\r\n get() {\r\n return desc.get && desc.get();\r\n }\r\n };\r\n Object.defineProperty(i18n, prop, wrap);\r\n });\r\n app.config.globalProperties.$i18n = i18n;\r\n globalExportMethods.forEach(method => {\r\n const desc = Object.getOwnPropertyDescriptor(composer, method);\r\n if (!desc || !desc.value) {\r\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\r\n }\r\n Object.defineProperty(app.config.globalProperties, `$${method}`, desc);\r\n });\r\n}\n\n// register message compiler at vue-i18n\r\nregisterMessageCompiler(compileToFunction);\r\n// register message resolver at vue-i18n\r\nregisterMessageResolver(resolveValue);\r\n// register fallback locale at vue-i18n\r\nregisterLocaleFallbacker(fallbackWithLocaleChain);\r\n{\r\n initFeatureFlags();\r\n}\r\n// NOTE: experimental !!\r\nif ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\r\n const target = getGlobalThis();\r\n target.__INTLIFY__ = true;\r\n setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);\r\n}\r\nif ((process.env.NODE_ENV !== 'production')) ;\n\nexport { DatetimeFormat, I18nInjectionKey, NumberFormat, Translation, VERSION, castToVueI18n, createI18n, useI18n, vTDirective };\n"],"names":["VERSION","initFeatureFlags","getGlobalThis","code","CompileErrorCodes","inc","I18nErrorCodes","createI18nError","args","createCompileError","TransrateVNodeSymbol","DatetimePartsSymbol","NumberPartsSymbol","SetPluralRulesSymbol","makeSymbol","InejctWithOption","handleFlatJson","obj","isObject","key","hasOwn","subKeys","lastIndex","currentObj","i","getLocaleMessages","locale","options","messages","__i18n","messageResolver","flatJson","ret","isPlainObject","isArray","custom","resource","deepCopy","isString","isNotObjectOrIsArray","val","src","des","getComponentOptions","instance","adjustI18nResources","global","componentOptions","locales","createTextNode","createVNode","Text","DEVTOOLS_META","composerID","defineCoreMissingHandler","missing","ctx","type","getCurrentInstance","getMetaInfo","meta","createComposer","VueI18nLegacy","__root","_isGlobal","_inheritLocale","isBoolean","_locale","ref","DEFAULT_LOCALE","_fallbackLocale","_messages","_datetimeFormats","_numberFormats","_missingWarn","isRegExp","_fallbackWarn","_fallbackRoot","_fallbackFormat","_missing","isFunction","_runtimeMissing","_postTranslation","_warnHtmlMessage","_escapeParameter","_modifiers","_pluralRules","_context","getCoreContext","ctxOptions","createCoreContext","updateFallbackLocale","trackReactivityValues","computed","fallbackLocale","datetimeFormats","numberFormats","getPostTranslationHandler","setPostTranslationHandler","handler","getMissingHandler","setMissingHandler","wrapWithDeps","fn","argumentParser","warnType","fallbackSuccess","fallbackFail","successCondition","setAdditionalMeta","isNumber","NOT_REOSLVED","arg2","t","context","translate","parseTranslateArgs","root","rt","arg1","arg3","assign","d","datetime","parseDateTimeArgs","MISSING_RESOLVE_VALUE","n","number","parseNumberArgs","normalize","values","processor","transrateVNode","numberParts","datetimeParts","setPluralRules","rules","te","targetLocale","message","getLocaleMessage","resolveMessages","fallbackWithLocaleChain","targetLocaleMessages","messageValue","tm","setLocaleMessage","mergeLocaleMessage","getDateTimeFormat","setDateTimeFormat","format","clearDateTimeFormat","mergeDateTimeFormat","getNumberFormat","setNumberFormat","clearNumberFormat","mergeNumberFormat","watch","composer","convertComposerOptions","missingWarn","fallbackWarn","fallbackRoot","fallbackFormat","modifiers","pluralizationRules","postTranslation","warnHtmlMessage","escapeParameter","inheritLocale","sharedMessages","__injectWithOption","createVueI18n","vueI18n","list","named","choice","choicesLength","target","componentInstanceCreatedListener","baseFormatProps","getInterpolateArg","slots","keys","slot","current","arg","getFragmentableTag","tag","Fragment","Translation","props","attrs","i18n","useI18n","children","assignedAttrs","h","renderFormatter","slotKeys","partFormatter","overrides","prop","parts","part","index","NUMBER_FORMAT_KEYS","NumberFormat","DATETIME_FORMAT_KEYS","DatetimeFormat","getComposer$2","i18nInternal","vTDirective","bind","el","value","parsedValue","parseValue","makeParams","path","plural","apply","app","pluginOptions","useI18nComponentName","defineMixin","vuei18n","optionsI18n","mergeToRoot","I18nInjectionKey","createI18n","__legacyMode","__globalInjection","__instances","__global","createGlobal","symbol","__getInstance","component","__setInstance","__deleteInstance","injectGlobalFields","getI18nInstance","getGlobalComposer","scope","getScope","getComposer","composerOptions","setupLifeCycle","legacyMode","inject","isEmptyObject","useComponent","onMounted","onUnmounted","globalExportProps","globalExportMethods","desc","wrap","isRef","method","registerMessageCompiler","compileToFunction","registerMessageResolver","resolveValue","registerLocaleFallbacker","setDevToolsHook"],"mappings":"8uBAAA;AAAA;AAAA;AAAA;AAAA,IAmBA,MAAMA,GAAU,gBAKhB,SAASC,IAAmB,CAEpB,OAAO,2BAA8B,YAErCC,IAAgB,0BAA4B,IAE5C,OAAO,yBAA4B,YAEnCA,IAAgB,wBAA0B,IAE1C,OAAO,2BAA8B,YACrCA,IAAgB,0BAA4B,GAOpD,CA4BA,IAAIC,GAAOC,GAAkB,iBAC7B,MAAMC,EAAM,IAAM,EAAEF,GACdG,EAAiB,CAEnB,uBAAwBH,GAExB,iBAAkBE,EAAI,EAEtB,u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