@pie-element/simple-cloze 0.1.4-next.19 → 0.1.4-next.20

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.
package/module/print.js CHANGED
@@ -2124,22 +2124,29 @@ function si() {
2124
2124
  return window.MathJax;
2125
2125
  }
2126
2126
  function ci(e) {
2127
- let t = e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e;
2128
- for (let [e, n] of ei) if (t.startsWith(e) && t.endsWith(n)) return t.substring(e.length, t.length - n.length);
2129
- return t;
2127
+ for (let [t, n] of ei) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
2128
+ return e;
2130
2129
  }
2131
2130
  function li(e) {
2131
+ return ci(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
2132
+ }
2133
+ var ui = "mathjax_ignore", di = "mathjax_process";
2134
+ function fi(e, t) {
2135
+ let n = e.closest(`.${ui}, .${di}`);
2136
+ return n !== null && t.contains(n) && !n.classList.contains(di);
2137
+ }
2138
+ function pi(e) {
2132
2139
  for (let t of e.querySelectorAll("[data-latex]")) {
2133
- if (t.dataset.mathHandled || t.closest("mjx-container")) continue;
2134
- let e = t.textContent;
2135
- e && (t.textContent = `\\(${ci(e)}\\)`.replace($r, "\\newline "), t.dataset.mathHandled = "true");
2140
+ if (t.dataset.mathHandled || t.closest("mjx-container") || fi(t, e)) continue;
2141
+ let n = t.textContent;
2142
+ n && (t.textContent = `\\(${li(n)}\\)`.replace($r, "\\newline "), t.dataset.mathHandled = "true");
2136
2143
  }
2137
2144
  }
2138
- function ui(e, t) {
2145
+ function mi(e, t) {
2139
2146
  for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
2140
2147
  return (t ? Qr : Zr).test(e.textContent ?? "");
2141
2148
  }
2142
- function di(e) {
2149
+ function hi(e) {
2143
2150
  return new Promise((t, n) => {
2144
2151
  let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: a = !0, srcUrl: o } = e, s = {
2145
2152
  loader: {
@@ -2150,7 +2157,7 @@ function di(e) {
2150
2157
  typeset: !1,
2151
2158
  ready: () => {
2152
2159
  let e = si(), r = e?.startup, i = !!e?.version?.startsWith("4.");
2153
- i && fi(e), r?.defaultReady?.(), i && pi(r?.document), Promise.resolve(r?.promise).then(() => t(), n);
2160
+ i && gi(e), r?.defaultReady?.(), i && _i(r?.document), Promise.resolve(r?.promise).then(() => t(), n);
2154
2161
  }
2155
2162
  },
2156
2163
  tex: { macros: { ...Yr } },
@@ -2168,11 +2175,11 @@ function di(e) {
2168
2175
  c.src = o || Jr, c.async = !0, c.onerror = () => n(/* @__PURE__ */ Error("Failed to load MathJax")), document.head.appendChild(c);
2169
2176
  });
2170
2177
  }
2171
- function fi(e) {
2178
+ function gi(e) {
2172
2179
  let t = e?._?.output?.chtml_ts?.CHTML;
2173
2180
  t && (t.STYLESHEETID = ni);
2174
2181
  }
2175
- function pi(e) {
2182
+ function _i(e) {
2176
2183
  if (!e) return;
2177
2184
  let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
2178
2185
  let n = e.typesetRoot;
@@ -2186,32 +2193,32 @@ function pi(e) {
2186
2193
  return t && oi(t), !1;
2187
2194
  });
2188
2195
  let r = e.outputJax?.chtmlStyles;
2189
- r?.id === ri && (r.id = ni), gi();
2196
+ r?.id === ri && (r.id = ni), bi();
2190
2197
  }
2191
- function mi(e) {
2198
+ function vi(e) {
2192
2199
  return e instanceof HTMLStyleElement && ii.includes(e.id);
2193
2200
  }
2194
- function hi(e) {
2201
+ function yi(e) {
2195
2202
  Kr("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
2196
2203
  }
2197
- function gi() {
2198
- let e = document.head, t = [...e.children].find(mi);
2204
+ function bi() {
2205
+ let e = document.head, t = [...e.children].find(vi);
2199
2206
  if (t) {
2200
- hi(t);
2207
+ yi(t);
2201
2208
  return;
2202
2209
  }
2203
2210
  let n = new MutationObserver((e) => {
2204
2211
  for (let t of e) {
2205
- let e = [...t.addedNodes].find(mi);
2212
+ let e = [...t.addedNodes].find(vi);
2206
2213
  if (e) {
2207
- hi(e), n.disconnect();
2214
+ yi(e), n.disconnect();
2208
2215
  return;
2209
2216
  }
2210
2217
  }
2211
2218
  });
2212
2219
  n.observe(e, { childList: !0 });
2213
2220
  }
2214
- function _i(e) {
2221
+ function xi(e) {
2215
2222
  return new Promise((t, n) => {
2216
2223
  let r = e.startup ?? {};
2217
2224
  e.startup = r;
@@ -2222,27 +2229,27 @@ function _i(e) {
2222
2229
  };
2223
2230
  });
2224
2231
  }
2225
- function vi(e) {
2232
+ function Si(e) {
2226
2233
  let t = si();
2227
- return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : _i(t) : di(e);
2234
+ return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : xi(t) : hi(e);
2228
2235
  }
2229
- function yi(e) {
2230
- return vi(e).then(() => {
2236
+ function Ci(e) {
2237
+ return Si(e).then(() => {
2231
2238
  typeof si()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
2232
2239
  });
2233
2240
  }
2234
- function bi(e) {
2241
+ function wi(e) {
2235
2242
  let t = globalThis, n = t[ti];
2236
- return n || (n = yi(e), t[ti] = n), n;
2243
+ return n || (n = Ci(e), t[ti] = n), n;
2237
2244
  }
2238
- function xi(e = {}) {
2245
+ function Ti(e = {}) {
2239
2246
  let t = e.useSingleDollar ?? !1;
2240
2247
  return async (n) => {
2241
2248
  if (typeof window > "u") return;
2242
2249
  let r = qr();
2243
- r && Kr("mathjax-3-global", `window.MathJax is MathJax ${r}`), li(n);
2244
- let i = bi(e);
2245
- if (!ui(n, t)) {
2250
+ r && Kr("mathjax-3-global", `window.MathJax is MathJax ${r}`), pi(n);
2251
+ let i = wi(e);
2252
+ if (!mi(n, t)) {
2246
2253
  i.catch(() => {});
2247
2254
  return;
2248
2255
  }
@@ -2251,57 +2258,57 @@ function xi(e = {}) {
2251
2258
  await a?.startup?.promise, typeof a?.typesetPromise == "function" && (await a.typesetPromise([n]), oi(n));
2252
2259
  };
2253
2260
  }
2254
- var Si = "@pie-lib/math-rendering", Ci = "@pie-lib/math-rendering@2", wi = "pie-print", Ti = 50, Ei = 1e4, Di = null;
2255
- function Oi() {
2256
- return !!window[Ci]?.opts?.useSingleDollar;
2261
+ var Ei = "@pie-lib/math-rendering", Di = "@pie-lib/math-rendering@2", Oi = "pie-print", ki = 50, Ai = 1e4, ji = null;
2262
+ function Mi() {
2263
+ return !!window[Di]?.opts?.useSingleDollar;
2257
2264
  }
2258
- function ki() {
2259
- return Di ||= xi({ useSingleDollar: Oi() }), Di;
2265
+ function Ni() {
2266
+ return ji ||= Ti({ useSingleDollar: Mi() }), ji;
2260
2267
  }
2261
- function Ai() {
2268
+ function Pi() {
2262
2269
  if (typeof window > "u") return null;
2263
- let e = window[Si];
2264
- return typeof e?.renderMath == "function" ? e : null;
2270
+ let e = window[Ei];
2271
+ return typeof e?.renderMath == "function" && e.renderMath !== Ri ? e : null;
2265
2272
  }
2266
- function ji(e) {
2273
+ function Fi(e) {
2267
2274
  let t = e;
2268
2275
  for (; t;) {
2269
- if (t instanceof Element && t.localName === wi) return t;
2276
+ if (t instanceof Element && t.localName === Oi) return t;
2270
2277
  t = t instanceof ShadowRoot ? t.host : t.parentNode;
2271
2278
  }
2272
2279
  return null;
2273
2280
  }
2274
- function Mi() {
2281
+ function Ii() {
2275
2282
  let e = window.renderMath;
2276
2283
  return typeof e == "function" ? e : null;
2277
2284
  }
2278
- async function Ni(e) {
2279
- let t = ji(e);
2285
+ async function Li(e) {
2286
+ let t = Fi(e);
2280
2287
  if (!t) return null;
2281
- let n = Mi();
2288
+ let n = Ii();
2282
2289
  if (n || t.mathRenderingModuleUrlImported !== !0) return n;
2283
- let r = Date.now() + Ei;
2290
+ let r = Date.now() + Ai;
2284
2291
  for (; Date.now() < r;) {
2285
- await new Promise((e) => setTimeout(e, Ti));
2286
- let e = Mi();
2292
+ await new Promise((e) => setTimeout(e, ki));
2293
+ let e = Ii();
2287
2294
  if (e) return e;
2288
2295
  }
2289
2296
  return null;
2290
2297
  }
2291
- var Pi = async (e) => {
2298
+ var Ri = async (e) => {
2292
2299
  if (typeof window > "u") return;
2293
2300
  let t = typeof e == "string", n;
2294
2301
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
2295
- let r = Ai(), i = r || t ? null : await Ni(n);
2296
- return r ? await r.renderMath?.(n) : i ? await i(n) : await ki()(n), t ? n.innerHTML : void 0;
2297
- }, Fi = [
2302
+ let r = Pi(), i = r || t ? null : await Li(n);
2303
+ return r ? await r.renderMath?.(n) : i && i !== Ri ? await i(n) : await Ni()(n), t ? n.innerHTML : void 0;
2304
+ }, zi = [
2298
2305
  "nbsp iexcl cent pound curren yen brvbar sect uml copy ordf laquo not shy reg macr",
2299
2306
  "deg plusmn sup2 sup3 acute micro para middot cedil sup1 ordm raquo frac14 frac12 frac34 iquest",
2300
2307
  "Agrave Aacute Acirc Atilde Auml Aring AElig Ccedil Egrave Eacute Ecirc Euml Igrave Iacute Icirc Iuml",
2301
2308
  "ETH Ntilde Ograve Oacute Ocirc Otilde Ouml times Oslash Ugrave Uacute Ucirc Uuml Yacute THORN szlig",
2302
2309
  "agrave aacute acirc atilde auml aring aelig ccedil egrave eacute ecirc euml igrave iacute icirc iuml",
2303
2310
  "eth ntilde ograve oacute ocirc otilde ouml divide oslash ugrave uacute ucirc uuml yacute thorn yuml"
2304
- ].join(" "), Ii = "alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu xi omicron pi rho sigmaf sigma tau upsilon phi chi psi omega", Li = new Map(Object.entries({
2311
+ ].join(" "), Bi = "alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu xi omicron pi rho sigmaf sigma tau upsilon phi chi psi omega", Vi = new Map(Object.entries({
2305
2312
  quot: 34,
2306
2313
  amp: 38,
2307
2314
  apos: 39,
@@ -2332,16 +2339,16 @@ var Pi = async (e) => {
2332
2339
  le: 8804,
2333
2340
  ge: 8805
2334
2341
  }));
2335
- for (let [e, t] of Fi.split(" ").entries()) Li.set(t, 160 + e);
2336
- for (let [e, t] of Ii.split(" ").entries()) Li.set(t, 945 + e), t !== "sigmaf" && Li.set(t[0].toUpperCase() + t.slice(1), 913 + e);
2337
- var Ri = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, zi = /<\/?[a-z][^>]*>|<!--[\s\S]*?-->/gi, Bi = /&(#[0-9]+|#x[0-9a-f]+|[a-z][a-z0-9]*);/gi, Vi = (e, t) => {
2342
+ for (let [e, t] of zi.split(" ").entries()) Vi.set(t, 160 + e);
2343
+ for (let [e, t] of Bi.split(" ").entries()) Vi.set(t, 945 + e), t !== "sigmaf" && Vi.set(t[0].toUpperCase() + t.slice(1), 913 + e);
2344
+ var Hi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Ui = /<\/?[a-z][^>]*>|<!--[\s\S]*?-->/gi, Wi = /&(#[0-9]+|#x[0-9a-f]+|[a-z][a-z0-9]*);/gi, Gi = (e, t) => {
2338
2345
  if (t[0] === "#") {
2339
2346
  let e = t[1] === "x" || t[1] === "X", n = Number.parseInt(t.slice(e ? 2 : 1), e ? 16 : 10), r = n > 0 && n <= 1114111 && (n < 55296 || n > 57343);
2340
2347
  return String.fromCodePoint(r ? n : 65533);
2341
2348
  }
2342
- let n = Li.get(t);
2349
+ let n = Vi.get(t);
2343
2350
  return n === void 0 ? e : String.fromCodePoint(n);
2344
- }, Hi = (e) => typeof e == "string" ? e.replace(Ri, " ").replace(zi, "").replace(Bi, Vi).replace(/\s+/g, " ").trim() : "", Ui = {
2351
+ }, Ki = (e) => typeof e == "string" ? e.replace(Hi, " ").replace(Ui, "").replace(Wi, Gi).replace(/\s+/g, " ").trim() : "", qi = {
2345
2352
  translation: {
2346
2353
  categorize: {
2347
2354
  limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
@@ -2481,7 +2488,7 @@ var Ri = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, zi = /<
2481
2488
  hideNote: "Hide Note",
2482
2489
  cancel: "Cancel"
2483
2490
  }
2484
- }, Wi = {
2491
+ }, Ji = {
2485
2492
  translation: {
2486
2493
  categorize: {
2487
2494
  limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
@@ -2621,55 +2628,55 @@ var Ri = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, zi = /<
2621
2628
  hideNote: "Ocultar Nota",
2622
2629
  cancel: "Cancelar"
2623
2630
  }
2624
- }, Z = (e) => typeof e == "string", Gi = () => {
2631
+ }, Z = (e) => typeof e == "string", Yi = () => {
2625
2632
  let e, t, n = new Promise((n, r) => {
2626
2633
  e = n, t = r;
2627
2634
  });
2628
2635
  return n.resolve = e, n.reject = t, n;
2629
- }, Ki = (e) => e == null ? "" : "" + e, qi = (e, t, n) => {
2636
+ }, Xi = (e) => e == null ? "" : "" + e, Zi = (e, t, n) => {
2630
2637
  e.forEach((e) => {
2631
2638
  t[e] && (n[e] = t[e]);
2632
2639
  });
2633
- }, Ji = /###/g, Yi = (e) => e && e.indexOf("###") > -1 ? e.replace(Ji, ".") : e, Xi = (e) => !e || Z(e), Zi = (e, t, n) => {
2640
+ }, Qi = /###/g, $i = (e) => e && e.indexOf("###") > -1 ? e.replace(Qi, ".") : e, ea = (e) => !e || Z(e), ta = (e, t, n) => {
2634
2641
  let r = Z(t) ? t.split(".") : t, i = 0;
2635
2642
  for (; i < r.length - 1;) {
2636
- if (Xi(e)) return {};
2637
- let t = Yi(r[i]);
2643
+ if (ea(e)) return {};
2644
+ let t = $i(r[i]);
2638
2645
  !e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
2639
2646
  }
2640
- return Xi(e) ? {} : {
2647
+ return ea(e) ? {} : {
2641
2648
  obj: e,
2642
- k: Yi(r[i])
2649
+ k: $i(r[i])
2643
2650
  };
2644
- }, Qi = (e, t, n) => {
2645
- let { obj: r, k: i } = Zi(e, t, Object);
2651
+ }, na = (e, t, n) => {
2652
+ let { obj: r, k: i } = ta(e, t, Object);
2646
2653
  if (r !== void 0 || t.length === 1) {
2647
2654
  r[i] = n;
2648
2655
  return;
2649
2656
  }
2650
- let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = Zi(e, o, Object);
2651
- for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = Zi(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
2657
+ let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = ta(e, o, Object);
2658
+ for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = ta(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
2652
2659
  s.obj[`${s.k}.${a}`] = n;
2653
- }, $i = (e, t, n, r) => {
2654
- let { obj: i, k: a } = Zi(e, t, Object);
2660
+ }, ra = (e, t, n, r) => {
2661
+ let { obj: i, k: a } = ta(e, t, Object);
2655
2662
  i[a] = i[a] || [], i[a].push(n);
2656
- }, ea = (e, t) => {
2657
- let { obj: n, k: r } = Zi(e, t);
2663
+ }, ia = (e, t) => {
2664
+ let { obj: n, k: r } = ta(e, t);
2658
2665
  if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
2659
- }, ta = (e, t, n) => {
2660
- let r = ea(e, n);
2661
- return r === void 0 ? ea(t, n) : r;
2662
- }, na = (e, t, n) => {
2663
- for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? Z(e[r]) || e[r] instanceof String || Z(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : na(e[r], t[r], n) : e[r] = t[r]);
2666
+ }, aa = (e, t, n) => {
2667
+ let r = ia(e, n);
2668
+ return r === void 0 ? ia(t, n) : r;
2669
+ }, oa = (e, t, n) => {
2670
+ for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? Z(e[r]) || e[r] instanceof String || Z(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : oa(e[r], t[r], n) : e[r] = t[r]);
2664
2671
  return e;
2665
- }, ra = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), ia = {
2672
+ }, sa = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), ca = {
2666
2673
  "&": "&amp;",
2667
2674
  "<": "&lt;",
2668
2675
  ">": "&gt;",
2669
2676
  "\"": "&quot;",
2670
2677
  "'": "&#39;",
2671
2678
  "/": "&#x2F;"
2672
- }, aa = (e) => Z(e) ? e.replace(/[&<>"'\/]/g, (e) => ia[e]) : e, oa = class {
2679
+ }, la = (e) => Z(e) ? e.replace(/[&<>"'\/]/g, (e) => ca[e]) : e, ua = class {
2673
2680
  constructor(e) {
2674
2681
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
2675
2682
  }
@@ -2679,23 +2686,23 @@ var Ri = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, zi = /<
2679
2686
  let n = new RegExp(e);
2680
2687
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
2681
2688
  }
2682
- }, sa = [
2689
+ }, da = [
2683
2690
  " ",
2684
2691
  ",",
2685
2692
  "?",
2686
2693
  "!",
2687
2694
  ";"
2688
- ], ca = new oa(20), la = (e, t, n) => {
2695
+ ], fa = new ua(20), pa = (e, t, n) => {
2689
2696
  t ||= "", n ||= "";
2690
- let r = sa.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
2697
+ let r = da.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
2691
2698
  if (r.length === 0) return !0;
2692
- let i = ca.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
2699
+ let i = fa.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
2693
2700
  if (!a) {
2694
2701
  let t = e.indexOf(n);
2695
2702
  t > 0 && !i.test(e.substring(0, t)) && (a = !0);
2696
2703
  }
2697
2704
  return a;
2698
- }, ua = (e, t, n = ".") => {
2705
+ }, ma = (e, t, n = ".") => {
2699
2706
  if (!e) return;
2700
2707
  if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
2701
2708
  let r = t.split(n), i = e;
@@ -2714,7 +2721,7 @@ var Ri = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, zi = /<
2714
2721
  i = t;
2715
2722
  }
2716
2723
  return i;
2717
- }, da = (e) => e?.replace(/_/g, "-"), fa = {
2724
+ }, ha = (e) => e?.replace(/_/g, "-"), ga = {
2718
2725
  type: "logger",
2719
2726
  log(e) {
2720
2727
  this.output("log", e);
@@ -2733,7 +2740,7 @@ var Ri = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, zi = /<
2733
2740
  this.init(e, t);
2734
2741
  }
2735
2742
  init(e, t = {}) {
2736
- this.prefix = t.prefix || "i18next:", this.logger = e || fa, this.options = t, this.debug = t.debug;
2743
+ this.prefix = t.prefix || "i18next:", this.logger = e || ga, this.options = t, this.debug = t.debug;
2737
2744
  }
2738
2745
  log(...e) {
2739
2746
  return this.forward(e, "log", "", !0);
@@ -2759,7 +2766,7 @@ var Ri = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, zi = /<
2759
2766
  clone(t) {
2760
2767
  return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
2761
2768
  }
2762
- }(), pa = class {
2769
+ }(), _a = class {
2763
2770
  constructor() {
2764
2771
  this.observers = {};
2765
2772
  }
@@ -2786,7 +2793,7 @@ var Ri = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, zi = /<
2786
2793
  for (let i = 0; i < r; i++) n.apply(n, [e, ...t]);
2787
2794
  });
2788
2795
  }
2789
- }, ma = class extends pa {
2796
+ }, va = class extends _a {
2790
2797
  constructor(e, t = {
2791
2798
  ns: ["translation"],
2792
2799
  defaultNS: "translation"
@@ -2803,12 +2810,12 @@ var Ri = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, zi = /<
2803
2810
  getResource(e, t, n, r = {}) {
2804
2811
  let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
2805
2812
  e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : Z(n) && i ? o.push(...n.split(i)) : o.push(n)));
2806
- let s = ea(this.data, o);
2807
- return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !Z(n) ? s : ua(this.data?.[e]?.[t], n, i);
2813
+ let s = ia(this.data, o);
2814
+ return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !Z(n) ? s : ma(this.data?.[e]?.[t], n, i);
2808
2815
  }
2809
2816
  addResource(e, t, n, r, i = { silent: !1 }) {
2810
2817
  let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
2811
- n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), Qi(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
2818
+ n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), na(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
2812
2819
  }
2813
2820
  addResources(e, t, n, r = { silent: !1 }) {
2814
2821
  for (let r in n) (Z(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
@@ -2820,11 +2827,11 @@ var Ri = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, zi = /<
2820
2827
  }) {
2821
2828
  let o = [e, t];
2822
2829
  e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
2823
- let s = ea(this.data, o) || {};
2824
- a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? na(s, n, i) : s = {
2830
+ let s = ia(this.data, o) || {};
2831
+ a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? oa(s, n, i) : s = {
2825
2832
  ...s,
2826
2833
  ...n
2827
- }, Qi(this.data, o, s), a.silent || this.emit("added", e, t, n);
2834
+ }, na(this.data, o, s), a.silent || this.emit("added", e, t, n);
2828
2835
  }
2829
2836
  removeResourceBundle(e, t) {
2830
2837
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -2845,7 +2852,7 @@ var Ri = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, zi = /<
2845
2852
  toJSON() {
2846
2853
  return this.data;
2847
2854
  }
2848
- }, ha = {
2855
+ }, ya = {
2849
2856
  processors: {},
2850
2857
  addPostProcessor(e) {
2851
2858
  this.processors[e.name] = e;
@@ -2855,22 +2862,22 @@ var Ri = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, zi = /<
2855
2862
  t = this.processors[e]?.process(t, n, r, i) ?? t;
2856
2863
  }), t;
2857
2864
  }
2858
- }, ga = Symbol("i18next/PATH_KEY");
2859
- function _a() {
2865
+ }, ba = Symbol("i18next/PATH_KEY");
2866
+ function xa() {
2860
2867
  let e = [], t = Object.create(null), n;
2861
- return t.get = (r, i) => (n?.revoke?.(), i === ga ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
2868
+ return t.get = (r, i) => (n?.revoke?.(), i === ba ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
2862
2869
  }
2863
- function va(e, t) {
2864
- let { [ga]: n } = e(_a()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
2870
+ function Sa(e, t) {
2871
+ let { [ba]: n } = e(xa()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
2865
2872
  if (n.length > 1 && i) {
2866
2873
  let e = t?.ns, a = Array.isArray(e) ? e : null;
2867
2874
  if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
2868
2875
  }
2869
2876
  return n.join(r);
2870
2877
  }
2871
- var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number", xa = class e extends pa {
2878
+ var Ca = {}, wa = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number", Ta = class e extends _a {
2872
2879
  constructor(e, t = {}) {
2873
- super(), qi([
2880
+ super(), Zi([
2874
2881
  "resourceStore",
2875
2882
  "languageUtils",
2876
2883
  "pluralResolver",
@@ -2888,13 +2895,13 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2888
2895
  if (e == null) return !1;
2889
2896
  let r = this.resolve(e, n);
2890
2897
  if (r?.res === void 0) return !1;
2891
- let i = ba(r.res);
2898
+ let i = wa(r.res);
2892
2899
  return !(n.returnObjects === !1 && i);
2893
2900
  }
2894
2901
  extractFromKey(e, t) {
2895
2902
  let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
2896
2903
  n === void 0 && (n = ":");
2897
- let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !la(e, n, r);
2904
+ let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !pa(e, n, r);
2898
2905
  if (a && !o) {
2899
2906
  let t = e.match(this.interpolator.nestingRegexp);
2900
2907
  if (t && t.length > 0) return {
@@ -2912,10 +2919,10 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2912
2919
  translate(t, n, r) {
2913
2920
  let i = typeof n == "object" ? { ...n } : n;
2914
2921
  if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = { ...i }), i ||= {}, t == null) return "";
2915
- typeof t == "function" && (t = va(t, {
2922
+ typeof t == "function" && (t = Sa(t, {
2916
2923
  ...this.options,
2917
2924
  ...i
2918
- })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? va(e, {
2925
+ })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? Sa(e, {
2919
2926
  ...this.options,
2920
2927
  ...i
2921
2928
  }) : String(e));
@@ -2943,7 +2950,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2943
2950
  "[object RegExp]"
2944
2951
  ], _ = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, v = !this.i18nFormat || this.i18nFormat.handleAsObject, y = i.count !== void 0 && !Z(i.count), b = e.hasDefaultValue(i), te = y ? this.pluralResolver.getSuffix(d, i.count, i) : "", ne = i.ordinal && y ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", re = y && !i.ordinal && i.count === 0, x = re && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${te}`] || i[`defaultValue${ne}`] || i.defaultValue, S = m;
2945
2952
  v && !m && b && (S = x);
2946
- let ie = ba(S), ae = Object.prototype.toString.apply(S);
2953
+ let ie = wa(S), ae = Object.prototype.toString.apply(S);
2947
2954
  if (v && S && ie && ee.indexOf(ae) < 0 && !(Z(_) && Array.isArray(S))) {
2948
2955
  if (!i.returnObjects && !this.options.returnObjects) {
2949
2956
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
@@ -2959,7 +2966,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
2959
2966
  let r = `${n}${o}${e}`;
2960
2967
  b && !m ? t[e] = this.translate(r, {
2961
2968
  ...i,
2962
- defaultValue: ba(x) ? x[e] : void 0,
2969
+ defaultValue: wa(x) ? x[e] : void 0,
2963
2970
  joinArrays: !1,
2964
2971
  ns: c
2965
2972
  }) : t[e] = this.translate(r, {
@@ -3030,7 +3037,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3030
3037
  !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();
3031
3038
  }
3032
3039
  let a = n.postProcess || this.options.postProcess, o = Z(a) ? [a] : a;
3033
- return e != null && o?.length && n.applyPostProcessor !== !1 && (e = ha.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
3040
+ return e != null && o?.length && n.applyPostProcessor !== !1 && (e = ya.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
3034
3041
  i18nResolved: {
3035
3042
  ...r,
3036
3043
  usedParams: this.getUsedParamsDetails(n)
@@ -3040,7 +3047,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3040
3047
  }
3041
3048
  resolve(e, t = {}) {
3042
3049
  let n, r, i, a, o;
3043
- return Z(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? va(e, {
3050
+ return Z(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? Sa(e, {
3044
3051
  ...this.options,
3045
3052
  ...t
3046
3053
  }) : e)), e.forEach((e) => {
@@ -3051,7 +3058,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3051
3058
  this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
3052
3059
  let u = t.count !== void 0 && !Z(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (Z(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
3053
3060
  l.forEach((e) => {
3054
- this.isValidLookup(n) || (o = e, !ya[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (ya[`${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) => {
3061
+ this.isValidLookup(n) || (o = e, !Ca[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (Ca[`${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) => {
3055
3062
  if (this.isValidLookup(n)) return;
3056
3063
  a = r;
3057
3064
  let o = [c];
@@ -3114,17 +3121,17 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3114
3121
  for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && t.substring(0, 12) === "defaultValue" && e[t] !== void 0) return !0;
3115
3122
  return !1;
3116
3123
  }
3117
- }, Sa = class {
3124
+ }, Ea = class {
3118
3125
  constructor(e) {
3119
3126
  this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = Q.create("languageUtils");
3120
3127
  }
3121
3128
  getScriptPartFromCode(e) {
3122
- if (e = da(e), !e || e.indexOf("-") < 0) return null;
3129
+ if (e = ha(e), !e || e.indexOf("-") < 0) return null;
3123
3130
  let t = e.split("-");
3124
3131
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
3125
3132
  }
3126
3133
  getLanguagePartFromCode(e) {
3127
- if (e = da(e), !e || e.indexOf("-") < 0) return e;
3134
+ if (e = ha(e), !e || e.indexOf("-") < 0) return e;
3128
3135
  let t = e.split("-");
3129
3136
  return this.formatLanguageCode(t[0]);
3130
3137
  }
@@ -3174,17 +3181,17 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3174
3181
  r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
3175
3182
  }), r;
3176
3183
  }
3177
- }, Ca = {
3184
+ }, Da = {
3178
3185
  zero: 0,
3179
3186
  one: 1,
3180
3187
  two: 2,
3181
3188
  few: 3,
3182
3189
  many: 4,
3183
3190
  other: 5
3184
- }, wa = {
3191
+ }, Oa = {
3185
3192
  select: (e) => e === 1 ? "one" : "other",
3186
3193
  resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
3187
- }, Ta = class {
3194
+ }, ka = class {
3188
3195
  constructor(e, t = {}) {
3189
3196
  this.languageUtils = e, this.options = t, this.logger = Q.create("pluralResolver"), this.pluralRulesCache = {};
3190
3197
  }
@@ -3192,7 +3199,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3192
3199
  this.pluralRulesCache = {};
3193
3200
  }
3194
3201
  getRule(e, t = {}) {
3195
- let n = da(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
3202
+ let n = ha(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
3196
3203
  cleanedCode: n,
3197
3204
  type: r
3198
3205
  });
@@ -3201,8 +3208,8 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3201
3208
  try {
3202
3209
  a = new Intl.PluralRules(n, { type: r });
3203
3210
  } catch {
3204
- if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), wa;
3205
- if (!e.match(/-|_/)) return wa;
3211
+ if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), Oa;
3212
+ if (!e.match(/-|_/)) return Oa;
3206
3213
  let n = this.languageUtils.getLanguagePartFromCode(e);
3207
3214
  a = this.getRule(n, t);
3208
3215
  }
@@ -3217,23 +3224,23 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3217
3224
  }
3218
3225
  getSuffixes(e, t = {}) {
3219
3226
  let n = this.getRule(e, t);
3220
- return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => Ca[e] - Ca[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
3227
+ return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => Da[e] - Da[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
3221
3228
  }
3222
3229
  getSuffix(e, t, n = {}) {
3223
3230
  let r = this.getRule(e, n);
3224
3231
  return r ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${r.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
3225
3232
  }
3226
- }, Ea = (e, t, n, r = ".", i = !0) => {
3227
- let a = ta(e, t, n);
3228
- return !a && i && Z(n) && (a = ua(e, n, r), a === void 0 && (a = ua(t, n, r))), a;
3229
- }, Da = (e) => e.replace(/\$/g, "$$$$"), Oa = class {
3233
+ }, Aa = (e, t, n, r = ".", i = !0) => {
3234
+ let a = aa(e, t, n);
3235
+ return !a && i && Z(n) && (a = ma(e, n, r), a === void 0 && (a = ma(t, n, r))), a;
3236
+ }, ja = (e) => e.replace(/\$/g, "$$$$"), Ma = class {
3230
3237
  constructor(e = {}) {
3231
3238
  this.logger = Q.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
3232
3239
  }
3233
3240
  init(e = {}) {
3234
3241
  e.interpolation ||= { escapeValue: !0 };
3235
3242
  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: ee } = e.interpolation;
3236
- this.escape = t === void 0 ? aa : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? ra(i) : a || "{{", this.suffix = o ? ra(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? ra(d) : f || ra("$t("), this.nestingSuffix = p ? ra(p) : m || ra(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = ee !== void 0 && ee, this.resetRegExp();
3243
+ this.escape = t === void 0 ? la : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? sa(i) : a || "{{", this.suffix = o ? sa(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? sa(d) : f || sa("$t("), this.nestingSuffix = p ? sa(p) : m || sa(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = ee !== void 0 && ee, this.resetRegExp();
3237
3244
  }
3238
3245
  reset() {
3239
3246
  this.options && this.init(this.options);
@@ -3245,7 +3252,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3245
3252
  interpolate(e, t, n, r) {
3246
3253
  let i, a, o, s = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (e) => {
3247
3254
  if (e.indexOf(this.formatSeparator) < 0) {
3248
- let i = Ea(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
3255
+ let i = Aa(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
3249
3256
  return this.alwaysFormat ? this.format(i, void 0, n, {
3250
3257
  ...r,
3251
3258
  ...t,
@@ -3253,7 +3260,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3253
3260
  }) : i;
3254
3261
  }
3255
3262
  let i = e.split(this.formatSeparator), a = i.shift().trim(), o = i.join(this.formatSeparator).trim();
3256
- return this.format(Ea(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
3263
+ return this.format(Aa(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
3257
3264
  ...r,
3258
3265
  ...t,
3259
3266
  interpolationkey: a
@@ -3263,10 +3270,10 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3263
3270
  let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, u = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
3264
3271
  return [{
3265
3272
  regex: this.regexpUnescape,
3266
- safeValue: (e) => Da(e)
3273
+ safeValue: (e) => ja(e)
3267
3274
  }, {
3268
3275
  regex: this.regexp,
3269
- safeValue: (e) => this.escapeValue ? Da(this.escape(e)) : Da(e)
3276
+ safeValue: (e) => this.escapeValue ? ja(this.escape(e)) : ja(e)
3270
3277
  }].forEach((t) => {
3271
3278
  for (o = 0; i = t.regex.exec(e);) {
3272
3279
  let n = i[1].trim();
@@ -3278,7 +3285,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3278
3285
  a = i[0];
3279
3286
  continue;
3280
3287
  } else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
3281
- else !Z(a) && !this.useRawValueToEscape && (a = Ki(a));
3288
+ else !Z(a) && !this.useRawValueToEscape && (a = Xi(a));
3282
3289
  let s = t.safeValue(a);
3283
3290
  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;
3284
3291
  }
@@ -3288,7 +3295,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3288
3295
  let r, i, a, o = (e, t) => {
3289
3296
  let n = this.nestingOptionsSeparator;
3290
3297
  if (e.indexOf(n) < 0) return e;
3291
- let r = e.split(RegExp(`${ra(n)}[ ]*{`)), i = `{${r[1]}`;
3298
+ let r = e.split(RegExp(`${sa(n)}[ ]*{`)), i = `{${r[1]}`;
3292
3299
  e = r[0], i = this.interpolate(i, a);
3293
3300
  let o = i.match(/'/g), s = i.match(/"/g);
3294
3301
  ((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
@@ -3307,14 +3314,14 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3307
3314
  a = { ...n }, a = a.replace && !Z(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
3308
3315
  let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
3309
3316
  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 && !Z(i)) return i;
3310
- Z(i) || (i = Ki(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, {
3317
+ Z(i) || (i = Xi(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, {
3311
3318
  ...n,
3312
3319
  interpolationkey: r[1].trim()
3313
3320
  }), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
3314
3321
  }
3315
3322
  return e;
3316
3323
  }
3317
- }, ka = (e) => {
3324
+ }, Na = (e) => {
3318
3325
  let t = e.toLowerCase().trim(), n = {};
3319
3326
  if (e.indexOf("(") > -1) {
3320
3327
  let r = e.split("(");
@@ -3331,7 +3338,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3331
3338
  formatName: t,
3332
3339
  formatOptions: n
3333
3340
  };
3334
- }, Aa = (e) => {
3341
+ }, Pa = (e) => {
3335
3342
  let t = {};
3336
3343
  return (n, r, i) => {
3337
3344
  let a = i;
@@ -3340,15 +3347,15 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3340
3347
  [i.interpolationkey]: void 0
3341
3348
  });
3342
3349
  let o = r + JSON.stringify(a), s = t[o];
3343
- return s || (s = e(da(r), i), t[o] = s), s(n);
3350
+ return s || (s = e(ha(r), i), t[o] = s), s(n);
3344
3351
  };
3345
- }, ja = (e) => (t, n, r) => e(da(n), r)(t), Ma = class {
3352
+ }, Fa = (e) => (t, n, r) => e(ha(n), r)(t), Ia = class {
3346
3353
  constructor(e = {}) {
3347
3354
  this.logger = Q.create("formatter"), this.options = e, this.init(e);
3348
3355
  }
3349
3356
  init(e, t = { interpolation: {} }) {
3350
3357
  this.formatSeparator = t.interpolation.formatSeparator || ",";
3351
- let n = t.cacheInBuiltFormats ? Aa : ja;
3358
+ let n = t.cacheInBuiltFormats ? Pa : Fa;
3352
3359
  this.formats = {
3353
3360
  number: n((e, t) => {
3354
3361
  let n = new Intl.NumberFormat(e, { ...t });
@@ -3379,7 +3386,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3379
3386
  this.formats[e.toLowerCase().trim()] = t;
3380
3387
  }
3381
3388
  addCached(e, t) {
3382
- this.formats[e.toLowerCase().trim()] = Aa(t);
3389
+ this.formats[e.toLowerCase().trim()] = Pa(t);
3383
3390
  }
3384
3391
  format(e, t, n, r = {}) {
3385
3392
  let i = t.split(this.formatSeparator);
@@ -3388,7 +3395,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3388
3395
  i[0] = [i[0], ...i.splice(1, e)].join(this.formatSeparator);
3389
3396
  }
3390
3397
  return i.reduce((e, t) => {
3391
- let { formatName: i, formatOptions: a } = ka(t);
3398
+ let { formatName: i, formatOptions: a } = Na(t);
3392
3399
  if (this.formats[i]) {
3393
3400
  let t = e;
3394
3401
  try {
@@ -3406,9 +3413,9 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3406
3413
  return e;
3407
3414
  }, e);
3408
3415
  }
3409
- }, Na = (e, t) => {
3416
+ }, La = (e, t) => {
3410
3417
  e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
3411
- }, Pa = class extends pa {
3418
+ }, Ra = class extends _a {
3412
3419
  constructor(e, t, n, r = {}) {
3413
3420
  super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = Q.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);
3414
3421
  }
@@ -3438,7 +3445,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3438
3445
  t && this.emit("failedLoading", i, a, t), !t && n && this.store.addResourceBundle(i, a, n, void 0, void 0, { skipCopy: !0 }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
3439
3446
  let o = {};
3440
3447
  this.queue.forEach((n) => {
3441
- $i(n.loaded, [i], a), Na(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
3448
+ ra(n.loaded, [i], a), La(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
3442
3449
  o[e] || (o[e] = {});
3443
3450
  let t = n.loaded[e];
3444
3451
  t.length && t.forEach((t) => {
@@ -3528,7 +3535,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3528
3535
  !e || !e[0] || this.store.addResource(e[0], t, n, r);
3529
3536
  }
3530
3537
  }
3531
- }, Fa = () => ({
3538
+ }, za = () => ({
3532
3539
  debug: !1,
3533
3540
  initAsync: !0,
3534
3541
  ns: ["translation"],
@@ -3585,15 +3592,15 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3585
3592
  skipOnVariables: !0
3586
3593
  },
3587
3594
  cacheInBuiltFormats: !0
3588
- }), Ia = (e) => (Z(e.ns) && (e.ns = [e.ns]), Z(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Z(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), La = () => {}, Ra = (e) => {
3595
+ }), Ba = (e) => (Z(e.ns) && (e.ns = [e.ns]), Z(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Z(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), Va = () => {}, Ha = (e) => {
3589
3596
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
3590
3597
  typeof e[t] == "function" && (e[t] = e[t].bind(e));
3591
3598
  });
3592
- }, za = "__i18next_supportNoticeShown", Ba = () => !!(typeof globalThis < "u" && globalThis[za] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), Va = () => {
3593
- typeof globalThis < "u" && (globalThis[za] = !0);
3594
- }, Ha = (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 pa {
3599
+ }, Ua = "__i18next_supportNoticeShown", Wa = () => !!(typeof globalThis < "u" && globalThis[Ua] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), Ga = () => {
3600
+ typeof globalThis < "u" && (globalThis[Ua] = !0);
3601
+ }, Ka = (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 _a {
3595
3602
  constructor(e = {}, t) {
3596
- if (super(), this.options = Ia(e), this.services = {}, this.logger = Q, this.modules = { external: [] }, Ra(this), t && !this.isInitialized && !e.isClone) {
3603
+ if (super(), this.options = Ba(e), this.services = {}, this.logger = Q, this.modules = { external: [] }, Ha(this), t && !this.isInitialized && !e.isClone) {
3597
3604
  if (!this.options.initAsync) return this.init(e, t), this;
3598
3605
  setTimeout(() => {
3599
3606
  this.init(e, t);
@@ -3602,35 +3609,35 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3602
3609
  }
3603
3610
  init(e = {}, t) {
3604
3611
  this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (Z(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
3605
- let n = Fa();
3612
+ let n = za();
3606
3613
  this.options = {
3607
3614
  ...n,
3608
3615
  ...this.options,
3609
- ...Ia(e)
3616
+ ...Ba(e)
3610
3617
  }, this.options.interpolation = {
3611
3618
  ...n.interpolation,
3612
3619
  ...this.options.interpolation
3613
- }, 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 && !Ha(this) && !Ba() && (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 💙"), Va());
3620
+ }, 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 && !Ka(this) && !Wa() && (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 💙"), Ga());
3614
3621
  let r = (e) => e ? typeof e == "function" ? new e() : e : null;
3615
3622
  if (!this.options.isClone) {
3616
3623
  this.modules.logger ? Q.init(r(this.modules.logger), this.options) : Q.init(null, this.options);
3617
3624
  let e;
3618
- e = this.modules.formatter ? this.modules.formatter : Ma;
3619
- let t = new Sa(this.options);
3620
- this.store = new ma(this.options.resources, this.options);
3625
+ e = this.modules.formatter ? this.modules.formatter : Ia;
3626
+ let t = new Ea(this.options);
3627
+ this.store = new va(this.options.resources, this.options);
3621
3628
  let i = this.services;
3622
- i.logger = Q, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new Ta(t, {
3629
+ i.logger = Q, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new ka(t, {
3623
3630
  prepend: this.options.pluralSeparator,
3624
3631
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
3625
- }), 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 Oa(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new Pa(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
3632
+ }), 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 Ma(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new Ra(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
3626
3633
  this.emit(e, ...t);
3627
- }), this.modules.languageDetector && (i.languageDetector = r(this.modules.languageDetector), i.languageDetector.init && i.languageDetector.init(i, this.options.detection, this.options)), this.modules.i18nFormat && (i.i18nFormat = r(this.modules.i18nFormat), i.i18nFormat.init && i.i18nFormat.init(this)), this.translator = new xa(this.services, this.options), this.translator.on("*", (e, ...t) => {
3634
+ }), this.modules.languageDetector && (i.languageDetector = r(this.modules.languageDetector), i.languageDetector.init && i.languageDetector.init(i, this.options.detection, this.options)), this.modules.i18nFormat && (i.i18nFormat = r(this.modules.i18nFormat), i.i18nFormat.init && i.i18nFormat.init(this)), this.translator = new Ta(this.services, this.options), this.translator.on("*", (e, ...t) => {
3628
3635
  this.emit(e, ...t);
3629
3636
  }), this.modules.external.forEach((e) => {
3630
3637
  e.init && e.init(this);
3631
3638
  });
3632
3639
  }
3633
- if (this.format = this.options.interpolation.format, t ||= La, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3640
+ if (this.format = this.options.interpolation.format, t ||= Va, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3634
3641
  let e = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
3635
3642
  e.length > 0 && e[0] !== "dev" && (this.options.lng = e[0]);
3636
3643
  }
@@ -3649,7 +3656,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3649
3656
  ].forEach((e) => {
3650
3657
  this[e] = (...t) => (this.store[e](...t), this);
3651
3658
  });
3652
- let i = Gi(), a = () => {
3659
+ let i = Yi(), a = () => {
3653
3660
  let e = (e, n) => {
3654
3661
  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);
3655
3662
  };
@@ -3658,7 +3665,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3658
3665
  };
3659
3666
  return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
3660
3667
  }
3661
- loadResources(e, t = La) {
3668
+ loadResources(e, t = Va) {
3662
3669
  let n = t, r = Z(e) ? e : this.language;
3663
3670
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
3664
3671
  if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
@@ -3673,15 +3680,15 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3673
3680
  } else n(null);
3674
3681
  }
3675
3682
  reloadResources(e, t, n) {
3676
- let r = Gi();
3677
- 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 ||= La, this.services.backendConnector.reload(e, t, (e) => {
3683
+ let r = Yi();
3684
+ 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 ||= Va, this.services.backendConnector.reload(e, t, (e) => {
3678
3685
  r.resolve(), n(e);
3679
3686
  }), r;
3680
3687
  }
3681
3688
  use(e) {
3682
3689
  if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
3683
3690
  if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
3684
- 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" && ha.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
3691
+ 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" && ya.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
3685
3692
  }
3686
3693
  setResolvedLanguage(e) {
3687
3694
  if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
@@ -3697,7 +3704,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3697
3704
  }
3698
3705
  changeLanguage(e, t) {
3699
3706
  this.isLanguageChangingTo = e;
3700
- let n = Gi();
3707
+ let n = Yi();
3701
3708
  this.emit("languageChanging", e);
3702
3709
  let r = (e) => {
3703
3710
  this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
@@ -3720,9 +3727,9 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3720
3727
  ...this.options,
3721
3728
  ...a
3722
3729
  };
3723
- typeof a.keyPrefix == "function" && (a.keyPrefix = va(a.keyPrefix, o));
3730
+ typeof a.keyPrefix == "function" && (a.keyPrefix = Sa(a.keyPrefix, o));
3724
3731
  let s = this.options.keySeparator || ".", c;
3725
- return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = va(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = va(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
3732
+ return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = Sa(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = Sa(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
3726
3733
  };
3727
3734
  return Z(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
3728
3735
  }
@@ -3751,7 +3758,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3751
3758
  return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
3752
3759
  }
3753
3760
  loadNamespaces(e, t) {
3754
- let n = Gi();
3761
+ let n = Yi();
3755
3762
  return this.options.ns ? (Z(e) && (e = [e]), e.forEach((e) => {
3756
3763
  this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
3757
3764
  }), this.loadResources((e) => {
@@ -3759,7 +3766,7 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3759
3766
  }), n) : (t && t(), Promise.resolve());
3760
3767
  }
3761
3768
  loadLanguages(e, t) {
3762
- let n = Gi();
3769
+ let n = Yi();
3763
3770
  Z(e) && (e = [e]);
3764
3771
  let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
3765
3772
  return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
@@ -3775,14 +3782,14 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3775
3782
  if (e && e.direction) return e.direction;
3776
3783
  }
3777
3784
  } catch {}
3778
- 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 Sa(Fa());
3785
+ 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 Ea(za());
3779
3786
  return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
3780
3787
  }
3781
3788
  static createInstance(t = {}, n) {
3782
3789
  let r = new e(t, n);
3783
3790
  return r.createInstance = e.createInstance, r;
3784
3791
  }
3785
- cloneInstance(t = {}, n = La) {
3792
+ cloneInstance(t = {}, n = Va) {
3786
3793
  let r = t.forkResourceStore;
3787
3794
  r && delete t.forkResourceStore;
3788
3795
  let i = {
@@ -3796,18 +3803,18 @@ var ya = {}, ba = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number",
3796
3803
  "language"
3797
3804
  ].forEach((e) => {
3798
3805
  a[e] = this[e];
3799
- }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new ma(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) {
3806
+ }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new va(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) {
3800
3807
  let e = {
3801
- ...Fa().interpolation,
3808
+ ...za().interpolation,
3802
3809
  ...this.options.interpolation,
3803
3810
  ...t.interpolation
3804
3811
  }, n = {
3805
3812
  ...i,
3806
3813
  interpolation: e
3807
3814
  };
3808
- a.services.interpolator = new Oa(n);
3815
+ a.services.interpolator = new Ma(n);
3809
3816
  }
3810
- return a.translator = new xa(a.services, i), a.translator.on("*", (e, ...t) => {
3817
+ return a.translator = new Ta(a.services, i), a.translator.on("*", (e, ...t) => {
3811
3818
  a.emit(e, ...t);
3812
3819
  }), a.init(i, n), a.translator.options = i, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
3813
3820
  }
@@ -3828,13 +3835,13 @@ $.createInstance, $.dir, $.init, $.loadResources, $.reloadResources, $.use, $.ch
3828
3835
  lng: "en",
3829
3836
  showSupportNotice: !1,
3830
3837
  resources: {
3831
- en: Ui,
3832
- es: Wi
3838
+ en: qi,
3839
+ es: Ji
3833
3840
  }
3834
3841
  });
3835
3842
  //#endregion
3836
3843
  //#region src/i18n.ts
3837
- var { translator: Ua } = {
3844
+ var { translator: qa } = {
3838
3845
  translator: {
3839
3846
  ...$,
3840
3847
  t: (e, t) => {
@@ -3866,23 +3873,23 @@ var { translator: Ua } = {
3866
3873
  label: "Spanish"
3867
3874
  }]
3868
3875
  };
3869
- function Wa(e, t) {
3870
- return Ua.t(`translation:simpleCloze:${e}`, { lng: t });
3876
+ function Ja(e, t) {
3877
+ return qa.t(`translation:simpleCloze:${e}`, { lng: t });
3871
3878
  }
3872
3879
  //#endregion
3873
3880
  //#region src/print/Print.svelte
3874
- var Ga = /* @__PURE__ */ or("<div class=\"simple-cloze-print-teacher-instructions svelte-1fx5wwa\"></div>"), Ka = /* @__PURE__ */ or("<div class=\"simple-cloze-print-prompt svelte-1fx5wwa\"></div>"), qa = /* @__PURE__ */ or("<span class=\"simple-cloze-print-key-label svelte-1fx5wwa\"> </span> <span class=\"simple-cloze-print-blank simple-cloze-print-blank--key svelte-1fx5wwa\"> </span>", 1), Ja = /* @__PURE__ */ or("<span class=\"simple-cloze-print-blank svelte-1fx5wwa\" role=\"img\"></span>"), Ya = /* @__PURE__ */ or("<div class=\"simple-cloze-print svelte-1fx5wwa\"><!> <!> <div class=\"simple-cloze-print-response svelte-1fx5wwa\"><!></div></div>"), Xa = {
3881
+ var Ya = /* @__PURE__ */ or("<div class=\"simple-cloze-print-teacher-instructions svelte-1fx5wwa\"></div>"), Xa = /* @__PURE__ */ or("<div class=\"simple-cloze-print-prompt svelte-1fx5wwa\"></div>"), Za = /* @__PURE__ */ or("<span class=\"simple-cloze-print-key-label svelte-1fx5wwa\"> </span> <span class=\"simple-cloze-print-blank simple-cloze-print-blank--key svelte-1fx5wwa\"> </span>", 1), Qa = /* @__PURE__ */ or("<span class=\"simple-cloze-print-blank svelte-1fx5wwa\" role=\"img\"></span>"), $a = /* @__PURE__ */ or("<div class=\"simple-cloze-print svelte-1fx5wwa\"><!> <!> <div class=\"simple-cloze-print-response svelte-1fx5wwa\"><!></div></div>"), eo = {
3875
3882
  hash: "svelte-1fx5wwa",
3876
3883
  code: "\n /* Self-contained: print players ship no Tailwind or CSS reset. */.simple-cloze-print.svelte-1fx5wwa {padding:1rem;color:var(--pie-text, black);}.simple-cloze-print-teacher-instructions.svelte-1fx5wwa,\n .simple-cloze-print-prompt.svelte-1fx5wwa {margin-bottom:1rem;}.simple-cloze-print-teacher-instructions.svelte-1fx5wwa p,\n .simple-cloze-print-prompt.svelte-1fx5wwa p {margin:0.5em 0;}.simple-cloze-print-prompt.svelte-1fx5wwa strong {font-weight:600;}.simple-cloze-print-response.svelte-1fx5wwa {display:inline-flex;align-items:baseline;gap:0.5rem;}.simple-cloze-print-key-label.svelte-1fx5wwa {font-size:0.875rem;line-height:1.25rem;font-weight:600;}.simple-cloze-print-blank.svelte-1fx5wwa {display:inline-block;min-width:12rem;min-height:1.5rem;padding:0.5rem 0.75rem;border-bottom:2px solid var(--pie-text, black);}.simple-cloze-print-blank--key.svelte-1fx5wwa {min-width:6rem;font-weight:600;}\n\n @media print {.simple-cloze-print.svelte-1fx5wwa {padding:0;}\n }"
3877
3884
  };
3878
- function Za(e, t) {
3879
- We(t, !0), wr(e, Xa);
3880
- let n = Ir(t, "model", 7, null), r = Ir(t, "options", 7, null), i = /* @__PURE__ */ lt(() => r()?.role === "instructor"), a = /* @__PURE__ */ lt(() => n()?.promptEnabled !== !1 && typeof n()?.prompt == "string" ? n().prompt : ""), o = /* @__PURE__ */ lt(() => Hi(n()?.correctAnswer)), s = /* @__PURE__ */ lt(() => X(i) && !!X(o)), c = /* @__PURE__ */ lt(() => X(i) && n()?.teacherInstructionsEnabled !== !1 && n()?.teacherInstructions || ""), l = /* @__PURE__ */ M(null);
3885
+ function to(e, t) {
3886
+ We(t, !0), wr(e, eo);
3887
+ let n = Ir(t, "model", 7, null), r = Ir(t, "options", 7, null), i = /* @__PURE__ */ lt(() => r()?.role === "instructor"), a = /* @__PURE__ */ lt(() => n()?.promptEnabled !== !1 && typeof n()?.prompt == "string" ? n().prompt : ""), o = /* @__PURE__ */ lt(() => Ki(n()?.correctAnswer)), s = /* @__PURE__ */ lt(() => X(i) && !!X(o)), c = /* @__PURE__ */ lt(() => X(i) && n()?.teacherInstructionsEnabled !== !1 && n()?.teacherInstructions || ""), l = /* @__PURE__ */ M(null);
3881
3888
  dn(() => {
3882
3889
  if (!X(l) || !X(a)) return;
3883
3890
  let e = (e) => console.warn("simple-cloze: MathJax render failed", e);
3884
3891
  try {
3885
- Promise.resolve(Pi(X(l))).catch(e);
3892
+ Promise.resolve(Ri(X(l))).catch(e);
3886
3893
  } catch (t) {
3887
3894
  e(t);
3888
3895
  }
@@ -3900,41 +3907,41 @@ function Za(e, t) {
3900
3907
  set options(e = null) {
3901
3908
  r(e), Et();
3902
3909
  }
3903
- }, d = Ya(), f = Zt(d), p = (e) => {
3904
- var t = Ga();
3910
+ }, d = $a(), f = Zt(d), p = (e) => {
3911
+ var t = Ya();
3905
3912
  Cr(t, () => X(c), !0), Te(t), sr(e, t);
3906
3913
  };
3907
3914
  Sr(f, (e) => {
3908
3915
  X(c) && e(p);
3909
3916
  });
3910
3917
  var m = en(f, 2), h = (e) => {
3911
- var t = Ka();
3918
+ var t = Xa();
3912
3919
  Cr(t, () => X(a), !0), Te(t), Nr(t, (e) => N(l, e), () => X(l)), sr(e, t);
3913
3920
  };
3914
3921
  Sr(m, (e) => {
3915
3922
  X(a) && e(h);
3916
3923
  });
3917
3924
  var g = en(m, 2), ee = Zt(g), _ = (e) => {
3918
- var t = qa(), r = Qt(t), i = $t(r, !0), a = $t(en(r, 2), !0);
3925
+ var t = Za(), r = Qt(t), i = $t(r, !0), a = $t(en(r, 2), !0);
3919
3926
  vn((e) => {
3920
3927
  mr(i, e), mr(a, X(o));
3921
- }, [() => Wa("printCorrectAnswer", n()?.language)]), sr(e, t);
3928
+ }, [() => Ja("printCorrectAnswer", n()?.language)]), sr(e, t);
3922
3929
  }, v = (e) => {
3923
- var t = Ja();
3924
- vn((e) => Or(t, "aria-label", e), [() => Wa("printAnswerBlank", n()?.language)]), sr(e, t);
3930
+ var t = Qa();
3931
+ vn((e) => Or(t, "aria-label", e), [() => Ja("printAnswerBlank", n()?.language)]), sr(e, t);
3925
3932
  };
3926
3933
  return Sr(ee, (e) => {
3927
3934
  X(s) ? e(_) : e(v, -1);
3928
3935
  }), Te(g), Te(d), sr(e, d), Ge(u);
3929
3936
  }
3930
- Hr(Za, {
3937
+ Hr(to, {
3931
3938
  model: { type: "Object" },
3932
3939
  options: { type: "Object" }
3933
3940
  }, [], []);
3934
3941
  //#endregion
3935
3942
  //#region src/print/index.ts
3936
- var Qa = Za.element;
3943
+ var no = to.element;
3937
3944
  //#endregion
3938
- export { Qa as default };
3945
+ export { no as default };
3939
3946
 
3940
3947
  //# sourceMappingURL=print.js.map