@pie-element/simple-cloze 0.1.4-next.17 → 0.1.4-next.18

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.
@@ -67,7 +67,7 @@ function x(e) {
67
67
  typeset: !1,
68
68
  ready: () => {
69
69
  let e = _(), r = e?.startup, i = !!e?.version?.startsWith("4.");
70
- i && S(e), r?.defaultReady?.(), i && C(r?.document), Promise.resolve(r?.promise).then(() => t(), n);
70
+ i && S(e), r?.defaultReady?.(), i && ee(r?.document), Promise.resolve(r?.promise).then(() => t(), n);
71
71
  }
72
72
  },
73
73
  tex: { macros: { ...a } },
@@ -89,7 +89,7 @@ function S(e) {
89
89
  let t = e?._?.output?.chtml_ts?.CHTML;
90
90
  t && (t.STYLESHEETID = f);
91
91
  }
92
- function C(e) {
92
+ function ee(e) {
93
93
  if (!e) return;
94
94
  let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
95
95
  let n = e.typesetRoot;
@@ -103,32 +103,32 @@ function C(e) {
103
103
  return t && g(t), !1;
104
104
  });
105
105
  let r = e.outputJax?.chtmlStyles;
106
- r?.id === p && (r.id = f), E();
106
+ r?.id === p && (r.id = f), T();
107
107
  }
