mooho-base-admin-plus 2.0.41 → 2.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import require$$0, { watch, effectScope, reactive, computed, shallowRef, unref, nextTick, defineComponent, inject, h, provide, ref, getCurrentInstance, watchEffect, openBlock, createElementBlock, createElementVNode, normalizeStyle as normalizeStyle$1, toDisplayString as toDisplayString$1, withDirectives, vModelText, createCommentVNode, pushScopeId, popScopeId, resolveComponent, resolveDirective, createVNode as createVNode$1, withCtx, Fragment, renderList, createBlock, createTextVNode, renderSlot, mergeProps, markRaw, resolveDynamicComponent, withModifiers, normalizeProps, guardReactiveProps, vShow, normalizeClass, Transition, KeepAlive } from "vue";
1
+ import require$$0, { watch, effectScope, reactive, computed, shallowRef, unref, nextTick, defineComponent, inject, h, provide, ref, getCurrentInstance, watchEffect, onMounted, onUnmounted, onBeforeMount, Fragment, isRef, createVNode as createVNode$1, Text, openBlock, createElementBlock, createElementVNode, normalizeStyle as normalizeStyle$1, toDisplayString as toDisplayString$1, withDirectives, vModelText, createCommentVNode, pushScopeId, popScopeId, resolveComponent, resolveDirective, withCtx, renderList, createBlock, createTextVNode, renderSlot, mergeProps, markRaw, resolveDynamicComponent, withModifiers, normalizeProps, guardReactiveProps, vShow, normalizeClass, Transition, KeepAlive } from "vue";
2
2
  import ViewUIPlus from "view-ui-plus";