108
- function w(e) {
108
+ function C(e) {
109
109
  return e instanceof HTMLStyleElement && m.includes(e.id);
110
110
  }
111
- function T(e) {
111
+ function w(e) {
112
112
  n("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
113
113
  }
114
- function E() {
115
- let e = document.head, t = [...e.children].find(w);
114
+ function T() {
115
+ let e = document.head, t = [...e.children].find(C);
116
116
  if (t) {
117
- T(t);
117
+ w(t);
118
118
  return;
119
119
  }
120
120
  let n = new MutationObserver((e) => {
121
121
  for (let t of e) {
122
- let e = [...t.addedNodes].find(w);
122
+ let e = [...t.addedNodes].find(C);
123
123
  if (e) {
124
- T(e), n.disconnect();
124
+ w(e), n.disconnect();
125
125
  return;
126
126
  }
127
127
  }
128
128
  });
129
129
  n.observe(e, { childList: !0 });
130
130
  }
131
- function D(e) {
131
+ function E(e) {
132
132
  return new Promise((t, n) => {
133
133
  let r = e.startup ?? {};
134
134
  e.startup = r;
@@ -139,26 +139,26 @@ function D(e) {
139
139
  };
140
140
  });
141
141
  }
142
- function O(e) {
142
+ function D(e) {
143
143
  let t = _();
144
- return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : D(t) : x(e);
144
+ return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : E(t) : x(e);
145
145
  }
146
- function ee(e) {
147
- return O(e).then(() => {
146
+ function te(e) {
147
+ return D(e).then(() => {
148
148
  typeof _()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
149
149
  });
150
150
  }
151
- function te(e) {
151
+ function ne(e) {
152
152
  let t = globalThis, n = t[d];
153
- return n || (n = ee(e), t[d] = n), n;
153
+ return n || (n = te(e), t[d] = n), n;
154
154
  }
155
- function ne(e = {}) {
155
+ function re(e = {}) {
156
156
  let t = e.useSingleDollar ?? !1;
157
157
  return async (i) => {
158
158
  if (typeof window > "u") return;
159
159
  let a = r();
160
160
  a && n("mathjax-3-global", `window.MathJax is MathJax ${a}`), y(i);
161
- let o = te(e);
161
+ let o = ne(e);
162
162
  if (!b(i, t)) {
163
163
  o.catch(() => {});
164
164
  return;
@@ -168,29 +168,25 @@ function ne(e = {}) {
168
168
  await s?.startup?.promise, typeof s?.typesetPromise == "function" && (await s.typesetPromise([i]), g(i));
169
169
  };
170
170
  }
171
- var k = "@pie-lib/math-rendering", re = "@pie-lib/math-rendering@2", A = null;
172
- function ie() {
173
- return !!window[re]?.opts?.useSingleDollar;
171
+ var ie = "@pie-lib/math-rendering", ae = "@pie-lib/math-rendering@2", O = null;
172
+ function oe() {
173
+ return !!window[ae]?.opts?.useSingleDollar;
174
174
  }
175
- function ae() {
176
- return A ||= ne({ useSingleDollar: ie() }), A;
175
+ function se() {
176
+ return O ||= re({ useSingleDollar: oe() }), O;
177
177
  }
178
- function oe() {
178
+ function ce() {
179
179
  if (typeof window > "u") return null;
180
- let e = window[k];
180
+ let e = window[ie];
181
181
  return typeof e?.renderMath == "function" ? e : null;
182
182
  }
183
- function se() {
184
- let e = r();
185
- e && n("legacy-renderer-delegation", `window['${k}'] renders this element's math with MathJax ${e}`);
186
- }
187
- var ce = async (e) => {
183
+ var le = async (e) => {
188
184
  if (typeof window > "u") return;
189
185
  let t = typeof e == "string", n;
190
186
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
191
- let r = oe();
192
- return r ? (se(), await r.renderMath?.(n)) : await ae()(n), t ? n.innerHTML : void 0;
193
- }, le = {
187
+ let r = ce();
188
+ return r ? await r.renderMath?.(n) : await se()(n), t ? n.innerHTML : void 0;
189
+ }, ue = {
194
190
  translation: {
195
191
  categorize: {
196
192
  limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
@@ -330,7 +326,7 @@ var ce = async (e) => {
330
326
  hideNote: "Hide Note",
331
327
  cancel: "Cancel"
332
328
  }
333
- }, ue = {
329
+ }, de = {
334
330
  translation: {
335
331
  categorize: {
336
332
  limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
@@ -470,55 +466,55 @@ var ce = async (e) => {
470
466
  hideNote: "Ocultar Nota",
471
467
  cancel: "Cancelar"
472
468
  }
473
- }, j = (e) => typeof e == "string", M = () => {
469
+ }, k = (e) => typeof e == "string", A = () => {
474
470
  let e, t, n = new Promise((n, r) => {
475
471
  e = n, t = r;
476
472
  });
477
473
  return n.resolve = e, n.reject = t, n;
478
- }, N = (e) => e == null ? "" : "" + e, de = (e, t, n) => {
474
+ }, j = (e) => e == null ? "" : "" + e, fe = (e, t, n) => {
479
475
  e.forEach((e) => {
480
476
  t[e] && (n[e] = t[e]);
481
477
  });
482
- }, fe = /###/g, P = (e) => e && e.indexOf("###") > -1 ? e.replace(fe, ".") : e, pe = (e) => !e || j(e), F = (e, t, n) => {
483
- let r = j(t) ? t.split(".") : t, i = 0;
478
+ }, pe = /###/g, M = (e) => e && e.indexOf("###") > -1 ? e.replace(pe, ".") : e, N = (e) => !e || k(e), P = (e, t, n) => {
479
+ let r = k(t) ? t.split(".") : t, i = 0;
484
480
  for (; i < r.length - 1;) {
485
- if (pe(e)) return {};
486
- let t = P(r[i]);
481
+ if (N(e)) return {};
482
+ let t = M(r[i]);
487
483
  !e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
488
484
  }
489
- return pe(e) ? {} : {
485
+ return N(e) ? {} : {
490
486
  obj: e,
491
- k: P(r[i])
487
+ k: M(r[i])
492
488
  };
493
- }, I = (e, t, n) => {
494
- let { obj: r, k: i } = F(e, t, Object);
489
+ }, F = (e, t, n) => {
490
+ let { obj: r, k: i } = P(e, t, Object);
495
491
  if (r !== void 0 || t.length === 1) {
496
492
  r[i] = n;
497
493
  return;
498
494
  }
499
- let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = F(e, o, Object);
500
- for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = F(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
495
+ let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = P(e, o, Object);
496
+ for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = P(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
501
497
  s.obj[`${s.k}.${a}`] = n;
502
498
  }, me = (e, t, n, r) => {
503
- let { obj: i, k: a } = F(e, t, Object);
499
+ let { obj: i, k: a } = P(e, t, Object);
504
500
  i[a] = i[a] || [], i[a].push(n);
505
- }, L = (e, t) => {
506
- let { obj: n, k: r } = F(e, t);
501
+ }, I = (e, t) => {
502
+ let { obj: n, k: r } = P(e, t);
507
503
  if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
508
504
  }, he = (e, t, n) => {
509
- let r = L(e, n);
510
- return r === void 0 ? L(t, n) : r;
511
- }, R = (e, t, n) => {
512
- for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? j(e[r]) || e[r] instanceof String || j(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : R(e[r], t[r], n) : e[r] = t[r]);
505
+ let r = I(e, n);
506
+ return r === void 0 ? I(t, n) : r;
507
+ }, L = (e, t, n) => {
508
+ for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? k(e[r]) || e[r] instanceof String || k(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : L(e[r], t[r], n) : e[r] = t[r]);
513
509
  return e;
514
- }, z = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), ge = {
510
+ }, R = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), ge = {
515
511
  "&": "&amp;",
516
512
  "<": "&lt;",
517
513
  ">": "&gt;",
518
514
  "\"": "&quot;",
519
515
  "'": "&#39;",
520
516
  "/": "&#x2F;"
521
- }, _e = (e) => j(e) ? e.replace(/[&<>"'\/]/g, (e) => ge[e]) : e, ve = class {
517
+ }, _e = (e) => k(e) ? e.replace(/[&<>"'\/]/g, (e) => ge[e]) : e, ve = class {
522
518
  constructor(e) {
523
519
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
524
520
  }
@@ -544,7 +540,7 @@ var ce = async (e) => {
544
540
  t > 0 && !i.test(e.substring(0, t)) && (a = !0);
545
541
  }
546
542
  return a;
547
- }, B = (e, t, n = ".") => {
543
+ }, z = (e, t, n = ".") => {
548
544
  if (!e) return;
549
545
  if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
550
546
  let r = t.split(n), i = e;
@@ -563,7 +559,7 @@ var ce = async (e) => {
563
559
  i = t;
564
560
  }
565
561
  return i;
566
- }, V = (e) => e?.replace(/_/g, "-"), Se = {
562
+ }, B = (e) => e?.replace(/_/g, "-"), Se = {
567
563
  type: "logger",
568
564
  log(e) {
569
565
  this.output("log", e);
@@ -577,7 +573,7 @@ var ce = async (e) => {
577
573
  output(e, t) {
578
574
  console?.[e]?.apply?.(console, t);
579
575
  }
580
- }, H = new class e {
576
+ }, V = new class e {
581
577
  constructor(e, t = {}) {
582
578
  this.init(e, t);
583
579
  }
@@ -597,7 +593,7 @@ var ce = async (e) => {
597
593
  return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
598
594
  }
599
595
  forward(e, t, n, r) {
600
- return r && !this.debug ? null : (j(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
596
+ return r && !this.debug ? null : (k(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
601
597
  }
602
598
  create(t) {
603
599
  return new e(this.logger, {
@@ -608,7 +604,7 @@ var ce = async (e) => {
608
604
  clone(t) {
609
605
  return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
610
606
  }
611
- }(), U = class {
607
+ }(), H = class {
612
608
  constructor() {
613
609
  this.observers = {};
614
610
  }
@@ -635,7 +631,7 @@ var ce = async (e) => {
635
631
  for (let i = 0; i < r; i++) n.apply(n, [e, ...t]);
636
632
  });
637
633
  }
638
- }, W = class extends U {
634
+ }, U = class extends H {
639
635
  constructor(e, t = {
640
636
  ns: ["translation"],
641
637
  defaultNS: "translation"
@@ -651,16 +647,16 @@ var ce = async (e) => {
651
647
  }
652
648
  getResource(e, t, n, r = {}) {
653
649
  let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
654
- e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : j(n) && i ? o.push(...n.split(i)) : o.push(n)));
655
- let s = L(this.data, o);
656
- return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !j(n) ? s : B(this.data?.[e]?.[t], n, i);
650
+ e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : k(n) && i ? o.push(...n.split(i)) : o.push(n)));
651
+ let s = I(this.data, o);
652
+ return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !k(n) ? s : z(this.data?.[e]?.[t], n, i);
657
653
  }
658
654
  addResource(e, t, n, r, i = { silent: !1 }) {
659
655
  let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
660
- n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), I(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
656
+ n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), F(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
661
657
  }
662
658
  addResources(e, t, n, r = { silent: !1 }) {
663
- for (let r in n) (j(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
659
+ for (let r in n) (k(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
664
660
  r.silent || this.emit("added", e, t, n);
665
661
  }
666
662
  addResourceBundle(e, t, n, r, i, a = {
@@ -669,11 +665,11 @@ var ce = async (e) => {
669
665
  }) {
670
666
  let o = [e, t];
671
667
  e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
672
- let s = L(this.data, o) || {};
673
- a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? R(s, n, i) : s = {
668
+ let s = I(this.data, o) || {};
669
+ a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? L(s, n, i) : s = {
674
670
  ...s,
675
671
  ...n
676
- }, I(this.data, o, s), a.silent || this.emit("added", e, t, n);
672
+ }, F(this.data, o, s), a.silent || this.emit("added", e, t, n);
677
673
  }
678
674
  removeResourceBundle(e, t) {
679
675
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -694,7 +690,7 @@ var ce = async (e) => {
694
690
  toJSON() {
695
691
  return this.data;
696
692
  }
697
- }, G = {
693
+ }, W = {
698
694
  processors: {},
699
695
  addPostProcessor(e) {
700
696
  this.processors[e.name] = e;
@@ -704,22 +700,22 @@ var ce = async (e) => {
704
700
  t = this.processors[e]?.process(t, n, r, i) ?? t;
705
701
  }), t;
706
702
  }
707
- }, K = Symbol("i18next/PATH_KEY");
703
+ }, G = Symbol("i18next/PATH_KEY");
708
704
  function Ce() {
709
705
  let e = [], t = Object.create(null), n;
710
- return t.get = (r, i) => (n?.revoke?.(), i === K ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
706
+ return t.get = (r, i) => (n?.revoke?.(), i === G ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
711
707
  }
712
- function q(e, t) {
713
- let { [K]: n } = e(Ce()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
708
+ function K(e, t) {
709
+ let { [G]: n } = e(Ce()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
714
710
  if (n.length > 1 && i) {
715
711
  let e = t?.ns, a = Array.isArray(e) ? e : null;
716
712
  if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
717
713
  }
718
714
  return n.join(r);
719
715
  }
720
- var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", we = class e extends U {
716
+ var q = {}, J = (e) => !k(e) && typeof e != "boolean" && typeof e != "number", we = class e extends H {
721
717
  constructor(e, t = {}) {
722
- super(), de([
718
+ super(), fe([
723
719
  "resourceStore",
724
720
  "languageUtils",
725
721
  "pluralResolver",
@@ -727,7 +723,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
727
723
  "backendConnector",
728
724
  "i18nFormat",
729
725
  "utils"
730
- ], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = H.create("translator");
726
+ ], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = V.create("translator");
731
727
  }
732
728
  changeLanguage(e) {
733
729
  e && (this.language = e);
@@ -737,7 +733,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
737
733
  if (e == null) return !1;
738
734
  let r = this.resolve(e, n);
739
735
  if (r?.res === void 0) return !1;
740
- let i = Y(r.res);
736
+ let i = J(r.res);
741
737
  return !(n.returnObjects === !1 && i);
742
738
  }
743
739
  extractFromKey(e, t) {
@@ -748,23 +744,23 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
748
744
  let t = e.match(this.interpolator.nestingRegexp);
749
745
  if (t && t.length > 0) return {
750
746
  key: e,
751
- namespaces: j(i) ? [i] : i
747
+ namespaces: k(i) ? [i] : i
752
748
  };
753
749
  let a = e.split(n);
754
750
  (n !== r || n === r && this.options.ns.indexOf(a[0]) > -1) && (i = a.shift()), e = a.join(r);
755
751
  }
756
752
  return {
757
753
  key: e,
758
- namespaces: j(i) ? [i] : i
754
+ namespaces: k(i) ? [i] : i
759
755
  };
760
756
  }
761
757
  translate(t, n, r) {
762
758
  let i = typeof n == "object" ? { ...n } : n;
763
759
  if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = { ...i }), i ||= {}, t == null) return "";
764
- typeof t == "function" && (t = q(t, {
760
+ typeof t == "function" && (t = K(t, {
765
761
  ...this.options,
766
762
  ...i
767
- })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? q(e, {
763
+ })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? K(e, {
768
764
  ...this.options,
769
765
  ...i
770
766
  }) : String(e));
@@ -790,42 +786,42 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
790
786
  "[object Number]",
791
787
  "[object Function]",
792
788
  "[object RegExp]"
793
- ], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !j(i.count), x = e.hasDefaultValue(i), S = b ? this.pluralResolver.getSuffix(d, i.count, i) : "", C = i.ordinal && b ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", w = b && !i.ordinal && i.count === 0, T = w && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${S}`] || i[`defaultValue${C}`] || i.defaultValue, E = m;
794
- y && !m && x && (E = T);
795
- let D = Y(E), O = Object.prototype.toString.apply(E);
796
- if (y && E && D && _.indexOf(O) < 0 && !(j(v) && Array.isArray(E))) {
789
+ ], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !k(i.count), x = e.hasDefaultValue(i), S = b ? this.pluralResolver.getSuffix(d, i.count, i) : "", ee = i.ordinal && b ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", C = b && !i.ordinal && i.count === 0, w = C && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${S}`] || i[`defaultValue${ee}`] || i.defaultValue, T = m;
790
+ y && !m && x && (T = w);
791
+ let E = J(T), D = Object.prototype.toString.apply(T);
792
+ if (y && T && E && _.indexOf(D) < 0 && !(k(v) && Array.isArray(T))) {
797
793
  if (!i.returnObjects && !this.options.returnObjects) {
798
794
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
799
- let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, E, {
795
+ let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, T, {
800
796
  ...i,
801
797
  ns: c
802
798
  }) : `key '${s} (${this.language})' returned an object instead of string.`;
803
799
  return a ? (p.res = e, p.usedParams = this.getUsedParamsDetails(i), p) : e;
804
800
  }
805
801
  if (o) {
806
- let e = Array.isArray(E), t = e ? [] : {}, n = e ? g : h;
807
- for (let e in E) if (Object.prototype.hasOwnProperty.call(E, e)) {
802
+ let e = Array.isArray(T), t = e ? [] : {}, n = e ? g : h;
803
+ for (let e in T) if (Object.prototype.hasOwnProperty.call(T, e)) {
808
804
  let r = `${n}${o}${e}`;
809
805
  x && !m ? t[e] = this.translate(r, {
810
806
  ...i,
811
- defaultValue: Y(T) ? T[e] : void 0,
807
+ defaultValue: J(w) ? w[e] : void 0,
812
808
  joinArrays: !1,
813
809
  ns: c
814
810
  }) : t[e] = this.translate(r, {
815
811
  ...i,
816
812
  joinArrays: !1,
817
813
  ns: c
818
- }), t[e] === r && (t[e] = E[e]);
814
+ }), t[e] === r && (t[e] = T[e]);
819
815
  }
820
816
  m = t;
821
817
  }
822
- } else if (y && j(v) && Array.isArray(m)) m = m.join(v), m &&= this.extendTranslation(m, t, i, r);
818
+ } else if (y && k(v) && Array.isArray(m)) m = m.join(v), m &&= this.extendTranslation(m, t, i, r);
823
819
  else {
824
820
  let e = !1, n = !1;
825
- !this.isValidLookup(m) && x && (e = !0, m = T), this.isValidLookup(m) || (n = !0, m = s);
826
- let a = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n ? void 0 : m, c = x && T !== m && this.options.updateMissing;
821
+ !this.isValidLookup(m) && x && (e = !0, m = w), this.isValidLookup(m) || (n = !0, m = s);
822
+ let a = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n ? void 0 : m, c = x && w !== m && this.options.updateMissing;
827
823
  if (n || e || c) {
828
- if (this.logger.log(c ? "updateKey" : "missingKey", d, l, s, c ? T : m), o) {
824
+ if (this.logger.log(c ? "updateKey" : "missingKey", d, l, s, c ? w : m), o) {
829
825
  let e = this.resolve(s, {
830
826
  ...i,
831
827
  keySeparator: !1
@@ -841,10 +837,10 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
841
837
  };
842
838
  this.options.saveMissing && (this.options.saveMissingPlurals && b ? e.forEach((e) => {
843
839
  let t = this.pluralResolver.getSuffixes(e, i);
844
- w && i[`defaultValue${this.options.pluralSeparator}zero`] && t.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t.push(`${this.options.pluralSeparator}zero`), t.forEach((t) => {
845
- n([e], s + t, i[`defaultValue${t}`] || T);
840
+ C && i[`defaultValue${this.options.pluralSeparator}zero`] && t.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t.push(`${this.options.pluralSeparator}zero`), t.forEach((t) => {
841
+ n([e], s + t, i[`defaultValue${t}`] || w);
846
842
  });
847
- }) : n(e, s, T));
843
+ }) : n(e, s, w));
848
844
  }
849
845
  m = this.extendTranslation(m, t, i, p, r), n && m === s && this.options.appendNamespaceToMissingKey && (m = `${l}${u}${s}`), (n || e) && this.options.parseMissingKeyHandler && (m = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${u}${s}` : s, e ? m : void 0, i));
850
846
  }
@@ -863,12 +859,12 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
863
859
  ...n.interpolation
864
860
  }
865
861
  });
866
- let a = j(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
862
+ let a = k(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
867
863
  if (a) {
868
864
  let t = e.match(this.interpolator.nestingRegexp);
869
865
  o = t && t.length;
870
866
  }
871
- let s = n.replace && !j(n.replace) ? n.replace : n;
867
+ let s = n.replace && !k(n.replace) ? n.replace : n;
872
868
  if (this.options.interpolation.defaultVariables && (s = {
873
869
  ...this.options.interpolation.defaultVariables,
874
870
  ...s
@@ -878,8 +874,8 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
878
874
  }
879
875
  !n.lng && r && r.res && (n.lng = this.language || r.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...e) => i?.[0] === e[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : this.translate(...e, t), n)), n.interpolation && this.interpolator.reset();
880
876
  }
881
- let a = n.postProcess || this.options.postProcess, o = j(a) ? [a] : a;
882
- return e != null && o?.length && n.applyPostProcessor !== !1 && (e = G.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
877
+ let a = n.postProcess || this.options.postProcess, o = k(a) ? [a] : a;
878
+ return e != null && o?.length && n.applyPostProcessor !== !1 && (e = W.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
883
879
  i18nResolved: {
884
880
  ...r,
885
881
  usedParams: this.getUsedParamsDetails(n)
@@ -889,7 +885,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
889
885
  }
890
886
  resolve(e, t = {}) {
891
887
  let n, r, i, a, o;
892
- return j(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? q(e, {
888
+ return k(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? K(e, {
893
889
  ...this.options,
894
890
  ...t
895
891
  }) : e)), e.forEach((e) => {
@@ -898,9 +894,9 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
898
894
  r = c;
899
895
  let l = s.namespaces;
900
896
  this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
901
- let u = t.count !== void 0 && !j(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (j(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
897
+ let u = t.count !== void 0 && !k(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (k(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
902
898
  l.forEach((e) => {
903
- this.isValidLookup(n) || (o = e, !J[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (J[`${p[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach((r) => {
899
+ this.isValidLookup(n) || (o = e, !q[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (q[`${p[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach((r) => {
904
900
  if (this.isValidLookup(n)) return;
905
901
  a = r;
906
902
  let o = [c];
@@ -949,7 +945,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
949
945
  "joinArrays",
950
946
  "postProcess",
951
947
  "interpolation"
952
- ], n = e.replace && !j(e.replace), r = n ? e.replace : e;
948
+ ], n = e.replace && !k(e.replace), r = n ? e.replace : e;
953
949
  if (n && e.count !== void 0 && (r.count = e.count), this.options.interpolation.defaultVariables && (r = {
954
950
  ...this.options.interpolation.defaultVariables,
955
951
  ...r
@@ -965,20 +961,20 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
965
961
  }
966
962
  }, Te = class {
967
963
  constructor(e) {
968
- this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = H.create("languageUtils");
964
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = V.create("languageUtils");
969
965
  }
970
966
  getScriptPartFromCode(e) {
971
- if (e = V(e), !e || e.indexOf("-") < 0) return null;
967
+ if (e = B(e), !e || e.indexOf("-") < 0) return null;
972
968
  let t = e.split("-");
973
969
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
974
970
  }
975
971
  getLanguagePartFromCode(e) {
976
- if (e = V(e), !e || e.indexOf("-") < 0) return e;
972
+ if (e = B(e), !e || e.indexOf("-") < 0) return e;
977
973
  let t = e.split("-");
978
974
  return this.formatLanguageCode(t[0]);
979
975
  }
980
976
  formatLanguageCode(e) {
981
- if (j(e) && e.indexOf("-") > -1) {
977
+ if (k(e) && e.indexOf("-") > -1) {
982
978
  let t;
983
979
  try {
984
980
  t = Intl.getCanonicalLocales(e)[0];
@@ -1010,7 +1006,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1010
1006
  }
1011
1007
  getFallbackCodes(e, t) {
1012
1008
  if (!e) return [];
1013
- if (typeof e == "function" && (e = e(t)), j(e) && (e = [e]), Array.isArray(e)) return e;
1009
+ if (typeof e == "function" && (e = e(t)), k(e) && (e = [e]), Array.isArray(e)) return e;
1014
1010
  if (!t) return e.default || [];
1015
1011
  let n = e[t];
1016
1012
  return n ||= e[this.getScriptPartFromCode(t)], n ||= e[this.formatLanguageCode(t)], n ||= e[this.getLanguagePartFromCode(t)], n ||= e.default, n || [];
@@ -1019,7 +1015,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1019
1015
  let n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), r = [], i = (e) => {
1020
1016
  e && (this.isSupportedCode(e) ? r.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
1021
1017
  };
1022
- return j(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : j(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
1018
+ return k(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : k(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
1023
1019
  r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
1024
1020
  }), r;
1025
1021
  }
@@ -1035,13 +1031,13 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1035
1031
  resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
1036
1032
  }, Oe = class {
1037
1033
  constructor(e, t = {}) {
1038
- this.languageUtils = e, this.options = t, this.logger = H.create("pluralResolver"), this.pluralRulesCache = {};
1034
+ this.languageUtils = e, this.options = t, this.logger = V.create("pluralResolver"), this.pluralRulesCache = {};
1039
1035
  }
1040
1036
  clearCache() {
1041
1037
  this.pluralRulesCache = {};
1042
1038
  }
1043
1039
  getRule(e, t = {}) {
1044
- let n = V(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
1040
+ let n = B(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
1045
1041
  cleanedCode: n,
1046
1042
  type: r
1047
1043
  });
@@ -1074,15 +1070,15 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1074
1070
  }
1075
1071
  }, ke = (e, t, n, r = ".", i = !0) => {
1076
1072
  let a = he(e, t, n);
1077
- return !a && i && j(n) && (a = B(e, n, r), a === void 0 && (a = B(t, n, r))), a;
1078
- }, X = (e) => e.replace(/\$/g, "$$$$"), Ae = class {
1073
+ return !a && i && k(n) && (a = z(e, n, r), a === void 0 && (a = z(t, n, r))), a;
1074
+ }, Y = (e) => e.replace(/\$/g, "$$$$"), Ae = class {
1079
1075
  constructor(e = {}) {
1080
- this.logger = H.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
1076
+ this.logger = V.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
1081
1077
  }
1082
1078
  init(e = {}) {
1083
1079
  e.interpolation ||= { escapeValue: !0 };
1084
1080
  let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
1085
- this.escape = t === void 0 ? _e : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? z(i) : a || "{{", this.suffix = o ? z(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? z(d) : f || z("$t("), this.nestingSuffix = p ? z(p) : m || z(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
1081
+ this.escape = t === void 0 ? _e : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? R(i) : a || "{{", this.suffix = o ? R(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? R(d) : f || R("$t("), this.nestingSuffix = p ? R(p) : m || R(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
1086
1082
  }
1087
1083
  reset() {
1088
1084
  this.options && this.init(this.options);
@@ -1112,22 +1108,22 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1112
1108
  let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, u = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
1113
1109
  return [{
1114
1110
  regex: this.regexpUnescape,
1115
- safeValue: (e) => X(e)
1111
+ safeValue: (e) => Y(e)
1116
1112
  }, {
1117
1113
  regex: this.regexp,
1118
- safeValue: (e) => this.escapeValue ? X(this.escape(e)) : X(e)
1114
+ safeValue: (e) => this.escapeValue ? Y(this.escape(e)) : Y(e)
1119
1115
  }].forEach((t) => {
1120
1116
  for (o = 0; i = t.regex.exec(e);) {
1121
1117
  let n = i[1].trim();
1122
1118
  if (a = c(n), a === void 0) if (typeof l == "function") {
1123
1119
  let t = l(e, i, r);
1124
- a = j(t) ? t : "";
1120
+ a = k(t) ? t : "";
1125
1121
  } else if (r && Object.prototype.hasOwnProperty.call(r, n)) a = "";
1126
1122
  else if (u) {
1127
1123
  a = i[0];
1128
1124
  continue;
1129
1125
  } else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
1130
- else !j(a) && !this.useRawValueToEscape && (a = N(a));
1126
+ else !k(a) && !this.useRawValueToEscape && (a = j(a));
1131
1127
  let s = t.safeValue(a);
1132
1128
  if (e = e.replace(i[0], s), u ? (t.regex.lastIndex += a.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
1133
1129
  }
@@ -1137,7 +1133,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1137
1133
  let r, i, a, o = (e, t) => {
1138
1134
  let n = this.nestingOptionsSeparator;
1139
1135
  if (e.indexOf(n) < 0) return e;
1140
- let r = e.split(RegExp(`${z(n)}[ ]*{`)), i = `{${r[1]}`;
1136
+ let r = e.split(RegExp(`${R(n)}[ ]*{`)), i = `{${r[1]}`;
1141
1137
  e = r[0], i = this.interpolate(i, a);
1142
1138
  let o = i.match(/'/g), s = i.match(/"/g);
1143
1139
  ((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
@@ -1153,10 +1149,10 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1153
1149
  };
1154
1150
  for (; r = this.nestingRegexp.exec(e);) {
1155
1151
  let s = [];
1156
- a = { ...n }, a = a.replace && !j(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
1152
+ a = { ...n }, a = a.replace && !k(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
1157
1153
  let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
1158
- if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !j(i)) return i;
1159
- j(i) || (i = N(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
1154
+ if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !k(i)) return i;
1155
+ k(i) || (i = j(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
1160
1156
  ...n,
1161
1157
  interpolationkey: r[1].trim()
1162
1158
  }), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
@@ -1189,11 +1185,11 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1189
1185
  [i.interpolationkey]: void 0
1190
1186
  });
1191
1187
  let o = r + JSON.stringify(a), s = t[o];
1192
- return s || (s = e(V(r), i), t[o] = s), s(n);
1188
+ return s || (s = e(B(r), i), t[o] = s), s(n);
1193
1189
  };
1194
- }, Ne = (e) => (t, n, r) => e(V(n), r)(t), Pe = class {
1190
+ }, Ne = (e) => (t, n, r) => e(B(n), r)(t), Pe = class {
1195
1191
  constructor(e = {}) {
1196
- this.logger = H.create("formatter"), this.options = e, this.init(e);
1192
+ this.logger = V.create("formatter"), this.options = e, this.init(e);
1197
1193
  }
1198
1194
  init(e, t = { interpolation: {} }) {
1199
1195
  this.formatSeparator = t.interpolation.formatSeparator || ",";
@@ -1257,9 +1253,9 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1257
1253
  }
1258
1254
  }, Fe = (e, t) => {
1259
1255
  e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
1260
- }, Ie = class extends U {
1256
+ }, Ie = class extends H {
1261
1257
  constructor(e, t, n, r = {}) {
1262
- super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = H.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
1258
+ super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = V.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
1263
1259
  }
1264
1260
  queueLoad(e, t, n, r) {
1265
1261
  let i = {}, a = {}, o = {}, s = {};
@@ -1336,7 +1332,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1336
1332
  }
1337
1333
  prepareLoading(e, t, n = {}, r) {
1338
1334
  if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
1339
- j(e) && (e = this.languageUtils.toResolveHierarchy(e)), j(t) && (t = [t]);
1335
+ k(e) && (e = this.languageUtils.toResolveHierarchy(e)), k(t) && (t = [t]);
1340
1336
  let i = this.queueLoad(e, t, n, r);
1341
1337
  if (!i.toLoad.length) return i.pending.length || r(), null;
1342
1338
  i.toLoad.forEach((e) => {
@@ -1377,7 +1373,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1377
1373
  !e || !e[0] || this.store.addResource(e[0], t, n, r);
1378
1374
  }
1379
1375
  }
1380
- }, Z = () => ({
1376
+ }, X = () => ({
1381
1377
  debug: !1,
1382
1378
  initAsync: !0,
1383
1379
  ns: ["translation"],
@@ -1412,7 +1408,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1412
1408
  appendNamespaceToCIMode: !1,
1413
1409
  overloadTranslationOptionHandler: (e) => {
1414
1410
  let t = {};
1415
- if (typeof e[1] == "object" && (t = e[1]), j(e[1]) && (t.defaultValue = e[1]), j(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
1411
+ if (typeof e[1] == "object" && (t = e[1]), k(e[1]) && (t.defaultValue = e[1]), k(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
1416
1412
  let n = e[3] || e[2];
1417
1413
  Object.keys(n).forEach((e) => {
1418
1414
  t[e] = n[e];
@@ -1434,15 +1430,15 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1434
1430
  skipOnVariables: !0
1435
1431
  },
1436
1432
  cacheInBuiltFormats: !0
1437
- }), Le = (e) => (j(e.ns) && (e.ns = [e.ns]), j(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), j(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Q = () => {}, Re = (e) => {
1433
+ }), Z = (e) => (k(e.ns) && (e.ns = [e.ns]), k(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), k(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Q = () => {}, Le = (e) => {
1438
1434
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
1439
1435
  typeof e[t] == "function" && (e[t] = e[t].bind(e));
1440
1436
  });
1441
- }, ze = "__i18next_supportNoticeShown", Be = () => !!(typeof globalThis < "u" && globalThis[ze] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), Ve = () => {
1442
- typeof globalThis < "u" && (globalThis[ze] = !0);
1443
- }, He = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), $ = class e extends U {
1437
+ }, Re = "__i18next_supportNoticeShown", ze = () => !!(typeof globalThis < "u" && globalThis[Re] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), Be = () => {
1438
+ typeof globalThis < "u" && (globalThis[Re] = !0);
1439
+ }, Ve = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), $ = class e extends H {
1444
1440
  constructor(e = {}, t) {
1445
- if (super(), this.options = Le(e), this.services = {}, this.logger = H, this.modules = { external: [] }, Re(this), t && !this.isInitialized && !e.isClone) {
1441
+ if (super(), this.options = Z(e), this.services = {}, this.logger = V, this.modules = { external: [] }, Le(this), t && !this.isInitialized && !e.isClone) {
1446
1442
  if (!this.options.initAsync) return this.init(e, t), this;
1447
1443
  setTimeout(() => {
1448
1444
  this.init(e, t);
@@ -1450,25 +1446,25 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1450
1446
  }
1451
1447
  }
1452
1448
  init(e = {}, t) {
1453
- this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (j(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
1454
- let n = Z();
1449
+ this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (k(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
1450
+ let n = X();
1455
1451
  this.options = {
1456
1452
  ...n,
1457
1453
  ...this.options,
1458
- ...Le(e)
1454
+ ...Z(e)
1459
1455
  }, this.options.interpolation = {
1460
1456
  ...n.interpolation,
1461
1457
  ...this.options.interpolation
1462
- }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !He(this) && !Be() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), Ve());
1458
+ }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !Ve(this) && !ze() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), Be());
1463
1459
  let r = (e) => e ? typeof e == "function" ? new e() : e : null;
1464
1460
  if (!this.options.isClone) {
1465
- this.modules.logger ? H.init(r(this.modules.logger), this.options) : H.init(null, this.options);
1461
+ this.modules.logger ? V.init(r(this.modules.logger), this.options) : V.init(null, this.options);
1466
1462
  let e;
1467
1463
  e = this.modules.formatter ? this.modules.formatter : Pe;
1468
1464
  let t = new Te(this.options);
1469
- this.store = new W(this.options.resources, this.options);
1465
+ this.store = new U(this.options.resources, this.options);
1470
1466
  let i = this.services;
1471
- i.logger = H, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new Oe(t, {
1467
+ i.logger = V, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new Oe(t, {
1472
1468
  prepend: this.options.pluralSeparator,
1473
1469
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
1474
1470
  }), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), e && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (i.formatter = r(e), i.formatter.init && i.formatter.init(i, this.options), this.options.interpolation.format = i.formatter.format.bind(i.formatter)), i.interpolator = new Ae(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new Ie(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
@@ -1498,7 +1494,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1498
1494
  ].forEach((e) => {
1499
1495
  this[e] = (...t) => (this.store[e](...t), this);
1500
1496
  });
1501
- let i = M(), a = () => {
1497
+ let i = A(), a = () => {
1502
1498
  let e = (e, n) => {
1503
1499
  this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), i.resolve(n), t(e, n);
1504
1500
  };
@@ -1508,7 +1504,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1508
1504
  return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
1509
1505
  }
1510
1506
  loadResources(e, t = Q) {
1511
- let n = t, r = j(e) ? e : this.language;
1507
+ let n = t, r = k(e) ? e : this.language;
1512
1508
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
1513
1509
  if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
1514
1510
  let e = [], t = (t) => {
@@ -1522,7 +1518,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1522
1518
  } else n(null);
1523
1519
  }
1524
1520
  reloadResources(e, t, n) {
1525
- let r = M();
1521
+ let r = A();
1526
1522
  return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= Q, this.services.backendConnector.reload(e, t, (e) => {
1527
1523
  r.resolve(), n(e);
1528
1524
  }), r;
@@ -1530,7 +1526,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1530
1526
  use(e) {
1531
1527
  if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
1532
1528
  if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
1533
- return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && G.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1529
+ return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && W.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1534
1530
  }
1535
1531
  setResolvedLanguage(e) {
1536
1532
  if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
@@ -1546,7 +1542,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1546
1542
  }
1547
1543
  changeLanguage(e, t) {
1548
1544
  this.isLanguageChangingTo = e;
1549
- let n = M();
1545
+ let n = A();
1550
1546
  this.emit("languageChanging", e);
1551
1547
  let r = (e) => {
1552
1548
  this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
@@ -1554,7 +1550,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1554
1550
  a ? this.isLanguageChangingTo === e && (r(a), this.translator.changeLanguage(a), this.isLanguageChangingTo = void 0, this.emit("languageChanged", a), this.logger.log("languageChanged", a)) : this.isLanguageChangingTo = void 0, n.resolve((...e) => this.t(...e)), t && t(i, (...e) => this.t(...e));
1555
1551
  }, a = (t) => {
1556
1552
  !e && !t && this.services.languageDetector && (t = []);
1557
- let n = j(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(j(t) ? [t] : t);
1553
+ let n = k(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(k(t) ? [t] : t);
1558
1554
  a && (this.language || r(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector?.cacheUserLanguage?.(a)), this.loadResources(a, (e) => {
1559
1555
  i(e, a);
1560
1556
  });
@@ -1569,11 +1565,11 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1569
1565
  ...this.options,
1570
1566
  ...a
1571
1567
  };
1572
- typeof a.keyPrefix == "function" && (a.keyPrefix = q(a.keyPrefix, o));
1568
+ typeof a.keyPrefix == "function" && (a.keyPrefix = K(a.keyPrefix, o));
1573
1569
  let s = this.options.keySeparator || ".", c;
1574
- return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = q(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = q(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
1570
+ return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = K(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = K(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
1575
1571
  };
1576
- return j(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
1572
+ return k(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
1577
1573
  }
1578
1574
  t(...e) {
1579
1575
  return this.translator?.translate(...e);
@@ -1600,16 +1596,16 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1600
1596
  return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
1601
1597
  }
1602
1598
  loadNamespaces(e, t) {
1603
- let n = M();
1604
- return this.options.ns ? (j(e) && (e = [e]), e.forEach((e) => {
1599
+ let n = A();
1600
+ return this.options.ns ? (k(e) && (e = [e]), e.forEach((e) => {
1605
1601
  this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
1606
1602
  }), this.loadResources((e) => {
1607
1603
  n.resolve(), t && t(e);
1608
1604
  }), n) : (t && t(), Promise.resolve());
1609
1605
  }
1610
1606
  loadLanguages(e, t) {
1611
- let n = M();
1612
- j(e) && (e = [e]);
1607
+ let n = A();
1608
+ k(e) && (e = [e]);
1613
1609
  let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
1614
1610
  return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
1615
1611
  n.resolve(), t && t(e);
@@ -1624,7 +1620,7 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1624
1620
  if (e && e.direction) return e.direction;
1625
1621
  }
1626
1622
  } catch {}
1627
- let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new Te(Z());
1623
+ let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new Te(X());
1628
1624
  return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1629
1625
  }
1630
1626
  static createInstance(t = {}, n) {
@@ -1645,9 +1641,9 @@ var J = {}, Y = (e) => !j(e) && typeof e != "boolean" && typeof e != "number", w
1645
1641
  "language"
1646
1642
  ].forEach((e) => {
1647
1643
  a[e] = this[e];
1648
- }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new W(Object.keys(this.store.data).reduce((e, t) => (e[t] = { ...this.store.data[t] }, e[t] = Object.keys(e[t]).reduce((n, r) => (n[r] = { ...e[t][r] }, n), e[t]), e), {}), i), a.services.resourceStore = a.store), t.interpolation) {
1644
+ }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new U(Object.keys(this.store.data).reduce((e, t) => (e[t] = { ...this.store.data[t] }, e[t] = Object.keys(e[t]).reduce((n, r) => (n[r] = { ...e[t][r] }, n), e[t]), e), {}), i), a.services.resourceStore = a.store), t.interpolation) {
1649
1645
  let e = {
1650
- ...Z().interpolation,
1646
+ ...X().interpolation,
1651
1647
  ...this.options.interpolation,
1652
1648
  ...t.interpolation
1653
1649
  }, n = {
@@ -1677,13 +1673,13 @@ $.createInstance, $.dir, $.init, $.loadResources, $.reloadResources, $.use, $.ch
1677
1673
  lng: "en",
1678
1674
  showSupportNotice: !1,
1679
1675
  resources: {
1680
- en: le,
1681
- es: ue
1676
+ en: ue,
1677
+ es: de
1682
1678
  }
1683
1679
  });
1684
1680
  //#endregion
1685
1681
  //#region src/i18n.ts
1686
- var { translator: Ue } = {
1682
+ var { translator: He } = {
1687
1683
  translator: {
1688
1684
  ...$,
1689
1685
  t: (e, t) => {
@@ -1715,13 +1711,13 @@ var { translator: Ue } = {
1715
1711
  label: "Spanish"
1716
1712
  }]
1717
1713
  };
1718
- function We(e, t) {
1719
- return Ue.t(`translation:simpleCloze:${e}`, { lng: t });
1714
+ function Ue(e, t) {
1715
+ return He.t(`translation:simpleCloze:${e}`, { lng: t });
1720
1716
  }
1721
- function Ge(e, t) {
1722
- return Ue.t(`common:${e}`, { lng: t });
1717
+ function We(e, t) {
1718
+ return He.t(`common:${e}`, { lng: t });
1723
1719
  }
1724
1720
  //#endregion
1725
- export { Ge as n, ce as r, We as t };
1721
+ export { We as n, le as r, Ue as t };
1726
1722
 
1727
- //# sourceMappingURL=i18n-C7YV9VIN.js.map
1723
+ //# sourceMappingURL=i18n-D6nL3i8G.js.map