3
3
  function getDevtoolsGlobalHook() {
4
4
  return getTarget$1().__VUE_DEVTOOLS_GLOBAL_HOOK__;
@@ -161,7 +161,7 @@ function forEachValue(obj, fn) {
161
161
  function isObject$6(obj) {
162
162
  return obj !== null && typeof obj === "object";
163
163
  }
164
- function isPromise$5(val) {
164
+ function isPromise$4(val) {
165
165
  return val && typeof val.then === "function";
166
166
  }
167
167
  function assert$1(condition, msg) {
@@ -361,7 +361,7 @@ function registerAction$1(store2, type, handler, local) {
361
361
  rootGetters: store2.getters,
362
362
  rootState: store2.state
363
363
  }, payload);
364
- if (!isPromise$5(res2)) {
364
+ if (!isPromise$4(res2)) {
365
365
  res2 = Promise.resolve(res2);
366
366
  }
367
367
  if (store2._devtoolHook) {
@@ -2549,7 +2549,7 @@ var lodash$1 = { exports: {} };
2549
2549
  var index2 = -1, length2 = array.length;
2550
2550
  while (++index2 < length2) {
2551
2551
  var value = array[index2], current = iteratee2(value);
2552
- if (current != null && (computed2 === undefined$1 ? current === current && !isSymbol2(current) : comparator(current, computed2))) {
2552
+ if (current != null && (computed2 === undefined$1 ? current === current && !isSymbol(current) : comparator(current, computed2))) {
2553
2553
  var computed2 = current, result3 = value;
2554
2554
  }
2555
2555
  }
@@ -3099,7 +3099,7 @@ var lodash$1 = { exports: {} };
3099
3099
  if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
3100
3100
  while (low < high) {
3101
3101
  var mid = low + high >>> 1, computed2 = array[mid];
3102
- if (computed2 !== null && !isSymbol2(computed2) && (retHighest ? computed2 <= value : computed2 < value)) {
3102
+ if (computed2 !== null && !isSymbol(computed2) && (retHighest ? computed2 <= value : computed2 < value)) {
3103
3103
  low = mid + 1;
3104
3104
  } else {
3105
3105
  high = mid;
@@ -3115,9 +3115,9 @@ var lodash$1 = { exports: {} };
3115
3115
  return 0;
3116
3116
  }
3117
3117
  value = iteratee2(value);
3118
- var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol2(value), valIsUndefined = value === undefined$1;
3118
+ var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined$1;
3119
3119
  while (low < high) {
3120
- var mid = nativeFloor((low + high) / 2), computed2 = iteratee2(array[mid]), othIsDefined = computed2 !== undefined$1, othIsNull = computed2 === null, othIsReflexive = computed2 === computed2, othIsSymbol = isSymbol2(computed2);
3120
+ var mid = nativeFloor((low + high) / 2), computed2 = iteratee2(array[mid]), othIsDefined = computed2 !== undefined$1, othIsNull = computed2 === null, othIsReflexive = computed2 === computed2, othIsSymbol = isSymbol(computed2);
3121
3121
  if (valIsNaN) {
3122
3122
  var setLow = retHighest || othIsReflexive;
3123
3123
  } else if (valIsUndefined) {
@@ -3154,7 +3154,7 @@ var lodash$1 = { exports: {} };
3154
3154
  if (typeof value == "number") {
3155
3155
  return value;
3156
3156
  }
3157
- if (isSymbol2(value)) {
3157
+ if (isSymbol(value)) {
3158
3158
  return NAN;
3159
3159
  }
3160
3160
  return +value;
@@ -3166,7 +3166,7 @@ var lodash$1 = { exports: {} };
3166
3166
  if (isArray2(value)) {
3167
3167
  return arrayMap(value, baseToString) + "";
3168
3168
  }
3169
- if (isSymbol2(value)) {
3169
+ if (isSymbol(value)) {
3170
3170
  return symbolToString ? symbolToString.call(value) : "";
3171
3171
  }
3172
3172
  var result3 = value + "";
@@ -3311,8 +3311,8 @@ var lodash$1 = { exports: {} };
3311
3311
  }
3312
3312
  function compareAscending(value, other) {
3313
3313
  if (value !== other) {
3314
- var valIsDefined = value !== undefined$1, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol2(value);
3315
- var othIsDefined = other !== undefined$1, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol2(other);
3314
+ var valIsDefined = value !== undefined$1, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
3315
+ var othIsDefined = other !== undefined$1, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
3316
3316
  if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
3317
3317
  return 1;
3318
3318
  }
@@ -4194,7 +4194,7 @@ var lodash$1 = { exports: {} };
4194
4194
  return false;
4195
4195
  }
4196
4196
  var type = typeof value;
4197
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol2(value)) {
4197
+ if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
4198
4198
  return true;
4199
4199
  }
4200
4200
  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object);
@@ -4373,7 +4373,7 @@ var lodash$1 = { exports: {} };
4373
4373
  return result3;
4374
4374
  });
4375
4375
  function toKey(value) {
4376
- if (typeof value == "string" || isSymbol2(value)) {
4376
+ if (typeof value == "string" || isSymbol(value)) {
4377
4377
  return value;
4378
4378
  }
4379
4379
  var result3 = value + "";
@@ -5447,7 +5447,7 @@ var lodash$1 = { exports: {} };
5447
5447
  function isString2(value) {
5448
5448
  return typeof value == "string" || !isArray2(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
5449
5449
  }
5450
- function isSymbol2(value) {
5450
+ function isSymbol(value) {
5451
5451
  return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
5452
5452
  }
5453
5453
  var isTypedArray2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
@@ -5499,7 +5499,7 @@ var lodash$1 = { exports: {} };
5499
5499
  if (typeof value == "number") {
5500
5500
  return value;
5501
5501
  }
5502
- if (isSymbol2(value)) {
5502
+ if (isSymbol(value)) {
5503
5503
  return NAN;
5504
5504
  }
5505
5505
  if (isObject2(value)) {
@@ -6225,7 +6225,7 @@ var lodash$1 = { exports: {} };
6225
6225
  if (isArray2(value)) {
6226
6226
  return arrayMap(value, toKey);
6227
6227
  }
6228
- return isSymbol2(value) ? [value] : copyArray(stringToPath(toString3(value)));
6228
+ return isSymbol(value) ? [value] : copyArray(stringToPath(toString3(value)));
6229
6229
  }
6230
6230
  function uniqueId(prefix2) {
6231
6231
  var id = ++idCounter;
@@ -6499,7 +6499,7 @@ var lodash$1 = { exports: {} };
6499
6499
  lodash2.isSafeInteger = isSafeInteger;
6500
6500
  lodash2.isSet = isSet;
6501
6501
  lodash2.isString = isString2;
6502
- lodash2.isSymbol = isSymbol2;
6502
+ lodash2.isSymbol = isSymbol;
6503
6503
  lodash2.isTypedArray = isTypedArray2;
6504
6504
  lodash2.isUndefined = isUndefined2;
6505
6505
  lodash2.isWeakMap = isWeakMap;
@@ -6841,14 +6841,14 @@ cookies$2.getAll = function() {
6841
6841
  cookies$2.remove = function(name = "default") {
6842
6842
  return api.remove(`admin-plus-${Setting.appID}-${name}`);
6843
6843
  };
6844
- var isPromise$4 = { exports: {} };
6845
- isPromise$4.exports = isPromise$3;
6846
- isPromise$4.exports.default = isPromise$3;
6847
- function isPromise$3(obj) {
6844
+ var isPromise$3 = { exports: {} };
6845
+ isPromise$3.exports = isPromise$2;
6846
+ isPromise$3.exports.default = isPromise$2;
6847
+ function isPromise$2(obj) {
6848
6848
  return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function";
6849
6849
  }
6850
6850
  var lodash = lodash$1.exports;
6851
- var isPromise$2 = isPromise$4.exports;
6851
+ var isPromise$1 = isPromise$3.exports;
6852
6852
  var main = function(adapter2) {
6853
6853
  if (typeof adapter2 !== "object") {
6854
6854
  throw new Error("An adapter must be provided, see https://github.com/typicode/lowdb/#usage");
@@ -6866,11 +6866,11 @@ var main = function(adapter2) {
6866
6866
  db2._ = _;
6867
6867
  db2.read = function() {
6868
6868
  var r = adapter2.read();
6869
- return isPromise$2(r) ? r.then(plant) : plant(r);
6869
+ return isPromise$1(r) ? r.then(plant) : plant(r);
6870
6870
  };
6871
6871
  db2.write = function(returnValue) {
6872
6872
  var w2 = adapter2.write(db2.getState());
6873
- return isPromise$2(w2) ? w2.then(function() {
6873
+ return isPromise$1(w2) ? w2.then(function() {
6874
6874
  return returnValue;
6875
6875
  }) : returnValue;
6876
6876
  };
@@ -6971,7 +6971,7 @@ db$1.defaults({
6971
6971
  sys: {},
6972
6972
  database: {}
6973
6973
  }).write();
6974
- const util$8 = {
6974
+ const util$2 = {
6975
6975
  cookies: cookies$2,
6976
6976
  db: db$1
6977
6977
  };
@@ -10464,7 +10464,7 @@ const warnAboutDepreation = (deprecatedParam, useInstead) => {
10464
10464
  const callIfFunction = (arg) => typeof arg === "function" ? arg() : arg;
10465
10465
  const hasToPromiseFn = (arg) => arg && typeof arg.toPromise === "function";
10466
10466
  const asPromise = (arg) => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg);
10467
- const isPromise$1 = (arg) => arg && Promise.resolve(arg) === arg;
10467
+ const isPromise = (arg) => arg && Promise.resolve(arg) === arg;
10468
10468
  const DismissReason = Object.freeze({
10469
10469
  cancel: "cancel",
10470
10470
  backdrop: "backdrop",
@@ -11134,7 +11134,7 @@ const renderInputType = {};
11134
11134
  renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => {
11135
11135
  if (typeof params.inputValue === "string" || typeof params.inputValue === "number") {
11136
11136
  input.value = params.inputValue;
11137
- } else if (!isPromise$1(params.inputValue)) {
11137
+ } else if (!isPromise(params.inputValue)) {
11138
11138
  warn$2(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof params.inputValue}"`);
11139
11139
  }
11140
11140
  setInputPlaceholder(input, params);
@@ -12152,7 +12152,7 @@ const addClasses = (container, popup, params) => {
12152
12152
  const handleInputOptionsAndValue = (instance, params) => {
12153
12153
  if (params.input === "select" || params.input === "radio") {
12154
12154
  handleInputOptions(instance, params);
12155
- } else if (["text", "email", "number", "tel", "textarea"].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise$1(params.inputValue))) {
12155
+ } else if (["text", "email", "number", "tel", "textarea"].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) {
12156
12156
  handleInputValue(instance, params);
12157
12157
  }
12158
12158
  };
@@ -12178,7 +12178,7 @@ const getFileValue = (input) => input.files.length ? input.getAttribute("multipl
12178
12178
  const handleInputOptions = (instance, params) => {
12179
12179
  const content = getContent();
12180
12180
  const processInputOptions = (inputOptions) => populateInputOptions[params.input](content, formatInputOptions(inputOptions), params);
12181
- if (hasToPromiseFn(params.inputOptions) || isPromise$1(params.inputOptions)) {
12181
+ if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) {
12182
12182
  showLoading();
12183
12183
  asPromise(params.inputOptions).then((inputOptions) => {
12184
12184
  instance.hideLoading();
@@ -12802,7 +12802,7 @@ service.interceptors.request.use(
12802
12802
  store.commit("admin/loader/start");
12803
12803
  let baseURL = window.$mode === "development" ? Setting.apiBaseURL.dev : Setting.apiBaseURL.prd;
12804
12804
  config.url = baseURL + config.url;
12805
- const token = util$8.cookies.get("token");
12805
+ const token = util$2.cookies.get("token");
12806
12806
  config.headers["Authorization"] = "Bearer " + token;
12807
12807
  return config;
12808
12808
  },
@@ -12932,8 +12932,8 @@ var account = {
12932
12932
  actions: {
12933
12933
  async login({ dispatch: dispatch2 }, { username = "", password = "" } = {}) {
12934
12934
  const res2 = await userlApi.login({ account: username, password });
12935
- util$8.cookies.set("uuid", res2.user.id);
12936
- util$8.cookies.set("token", res2.token);
12935
+ util$2.cookies.set("uuid", res2.user.id);
12936
+ util$2.cookies.set("token", res2.token);
12937
12937
  await dispatch2("admin/user/set", res2.user, { root: true });
12938
12938
  await dispatch2("admin/user/setData", res2.data, { root: true });
12939
12939
  await dispatch2("load");
@@ -12941,8 +12941,8 @@ var account = {
12941
12941
  },
12942
12942
  logout({ dispatch: dispatch2 }, { confirm: confirm2 = false } = {}) {
12943
12943
  async function logout() {
12944
- util$8.cookies.remove("token");
12945
- util$8.cookies.remove("uuid");
12944
+ util$2.cookies.remove("token");
12945
+ util$2.cookies.remove("uuid");
12946
12946
  await dispatch2("admin/user/set", {}, { root: true });
12947
12947
  if (router$1.currentRoute.value.path != "/login") {
12948
12948
  router$1.push("/login?redirect=" + router$1.options.history.location);
@@ -15085,11 +15085,11 @@ var __glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
15085
15085
  "default": dataView
15086
15086
  }, Symbol.toStringTag, { value: "Module" }));
15087
15087
  function pathInit({ dbName = "database", path = "", user: user2 = true, validator: validator2 = () => true, defaultValue = "" }) {
15088
- const uuid = util$8.cookies.get("uuid") || "ghost-uuid";
15088
+ const uuid = util$2.cookies.get("uuid") || "ghost-uuid";
15089
15089
  const currentPath = `${dbName}.${user2 ? `user.${uuid}` : "public"}${path ? `.${path}` : ""}`;
15090
- const value = util$8.db.get(currentPath).value();
15090
+ const value = util$2.db.get(currentPath).value();
15091
15091
  if (!(value !== void 0 && validator2(value))) {
15092
- util$8.db.set(currentPath, defaultValue).write();
15092
+ util$2.db.set(currentPath, defaultValue).write();
15093
15093
  }
15094
15094
  return currentPath;
15095
15095
  }
@@ -15097,7 +15097,7 @@ var db = {
15097
15097
  namespaced: true,
15098
15098
  actions: {
15099
15099
  set(context, { dbName = "database", path = "", value = "", user: user2 = false }) {
15100
- util$8.db.set(
15100
+ util$2.db.set(
15101
15101
  pathInit({
15102
15102
  dbName,
15103
15103
  path,
@@ -15110,7 +15110,7 @@ var db = {
15110
15110
  return new Promise((resolve) => {
15111
15111
  resolve(
15112
15112
  lodash$1.exports.cloneDeep(
15113
- util$8.db.get(
15113
+ util$2.db.get(
15114
15114
  pathInit({
15115
15115
  dbName,
15116
15116
  path,
@@ -15125,7 +15125,7 @@ var db = {
15125
15125
  database(context, { user: user2 = false } = {}) {
15126
15126
  return new Promise((resolve) => {
15127
15127
  resolve(
15128
- util$8.db.get(
15128
+ util$2.db.get(
15129
15129
  pathInit({
15130
15130
  dbName: "database",
15131
15131
  path: "",
@@ -15139,7 +15139,7 @@ var db = {
15139
15139
  databaseClear(context, { user: user2 = false } = {}) {
15140
15140
  return new Promise((resolve) => {
15141
15141
  resolve(
15142
- util$8.db.get(
15142
+ util$2.db.get(
15143
15143
  pathInit({
15144
15144
  dbName: "database",
15145
15145
  path: "",
@@ -15154,7 +15154,7 @@ var db = {
15154
15154
  databasePage(context, { basis = "fullPath", user: user2 = false } = {}) {
15155
15155
  return new Promise((resolve) => {
15156
15156
  resolve(
15157
- util$8.db.get(
15157
+ util$2.db.get(
15158
15158
  pathInit({
15159
15159
  dbName: "database",
15160
15160
  path: `$page.${router$1.app.$route[basis]}`,
@@ -15168,7 +15168,7 @@ var db = {
15168
15168
  databasePageClear(context, { basis = "fullPath", user: user2 = false } = {}) {
15169
15169
  return new Promise((resolve) => {
15170
15170
  resolve(
15171
- util$8.db.get(
15171
+ util$2.db.get(
15172
15172
  pathInit({
15173
15173
  dbName: "database",
15174
15174
  path: `$page.${router$1.app.$route[basis]}`,
@@ -15183,7 +15183,7 @@ var db = {
15183
15183
  pageSet(context, { instance, basis = "fullPath", user: user2 = false }) {
15184
15184
  return new Promise((resolve) => {
15185
15185
  resolve(
15186
- util$8.db.get(
15186
+ util$2.db.get(
15187
15187
  pathInit({
15188
15188
  dbName: "database",
15189
15189
  path: `$page.${router$1.app.$route[basis]}.$data`,
@@ -15199,7 +15199,7 @@ var db = {
15199
15199
  return new Promise((resolve) => {
15200
15200
  resolve(
15201
15201
  lodash$1.exports.cloneDeep(
15202
- util$8.db.get(
15202
+ util$2.db.get(
15203
15203
  pathInit({
15204
15204
  dbName: "database",
15205
15205
  path: `$page.${router$1.app.$route[basis]}.$data`,
@@ -15214,7 +15214,7 @@ var db = {
15214
15214
  pageClear(context, { basis = "fullPath", user: user2 = false }) {
15215
15215
  return new Promise((resolve) => {
15216
15216
  resolve(
15217
- util$8.db.get(
15217
+ util$2.db.get(
15218
15218
  pathInit({
15219
15219
  dbName: "database",
15220
15220
  path: `$page.${router$1.app.$route[basis]}.$data`,
@@ -15249,23 +15249,19 @@ var __glob_5_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
15249
15249
  __proto__: null,
15250
15250
  "default": t
15251
15251
  }, Symbol.toStringTag, { value: "Module" }));
15252
- var vueI18n_cjs = {};
15253
- var shared$3 = { exports: {} };
15254
- var shared_cjs = {};
15255
15252
  /*!
15256
15253
  * shared v9.2.2
15257
15254
  * (c) 2022 kazuya kawaguchi
15258
15255
  * Released under the MIT License.
15259
15256
  */
15260
- Object.defineProperty(shared_cjs, "__esModule", { value: true });
15261
15257
  const inBrowser = typeof window !== "undefined";
15262
- shared_cjs.mark = void 0;
15263
- shared_cjs.measure = void 0;
15258
+ let mark;
15259
+ let measure;
15264
15260
  {
15265
15261
  const perf2 = inBrowser && window.performance;
15266
15262
  if (perf2 && perf2.mark && perf2.measure && perf2.clearMarks && perf2.clearMeasures) {
15267
- shared_cjs.mark = (tag) => perf2.mark(tag);
15268
- shared_cjs.measure = (name, startTag, endTag) => {
15263
+ mark = (tag) => perf2.mark(tag);
15264
+ measure = (name, startTag, endTag) => {
15269
15265
  perf2.measure(name, startTag, endTag);
15270
15266
  perf2.clearMarks(startTag);
15271
15267
  perf2.clearMarks(endTag);
@@ -15303,7 +15299,7 @@ function warn$1(msg, err) {
15303
15299
  const assign = Object.assign;
15304
15300
  let _globalThis;
15305
15301
  const getGlobalThis = () => {
15306
- return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof commonjsGlobal !== "undefined" ? commonjsGlobal : {});
15302
+ return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
15307
15303
  };
15308
15304
  function escapeHtml(rawText) {
15309
15305
  return rawText.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
@@ -15316,11 +15312,7 @@ const isArray$2 = Array.isArray;
15316
15312
  const isFunction$1 = (val) => typeof val === "function";
15317
15313
  const isString$1 = (val) => typeof val === "string";
15318
15314
  const isBoolean = (val) => typeof val === "boolean";
15319
- const isSymbol = (val) => typeof val === "symbol";
15320
15315
  const isObject$4 = (val) => val !== null && typeof val === "object";
15321
- const isPromise = (val) => {
15322
- return isObject$4(val) && isFunction$1(val.then) && isFunction$1(val.catch);
15323
- };
15324
15316
  const objectToString = Object.prototype.toString;
15325
15317
  const toTypeString = (value) => objectToString.call(value);
15326
15318
  const isPlainObject = (val) => toTypeString(val) === "[object Object]";
@@ -15382,1743 +15374,11 @@ function createEmitter() {
15382
15374
  };
15383
15375
  return emitter;
15384
15376
  }
15385
- shared_cjs.assign = assign;
15386
- shared_cjs.createEmitter = createEmitter;
15387
- shared_cjs.escapeHtml = escapeHtml;
15388
- shared_cjs.format = format$2;
15389
- shared_cjs.friendlyJSONstringify = friendlyJSONstringify;
15390
- shared_cjs.generateCodeFrame = generateCodeFrame;
15391
- shared_cjs.generateFormatCacheKey = generateFormatCacheKey;
15392
- shared_cjs.getGlobalThis = getGlobalThis;
15393
- shared_cjs.hasOwn = hasOwn$1;
15394
- shared_cjs.inBrowser = inBrowser;
15395
- shared_cjs.isArray = isArray$2;
15396
- shared_cjs.isBoolean = isBoolean;
15397
- shared_cjs.isDate = isDate;
15398
- shared_cjs.isEmptyObject = isEmptyObject;
15399
- shared_cjs.isFunction = isFunction$1;
15400
- shared_cjs.isNumber = isNumber$1;
15401
- shared_cjs.isObject = isObject$4;
15402
- shared_cjs.isPlainObject = isPlainObject;
15403
- shared_cjs.isPromise = isPromise;
15404
- shared_cjs.isRegExp = isRegExp$1;
15405
- shared_cjs.isString = isString$1;
15406
- shared_cjs.isSymbol = isSymbol;
15407
- shared_cjs.makeSymbol = makeSymbol;
15408
- shared_cjs.objectToString = objectToString;
15409
- shared_cjs.toDisplayString = toDisplayString;
15410
- shared_cjs.toTypeString = toTypeString;
15411
- shared_cjs.warn = warn$1;
15412
- {
15413
- shared$3.exports = shared_cjs;
15414
- }
15415
- var coreBase$1 = { exports: {} };
15416
- var coreBase_cjs = {};
15417
- var messageCompiler$1 = { exports: {} };
15418
- var messageCompiler_cjs = {};
15419
- var sourceMap$1 = {};
15420
- var sourceMapGenerator = {};
15421
- var base64Vlq = {};
15422
- var base64$1 = {};
15423
- var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
15424
- base64$1.encode = function(number2) {
15425
- if (0 <= number2 && number2 < intToCharMap.length) {
15426
- return intToCharMap[number2];
15427
- }
15428
- throw new TypeError("Must be between 0 and 63: " + number2);
15429
- };
15430
- base64$1.decode = function(charCode) {
15431
- var bigA = 65;
15432
- var bigZ = 90;
15433
- var littleA = 97;
15434
- var littleZ = 122;
15435
- var zero = 48;
15436
- var nine = 57;
15437
- var plus = 43;
15438
- var slash = 47;
15439
- var littleOffset = 26;
15440
- var numberOffset = 52;
15441
- if (bigA <= charCode && charCode <= bigZ) {
15442
- return charCode - bigA;
15443
- }
15444
- if (littleA <= charCode && charCode <= littleZ) {
15445
- return charCode - littleA + littleOffset;
15446
- }
15447
- if (zero <= charCode && charCode <= nine) {
15448
- return charCode - zero + numberOffset;
15449
- }
15450
- if (charCode == plus) {
15451
- return 62;
15452
- }
15453
- if (charCode == slash) {
15454
- return 63;
15455
- }
15456
- return -1;
15457
- };
15458
- var base64 = base64$1;
15459
- var VLQ_BASE_SHIFT = 5;
15460
- var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
15461
- var VLQ_BASE_MASK = VLQ_BASE - 1;
15462
- var VLQ_CONTINUATION_BIT = VLQ_BASE;
15463
- function toVLQSigned(aValue) {
15464
- return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
15465
- }
15466
- function fromVLQSigned(aValue) {
15467
- var isNegative = (aValue & 1) === 1;
15468
- var shifted = aValue >> 1;
15469
- return isNegative ? -shifted : shifted;
15470
- }
15471
- base64Vlq.encode = function base64VLQ_encode(aValue) {
15472
- var encoded = "";
15473
- var digit;
15474
- var vlq = toVLQSigned(aValue);
15475
- do {
15476
- digit = vlq & VLQ_BASE_MASK;
15477
- vlq >>>= VLQ_BASE_SHIFT;
15478
- if (vlq > 0) {
15479
- digit |= VLQ_CONTINUATION_BIT;
15480
- }
15481
- encoded += base64.encode(digit);
15482
- } while (vlq > 0);
15483
- return encoded;
15484
- };
15485
- base64Vlq.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
15486
- var strLen = aStr.length;
15487
- var result2 = 0;
15488
- var shift = 0;
15489
- var continuation, digit;
15490
- do {
15491
- if (aIndex >= strLen) {
15492
- throw new Error("Expected more digits in base 64 VLQ value.");
15493
- }
15494
- digit = base64.decode(aStr.charCodeAt(aIndex++));
15495
- if (digit === -1) {
15496
- throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
15497
- }
15498
- continuation = !!(digit & VLQ_CONTINUATION_BIT);
15499
- digit &= VLQ_BASE_MASK;
15500
- result2 = result2 + (digit << shift);
15501
- shift += VLQ_BASE_SHIFT;
15502
- } while (continuation);
15503
- aOutParam.value = fromVLQSigned(result2);
15504
- aOutParam.rest = aIndex;
15505
- };
15506
- var util$7 = {};
15507
- (function(exports) {
15508
- function getArg(aArgs, aName, aDefaultValue) {
15509
- if (aName in aArgs) {
15510
- return aArgs[aName];
15511
- } else if (arguments.length === 3) {
15512
- return aDefaultValue;
15513
- } else {
15514
- throw new Error('"' + aName + '" is a required argument.');
15515
- }
15516
- }
15517
- exports.getArg = getArg;
15518
- var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
15519
- var dataUrlRegexp = /^data:.+\,.+$/;
15520
- function urlParse(aUrl) {
15521
- var match2 = aUrl.match(urlRegexp);
15522
- if (!match2) {
15523
- return null;
15524
- }
15525
- return {
15526
- scheme: match2[1],
15527
- auth: match2[2],
15528
- host: match2[3],
15529
- port: match2[4],
15530
- path: match2[5]
15531
- };
15532
- }
15533
- exports.urlParse = urlParse;
15534
- function urlGenerate(aParsedUrl) {
15535
- var url = "";
15536
- if (aParsedUrl.scheme) {
15537
- url += aParsedUrl.scheme + ":";
15538
- }
15539
- url += "//";
15540
- if (aParsedUrl.auth) {
15541
- url += aParsedUrl.auth + "@";
15542
- }
15543
- if (aParsedUrl.host) {
15544
- url += aParsedUrl.host;
15545
- }
15546
- if (aParsedUrl.port) {
15547
- url += ":" + aParsedUrl.port;
15548
- }
15549
- if (aParsedUrl.path) {
15550
- url += aParsedUrl.path;
15551
- }
15552
- return url;
15553
- }
15554
- exports.urlGenerate = urlGenerate;
15555
- function normalize2(aPath) {
15556
- var path = aPath;
15557
- var url = urlParse(aPath);
15558
- if (url) {
15559
- if (!url.path) {
15560
- return aPath;
15561
- }
15562
- path = url.path;
15563
- }
15564
- var isAbsolute = exports.isAbsolute(path);
15565
- var parts = path.split(/\/+/);
15566
- for (var part, up = 0, i3 = parts.length - 1; i3 >= 0; i3--) {
15567
- part = parts[i3];
15568
- if (part === ".") {
15569
- parts.splice(i3, 1);
15570
- } else if (part === "..") {
15571
- up++;
15572
- } else if (up > 0) {
15573
- if (part === "") {
15574
- parts.splice(i3 + 1, up);
15575
- up = 0;
15576
- } else {
15577
- parts.splice(i3, 2);
15578
- up--;
15579
- }
15580
- }
15581
- }
15582
- path = parts.join("/");
15583
- if (path === "") {
15584
- path = isAbsolute ? "/" : ".";
15585
- }
15586
- if (url) {
15587
- url.path = path;
15588
- return urlGenerate(url);
15589
- }
15590
- return path;
15591
- }
15592
- exports.normalize = normalize2;
15593
- function join(aRoot, aPath) {
15594
- if (aRoot === "") {
15595
- aRoot = ".";
15596
- }
15597
- if (aPath === "") {
15598
- aPath = ".";
15599
- }
15600
- var aPathUrl = urlParse(aPath);
15601
- var aRootUrl = urlParse(aRoot);
15602
- if (aRootUrl) {
15603
- aRoot = aRootUrl.path || "/";
15604
- }
15605
- if (aPathUrl && !aPathUrl.scheme) {
15606
- if (aRootUrl) {
15607
- aPathUrl.scheme = aRootUrl.scheme;
15608
- }
15609
- return urlGenerate(aPathUrl);
15610
- }
15611
- if (aPathUrl || aPath.match(dataUrlRegexp)) {
15612
- return aPath;
15613
- }
15614
- if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
15615
- aRootUrl.host = aPath;
15616
- return urlGenerate(aRootUrl);
15617
- }
15618
- var joined = aPath.charAt(0) === "/" ? aPath : normalize2(aRoot.replace(/\/+$/, "") + "/" + aPath);
15619
- if (aRootUrl) {
15620
- aRootUrl.path = joined;
15621
- return urlGenerate(aRootUrl);
15622
- }
15623
- return joined;
15624
- }
15625
- exports.join = join;
15626
- exports.isAbsolute = function(aPath) {
15627
- return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
15628
- };
15629
- function relative(aRoot, aPath) {
15630
- if (aRoot === "") {
15631
- aRoot = ".";
15632
- }
15633
- aRoot = aRoot.replace(/\/$/, "");
15634
- var level = 0;
15635
- while (aPath.indexOf(aRoot + "/") !== 0) {
15636
- var index2 = aRoot.lastIndexOf("/");
15637
- if (index2 < 0) {
15638
- return aPath;
15639
- }
15640
- aRoot = aRoot.slice(0, index2);
15641
- if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
15642
- return aPath;
15643
- }
15644
- ++level;
15645
- }
15646
- return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
15647
- }
15648
- exports.relative = relative;
15649
- var supportsNullProto = function() {
15650
- var obj = /* @__PURE__ */ Object.create(null);
15651
- return !("__proto__" in obj);
15652
- }();
15653
- function identity2(s3) {
15654
- return s3;
15655
- }
15656
- function toSetString(aStr) {
15657
- if (isProtoString(aStr)) {
15658
- return "$" + aStr;
15659
- }
15660
- return aStr;
15661
- }
15662
- exports.toSetString = supportsNullProto ? identity2 : toSetString;
15663
- function fromSetString(aStr) {
15664
- if (isProtoString(aStr)) {
15665
- return aStr.slice(1);
15666
- }
15667
- return aStr;
15668
- }
15669
- exports.fromSetString = supportsNullProto ? identity2 : fromSetString;
15670
- function isProtoString(s3) {
15671
- if (!s3) {
15672
- return false;
15673
- }
15674
- var length2 = s3.length;
15675
- if (length2 < 9) {
15676
- return false;
15677
- }
15678
- if (s3.charCodeAt(length2 - 1) !== 95 || s3.charCodeAt(length2 - 2) !== 95 || s3.charCodeAt(length2 - 3) !== 111 || s3.charCodeAt(length2 - 4) !== 116 || s3.charCodeAt(length2 - 5) !== 111 || s3.charCodeAt(length2 - 6) !== 114 || s3.charCodeAt(length2 - 7) !== 112 || s3.charCodeAt(length2 - 8) !== 95 || s3.charCodeAt(length2 - 9) !== 95) {
15679
- return false;
15680
- }
15681
- for (var i3 = length2 - 10; i3 >= 0; i3--) {
15682
- if (s3.charCodeAt(i3) !== 36) {
15683
- return false;
15684
- }
15685
- }
15686
- return true;
15687
- }
15688
- function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
15689
- var cmp = strcmp(mappingA.source, mappingB.source);
15690
- if (cmp !== 0) {
15691
- return cmp;
15692
- }
15693
- cmp = mappingA.originalLine - mappingB.originalLine;
15694
- if (cmp !== 0) {
15695
- return cmp;
15696
- }
15697
- cmp = mappingA.originalColumn - mappingB.originalColumn;
15698
- if (cmp !== 0 || onlyCompareOriginal) {
15699
- return cmp;
15700
- }
15701
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
15702
- if (cmp !== 0) {
15703
- return cmp;
15704
- }
15705
- cmp = mappingA.generatedLine - mappingB.generatedLine;
15706
- if (cmp !== 0) {
15707
- return cmp;
15708
- }
15709
- return strcmp(mappingA.name, mappingB.name);
15710
- }
15711
- exports.compareByOriginalPositions = compareByOriginalPositions;
15712
- function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
15713
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
15714
- if (cmp !== 0) {
15715
- return cmp;
15716
- }
15717
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
15718
- if (cmp !== 0 || onlyCompareGenerated) {
15719
- return cmp;
15720
- }
15721
- cmp = strcmp(mappingA.source, mappingB.source);
15722
- if (cmp !== 0) {
15723
- return cmp;
15724
- }
15725
- cmp = mappingA.originalLine - mappingB.originalLine;
15726
- if (cmp !== 0) {
15727
- return cmp;
15728
- }
15729
- cmp = mappingA.originalColumn - mappingB.originalColumn;
15730
- if (cmp !== 0) {
15731
- return cmp;
15732
- }
15733
- return strcmp(mappingA.name, mappingB.name);
15734
- }
15735
- exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
15736
- function strcmp(aStr1, aStr2) {
15737
- if (aStr1 === aStr2) {
15738
- return 0;
15739
- }
15740
- if (aStr1 === null) {
15741
- return 1;
15742
- }
15743
- if (aStr2 === null) {
15744
- return -1;
15745
- }
15746
- if (aStr1 > aStr2) {
15747
- return 1;
15748
- }
15749
- return -1;
15750
- }
15751
- function compareByGeneratedPositionsInflated(mappingA, mappingB) {
15752
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
15753
- if (cmp !== 0) {
15754
- return cmp;
15755
- }
15756
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
15757
- if (cmp !== 0) {
15758
- return cmp;
15759
- }
15760
- cmp = strcmp(mappingA.source, mappingB.source);
15761
- if (cmp !== 0) {
15762
- return cmp;
15763
- }
15764
- cmp = mappingA.originalLine - mappingB.originalLine;
15765
- if (cmp !== 0) {
15766
- return cmp;
15767
- }
15768
- cmp = mappingA.originalColumn - mappingB.originalColumn;
15769
- if (cmp !== 0) {
15770
- return cmp;
15771
- }
15772
- return strcmp(mappingA.name, mappingB.name);
15773
- }
15774
- exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
15775
- function parseSourceMapInput(str) {
15776
- return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
15777
- }
15778
- exports.parseSourceMapInput = parseSourceMapInput;
15779
- function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
15780
- sourceURL = sourceURL || "";
15781
- if (sourceRoot) {
15782
- if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") {
15783
- sourceRoot += "/";
15784
- }
15785
- sourceURL = sourceRoot + sourceURL;
15786
- }
15787
- if (sourceMapURL) {
15788
- var parsed = urlParse(sourceMapURL);
15789
- if (!parsed) {
15790
- throw new Error("sourceMapURL could not be parsed");
15791
- }
15792
- if (parsed.path) {
15793
- var index2 = parsed.path.lastIndexOf("/");
15794
- if (index2 >= 0) {
15795
- parsed.path = parsed.path.substring(0, index2 + 1);
15796
- }
15797
- }
15798
- sourceURL = join(urlGenerate(parsed), sourceURL);
15799
- }
15800
- return normalize2(sourceURL);
15801
- }
15802
- exports.computeSourceURL = computeSourceURL;
15803
- })(util$7);
15804
- var arraySet = {};
15805
- var util$6 = util$7;
15806
- var has$2 = Object.prototype.hasOwnProperty;
15807
- var hasNativeMap = typeof Map !== "undefined";
15808
- function ArraySet$2() {
15809
- this._array = [];
15810
- this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
15811
- }
15812
- ArraySet$2.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
15813
- var set2 = new ArraySet$2();
15814
- for (var i3 = 0, len2 = aArray.length; i3 < len2; i3++) {
15815
- set2.add(aArray[i3], aAllowDuplicates);
15816
- }
15817
- return set2;
15818
- };
15819
- ArraySet$2.prototype.size = function ArraySet_size() {
15820
- return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
15821
- };
15822
- ArraySet$2.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
15823
- var sStr = hasNativeMap ? aStr : util$6.toSetString(aStr);
15824
- var isDuplicate = hasNativeMap ? this.has(aStr) : has$2.call(this._set, sStr);
15825
- var idx = this._array.length;
15826
- if (!isDuplicate || aAllowDuplicates) {
15827
- this._array.push(aStr);
15828
- }
15829
- if (!isDuplicate) {
15830
- if (hasNativeMap) {
15831
- this._set.set(aStr, idx);
15832
- } else {
15833
- this._set[sStr] = idx;
15834
- }
15835
- }
15836
- };
15837
- ArraySet$2.prototype.has = function ArraySet_has(aStr) {
15838
- if (hasNativeMap) {
15839
- return this._set.has(aStr);
15840
- } else {
15841
- var sStr = util$6.toSetString(aStr);
15842
- return has$2.call(this._set, sStr);
15843
- }
15844
- };
15845
- ArraySet$2.prototype.indexOf = function ArraySet_indexOf(aStr) {
15846
- if (hasNativeMap) {
15847
- var idx = this._set.get(aStr);
15848
- if (idx >= 0) {
15849
- return idx;
15850
- }
15851
- } else {
15852
- var sStr = util$6.toSetString(aStr);
15853
- if (has$2.call(this._set, sStr)) {
15854
- return this._set[sStr];
15855
- }
15856
- }
15857
- throw new Error('"' + aStr + '" is not in the set.');
15858
- };
15859
- ArraySet$2.prototype.at = function ArraySet_at(aIdx) {
15860
- if (aIdx >= 0 && aIdx < this._array.length) {
15861
- return this._array[aIdx];
15862
- }
15863
- throw new Error("No element indexed by " + aIdx);
15864
- };
15865
- ArraySet$2.prototype.toArray = function ArraySet_toArray() {
15866
- return this._array.slice();
15867
- };
15868
- arraySet.ArraySet = ArraySet$2;
15869
- var mappingList = {};
15870
- var util$5 = util$7;
15871
- function generatedPositionAfter(mappingA, mappingB) {
15872
- var lineA = mappingA.generatedLine;
15873
- var lineB = mappingB.generatedLine;
15874
- var columnA = mappingA.generatedColumn;
15875
- var columnB = mappingB.generatedColumn;
15876
- return lineB > lineA || lineB == lineA && columnB >= columnA || util$5.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
15877
- }
15878
- function MappingList$1() {
15879
- this._array = [];
15880
- this._sorted = true;
15881
- this._last = { generatedLine: -1, generatedColumn: 0 };
15882
- }
15883
- MappingList$1.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
15884
- this._array.forEach(aCallback, aThisArg);
15885
- };
15886
- MappingList$1.prototype.add = function MappingList_add(aMapping) {
15887
- if (generatedPositionAfter(this._last, aMapping)) {
15888
- this._last = aMapping;
15889
- this._array.push(aMapping);
15890
- } else {
15891
- this._sorted = false;
15892
- this._array.push(aMapping);
15893
- }
15894
- };
15895
- MappingList$1.prototype.toArray = function MappingList_toArray() {
15896
- if (!this._sorted) {
15897
- this._array.sort(util$5.compareByGeneratedPositionsInflated);
15898
- this._sorted = true;
15899
- }
15900
- return this._array;
15901
- };
15902
- mappingList.MappingList = MappingList$1;
15903
- var base64VLQ$1 = base64Vlq;
15904
- var util$4 = util$7;
15905
- var ArraySet$1 = arraySet.ArraySet;
15906
- var MappingList = mappingList.MappingList;
15907
- function SourceMapGenerator$1(aArgs) {
15908
- if (!aArgs) {
15909
- aArgs = {};
15910
- }
15911
- this._file = util$4.getArg(aArgs, "file", null);
15912
- this._sourceRoot = util$4.getArg(aArgs, "sourceRoot", null);
15913
- this._skipValidation = util$4.getArg(aArgs, "skipValidation", false);
15914
- this._sources = new ArraySet$1();
15915
- this._names = new ArraySet$1();
15916
- this._mappings = new MappingList();
15917
- this._sourcesContents = null;
15918
- }
15919
- SourceMapGenerator$1.prototype._version = 3;
15920
- SourceMapGenerator$1.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
15921
- var sourceRoot = aSourceMapConsumer.sourceRoot;
15922
- var generator = new SourceMapGenerator$1({
15923
- file: aSourceMapConsumer.file,
15924
- sourceRoot
15925
- });
15926
- aSourceMapConsumer.eachMapping(function(mapping) {
15927
- var newMapping = {
15928
- generated: {
15929
- line: mapping.generatedLine,
15930
- column: mapping.generatedColumn
15931
- }
15932
- };
15933
- if (mapping.source != null) {
15934
- newMapping.source = mapping.source;
15935
- if (sourceRoot != null) {
15936
- newMapping.source = util$4.relative(sourceRoot, newMapping.source);
15937
- }
15938
- newMapping.original = {
15939
- line: mapping.originalLine,
15940
- column: mapping.originalColumn
15941
- };
15942
- if (mapping.name != null) {
15943
- newMapping.name = mapping.name;
15944
- }
15945
- }
15946
- generator.addMapping(newMapping);
15947
- });
15948
- aSourceMapConsumer.sources.forEach(function(sourceFile) {
15949
- var sourceRelative = sourceFile;
15950
- if (sourceRoot !== null) {
15951
- sourceRelative = util$4.relative(sourceRoot, sourceFile);
15952
- }
15953
- if (!generator._sources.has(sourceRelative)) {
15954
- generator._sources.add(sourceRelative);
15955
- }
15956
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
15957
- if (content != null) {
15958
- generator.setSourceContent(sourceFile, content);
15959
- }
15960
- });
15961
- return generator;
15962
- };
15963
- SourceMapGenerator$1.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
15964
- var generated = util$4.getArg(aArgs, "generated");
15965
- var original = util$4.getArg(aArgs, "original", null);
15966
- var source2 = util$4.getArg(aArgs, "source", null);
15967
- var name = util$4.getArg(aArgs, "name", null);
15968
- if (!this._skipValidation) {
15969
- this._validateMapping(generated, original, source2, name);
15970
- }
15971
- if (source2 != null) {
15972
- source2 = String(source2);
15973
- if (!this._sources.has(source2)) {
15974
- this._sources.add(source2);
15975
- }
15976
- }
15977
- if (name != null) {
15978
- name = String(name);
15979
- if (!this._names.has(name)) {
15980
- this._names.add(name);
15981
- }
15982
- }
15983
- this._mappings.add({
15984
- generatedLine: generated.line,
15985
- generatedColumn: generated.column,
15986
- originalLine: original != null && original.line,
15987
- originalColumn: original != null && original.column,
15988
- source: source2,
15989
- name
15990
- });
15991
- };
15992
- SourceMapGenerator$1.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
15993
- var source2 = aSourceFile;
15994
- if (this._sourceRoot != null) {
15995
- source2 = util$4.relative(this._sourceRoot, source2);
15996
- }
15997
- if (aSourceContent != null) {
15998
- if (!this._sourcesContents) {
15999
- this._sourcesContents = /* @__PURE__ */ Object.create(null);
16000
- }
16001
- this._sourcesContents[util$4.toSetString(source2)] = aSourceContent;
16002
- } else if (this._sourcesContents) {
16003
- delete this._sourcesContents[util$4.toSetString(source2)];
16004
- if (Object.keys(this._sourcesContents).length === 0) {
16005
- this._sourcesContents = null;
16006
- }
16007
- }
16008
- };
16009
- SourceMapGenerator$1.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
16010
- var sourceFile = aSourceFile;
16011
- if (aSourceFile == null) {
16012
- if (aSourceMapConsumer.file == null) {
16013
- throw new Error(
16014
- `SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`
16015
- );
16016
- }
16017
- sourceFile = aSourceMapConsumer.file;
16018
- }
16019
- var sourceRoot = this._sourceRoot;
16020
- if (sourceRoot != null) {
16021
- sourceFile = util$4.relative(sourceRoot, sourceFile);
16022
- }
16023
- var newSources = new ArraySet$1();
16024
- var newNames = new ArraySet$1();
16025
- this._mappings.unsortedForEach(function(mapping) {
16026
- if (mapping.source === sourceFile && mapping.originalLine != null) {
16027
- var original = aSourceMapConsumer.originalPositionFor({
16028
- line: mapping.originalLine,
16029
- column: mapping.originalColumn
16030
- });
16031
- if (original.source != null) {
16032
- mapping.source = original.source;
16033
- if (aSourceMapPath != null) {
16034
- mapping.source = util$4.join(aSourceMapPath, mapping.source);
16035
- }
16036
- if (sourceRoot != null) {
16037
- mapping.source = util$4.relative(sourceRoot, mapping.source);
16038
- }
16039
- mapping.originalLine = original.line;
16040
- mapping.originalColumn = original.column;
16041
- if (original.name != null) {
16042
- mapping.name = original.name;
16043
- }
16044
- }
16045
- }
16046
- var source2 = mapping.source;
16047
- if (source2 != null && !newSources.has(source2)) {
16048
- newSources.add(source2);
16049
- }
16050
- var name = mapping.name;
16051
- if (name != null && !newNames.has(name)) {
16052
- newNames.add(name);
16053
- }
16054
- }, this);
16055
- this._sources = newSources;
16056
- this._names = newNames;
16057
- aSourceMapConsumer.sources.forEach(function(sourceFile2) {
16058
- var content = aSourceMapConsumer.sourceContentFor(sourceFile2);
16059
- if (content != null) {
16060
- if (aSourceMapPath != null) {
16061
- sourceFile2 = util$4.join(aSourceMapPath, sourceFile2);
16062
- }
16063
- if (sourceRoot != null) {
16064
- sourceFile2 = util$4.relative(sourceRoot, sourceFile2);
16065
- }
16066
- this.setSourceContent(sourceFile2, content);
16067
- }
16068
- }, this);
16069
- };
16070
- SourceMapGenerator$1.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
16071
- if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
16072
- throw new Error(
16073
- "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."
16074
- );
16075
- }
16076
- if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
16077
- return;
16078
- } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
16079
- return;
16080
- } else {
16081
- throw new Error("Invalid mapping: " + JSON.stringify({
16082
- generated: aGenerated,
16083
- source: aSource,
16084
- original: aOriginal,
16085
- name: aName
16086
- }));
16087
- }
16088
- };
16089
- SourceMapGenerator$1.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
16090
- var previousGeneratedColumn = 0;
16091
- var previousGeneratedLine = 1;
16092
- var previousOriginalColumn = 0;
16093
- var previousOriginalLine = 0;
16094
- var previousName = 0;
16095
- var previousSource = 0;
16096
- var result2 = "";
16097
- var next;
16098
- var mapping;
16099
- var nameIdx;
16100
- var sourceIdx;
16101
- var mappings = this._mappings.toArray();
16102
- for (var i3 = 0, len2 = mappings.length; i3 < len2; i3++) {
16103
- mapping = mappings[i3];
16104
- next = "";
16105
- if (mapping.generatedLine !== previousGeneratedLine) {
16106
- previousGeneratedColumn = 0;
16107
- while (mapping.generatedLine !== previousGeneratedLine) {
16108
- next += ";";
16109
- previousGeneratedLine++;
16110
- }
16111
- } else {
16112
- if (i3 > 0) {
16113
- if (!util$4.compareByGeneratedPositionsInflated(mapping, mappings[i3 - 1])) {
16114
- continue;
16115
- }
16116
- next += ",";
16117
- }
16118
- }
16119
- next += base64VLQ$1.encode(mapping.generatedColumn - previousGeneratedColumn);
16120
- previousGeneratedColumn = mapping.generatedColumn;
16121
- if (mapping.source != null) {
16122
- sourceIdx = this._sources.indexOf(mapping.source);
16123
- next += base64VLQ$1.encode(sourceIdx - previousSource);
16124
- previousSource = sourceIdx;
16125
- next += base64VLQ$1.encode(mapping.originalLine - 1 - previousOriginalLine);
16126
- previousOriginalLine = mapping.originalLine - 1;
16127
- next += base64VLQ$1.encode(mapping.originalColumn - previousOriginalColumn);
16128
- previousOriginalColumn = mapping.originalColumn;
16129
- if (mapping.name != null) {
16130
- nameIdx = this._names.indexOf(mapping.name);
16131
- next += base64VLQ$1.encode(nameIdx - previousName);
16132
- previousName = nameIdx;
16133
- }
16134
- }
16135
- result2 += next;
16136
- }
16137
- return result2;
16138
- };
16139
- SourceMapGenerator$1.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
16140
- return aSources.map(function(source2) {
16141
- if (!this._sourcesContents) {
16142
- return null;
16143
- }
16144
- if (aSourceRoot != null) {
16145
- source2 = util$4.relative(aSourceRoot, source2);
16146
- }
16147
- var key = util$4.toSetString(source2);
16148
- return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
16149
- }, this);
16150
- };
16151
- SourceMapGenerator$1.prototype.toJSON = function SourceMapGenerator_toJSON() {
16152
- var map2 = {
16153
- version: this._version,
16154
- sources: this._sources.toArray(),
16155
- names: this._names.toArray(),
16156
- mappings: this._serializeMappings()
16157
- };
16158
- if (this._file != null) {
16159
- map2.file = this._file;
16160
- }
16161
- if (this._sourceRoot != null) {
16162
- map2.sourceRoot = this._sourceRoot;
16163
- }
16164
- if (this._sourcesContents) {
16165
- map2.sourcesContent = this._generateSourcesContent(map2.sources, map2.sourceRoot);
16166
- }
16167
- return map2;
16168
- };
16169
- SourceMapGenerator$1.prototype.toString = function SourceMapGenerator_toString() {
16170
- return JSON.stringify(this.toJSON());
16171
- };
16172
- sourceMapGenerator.SourceMapGenerator = SourceMapGenerator$1;
16173
- var sourceMapConsumer = {};
16174
- var binarySearch$1 = {};
16175
- (function(exports) {
16176
- exports.GREATEST_LOWER_BOUND = 1;
16177
- exports.LEAST_UPPER_BOUND = 2;
16178
- function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
16179
- var mid = Math.floor((aHigh - aLow) / 2) + aLow;
16180
- var cmp = aCompare(aNeedle, aHaystack[mid], true);
16181
- if (cmp === 0) {
16182
- return mid;
16183
- } else if (cmp > 0) {
16184
- if (aHigh - mid > 1) {
16185
- return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
16186
- }
16187
- if (aBias == exports.LEAST_UPPER_BOUND) {
16188
- return aHigh < aHaystack.length ? aHigh : -1;
16189
- } else {
16190
- return mid;
16191
- }
16192
- } else {
16193
- if (mid - aLow > 1) {
16194
- return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
16195
- }
16196
- if (aBias == exports.LEAST_UPPER_BOUND) {
16197
- return mid;
16198
- } else {
16199
- return aLow < 0 ? -1 : aLow;
16200
- }
16201
- }
16202
- }
16203
- exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
16204
- if (aHaystack.length === 0) {
16205
- return -1;
16206
- }
16207
- var index2 = recursiveSearch(
16208
- -1,
16209
- aHaystack.length,
16210
- aNeedle,
16211
- aHaystack,
16212
- aCompare,
16213
- aBias || exports.GREATEST_LOWER_BOUND
16214
- );
16215
- if (index2 < 0) {
16216
- return -1;
16217
- }
16218
- while (index2 - 1 >= 0) {
16219
- if (aCompare(aHaystack[index2], aHaystack[index2 - 1], true) !== 0) {
16220
- break;
16221
- }
16222
- --index2;
16223
- }
16224
- return index2;
16225
- };
16226
- })(binarySearch$1);
16227
- var quickSort$1 = {};
16228
- function swap(ary, x2, y3) {
16229
- var temp = ary[x2];
16230
- ary[x2] = ary[y3];
16231
- ary[y3] = temp;
16232
- }
16233
- function randomIntInRange(low, high) {
16234
- return Math.round(low + Math.random() * (high - low));
16235
- }
16236
- function doQuickSort(ary, comparator, p, r) {
16237
- if (p < r) {
16238
- var pivotIndex = randomIntInRange(p, r);
16239
- var i3 = p - 1;
16240
- swap(ary, pivotIndex, r);
16241
- var pivot = ary[r];
16242
- for (var j = p; j < r; j++) {
16243
- if (comparator(ary[j], pivot) <= 0) {
16244
- i3 += 1;
16245
- swap(ary, i3, j);
16246
- }
16247
- }
16248
- swap(ary, i3 + 1, j);
16249
- var q2 = i3 + 1;
16250
- doQuickSort(ary, comparator, p, q2 - 1);
16251
- doQuickSort(ary, comparator, q2 + 1, r);
16252
- }
16253
- }
16254
- quickSort$1.quickSort = function(ary, comparator) {
16255
- doQuickSort(ary, comparator, 0, ary.length - 1);
16256
- };
16257
- var util$3 = util$7;
16258
- var binarySearch = binarySearch$1;
16259
- var ArraySet = arraySet.ArraySet;
16260
- var base64VLQ = base64Vlq;
16261
- var quickSort = quickSort$1.quickSort;
16262
- function SourceMapConsumer(aSourceMap, aSourceMapURL) {
16263
- var sourceMap2 = aSourceMap;
16264
- if (typeof aSourceMap === "string") {
16265
- sourceMap2 = util$3.parseSourceMapInput(aSourceMap);
16266
- }
16267
- return sourceMap2.sections != null ? new IndexedSourceMapConsumer(sourceMap2, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap2, aSourceMapURL);
16268
- }
16269
- SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
16270
- return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
16271
- };
16272
- SourceMapConsumer.prototype._version = 3;
16273
- SourceMapConsumer.prototype.__generatedMappings = null;
16274
- Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
16275
- configurable: true,
16276
- enumerable: true,
16277
- get: function() {
16278
- if (!this.__generatedMappings) {
16279
- this._parseMappings(this._mappings, this.sourceRoot);
16280
- }
16281
- return this.__generatedMappings;
16282
- }
16283
- });
16284
- SourceMapConsumer.prototype.__originalMappings = null;
16285
- Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
16286
- configurable: true,
16287
- enumerable: true,
16288
- get: function() {
16289
- if (!this.__originalMappings) {
16290
- this._parseMappings(this._mappings, this.sourceRoot);
16291
- }
16292
- return this.__originalMappings;
16293
- }
16294
- });
16295
- SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index2) {
16296
- var c2 = aStr.charAt(index2);
16297
- return c2 === ";" || c2 === ",";
16298
- };
16299
- SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
16300
- throw new Error("Subclasses must implement _parseMappings");
16301
- };
16302
- SourceMapConsumer.GENERATED_ORDER = 1;
16303
- SourceMapConsumer.ORIGINAL_ORDER = 2;
16304
- SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
16305
- SourceMapConsumer.LEAST_UPPER_BOUND = 2;
16306
- SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
16307
- var context = aContext || null;
16308
- var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
16309
- var mappings;
16310
- switch (order) {
16311
- case SourceMapConsumer.GENERATED_ORDER:
16312
- mappings = this._generatedMappings;
16313
- break;
16314
- case SourceMapConsumer.ORIGINAL_ORDER:
16315
- mappings = this._originalMappings;
16316
- break;
16317
- default:
16318
- throw new Error("Unknown order of iteration.");
16319
- }
16320
- var sourceRoot = this.sourceRoot;
16321
- mappings.map(function(mapping) {
16322
- var source2 = mapping.source === null ? null : this._sources.at(mapping.source);
16323
- source2 = util$3.computeSourceURL(sourceRoot, source2, this._sourceMapURL);
16324
- return {
16325
- source: source2,
16326
- generatedLine: mapping.generatedLine,
16327
- generatedColumn: mapping.generatedColumn,
16328
- originalLine: mapping.originalLine,
16329
- originalColumn: mapping.originalColumn,
16330
- name: mapping.name === null ? null : this._names.at(mapping.name)
16331
- };
16332
- }, this).forEach(aCallback, context);
16333
- };
16334
- SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
16335
- var line = util$3.getArg(aArgs, "line");
16336
- var needle = {
16337
- source: util$3.getArg(aArgs, "source"),
16338
- originalLine: line,
16339
- originalColumn: util$3.getArg(aArgs, "column", 0)
16340
- };
16341
- needle.source = this._findSourceIndex(needle.source);
16342
- if (needle.source < 0) {
16343
- return [];
16344
- }
16345
- var mappings = [];
16346
- var index2 = this._findMapping(
16347
- needle,
16348
- this._originalMappings,
16349
- "originalLine",
16350
- "originalColumn",
16351
- util$3.compareByOriginalPositions,
16352
- binarySearch.LEAST_UPPER_BOUND
16353
- );
16354
- if (index2 >= 0) {
16355
- var mapping = this._originalMappings[index2];
16356
- if (aArgs.column === void 0) {
16357
- var originalLine = mapping.originalLine;
16358
- while (mapping && mapping.originalLine === originalLine) {
16359
- mappings.push({
16360
- line: util$3.getArg(mapping, "generatedLine", null),
16361
- column: util$3.getArg(mapping, "generatedColumn", null),
16362
- lastColumn: util$3.getArg(mapping, "lastGeneratedColumn", null)
16363
- });
16364
- mapping = this._originalMappings[++index2];
16365
- }
16366
- } else {
16367
- var originalColumn = mapping.originalColumn;
16368
- while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
16369
- mappings.push({
16370
- line: util$3.getArg(mapping, "generatedLine", null),
16371
- column: util$3.getArg(mapping, "generatedColumn", null),
16372
- lastColumn: util$3.getArg(mapping, "lastGeneratedColumn", null)
16373
- });
16374
- mapping = this._originalMappings[++index2];
16375
- }
16376
- }
16377
- }
16378
- return mappings;
16379
- };
16380
- sourceMapConsumer.SourceMapConsumer = SourceMapConsumer;
16381
- function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
16382
- var sourceMap2 = aSourceMap;
16383
- if (typeof aSourceMap === "string") {
16384
- sourceMap2 = util$3.parseSourceMapInput(aSourceMap);
16385
- }
16386
- var version2 = util$3.getArg(sourceMap2, "version");
16387
- var sources = util$3.getArg(sourceMap2, "sources");
16388
- var names = util$3.getArg(sourceMap2, "names", []);
16389
- var sourceRoot = util$3.getArg(sourceMap2, "sourceRoot", null);
16390
- var sourcesContent = util$3.getArg(sourceMap2, "sourcesContent", null);
16391
- var mappings = util$3.getArg(sourceMap2, "mappings");
16392
- var file = util$3.getArg(sourceMap2, "file", null);
16393
- if (version2 != this._version) {
16394
- throw new Error("Unsupported version: " + version2);
16395
- }
16396
- if (sourceRoot) {
16397
- sourceRoot = util$3.normalize(sourceRoot);
16398
- }
16399
- sources = sources.map(String).map(util$3.normalize).map(function(source2) {
16400
- return sourceRoot && util$3.isAbsolute(sourceRoot) && util$3.isAbsolute(source2) ? util$3.relative(sourceRoot, source2) : source2;
16401
- });
16402
- this._names = ArraySet.fromArray(names.map(String), true);
16403
- this._sources = ArraySet.fromArray(sources, true);
16404
- this._absoluteSources = this._sources.toArray().map(function(s3) {
16405
- return util$3.computeSourceURL(sourceRoot, s3, aSourceMapURL);
16406
- });
16407
- this.sourceRoot = sourceRoot;
16408
- this.sourcesContent = sourcesContent;
16409
- this._mappings = mappings;
16410
- this._sourceMapURL = aSourceMapURL;
16411
- this.file = file;
16412
- }
16413
- BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
16414
- BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
16415
- BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
16416
- var relativeSource = aSource;
16417
- if (this.sourceRoot != null) {
16418
- relativeSource = util$3.relative(this.sourceRoot, relativeSource);
16419
- }
16420
- if (this._sources.has(relativeSource)) {
16421
- return this._sources.indexOf(relativeSource);
16422
- }
16423
- var i3;
16424
- for (i3 = 0; i3 < this._absoluteSources.length; ++i3) {
16425
- if (this._absoluteSources[i3] == aSource) {
16426
- return i3;
16427
- }
16428
- }
16429
- return -1;
16430
- };
16431
- BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
16432
- var smc = Object.create(BasicSourceMapConsumer.prototype);
16433
- var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
16434
- var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
16435
- smc.sourceRoot = aSourceMap._sourceRoot;
16436
- smc.sourcesContent = aSourceMap._generateSourcesContent(
16437
- smc._sources.toArray(),
16438
- smc.sourceRoot
16439
- );
16440
- smc.file = aSourceMap._file;
16441
- smc._sourceMapURL = aSourceMapURL;
16442
- smc._absoluteSources = smc._sources.toArray().map(function(s3) {
16443
- return util$3.computeSourceURL(smc.sourceRoot, s3, aSourceMapURL);
16444
- });
16445
- var generatedMappings = aSourceMap._mappings.toArray().slice();
16446
- var destGeneratedMappings = smc.__generatedMappings = [];
16447
- var destOriginalMappings = smc.__originalMappings = [];
16448
- for (var i3 = 0, length2 = generatedMappings.length; i3 < length2; i3++) {
16449
- var srcMapping = generatedMappings[i3];
16450
- var destMapping = new Mapping();
16451
- destMapping.generatedLine = srcMapping.generatedLine;
16452
- destMapping.generatedColumn = srcMapping.generatedColumn;
16453
- if (srcMapping.source) {
16454
- destMapping.source = sources.indexOf(srcMapping.source);
16455
- destMapping.originalLine = srcMapping.originalLine;
16456
- destMapping.originalColumn = srcMapping.originalColumn;
16457
- if (srcMapping.name) {
16458
- destMapping.name = names.indexOf(srcMapping.name);
16459
- }
16460
- destOriginalMappings.push(destMapping);
16461
- }
16462
- destGeneratedMappings.push(destMapping);
16463
- }
16464
- quickSort(smc.__originalMappings, util$3.compareByOriginalPositions);
16465
- return smc;
16466
- };
16467
- BasicSourceMapConsumer.prototype._version = 3;
16468
- Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
16469
- get: function() {
16470
- return this._absoluteSources.slice();
16471
- }
16472
- });
16473
- function Mapping() {
16474
- this.generatedLine = 0;
16475
- this.generatedColumn = 0;
16476
- this.source = null;
16477
- this.originalLine = null;
16478
- this.originalColumn = null;
16479
- this.name = null;
16480
- }
16481
- BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings2(aStr, aSourceRoot) {
16482
- var generatedLine = 1;
16483
- var previousGeneratedColumn = 0;
16484
- var previousOriginalLine = 0;
16485
- var previousOriginalColumn = 0;
16486
- var previousSource = 0;
16487
- var previousName = 0;
16488
- var length2 = aStr.length;
16489
- var index2 = 0;
16490
- var cachedSegments = {};
16491
- var temp = {};
16492
- var originalMappings = [];
16493
- var generatedMappings = [];
16494
- var mapping, str, segment, end2, value;
16495
- while (index2 < length2) {
16496
- if (aStr.charAt(index2) === ";") {
16497
- generatedLine++;
16498
- index2++;
16499
- previousGeneratedColumn = 0;
16500
- } else if (aStr.charAt(index2) === ",") {
16501
- index2++;
16502
- } else {
16503
- mapping = new Mapping();
16504
- mapping.generatedLine = generatedLine;
16505
- for (end2 = index2; end2 < length2; end2++) {
16506
- if (this._charIsMappingSeparator(aStr, end2)) {
16507
- break;
16508
- }
16509
- }
16510
- str = aStr.slice(index2, end2);
16511
- segment = cachedSegments[str];
16512
- if (segment) {
16513
- index2 += str.length;
16514
- } else {
16515
- segment = [];
16516
- while (index2 < end2) {
16517
- base64VLQ.decode(aStr, index2, temp);
16518
- value = temp.value;
16519
- index2 = temp.rest;
16520
- segment.push(value);
16521
- }
16522
- if (segment.length === 2) {
16523
- throw new Error("Found a source, but no line and column");
16524
- }
16525
- if (segment.length === 3) {
16526
- throw new Error("Found a source and line, but no column");
16527
- }
16528
- cachedSegments[str] = segment;
16529
- }
16530
- mapping.generatedColumn = previousGeneratedColumn + segment[0];
16531
- previousGeneratedColumn = mapping.generatedColumn;
16532
- if (segment.length > 1) {
16533
- mapping.source = previousSource + segment[1];
16534
- previousSource += segment[1];
16535
- mapping.originalLine = previousOriginalLine + segment[2];
16536
- previousOriginalLine = mapping.originalLine;
16537
- mapping.originalLine += 1;
16538
- mapping.originalColumn = previousOriginalColumn + segment[3];
16539
- previousOriginalColumn = mapping.originalColumn;
16540
- if (segment.length > 4) {
16541
- mapping.name = previousName + segment[4];
16542
- previousName += segment[4];
16543
- }
16544
- }
16545
- generatedMappings.push(mapping);
16546
- if (typeof mapping.originalLine === "number") {
16547
- originalMappings.push(mapping);
16548
- }
16549
- }
16550
- }
16551
- quickSort(generatedMappings, util$3.compareByGeneratedPositionsDeflated);
16552
- this.__generatedMappings = generatedMappings;
16553
- quickSort(originalMappings, util$3.compareByOriginalPositions);
16554
- this.__originalMappings = originalMappings;
16555
- };
16556
- BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
16557
- if (aNeedle[aLineName] <= 0) {
16558
- throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
16559
- }
16560
- if (aNeedle[aColumnName] < 0) {
16561
- throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
16562
- }
16563
- return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
16564
- };
16565
- BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
16566
- for (var index2 = 0; index2 < this._generatedMappings.length; ++index2) {
16567
- var mapping = this._generatedMappings[index2];
16568
- if (index2 + 1 < this._generatedMappings.length) {
16569
- var nextMapping = this._generatedMappings[index2 + 1];
16570
- if (mapping.generatedLine === nextMapping.generatedLine) {
16571
- mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
16572
- continue;
16573
- }
16574
- }
16575
- mapping.lastGeneratedColumn = Infinity;
16576
- }
16577
- };
16578
- BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
16579
- var needle = {
16580
- generatedLine: util$3.getArg(aArgs, "line"),
16581
- generatedColumn: util$3.getArg(aArgs, "column")
16582
- };
16583
- var index2 = this._findMapping(
16584
- needle,
16585
- this._generatedMappings,
16586
- "generatedLine",
16587
- "generatedColumn",
16588
- util$3.compareByGeneratedPositionsDeflated,
16589
- util$3.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
16590
- );
16591
- if (index2 >= 0) {
16592
- var mapping = this._generatedMappings[index2];
16593
- if (mapping.generatedLine === needle.generatedLine) {
16594
- var source2 = util$3.getArg(mapping, "source", null);
16595
- if (source2 !== null) {
16596
- source2 = this._sources.at(source2);
16597
- source2 = util$3.computeSourceURL(this.sourceRoot, source2, this._sourceMapURL);
16598
- }
16599
- var name = util$3.getArg(mapping, "name", null);
16600
- if (name !== null) {
16601
- name = this._names.at(name);
16602
- }
16603
- return {
16604
- source: source2,
16605
- line: util$3.getArg(mapping, "originalLine", null),
16606
- column: util$3.getArg(mapping, "originalColumn", null),
16607
- name
16608
- };
16609
- }
16610
- }
16611
- return {
16612
- source: null,
16613
- line: null,
16614
- column: null,
16615
- name: null
16616
- };
16617
- };
16618
- BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
16619
- if (!this.sourcesContent) {
16620
- return false;
16621
- }
16622
- return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
16623
- return sc == null;
16624
- });
16625
- };
16626
- BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
16627
- if (!this.sourcesContent) {
16628
- return null;
16629
- }
16630
- var index2 = this._findSourceIndex(aSource);
16631
- if (index2 >= 0) {
16632
- return this.sourcesContent[index2];
16633
- }
16634
- var relativeSource = aSource;
16635
- if (this.sourceRoot != null) {
16636
- relativeSource = util$3.relative(this.sourceRoot, relativeSource);
16637
- }
16638
- var url;
16639
- if (this.sourceRoot != null && (url = util$3.urlParse(this.sourceRoot))) {
16640
- var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
16641
- if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
16642
- return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
16643
- }
16644
- if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) {
16645
- return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
16646
- }
16647
- }
16648
- if (nullOnMissing) {
16649
- return null;
16650
- } else {
16651
- throw new Error('"' + relativeSource + '" is not in the SourceMap.');
16652
- }
16653
- };
16654
- BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
16655
- var source2 = util$3.getArg(aArgs, "source");
16656
- source2 = this._findSourceIndex(source2);
16657
- if (source2 < 0) {
16658
- return {
16659
- line: null,
16660
- column: null,
16661
- lastColumn: null
16662
- };
16663
- }
16664
- var needle = {
16665
- source: source2,
16666
- originalLine: util$3.getArg(aArgs, "line"),
16667
- originalColumn: util$3.getArg(aArgs, "column")
16668
- };
16669
- var index2 = this._findMapping(
16670
- needle,
16671
- this._originalMappings,
16672
- "originalLine",
16673
- "originalColumn",
16674
- util$3.compareByOriginalPositions,
16675
- util$3.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
16676
- );
16677
- if (index2 >= 0) {
16678
- var mapping = this._originalMappings[index2];
16679
- if (mapping.source === needle.source) {
16680
- return {
16681
- line: util$3.getArg(mapping, "generatedLine", null),
16682
- column: util$3.getArg(mapping, "generatedColumn", null),
16683
- lastColumn: util$3.getArg(mapping, "lastGeneratedColumn", null)
16684
- };
16685
- }
16686
- }
16687
- return {
16688
- line: null,
16689
- column: null,
16690
- lastColumn: null
16691
- };
16692
- };
16693
- sourceMapConsumer.BasicSourceMapConsumer = BasicSourceMapConsumer;
16694
- function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
16695
- var sourceMap2 = aSourceMap;
16696
- if (typeof aSourceMap === "string") {
16697
- sourceMap2 = util$3.parseSourceMapInput(aSourceMap);
16698
- }
16699
- var version2 = util$3.getArg(sourceMap2, "version");
16700
- var sections = util$3.getArg(sourceMap2, "sections");
16701
- if (version2 != this._version) {
16702
- throw new Error("Unsupported version: " + version2);
16703
- }
16704
- this._sources = new ArraySet();
16705
- this._names = new ArraySet();
16706
- var lastOffset = {
16707
- line: -1,
16708
- column: 0
16709
- };
16710
- this._sections = sections.map(function(s3) {
16711
- if (s3.url) {
16712
- throw new Error("Support for url field in sections not implemented.");
16713
- }
16714
- var offset = util$3.getArg(s3, "offset");
16715
- var offsetLine = util$3.getArg(offset, "line");
16716
- var offsetColumn = util$3.getArg(offset, "column");
16717
- if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
16718
- throw new Error("Section offsets must be ordered and non-overlapping.");
16719
- }
16720
- lastOffset = offset;
16721
- return {
16722
- generatedOffset: {
16723
- generatedLine: offsetLine + 1,
16724
- generatedColumn: offsetColumn + 1
16725
- },
16726
- consumer: new SourceMapConsumer(util$3.getArg(s3, "map"), aSourceMapURL)
16727
- };
16728
- });
16729
- }
16730
- IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
16731
- IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
16732
- IndexedSourceMapConsumer.prototype._version = 3;
16733
- Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
16734
- get: function() {
16735
- var sources = [];
16736
- for (var i3 = 0; i3 < this._sections.length; i3++) {
16737
- for (var j = 0; j < this._sections[i3].consumer.sources.length; j++) {
16738
- sources.push(this._sections[i3].consumer.sources[j]);
16739
- }
16740
- }
16741
- return sources;
16742
- }
16743
- });
16744
- IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
16745
- var needle = {
16746
- generatedLine: util$3.getArg(aArgs, "line"),
16747
- generatedColumn: util$3.getArg(aArgs, "column")
16748
- };
16749
- var sectionIndex = binarySearch.search(
16750
- needle,
16751
- this._sections,
16752
- function(needle2, section2) {
16753
- var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
16754
- if (cmp) {
16755
- return cmp;
16756
- }
16757
- return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
16758
- }
16759
- );
16760
- var section = this._sections[sectionIndex];
16761
- if (!section) {
16762
- return {
16763
- source: null,
16764
- line: null,
16765
- column: null,
16766
- name: null
16767
- };
16768
- }
16769
- return section.consumer.originalPositionFor({
16770
- line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
16771
- column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
16772
- bias: aArgs.bias
16773
- });
16774
- };
16775
- IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
16776
- return this._sections.every(function(s3) {
16777
- return s3.consumer.hasContentsOfAllSources();
16778
- });
16779
- };
16780
- IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
16781
- for (var i3 = 0; i3 < this._sections.length; i3++) {
16782
- var section = this._sections[i3];
16783
- var content = section.consumer.sourceContentFor(aSource, true);
16784
- if (content) {
16785
- return content;
16786
- }
16787
- }
16788
- if (nullOnMissing) {
16789
- return null;
16790
- } else {
16791
- throw new Error('"' + aSource + '" is not in the SourceMap.');
16792
- }
16793
- };
16794
- IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
16795
- for (var i3 = 0; i3 < this._sections.length; i3++) {
16796
- var section = this._sections[i3];
16797
- if (section.consumer._findSourceIndex(util$3.getArg(aArgs, "source")) === -1) {
16798
- continue;
16799
- }
16800
- var generatedPosition = section.consumer.generatedPositionFor(aArgs);
16801
- if (generatedPosition) {
16802
- var ret = {
16803
- line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
16804
- column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
16805
- };
16806
- return ret;
16807
- }
16808
- }
16809
- return {
16810
- line: null,
16811
- column: null
16812
- };
16813
- };
16814
- IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
16815
- this.__generatedMappings = [];
16816
- this.__originalMappings = [];
16817
- for (var i3 = 0; i3 < this._sections.length; i3++) {
16818
- var section = this._sections[i3];
16819
- var sectionMappings = section.consumer._generatedMappings;
16820
- for (var j = 0; j < sectionMappings.length; j++) {
16821
- var mapping = sectionMappings[j];
16822
- var source2 = section.consumer._sources.at(mapping.source);
16823
- source2 = util$3.computeSourceURL(section.consumer.sourceRoot, source2, this._sourceMapURL);
16824
- this._sources.add(source2);
16825
- source2 = this._sources.indexOf(source2);
16826
- var name = null;
16827
- if (mapping.name) {
16828
- name = section.consumer._names.at(mapping.name);
16829
- this._names.add(name);
16830
- name = this._names.indexOf(name);
16831
- }
16832
- var adjustedMapping = {
16833
- source: source2,
16834
- generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
16835
- generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
16836
- originalLine: mapping.originalLine,
16837
- originalColumn: mapping.originalColumn,
16838
- name
16839
- };
16840
- this.__generatedMappings.push(adjustedMapping);
16841
- if (typeof adjustedMapping.originalLine === "number") {
16842
- this.__originalMappings.push(adjustedMapping);
16843
- }
16844
- }
16845
- }
16846
- quickSort(this.__generatedMappings, util$3.compareByGeneratedPositionsDeflated);
16847
- quickSort(this.__originalMappings, util$3.compareByOriginalPositions);
16848
- };
16849
- sourceMapConsumer.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
16850
- var sourceNode = {};
16851
- var SourceMapGenerator = sourceMapGenerator.SourceMapGenerator;
16852
- var util$2 = util$7;
16853
- var REGEX_NEWLINE = /(\r?\n)/;
16854
- var NEWLINE_CODE = 10;
16855
- var isSourceNode = "$$$isSourceNode$$$";
16856
- function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
16857
- this.children = [];
16858
- this.sourceContents = {};
16859
- this.line = aLine == null ? null : aLine;
16860
- this.column = aColumn == null ? null : aColumn;
16861
- this.source = aSource == null ? null : aSource;
16862
- this.name = aName == null ? null : aName;
16863
- this[isSourceNode] = true;
16864
- if (aChunks != null)
16865
- this.add(aChunks);
16866
- }
16867
- SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
16868
- var node = new SourceNode();
16869
- var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
16870
- var remainingLinesIndex = 0;
16871
- var shiftNextLine = function() {
16872
- var lineContents = getNextLine();
16873
- var newLine = getNextLine() || "";
16874
- return lineContents + newLine;
16875
- function getNextLine() {
16876
- return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0;
16877
- }
16878
- };
16879
- var lastGeneratedLine = 1, lastGeneratedColumn = 0;
16880
- var lastMapping = null;
16881
- aSourceMapConsumer.eachMapping(function(mapping) {
16882
- if (lastMapping !== null) {
16883
- if (lastGeneratedLine < mapping.generatedLine) {
16884
- addMappingWithCode(lastMapping, shiftNextLine());
16885
- lastGeneratedLine++;
16886
- lastGeneratedColumn = 0;
16887
- } else {
16888
- var nextLine = remainingLines[remainingLinesIndex] || "";
16889
- var code2 = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
16890
- remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
16891
- lastGeneratedColumn = mapping.generatedColumn;
16892
- addMappingWithCode(lastMapping, code2);
16893
- lastMapping = mapping;
16894
- return;
16895
- }
16896
- }
16897
- while (lastGeneratedLine < mapping.generatedLine) {
16898
- node.add(shiftNextLine());
16899
- lastGeneratedLine++;
16900
- }
16901
- if (lastGeneratedColumn < mapping.generatedColumn) {
16902
- var nextLine = remainingLines[remainingLinesIndex] || "";
16903
- node.add(nextLine.substr(0, mapping.generatedColumn));
16904
- remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
16905
- lastGeneratedColumn = mapping.generatedColumn;
16906
- }
16907
- lastMapping = mapping;
16908
- }, this);
16909
- if (remainingLinesIndex < remainingLines.length) {
16910
- if (lastMapping) {
16911
- addMappingWithCode(lastMapping, shiftNextLine());
16912
- }
16913
- node.add(remainingLines.splice(remainingLinesIndex).join(""));
16914
- }
16915
- aSourceMapConsumer.sources.forEach(function(sourceFile) {
16916
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
16917
- if (content != null) {
16918
- if (aRelativePath != null) {
16919
- sourceFile = util$2.join(aRelativePath, sourceFile);
16920
- }
16921
- node.setSourceContent(sourceFile, content);
16922
- }
16923
- });
16924
- return node;
16925
- function addMappingWithCode(mapping, code2) {
16926
- if (mapping === null || mapping.source === void 0) {
16927
- node.add(code2);
16928
- } else {
16929
- var source2 = aRelativePath ? util$2.join(aRelativePath, mapping.source) : mapping.source;
16930
- node.add(new SourceNode(
16931
- mapping.originalLine,
16932
- mapping.originalColumn,
16933
- source2,
16934
- code2,
16935
- mapping.name
16936
- ));
16937
- }
16938
- }
16939
- };
16940
- SourceNode.prototype.add = function SourceNode_add(aChunk) {
16941
- if (Array.isArray(aChunk)) {
16942
- aChunk.forEach(function(chunk) {
16943
- this.add(chunk);
16944
- }, this);
16945
- } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
16946
- if (aChunk) {
16947
- this.children.push(aChunk);
16948
- }
16949
- } else {
16950
- throw new TypeError(
16951
- "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
16952
- );
16953
- }
16954
- return this;
16955
- };
16956
- SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
16957
- if (Array.isArray(aChunk)) {
16958
- for (var i3 = aChunk.length - 1; i3 >= 0; i3--) {
16959
- this.prepend(aChunk[i3]);
16960
- }
16961
- } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
16962
- this.children.unshift(aChunk);
16963
- } else {
16964
- throw new TypeError(
16965
- "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
16966
- );
16967
- }
16968
- return this;
16969
- };
16970
- SourceNode.prototype.walk = function SourceNode_walk(aFn) {
16971
- var chunk;
16972
- for (var i3 = 0, len2 = this.children.length; i3 < len2; i3++) {
16973
- chunk = this.children[i3];
16974
- if (chunk[isSourceNode]) {
16975
- chunk.walk(aFn);
16976
- } else {
16977
- if (chunk !== "") {
16978
- aFn(chunk, {
16979
- source: this.source,
16980
- line: this.line,
16981
- column: this.column,
16982
- name: this.name
16983
- });
16984
- }
16985
- }
16986
- }
16987
- };
16988
- SourceNode.prototype.join = function SourceNode_join(aSep) {
16989
- var newChildren;
16990
- var i3;
16991
- var len2 = this.children.length;
16992
- if (len2 > 0) {
16993
- newChildren = [];
16994
- for (i3 = 0; i3 < len2 - 1; i3++) {
16995
- newChildren.push(this.children[i3]);
16996
- newChildren.push(aSep);
16997
- }
16998
- newChildren.push(this.children[i3]);
16999
- this.children = newChildren;
17000
- }
17001
- return this;
17002
- };
17003
- SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
17004
- var lastChild2 = this.children[this.children.length - 1];
17005
- if (lastChild2[isSourceNode]) {
17006
- lastChild2.replaceRight(aPattern, aReplacement);
17007
- } else if (typeof lastChild2 === "string") {
17008
- this.children[this.children.length - 1] = lastChild2.replace(aPattern, aReplacement);
17009
- } else {
17010
- this.children.push("".replace(aPattern, aReplacement));
17011
- }
17012
- return this;
17013
- };
17014
- SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
17015
- this.sourceContents[util$2.toSetString(aSourceFile)] = aSourceContent;
17016
- };
17017
- SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
17018
- for (var i3 = 0, len2 = this.children.length; i3 < len2; i3++) {
17019
- if (this.children[i3][isSourceNode]) {
17020
- this.children[i3].walkSourceContents(aFn);
17021
- }
17022
- }
17023
- var sources = Object.keys(this.sourceContents);
17024
- for (var i3 = 0, len2 = sources.length; i3 < len2; i3++) {
17025
- aFn(util$2.fromSetString(sources[i3]), this.sourceContents[sources[i3]]);
17026
- }
17027
- };
17028
- SourceNode.prototype.toString = function SourceNode_toString() {
17029
- var str = "";
17030
- this.walk(function(chunk) {
17031
- str += chunk;
17032
- });
17033
- return str;
17034
- };
17035
- SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
17036
- var generated = {
17037
- code: "",
17038
- line: 1,
17039
- column: 0
17040
- };
17041
- var map2 = new SourceMapGenerator(aArgs);
17042
- var sourceMappingActive = false;
17043
- var lastOriginalSource = null;
17044
- var lastOriginalLine = null;
17045
- var lastOriginalColumn = null;
17046
- var lastOriginalName = null;
17047
- this.walk(function(chunk, original) {
17048
- generated.code += chunk;
17049
- if (original.source !== null && original.line !== null && original.column !== null) {
17050
- if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
17051
- map2.addMapping({
17052
- source: original.source,
17053
- original: {
17054
- line: original.line,
17055
- column: original.column
17056
- },
17057
- generated: {
17058
- line: generated.line,
17059
- column: generated.column
17060
- },
17061
- name: original.name
17062
- });
17063
- }
17064
- lastOriginalSource = original.source;
17065
- lastOriginalLine = original.line;
17066
- lastOriginalColumn = original.column;
17067
- lastOriginalName = original.name;
17068
- sourceMappingActive = true;
17069
- } else if (sourceMappingActive) {
17070
- map2.addMapping({
17071
- generated: {
17072
- line: generated.line,
17073
- column: generated.column
17074
- }
17075
- });
17076
- lastOriginalSource = null;
17077
- sourceMappingActive = false;
17078
- }
17079
- for (var idx = 0, length2 = chunk.length; idx < length2; idx++) {
17080
- if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
17081
- generated.line++;
17082
- generated.column = 0;
17083
- if (idx + 1 === length2) {
17084
- lastOriginalSource = null;
17085
- sourceMappingActive = false;
17086
- } else if (sourceMappingActive) {
17087
- map2.addMapping({
17088
- source: original.source,
17089
- original: {
17090
- line: original.line,
17091
- column: original.column
17092
- },
17093
- generated: {
17094
- line: generated.line,
17095
- column: generated.column
17096
- },
17097
- name: original.name
17098
- });
17099
- }
17100
- } else {
17101
- generated.column++;
17102
- }
17103
- }
17104
- });
17105
- this.walkSourceContents(function(sourceFile, sourceContent) {
17106
- map2.setSourceContent(sourceFile, sourceContent);
17107
- });
17108
- return { code: generated.code, map: map2 };
17109
- };
17110
- sourceNode.SourceNode = SourceNode;
17111
- sourceMap$1.SourceMapGenerator = sourceMapGenerator.SourceMapGenerator;
17112
- sourceMap$1.SourceMapConsumer = sourceMapConsumer.SourceMapConsumer;
17113
- sourceMap$1.SourceNode = sourceNode.SourceNode;
17114
15377
  /*!
17115
15378
  * message-compiler v9.2.2
17116
15379
  * (c) 2022 kazuya kawaguchi
17117
15380
  * Released under the MIT License.
17118
15381
  */
17119
- Object.defineProperty(messageCompiler_cjs, "__esModule", { value: true });
17120
- var shared$2 = shared$3.exports;
17121
- var sourceMap = sourceMap$1;
17122
15382
  const CompileErrorCodes = {
17123
15383
  EXPECTED_TOKEN: 1,
17124
15384
  INVALID_TOKEN_IN_PLACEHOLDER: 2,
@@ -17154,7 +15414,7 @@ const errorMessages$2 = {
17154
15414
  };
17155
15415
  function createCompileError(code2, loc, options = {}) {
17156
15416
  const { domain, messages, args } = options;
17157
- const msg = shared$2.format((messages || errorMessages$2)[code2] || "", ...args || []);
15417
+ const msg = format$2((messages || errorMessages$2)[code2] || "", ...args || []);
17158
15418
  const error2 = new SyntaxError(String(msg));
17159
15419
  error2.code = code2;
17160
15420
  if (loc) {
@@ -17166,10 +15426,6 @@ function createCompileError(code2, loc, options = {}) {
17166
15426
  function defaultOnError(error2) {
17167
15427
  throw error2;
17168
15428
  }
17169
- const LocationStub = {
17170
- start: { line: 1, column: 1, offset: 0 },
17171
- end: { line: 1, column: 1, offset: 0 }
17172
- };
17173
15429
  function createPosition(line, column, offset) {
17174
15430
  return { line, column, offset };
17175
15431
  }
@@ -18103,7 +16359,7 @@ function createParser(options = {}) {
18103
16359
  }
18104
16360
  }
18105
16361
  function parse2(source2) {
18106
- const tokenizer = createTokenizer(source2, shared$2.assign({}, options));
16362
+ const tokenizer = createTokenizer(source2, assign({}, options));
18107
16363
  const context = tokenizer.context();
18108
16364
  const node = startNode(0, context.offset, context.startLoc);
18109
16365
  if (location2 && node.loc) {
@@ -18175,7 +16431,7 @@ function transform(ast, options = {}) {
18175
16431
  ast.helpers = Array.from(context.helpers);
18176
16432
  }
18177
16433
  function createCodeGenerator(ast, options) {
18178
- const { sourceMap: sourceMap$12, filename, breakLineCode, needIndent: _needIndent } = options;
16434
+ const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;
18179
16435
  const _context = {
18180
16436
  source: ast.loc.source,
18181
16437
  filename,
@@ -18191,12 +16447,6 @@ function createCodeGenerator(ast, options) {
18191
16447
  const context = () => _context;
18192
16448
  function push2(code2, node) {
18193
16449
  _context.code += code2;
18194
- if (_context.map) {
18195
- if (node && node.loc && node.loc !== LocationStub) {
18196
- addMapping(node.loc.start, getMappingName(node));
18197
- }
18198
- advancePositionWithSource(_context, code2);
18199
- }
18200
16450
  }
18201
16451
  function _newline(n2, withBreakLine = true) {
18202
16452
  const _breakLineCode = withBreakLine ? breakLineCode : "";
@@ -18215,24 +16465,6 @@ function createCodeGenerator(ast, options) {
18215
16465
  }
18216
16466
  const helper2 = (key) => `_${key}`;
18217
16467
  const needIndent = () => _context.needIndent;
18218
- function addMapping(loc, name) {
18219
- _context.map.addMapping({
18220
- name,
18221
- source: _context.filename,
18222
- original: {
18223
- line: loc.line,
18224
- column: loc.column - 1
18225
- },
18226
- generated: {
18227
- line: _context.line,
18228
- column: _context.column - 1
18229
- }
18230
- });
18231
- }
18232
- if (sourceMap$12) {
18233
- _context.map = new sourceMap.SourceMapGenerator();
18234
- _context.map.setSourceContent(filename, _context.source);
18235
- }
18236
16468
  return {
18237
16469
  context,
18238
16470
  push: push2,
@@ -18334,16 +16566,16 @@ function generateNode(generator, node) {
18334
16566
  }
18335
16567
  }
18336
16568
  const generate = (ast, options = {}) => {
18337
- const mode = shared$2.isString(options.mode) ? options.mode : "normal";
18338
- const filename = shared$2.isString(options.filename) ? options.filename : "message.intl";
18339
- const sourceMap2 = !!options.sourceMap;
16569
+ const mode = isString$1(options.mode) ? options.mode : "normal";
16570
+ const filename = isString$1(options.filename) ? options.filename : "message.intl";
16571
+ const sourceMap = !!options.sourceMap;
18340
16572
  const breakLineCode = options.breakLineCode != null ? options.breakLineCode : mode === "arrow" ? ";" : "\n";
18341
16573
  const needIndent = options.needIndent ? options.needIndent : mode !== "arrow";
18342
16574
  const helpers = ast.helpers || [];
18343
16575
  const generator = createCodeGenerator(ast, {
18344
16576
  mode,
18345
16577
  filename,
18346
- sourceMap: sourceMap2,
16578
+ sourceMap,
18347
16579
  breakLineCode,
18348
16580
  needIndent
18349
16581
  });
@@ -18364,80 +16596,27 @@ const generate = (ast, options = {}) => {
18364
16596
  map: map2 ? map2.toJSON() : void 0
18365
16597
  };
18366
16598
  };
18367
- function getMappingName(node) {
18368
- switch (node.type) {
18369
- case 3:
18370
- case 9:
18371
- case 8:
18372
- case 7:
18373
- return node.value;
18374
- case 5:
18375
- return node.index.toString();
18376
- case 4:
18377
- return node.key;
18378
- default:
18379
- return void 0;
18380
- }
18381
- }
18382
- function advancePositionWithSource(pos, source2, numberOfCharacters = source2.length) {
18383
- let linesCount = 0;
18384
- let lastNewLinePos = -1;
18385
- for (let i3 = 0; i3 < numberOfCharacters; i3++) {
18386
- if (source2.charCodeAt(i3) === 10) {
18387
- linesCount++;
18388
- lastNewLinePos = i3;
18389
- }
18390
- }
18391
- pos.offset += numberOfCharacters;
18392
- pos.line += linesCount;
18393
- pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos;
18394
- return pos;
18395
- }
18396
16599
  function baseCompile(source2, options = {}) {
18397
- const assignedOptions = shared$2.assign({}, options);
16600
+ const assignedOptions = assign({}, options);
18398
16601
  const parser = createParser(assignedOptions);
18399
16602
  const ast = parser.parse(source2);
18400
16603
  transform(ast, assignedOptions);
18401
16604
  return generate(ast, assignedOptions);
18402
16605
  }
18403
- messageCompiler_cjs.CompileErrorCodes = CompileErrorCodes;
18404
- messageCompiler_cjs.ERROR_DOMAIN = ERROR_DOMAIN;
18405
- messageCompiler_cjs.LocationStub = LocationStub;
18406
- messageCompiler_cjs.baseCompile = baseCompile;
18407
- messageCompiler_cjs.createCompileError = createCompileError;
18408
- messageCompiler_cjs.createLocation = createLocation;
18409
- messageCompiler_cjs.createParser = createParser;
18410
- messageCompiler_cjs.createPosition = createPosition;
18411
- messageCompiler_cjs.defaultOnError = defaultOnError;
18412
- messageCompiler_cjs.errorMessages = errorMessages$2;
18413
- {
18414
- messageCompiler$1.exports = messageCompiler_cjs;
18415
- }
18416
- var devtoolsIf$1 = { exports: {} };
18417
- var devtoolsIf_cjs = {};
18418
16606
  /*!
18419
16607
  * devtools-if v9.2.2
18420
16608
  * (c) 2022 kazuya kawaguchi
18421
16609
  * Released under the MIT License.
18422
16610
  */
18423
- Object.defineProperty(devtoolsIf_cjs, "__esModule", { value: true });
18424
16611
  const IntlifyDevToolsHooks = {
18425
16612
  I18nInit: "i18n:init",
18426
16613
  FunctionTranslate: "function:translate"
18427
16614
  };
18428
- devtoolsIf_cjs.IntlifyDevToolsHooks = IntlifyDevToolsHooks;
18429
- {
18430
- devtoolsIf$1.exports = devtoolsIf_cjs;
18431
- }
18432
16615
  /*!
18433
16616
  * core-base v9.2.2
18434
16617
  * (c) 2022 kazuya kawaguchi
18435
16618
  * Released under the MIT License.
18436
16619
  */
18437
- Object.defineProperty(coreBase_cjs, "__esModule", { value: true });
18438
- var messageCompiler = messageCompiler$1.exports;
18439
- var shared$1 = shared$3.exports;
18440
- var devtoolsIf = devtoolsIf$1.exports;
18441
16620
  const pathStateMachine = [];
18442
16621
  pathStateMachine[0] = {
18443
16622
  ["w"]: [0],
@@ -18614,10 +16793,10 @@ function parse$1(path) {
18614
16793
  }
18615
16794
  const cache = /* @__PURE__ */ new Map();
18616
16795
  function resolveWithKeyValue(obj, path) {
18617
- return shared$1.isObject(obj) ? obj[path] : null;
16796
+ return isObject$4(obj) ? obj[path] : null;
18618
16797
  }
18619
16798
  function resolveValue(obj, path) {
18620
- if (!shared$1.isObject(obj)) {
16799
+ if (!isObject$4(obj)) {
18621
16800
  return null;
18622
16801
  }
18623
16802
  let hit = cache.get(path);
@@ -18647,7 +16826,7 @@ const DEFAULT_MODIFIER = (str) => str;
18647
16826
  const DEFAULT_MESSAGE = (ctx) => "";
18648
16827
  const DEFAULT_MESSAGE_DATA_TYPE = "text";
18649
16828
  const DEFAULT_NORMALIZE = (values) => values.length === 0 ? "" : values.join("");
18650
- const DEFAULT_INTERPOLATE = shared$1.toDisplayString;
16829
+ const DEFAULT_INTERPOLATE = toDisplayString;
18651
16830
  function pluralDefault(choice, choicesLength) {
18652
16831
  choice = Math.abs(choice);
18653
16832
  if (choicesLength === 2) {
@@ -18656,8 +16835,8 @@ function pluralDefault(choice, choicesLength) {
18656
16835
  return choice ? Math.min(choice, 2) : 0;
18657
16836
  }
18658
16837
  function getPluralIndex(options) {
18659
- const index2 = shared$1.isNumber(options.pluralIndex) ? options.pluralIndex : -1;
18660
- return options.named && (shared$1.isNumber(options.named.count) || shared$1.isNumber(options.named.n)) ? shared$1.isNumber(options.named.count) ? options.named.count : shared$1.isNumber(options.named.n) ? options.named.n : index2 : index2;
16838
+ const index2 = isNumber$1(options.pluralIndex) ? options.pluralIndex : -1;
16839
+ return options.named && (isNumber$1(options.named.count) || isNumber$1(options.named.n)) ? isNumber$1(options.named.count) ? options.named.count : isNumber$1(options.named.n) ? options.named.n : index2 : index2;
18661
16840
  }
18662
16841
  function normalizeNamed(pluralIndex, props) {
18663
16842
  if (!props.count) {
@@ -18670,45 +16849,45 @@ function normalizeNamed(pluralIndex, props) {
18670
16849
  function createMessageContext(options = {}) {
18671
16850
  const locale2 = options.locale;
18672
16851
  const pluralIndex = getPluralIndex(options);
18673
- const pluralRule = shared$1.isObject(options.pluralRules) && shared$1.isString(locale2) && shared$1.isFunction(options.pluralRules[locale2]) ? options.pluralRules[locale2] : pluralDefault;
18674
- const orgPluralRule = shared$1.isObject(options.pluralRules) && shared$1.isString(locale2) && shared$1.isFunction(options.pluralRules[locale2]) ? pluralDefault : void 0;
16852
+ const pluralRule = isObject$4(options.pluralRules) && isString$1(locale2) && isFunction$1(options.pluralRules[locale2]) ? options.pluralRules[locale2] : pluralDefault;
16853
+ const orgPluralRule = isObject$4(options.pluralRules) && isString$1(locale2) && isFunction$1(options.pluralRules[locale2]) ? pluralDefault : void 0;
18675
16854
  const plural = (messages) => {
18676
16855
  return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];
18677
16856
  };
18678
16857
  const _list = options.list || [];
18679
16858
  const list = (index2) => _list[index2];
18680
16859
  const _named = options.named || {};
18681
- shared$1.isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);
16860
+ isNumber$1(options.pluralIndex) && normalizeNamed(pluralIndex, _named);
18682
16861
  const named = (key) => _named[key];
18683
16862
  function message(key) {
18684
- const msg = shared$1.isFunction(options.messages) ? options.messages(key) : shared$1.isObject(options.messages) ? options.messages[key] : false;
16863
+ const msg = isFunction$1(options.messages) ? options.messages(key) : isObject$4(options.messages) ? options.messages[key] : false;
18685
16864
  return !msg ? options.parent ? options.parent.message(key) : DEFAULT_MESSAGE : msg;
18686
16865
  }
18687
16866
  const _modifier = (name) => options.modifiers ? options.modifiers[name] : DEFAULT_MODIFIER;
18688
- const normalize2 = shared$1.isPlainObject(options.processor) && shared$1.isFunction(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE;
18689
- const interpolate = shared$1.isPlainObject(options.processor) && shared$1.isFunction(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE;
18690
- const type = shared$1.isPlainObject(options.processor) && shared$1.isString(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE;
16867
+ const normalize2 = isPlainObject(options.processor) && isFunction$1(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE;
16868
+ const interpolate = isPlainObject(options.processor) && isFunction$1(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE;
16869
+ const type = isPlainObject(options.processor) && isString$1(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE;
18691
16870
  const linked = (key, ...args) => {
18692
16871
  const [arg1, arg2] = args;
18693
16872
  let type2 = "text";
18694
16873
  let modifier = "";
18695
16874
  if (args.length === 1) {
18696
- if (shared$1.isObject(arg1)) {
16875
+ if (isObject$4(arg1)) {
18697
16876
  modifier = arg1.modifier || modifier;
18698
16877
  type2 = arg1.type || type2;
18699
- } else if (shared$1.isString(arg1)) {
16878
+ } else if (isString$1(arg1)) {
18700
16879
  modifier = arg1 || modifier;
18701
16880
  }
18702
16881
  } else if (args.length === 2) {
18703
- if (shared$1.isString(arg1)) {
16882
+ if (isString$1(arg1)) {
18704
16883
  modifier = arg1 || modifier;
18705
16884
  }
18706
- if (shared$1.isString(arg2)) {
16885
+ if (isString$1(arg2)) {
18707
16886
  type2 = arg2 || type2;
18708
16887
  }
18709
16888
  }
18710
16889
  let msg = message(key)(ctx);
18711
- if (type2 === "vnode" && shared$1.isArray(msg) && modifier) {
16890
+ if (type2 === "vnode" && isArray$2(msg) && modifier) {
18712
16891
  msg = msg[0];
18713
16892
  }
18714
16893
  return modifier ? _modifier(modifier)(msg, type2) : msg;
@@ -18729,18 +16908,15 @@ let devtools = null;
18729
16908
  function setDevToolsHook(hook) {
18730
16909
  devtools = hook;
18731
16910
  }
18732
- function getDevToolsHook() {
18733
- return devtools;
18734
- }
18735
16911
  function initI18nDevTools(i18n2, version2, meta) {
18736
- devtools && devtools.emit(devtoolsIf.IntlifyDevToolsHooks.I18nInit, {
16912
+ devtools && devtools.emit(IntlifyDevToolsHooks.I18nInit, {
18737
16913
  timestamp: Date.now(),
18738
16914
  i18n: i18n2,
18739
16915
  version: version2,
18740
16916
  meta
18741
16917
  });
18742
16918
  }
18743
- const translateDevTools = /* @__PURE__ */ createDevToolsHook(devtoolsIf.IntlifyDevToolsHooks.FunctionTranslate);
16919
+ const translateDevTools = /* @__PURE__ */ createDevToolsHook(IntlifyDevToolsHooks.FunctionTranslate);
18744
16920
  function createDevToolsHook(hook) {
18745
16921
  return (payloads) => devtools && devtools.emit(hook, payloads);
18746
16922
  }
@@ -18762,16 +16938,16 @@ const warnMessages$1 = {
18762
16938
  [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`
18763
16939
  };
18764
16940
  function getWarnMessage$1(code2, ...args) {
18765
- return shared$1.format(warnMessages$1[code2], ...args);
16941
+ return format$2(warnMessages$1[code2], ...args);
18766
16942
  }
18767
16943
  function fallbackWithSimple(ctx, fallback, start2) {
18768
16944
  return [.../* @__PURE__ */ new Set([
18769
16945
  start2,
18770
- ...shared$1.isArray(fallback) ? fallback : shared$1.isObject(fallback) ? Object.keys(fallback) : shared$1.isString(fallback) ? [fallback] : [start2]
16946
+ ...isArray$2(fallback) ? fallback : isObject$4(fallback) ? Object.keys(fallback) : isString$1(fallback) ? [fallback] : [start2]
18771
16947
  ])];
18772
16948
  }
18773
16949
  function fallbackWithLocaleChain(ctx, fallback, start2) {
18774
- const startLocale = shared$1.isString(start2) ? start2 : DEFAULT_LOCALE$1;
16950
+ const startLocale = isString$1(start2) ? start2 : DEFAULT_LOCALE$1;
18775
16951
  const context = ctx;
18776
16952
  if (!context.__localeChainCache) {
18777
16953
  context.__localeChainCache = /* @__PURE__ */ new Map();
@@ -18780,12 +16956,12 @@ function fallbackWithLocaleChain(ctx, fallback, start2) {
18780
16956
  if (!chain) {
18781
16957
  chain = [];
18782
16958
  let block = [start2];
18783
- while (shared$1.isArray(block)) {
16959
+ while (isArray$2(block)) {
18784
16960
  block = appendBlockToChain(chain, block, fallback);
18785
16961
  }
18786
- const defaults2 = shared$1.isArray(fallback) || !shared$1.isPlainObject(fallback) ? fallback : fallback["default"] ? fallback["default"] : null;
18787
- block = shared$1.isString(defaults2) ? [defaults2] : defaults2;
18788
- if (shared$1.isArray(block)) {
16962
+ const defaults2 = isArray$2(fallback) || !isPlainObject(fallback) ? fallback : fallback["default"] ? fallback["default"] : null;
16963
+ block = isString$1(defaults2) ? [defaults2] : defaults2;
16964
+ if (isArray$2(block)) {
18789
16965
  appendBlockToChain(chain, block, false);
18790
16966
  }
18791
16967
  context.__localeChainCache.set(startLocale, chain);
@@ -18794,9 +16970,9 @@ function fallbackWithLocaleChain(ctx, fallback, start2) {
18794
16970
  }
18795
16971
  function appendBlockToChain(chain, block, blocks) {
18796
16972
  let follow = true;
18797
- for (let i3 = 0; i3 < block.length && shared$1.isBoolean(follow); i3++) {
16973
+ for (let i3 = 0; i3 < block.length && isBoolean(follow); i3++) {
18798
16974
  const locale2 = block[i3];
18799
- if (shared$1.isString(locale2)) {
16975
+ if (isString$1(locale2)) {
18800
16976
  follow = appendLocaleToChain(chain, block[i3], blocks);
18801
16977
  }
18802
16978
  }
@@ -18820,7 +16996,7 @@ function appendItemToChain(chain, target, blocks) {
18820
16996
  follow = target[target.length - 1] !== "!";
18821
16997
  const locale2 = target.replace(/!/g, "");
18822
16998
  chain.push(locale2);
18823
- if ((shared$1.isArray(blocks) || shared$1.isPlainObject(blocks)) && blocks[locale2]) {
16999
+ if ((isArray$2(blocks) || isPlainObject(blocks)) && blocks[locale2]) {
18824
17000
  follow = blocks[locale2];
18825
17001
  }
18826
17002
  }
@@ -18835,13 +17011,13 @@ const capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)
18835
17011
  function getDefaultLinkedModifiers() {
18836
17012
  return {
18837
17013
  upper: (val, type) => {
18838
- return type === "text" && shared$1.isString(val) ? val.toUpperCase() : type === "vnode" && shared$1.isObject(val) && "__v_isVNode" in val ? val.children.toUpperCase() : val;
17014
+ return type === "text" && isString$1(val) ? val.toUpperCase() : type === "vnode" && isObject$4(val) && "__v_isVNode" in val ? val.children.toUpperCase() : val;
18839
17015
  },
18840
17016
  lower: (val, type) => {
18841
- return type === "text" && shared$1.isString(val) ? val.toLowerCase() : type === "vnode" && shared$1.isObject(val) && "__v_isVNode" in val ? val.children.toLowerCase() : val;
17017
+ return type === "text" && isString$1(val) ? val.toLowerCase() : type === "vnode" && isObject$4(val) && "__v_isVNode" in val ? val.children.toLowerCase() : val;
18842
17018
  },
18843
17019
  capitalize: (val, type) => {
18844
- return type === "text" && shared$1.isString(val) ? capitalize(val) : type === "vnode" && shared$1.isObject(val) && "__v_isVNode" in val ? capitalize(val.children) : val;
17020
+ return type === "text" && isString$1(val) ? capitalize(val) : type === "vnode" && isObject$4(val) && "__v_isVNode" in val ? capitalize(val.children) : val;
18845
17021
  }
18846
17022
  };
18847
17023
  }
@@ -18869,32 +17045,32 @@ const setFallbackContext = (context) => {
18869
17045
  const getFallbackContext = () => _fallbackContext;
18870
17046
  let _cid = 0;
18871
17047
  function createCoreContext(options = {}) {
18872
- const version2 = shared$1.isString(options.version) ? options.version : VERSION$1;
18873
- const locale2 = shared$1.isString(options.locale) ? options.locale : DEFAULT_LOCALE$1;
18874
- const fallbackLocale = shared$1.isArray(options.fallbackLocale) || shared$1.isPlainObject(options.fallbackLocale) || shared$1.isString(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale2;
18875
- const messages = shared$1.isPlainObject(options.messages) ? options.messages : { [locale2]: {} };
18876
- const datetimeFormats = shared$1.isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [locale2]: {} };
18877
- const numberFormats = shared$1.isPlainObject(options.numberFormats) ? options.numberFormats : { [locale2]: {} };
18878
- const modifiers = shared$1.assign({}, options.modifiers || {}, getDefaultLinkedModifiers());
17048
+ const version2 = isString$1(options.version) ? options.version : VERSION$1;
17049
+ const locale2 = isString$1(options.locale) ? options.locale : DEFAULT_LOCALE$1;
17050
+ const fallbackLocale = isArray$2(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || isString$1(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale2;
17051
+ const messages = isPlainObject(options.messages) ? options.messages : { [locale2]: {} };
17052
+ const datetimeFormats = isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [locale2]: {} };
17053
+ const numberFormats = isPlainObject(options.numberFormats) ? options.numberFormats : { [locale2]: {} };
17054
+ const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers());
18879
17055
  const pluralRules = options.pluralRules || {};
18880
- const missing = shared$1.isFunction(options.missing) ? options.missing : null;
18881
- const missingWarn = shared$1.isBoolean(options.missingWarn) || shared$1.isRegExp(options.missingWarn) ? options.missingWarn : true;
18882
- const fallbackWarn = shared$1.isBoolean(options.fallbackWarn) || shared$1.isRegExp(options.fallbackWarn) ? options.fallbackWarn : true;
17056
+ const missing = isFunction$1(options.missing) ? options.missing : null;
17057
+ const missingWarn = isBoolean(options.missingWarn) || isRegExp$1(options.missingWarn) ? options.missingWarn : true;
17058
+ const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp$1(options.fallbackWarn) ? options.fallbackWarn : true;
18883
17059
  const fallbackFormat = !!options.fallbackFormat;
18884
17060
  const unresolving = !!options.unresolving;
18885
- const postTranslation = shared$1.isFunction(options.postTranslation) ? options.postTranslation : null;
18886
- const processor = shared$1.isPlainObject(options.processor) ? options.processor : null;
18887
- const warnHtmlMessage = shared$1.isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
17061
+ const postTranslation = isFunction$1(options.postTranslation) ? options.postTranslation : null;
17062
+ const processor = isPlainObject(options.processor) ? options.processor : null;
17063
+ const warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
18888
17064
  const escapeParameter = !!options.escapeParameter;
18889
- const messageCompiler2 = shared$1.isFunction(options.messageCompiler) ? options.messageCompiler : _compiler;
18890
- const messageResolver = shared$1.isFunction(options.messageResolver) ? options.messageResolver : _resolver || resolveWithKeyValue;
18891
- const localeFallbacker = shared$1.isFunction(options.localeFallbacker) ? options.localeFallbacker : _fallbacker || fallbackWithSimple;
18892
- const fallbackContext = shared$1.isObject(options.fallbackContext) ? options.fallbackContext : void 0;
18893
- const onWarn = shared$1.isFunction(options.onWarn) ? options.onWarn : shared$1.warn;
17065
+ const messageCompiler = isFunction$1(options.messageCompiler) ? options.messageCompiler : _compiler;
17066
+ const messageResolver = isFunction$1(options.messageResolver) ? options.messageResolver : _resolver || resolveWithKeyValue;
17067
+ const localeFallbacker = isFunction$1(options.localeFallbacker) ? options.localeFallbacker : _fallbacker || fallbackWithSimple;
17068
+ const fallbackContext = isObject$4(options.fallbackContext) ? options.fallbackContext : void 0;
17069
+ const onWarn = isFunction$1(options.onWarn) ? options.onWarn : warn$1;
18894
17070
  const internalOptions = options;
18895
- const __datetimeFormatters = shared$1.isObject(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map();
18896
- const __numberFormatters = shared$1.isObject(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map();
18897
- const __meta = shared$1.isObject(internalOptions.__meta) ? internalOptions.__meta : {};
17071
+ const __datetimeFormatters = isObject$4(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map();
17072
+ const __numberFormatters = isObject$4(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map();
17073
+ const __meta = isObject$4(internalOptions.__meta) ? internalOptions.__meta : {};
18898
17074
  _cid++;
18899
17075
  const context = {
18900
17076
  version: version2,
@@ -18913,7 +17089,7 @@ function createCoreContext(options = {}) {
18913
17089
  processor,
18914
17090
  warnHtmlMessage,
18915
17091
  escapeParameter,
18916
- messageCompiler: messageCompiler2,
17092
+ messageCompiler,
18917
17093
  messageResolver,
18918
17094
  localeFallbacker,
18919
17095
  fallbackContext,
@@ -18955,7 +17131,7 @@ function handleMissing(context, key, locale2, missingWarn, type) {
18955
17131
  }
18956
17132
  if (missing !== null) {
18957
17133
  const ret = missing(context, locale2, key, type);
18958
- return shared$1.isString(ret) ? ret : key;
17134
+ return isString$1(ret) ? ret : key;
18959
17135
  } else {
18960
17136
  if (isTranslateMissingWarn(missingWarn, key)) {
18961
17137
  onWarn(getWarnMessage$1(CoreWarnCodes.NOT_FOUND_KEY, { key, locale: locale2 }));
@@ -18971,16 +17147,13 @@ function updateFallbackLocale(ctx, locale2, fallback) {
18971
17147
  const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
18972
17148
  const WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;
18973
17149
  function checkHtmlMessage(source2, options) {
18974
- const warnHtmlMessage = shared$1.isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
17150
+ const warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
18975
17151
  if (warnHtmlMessage && RE_HTML_TAG.test(source2)) {
18976
- shared$1.warn(shared$1.format(WARN_MESSAGE, { source: source2 }));
17152
+ warn$1(format$2(WARN_MESSAGE, { source: source2 }));
18977
17153
  }
18978
17154
  }
18979
17155
  const defaultOnCacheKey = (source2) => source2;
18980
17156
  let compileCache = /* @__PURE__ */ Object.create(null);
18981
- function clearCompileCache() {
18982
- compileCache = /* @__PURE__ */ Object.create(null);
18983
- }
18984
17157
  function compileToFunction(source2, options = {}) {
18985
17158
  {
18986
17159
  checkHtmlMessage(source2, options);
@@ -18991,17 +17164,17 @@ function compileToFunction(source2, options = {}) {
18991
17164
  return cached;
18992
17165
  }
18993
17166
  let occurred = false;
18994
- const onError = options.onError || messageCompiler.defaultOnError;
17167
+ const onError = options.onError || defaultOnError;
18995
17168
  options.onError = (err) => {
18996
17169
  occurred = true;
18997
17170
  onError(err);
18998
17171
  };
18999
- const { code: code2 } = messageCompiler.baseCompile(source2, options);
17172
+ const { code: code2 } = baseCompile(source2, options);
19000
17173
  const msg = new Function(`return ${code2}`)();
19001
17174
  return !occurred ? compileCache[key] = msg : msg;
19002
17175
  }
19003
17176
  }
19004
- let code$2 = messageCompiler.CompileErrorCodes.__EXTEND_POINT__;
17177
+ let code$2 = CompileErrorCodes.__EXTEND_POINT__;
19005
17178
  const inc$2 = () => ++code$2;
19006
17179
  const CoreErrorCodes = {
19007
17180
  INVALID_ARGUMENT: code$2,
@@ -19010,7 +17183,7 @@ const CoreErrorCodes = {
19010
17183
  __EXTEND_POINT__: inc$2()
19011
17184
  };
19012
17185
  function createCoreError(code2) {
19013
- return messageCompiler.createCompileError(code2, null, { messages: errorMessages$1 });
17186
+ return createCompileError(code2, null, { messages: errorMessages$1 });
19014
17187
  }
19015
17188
  const errorMessages$1 = {
19016
17189
  [CoreErrorCodes.INVALID_ARGUMENT]: "Invalid arguments",
@@ -19018,17 +17191,17 @@ const errorMessages$1 = {
19018
17191
  [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string"
19019
17192
  };
19020
17193
  const NOOP_MESSAGE_FUNCTION = () => "";
19021
- const isMessageFunction = (val) => shared$1.isFunction(val);
17194
+ const isMessageFunction = (val) => isFunction$1(val);
19022
17195
  function translate$1(context, ...args) {
19023
- const { fallbackFormat, postTranslation, unresolving, messageCompiler: messageCompiler2, fallbackLocale, messages } = context;
17196
+ const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;
19024
17197
  const [key, options] = parseTranslateArgs(...args);
19025
- const missingWarn = shared$1.isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
19026
- const fallbackWarn = shared$1.isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
19027
- const escapeParameter = shared$1.isBoolean(options.escapeParameter) ? options.escapeParameter : context.escapeParameter;
17198
+ const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
17199
+ const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
17200
+ const escapeParameter = isBoolean(options.escapeParameter) ? options.escapeParameter : context.escapeParameter;
19028
17201
  const resolvedMessage = !!options.resolvedMessage;
19029
- const defaultMsgOrKey = shared$1.isString(options.default) || shared$1.isBoolean(options.default) ? !shared$1.isBoolean(options.default) ? options.default : !messageCompiler2 ? () => key : key : fallbackFormat ? !messageCompiler2 ? () => key : key : "";
17202
+ const defaultMsgOrKey = isString$1(options.default) || isBoolean(options.default) ? !isBoolean(options.default) ? options.default : !messageCompiler ? () => key : key : fallbackFormat ? !messageCompiler ? () => key : key : "";
19030
17203
  const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== "";
19031
- const locale2 = shared$1.isString(options.locale) ? options.locale : context.locale;
17204
+ const locale2 = isString$1(options.locale) ? options.locale : context.locale;
19032
17205
  escapeParameter && escapeParams(options);
19033
17206
  let [formatScope, targetLocale, message] = !resolvedMessage ? resolveMessageFormat(context, key, locale2, fallbackLocale, fallbackWarn, missingWarn) : [
19034
17207
  key,
@@ -19037,17 +17210,17 @@ function translate$1(context, ...args) {
19037
17210
  ];
19038
17211
  let format2 = formatScope;
19039
17212
  let cacheBaseKey = key;
19040
- if (!resolvedMessage && !(shared$1.isString(format2) || isMessageFunction(format2))) {
17213
+ if (!resolvedMessage && !(isString$1(format2) || isMessageFunction(format2))) {
19041
17214
  if (enableDefaultMsg) {
19042
17215
  format2 = defaultMsgOrKey;
19043
17216
  cacheBaseKey = format2;
19044
17217
  }
19045
17218
  }
19046
- if (!resolvedMessage && (!(shared$1.isString(format2) || isMessageFunction(format2)) || !shared$1.isString(targetLocale))) {
17219
+ if (!resolvedMessage && (!(isString$1(format2) || isMessageFunction(format2)) || !isString$1(targetLocale))) {
19047
17220
  return unresolving ? NOT_REOSLVED : key;
19048
17221
  }
19049
- if (shared$1.isString(format2) && context.messageCompiler == null) {
19050
- shared$1.warn(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${key}'.`);
17222
+ if (isString$1(format2) && context.messageCompiler == null) {
17223
+ warn$1(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${key}'.`);
19051
17224
  return key;
19052
17225
  }
19053
17226
  let occurred = false;
@@ -19065,23 +17238,23 @@ function translate$1(context, ...args) {
19065
17238
  {
19066
17239
  const payloads = {
19067
17240
  timestamp: Date.now(),
19068
- key: shared$1.isString(key) ? key : isMessageFunction(format2) ? format2.key : "",
17241
+ key: isString$1(key) ? key : isMessageFunction(format2) ? format2.key : "",
19069
17242
  locale: targetLocale || (isMessageFunction(format2) ? format2.locale : ""),
19070
- format: shared$1.isString(format2) ? format2 : isMessageFunction(format2) ? format2.source : "",
17243
+ format: isString$1(format2) ? format2 : isMessageFunction(format2) ? format2.source : "",
19071
17244
  message: ret
19072
17245
  };
19073
- payloads.meta = shared$1.assign({}, context.__meta, getAdditionalMeta() || {});
17246
+ payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});
19074
17247
  translateDevTools(payloads);
19075
17248
  }
19076
17249
  return ret;
19077
17250
  }
19078
17251
  function escapeParams(options) {
19079
- if (shared$1.isArray(options.list)) {
19080
- options.list = options.list.map((item) => shared$1.isString(item) ? shared$1.escapeHtml(item) : item);
19081
- } else if (shared$1.isObject(options.named)) {
17252
+ if (isArray$2(options.list)) {
17253
+ options.list = options.list.map((item) => isString$1(item) ? escapeHtml(item) : item);
17254
+ } else if (isObject$4(options.named)) {
19082
17255
  Object.keys(options.named).forEach((key) => {
19083
- if (shared$1.isString(options.named[key])) {
19084
- options.named[key] = shared$1.escapeHtml(options.named[key]);
17256
+ if (isString$1(options.named[key])) {
17257
+ options.named[key] = escapeHtml(options.named[key]);
19085
17258
  }
19086
17259
  });
19087
17260
  }
@@ -19119,16 +17292,16 @@ function resolveMessageFormat(context, key, locale2, fallbackLocale, fallbackWar
19119
17292
  let start2 = null;
19120
17293
  let startTag;
19121
17294
  let endTag;
19122
- if (shared$1.inBrowser) {
17295
+ if (inBrowser) {
19123
17296
  start2 = window.performance.now();
19124
17297
  startTag = "intlify-message-resolve-start";
19125
17298
  endTag = "intlify-message-resolve-end";
19126
- shared$1.mark && shared$1.mark(startTag);
17299
+ mark && mark(startTag);
19127
17300
  }
19128
17301
  if ((format2 = resolveValue2(message, key)) === null) {
19129
17302
  format2 = message[key];
19130
17303
  }
19131
- if (shared$1.inBrowser) {
17304
+ if (inBrowser) {
19132
17305
  const end2 = window.performance.now();
19133
17306
  const emitter = context.__v_emitter;
19134
17307
  if (emitter && start2 && format2) {
@@ -19140,12 +17313,12 @@ function resolveMessageFormat(context, key, locale2, fallbackLocale, fallbackWar
19140
17313
  groupId: `${type}:${key}`
19141
17314
  });
19142
17315
  }
19143
- if (startTag && endTag && shared$1.mark && shared$1.measure) {
19144
- shared$1.mark(endTag);
19145
- shared$1.measure("intlify message resolve", startTag, endTag);
17316
+ if (startTag && endTag && mark && measure) {
17317
+ mark(endTag);
17318
+ measure("intlify message resolve", startTag, endTag);
19146
17319
  }
19147
17320
  }
19148
- if (shared$1.isString(format2) || shared$1.isFunction(format2))
17321
+ if (isString$1(format2) || isFunction$1(format2))
19149
17322
  break;
19150
17323
  const missingRet = handleMissing(
19151
17324
  context,
@@ -19162,14 +17335,14 @@ function resolveMessageFormat(context, key, locale2, fallbackLocale, fallbackWar
19162
17335
  return [format2, targetLocale, message];
19163
17336
  }
19164
17337
  function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) {
19165
- const { messageCompiler: messageCompiler2, warnHtmlMessage } = context;
17338
+ const { messageCompiler, warnHtmlMessage } = context;
19166
17339
  if (isMessageFunction(format2)) {
19167
17340
  const msg2 = format2;
19168
17341
  msg2.locale = msg2.locale || targetLocale;
19169
17342
  msg2.key = msg2.key || key;
19170
17343
  return msg2;
19171
17344
  }
19172
- if (messageCompiler2 == null) {
17345
+ if (messageCompiler == null) {
19173
17346
  const msg2 = () => format2;
19174
17347
  msg2.locale = targetLocale;
19175
17348
  msg2.key = key;
@@ -19178,14 +17351,14 @@ function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey,
19178
17351
  let start2 = null;
19179
17352
  let startTag;
19180
17353
  let endTag;
19181
- if (shared$1.inBrowser) {
17354
+ if (inBrowser) {
19182
17355
  start2 = window.performance.now();
19183
17356
  startTag = "intlify-message-compilation-start";
19184
17357
  endTag = "intlify-message-compilation-end";
19185
- shared$1.mark && shared$1.mark(startTag);
17358
+ mark && mark(startTag);
19186
17359
  }
19187
- const msg = messageCompiler2(format2, getCompileOptions(context, targetLocale, cacheBaseKey, format2, warnHtmlMessage, errorDetector));
19188
- if (shared$1.inBrowser) {
17360
+ const msg = messageCompiler(format2, getCompileOptions(context, targetLocale, cacheBaseKey, format2, warnHtmlMessage, errorDetector));
17361
+ if (inBrowser) {
19189
17362
  const end2 = window.performance.now();
19190
17363
  const emitter = context.__v_emitter;
19191
17364
  if (emitter && start2) {
@@ -19196,9 +17369,9 @@ function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey,
19196
17369
  groupId: `${"translate"}:${key}`
19197
17370
  });
19198
17371
  }
19199
- if (startTag && endTag && shared$1.mark && shared$1.measure) {
19200
- shared$1.mark(endTag);
19201
- shared$1.measure("intlify message compilation", startTag, endTag);
17372
+ if (startTag && endTag && mark && measure) {
17373
+ mark(endTag);
17374
+ measure("intlify message compilation", startTag, endTag);
19202
17375
  }
19203
17376
  }
19204
17377
  msg.locale = targetLocale;
@@ -19210,14 +17383,14 @@ function evaluateMessage(context, msg, msgCtx) {
19210
17383
  let start2 = null;
19211
17384
  let startTag;
19212
17385
  let endTag;
19213
- if (shared$1.inBrowser) {
17386
+ if (inBrowser) {
19214
17387
  start2 = window.performance.now();
19215
17388
  startTag = "intlify-message-evaluation-start";
19216
17389
  endTag = "intlify-message-evaluation-end";
19217
- shared$1.mark && shared$1.mark(startTag);
17390
+ mark && mark(startTag);
19218
17391
  }
19219
17392
  const messaged = msg(msgCtx);
19220
- if (shared$1.inBrowser) {
17393
+ if (inBrowser) {
19221
17394
  const end2 = window.performance.now();
19222
17395
  const emitter = context.__v_emitter;
19223
17396
  if (emitter && start2) {
@@ -19228,9 +17401,9 @@ function evaluateMessage(context, msg, msgCtx) {
19228
17401
  groupId: `${"translate"}:${msg.key}`
19229
17402
  });
19230
17403
  }
19231
- if (startTag && endTag && shared$1.mark && shared$1.measure) {
19232
- shared$1.mark(endTag);
19233
- shared$1.measure("intlify message evaluation", startTag, endTag);
17404
+ if (startTag && endTag && mark && measure) {
17405
+ mark(endTag);
17406
+ measure("intlify message evaluation", startTag, endTag);
19234
17407
  }
19235
17408
  }
19236
17409
  return messaged;
@@ -19238,25 +17411,25 @@ function evaluateMessage(context, msg, msgCtx) {
19238
17411
  function parseTranslateArgs(...args) {
19239
17412
  const [arg1, arg2, arg3] = args;
19240
17413
  const options = {};
19241
- if (!shared$1.isString(arg1) && !shared$1.isNumber(arg1) && !isMessageFunction(arg1)) {
17414
+ if (!isString$1(arg1) && !isNumber$1(arg1) && !isMessageFunction(arg1)) {
19242
17415
  throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
19243
17416
  }
19244
- const key = shared$1.isNumber(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1;
19245
- if (shared$1.isNumber(arg2)) {
17417
+ const key = isNumber$1(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1;
17418
+ if (isNumber$1(arg2)) {
19246
17419
  options.plural = arg2;
19247
- } else if (shared$1.isString(arg2)) {
17420
+ } else if (isString$1(arg2)) {
19248
17421
  options.default = arg2;
19249
- } else if (shared$1.isPlainObject(arg2) && !shared$1.isEmptyObject(arg2)) {
17422
+ } else if (isPlainObject(arg2) && !isEmptyObject(arg2)) {
19250
17423
  options.named = arg2;
19251
- } else if (shared$1.isArray(arg2)) {
17424
+ } else if (isArray$2(arg2)) {
19252
17425
  options.list = arg2;
19253
17426
  }
19254
- if (shared$1.isNumber(arg3)) {
17427
+ if (isNumber$1(arg3)) {
19255
17428
  options.plural = arg3;
19256
- } else if (shared$1.isString(arg3)) {
17429
+ } else if (isString$1(arg3)) {
19257
17430
  options.default = arg3;
19258
- } else if (shared$1.isPlainObject(arg3)) {
19259
- shared$1.assign(options, arg3);
17431
+ } else if (isPlainObject(arg3)) {
17432
+ assign(options, arg3);
19260
17433
  }
19261
17434
  return [key, options];
19262
17435
  }
@@ -19267,7 +17440,7 @@ function getCompileOptions(context, locale2, key, source2, warnHtmlMessage, erro
19267
17440
  errorDetector && errorDetector(err);
19268
17441
  {
19269
17442
  const message = `Message compilation error: ${err.message}`;
19270
- const codeFrame = err.location && shared$1.generateCodeFrame(source2, err.location.start.offset, err.location.end.offset);
17443
+ const codeFrame = err.location && generateCodeFrame(source2, err.location.start.offset, err.location.end.offset);
19271
17444
  const emitter = context.__v_emitter;
19272
17445
  if (emitter) {
19273
17446
  emitter.emit("compile-error", {
@@ -19282,7 +17455,7 @@ function getCompileOptions(context, locale2, key, source2, warnHtmlMessage, erro
19282
17455
  ${codeFrame}` : message);
19283
17456
  }
19284
17457
  },
19285
- onCacheKey: (source3) => shared$1.generateFormatCacheKey(locale2, key, source3)
17458
+ onCacheKey: (source3) => generateFormatCacheKey(locale2, key, source3)
19286
17459
  };
19287
17460
  }
19288
17461
  function getMessageContextOptions(context, locale2, message, options) {
@@ -19293,7 +17466,7 @@ function getMessageContextOptions(context, locale2, message, options) {
19293
17466
  const [, , message2] = resolveMessageFormat(fallbackContext, key, locale2, fallbackLocale, fallbackWarn, missingWarn);
19294
17467
  val = resolveValue2(message2, key);
19295
17468
  }
19296
- if (shared$1.isString(val)) {
17469
+ if (isString$1(val)) {
19297
17470
  let occurred = false;
19298
17471
  const errorDetector = () => {
19299
17472
  occurred = true;
@@ -19321,7 +17494,7 @@ function getMessageContextOptions(context, locale2, message, options) {
19321
17494
  if (options.named) {
19322
17495
  ctxOptions.named = options.named;
19323
17496
  }
19324
- if (shared$1.isNumber(options.plural)) {
17497
+ if (isNumber$1(options.plural)) {
19325
17498
  ctxOptions.pluralIndex = options.plural;
19326
17499
  }
19327
17500
  return ctxOptions;
@@ -19339,16 +17512,16 @@ function datetime(context, ...args) {
19339
17512
  return MISSING_RESOLVE_VALUE;
19340
17513
  }
19341
17514
  const [key, value, options, overrides] = parseDateTimeArgs(...args);
19342
- const missingWarn = shared$1.isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
19343
- const fallbackWarn = shared$1.isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
17515
+ const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
17516
+ const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
19344
17517
  const part = !!options.part;
19345
- const locale2 = shared$1.isString(options.locale) ? options.locale : context.locale;
17518
+ const locale2 = isString$1(options.locale) ? options.locale : context.locale;
19346
17519
  const locales = localeFallbacker(
19347
17520
  context,
19348
17521
  fallbackLocale,
19349
17522
  locale2
19350
17523
  );
19351
- if (!shared$1.isString(key) || key === "") {
17524
+ if (!isString$1(key) || key === "") {
19352
17525
  return new Intl.DateTimeFormat(locale2, overrides).format(value);
19353
17526
  }
19354
17527
  let datetimeFormat = {};
@@ -19379,21 +17552,21 @@ function datetime(context, ...args) {
19379
17552
  }
19380
17553
  datetimeFormat = datetimeFormats[targetLocale] || {};
19381
17554
  format2 = datetimeFormat[key];
19382
- if (shared$1.isPlainObject(format2))
17555
+ if (isPlainObject(format2))
19383
17556
  break;
19384
17557
  handleMissing(context, key, targetLocale, missingWarn, type);
19385
17558
  from = to;
19386
17559
  }
19387
- if (!shared$1.isPlainObject(format2) || !shared$1.isString(targetLocale)) {
17560
+ if (!isPlainObject(format2) || !isString$1(targetLocale)) {
19388
17561
  return unresolving ? NOT_REOSLVED : key;
19389
17562
  }
19390
17563
  let id = `${targetLocale}__${key}`;
19391
- if (!shared$1.isEmptyObject(overrides)) {
17564
+ if (!isEmptyObject(overrides)) {
19392
17565
  id = `${id}__${JSON.stringify(overrides)}`;
19393
17566
  }
19394
17567
  let formatter = __datetimeFormatters.get(id);
19395
17568
  if (!formatter) {
19396
- formatter = new Intl.DateTimeFormat(targetLocale, shared$1.assign({}, format2, overrides));
17569
+ formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format2, overrides));
19397
17570
  __datetimeFormatters.set(id, formatter);
19398
17571
  }
19399
17572
  return !part ? formatter.format(value) : formatter.formatToParts(value);
@@ -19425,7 +17598,7 @@ function parseDateTimeArgs(...args) {
19425
17598
  const options = {};
19426
17599
  let overrides = {};
19427
17600
  let value;
19428
- if (shared$1.isString(arg1)) {
17601
+ if (isString$1(arg1)) {
19429
17602
  const matches2 = arg1.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
19430
17603
  if (!matches2) {
19431
17604
  throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
@@ -19437,19 +17610,19 @@ function parseDateTimeArgs(...args) {
19437
17610
  } catch (e3) {
19438
17611
  throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
19439
17612
  }
19440
- } else if (shared$1.isDate(arg1)) {
17613
+ } else if (isDate(arg1)) {
19441
17614
  if (isNaN(arg1.getTime())) {
19442
17615
  throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);
19443
17616
  }
19444
17617
  value = arg1;
19445
- } else if (shared$1.isNumber(arg1)) {
17618
+ } else if (isNumber$1(arg1)) {
19446
17619
  value = arg1;
19447
17620
  } else {
19448
17621
  throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
19449
17622
  }
19450
- if (shared$1.isString(arg2)) {
17623
+ if (isString$1(arg2)) {
19451
17624
  options.key = arg2;
19452
- } else if (shared$1.isPlainObject(arg2)) {
17625
+ } else if (isPlainObject(arg2)) {
19453
17626
  Object.keys(arg2).forEach((key) => {
19454
17627
  if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {
19455
17628
  overrides[key] = arg2[key];
@@ -19458,12 +17631,12 @@ function parseDateTimeArgs(...args) {
19458
17631
  }
19459
17632
  });
19460
17633
  }
19461
- if (shared$1.isString(arg3)) {
17634
+ if (isString$1(arg3)) {
19462
17635
  options.locale = arg3;
19463
- } else if (shared$1.isPlainObject(arg3)) {
17636
+ } else if (isPlainObject(arg3)) {
19464
17637
  overrides = arg3;
19465
17638
  }
19466
- if (shared$1.isPlainObject(arg4)) {
17639
+ if (isPlainObject(arg4)) {
19467
17640
  overrides = arg4;
19468
17641
  }
19469
17642
  return [options.key || "", value, options, overrides];
@@ -19486,16 +17659,16 @@ function number$1(context, ...args) {
19486
17659
  return MISSING_RESOLVE_VALUE;
19487
17660
  }
19488
17661
  const [key, value, options, overrides] = parseNumberArgs(...args);
19489
- const missingWarn = shared$1.isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
19490
- const fallbackWarn = shared$1.isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
17662
+ const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
17663
+ const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
19491
17664
  const part = !!options.part;
19492
- const locale2 = shared$1.isString(options.locale) ? options.locale : context.locale;
17665
+ const locale2 = isString$1(options.locale) ? options.locale : context.locale;
19493
17666
  const locales = localeFallbacker(
19494
17667
  context,
19495
17668
  fallbackLocale,
19496
17669
  locale2
19497
17670
  );
19498
- if (!shared$1.isString(key) || key === "") {
17671
+ if (!isString$1(key) || key === "") {
19499
17672
  return new Intl.NumberFormat(locale2, overrides).format(value);
19500
17673
  }
19501
17674
  let numberFormat = {};
@@ -19526,21 +17699,21 @@ function number$1(context, ...args) {
19526
17699
  }
19527
17700
  numberFormat = numberFormats[targetLocale] || {};
19528
17701
  format2 = numberFormat[key];
19529
- if (shared$1.isPlainObject(format2))
17702
+ if (isPlainObject(format2))
19530
17703
  break;
19531
17704
  handleMissing(context, key, targetLocale, missingWarn, type);
19532
17705
  from = to;
19533
17706
  }
19534
- if (!shared$1.isPlainObject(format2) || !shared$1.isString(targetLocale)) {
17707
+ if (!isPlainObject(format2) || !isString$1(targetLocale)) {
19535
17708
  return unresolving ? NOT_REOSLVED : key;
19536
17709
  }
19537
17710
  let id = `${targetLocale}__${key}`;
19538
- if (!shared$1.isEmptyObject(overrides)) {
17711
+ if (!isEmptyObject(overrides)) {
19539
17712
  id = `${id}__${JSON.stringify(overrides)}`;
19540
17713
  }
19541
17714
  let formatter = __numberFormatters.get(id);
19542
17715
  if (!formatter) {
19543
- formatter = new Intl.NumberFormat(targetLocale, shared$1.assign({}, format2, overrides));
17716
+ formatter = new Intl.NumberFormat(targetLocale, assign({}, format2, overrides));
19544
17717
  __numberFormatters.set(id, formatter);
19545
17718
  }
19546
17719
  return !part ? formatter.format(value) : formatter.formatToParts(value);
@@ -19571,13 +17744,13 @@ function parseNumberArgs(...args) {
19571
17744
  const [arg1, arg2, arg3, arg4] = args;
19572
17745
  const options = {};
19573
17746
  let overrides = {};
19574
- if (!shared$1.isNumber(arg1)) {
17747
+ if (!isNumber$1(arg1)) {
19575
17748
  throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
19576
17749
  }
19577
17750
  const value = arg1;
19578
- if (shared$1.isString(arg2)) {
17751
+ if (isString$1(arg2)) {
19579
17752
  options.key = arg2;
19580
- } else if (shared$1.isPlainObject(arg2)) {
17753
+ } else if (isPlainObject(arg2)) {
19581
17754
  Object.keys(arg2).forEach((key) => {
19582
17755
  if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {
19583
17756
  overrides[key] = arg2[key];
@@ -19586,12 +17759,12 @@ function parseNumberArgs(...args) {
19586
17759
  }
19587
17760
  });
19588
17761
  }
19589
- if (shared$1.isString(arg3)) {
17762
+ if (isString$1(arg3)) {
19590
17763
  options.locale = arg3;
19591
- } else if (shared$1.isPlainObject(arg3)) {
17764
+ } else if (isPlainObject(arg3)) {
19592
17765
  overrides = arg3;
19593
17766
  }
19594
- if (shared$1.isPlainObject(arg4)) {
17767
+ if (isPlainObject(arg4)) {
19595
17768
  overrides = arg4;
19596
17769
  }
19597
17770
  return [options.key || "", value, options, overrides];
@@ -19606,66 +17779,51 @@ function clearNumberFormat(ctx, locale2, format2) {
19606
17779
  context.__numberFormatters.delete(id);
19607
17780
  }
19608
17781
  }
19609
- coreBase_cjs.CompileErrorCodes = messageCompiler.CompileErrorCodes;
19610
- coreBase_cjs.createCompileError = messageCompiler.createCompileError;
19611
- coreBase_cjs.CoreErrorCodes = CoreErrorCodes;
19612
- coreBase_cjs.CoreWarnCodes = CoreWarnCodes;
19613
- coreBase_cjs.DATETIME_FORMAT_OPTIONS_KEYS = DATETIME_FORMAT_OPTIONS_KEYS;
19614
- coreBase_cjs.DEFAULT_LOCALE = DEFAULT_LOCALE$1;
19615
- coreBase_cjs.DEFAULT_MESSAGE_DATA_TYPE = DEFAULT_MESSAGE_DATA_TYPE;
19616
- coreBase_cjs.MISSING_RESOLVE_VALUE = MISSING_RESOLVE_VALUE;
19617
- coreBase_cjs.NOT_REOSLVED = NOT_REOSLVED;
19618
- coreBase_cjs.NUMBER_FORMAT_OPTIONS_KEYS = NUMBER_FORMAT_OPTIONS_KEYS;
19619
- coreBase_cjs.VERSION = VERSION$1;
19620
- coreBase_cjs.clearCompileCache = clearCompileCache;
19621
- coreBase_cjs.clearDateTimeFormat = clearDateTimeFormat;
19622
- coreBase_cjs.clearNumberFormat = clearNumberFormat;
19623
- coreBase_cjs.compileToFunction = compileToFunction;
19624
- coreBase_cjs.createCoreContext = createCoreContext;
19625
- coreBase_cjs.createCoreError = createCoreError;
19626
- coreBase_cjs.createMessageContext = createMessageContext;
19627
- coreBase_cjs.datetime = datetime;
19628
- coreBase_cjs.fallbackWithLocaleChain = fallbackWithLocaleChain;
19629
- coreBase_cjs.fallbackWithSimple = fallbackWithSimple;
19630
- coreBase_cjs.getAdditionalMeta = getAdditionalMeta;
19631
- coreBase_cjs.getDevToolsHook = getDevToolsHook;
19632
- coreBase_cjs.getFallbackContext = getFallbackContext;
19633
- coreBase_cjs.getWarnMessage = getWarnMessage$1;
19634
- coreBase_cjs.handleMissing = handleMissing;
19635
- coreBase_cjs.initI18nDevTools = initI18nDevTools;
19636
- coreBase_cjs.isMessageFunction = isMessageFunction;
19637
- coreBase_cjs.isTranslateFallbackWarn = isTranslateFallbackWarn;
19638
- coreBase_cjs.isTranslateMissingWarn = isTranslateMissingWarn;
19639
- coreBase_cjs.number = number$1;
19640
- coreBase_cjs.parse = parse$1;
19641
- coreBase_cjs.parseDateTimeArgs = parseDateTimeArgs;
19642
- coreBase_cjs.parseNumberArgs = parseNumberArgs;
19643
- coreBase_cjs.parseTranslateArgs = parseTranslateArgs;
19644
- coreBase_cjs.registerLocaleFallbacker = registerLocaleFallbacker;
19645
- coreBase_cjs.registerMessageCompiler = registerMessageCompiler;
19646
- coreBase_cjs.registerMessageResolver = registerMessageResolver;
19647
- coreBase_cjs.resolveValue = resolveValue;
19648
- coreBase_cjs.resolveWithKeyValue = resolveWithKeyValue;
19649
- coreBase_cjs.setAdditionalMeta = setAdditionalMeta;
19650
- coreBase_cjs.setDevToolsHook = setDevToolsHook;
19651
- coreBase_cjs.setFallbackContext = setFallbackContext;
19652
- coreBase_cjs.translate = translate$1;
19653
- coreBase_cjs.translateDevTools = translateDevTools;
19654
- coreBase_cjs.updateFallbackLocale = updateFallbackLocale;
19655
17782
  {
19656
- coreBase$1.exports = coreBase_cjs;
17783
+ if (typeof __INTLIFY_PROD_DEVTOOLS__ !== "boolean") {
17784
+ getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;
17785
+ }
19657
17786
  }
17787
+ /*!
17788
+ * vue-devtools v9.2.2
17789
+ * (c) 2022 kazuya kawaguchi
17790
+ * Released under the MIT License.
17791
+ */
17792
+ const VueDevToolsLabels = {
17793
+ ["vue-devtools-plugin-vue-i18n"]: "Vue I18n devtools",
17794
+ ["vue-i18n-resource-inspector"]: "I18n Resources",
17795
+ ["vue-i18n-timeline"]: "Vue I18n"
17796
+ };
17797
+ const VueDevToolsPlaceholders = {
17798
+ ["vue-i18n-resource-inspector"]: "Search for scopes ..."
17799
+ };
17800
+ const VueDevToolsTimelineColors = {
17801
+ ["vue-i18n-timeline"]: 16764185
17802
+ };
19658
17803
  /*!
19659
17804
  * vue-i18n v9.2.2
19660
17805
  * (c) 2022 kazuya kawaguchi
19661
17806
  * Released under the MIT License.
19662
17807
  */
19663
- Object.defineProperty(vueI18n_cjs, "__esModule", { value: true });
19664
- var shared = shared$3.exports;
19665
- var coreBase = coreBase$1.exports;
19666
- var vue = require$$0;
19667
17808
  const VERSION = "9.2.2";
19668
- let code$1 = coreBase.CoreWarnCodes.__EXTEND_POINT__;
17809
+ function initFeatureFlags() {
17810
+ let needWarn = false;
17811
+ if (typeof __VUE_I18N_FULL_INSTALL__ !== "boolean") {
17812
+ needWarn = true;
17813
+ getGlobalThis().__VUE_I18N_FULL_INSTALL__ = true;
17814
+ }
17815
+ if (typeof __VUE_I18N_LEGACY_API__ !== "boolean") {
17816
+ needWarn = true;
17817
+ getGlobalThis().__VUE_I18N_LEGACY_API__ = true;
17818
+ }
17819
+ if (typeof __INTLIFY_PROD_DEVTOOLS__ !== "boolean") {
17820
+ getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;
17821
+ }
17822
+ if (needWarn) {
17823
+ console.warn(`You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.`);
17824
+ }
17825
+ }
17826
+ let code$1 = CoreWarnCodes.__EXTEND_POINT__;
19669
17827
  const inc$1 = () => ++code$1;
19670
17828
  const I18nWarnCodes = {
19671
17829
  FALLBACK_TO_ROOT: code$1,
@@ -19686,9 +17844,9 @@ const warnMessages = {
19686
17844
  [I18nWarnCodes.NOT_FOUND_PARENT_SCOPE]: `Not found parent scope. use the global scope.`
19687
17845
  };
19688
17846
  function getWarnMessage(code2, ...args) {
19689
- return shared.format(warnMessages[code2], ...args);
17847
+ return format$2(warnMessages[code2], ...args);
19690
17848
  }
19691
- let code = coreBase.CompileErrorCodes.__EXTEND_POINT__;
17849
+ let code = CompileErrorCodes.__EXTEND_POINT__;
19692
17850
  const inc = () => ++code;
19693
17851
  const I18nErrorCodes = {
19694
17852
  UNEXPECTED_RETURN_TYPE: code,
@@ -19708,7 +17866,7 @@ const I18nErrorCodes = {
19708
17866
  __EXTEND_POINT__: inc()
19709
17867
  };
19710
17868
  function createI18nError(code2, ...args) {
19711
- return coreBase.createCompileError(code2, null, { messages: errorMessages, args });
17869
+ return createCompileError(code2, null, { messages: errorMessages, args });
19712
17870
  }
19713
17871
  const errorMessages = {
19714
17872
  [I18nErrorCodes.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
@@ -19726,25 +17884,24 @@ const errorMessages = {
19726
17884
  [I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]: "Must define \u2018i18n\u2019 option or custom block in Composition API with using local scope in Legacy API mode",
19727
17885
  [I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
19728
17886
  };
19729
- const TransrateVNodeSymbol = /* @__PURE__ */ shared.makeSymbol("__transrateVNode");
19730
- const DatetimePartsSymbol = /* @__PURE__ */ shared.makeSymbol("__datetimeParts");
19731
- const NumberPartsSymbol = /* @__PURE__ */ shared.makeSymbol("__numberParts");
19732
- const EnableEmitter = /* @__PURE__ */ shared.makeSymbol("__enableEmitter");
19733
- const DisableEmitter = /* @__PURE__ */ shared.makeSymbol("__disableEmitter");
19734
- const SetPluralRulesSymbol = shared.makeSymbol("__setPluralRules");
19735
- shared.makeSymbol("__intlifyMeta");
19736
- const InejctWithOption = /* @__PURE__ */ shared.makeSymbol("__injectWithOption");
19737
- const __VUE_I18N_BRIDGE__ = "__VUE_I18N_BRIDGE__";
17887
+ const TransrateVNodeSymbol = /* @__PURE__ */ makeSymbol("__transrateVNode");
17888
+ const DatetimePartsSymbol = /* @__PURE__ */ makeSymbol("__datetimeParts");
17889
+ const NumberPartsSymbol = /* @__PURE__ */ makeSymbol("__numberParts");
17890
+ const EnableEmitter = /* @__PURE__ */ makeSymbol("__enableEmitter");
17891
+ const DisableEmitter = /* @__PURE__ */ makeSymbol("__disableEmitter");
17892
+ const SetPluralRulesSymbol = makeSymbol("__setPluralRules");
17893
+ makeSymbol("__intlifyMeta");
17894
+ const InejctWithOption = /* @__PURE__ */ makeSymbol("__injectWithOption");
19738
17895
  function handleFlatJson(obj) {
19739
- if (!shared.isObject(obj)) {
17896
+ if (!isObject$4(obj)) {
19740
17897
  return obj;
19741
17898
  }
19742
17899
  for (const key in obj) {
19743
- if (!shared.hasOwn(obj, key)) {
17900
+ if (!hasOwn$1(obj, key)) {
19744
17901
  continue;
19745
17902
  }
19746
17903
  if (!key.includes(".")) {
19747
- if (shared.isObject(obj[key])) {
17904
+ if (isObject$4(obj[key])) {
19748
17905
  handleFlatJson(obj[key]);
19749
17906
  }
19750
17907
  } else {
@@ -19759,7 +17916,7 @@ function handleFlatJson(obj) {
19759
17916
  }
19760
17917
  currentObj[subKeys[lastIndex]] = obj[key];
19761
17918
  delete obj[key];
19762
- if (shared.isObject(currentObj[subKeys[lastIndex]])) {
17919
+ if (isObject$4(currentObj[subKeys[lastIndex]])) {
19763
17920
  handleFlatJson(currentObj[subKeys[lastIndex]]);
19764
17921
  }
19765
17922
  }
@@ -19768,8 +17925,8 @@ function handleFlatJson(obj) {
19768
17925
  }
19769
17926
  function getLocaleMessages(locale2, options) {
19770
17927
  const { messages, __i18n, messageResolver, flatJson } = options;
19771
- const ret = shared.isPlainObject(messages) ? messages : shared.isArray(__i18n) ? {} : { [locale2]: {} };
19772
- if (shared.isArray(__i18n)) {
17928
+ const ret = isPlainObject(messages) ? messages : isArray$2(__i18n) ? {} : { [locale2]: {} };
17929
+ if (isArray$2(__i18n)) {
19773
17930
  __i18n.forEach((custom) => {
19774
17931
  if ("locale" in custom && "resource" in custom) {
19775
17932
  const { locale: locale3, resource } = custom;
@@ -19780,26 +17937,26 @@ function getLocaleMessages(locale2, options) {
19780
17937
  deepCopy(resource, ret);
19781
17938
  }
19782
17939
  } else {
19783
- shared.isString(custom) && deepCopy(JSON.parse(custom), ret);
17940
+ isString$1(custom) && deepCopy(JSON.parse(custom), ret);
19784
17941
  }
19785
17942
  });
19786
17943
  }
19787
17944
  if (messageResolver == null && flatJson) {
19788
17945
  for (const key in ret) {
19789
- if (shared.hasOwn(ret, key)) {
17946
+ if (hasOwn$1(ret, key)) {
19790
17947
  handleFlatJson(ret[key]);
19791
17948
  }
19792
17949
  }
19793
17950
  }
19794
17951
  return ret;
19795
17952
  }
19796
- const isNotObjectOrIsArray = (val) => !shared.isObject(val) || shared.isArray(val);
17953
+ const isNotObjectOrIsArray = (val) => !isObject$4(val) || isArray$2(val);
19797
17954
  function deepCopy(src, des) {
19798
17955
  if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
19799
17956
  throw createI18nError(I18nErrorCodes.INVALID_VALUE);
19800
17957
  }
19801
17958
  for (const key in src) {
19802
- if (shared.hasOwn(src, key)) {
17959
+ if (hasOwn$1(src, key)) {
19803
17960
  if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {
19804
17961
  des[key] = src[key];
19805
17962
  } else {
@@ -19812,7 +17969,7 @@ function getComponentOptions(instance) {
19812
17969
  return instance.type;
19813
17970
  }
19814
17971
  function adjustI18nResources(global2, options, componentOptions) {
19815
- let messages = shared.isObject(options.messages) ? options.messages : {};
17972
+ let messages = isObject$4(options.messages) ? options.messages : {};
19816
17973
  if ("__i18nGlobal" in componentOptions) {
19817
17974
  messages = getLocaleMessages(global2.locale.value, {
19818
17975
  messages,
@@ -19826,7 +17983,7 @@ function adjustI18nResources(global2, options, componentOptions) {
19826
17983
  });
19827
17984
  }
19828
17985
  {
19829
- if (shared.isObject(options.datetimeFormats)) {
17986
+ if (isObject$4(options.datetimeFormats)) {
19830
17987
  const locales2 = Object.keys(options.datetimeFormats);
19831
17988
  if (locales2.length) {
19832
17989
  locales2.forEach((locale2) => {
@@ -19834,7 +17991,7 @@ function adjustI18nResources(global2, options, componentOptions) {
19834
17991
  });
19835
17992
  }
19836
17993
  }
19837
- if (shared.isObject(options.numberFormats)) {
17994
+ if (isObject$4(options.numberFormats)) {
19838
17995
  const locales2 = Object.keys(options.numberFormats);
19839
17996
  if (locales2.length) {
19840
17997
  locales2.forEach((locale2) => {
@@ -19845,47 +18002,47 @@ function adjustI18nResources(global2, options, componentOptions) {
19845
18002
  }
19846
18003
  }
19847
18004
  function createTextNode$1(key) {
19848
- return vue.createVNode(vue.Text, null, key, 0);
18005
+ return createVNode$1(Text, null, key, 0);
19849
18006
  }
19850
18007
  const DEVTOOLS_META = "__INTLIFY_META__";
19851
18008
  let composerID = 0;
19852
18009
  function defineCoreMissingHandler(missing) {
19853
18010
  return (ctx, locale2, key, type) => {
19854
- return missing(locale2, key, vue.getCurrentInstance() || void 0, type);
18011
+ return missing(locale2, key, getCurrentInstance() || void 0, type);
19855
18012
  };
19856
18013
  }
19857
18014
  const getMetaInfo = () => {
19858
- const instance = vue.getCurrentInstance();
18015
+ const instance = getCurrentInstance();
19859
18016
  let meta = null;
19860
18017
  return instance && (meta = getComponentOptions(instance)[DEVTOOLS_META]) ? { [DEVTOOLS_META]: meta } : null;
19861
18018
  };
19862
18019
  function createComposer(options = {}, VueI18nLegacy) {
19863
18020
  const { __root } = options;
19864
18021
  const _isGlobal = __root === void 0;
19865
- let _inheritLocale = shared.isBoolean(options.inheritLocale) ? options.inheritLocale : true;
19866
- const _locale = vue.ref(
19867
- __root && _inheritLocale ? __root.locale.value : shared.isString(options.locale) ? options.locale : coreBase.DEFAULT_LOCALE
18022
+ let _inheritLocale = isBoolean(options.inheritLocale) ? options.inheritLocale : true;
18023
+ const _locale = ref(
18024
+ __root && _inheritLocale ? __root.locale.value : isString$1(options.locale) ? options.locale : DEFAULT_LOCALE$1
19868
18025
  );
19869
- const _fallbackLocale = vue.ref(
19870
- __root && _inheritLocale ? __root.fallbackLocale.value : shared.isString(options.fallbackLocale) || shared.isArray(options.fallbackLocale) || shared.isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value
18026
+ const _fallbackLocale = ref(
18027
+ __root && _inheritLocale ? __root.fallbackLocale.value : isString$1(options.fallbackLocale) || isArray$2(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value
19871
18028
  );
19872
- const _messages = vue.ref(getLocaleMessages(_locale.value, options));
19873
- const _datetimeFormats = vue.ref(shared.isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} });
19874
- const _numberFormats = vue.ref(shared.isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} });
19875
- let _missingWarn = __root ? __root.missingWarn : shared.isBoolean(options.missingWarn) || shared.isRegExp(options.missingWarn) ? options.missingWarn : true;
19876
- let _fallbackWarn = __root ? __root.fallbackWarn : shared.isBoolean(options.fallbackWarn) || shared.isRegExp(options.fallbackWarn) ? options.fallbackWarn : true;
19877
- let _fallbackRoot = __root ? __root.fallbackRoot : shared.isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
18029
+ const _messages = ref(getLocaleMessages(_locale.value, options));
18030
+ const _datetimeFormats = ref(isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} });
18031
+ const _numberFormats = ref(isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} });
18032
+ let _missingWarn = __root ? __root.missingWarn : isBoolean(options.missingWarn) || isRegExp$1(options.missingWarn) ? options.missingWarn : true;
18033
+ let _fallbackWarn = __root ? __root.fallbackWarn : isBoolean(options.fallbackWarn) || isRegExp$1(options.fallbackWarn) ? options.fallbackWarn : true;
18034
+ let _fallbackRoot = __root ? __root.fallbackRoot : isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
19878
18035
  let _fallbackFormat = !!options.fallbackFormat;
19879
- let _missing = shared.isFunction(options.missing) ? options.missing : null;
19880
- let _runtimeMissing = shared.isFunction(options.missing) ? defineCoreMissingHandler(options.missing) : null;
19881
- let _postTranslation = shared.isFunction(options.postTranslation) ? options.postTranslation : null;
19882
- let _warnHtmlMessage = __root ? __root.warnHtmlMessage : shared.isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
18036
+ let _missing = isFunction$1(options.missing) ? options.missing : null;
18037
+ let _runtimeMissing = isFunction$1(options.missing) ? defineCoreMissingHandler(options.missing) : null;
18038
+ let _postTranslation = isFunction$1(options.postTranslation) ? options.postTranslation : null;
18039
+ let _warnHtmlMessage = __root ? __root.warnHtmlMessage : isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
19883
18040
  let _escapeParameter = !!options.escapeParameter;
19884
- const _modifiers = __root ? __root.modifiers : shared.isPlainObject(options.modifiers) ? options.modifiers : {};
18041
+ const _modifiers = __root ? __root.modifiers : isPlainObject(options.modifiers) ? options.modifiers : {};
19885
18042
  let _pluralRules = options.pluralRules || __root && __root.pluralRules;
19886
18043
  let _context;
19887
18044
  const getCoreContext = () => {
19888
- _isGlobal && coreBase.setFallbackContext(null);
18045
+ _isGlobal && setFallbackContext(null);
19889
18046
  const ctxOptions = {
19890
18047
  version: VERSION,
19891
18048
  locale: _locale.value,
@@ -19907,18 +18064,18 @@ function createComposer(options = {}, VueI18nLegacy) {
19907
18064
  {
19908
18065
  ctxOptions.datetimeFormats = _datetimeFormats.value;
19909
18066
  ctxOptions.numberFormats = _numberFormats.value;
19910
- ctxOptions.__datetimeFormatters = shared.isPlainObject(_context) ? _context.__datetimeFormatters : void 0;
19911
- ctxOptions.__numberFormatters = shared.isPlainObject(_context) ? _context.__numberFormatters : void 0;
18067
+ ctxOptions.__datetimeFormatters = isPlainObject(_context) ? _context.__datetimeFormatters : void 0;
18068
+ ctxOptions.__numberFormatters = isPlainObject(_context) ? _context.__numberFormatters : void 0;
19912
18069
  }
19913
18070
  {
19914
- ctxOptions.__v_emitter = shared.isPlainObject(_context) ? _context.__v_emitter : void 0;
18071
+ ctxOptions.__v_emitter = isPlainObject(_context) ? _context.__v_emitter : void 0;
19915
18072
  }
19916
- const ctx = coreBase.createCoreContext(ctxOptions);
19917
- _isGlobal && coreBase.setFallbackContext(ctx);
18073
+ const ctx = createCoreContext(ctxOptions);
18074
+ _isGlobal && setFallbackContext(ctx);
19918
18075
  return ctx;
19919
18076
  };
19920
18077
  _context = getCoreContext();
19921
- coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
18078
+ updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
19922
18079
  function trackReactivityValues() {
19923
18080
  return [
19924
18081
  _locale.value,
@@ -19928,26 +18085,26 @@ function createComposer(options = {}, VueI18nLegacy) {
19928
18085
  _numberFormats.value
19929
18086
  ];
19930
18087
  }
19931
- const locale2 = vue.computed({
18088
+ const locale2 = computed({
19932
18089
  get: () => _locale.value,
19933
18090
  set: (val) => {
19934
18091
  _locale.value = val;
19935
18092
  _context.locale = _locale.value;
19936
18093
  }
19937
18094
  });
19938
- const fallbackLocale = vue.computed({
18095
+ const fallbackLocale = computed({
19939
18096
  get: () => _fallbackLocale.value,
19940
18097
  set: (val) => {
19941
18098
  _fallbackLocale.value = val;
19942
18099
  _context.fallbackLocale = _fallbackLocale.value;
19943
- coreBase.updateFallbackLocale(_context, _locale.value, val);
18100
+ updateFallbackLocale(_context, _locale.value, val);
19944
18101
  }
19945
18102
  });
19946
- const messages = vue.computed(() => _messages.value);
19947
- const datetimeFormats = /* @__PURE__ */ vue.computed(() => _datetimeFormats.value);
19948
- const numberFormats = /* @__PURE__ */ vue.computed(() => _numberFormats.value);
18103
+ const messages = computed(() => _messages.value);
18104
+ const datetimeFormats = /* @__PURE__ */ computed(() => _datetimeFormats.value);
18105
+ const numberFormats = /* @__PURE__ */ computed(() => _numberFormats.value);
19949
18106
  function getPostTranslationHandler() {
19950
- return shared.isFunction(_postTranslation) ? _postTranslation : null;
18107
+ return isFunction$1(_postTranslation) ? _postTranslation : null;
19951
18108
  }
19952
18109
  function setPostTranslationHandler(handler) {
19953
18110
  _postTranslation = handler;
@@ -19971,23 +18128,23 @@ function createComposer(options = {}, VueI18nLegacy) {
19971
18128
  let ret;
19972
18129
  {
19973
18130
  try {
19974
- coreBase.setAdditionalMeta(getMetaInfo());
18131
+ setAdditionalMeta(getMetaInfo());
19975
18132
  if (!_isGlobal) {
19976
- _context.fallbackContext = __root ? coreBase.getFallbackContext() : void 0;
18133
+ _context.fallbackContext = __root ? getFallbackContext() : void 0;
19977
18134
  }
19978
18135
  ret = fn(_context);
19979
18136
  } finally {
19980
- coreBase.setAdditionalMeta(null);
18137
+ setAdditionalMeta(null);
19981
18138
  if (!_isGlobal) {
19982
18139
  _context.fallbackContext = void 0;
19983
18140
  }
19984
18141
  }
19985
18142
  }
19986
- if (shared.isNumber(ret) && ret === coreBase.NOT_REOSLVED) {
18143
+ if (isNumber$1(ret) && ret === NOT_REOSLVED) {
19987
18144
  const [key, arg2] = argumentParser();
19988
- if (__root && shared.isString(key) && isResolvedTranslateMessage(warnType, arg2)) {
19989
- if (_fallbackRoot && (coreBase.isTranslateFallbackWarn(_fallbackWarn, key) || coreBase.isTranslateMissingWarn(_missingWarn, key))) {
19990
- shared.warn(getWarnMessage(I18nWarnCodes.FALLBACK_TO_ROOT, {
18145
+ if (__root && isString$1(key) && isResolvedTranslateMessage(warnType, arg2)) {
18146
+ if (_fallbackRoot && (isTranslateFallbackWarn(_fallbackWarn, key) || isTranslateMissingWarn(_missingWarn, key))) {
18147
+ warn$1(getWarnMessage(I18nWarnCodes.FALLBACK_TO_ROOT, {
19991
18148
  key,
19992
18149
  type: warnType
19993
18150
  }));
@@ -20012,23 +18169,23 @@ function createComposer(options = {}, VueI18nLegacy) {
20012
18169
  }
20013
18170
  };
20014
18171
  function t3(...args) {
20015
- return wrapWithDeps((context) => Reflect.apply(coreBase.translate, null, [context, ...args]), () => coreBase.parseTranslateArgs(...args), "translate", (root) => Reflect.apply(root.t, root, [...args]), (key) => key, (val) => shared.isString(val));
18172
+ return wrapWithDeps((context) => Reflect.apply(translate$1, null, [context, ...args]), () => parseTranslateArgs(...args), "translate", (root) => Reflect.apply(root.t, root, [...args]), (key) => key, (val) => isString$1(val));
20016
18173
  }
20017
18174
  function rt2(...args) {
20018
18175
  const [arg1, arg2, arg3] = args;
20019
- if (arg3 && !shared.isObject(arg3)) {
18176
+ if (arg3 && !isObject$4(arg3)) {
20020
18177
  throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);
20021
18178
  }
20022
- return t3(...[arg1, arg2, shared.assign({ resolvedMessage: true }, arg3 || {})]);
18179
+ return t3(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]);
20023
18180
  }
20024
18181
  function d3(...args) {
20025
- return wrapWithDeps((context) => Reflect.apply(coreBase.datetime, null, [context, ...args]), () => coreBase.parseDateTimeArgs(...args), "datetime format", (root) => Reflect.apply(root.d, root, [...args]), () => coreBase.MISSING_RESOLVE_VALUE, (val) => shared.isString(val));
18182
+ 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$1(val));
20026
18183
  }
20027
18184
  function n2(...args) {
20028
- return wrapWithDeps((context) => Reflect.apply(coreBase.number, null, [context, ...args]), () => coreBase.parseNumberArgs(...args), "number format", (root) => Reflect.apply(root.n, root, [...args]), () => coreBase.MISSING_RESOLVE_VALUE, (val) => shared.isString(val));
18185
+ return wrapWithDeps((context) => Reflect.apply(number$1, null, [context, ...args]), () => parseNumberArgs(...args), "number format", (root) => Reflect.apply(root.n, root, [...args]), () => MISSING_RESOLVE_VALUE, (val) => isString$1(val));
20029
18186
  }
20030
18187
  function normalize2(values) {
20031
- return values.map((val) => shared.isString(val) || shared.isNumber(val) || shared.isBoolean(val) ? createTextNode$1(String(val)) : val);
18188
+ return values.map((val) => isString$1(val) || isNumber$1(val) || isBoolean(val) ? createTextNode$1(String(val)) : val);
20032
18189
  }
20033
18190
  const interpolate = (val) => val;
20034
18191
  const processor = {
@@ -20043,37 +18200,37 @@ function createComposer(options = {}, VueI18nLegacy) {
20043
18200
  const _context2 = context;
20044
18201
  try {
20045
18202
  _context2.processor = processor;
20046
- ret = Reflect.apply(coreBase.translate, null, [_context2, ...args]);
18203
+ ret = Reflect.apply(translate$1, null, [_context2, ...args]);
20047
18204
  } finally {
20048
18205
  _context2.processor = null;
20049
18206
  }
20050
18207
  return ret;
20051
18208
  },
20052
- () => coreBase.parseTranslateArgs(...args),
18209
+ () => parseTranslateArgs(...args),
20053
18210
  "translate",
20054
18211
  (root) => root[TransrateVNodeSymbol](...args),
20055
18212
  (key) => [createTextNode$1(key)],
20056
- (val) => shared.isArray(val)
18213
+ (val) => isArray$2(val)
20057
18214
  );
20058
18215
  }
20059
18216
  function numberParts(...args) {
20060
18217
  return wrapWithDeps(
20061
- (context) => Reflect.apply(coreBase.number, null, [context, ...args]),
20062
- () => coreBase.parseNumberArgs(...args),
18218
+ (context) => Reflect.apply(number$1, null, [context, ...args]),
18219
+ () => parseNumberArgs(...args),
20063
18220
  "number format",
20064
18221
  (root) => root[NumberPartsSymbol](...args),
20065
18222
  () => [],
20066
- (val) => shared.isString(val) || shared.isArray(val)
18223
+ (val) => isString$1(val) || isArray$2(val)
20067
18224
  );
20068
18225
  }
20069
18226
  function datetimeParts(...args) {
20070
18227
  return wrapWithDeps(
20071
- (context) => Reflect.apply(coreBase.datetime, null, [context, ...args]),
20072
- () => coreBase.parseDateTimeArgs(...args),
18228
+ (context) => Reflect.apply(datetime, null, [context, ...args]),
18229
+ () => parseDateTimeArgs(...args),
20073
18230
  "datetime format",
20074
18231
  (root) => root[DatetimePartsSymbol](...args),
20075
18232
  () => [],
20076
- (val) => shared.isString(val) || shared.isArray(val)
18233
+ (val) => isString$1(val) || isArray$2(val)
20077
18234
  );
20078
18235
  }
20079
18236
  function setPluralRules(rules) {
@@ -20081,13 +18238,13 @@ function createComposer(options = {}, VueI18nLegacy) {
20081
18238
  _context.pluralRules = _pluralRules;
20082
18239
  }
20083
18240
  function te(key, locale3) {
20084
- const targetLocale = shared.isString(locale3) ? locale3 : _locale.value;
18241
+ const targetLocale = isString$1(locale3) ? locale3 : _locale.value;
20085
18242
  const message = getLocaleMessage(targetLocale);
20086
18243
  return _context.messageResolver(message, key) !== null;
20087
18244
  }
20088
18245
  function resolveMessages(key) {
20089
18246
  let messages2 = null;
20090
- const locales = coreBase.fallbackWithLocaleChain(_context, _fallbackLocale.value, _locale.value);
18247
+ const locales = fallbackWithLocaleChain(_context, _fallbackLocale.value, _locale.value);
20091
18248
  for (let i3 = 0; i3 < locales.length; i3++) {
20092
18249
  const targetLocaleMessages = _messages.value[locales[i3]] || {};
20093
18250
  const messageValue = _context.messageResolver(targetLocaleMessages, key);
@@ -20120,12 +18277,12 @@ function createComposer(options = {}, VueI18nLegacy) {
20120
18277
  function setDateTimeFormat(locale3, format2) {
20121
18278
  _datetimeFormats.value[locale3] = format2;
20122
18279
  _context.datetimeFormats = _datetimeFormats.value;
20123
- coreBase.clearDateTimeFormat(_context, locale3, format2);
18280
+ clearDateTimeFormat(_context, locale3, format2);
20124
18281
  }
20125
18282
  function mergeDateTimeFormat(locale3, format2) {
20126
- _datetimeFormats.value[locale3] = shared.assign(_datetimeFormats.value[locale3] || {}, format2);
18283
+ _datetimeFormats.value[locale3] = assign(_datetimeFormats.value[locale3] || {}, format2);
20127
18284
  _context.datetimeFormats = _datetimeFormats.value;
20128
- coreBase.clearDateTimeFormat(_context, locale3, format2);
18285
+ clearDateTimeFormat(_context, locale3, format2);
20129
18286
  }
20130
18287
  function getNumberFormat(locale3) {
20131
18288
  return _numberFormats.value[locale3] || {};
@@ -20133,27 +18290,27 @@ function createComposer(options = {}, VueI18nLegacy) {
20133
18290
  function setNumberFormat(locale3, format2) {
20134
18291
  _numberFormats.value[locale3] = format2;
20135
18292
  _context.numberFormats = _numberFormats.value;
20136
- coreBase.clearNumberFormat(_context, locale3, format2);
18293
+ clearNumberFormat(_context, locale3, format2);
20137
18294
  }
20138
18295
  function mergeNumberFormat(locale3, format2) {
20139
- _numberFormats.value[locale3] = shared.assign(_numberFormats.value[locale3] || {}, format2);
18296
+ _numberFormats.value[locale3] = assign(_numberFormats.value[locale3] || {}, format2);
20140
18297
  _context.numberFormats = _numberFormats.value;
20141
- coreBase.clearNumberFormat(_context, locale3, format2);
18298
+ clearNumberFormat(_context, locale3, format2);
20142
18299
  }
20143
18300
  composerID++;
20144
- if (__root && shared.inBrowser) {
20145
- vue.watch(__root.locale, (val) => {
18301
+ if (__root && inBrowser) {
18302
+ watch(__root.locale, (val) => {
20146
18303
  if (_inheritLocale) {
20147
18304
  _locale.value = val;
20148
18305
  _context.locale = val;
20149
- coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
18306
+ updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
20150
18307
  }
20151
18308
  });
20152
- vue.watch(__root.fallbackLocale, (val) => {
18309
+ watch(__root.fallbackLocale, (val) => {
20153
18310
  if (_inheritLocale) {
20154
18311
  _fallbackLocale.value = val;
20155
18312
  _context.fallbackLocale = val;
20156
- coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
18313
+ updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
20157
18314
  }
20158
18315
  });
20159
18316
  }
@@ -20169,7 +18326,7 @@ function createComposer(options = {}, VueI18nLegacy) {
20169
18326
  if (val && __root) {
20170
18327
  _locale.value = __root.locale.value;
20171
18328
  _fallbackLocale.value = __root.fallbackLocale.value;
20172
- coreBase.updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
18329
+ updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
20173
18330
  }
20174
18331
  },
20175
18332
  get availableLocales() {
@@ -20266,32 +18423,32 @@ function createComposer(options = {}, VueI18nLegacy) {
20266
18423
  return composer;
20267
18424
  }
20268
18425
  function convertComposerOptions(options) {
20269
- const locale2 = shared.isString(options.locale) ? options.locale : coreBase.DEFAULT_LOCALE;
20270
- const fallbackLocale = shared.isString(options.fallbackLocale) || shared.isArray(options.fallbackLocale) || shared.isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale2;
20271
- const missing = shared.isFunction(options.missing) ? options.missing : void 0;
20272
- const missingWarn = shared.isBoolean(options.silentTranslationWarn) || shared.isRegExp(options.silentTranslationWarn) ? !options.silentTranslationWarn : true;
20273
- const fallbackWarn = shared.isBoolean(options.silentFallbackWarn) || shared.isRegExp(options.silentFallbackWarn) ? !options.silentFallbackWarn : true;
20274
- const fallbackRoot = shared.isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
18426
+ const locale2 = isString$1(options.locale) ? options.locale : DEFAULT_LOCALE$1;
18427
+ const fallbackLocale = isString$1(options.fallbackLocale) || isArray$2(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale2;
18428
+ const missing = isFunction$1(options.missing) ? options.missing : void 0;
18429
+ const missingWarn = isBoolean(options.silentTranslationWarn) || isRegExp$1(options.silentTranslationWarn) ? !options.silentTranslationWarn : true;
18430
+ const fallbackWarn = isBoolean(options.silentFallbackWarn) || isRegExp$1(options.silentFallbackWarn) ? !options.silentFallbackWarn : true;
18431
+ const fallbackRoot = isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
20275
18432
  const fallbackFormat = !!options.formatFallbackMessages;
20276
- const modifiers = shared.isPlainObject(options.modifiers) ? options.modifiers : {};
18433
+ const modifiers = isPlainObject(options.modifiers) ? options.modifiers : {};
20277
18434
  const pluralizationRules = options.pluralizationRules;
20278
- const postTranslation = shared.isFunction(options.postTranslation) ? options.postTranslation : void 0;
20279
- const warnHtmlMessage = shared.isString(options.warnHtmlInMessage) ? options.warnHtmlInMessage !== "off" : true;
18435
+ const postTranslation = isFunction$1(options.postTranslation) ? options.postTranslation : void 0;
18436
+ const warnHtmlMessage = isString$1(options.warnHtmlInMessage) ? options.warnHtmlInMessage !== "off" : true;
20280
18437
  const escapeParameter = !!options.escapeParameterHtml;
20281
- const inheritLocale = shared.isBoolean(options.sync) ? options.sync : true;
18438
+ const inheritLocale = isBoolean(options.sync) ? options.sync : true;
20282
18439
  if (options.formatter) {
20283
- shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));
18440
+ warn$1(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));
20284
18441
  }
20285
18442
  if (options.preserveDirectiveContent) {
20286
- shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));
18443
+ warn$1(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));
20287
18444
  }
20288
18445
  let messages = options.messages;
20289
- if (shared.isPlainObject(options.sharedMessages)) {
18446
+ if (isPlainObject(options.sharedMessages)) {
20290
18447
  const sharedMessages = options.sharedMessages;
20291
18448
  const locales = Object.keys(sharedMessages);
20292
18449
  messages = locales.reduce((messages2, locale3) => {
20293
18450
  const message = messages2[locale3] || (messages2[locale3] = {});
20294
- shared.assign(message, sharedMessages[locale3]);
18451
+ assign(message, sharedMessages[locale3]);
20295
18452
  return messages2;
20296
18453
  }, messages || {});
20297
18454
  }
@@ -20353,7 +18510,7 @@ function createVueI18n(options = {}, VueI18nLegacy) {
20353
18510
  return composer.availableLocales;
20354
18511
  },
20355
18512
  get formatter() {
20356
- shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));
18513
+ warn$1(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));
20357
18514
  return {
20358
18515
  interpolate() {
20359
18516
  return [];
@@ -20361,7 +18518,7 @@ function createVueI18n(options = {}, VueI18nLegacy) {
20361
18518
  };
20362
18519
  },
20363
18520
  set formatter(val) {
20364
- shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));
18521
+ warn$1(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));
20365
18522
  },
20366
18523
  get missing() {
20367
18524
  return composer.getMissingHandler();
@@ -20370,16 +18527,16 @@ function createVueI18n(options = {}, VueI18nLegacy) {
20370
18527
  composer.setMissingHandler(handler);
20371
18528
  },
20372
18529
  get silentTranslationWarn() {
20373
- return shared.isBoolean(composer.missingWarn) ? !composer.missingWarn : composer.missingWarn;
18530
+ return isBoolean(composer.missingWarn) ? !composer.missingWarn : composer.missingWarn;
20374
18531
  },
20375
18532
  set silentTranslationWarn(val) {
20376
- composer.missingWarn = shared.isBoolean(val) ? !val : val;
18533
+ composer.missingWarn = isBoolean(val) ? !val : val;
20377
18534
  },
20378
18535
  get silentFallbackWarn() {
20379
- return shared.isBoolean(composer.fallbackWarn) ? !composer.fallbackWarn : composer.fallbackWarn;
18536
+ return isBoolean(composer.fallbackWarn) ? !composer.fallbackWarn : composer.fallbackWarn;
20380
18537
  },
20381
18538
  set silentFallbackWarn(val) {
20382
- composer.fallbackWarn = shared.isBoolean(val) ? !val : val;
18539
+ composer.fallbackWarn = isBoolean(val) ? !val : val;
20383
18540
  },
20384
18541
  get modifiers() {
20385
18542
  return composer.modifiers;
@@ -20415,11 +18572,11 @@ function createVueI18n(options = {}, VueI18nLegacy) {
20415
18572
  composer.escapeParameter = val;
20416
18573
  },
20417
18574
  get preserveDirectiveContent() {
20418
- shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));
18575
+ warn$1(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));
20419
18576
  return true;
20420
18577
  },
20421
18578
  set preserveDirectiveContent(val) {
20422
- shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));
18579
+ warn$1(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));
20423
18580
  },
20424
18581
  get pluralizationRules() {
20425
18582
  return composer.pluralRules || {};
@@ -20430,20 +18587,20 @@ function createVueI18n(options = {}, VueI18nLegacy) {
20430
18587
  const options2 = {};
20431
18588
  let list = null;
20432
18589
  let named = null;
20433
- if (!shared.isString(arg1)) {
18590
+ if (!isString$1(arg1)) {
20434
18591
  throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);
20435
18592
  }
20436
18593
  const key = arg1;
20437
- if (shared.isString(arg2)) {
18594
+ if (isString$1(arg2)) {
20438
18595
  options2.locale = arg2;
20439
- } else if (shared.isArray(arg2)) {
18596
+ } else if (isArray$2(arg2)) {
20440
18597
  list = arg2;
20441
- } else if (shared.isPlainObject(arg2)) {
18598
+ } else if (isPlainObject(arg2)) {
20442
18599
  named = arg2;
20443
18600
  }
20444
- if (shared.isArray(arg3)) {
18601
+ if (isArray$2(arg3)) {
20445
18602
  list = arg3;
20446
- } else if (shared.isPlainObject(arg3)) {
18603
+ } else if (isPlainObject(arg3)) {
20447
18604
  named = arg3;
20448
18605
  }
20449
18606
  return Reflect.apply(composer.t, composer, [
@@ -20460,24 +18617,24 @@ function createVueI18n(options = {}, VueI18nLegacy) {
20460
18617
  const options2 = { plural: 1 };
20461
18618
  let list = null;
20462
18619
  let named = null;
20463
- if (!shared.isString(arg1)) {
18620
+ if (!isString$1(arg1)) {
20464
18621
  throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);
20465
18622
  }
20466
18623
  const key = arg1;
20467
- if (shared.isString(arg2)) {
18624
+ if (isString$1(arg2)) {
20468
18625
  options2.locale = arg2;
20469
- } else if (shared.isNumber(arg2)) {
18626
+ } else if (isNumber$1(arg2)) {
20470
18627
  options2.plural = arg2;
20471
- } else if (shared.isArray(arg2)) {
18628
+ } else if (isArray$2(arg2)) {
20472
18629
  list = arg2;
20473
- } else if (shared.isPlainObject(arg2)) {
18630
+ } else if (isPlainObject(arg2)) {
20474
18631
  named = arg2;
20475
18632
  }
20476
- if (shared.isString(arg3)) {
18633
+ if (isString$1(arg3)) {
20477
18634
  options2.locale = arg3;
20478
- } else if (shared.isArray(arg3)) {
18635
+ } else if (isArray$2(arg3)) {
20479
18636
  list = arg3;
20480
- } else if (shared.isPlainObject(arg3)) {
18637
+ } else if (isPlainObject(arg3)) {
20481
18638
  named = arg3;
20482
18639
  }
20483
18640
  return Reflect.apply(composer.t, composer, [
@@ -20526,7 +18683,7 @@ function createVueI18n(options = {}, VueI18nLegacy) {
20526
18683
  composer.mergeNumberFormat(locale2, format2);
20527
18684
  },
20528
18685
  getChoiceIndex(choice, choicesLength) {
20529
- shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_GET_CHOICE_INDEX));
18686
+ warn$1(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_GET_CHOICE_INDEX));
20530
18687
  return -1;
20531
18688
  },
20532
18689
  __onComponentInstanceCreated(target) {
@@ -20571,7 +18728,7 @@ function getInterpolateArg({ slots }, keys2) {
20571
18728
  return ret.reduce((slot, current) => {
20572
18729
  return slot = [
20573
18730
  ...slot,
20574
- ...shared.isArray(current.children) ? current.children : [current]
18731
+ ...isArray$2(current.children) ? current.children : [current]
20575
18732
  ];
20576
18733
  }, []);
20577
18734
  } else {
@@ -20585,18 +18742,18 @@ function getInterpolateArg({ slots }, keys2) {
20585
18742
  }
20586
18743
  }
20587
18744
  function getFragmentableTag(tag) {
20588
- return vue.Fragment;
18745
+ return Fragment;
20589
18746
  }
20590
18747
  const Translation = {
20591
18748
  name: "i18n-t",
20592
- props: shared.assign({
18749
+ props: assign({
20593
18750
  keypath: {
20594
18751
  type: String,
20595
18752
  required: true
20596
18753
  },
20597
18754
  plural: {
20598
18755
  type: [Number, String],
20599
- validator: (val) => shared.isNumber(val) || !isNaN(val)
18756
+ validator: (val) => isNumber$1(val) || !isNaN(val)
20600
18757
  }
20601
18758
  }, baseFormatProps),
20602
18759
  setup(props, context) {
@@ -20612,18 +18769,18 @@ const Translation = {
20612
18769
  options.locale = props.locale;
20613
18770
  }
20614
18771
  if (props.plural !== void 0) {
20615
- options.plural = shared.isString(props.plural) ? +props.plural : props.plural;
18772
+ options.plural = isString$1(props.plural) ? +props.plural : props.plural;
20616
18773
  }
20617
18774
  const arg = getInterpolateArg(context, keys2);
20618
18775
  const children = i18n2[TransrateVNodeSymbol](props.keypath, arg, options);
20619
- const assignedAttrs = shared.assign({}, attrs);
20620
- const tag = shared.isString(props.tag) || shared.isObject(props.tag) ? props.tag : getFragmentableTag();
20621
- return vue.h(tag, assignedAttrs, children);
18776
+ const assignedAttrs = assign({}, attrs);
18777
+ const tag = isString$1(props.tag) || isObject$4(props.tag) ? props.tag : getFragmentableTag();
18778
+ return h(tag, assignedAttrs, children);
20622
18779
  };
20623
18780
  }
20624
18781
  };
20625
18782
  function isVNode(target) {
20626
- return shared.isArray(target) && !shared.isString(target[0]);
18783
+ return isArray$2(target) && !isString$1(target[0]);
20627
18784
  }
20628
18785
  function renderFormatter(props, context, slotKeys, partFormatter) {
20629
18786
  const { slots, attrs } = context;
@@ -20633,19 +18790,19 @@ function renderFormatter(props, context, slotKeys, partFormatter) {
20633
18790
  if (props.locale) {
20634
18791
  options.locale = props.locale;
20635
18792
  }
20636
- if (shared.isString(props.format)) {
18793
+ if (isString$1(props.format)) {
20637
18794
  options.key = props.format;
20638
- } else if (shared.isObject(props.format)) {
20639
- if (shared.isString(props.format.key)) {
18795
+ } else if (isObject$4(props.format)) {
18796
+ if (isString$1(props.format.key)) {
20640
18797
  options.key = props.format.key;
20641
18798
  }
20642
18799
  overrides = Object.keys(props.format).reduce((options2, prop) => {
20643
- return slotKeys.includes(prop) ? shared.assign({}, options2, { [prop]: props.format[prop] }) : options2;
18800
+ return slotKeys.includes(prop) ? assign({}, options2, { [prop]: props.format[prop] }) : options2;
20644
18801
  }, {});
20645
18802
  }
20646
18803
  const parts = partFormatter(...[props.value, options, overrides]);
20647
18804
  let children = [options.key];
20648
- if (shared.isArray(parts)) {
18805
+ if (isArray$2(parts)) {
20649
18806
  children = parts.map((part, index2) => {
20650
18807
  const slot = slots[part.type];
20651
18808
  const node = slot ? slot({ [part.type]: part.value, index: index2, parts }) : [part.value];
@@ -20654,17 +18811,17 @@ function renderFormatter(props, context, slotKeys, partFormatter) {
20654
18811
  }
20655
18812
  return node;
20656
18813
  });
20657
- } else if (shared.isString(parts)) {
18814
+ } else if (isString$1(parts)) {
20658
18815
  children = [parts];
20659
18816
  }
20660
- const assignedAttrs = shared.assign({}, attrs);
20661
- const tag = shared.isString(props.tag) || shared.isObject(props.tag) ? props.tag : getFragmentableTag();
20662
- return vue.h(tag, assignedAttrs, children);
18817
+ const assignedAttrs = assign({}, attrs);
18818
+ const tag = isString$1(props.tag) || isObject$4(props.tag) ? props.tag : getFragmentableTag();
18819
+ return h(tag, assignedAttrs, children);
20663
18820
  };
20664
18821
  }
20665
18822
  const NumberFormat = {
20666
18823
  name: "i18n-n",
20667
- props: shared.assign({
18824
+ props: assign({
20668
18825
  value: {
20669
18826
  type: Number,
20670
18827
  required: true
@@ -20675,12 +18832,12 @@ const NumberFormat = {
20675
18832
  }, baseFormatProps),
20676
18833
  setup(props, context) {
20677
18834
  const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true });
20678
- return renderFormatter(props, context, coreBase.NUMBER_FORMAT_OPTIONS_KEYS, (...args) => i18n2[NumberPartsSymbol](...args));
18835
+ return renderFormatter(props, context, NUMBER_FORMAT_OPTIONS_KEYS, (...args) => i18n2[NumberPartsSymbol](...args));
20679
18836
  }
20680
18837
  };
20681
18838
  const DatetimeFormat = {
20682
18839
  name: "i18n-d",
20683
- props: shared.assign({
18840
+ props: assign({
20684
18841
  value: {
20685
18842
  type: [Number, Date],
20686
18843
  required: true
@@ -20691,10 +18848,10 @@ const DatetimeFormat = {
20691
18848
  }, baseFormatProps),
20692
18849
  setup(props, context) {
20693
18850
  const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true });
20694
- return renderFormatter(props, context, coreBase.DATETIME_FORMAT_OPTIONS_KEYS, (...args) => i18n2[DatetimePartsSymbol](...args));
18851
+ return renderFormatter(props, context, DATETIME_FORMAT_OPTIONS_KEYS, (...args) => i18n2[DatetimePartsSymbol](...args));
20695
18852
  }
20696
18853
  };
20697
- function getComposer$1(i18n2, instance) {
18854
+ function getComposer$2(i18n2, instance) {
20698
18855
  const i18nInternal = i18n2;
20699
18856
  if (i18n2.mode === "composition") {
20700
18857
  return i18nInternal.__getInstance(instance) || i18n2.global;
@@ -20709,9 +18866,9 @@ function vTDirective(i18n2) {
20709
18866
  if (!instance || !instance.$) {
20710
18867
  throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);
20711
18868
  }
20712
- const composer = getComposer$1(i18n2, instance.$);
18869
+ const composer = getComposer$2(i18n2, instance.$);
20713
18870
  if (modifiers.preserve) {
20714
- shared.warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE));
18871
+ warn$1(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE));
20715
18872
  }
20716
18873
  const parsedValue = parseValue(value);
20717
18874
  return [
@@ -20721,8 +18878,8 @@ function vTDirective(i18n2) {
20721
18878
  };
20722
18879
  const register3 = (el, binding) => {
20723
18880
  const [textContent, composer] = _process(binding);
20724
- if (shared.inBrowser && i18n2.global === composer) {
20725
- el.__i18nWatcher = vue.watch(composer.locale, () => {
18881
+ if (inBrowser && i18n2.global === composer) {
18882
+ el.__i18nWatcher = watch(composer.locale, () => {
20726
18883
  binding.instance && binding.instance.$forceUpdate();
20727
18884
  });
20728
18885
  }
@@ -20730,7 +18887,7 @@ function vTDirective(i18n2) {
20730
18887
  el.textContent = textContent;
20731
18888
  };
20732
18889
  const unregister3 = (el) => {
20733
- if (shared.inBrowser && el.__i18nWatcher) {
18890
+ if (inBrowser && el.__i18nWatcher) {
20734
18891
  el.__i18nWatcher();
20735
18892
  el.__i18nWatcher = void 0;
20736
18893
  delete el.__i18nWatcher;
@@ -20761,9 +18918,9 @@ function vTDirective(i18n2) {
20761
18918
  };
20762
18919
  }
20763
18920
  function parseValue(value) {
20764
- if (shared.isString(value)) {
18921
+ if (isString$1(value)) {
20765
18922
  return { path: value };
20766
- } else if (shared.isPlainObject(value)) {
18923
+ } else if (isPlainObject(value)) {
20767
18924
  if (!("path" in value)) {
20768
18925
  throw createI18nError(I18nErrorCodes.REQUIRED_VALUE, "path");
20769
18926
  }
@@ -20776,23 +18933,23 @@ function makeParams(value) {
20776
18933
  const { path, locale: locale2, args, choice, plural } = value;
20777
18934
  const options = {};
20778
18935
  const named = args || {};
20779
- if (shared.isString(locale2)) {
18936
+ if (isString$1(locale2)) {
20780
18937
  options.locale = locale2;
20781
18938
  }
20782
- if (shared.isNumber(choice)) {
18939
+ if (isNumber$1(choice)) {
20783
18940
  options.plural = choice;
20784
18941
  }
20785
- if (shared.isNumber(plural)) {
18942
+ if (isNumber$1(plural)) {
20786
18943
  options.plural = plural;
20787
18944
  }
20788
18945
  return [path, named, options];
20789
18946
  }
20790
18947
  function apply(app, i18n2, ...options) {
20791
- const pluginOptions = shared.isPlainObject(options[0]) ? options[0] : {};
18948
+ const pluginOptions = isPlainObject(options[0]) ? options[0] : {};
20792
18949
  const useI18nComponentName = !!pluginOptions.useI18nComponentName;
20793
- const globalInstall = shared.isBoolean(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true;
18950
+ const globalInstall = isBoolean(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true;
20794
18951
  if (globalInstall && useI18nComponentName) {
20795
- shared.warn(getWarnMessage(I18nWarnCodes.COMPONENT_NAME_LEGACY_COMPATIBLE, {
18952
+ warn$1(getWarnMessage(I18nWarnCodes.COMPONENT_NAME_LEGACY_COMPATIBLE, {
20796
18953
  name: Translation.name
20797
18954
  }));
20798
18955
  }
@@ -20805,10 +18962,328 @@ function apply(app, i18n2, ...options) {
20805
18962
  app.directive("t", vTDirective(i18n2));
20806
18963
  }
20807
18964
  }
18965
+ const VUE_I18N_COMPONENT_TYPES = "vue-i18n: composer properties";
18966
+ let devtoolsApi;
18967
+ async function enableDevTools(app, i18n2) {
18968
+ return new Promise((resolve, reject) => {
18969
+ try {
18970
+ setupDevtoolsPlugin({
18971
+ id: "vue-devtools-plugin-vue-i18n",
18972
+ label: VueDevToolsLabels["vue-devtools-plugin-vue-i18n"],
18973
+ packageName: "vue-i18n",
18974
+ homepage: "https://vue-i18n.intlify.dev",
18975
+ logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
18976
+ componentStateTypes: [VUE_I18N_COMPONENT_TYPES],
18977
+ app
18978
+ }, (api2) => {
18979
+ devtoolsApi = api2;
18980
+ api2.on.visitComponentTree(({ componentInstance, treeNode }) => {
18981
+ updateComponentTreeTags(componentInstance, treeNode, i18n2);
18982
+ });
18983
+ api2.on.inspectComponent(({ componentInstance, instanceData }) => {
18984
+ if (componentInstance.vnode.el && componentInstance.vnode.el.__VUE_I18N__ && instanceData) {
18985
+ if (i18n2.mode === "legacy") {
18986
+ if (componentInstance.vnode.el.__VUE_I18N__ !== i18n2.global.__composer) {
18987
+ inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);
18988
+ }
18989
+ } else {
18990
+ inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);
18991
+ }
18992
+ }
18993
+ });
18994
+ api2.addInspector({
18995
+ id: "vue-i18n-resource-inspector",
18996
+ label: VueDevToolsLabels["vue-i18n-resource-inspector"],
18997
+ icon: "language",
18998
+ treeFilterPlaceholder: VueDevToolsPlaceholders["vue-i18n-resource-inspector"]
18999
+ });
19000
+ api2.on.getInspectorTree((payload) => {
19001
+ if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
19002
+ registerScope(payload, i18n2);
19003
+ }
19004
+ });
19005
+ const roots2 = /* @__PURE__ */ new Map();
19006
+ api2.on.getInspectorState(async (payload) => {
19007
+ if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
19008
+ api2.unhighlightElement();
19009
+ inspectScope(payload, i18n2);
19010
+ if (payload.nodeId === "global") {
19011
+ if (!roots2.has(payload.app)) {
19012
+ const [root] = await api2.getComponentInstances(payload.app);
19013
+ roots2.set(payload.app, root);
19014
+ }
19015
+ api2.highlightElement(roots2.get(payload.app));
19016
+ } else {
19017
+ const instance = getComponentInstance(payload.nodeId, i18n2);
19018
+ instance && api2.highlightElement(instance);
19019
+ }
19020
+ }
19021
+ });
19022
+ api2.on.editInspectorState((payload) => {
19023
+ if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
19024
+ editScope(payload, i18n2);
19025
+ }
19026
+ });
19027
+ api2.addTimelineLayer({
19028
+ id: "vue-i18n-timeline",
19029
+ label: VueDevToolsLabels["vue-i18n-timeline"],
19030
+ color: VueDevToolsTimelineColors["vue-i18n-timeline"]
19031
+ });
19032
+ resolve(true);
19033
+ });
19034
+ } catch (e3) {
19035
+ console.error(e3);
19036
+ reject(false);
19037
+ }
19038
+ });
19039
+ }
19040
+ function getI18nScopeLable(instance) {
19041
+ return instance.type.name || instance.type.displayName || instance.type.__file || "Anonymous";
19042
+ }
19043
+ function updateComponentTreeTags(instance, treeNode, i18n2) {
19044
+ const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
19045
+ if (instance && instance.vnode.el && instance.vnode.el.__VUE_I18N__) {
19046
+ if (instance.vnode.el.__VUE_I18N__ !== global2) {
19047
+ const tag = {
19048
+ label: `i18n (${getI18nScopeLable(instance)} Scope)`,
19049
+ textColor: 0,
19050
+ backgroundColor: 16764185
19051
+ };
19052
+ treeNode.tags.push(tag);
19053
+ }
19054
+ }
19055
+ }
19056
+ function inspectComposer(instanceData, composer) {
19057
+ const type = VUE_I18N_COMPONENT_TYPES;
19058
+ instanceData.state.push({
19059
+ type,
19060
+ key: "locale",
19061
+ editable: true,
19062
+ value: composer.locale.value
19063
+ });
19064
+ instanceData.state.push({
19065
+ type,
19066
+ key: "availableLocales",
19067
+ editable: false,
19068
+ value: composer.availableLocales
19069
+ });
19070
+ instanceData.state.push({
19071
+ type,
19072
+ key: "fallbackLocale",
19073
+ editable: true,
19074
+ value: composer.fallbackLocale.value
19075
+ });
19076
+ instanceData.state.push({
19077
+ type,
19078
+ key: "inheritLocale",
19079
+ editable: true,
19080
+ value: composer.inheritLocale
19081
+ });
19082
+ instanceData.state.push({
19083
+ type,
19084
+ key: "messages",
19085
+ editable: false,
19086
+ value: getLocaleMessageValue(composer.messages.value)
19087
+ });
19088
+ {
19089
+ instanceData.state.push({
19090
+ type,
19091
+ key: "datetimeFormats",
19092
+ editable: false,
19093
+ value: composer.datetimeFormats.value
19094
+ });
19095
+ instanceData.state.push({
19096
+ type,
19097
+ key: "numberFormats",
19098
+ editable: false,
19099
+ value: composer.numberFormats.value
19100
+ });
19101
+ }
19102
+ }
19103
+ function getLocaleMessageValue(messages) {
19104
+ const value = {};
19105
+ Object.keys(messages).forEach((key) => {
19106
+ const v = messages[key];
19107
+ if (isFunction$1(v) && "source" in v) {
19108
+ value[key] = getMessageFunctionDetails(v);
19109
+ } else if (isObject$4(v)) {
19110
+ value[key] = getLocaleMessageValue(v);
19111
+ } else {
19112
+ value[key] = v;
19113
+ }
19114
+ });
19115
+ return value;
19116
+ }
19117
+ const ESC = {
19118
+ "<": "&lt;",
19119
+ ">": "&gt;",
19120
+ '"': "&quot;",
19121
+ "&": "&amp;"
19122
+ };
19123
+ function escape$1(s3) {
19124
+ return s3.replace(/[<>"&]/g, escapeChar);
19125
+ }
19126
+ function escapeChar(a3) {
19127
+ return ESC[a3] || a3;
19128
+ }
19129
+ function getMessageFunctionDetails(func) {
19130
+ const argString = func.source ? `("${escape$1(func.source)}")` : `(?)`;
19131
+ return {
19132
+ _custom: {
19133
+ type: "function",
19134
+ display: `<span>\u0192</span> ${argString}`
19135
+ }
19136
+ };
19137
+ }
19138
+ function registerScope(payload, i18n2) {
19139
+ payload.rootNodes.push({
19140
+ id: "global",
19141
+ label: "Global Scope"
19142
+ });
19143
+ const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
19144
+ for (const [keyInstance, instance] of i18n2.__instances) {
19145
+ const composer = i18n2.mode === "composition" ? instance : instance.__composer;
19146
+ if (global2 === composer) {
19147
+ continue;
19148
+ }
19149
+ payload.rootNodes.push({
19150
+ id: composer.id.toString(),
19151
+ label: `${getI18nScopeLable(keyInstance)} Scope`
19152
+ });
19153
+ }
19154
+ }
19155
+ function getComponentInstance(nodeId, i18n2) {
19156
+ let instance = null;
19157
+ if (nodeId !== "global") {
19158
+ for (const [component, composer] of i18n2.__instances.entries()) {
19159
+ if (composer.id.toString() === nodeId) {
19160
+ instance = component;
19161
+ break;
19162
+ }
19163
+ }
19164
+ }
19165
+ return instance;
19166
+ }
19167
+ function getComposer$1(nodeId, i18n2) {
19168
+ if (nodeId === "global") {
19169
+ return i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
19170
+ } else {
19171
+ const instance = Array.from(i18n2.__instances.values()).find((item) => item.id.toString() === nodeId);
19172
+ if (instance) {
19173
+ return i18n2.mode === "composition" ? instance : instance.__composer;
19174
+ } else {
19175
+ return null;
19176
+ }
19177
+ }
19178
+ }
19179
+ function inspectScope(payload, i18n2) {
19180
+ const composer = getComposer$1(payload.nodeId, i18n2);
19181
+ if (composer) {
19182
+ payload.state = makeScopeInspectState(composer);
19183
+ }
19184
+ return null;
19185
+ }
19186
+ function makeScopeInspectState(composer) {
19187
+ const state = {};
19188
+ const localeType = "Locale related info";
19189
+ const localeStates = [
19190
+ {
19191
+ type: localeType,
19192
+ key: "locale",
19193
+ editable: true,
19194
+ value: composer.locale.value
19195
+ },
19196
+ {
19197
+ type: localeType,
19198
+ key: "fallbackLocale",
19199
+ editable: true,
19200
+ value: composer.fallbackLocale.value
19201
+ },
19202
+ {
19203
+ type: localeType,
19204
+ key: "availableLocales",
19205
+ editable: false,
19206
+ value: composer.availableLocales
19207
+ },
19208
+ {
19209
+ type: localeType,
19210
+ key: "inheritLocale",
19211
+ editable: true,
19212
+ value: composer.inheritLocale
19213
+ }
19214
+ ];
19215
+ state[localeType] = localeStates;
19216
+ const localeMessagesType = "Locale messages info";
19217
+ const localeMessagesStates = [
19218
+ {
19219
+ type: localeMessagesType,
19220
+ key: "messages",
19221
+ editable: false,
19222
+ value: getLocaleMessageValue(composer.messages.value)
19223
+ }
19224
+ ];
19225
+ state[localeMessagesType] = localeMessagesStates;
19226
+ {
19227
+ const datetimeFormatsType = "Datetime formats info";
19228
+ const datetimeFormatsStates = [
19229
+ {
19230
+ type: datetimeFormatsType,
19231
+ key: "datetimeFormats",
19232
+ editable: false,
19233
+ value: composer.datetimeFormats.value
19234
+ }
19235
+ ];
19236
+ state[datetimeFormatsType] = datetimeFormatsStates;
19237
+ const numberFormatsType = "Datetime formats info";
19238
+ const numberFormatsStates = [
19239
+ {
19240
+ type: numberFormatsType,
19241
+ key: "numberFormats",
19242
+ editable: false,
19243
+ value: composer.numberFormats.value
19244
+ }
19245
+ ];
19246
+ state[numberFormatsType] = numberFormatsStates;
19247
+ }
19248
+ return state;
19249
+ }
19250
+ function addTimelineEvent(event, payload) {
19251
+ if (devtoolsApi) {
19252
+ let groupId;
19253
+ if (payload && "groupId" in payload) {
19254
+ groupId = payload.groupId;
19255
+ delete payload.groupId;
19256
+ }
19257
+ devtoolsApi.addTimelineEvent({
19258
+ layerId: "vue-i18n-timeline",
19259
+ event: {
19260
+ title: event,
19261
+ groupId,
19262
+ time: Date.now(),
19263
+ meta: {},
19264
+ data: payload || {},
19265
+ logType: event === "compile-error" ? "error" : event === "fallback" || event === "missing" ? "warning" : "default"
19266
+ }
19267
+ });
19268
+ }
19269
+ }
19270
+ function editScope(payload, i18n2) {
19271
+ const composer = getComposer$1(payload.nodeId, i18n2);
19272
+ if (composer) {
19273
+ const [field] = payload.path;
19274
+ if (field === "locale" && isString$1(payload.state.value)) {
19275
+ composer.locale.value = payload.state.value;
19276
+ } else if (field === "fallbackLocale" && (isString$1(payload.state.value) || isArray$2(payload.state.value) || isObject$4(payload.state.value))) {
19277
+ composer.fallbackLocale.value = payload.state.value;
19278
+ } else if (field === "inheritLocale" && isBoolean(payload.state.value)) {
19279
+ composer.inheritLocale = payload.state.value;
19280
+ }
19281
+ }
19282
+ }
20808
19283
  function defineMixin(vuei18n, composer, i18n2) {
20809
19284
  return {
20810
19285
  beforeCreate() {
20811
- const instance = vue.getCurrentInstance();
19286
+ const instance = getCurrentInstance();
20812
19287
  if (!instance) {
20813
19288
  throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);
20814
19289
  }
@@ -20852,12 +19327,30 @@ function defineMixin(vuei18n, composer, i18n2) {
20852
19327
  this.$tm = (key) => this.$i18n.tm(key);
20853
19328
  },
20854
19329
  mounted() {
19330
+ if (this.$el && this.$i18n) {
19331
+ this.$el.__VUE_I18N__ = this.$i18n.__composer;
19332
+ const emitter = this.__v_emitter = createEmitter();
19333
+ const _vueI18n = this.$i18n;
19334
+ _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
19335
+ emitter.on("*", addTimelineEvent);
19336
+ }
20855
19337
  },
20856
19338
  unmounted() {
20857
- const instance = vue.getCurrentInstance();
19339
+ const instance = getCurrentInstance();
20858
19340
  if (!instance) {
20859
19341
  throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);
20860
19342
  }
19343
+ if (this.$el && this.$el.__VUE_I18N__) {
19344
+ if (this.__v_emitter) {
19345
+ this.__v_emitter.off("*", addTimelineEvent);
19346
+ delete this.__v_emitter;
19347
+ }
19348
+ if (this.$i18n) {
19349
+ const _vueI18n = this.$i18n;
19350
+ _vueI18n.__disableEmitter && _vueI18n.__disableEmitter();
19351
+ delete this.$el.__VUE_I18N__;
19352
+ }
19353
+ }
20861
19354
  delete this.$t;
20862
19355
  delete this.$rt;
20863
19356
  delete this.$tc;
@@ -20895,14 +19388,14 @@ function mergeToRoot(root, options) {
20895
19388
  }
20896
19389
  return root;
20897
19390
  }
20898
- const I18nInjectionKey = /* @__PURE__ */ shared.makeSymbol("global-vue-i18n");
19391
+ const I18nInjectionKey = /* @__PURE__ */ makeSymbol("global-vue-i18n");
20899
19392
  function createI18n(options = {}, VueI18nLegacy) {
20900
- const __legacyMode = shared.isBoolean(options.legacy) ? options.legacy : true;
20901
- const __globalInjection = shared.isBoolean(options.globalInjection) ? options.globalInjection : true;
20902
- const __allowComposition = __legacyMode ? !!options.allowComposition : true;
19393
+ const __legacyMode = __VUE_I18N_LEGACY_API__ && isBoolean(options.legacy) ? options.legacy : __VUE_I18N_LEGACY_API__;
19394
+ const __globalInjection = isBoolean(options.globalInjection) ? options.globalInjection : true;
19395
+ const __allowComposition = __VUE_I18N_LEGACY_API__ && __legacyMode ? !!options.allowComposition : true;
20903
19396
  const __instances = /* @__PURE__ */ new Map();
20904
19397
  const [globalScope, __global] = createGlobal(options, __legacyMode);
20905
- const symbol = shared.makeSymbol("vue-i18n");
19398
+ const symbol = makeSymbol("vue-i18n");
20906
19399
  function __getInstance(component) {
20907
19400
  return __instances.get(component) || null;
20908
19401
  }
@@ -20915,21 +19408,24 @@ function createI18n(options = {}, VueI18nLegacy) {
20915
19408
  {
20916
19409
  const i18n2 = {
20917
19410
  get mode() {
20918
- return __legacyMode ? "legacy" : "composition";
19411
+ return __VUE_I18N_LEGACY_API__ && __legacyMode ? "legacy" : "composition";
20919
19412
  },
20920
19413
  get allowComposition() {
20921
19414
  return __allowComposition;
20922
19415
  },
20923
19416
  async install(app, ...options2) {
19417
+ {
19418
+ app.__VUE_I18N__ = i18n2;
19419
+ }
20924
19420
  app.__VUE_I18N_SYMBOL__ = symbol;
20925
19421
  app.provide(app.__VUE_I18N_SYMBOL__, i18n2);
20926
19422
  if (!__legacyMode && __globalInjection) {
20927
19423
  injectGlobalFields(app, i18n2.global);
20928
19424
  }
20929
- {
19425
+ if (__VUE_I18N_FULL_INSTALL__) {
20930
19426
  apply(app, i18n2, ...options2);
20931
19427
  }
20932
- if (__legacyMode) {
19428
+ if (__VUE_I18N_LEGACY_API__ && __legacyMode) {
20933
19429
  app.mixin(defineMixin(__global, __global.__composer, i18n2));
20934
19430
  }
20935
19431
  const unmountApp = app.unmount;
@@ -20937,6 +19433,21 @@ function createI18n(options = {}, VueI18nLegacy) {
20937
19433
  i18n2.dispose();
20938
19434
  unmountApp();
20939
19435
  };
19436
+ {
19437
+ const ret = await enableDevTools(app, i18n2);
19438
+ if (!ret) {
19439
+ throw createI18nError(I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
19440
+ }
19441
+ const emitter = createEmitter();
19442
+ if (__legacyMode) {
19443
+ const _vueI18n = __global;
19444
+ _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
19445
+ } else {
19446
+ const _composer = __global;
19447
+ _composer[EnableEmitter] && _composer[EnableEmitter](emitter);
19448
+ }
19449
+ emitter.on("*", addTimelineEvent);
19450
+ }
20940
19451
  },
20941
19452
  get global() {
20942
19453
  return __global;
@@ -20953,7 +19464,7 @@ function createI18n(options = {}, VueI18nLegacy) {
20953
19464
  }
20954
19465
  }
20955
19466
  function useI18n(options = {}) {
20956
- const instance = vue.getCurrentInstance();
19467
+ const instance = getCurrentInstance();
20957
19468
  if (instance == null) {
20958
19469
  throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);
20959
19470
  }
@@ -20964,7 +19475,7 @@ function useI18n(options = {}) {
20964
19475
  const global2 = getGlobalComposer(i18n2);
20965
19476
  const componentOptions = getComponentOptions(instance);
20966
19477
  const scope = getScope(options, componentOptions);
20967
- {
19478
+ if (__VUE_I18N_LEGACY_API__) {
20968
19479
  if (i18n2.mode === "legacy" && !options.__useComponent) {
20969
19480
  if (!i18n2.allowComposition) {
20970
19481
  throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);
@@ -20980,7 +19491,7 @@ function useI18n(options = {}) {
20980
19491
  let composer2 = getComposer(i18n2, instance, options.__useComponent);
20981
19492
  if (composer2 == null) {
20982
19493
  {
20983
- shared.warn(getWarnMessage(I18nWarnCodes.NOT_FOUND_PARENT_SCOPE));
19494
+ warn$1(getWarnMessage(I18nWarnCodes.NOT_FOUND_PARENT_SCOPE));
20984
19495
  }
20985
19496
  composer2 = global2;
20986
19497
  }
@@ -20989,7 +19500,7 @@ function useI18n(options = {}) {
20989
19500
  const i18nInternal = i18n2;
20990
19501
  let composer = i18nInternal.__getInstance(instance);
20991
19502
  if (composer == null) {
20992
- const composerOptions = shared.assign({}, options);
19503
+ const composerOptions = assign({}, options);
20993
19504
  if ("__i18n" in componentOptions) {
20994
19505
  composerOptions.__i18n = componentOptions.__i18n;
20995
19506
  }
@@ -20997,21 +19508,15 @@ function useI18n(options = {}) {
20997
19508
  composerOptions.__root = global2;
20998
19509
  }
20999
19510
  composer = createComposer(composerOptions);
21000
- setupLifeCycle(i18nInternal, instance);
19511
+ setupLifeCycle(i18nInternal, instance, composer);
21001
19512
  i18nInternal.__setInstance(instance, composer);
21002
19513
  }
21003
19514
  return composer;
21004
19515
  }
21005
- const castToVueI18n = (i18n2) => {
21006
- if (!(__VUE_I18N_BRIDGE__ in i18n2)) {
21007
- throw createI18nError(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);
21008
- }
21009
- return i18n2;
21010
- };
21011
19516
  function createGlobal(options, legacyMode, VueI18nLegacy) {
21012
- const scope = vue.effectScope();
19517
+ const scope = effectScope();
21013
19518
  {
21014
- const obj = legacyMode ? scope.run(() => createVueI18n(options)) : scope.run(() => createComposer(options));
19519
+ const obj = __VUE_I18N_LEGACY_API__ && legacyMode ? scope.run(() => createVueI18n(options)) : scope.run(() => createComposer(options));
21015
19520
  if (obj == null) {
21016
19521
  throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);
21017
19522
  }
@@ -21020,7 +19525,7 @@ function createGlobal(options, legacyMode, VueI18nLegacy) {
21020
19525
  }
21021
19526
  function getI18nInstance(instance) {
21022
19527
  {
21023
- const i18n2 = vue.inject(!instance.isCE ? instance.appContext.app.__VUE_I18N_SYMBOL__ : I18nInjectionKey);
19528
+ const i18n2 = inject(!instance.isCE ? instance.appContext.app.__VUE_I18N_SYMBOL__ : I18nInjectionKey);
21024
19529
  if (!i18n2) {
21025
19530
  throw createI18nError(!instance.isCE ? I18nErrorCodes.UNEXPECTED_ERROR : I18nErrorCodes.NOT_INSLALLED_WITH_PROVIDE);
21026
19531
  }
@@ -21028,7 +19533,7 @@ function getI18nInstance(instance) {
21028
19533
  }
21029
19534
  }
21030
19535
  function getScope(options, componentOptions) {
21031
- return shared.isEmptyObject(options) ? "__i18n" in componentOptions ? "local" : "global" : !options.useScope ? "local" : options.useScope;
19536
+ return isEmptyObject(options) ? "__i18n" in componentOptions ? "local" : "global" : !options.useScope ? "local" : options.useScope;
21032
19537
  }
21033
19538
  function getGlobalComposer(i18n2) {
21034
19539
  return i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
@@ -21042,7 +19547,7 @@ function getComposer(i18n2, target, useComponent = false) {
21042
19547
  if (i18n2.mode === "composition") {
21043
19548
  composer = i18nInternal.__getInstance(current);
21044
19549
  } else {
21045
- {
19550
+ if (__VUE_I18N_LEGACY_API__) {
21046
19551
  const vueI18n = i18nInternal.__getInstance(current);
21047
19552
  if (vueI18n != null) {
21048
19553
  composer = vueI18n.__composer;
@@ -21063,39 +19568,53 @@ function getComposer(i18n2, target, useComponent = false) {
21063
19568
  return composer;
21064
19569
  }
21065
19570
  function setupLifeCycle(i18n2, target, composer) {
19571
+ let emitter = null;
21066
19572
  {
21067
- vue.onMounted(() => {
19573
+ onMounted(() => {
19574
+ if (target.vnode.el) {
19575
+ target.vnode.el.__VUE_I18N__ = composer;
19576
+ emitter = createEmitter();
19577
+ const _composer = composer;
19578
+ _composer[EnableEmitter] && _composer[EnableEmitter](emitter);
19579
+ emitter.on("*", addTimelineEvent);
19580
+ }
21068
19581
  }, target);
21069
- vue.onUnmounted(() => {
19582
+ onUnmounted(() => {
19583
+ if (target.vnode.el && target.vnode.el.__VUE_I18N__) {
19584
+ emitter && emitter.off("*", addTimelineEvent);
19585
+ const _composer = composer;
19586
+ _composer[DisableEmitter] && _composer[DisableEmitter]();
19587
+ delete target.vnode.el.__VUE_I18N__;
19588
+ }
21070
19589
  i18n2.__deleteInstance(target);
21071
19590
  }, target);
21072
19591
  }
21073
19592
  }
21074
19593
  function useI18nForLegacy(instance, scope, root, options = {}) {
21075
19594
  const isLocale = scope === "local";
21076
- const _composer = vue.shallowRef(null);
19595
+ const _composer = shallowRef(null);
21077
19596
  if (isLocale && instance.proxy && !(instance.proxy.$options.i18n || instance.proxy.$options.__i18n)) {
21078
19597
  throw createI18nError(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);
21079
19598
  }
21080
- const _inheritLocale = shared.isBoolean(options.inheritLocale) ? options.inheritLocale : true;
21081
- const _locale = vue.ref(
21082
- isLocale && _inheritLocale ? root.locale.value : shared.isString(options.locale) ? options.locale : coreBase.DEFAULT_LOCALE
19599
+ const _inheritLocale = isBoolean(options.inheritLocale) ? options.inheritLocale : true;
19600
+ const _locale = ref(
19601
+ isLocale && _inheritLocale ? root.locale.value : isString$1(options.locale) ? options.locale : DEFAULT_LOCALE$1
21083
19602
  );
21084
- const _fallbackLocale = vue.ref(
21085
- isLocale && _inheritLocale ? root.fallbackLocale.value : shared.isString(options.fallbackLocale) || shared.isArray(options.fallbackLocale) || shared.isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value
19603
+ const _fallbackLocale = ref(
19604
+ isLocale && _inheritLocale ? root.fallbackLocale.value : isString$1(options.fallbackLocale) || isArray$2(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value
21086
19605
  );
21087
- const _messages = vue.ref(getLocaleMessages(_locale.value, options));
21088
- const _datetimeFormats = vue.ref(shared.isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} });
21089
- const _numberFormats = vue.ref(shared.isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} });
21090
- const _missingWarn = isLocale ? root.missingWarn : shared.isBoolean(options.missingWarn) || shared.isRegExp(options.missingWarn) ? options.missingWarn : true;
21091
- const _fallbackWarn = isLocale ? root.fallbackWarn : shared.isBoolean(options.fallbackWarn) || shared.isRegExp(options.fallbackWarn) ? options.fallbackWarn : true;
21092
- const _fallbackRoot = isLocale ? root.fallbackRoot : shared.isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
19606
+ const _messages = ref(getLocaleMessages(_locale.value, options));
19607
+ const _datetimeFormats = ref(isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} });
19608
+ const _numberFormats = ref(isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} });
19609
+ const _missingWarn = isLocale ? root.missingWarn : isBoolean(options.missingWarn) || isRegExp$1(options.missingWarn) ? options.missingWarn : true;
19610
+ const _fallbackWarn = isLocale ? root.fallbackWarn : isBoolean(options.fallbackWarn) || isRegExp$1(options.fallbackWarn) ? options.fallbackWarn : true;
19611
+ const _fallbackRoot = isLocale ? root.fallbackRoot : isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
21093
19612
  const _fallbackFormat = !!options.fallbackFormat;
21094
- const _missing = shared.isFunction(options.missing) ? options.missing : null;
21095
- const _postTranslation = shared.isFunction(options.postTranslation) ? options.postTranslation : null;
21096
- const _warnHtmlMessage = isLocale ? root.warnHtmlMessage : shared.isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
19613
+ const _missing = isFunction$1(options.missing) ? options.missing : null;
19614
+ const _postTranslation = isFunction$1(options.postTranslation) ? options.postTranslation : null;
19615
+ const _warnHtmlMessage = isLocale ? root.warnHtmlMessage : isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
21097
19616
  const _escapeParameter = !!options.escapeParameter;
21098
- const _modifiers = isLocale ? root.modifiers : shared.isPlainObject(options.modifiers) ? options.modifiers : {};
19617
+ const _modifiers = isLocale ? root.modifiers : isPlainObject(options.modifiers) ? options.modifiers : {};
21099
19618
  const _pluralRules = options.pluralRules || isLocale && root.pluralRules;
21100
19619
  function trackReactivityValues() {
21101
19620
  return [
@@ -21106,7 +19625,7 @@ function useI18nForLegacy(instance, scope, root, options = {}) {
21106
19625
  _numberFormats.value
21107
19626
  ];
21108
19627
  }
21109
- const locale2 = vue.computed({
19628
+ const locale2 = computed({
21110
19629
  get: () => {
21111
19630
  return _composer.value ? _composer.value.locale.value : _locale.value;
21112
19631
  },
@@ -21117,7 +19636,7 @@ function useI18nForLegacy(instance, scope, root, options = {}) {
21117
19636
  _locale.value = val;
21118
19637
  }
21119
19638
  });
21120
- const fallbackLocale = vue.computed({
19639
+ const fallbackLocale = computed({
21121
19640
  get: () => {
21122
19641
  return _composer.value ? _composer.value.fallbackLocale.value : _fallbackLocale.value;
21123
19642
  },
@@ -21128,15 +19647,15 @@ function useI18nForLegacy(instance, scope, root, options = {}) {
21128
19647
  _fallbackLocale.value = val;
21129
19648
  }
21130
19649
  });
21131
- const messages = vue.computed(() => {
19650
+ const messages = computed(() => {
21132
19651
  if (_composer.value) {
21133
19652
  return _composer.value.messages.value;
21134
19653
  } else {
21135
19654
  return _messages.value;
21136
19655
  }
21137
19656
  });
21138
- const datetimeFormats = vue.computed(() => _datetimeFormats.value);
21139
- const numberFormats = vue.computed(() => _numberFormats.value);
19657
+ const datetimeFormats = computed(() => _datetimeFormats.value);
19658
+ const numberFormats = computed(() => _numberFormats.value);
21140
19659
  function getPostTranslationHandler() {
21141
19660
  return _composer.value ? _composer.value.getPostTranslationHandler() : _postTranslation;
21142
19661
  }
@@ -21333,7 +19852,7 @@ function useI18nForLegacy(instance, scope, root, options = {}) {
21333
19852
  composer.missingWarn = _missingWarn;
21334
19853
  composer.warnHtmlMessage = _warnHtmlMessage;
21335
19854
  }
21336
- vue.onBeforeMount(() => {
19855
+ onBeforeMount(() => {
21337
19856
  if (instance.proxy == null || instance.proxy.$i18n == null) {
21338
19857
  throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);
21339
19858
  }
@@ -21363,7 +19882,7 @@ function injectGlobalFields(app, composer) {
21363
19882
  if (!desc) {
21364
19883
  throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);
21365
19884
  }
21366
- const wrap = vue.isRef(desc.value) ? {
19885
+ const wrap = isRef(desc.value) ? {
21367
19886
  get() {
21368
19887
  return desc.value.value;
21369
19888
  },
@@ -21386,24 +19905,18 @@ function injectGlobalFields(app, composer) {
21386
19905
  Object.defineProperty(app.config.globalProperties, `$${method}`, desc);
21387
19906
  });
21388
19907
  }
21389
- coreBase.registerMessageCompiler(coreBase.compileToFunction);
21390
- coreBase.registerMessageResolver(coreBase.resolveValue);
21391
- coreBase.registerLocaleFallbacker(coreBase.fallbackWithLocaleChain);
19908
+ registerMessageCompiler(compileToFunction);
19909
+ registerMessageResolver(resolveValue);
19910
+ registerLocaleFallbacker(fallbackWithLocaleChain);
19911
+ {
19912
+ initFeatureFlags();
19913
+ }
21392
19914
  {
21393
- const target = shared.getGlobalThis();
19915
+ const target = getGlobalThis();
21394
19916
  target.__INTLIFY__ = true;
21395
- coreBase.setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
21396
- }
21397
- vueI18n_cjs.DatetimeFormat = DatetimeFormat;
21398
- vueI18n_cjs.I18nInjectionKey = I18nInjectionKey;
21399
- vueI18n_cjs.NumberFormat = NumberFormat;
21400
- vueI18n_cjs.Translation = Translation;
21401
- vueI18n_cjs.VERSION = VERSION;
21402
- vueI18n_cjs.castToVueI18n = castToVueI18n;
21403
- var createI18n_1 = vueI18n_cjs.createI18n = createI18n;
21404
- vueI18n_cjs.useI18n = useI18n;
21405
- vueI18n_cjs.vTDirective = vTDirective;
21406
- var i18n$1 = createI18n_1({
19917
+ setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
19918
+ }
19919
+ var i18n$1 = createI18n({
21407
19920
  allowComposition: true,
21408
19921
  globalInjection: true,
21409
19922
  fallbackWarn: false,
@@ -21449,7 +19962,7 @@ var i18n = {
21449
19962
  },
21450
19963
  actions: {
21451
19964
  setLocale({ state }, { locale: locale2 = Setting.i18n.default, vm }) {
21452
- const db2 = util$8.db.get(
19965
+ const db2 = util$2.db.get(
21453
19966
  pathInit({
21454
19967
  dbName: "database",
21455
19968
  path: "",
@@ -21468,7 +19981,7 @@ var i18n = {
21468
19981
  },
21469
19982
  async load({ state }, app) {
21470
19983
  let locale2;
21471
- const db2 = util$8.db.get(
19984
+ const db2 = util$2.db.get(
21472
19985
  pathInit({
21473
19986
  dbName: "database",
21474
19987
  path: "",
@@ -21787,8 +20300,8 @@ var log$2 = {
21787
20300
  time: format$3(new Date(), "yyyy-MM-dd HH:mm:ss"),
21788
20301
  meta: {
21789
20302
  user: rootState.admin.user.info,
21790
- uuid: util$8.cookies.get("uuid"),
21791
- token: util$8.cookies.get("token"),
20303
+ uuid: util$2.cookies.get("uuid"),
20304
+ token: util$2.cookies.get("token"),
21792
20305
  url: lodash$1.exports.get(window, "location.href", ""),
21793
20306
  ...meta
21794
20307
  }
@@ -22745,7 +21258,7 @@ const initRouter = (pages2, routes) => {
22745
21258
  });
22746
21259
  } else {
22747
21260
  if (to.matched.some((item) => item.meta.auth)) {
22748
- const token = util$8.cookies.get("token");
21261
+ const token = util$2.cookies.get("token");
22749
21262
  if (token && token !== "undefined") {
22750
21263
  const permissions = store.getters["admin/menu/permission"];
22751
21264
  if (permissions[to.fullPath.substring(1)]) {
@@ -22860,7 +21373,7 @@ var mixinPage = {
22860
21373
  return this.apiBaseURL + "api/Attachment/add";
22861
21374
  },
22862
21375
  uploadHeaders() {
22863
- const token = util$8.cookies.get("token");
21376
+ const token = util$2.cookies.get("token");
22864
21377
  return {
22865
21378
  Authorization: "Bearer " + token
22866
21379
  };
@@ -35308,7 +33821,7 @@ const _sfc_main$D = {
35308
33821
  },
35309
33822
  computed: {
35310
33823
  config() {
35311
- const token = util$8.cookies.get("token");
33824
+ const token = util$2.cookies.get("token");
35312
33825
  return {
35313
33826
  height: this.height == null ? 500 : this.height,
35314
33827
  fileTools_requestHeaders: {
@@ -48559,7 +47072,7 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
48559
47072
  var propertyIsEnumerableModule = __webpack_require__("d1e7");
48560
47073
  var createNonEnumerableProperty = __webpack_require__("9112");
48561
47074
  var redefine = __webpack_require__("6eeb");
48562
- var shared2 = __webpack_require__("5692");
47075
+ var shared = __webpack_require__("5692");
48563
47076
  var sharedKey = __webpack_require__("f772");
48564
47077
  var hiddenKeys = __webpack_require__("d012");
48565
47078
  var uid = __webpack_require__("90e3");
@@ -48582,11 +47095,11 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
48582
47095
  var nativeDefineProperty = definePropertyModule.f;
48583
47096
  var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
48584
47097
  var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
48585
- var AllSymbols = shared2("symbols");
48586
- var ObjectPrototypeSymbols = shared2("op-symbols");
48587
- var StringToSymbolRegistry = shared2("string-to-symbol-registry");
48588
- var SymbolToStringRegistry = shared2("symbol-to-string-registry");
48589
- var WellKnownSymbolsStore = shared2("wks");
47098
+ var AllSymbols = shared("symbols");
47099
+ var ObjectPrototypeSymbols = shared("op-symbols");
47100
+ var StringToSymbolRegistry = shared("string-to-symbol-registry");
47101
+ var SymbolToStringRegistry = shared("symbol-to-string-registry");
47102
+ var WellKnownSymbolsStore = shared("wks");
48590
47103
  var QObject = global2.QObject;
48591
47104
  var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
48592
47105
  var setSymbolDescriptor = DESCRIPTORS && fails(function() {
@@ -48615,7 +47128,7 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
48615
47128
  symbol.description = description;
48616
47129
  return symbol;
48617
47130
  };
48618
- var isSymbol2 = USE_SYMBOL_AS_UID ? function(it) {
47131
+ var isSymbol = USE_SYMBOL_AS_UID ? function(it) {
48619
47132
  return typeof it == "symbol";
48620
47133
  } : function(it) {
48621
47134
  return Object(it) instanceof $Symbol;
@@ -48751,7 +47264,7 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
48751
47264
  return symbol;
48752
47265
  },
48753
47266
  keyFor: function keyFor(sym) {
48754
- if (!isSymbol2(sym))
47267
+ if (!isSymbol(sym))
48755
47268
  throw TypeError(sym + " is not a symbol");
48756
47269
  if (has2(SymbolToStringRegistry, sym))
48757
47270
  return SymbolToStringRegistry[sym];
@@ -48793,13 +47306,13 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
48793
47306
  while (arguments.length > index2)
48794
47307
  args.push(arguments[index2++]);
48795
47308
  $replacer = replacer;
48796
- if (!isObject2(replacer) && it === void 0 || isSymbol2(it))
47309
+ if (!isObject2(replacer) && it === void 0 || isSymbol(it))
48797
47310
  return;
48798
47311
  if (!isArray2(replacer))
48799
47312
  replacer = function(key, value) {
48800
47313
  if (typeof $replacer == "function")
48801
47314
  value = $replacer.call(this, key, value);
48802
- if (!isSymbol2(value))
47315
+ if (!isSymbol(value))
48803
47316
  return value;
48804
47317
  };
48805
47318
  args[1] = replacer;
@@ -48977,12 +47490,12 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
48977
47490
  },
48978
47491
  "b622": function(module2, exports2, __webpack_require__) {
48979
47492
  var global2 = __webpack_require__("da84");
48980
- var shared2 = __webpack_require__("5692");
47493
+ var shared = __webpack_require__("5692");
48981
47494
  var has2 = __webpack_require__("5135");
48982
47495
  var uid = __webpack_require__("90e3");
48983
47496
  var NATIVE_SYMBOL = __webpack_require__("4930");
48984
47497
  var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");
48985
- var WellKnownSymbolsStore = shared2("wks");
47498
+ var WellKnownSymbolsStore = shared("wks");
48986
47499
  var Symbol2 = global2.Symbol;
48987
47500
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2 : Symbol2 && Symbol2.withoutSetter || uid;
48988
47501
  module2.exports = function(name) {
@@ -49681,9 +48194,9 @@ var require$$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
49681
48194
  };
49682
48195
  },
49683
48196
  "f772": function(module2, exports2, __webpack_require__) {
49684
- var shared2 = __webpack_require__("5692");
48197
+ var shared = __webpack_require__("5692");
49685
48198
  var uid = __webpack_require__("90e3");
49686
- var keys2 = shared2("keys");
48199
+ var keys2 = shared("keys");
49687
48200
  module2.exports = function(key) {
49688
48201
  return keys2[key] || (keys2[key] = uid(key));
49689
48202
  };
@@ -85993,10 +84506,10 @@ var SVGPainter = function() {
85993
84506
  }
85994
84507
  this._oldVNode = null;
85995
84508
  };
85996
- SVGPainter2.prototype.toDataURL = function(base642) {
84509
+ SVGPainter2.prototype.toDataURL = function(base64) {
85997
84510
  var str = this.renderToString();
85998
84511
  var prefix2 = "data:image/svg+xml;";
85999
- if (base642) {
84512
+ if (base64) {
86000
84513
  str = encodeBase64(str);
86001
84514
  return str && prefix2 + "base64," + str;
86002
84515
  }
@@ -127341,4 +125854,4 @@ const created = async (app, routes, files2) => {
127341
125854
  store.dispatch("admin/account/load");
127342
125855
  app.config.globalProperties.$pages = pages;
127343
125856
  };
127344
- export { App, applicationApi, index as basicLayout, created, customModelApi, dataSourceApi, API as default, i18n$1 as i18n, initRouter, lodop, mixinPage, modelApi, pages, service as request, router$1 as router, Setting as setting, store, taskApi, util$8 as util };
125857
+ export { App, applicationApi, index as basicLayout, created, customModelApi, dataSourceApi, API as default, i18n$1 as i18n, initRouter, lodop, mixinPage, modelApi, pages, service as request, router$1 as router, Setting as setting, store, taskApi, util$2 as util };