@nemme/js-sdk 0.5.0 → 0.5.2
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/dist/assets/js-sdk.css +1 -1
- package/dist/client.d.ts +1 -0
- package/dist/forms/form-manager.d.ts +6 -0
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +559 -541
- package/dist/index.esm.js.map +1 -1
- package/dist/nemme-sdk.umd.js +8 -8
- package/dist/nemme-sdk.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import * as x from "react";
|
|
2
|
-
import fe, { createContext as ye, useContext as
|
|
3
|
-
import { createRoot as
|
|
2
|
+
import fe, { createContext as ye, useContext as He, useMemo as de, useRef as Xe, useCallback as q, useState as pe, useEffect as Rt, createElement as we, forwardRef as dn } from "react";
|
|
3
|
+
import { createRoot as pn } from "react-dom/client";
|
|
4
4
|
const L = (n) => typeof n == "string", ie = () => {
|
|
5
5
|
let n, e;
|
|
6
6
|
const t = new Promise((r, a) => {
|
|
7
7
|
n = r, e = a;
|
|
8
8
|
});
|
|
9
9
|
return t.resolve = n, t.reject = e, t;
|
|
10
|
-
},
|
|
10
|
+
}, Qe = (n) => n == null ? "" : "" + n, gn = (n, e, t) => {
|
|
11
11
|
n.forEach((r) => {
|
|
12
12
|
e[r] && (t[r] = e[r]);
|
|
13
13
|
});
|
|
14
|
-
},
|
|
14
|
+
}, fn = /###/g, et = (n) => n && n.indexOf("###") > -1 ? n.replace(fn, ".") : n, tt = (n) => !n || L(n), ge = (n, e, t) => {
|
|
15
15
|
const r = L(e) ? e.split(".") : e;
|
|
16
16
|
let a = 0;
|
|
17
17
|
for (; a < r.length - 1; ) {
|
|
18
|
-
if (
|
|
19
|
-
const s =
|
|
18
|
+
if (tt(n)) return {};
|
|
19
|
+
const s = et(r[a]);
|
|
20
20
|
!n[s] && t && (n[s] = new t()), Object.prototype.hasOwnProperty.call(n, s) ? n = n[s] : n = {}, ++a;
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return tt(n) ? {} : {
|
|
23
23
|
obj: n,
|
|
24
|
-
k:
|
|
24
|
+
k: et(r[a])
|
|
25
25
|
};
|
|
26
|
-
},
|
|
26
|
+
}, nt = (n, e, t) => {
|
|
27
27
|
const {
|
|
28
28
|
obj: r,
|
|
29
29
|
k: a
|
|
@@ -36,7 +36,7 @@ const L = (n) => typeof n == "string", ie = () => {
|
|
|
36
36
|
for (; o.obj === void 0 && i.length; )
|
|
37
37
|
s = `${i[i.length - 1]}.${s}`, i = i.slice(0, i.length - 1), o = ge(n, i, Object), o?.obj && typeof o.obj[`${o.k}.${s}`] < "u" && (o.obj = void 0);
|
|
38
38
|
o.obj[`${o.k}.${s}`] = t;
|
|
39
|
-
},
|
|
39
|
+
}, hn = (n, e, t, r) => {
|
|
40
40
|
const {
|
|
41
41
|
obj: a,
|
|
42
42
|
k: s
|
|
@@ -49,15 +49,15 @@ const L = (n) => typeof n == "string", ie = () => {
|
|
|
49
49
|
} = ge(n, e);
|
|
50
50
|
if (t && Object.prototype.hasOwnProperty.call(t, r))
|
|
51
51
|
return t[r];
|
|
52
|
-
},
|
|
52
|
+
}, mn = (n, e, t) => {
|
|
53
53
|
const r = ve(n, t);
|
|
54
54
|
return r !== void 0 ? r : ve(e, t);
|
|
55
|
-
},
|
|
55
|
+
}, Ct = (n, e, t) => {
|
|
56
56
|
for (const r in e)
|
|
57
|
-
r !== "__proto__" && r !== "constructor" && (r in n ? L(n[r]) || n[r] instanceof String || L(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) :
|
|
57
|
+
r !== "__proto__" && r !== "constructor" && (r in n ? L(n[r]) || n[r] instanceof String || L(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) : Ct(n[r], e[r], t) : n[r] = e[r]);
|
|
58
58
|
return n;
|
|
59
59
|
}, ne = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
60
|
-
var
|
|
60
|
+
var yn = {
|
|
61
61
|
"&": "&",
|
|
62
62
|
"<": "<",
|
|
63
63
|
">": ">",
|
|
@@ -65,8 +65,8 @@ var mn = {
|
|
|
65
65
|
"'": "'",
|
|
66
66
|
"/": "/"
|
|
67
67
|
};
|
|
68
|
-
const
|
|
69
|
-
class
|
|
68
|
+
const bn = (n) => L(n) ? n.replace(/[&<>"'\/]/g, (e) => yn[e]) : n;
|
|
69
|
+
class xn {
|
|
70
70
|
constructor(e) {
|
|
71
71
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
72
72
|
}
|
|
@@ -78,18 +78,18 @@ class bn {
|
|
|
78
78
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, r), this.regExpQueue.push(e), r;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const wn = [" ", ",", "?", "!", ";"], vn = new xn(20), kn = (n, e, t) => {
|
|
82
82
|
e = e || "", t = t || "";
|
|
83
|
-
const r =
|
|
83
|
+
const r = wn.filter((i) => e.indexOf(i) < 0 && t.indexOf(i) < 0);
|
|
84
84
|
if (r.length === 0) return !0;
|
|
85
|
-
const a =
|
|
85
|
+
const a = vn.getRegExp(`(${r.map((i) => i === "?" ? "\\?" : i).join("|")})`);
|
|
86
86
|
let s = !a.test(n);
|
|
87
87
|
if (!s) {
|
|
88
88
|
const i = n.indexOf(t);
|
|
89
89
|
i > 0 && !a.test(n.substring(0, i)) && (s = !0);
|
|
90
90
|
}
|
|
91
91
|
return s;
|
|
92
|
-
},
|
|
92
|
+
}, Me = (n, e, t = ".") => {
|
|
93
93
|
if (!n) return;
|
|
94
94
|
if (n[e])
|
|
95
95
|
return Object.prototype.hasOwnProperty.call(n, e) ? n[e] : void 0;
|
|
@@ -109,7 +109,7 @@ const xn = [" ", ",", "?", "!", ";"], wn = new bn(20), vn = (n, e, t) => {
|
|
|
109
109
|
a = i;
|
|
110
110
|
}
|
|
111
111
|
return a;
|
|
112
|
-
}, he = (n) => n?.replace("_", "-"),
|
|
112
|
+
}, he = (n) => n?.replace("_", "-"), Sn = {
|
|
113
113
|
type: "logger",
|
|
114
114
|
log(n) {
|
|
115
115
|
this.output("log", n);
|
|
@@ -124,12 +124,12 @@ const xn = [" ", ",", "?", "!", ";"], wn = new bn(20), vn = (n, e, t) => {
|
|
|
124
124
|
console?.[n]?.apply?.(console, e);
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
|
-
let
|
|
127
|
+
let En = class Be {
|
|
128
128
|
constructor(e, t = {}) {
|
|
129
129
|
this.init(e, t);
|
|
130
130
|
}
|
|
131
131
|
init(e, t = {}) {
|
|
132
|
-
this.prefix = t.prefix || "i18next:", this.logger = e ||
|
|
132
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || Sn, this.options = t, this.debug = t.debug;
|
|
133
133
|
}
|
|
134
134
|
log(...e) {
|
|
135
135
|
return this.forward(e, "log", "", !0);
|
|
@@ -147,16 +147,16 @@ let Sn = class Me {
|
|
|
147
147
|
return a && !this.debug ? null : (L(e[0]) && (e[0] = `${r}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
148
148
|
}
|
|
149
149
|
create(e) {
|
|
150
|
-
return new
|
|
150
|
+
return new Be(this.logger, {
|
|
151
151
|
prefix: `${this.prefix}:${e}:`,
|
|
152
152
|
...this.options
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
clone(e) {
|
|
156
|
-
return e = e || this.options, e.prefix = e.prefix || this.prefix, new
|
|
156
|
+
return e = e || this.options, e.prefix = e.prefix || this.prefix, new Be(this.logger, e);
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
|
-
var W = new
|
|
159
|
+
var W = new En();
|
|
160
160
|
class Ee {
|
|
161
161
|
constructor() {
|
|
162
162
|
this.observers = {};
|
|
@@ -187,7 +187,7 @@ class Ee {
|
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
class
|
|
190
|
+
class rt extends Ee {
|
|
191
191
|
constructor(e, t = {
|
|
192
192
|
ns: ["translation"],
|
|
193
193
|
defaultNS: "translation"
|
|
@@ -206,14 +206,14 @@ class nt extends Ee {
|
|
|
206
206
|
let o;
|
|
207
207
|
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], r && (Array.isArray(r) ? o.push(...r) : L(r) && s ? o.push(...r.split(s)) : o.push(r)));
|
|
208
208
|
const l = ve(this.data, o);
|
|
209
|
-
return !l && !t && !r && e.indexOf(".") > -1 && (e = o[0], t = o[1], r = o.slice(2).join(".")), l || !i || !L(r) ? l :
|
|
209
|
+
return !l && !t && !r && e.indexOf(".") > -1 && (e = o[0], t = o[1], r = o.slice(2).join(".")), l || !i || !L(r) ? l : Me(this.data?.[e]?.[t], r, s);
|
|
210
210
|
}
|
|
211
211
|
addResource(e, t, r, a, s = {
|
|
212
212
|
silent: !1
|
|
213
213
|
}) {
|
|
214
214
|
const i = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator;
|
|
215
215
|
let o = [e, t];
|
|
216
|
-
r && (o = o.concat(i ? r.split(i) : r)), e.indexOf(".") > -1 && (o = e.split("."), a = t, t = o[1]), this.addNamespaces(t),
|
|
216
|
+
r && (o = o.concat(i ? r.split(i) : r)), e.indexOf(".") > -1 && (o = e.split("."), a = t, t = o[1]), this.addNamespaces(t), nt(this.data, o, a), s.silent || this.emit("added", e, t, r, a);
|
|
217
217
|
}
|
|
218
218
|
addResources(e, t, r, a = {
|
|
219
219
|
silent: !1
|
|
@@ -231,10 +231,10 @@ class nt extends Ee {
|
|
|
231
231
|
let o = [e, t];
|
|
232
232
|
e.indexOf(".") > -1 && (o = e.split("."), a = r, r = t, t = o[1]), this.addNamespaces(t);
|
|
233
233
|
let l = ve(this.data, o) || {};
|
|
234
|
-
i.skipCopy || (r = JSON.parse(JSON.stringify(r))), a ?
|
|
234
|
+
i.skipCopy || (r = JSON.parse(JSON.stringify(r))), a ? Ct(l, r, s) : l = {
|
|
235
235
|
...l,
|
|
236
236
|
...r
|
|
237
|
-
},
|
|
237
|
+
}, nt(this.data, o, l), i.silent || this.emit("added", e, t, r);
|
|
238
238
|
}
|
|
239
239
|
removeResourceBundle(e, t) {
|
|
240
240
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -256,7 +256,7 @@ class nt extends Ee {
|
|
|
256
256
|
return this.data;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
var
|
|
259
|
+
var Pt = {
|
|
260
260
|
processors: {},
|
|
261
261
|
addPostProcessor(n) {
|
|
262
262
|
this.processors[n.name] = n;
|
|
@@ -267,22 +267,22 @@ var Ct = {
|
|
|
267
267
|
}), e;
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
|
-
const
|
|
271
|
-
function
|
|
270
|
+
const jt = Symbol("i18next/PATH_KEY");
|
|
271
|
+
function Ln() {
|
|
272
272
|
const n = [], e = /* @__PURE__ */ Object.create(null);
|
|
273
273
|
let t;
|
|
274
|
-
return e.get = (r, a) => (t?.revoke?.(), a ===
|
|
274
|
+
return e.get = (r, a) => (t?.revoke?.(), a === jt ? n : (n.push(a), t = Proxy.revocable(r, e), t.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), e).proxy;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function ze(n, e) {
|
|
277
277
|
const {
|
|
278
|
-
[
|
|
279
|
-
} = n(
|
|
278
|
+
[jt]: t
|
|
279
|
+
} = n(Ln());
|
|
280
280
|
return t.join(e?.keySeparator ?? ".");
|
|
281
281
|
}
|
|
282
|
-
const
|
|
282
|
+
const at = {}, Re = (n) => !L(n) && typeof n != "boolean" && typeof n != "number";
|
|
283
283
|
class ke extends Ee {
|
|
284
284
|
constructor(e, t = {}) {
|
|
285
|
-
super(),
|
|
285
|
+
super(), gn(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = W.create("translator");
|
|
286
286
|
}
|
|
287
287
|
changeLanguage(e) {
|
|
288
288
|
e && (this.language = e);
|
|
@@ -296,7 +296,7 @@ class ke extends Ee {
|
|
|
296
296
|
if (e == null) return !1;
|
|
297
297
|
const a = this.resolve(e, r);
|
|
298
298
|
if (a?.res === void 0) return !1;
|
|
299
|
-
const s =
|
|
299
|
+
const s = Re(a.res);
|
|
300
300
|
return !(r.returnObjects === !1 && s);
|
|
301
301
|
}
|
|
302
302
|
extractFromKey(e, t) {
|
|
@@ -304,7 +304,7 @@ class ke extends Ee {
|
|
|
304
304
|
r === void 0 && (r = ":");
|
|
305
305
|
const a = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
306
306
|
let s = t.ns || this.options.defaultNS || [];
|
|
307
|
-
const i = r && e.indexOf(r) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !
|
|
307
|
+
const i = r && e.indexOf(r) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !kn(e, r, a);
|
|
308
308
|
if (i && !o) {
|
|
309
309
|
const l = e.match(this.interpolator.nestingRegexp);
|
|
310
310
|
if (l && l.length > 0)
|
|
@@ -327,7 +327,7 @@ class ke extends Ee {
|
|
|
327
327
|
if (typeof a != "object" && this.options.overloadTranslationOptionHandler && (a = this.options.overloadTranslationOptionHandler(arguments)), typeof a == "object" && (a = {
|
|
328
328
|
...a
|
|
329
329
|
}), a || (a = {}), e == null) return "";
|
|
330
|
-
typeof e == "function" && (e =
|
|
330
|
+
typeof e == "function" && (e = ze(e, {
|
|
331
331
|
...this.options,
|
|
332
332
|
...a
|
|
333
333
|
})), Array.isArray(e) || (e = [String(e)]);
|
|
@@ -358,34 +358,34 @@ class ke extends Ee {
|
|
|
358
358
|
let p = m?.res;
|
|
359
359
|
const g = m?.usedKey || o, h = m?.exactUsedKey || o, w = ["[object Number]", "[object Function]", "[object RegExp]"], b = a.joinArrays !== void 0 ? a.joinArrays : this.options.joinArrays, v = !this.i18nFormat || this.i18nFormat.handleAsObject, k = a.count !== void 0 && !L(a.count), E = ke.hasDefaultValue(a), A = k ? this.pluralResolver.getSuffix(u, a.count, a) : "", F = a.ordinal && k ? this.pluralResolver.getSuffix(u, a.count, {
|
|
360
360
|
ordinal: !1
|
|
361
|
-
}) : "",
|
|
362
|
-
let
|
|
363
|
-
v && !p && E && (
|
|
364
|
-
const H =
|
|
365
|
-
if (v &&
|
|
361
|
+
}) : "", T = k && !a.ordinal && a.count === 0, N = T && a[`defaultValue${this.options.pluralSeparator}zero`] || a[`defaultValue${A}`] || a[`defaultValue${F}`] || a.defaultValue;
|
|
362
|
+
let R = p;
|
|
363
|
+
v && !p && E && (R = N);
|
|
364
|
+
const H = Re(R), U = Object.prototype.toString.apply(R);
|
|
365
|
+
if (v && R && H && w.indexOf(U) < 0 && !(L(b) && Array.isArray(R))) {
|
|
366
366
|
if (!a.returnObjects && !this.options.returnObjects) {
|
|
367
367
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
368
|
-
const M = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g,
|
|
368
|
+
const M = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, R, {
|
|
369
369
|
...a,
|
|
370
370
|
ns: l
|
|
371
371
|
}) : `key '${o} (${this.language})' returned an object instead of string.`;
|
|
372
372
|
return s ? (m.res = M, m.usedParams = this.getUsedParamsDetails(a), m) : M;
|
|
373
373
|
}
|
|
374
374
|
if (i) {
|
|
375
|
-
const M = Array.isArray(
|
|
376
|
-
for (const P in
|
|
377
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
375
|
+
const M = Array.isArray(R), O = M ? [] : {}, B = M ? h : g;
|
|
376
|
+
for (const P in R)
|
|
377
|
+
if (Object.prototype.hasOwnProperty.call(R, P)) {
|
|
378
378
|
const D = `${B}${i}${P}`;
|
|
379
379
|
E && !p ? O[P] = this.translate(D, {
|
|
380
380
|
...a,
|
|
381
|
-
defaultValue:
|
|
381
|
+
defaultValue: Re(N) ? N[P] : void 0,
|
|
382
382
|
joinArrays: !1,
|
|
383
383
|
ns: l
|
|
384
384
|
}) : O[P] = this.translate(D, {
|
|
385
385
|
...a,
|
|
386
386
|
joinArrays: !1,
|
|
387
387
|
ns: l
|
|
388
|
-
}), O[P] === D && (O[P] =
|
|
388
|
+
}), O[P] === D && (O[P] = R[P]);
|
|
389
389
|
}
|
|
390
390
|
p = O;
|
|
391
391
|
}
|
|
@@ -415,7 +415,7 @@ class ke extends Ee {
|
|
|
415
415
|
};
|
|
416
416
|
this.options.saveMissing && (this.options.saveMissingPlurals && k ? j.forEach((C) => {
|
|
417
417
|
const V = this.pluralResolver.getSuffixes(C, a);
|
|
418
|
-
|
|
418
|
+
T && a[`defaultValue${this.options.pluralSeparator}zero`] && V.indexOf(`${this.options.pluralSeparator}zero`) < 0 && V.push(`${this.options.pluralSeparator}zero`), V.forEach((Z) => {
|
|
419
419
|
K([C], o + Z, a[`defaultValue${Z}`] || N);
|
|
420
420
|
});
|
|
421
421
|
}) : K(j, o, N));
|
|
@@ -457,7 +457,7 @@ class ke extends Ee {
|
|
|
457
457
|
!r.lng && a && a.res && (r.lng = this.language || a.usedLng), r.nest !== !1 && (e = this.interpolator.nest(e, (...u) => s?.[0] === u[0] && !r.context ? (this.logger.warn(`It seems you are nesting recursively key: ${u[0]} in key: ${t[0]}`), null) : this.translate(...u, t), r)), r.interpolation && this.interpolator.reset();
|
|
458
458
|
}
|
|
459
459
|
const i = r.postProcess || this.options.postProcess, o = L(i) ? [i] : i;
|
|
460
|
-
return e != null && o?.length && r.applyPostProcessor !== !1 && (e =
|
|
460
|
+
return e != null && o?.length && r.applyPostProcessor !== !1 && (e = Pt.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
461
461
|
i18nResolved: {
|
|
462
462
|
...a,
|
|
463
463
|
usedParams: this.getUsedParamsDetails(r)
|
|
@@ -475,7 +475,7 @@ class ke extends Ee {
|
|
|
475
475
|
this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
|
|
476
476
|
const f = t.count !== void 0 && !L(t.count), m = f && !t.ordinal && t.count === 0, p = t.context !== void 0 && (L(t.context) || typeof t.context == "number") && t.context !== "", g = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
477
477
|
u.forEach((h) => {
|
|
478
|
-
this.isValidLookup(r) || (o = h, !
|
|
478
|
+
this.isValidLookup(r) || (o = h, !at[`${g[0]}-${h}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (at[`${g[0]}-${h}`] = !0, this.logger.warn(`key "${a}" for languages "${g.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!!!")), g.forEach((w) => {
|
|
479
479
|
if (this.isValidLookup(r)) return;
|
|
480
480
|
i = w;
|
|
481
481
|
const b = [d];
|
|
@@ -532,7 +532,7 @@ class ke extends Ee {
|
|
|
532
532
|
return !1;
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
class
|
|
535
|
+
class st {
|
|
536
536
|
constructor(e) {
|
|
537
537
|
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = W.create("languageUtils");
|
|
538
538
|
}
|
|
@@ -596,20 +596,20 @@ class at {
|
|
|
596
596
|
}), a;
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
const
|
|
599
|
+
const it = {
|
|
600
600
|
zero: 0,
|
|
601
601
|
one: 1,
|
|
602
602
|
two: 2,
|
|
603
603
|
few: 3,
|
|
604
604
|
many: 4,
|
|
605
605
|
other: 5
|
|
606
|
-
},
|
|
606
|
+
}, ot = {
|
|
607
607
|
select: (n) => n === 1 ? "one" : "other",
|
|
608
608
|
resolvedOptions: () => ({
|
|
609
609
|
pluralCategories: ["one", "other"]
|
|
610
610
|
})
|
|
611
611
|
};
|
|
612
|
-
class
|
|
612
|
+
class Fn {
|
|
613
613
|
constructor(e, t = {}) {
|
|
614
614
|
this.languageUtils = e, this.options = t, this.logger = W.create("pluralResolver"), this.pluralRulesCache = {};
|
|
615
615
|
}
|
|
@@ -633,8 +633,8 @@ class Ln {
|
|
|
633
633
|
});
|
|
634
634
|
} catch {
|
|
635
635
|
if (!Intl)
|
|
636
|
-
return this.logger.error("No Intl support, please use an Intl polyfill!"),
|
|
637
|
-
if (!e.match(/-|_/)) return
|
|
636
|
+
return this.logger.error("No Intl support, please use an Intl polyfill!"), ot;
|
|
637
|
+
if (!e.match(/-|_/)) return ot;
|
|
638
638
|
const l = this.languageUtils.getLanguagePartFromCode(e);
|
|
639
639
|
i = this.getRule(l, t);
|
|
640
640
|
}
|
|
@@ -649,18 +649,18 @@ class Ln {
|
|
|
649
649
|
}
|
|
650
650
|
getSuffixes(e, t = {}) {
|
|
651
651
|
let r = this.getRule(e, t);
|
|
652
|
-
return r || (r = this.getRule("dev", t)), r ? r.resolvedOptions().pluralCategories.sort((a, s) =>
|
|
652
|
+
return r || (r = this.getRule("dev", t)), r ? r.resolvedOptions().pluralCategories.sort((a, s) => it[a] - it[s]).map((a) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${a}`) : [];
|
|
653
653
|
}
|
|
654
654
|
getSuffix(e, t, r = {}) {
|
|
655
655
|
const a = this.getRule(e, r);
|
|
656
656
|
return a ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${a.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, r));
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
|
-
const
|
|
660
|
-
let s =
|
|
661
|
-
return !s && a && L(t) && (s =
|
|
659
|
+
const lt = (n, e, t, r = ".", a = !0) => {
|
|
660
|
+
let s = mn(n, e, t);
|
|
661
|
+
return !s && a && L(t) && (s = Me(n, t, r), s === void 0 && (s = Me(e, t, r))), s;
|
|
662
662
|
}, Ce = (n) => n.replace(/\$/g, "$$$$");
|
|
663
|
-
class
|
|
663
|
+
class An {
|
|
664
664
|
constructor(e = {}) {
|
|
665
665
|
this.logger = W.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((t) => t), this.init(e);
|
|
666
666
|
}
|
|
@@ -687,7 +687,7 @@ class Fn {
|
|
|
687
687
|
maxReplaces: w,
|
|
688
688
|
alwaysFormat: b
|
|
689
689
|
} = e.interpolation;
|
|
690
|
-
this.escape = t !== void 0 ? t :
|
|
690
|
+
this.escape = t !== void 0 ? t : bn, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = a !== void 0 ? a : !1, this.prefix = s ? ne(s) : i || "{{", this.suffix = o ? ne(o) : l || "}}", this.formatSeparator = c || ",", this.unescapePrefix = d ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : d || "", this.nestingPrefix = f ? ne(f) : m || ne("$t("), this.nestingSuffix = p ? ne(p) : g || ne(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = w || 1e3, this.alwaysFormat = b !== void 0 ? b : !1, this.resetRegExp();
|
|
691
691
|
}
|
|
692
692
|
reset() {
|
|
693
693
|
this.options && this.init(this.options);
|
|
@@ -700,7 +700,7 @@ class Fn {
|
|
|
700
700
|
let s, i, o;
|
|
701
701
|
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (m) => {
|
|
702
702
|
if (m.indexOf(this.formatSeparator) < 0) {
|
|
703
|
-
const w =
|
|
703
|
+
const w = lt(t, l, m, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
704
704
|
return this.alwaysFormat ? this.format(w, void 0, r, {
|
|
705
705
|
...a,
|
|
706
706
|
...t,
|
|
@@ -708,7 +708,7 @@ class Fn {
|
|
|
708
708
|
}) : w;
|
|
709
709
|
}
|
|
710
710
|
const p = m.split(this.formatSeparator), g = p.shift().trim(), h = p.join(this.formatSeparator).trim();
|
|
711
|
-
return this.format(
|
|
711
|
+
return this.format(lt(t, l, g, this.options.keySeparator, this.options.ignoreJSONStructure), h, r, {
|
|
712
712
|
...a,
|
|
713
713
|
...t,
|
|
714
714
|
interpolationkey: g
|
|
@@ -736,7 +736,7 @@ class Fn {
|
|
|
736
736
|
continue;
|
|
737
737
|
} else
|
|
738
738
|
this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`), i = "";
|
|
739
|
-
else !L(i) && !this.useRawValueToEscape && (i =
|
|
739
|
+
else !L(i) && !this.useRawValueToEscape && (i = Qe(i));
|
|
740
740
|
const g = m.safeValue(i);
|
|
741
741
|
if (e = e.replace(s[0], g), u ? (m.regex.lastIndex += i.length, m.regex.lastIndex -= s[0].length) : m.regex.lastIndex = 0, o++, o >= this.maxReplaces)
|
|
742
742
|
break;
|
|
@@ -770,7 +770,7 @@ class Fn {
|
|
|
770
770
|
}, i = i.replace && !L(i.replace) ? i.replace : i, i.applyPostProcessor = !1, delete i.defaultValue;
|
|
771
771
|
const c = /{.*}/.test(a[1]) ? a[1].lastIndexOf("}") + 1 : a[1].indexOf(this.formatSeparator);
|
|
772
772
|
if (c !== -1 && (l = a[1].slice(c).split(this.formatSeparator).map((d) => d.trim()).filter(Boolean), a[1] = a[1].slice(0, c)), s = t(o.call(this, a[1].trim(), i), i), s && a[0] === e && !L(s)) return s;
|
|
773
|
-
L(s) || (s =
|
|
773
|
+
L(s) || (s = Qe(s)), s || (this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`), s = ""), l.length && (s = l.reduce((d, u) => this.format(d, u, r.lng, {
|
|
774
774
|
...r,
|
|
775
775
|
interpolationkey: a[1].trim()
|
|
776
776
|
}), s.trim())), e = e.replace(a[0], s), this.regexp.lastIndex = 0;
|
|
@@ -778,7 +778,7 @@ class Fn {
|
|
|
778
778
|
return e;
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
|
-
const
|
|
781
|
+
const On = (n) => {
|
|
782
782
|
let e = n.toLowerCase().trim();
|
|
783
783
|
const t = {};
|
|
784
784
|
if (n.indexOf("(") > -1) {
|
|
@@ -796,7 +796,7 @@ const An = (n) => {
|
|
|
796
796
|
formatName: e,
|
|
797
797
|
formatOptions: t
|
|
798
798
|
};
|
|
799
|
-
},
|
|
799
|
+
}, ct = (n) => {
|
|
800
800
|
const e = {};
|
|
801
801
|
return (t, r, a) => {
|
|
802
802
|
let s = a;
|
|
@@ -808,8 +808,8 @@ const An = (n) => {
|
|
|
808
808
|
let o = e[i];
|
|
809
809
|
return o || (o = n(he(r), a), e[i] = o), o(t);
|
|
810
810
|
};
|
|
811
|
-
},
|
|
812
|
-
class
|
|
811
|
+
}, Nn = (n) => (e, t, r) => n(he(t), r)(e);
|
|
812
|
+
class Tn {
|
|
813
813
|
constructor(e = {}) {
|
|
814
814
|
this.logger = W.create("formatter"), this.options = e, this.init(e);
|
|
815
815
|
}
|
|
@@ -817,7 +817,7 @@ class Nn {
|
|
|
817
817
|
interpolation: {}
|
|
818
818
|
}) {
|
|
819
819
|
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
820
|
-
const r = t.cacheInBuiltFormats ?
|
|
820
|
+
const r = t.cacheInBuiltFormats ? ct : Nn;
|
|
821
821
|
this.formats = {
|
|
822
822
|
number: r((a, s) => {
|
|
823
823
|
const i = new Intl.NumberFormat(a, {
|
|
@@ -856,7 +856,7 @@ class Nn {
|
|
|
856
856
|
this.formats[e.toLowerCase().trim()] = t;
|
|
857
857
|
}
|
|
858
858
|
addCached(e, t) {
|
|
859
|
-
this.formats[e.toLowerCase().trim()] =
|
|
859
|
+
this.formats[e.toLowerCase().trim()] = ct(t);
|
|
860
860
|
}
|
|
861
861
|
format(e, t, r, a = {}) {
|
|
862
862
|
const s = t.split(this.formatSeparator);
|
|
@@ -868,7 +868,7 @@ class Nn {
|
|
|
868
868
|
const {
|
|
869
869
|
formatName: c,
|
|
870
870
|
formatOptions: d
|
|
871
|
-
} =
|
|
871
|
+
} = On(l);
|
|
872
872
|
if (this.formats[c]) {
|
|
873
873
|
let u = o;
|
|
874
874
|
try {
|
|
@@ -891,7 +891,7 @@ class Nn {
|
|
|
891
891
|
const Rn = (n, e) => {
|
|
892
892
|
n.pending[e] !== void 0 && (delete n.pending[e], n.pendingCount--);
|
|
893
893
|
};
|
|
894
|
-
class
|
|
894
|
+
class Cn extends Ee {
|
|
895
895
|
constructor(e, t, r, a = {}) {
|
|
896
896
|
super(), this.backend = e, this.store = t, this.services = r, this.languageUtils = r.languageUtils, this.options = a, this.logger = W.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = a.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = a.maxRetries >= 0 ? a.maxRetries : 5, this.retryTimeout = a.retryTimeout >= 1 ? a.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(r, a.backend, a);
|
|
897
897
|
}
|
|
@@ -923,7 +923,7 @@ class Tn extends Ee {
|
|
|
923
923
|
}), this.state[e] = t ? -1 : 2, t && r && (this.state[e] = 0);
|
|
924
924
|
const o = {};
|
|
925
925
|
this.queue.forEach((l) => {
|
|
926
|
-
|
|
926
|
+
hn(l.loaded, [s], i), Rn(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((c) => {
|
|
927
927
|
o[c] || (o[c] = {});
|
|
928
928
|
const d = l.loaded[c];
|
|
929
929
|
d.length && d.forEach((u) => {
|
|
@@ -1021,7 +1021,7 @@ class Tn extends Ee {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
|
-
const
|
|
1024
|
+
const ut = () => ({
|
|
1025
1025
|
debug: !1,
|
|
1026
1026
|
initAsync: !0,
|
|
1027
1027
|
ns: ["translation"],
|
|
@@ -1078,17 +1078,17 @@ const ct = () => ({
|
|
|
1078
1078
|
skipOnVariables: !0
|
|
1079
1079
|
},
|
|
1080
1080
|
cacheInBuiltFormats: !0
|
|
1081
|
-
}),
|
|
1082
|
-
},
|
|
1081
|
+
}), dt = (n) => (L(n.ns) && (n.ns = [n.ns]), L(n.fallbackLng) && (n.fallbackLng = [n.fallbackLng]), L(n.fallbackNS) && (n.fallbackNS = [n.fallbackNS]), n.supportedLngs?.indexOf?.("cimode") < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), typeof n.initImmediate == "boolean" && (n.initAsync = n.initImmediate), n), xe = () => {
|
|
1082
|
+
}, Pn = (n) => {
|
|
1083
1083
|
Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
|
|
1084
1084
|
typeof n[t] == "function" && (n[t] = n[t].bind(n));
|
|
1085
1085
|
});
|
|
1086
1086
|
};
|
|
1087
1087
|
class me extends Ee {
|
|
1088
1088
|
constructor(e = {}, t) {
|
|
1089
|
-
if (super(), this.options =
|
|
1089
|
+
if (super(), this.options = dt(e), this.services = {}, this.logger = W, this.modules = {
|
|
1090
1090
|
external: []
|
|
1091
|
-
},
|
|
1091
|
+
}, Pn(this), t && !this.isInitialized && !e.isClone) {
|
|
1092
1092
|
if (!this.options.initAsync)
|
|
1093
1093
|
return this.init(e, t), this;
|
|
1094
1094
|
setTimeout(() => {
|
|
@@ -1098,11 +1098,11 @@ class me extends Ee {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
init(e = {}, t) {
|
|
1100
1100
|
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (L(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
1101
|
-
const r =
|
|
1101
|
+
const r = ut();
|
|
1102
1102
|
this.options = {
|
|
1103
1103
|
...r,
|
|
1104
1104
|
...this.options,
|
|
1105
|
-
...
|
|
1105
|
+
...dt(e)
|
|
1106
1106
|
}, this.options.interpolation = {
|
|
1107
1107
|
...r.interpolation,
|
|
1108
1108
|
...this.options.interpolation
|
|
@@ -1111,16 +1111,16 @@ class me extends Ee {
|
|
|
1111
1111
|
if (!this.options.isClone) {
|
|
1112
1112
|
this.modules.logger ? W.init(a(this.modules.logger), this.options) : W.init(null, this.options);
|
|
1113
1113
|
let c;
|
|
1114
|
-
this.modules.formatter ? c = this.modules.formatter : c =
|
|
1115
|
-
const d = new
|
|
1116
|
-
this.store = new
|
|
1114
|
+
this.modules.formatter ? c = this.modules.formatter : c = Tn;
|
|
1115
|
+
const d = new st(this.options);
|
|
1116
|
+
this.store = new rt(this.options.resources, this.options);
|
|
1117
1117
|
const u = this.services;
|
|
1118
|
-
u.logger = W, u.resourceStore = this.store, u.languageUtils = d, u.pluralResolver = new
|
|
1118
|
+
u.logger = W, u.resourceStore = this.store, u.languageUtils = d, u.pluralResolver = new Fn(d, {
|
|
1119
1119
|
prepend: this.options.pluralSeparator,
|
|
1120
1120
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1121
|
-
}), this.options.interpolation.format && this.options.interpolation.format !== r.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"), c && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (u.formatter = a(c), u.formatter.init && u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new
|
|
1121
|
+
}), this.options.interpolation.format && this.options.interpolation.format !== r.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"), c && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (u.formatter = a(c), u.formatter.init && u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new An(this.options), u.utils = {
|
|
1122
1122
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1123
|
-
}, u.backendConnector = new
|
|
1123
|
+
}, u.backendConnector = new Cn(a(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", (m, ...p) => {
|
|
1124
1124
|
this.emit(m, ...p);
|
|
1125
1125
|
}), this.modules.languageDetector && (u.languageDetector = a(this.modules.languageDetector), u.languageDetector.init && u.languageDetector.init(u, this.options.detection, this.options)), this.modules.i18nFormat && (u.i18nFormat = a(this.modules.i18nFormat), u.i18nFormat.init && u.i18nFormat.init(this)), this.translator = new ke(this.services, this.options), this.translator.on("*", (m, ...p) => {
|
|
1126
1126
|
this.emit(m, ...p);
|
|
@@ -1172,7 +1172,7 @@ class me extends Ee {
|
|
|
1172
1172
|
use(e) {
|
|
1173
1173
|
if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1174
1174
|
if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1175
|
-
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" &&
|
|
1175
|
+
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" && Pt.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
1176
1176
|
}
|
|
1177
1177
|
setResolvedLanguage(e) {
|
|
1178
1178
|
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
|
|
@@ -1211,10 +1211,10 @@ class me extends Ee {
|
|
|
1211
1211
|
}, l.lng = l.lng || a.lng, l.lngs = l.lngs || a.lngs, l.ns = l.ns || a.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || r || a.keyPrefix);
|
|
1212
1212
|
const c = this.options.keySeparator || ".";
|
|
1213
1213
|
let d;
|
|
1214
|
-
return l.keyPrefix && Array.isArray(s) ? d = s.map((u) => (typeof u == "function" && (u =
|
|
1214
|
+
return l.keyPrefix && Array.isArray(s) ? d = s.map((u) => (typeof u == "function" && (u = ze(u, {
|
|
1215
1215
|
...this.options,
|
|
1216
1216
|
...i
|
|
1217
|
-
})), `${l.keyPrefix}${c}${u}`)) : (typeof s == "function" && (s =
|
|
1217
|
+
})), `${l.keyPrefix}${c}${u}`)) : (typeof s == "function" && (s = ze(s, {
|
|
1218
1218
|
...this.options,
|
|
1219
1219
|
...i
|
|
1220
1220
|
})), d = l.keyPrefix ? `${l.keyPrefix}${c}${s}` : s), this.t(d, l);
|
|
@@ -1273,7 +1273,7 @@ class me extends Ee {
|
|
|
1273
1273
|
}
|
|
1274
1274
|
} catch {
|
|
1275
1275
|
}
|
|
1276
|
-
const t = ["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"], r = this.services?.languageUtils || new
|
|
1276
|
+
const t = ["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"], r = this.services?.languageUtils || new st(ut());
|
|
1277
1277
|
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(r.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1278
1278
|
}
|
|
1279
1279
|
static createInstance(e = {}, t) {
|
|
@@ -1299,7 +1299,7 @@ class me extends Ee {
|
|
|
1299
1299
|
}, l[c] = Object.keys(l[c]).reduce((d, u) => (d[u] = {
|
|
1300
1300
|
...l[c][u]
|
|
1301
1301
|
}, d), l[c]), l), {});
|
|
1302
|
-
s.store = new
|
|
1302
|
+
s.store = new rt(o, a), s.services.resourceStore = s.store;
|
|
1303
1303
|
}
|
|
1304
1304
|
return s.translator = new ke(s.services, a), s.translator.on("*", (o, ...l) => {
|
|
1305
1305
|
s.emit(o, ...l);
|
|
@@ -1333,7 +1333,7 @@ I.setDefaultNamespace;
|
|
|
1333
1333
|
I.hasLoadedNamespace;
|
|
1334
1334
|
I.loadNamespaces;
|
|
1335
1335
|
I.loadLanguages;
|
|
1336
|
-
const
|
|
1336
|
+
const jn = (n, e, t, r) => {
|
|
1337
1337
|
const a = [t, {
|
|
1338
1338
|
code: e,
|
|
1339
1339
|
...r || {}
|
|
@@ -1341,9 +1341,9 @@ const Pn = (n, e, t, r) => {
|
|
|
1341
1341
|
if (n?.services?.logger?.forward)
|
|
1342
1342
|
return n.services.logger.forward(a, "warn", "react-i18next::", !0);
|
|
1343
1343
|
Q(a[0]) && (a[0] = `react-i18next:: ${a[0]}`), n?.services?.logger?.warn ? n.services.logger.warn(...a) : console?.warn && console.warn(...a);
|
|
1344
|
-
},
|
|
1345
|
-
Q(t) &&
|
|
1346
|
-
},
|
|
1344
|
+
}, pt = {}, It = (n, e, t, r) => {
|
|
1345
|
+
Q(t) && pt[t] || (Q(t) && (pt[t] = /* @__PURE__ */ new Date()), jn(n, e, t, r));
|
|
1346
|
+
}, $t = (n, e) => () => {
|
|
1347
1347
|
if (n.isInitialized)
|
|
1348
1348
|
e();
|
|
1349
1349
|
else {
|
|
@@ -1354,21 +1354,21 @@ const Pn = (n, e, t, r) => {
|
|
|
1354
1354
|
};
|
|
1355
1355
|
n.on("initialized", t);
|
|
1356
1356
|
}
|
|
1357
|
-
},
|
|
1358
|
-
n.loadNamespaces(e,
|
|
1359
|
-
},
|
|
1360
|
-
if (Q(t) && (t = [t]), n.options.preload && n.options.preload.indexOf(e) > -1) return
|
|
1357
|
+
}, Ue = (n, e, t) => {
|
|
1358
|
+
n.loadNamespaces(e, $t(n, t));
|
|
1359
|
+
}, gt = (n, e, t, r) => {
|
|
1360
|
+
if (Q(t) && (t = [t]), n.options.preload && n.options.preload.indexOf(e) > -1) return Ue(n, t, r);
|
|
1361
1361
|
t.forEach((a) => {
|
|
1362
1362
|
n.options.ns.indexOf(a) < 0 && n.options.ns.push(a);
|
|
1363
|
-
}), n.loadLanguages(e,
|
|
1364
|
-
},
|
|
1363
|
+
}), n.loadLanguages(e, $t(n, r));
|
|
1364
|
+
}, In = (n, e, t = {}) => !e.languages || !e.languages.length ? (It(e, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
|
|
1365
1365
|
languages: e.languages
|
|
1366
1366
|
}), !0) : e.hasLoadedNamespace(n, {
|
|
1367
1367
|
lng: t.lng,
|
|
1368
1368
|
precheck: (r, a) => {
|
|
1369
1369
|
if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && r.services.backendConnector.backend && r.isLanguageChangingTo && !a(r.isLanguageChangingTo, n)) return !1;
|
|
1370
1370
|
}
|
|
1371
|
-
}), Q = (n) => typeof n == "string",
|
|
1371
|
+
}), Q = (n) => typeof n == "string", $n = (n) => typeof n == "object" && n !== null, Dn = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, _n = {
|
|
1372
1372
|
"&": "&",
|
|
1373
1373
|
"&": "&",
|
|
1374
1374
|
"<": "<",
|
|
@@ -1389,8 +1389,8 @@ const Pn = (n, e, t, r) => {
|
|
|
1389
1389
|
"…": "…",
|
|
1390
1390
|
"/": "/",
|
|
1391
1391
|
"/": "/"
|
|
1392
|
-
},
|
|
1393
|
-
let
|
|
1392
|
+
}, Mn = (n) => _n[n], Bn = (n) => n.replace(Dn, Mn);
|
|
1393
|
+
let Ve = {
|
|
1394
1394
|
bindI18n: "languageChanged",
|
|
1395
1395
|
bindI18nStore: "",
|
|
1396
1396
|
transEmptyNodeValue: "",
|
|
@@ -1398,24 +1398,24 @@ let Ue = {
|
|
|
1398
1398
|
transWrapTextNodes: "",
|
|
1399
1399
|
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
1400
1400
|
useSuspense: !0,
|
|
1401
|
-
unescape:
|
|
1401
|
+
unescape: Bn
|
|
1402
1402
|
};
|
|
1403
|
-
const
|
|
1404
|
-
|
|
1405
|
-
...
|
|
1403
|
+
const zn = (n = {}) => {
|
|
1404
|
+
Ve = {
|
|
1405
|
+
...Ve,
|
|
1406
1406
|
...n
|
|
1407
1407
|
};
|
|
1408
|
-
},
|
|
1409
|
-
let
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1412
|
-
},
|
|
1408
|
+
}, Un = () => Ve;
|
|
1409
|
+
let Dt;
|
|
1410
|
+
const Vn = (n) => {
|
|
1411
|
+
Dt = n;
|
|
1412
|
+
}, Hn = () => Dt, Kn = {
|
|
1413
1413
|
type: "3rdParty",
|
|
1414
1414
|
init(n) {
|
|
1415
|
-
|
|
1415
|
+
zn(n.options.react), Vn(n);
|
|
1416
1416
|
}
|
|
1417
|
-
},
|
|
1418
|
-
class
|
|
1417
|
+
}, _t = ye();
|
|
1418
|
+
class qn {
|
|
1419
1419
|
constructor() {
|
|
1420
1420
|
this.usedNamespaces = {};
|
|
1421
1421
|
}
|
|
@@ -1438,10 +1438,10 @@ var Pe = { exports: {} }, je = {};
|
|
|
1438
1438
|
* This source code is licensed under the MIT license found in the
|
|
1439
1439
|
* LICENSE file in the root directory of this source tree.
|
|
1440
1440
|
*/
|
|
1441
|
-
var
|
|
1442
|
-
function
|
|
1443
|
-
if (
|
|
1444
|
-
|
|
1441
|
+
var ft;
|
|
1442
|
+
function Zn() {
|
|
1443
|
+
if (ft) return je;
|
|
1444
|
+
ft = 1;
|
|
1445
1445
|
var n = fe;
|
|
1446
1446
|
function e(u, f) {
|
|
1447
1447
|
return u === f && (u !== 0 || 1 / u === 1 / f) || u !== u && f !== f;
|
|
@@ -1479,25 +1479,25 @@ function qn() {
|
|
|
1479
1479
|
var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? c : o;
|
|
1480
1480
|
return je.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : d, je;
|
|
1481
1481
|
}
|
|
1482
|
-
var
|
|
1483
|
-
function
|
|
1484
|
-
return
|
|
1482
|
+
var ht;
|
|
1483
|
+
function Wn() {
|
|
1484
|
+
return ht || (ht = 1, Pe.exports = Zn()), Pe.exports;
|
|
1485
1485
|
}
|
|
1486
|
-
var
|
|
1487
|
-
const
|
|
1488
|
-
t:
|
|
1486
|
+
var Gn = Wn();
|
|
1487
|
+
const Yn = (n, e) => Q(e) ? e : $n(e) && Q(e.defaultValue) ? e.defaultValue : Array.isArray(n) ? n[n.length - 1] : n, Jn = {
|
|
1488
|
+
t: Yn,
|
|
1489
1489
|
ready: !1
|
|
1490
|
-
},
|
|
1491
|
-
},
|
|
1490
|
+
}, Xn = () => () => {
|
|
1491
|
+
}, Ke = (n, e = {}) => {
|
|
1492
1492
|
const {
|
|
1493
1493
|
i18n: t
|
|
1494
1494
|
} = e, {
|
|
1495
1495
|
i18n: r,
|
|
1496
1496
|
defaultNS: a
|
|
1497
|
-
} =
|
|
1498
|
-
s && !s.reportNamespaces && (s.reportNamespaces = new
|
|
1497
|
+
} = He(_t) || {}, s = t || r || Hn();
|
|
1498
|
+
s && !s.reportNamespaces && (s.reportNamespaces = new qn()), s || It(s, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
1499
1499
|
const i = de(() => ({
|
|
1500
|
-
...
|
|
1500
|
+
...Un(),
|
|
1501
1501
|
...s?.options?.react,
|
|
1502
1502
|
...e
|
|
1503
1503
|
}), [s, e]), {
|
|
@@ -1508,8 +1508,8 @@ const Gn = (n, e) => Q(e) ? e : In(e) && Q(e.defaultValue) ? e.defaultValue : Ar
|
|
|
1508
1508
|
return Q(k) ? [k] : k || ["translation"];
|
|
1509
1509
|
}, [n, a, s]);
|
|
1510
1510
|
s?.reportNamespaces?.addUsedNamespaces?.(c);
|
|
1511
|
-
const d =
|
|
1512
|
-
if (!s) return
|
|
1511
|
+
const d = Xe(0), u = q((k) => {
|
|
1512
|
+
if (!s) return Xn;
|
|
1513
1513
|
const {
|
|
1514
1514
|
bindI18n: E,
|
|
1515
1515
|
bindI18nStore: A
|
|
@@ -1517,12 +1517,12 @@ const Gn = (n, e) => Q(e) ? e : In(e) && Q(e.defaultValue) ? e.defaultValue : Ar
|
|
|
1517
1517
|
d.current += 1, k();
|
|
1518
1518
|
};
|
|
1519
1519
|
return E && s.on(E, F), A && s.store.on(A, F), () => {
|
|
1520
|
-
E && E.split(" ").forEach((
|
|
1520
|
+
E && E.split(" ").forEach((T) => s.off(T, F)), A && A.split(" ").forEach((T) => s.store.off(T, F));
|
|
1521
1521
|
};
|
|
1522
|
-
}, [s, i]), f =
|
|
1522
|
+
}, [s, i]), f = Xe(), m = q(() => {
|
|
1523
1523
|
if (!s)
|
|
1524
|
-
return
|
|
1525
|
-
const k = !!(s.isInitialized || s.initializedStoreOnce) && c.every((
|
|
1524
|
+
return Jn;
|
|
1525
|
+
const k = !!(s.isInitialized || s.initializedStoreOnce) && c.every((R) => In(R, s, i)), E = e.lng || s.language, A = d.current, F = f.current;
|
|
1526
1526
|
if (F && F.ready === k && F.lng === E && F.keyPrefix === l && F.revision === A)
|
|
1527
1527
|
return F;
|
|
1528
1528
|
const N = {
|
|
@@ -1536,11 +1536,11 @@ const Gn = (n, e) => Q(e) ? e : In(e) && Q(e.defaultValue) ? e.defaultValue : Ar
|
|
|
1536
1536
|
}, [s, c, l, i, e.lng]), [p, g] = pe(0), {
|
|
1537
1537
|
t: h,
|
|
1538
1538
|
ready: w
|
|
1539
|
-
} =
|
|
1539
|
+
} = Gn.useSyncExternalStore(u, m, m);
|
|
1540
1540
|
Rt(() => {
|
|
1541
1541
|
if (s && !w && !o) {
|
|
1542
1542
|
const k = () => g((E) => E + 1);
|
|
1543
|
-
e.lng ?
|
|
1543
|
+
e.lng ? gt(s, e.lng, c, k) : Ue(s, c, k);
|
|
1544
1544
|
}
|
|
1545
1545
|
}, [s, e.lng, c, w, o, p]);
|
|
1546
1546
|
const b = s || {}, v = de(() => {
|
|
@@ -1550,11 +1550,11 @@ const Gn = (n, e) => Q(e) ? e : In(e) && Q(e.defaultValue) ? e.defaultValue : Ar
|
|
|
1550
1550
|
if (s && o && !w)
|
|
1551
1551
|
throw new Promise((k) => {
|
|
1552
1552
|
const E = () => k();
|
|
1553
|
-
e.lng ?
|
|
1553
|
+
e.lng ? gt(s, e.lng, c, E) : Ue(s, c, E);
|
|
1554
1554
|
});
|
|
1555
1555
|
return v;
|
|
1556
1556
|
};
|
|
1557
|
-
function
|
|
1557
|
+
function Qn({
|
|
1558
1558
|
i18n: n,
|
|
1559
1559
|
defaultNS: e,
|
|
1560
1560
|
children: t
|
|
@@ -1563,7 +1563,7 @@ function Xn({
|
|
|
1563
1563
|
i18n: n,
|
|
1564
1564
|
defaultNS: e
|
|
1565
1565
|
}), [n, e]);
|
|
1566
|
-
return we(
|
|
1566
|
+
return we(_t.Provider, {
|
|
1567
1567
|
value: r
|
|
1568
1568
|
}, t);
|
|
1569
1569
|
}
|
|
@@ -1577,10 +1577,10 @@ var Ie = { exports: {} }, oe = {};
|
|
|
1577
1577
|
* This source code is licensed under the MIT license found in the
|
|
1578
1578
|
* LICENSE file in the root directory of this source tree.
|
|
1579
1579
|
*/
|
|
1580
|
-
var
|
|
1581
|
-
function
|
|
1582
|
-
if (
|
|
1583
|
-
|
|
1580
|
+
var mt;
|
|
1581
|
+
function er() {
|
|
1582
|
+
if (mt) return oe;
|
|
1583
|
+
mt = 1;
|
|
1584
1584
|
var n = fe, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
1585
1585
|
function i(o, l, c) {
|
|
1586
1586
|
var d, u = {}, f = null, m = null;
|
|
@@ -1591,13 +1591,13 @@ function Qn() {
|
|
|
1591
1591
|
}
|
|
1592
1592
|
return oe.Fragment = t, oe.jsx = i, oe.jsxs = i, oe;
|
|
1593
1593
|
}
|
|
1594
|
-
var
|
|
1595
|
-
function
|
|
1596
|
-
return
|
|
1594
|
+
var yt;
|
|
1595
|
+
function tr() {
|
|
1596
|
+
return yt || (yt = 1, Ie.exports = er()), Ie.exports;
|
|
1597
1597
|
}
|
|
1598
|
-
var S =
|
|
1599
|
-
const
|
|
1600
|
-
const { t: o } =
|
|
1598
|
+
var S = tr();
|
|
1599
|
+
const nr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPreviousStep: s, onUpdateResponse: i }) => {
|
|
1600
|
+
const { t: o } = Ke(), c = ((d) => {
|
|
1601
1601
|
let u = 0;
|
|
1602
1602
|
if (e.startTransition) {
|
|
1603
1603
|
if (d === u)
|
|
@@ -1639,7 +1639,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1639
1639
|
optOutButtonText: w
|
|
1640
1640
|
} = c.transition;
|
|
1641
1641
|
return /* @__PURE__ */ S.jsx(
|
|
1642
|
-
|
|
1642
|
+
Pa,
|
|
1643
1643
|
{
|
|
1644
1644
|
title: d,
|
|
1645
1645
|
description: u,
|
|
@@ -1655,7 +1655,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1655
1655
|
if (c.type === "end") {
|
|
1656
1656
|
const { title: d, description: u, image: f, customEndButton: m, endButtonText: p, customEndButtonLink: g, endButtonLink: h } = c.transition;
|
|
1657
1657
|
return /* @__PURE__ */ S.jsx(
|
|
1658
|
-
|
|
1658
|
+
Ca,
|
|
1659
1659
|
{
|
|
1660
1660
|
title: d,
|
|
1661
1661
|
description: u,
|
|
@@ -1673,7 +1673,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1673
1673
|
if (d.questionType === "choice") {
|
|
1674
1674
|
const { title: u, description: f, image: m, alternatives: p, maxSelections: g, required: h, verticalAlignment: w } = d, b = t.responses[d.id] || [], v = (g ? b.length <= g || g === 4 : !0) && (h ? b.length > 0 : !0);
|
|
1675
1675
|
return /* @__PURE__ */ S.jsx(
|
|
1676
|
-
|
|
1676
|
+
Na,
|
|
1677
1677
|
{
|
|
1678
1678
|
title: u,
|
|
1679
1679
|
description: f,
|
|
@@ -1688,7 +1688,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1688
1688
|
selectedAlternatives: b,
|
|
1689
1689
|
onAlternativeSelect: (k) => {
|
|
1690
1690
|
if (g > 1) {
|
|
1691
|
-
const A = b, F = A.includes(k) ? A.filter((
|
|
1691
|
+
const A = b, F = A.includes(k) ? A.filter((T) => T !== k) : g && A.length >= g && g != 4 ? A : [...A, k];
|
|
1692
1692
|
i(d.id, F);
|
|
1693
1693
|
} else
|
|
1694
1694
|
b.includes(k) ? i(d.id, []) : i(d.id, [k]);
|
|
@@ -1724,7 +1724,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1724
1724
|
}
|
|
1725
1725
|
}
|
|
1726
1726
|
return null;
|
|
1727
|
-
},
|
|
1727
|
+
}, rr = ({ form: n, onDismiss: e, onComplete: t, zIndex: r = 100 }) => {
|
|
1728
1728
|
const s = (n.startTransition ? 1 : 0) + n.questions.length + (n.endTransition ? 1 : 0) - 1, [i, o] = pe({
|
|
1729
1729
|
responses: {},
|
|
1730
1730
|
currentStep: 0,
|
|
@@ -1761,7 +1761,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1761
1761
|
className: "flex flex-col justify-center items-center fixed inset-0 bg-overlay-background-default-light dark:bg-overlay-background-default-dark",
|
|
1762
1762
|
style: { zIndex: r },
|
|
1763
1763
|
children: /* @__PURE__ */ S.jsx(
|
|
1764
|
-
|
|
1764
|
+
nr,
|
|
1765
1765
|
{
|
|
1766
1766
|
step: i.currentStep,
|
|
1767
1767
|
form: n,
|
|
@@ -1774,7 +1774,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1774
1774
|
)
|
|
1775
1775
|
}
|
|
1776
1776
|
);
|
|
1777
|
-
},
|
|
1777
|
+
}, ar = /* @__PURE__ */ new Map([
|
|
1778
1778
|
[
|
|
1779
1779
|
"bold",
|
|
1780
1780
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z" }))
|
|
@@ -1805,7 +1805,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1805
1805
|
"thin",
|
|
1806
1806
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z" }))
|
|
1807
1807
|
]
|
|
1808
|
-
]),
|
|
1808
|
+
]), sr = /* @__PURE__ */ new Map([
|
|
1809
1809
|
[
|
|
1810
1810
|
"bold",
|
|
1811
1811
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z" }))
|
|
@@ -1830,7 +1830,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1830
1830
|
"thin",
|
|
1831
1831
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z" }))
|
|
1832
1832
|
]
|
|
1833
|
-
]),
|
|
1833
|
+
]), ir = /* @__PURE__ */ new Map([
|
|
1834
1834
|
[
|
|
1835
1835
|
"bold",
|
|
1836
1836
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z" }))
|
|
@@ -1855,7 +1855,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1855
1855
|
"thin",
|
|
1856
1856
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z" }))
|
|
1857
1857
|
]
|
|
1858
|
-
]),
|
|
1858
|
+
]), or = /* @__PURE__ */ new Map([
|
|
1859
1859
|
[
|
|
1860
1860
|
"bold",
|
|
1861
1861
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z" }))
|
|
@@ -1880,7 +1880,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1880
1880
|
"thin",
|
|
1881
1881
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z" }))
|
|
1882
1882
|
]
|
|
1883
|
-
]),
|
|
1883
|
+
]), lr = /* @__PURE__ */ new Map([
|
|
1884
1884
|
[
|
|
1885
1885
|
"bold",
|
|
1886
1886
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z" }))
|
|
@@ -1911,7 +1911,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1911
1911
|
"thin",
|
|
1912
1912
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z" }))
|
|
1913
1913
|
]
|
|
1914
|
-
]),
|
|
1914
|
+
]), Mt = ye({
|
|
1915
1915
|
color: "currentColor",
|
|
1916
1916
|
size: "1em",
|
|
1917
1917
|
weight: "regular",
|
|
@@ -1933,7 +1933,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1933
1933
|
weight: f = "regular",
|
|
1934
1934
|
mirrored: m = !1,
|
|
1935
1935
|
...p
|
|
1936
|
-
} = x.useContext(
|
|
1936
|
+
} = x.useContext(Mt);
|
|
1937
1937
|
return /* @__PURE__ */ x.createElement(
|
|
1938
1938
|
"svg",
|
|
1939
1939
|
{
|
|
@@ -1954,17 +1954,17 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1954
1954
|
}
|
|
1955
1955
|
);
|
|
1956
1956
|
se.displayName = "IconBase";
|
|
1957
|
-
const Mt = x.forwardRef((n, e) => /* @__PURE__ */ x.createElement(se, { ref: e, ...n, weights: rr }));
|
|
1958
|
-
Mt.displayName = "ArrowSquareOutIcon";
|
|
1959
1957
|
const Bt = x.forwardRef((n, e) => /* @__PURE__ */ x.createElement(se, { ref: e, ...n, weights: ar }));
|
|
1960
|
-
Bt.displayName = "
|
|
1958
|
+
Bt.displayName = "ArrowSquareOutIcon";
|
|
1961
1959
|
const zt = x.forwardRef((n, e) => /* @__PURE__ */ x.createElement(se, { ref: e, ...n, weights: sr }));
|
|
1962
|
-
zt.displayName = "
|
|
1960
|
+
zt.displayName = "CaretLeftIcon";
|
|
1963
1961
|
const Ut = x.forwardRef((n, e) => /* @__PURE__ */ x.createElement(se, { ref: e, ...n, weights: ir }));
|
|
1964
|
-
Ut.displayName = "
|
|
1965
|
-
const
|
|
1962
|
+
Ut.displayName = "CaretRightIcon";
|
|
1963
|
+
const Vt = x.forwardRef((n, e) => /* @__PURE__ */ x.createElement(se, { ref: e, ...n, weights: or }));
|
|
1964
|
+
Vt.displayName = "CircleNotchIcon";
|
|
1965
|
+
const Le = x.forwardRef((n, e) => /* @__PURE__ */ x.createElement(se, { ref: e, ...n, weights: lr }));
|
|
1966
1966
|
Le.displayName = "XIcon";
|
|
1967
|
-
var
|
|
1967
|
+
var bt = { exports: {} }, le = {};
|
|
1968
1968
|
/**
|
|
1969
1969
|
* @license React
|
|
1970
1970
|
* react-jsx-runtime.production.min.js
|
|
@@ -1974,10 +1974,10 @@ var yt = { exports: {} }, le = {};
|
|
|
1974
1974
|
* This source code is licensed under the MIT license found in the
|
|
1975
1975
|
* LICENSE file in the root directory of this source tree.
|
|
1976
1976
|
*/
|
|
1977
|
-
var
|
|
1978
|
-
function
|
|
1979
|
-
if (
|
|
1980
|
-
|
|
1977
|
+
var xt;
|
|
1978
|
+
function cr() {
|
|
1979
|
+
if (xt) return le;
|
|
1980
|
+
xt = 1;
|
|
1981
1981
|
var n = fe, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
1982
1982
|
function i(o, l, c) {
|
|
1983
1983
|
var d, u = {}, f = null, m = null;
|
|
@@ -1988,25 +1988,25 @@ function lr() {
|
|
|
1988
1988
|
}
|
|
1989
1989
|
return le.Fragment = t, le.jsx = i, le.jsxs = i, le;
|
|
1990
1990
|
}
|
|
1991
|
-
var
|
|
1992
|
-
function
|
|
1993
|
-
return
|
|
1991
|
+
var wt;
|
|
1992
|
+
function ur() {
|
|
1993
|
+
return wt || (wt = 1, bt.exports = /* @__PURE__ */ cr()), bt.exports;
|
|
1994
1994
|
}
|
|
1995
|
-
var $ = /* @__PURE__ */
|
|
1996
|
-
function
|
|
1995
|
+
var $ = /* @__PURE__ */ ur();
|
|
1996
|
+
function Ht(n) {
|
|
1997
1997
|
var e, t, r = "";
|
|
1998
1998
|
if (typeof n == "string" || typeof n == "number") r += n;
|
|
1999
1999
|
else if (typeof n == "object") if (Array.isArray(n)) {
|
|
2000
2000
|
var a = n.length;
|
|
2001
|
-
for (e = 0; e < a; e++) n[e] && (t =
|
|
2001
|
+
for (e = 0; e < a; e++) n[e] && (t = Ht(n[e])) && (r && (r += " "), r += t);
|
|
2002
2002
|
} else for (t in n) n[t] && (r && (r += " "), r += t);
|
|
2003
2003
|
return r;
|
|
2004
2004
|
}
|
|
2005
|
-
function
|
|
2006
|
-
for (var n, e, t = 0, r = "", a = arguments.length; t < a; t++) (n = arguments[t]) && (e =
|
|
2005
|
+
function qe() {
|
|
2006
|
+
for (var n, e, t = 0, r = "", a = arguments.length; t < a; t++) (n = arguments[t]) && (e = Ht(n)) && (r && (r += " "), r += e);
|
|
2007
2007
|
return r;
|
|
2008
2008
|
}
|
|
2009
|
-
const _ =
|
|
2009
|
+
const _ = qe, J = ({
|
|
2010
2010
|
variant: n = "primary",
|
|
2011
2011
|
size: e = "medium",
|
|
2012
2012
|
text: t,
|
|
@@ -2023,29 +2023,29 @@ const _ = Ke, J = ({
|
|
|
2023
2023
|
className: _(
|
|
2024
2024
|
"flex gap-2 justify-center items-center disabled:pointer-events-none",
|
|
2025
2025
|
l ? "rounded-full" : "rounded-lg",
|
|
2026
|
-
|
|
2027
|
-
|
|
2026
|
+
dr(n),
|
|
2027
|
+
pr(e),
|
|
2028
2028
|
s
|
|
2029
2029
|
),
|
|
2030
2030
|
disabled: i,
|
|
2031
2031
|
...c,
|
|
2032
2032
|
children: /* @__PURE__ */ $.jsx(
|
|
2033
|
-
|
|
2033
|
+
Mt.Provider,
|
|
2034
2034
|
{
|
|
2035
2035
|
value: {
|
|
2036
2036
|
size: e === "xsmall" ? 12 : 16,
|
|
2037
2037
|
weight: "regular",
|
|
2038
2038
|
className: _($e(n, i))
|
|
2039
2039
|
},
|
|
2040
|
-
children: o ? /* @__PURE__ */ $.jsx(
|
|
2040
|
+
children: o ? /* @__PURE__ */ $.jsx(Vt, { className: _($e(n, i), "animate-spin") }) : /* @__PURE__ */ $.jsxs($.Fragment, { children: [
|
|
2041
2041
|
r && r,
|
|
2042
|
-
t && /* @__PURE__ */ $.jsx("span", { className: _($e(n, i),
|
|
2042
|
+
t && /* @__PURE__ */ $.jsx("span", { className: _($e(n, i), gr(e)), children: t }),
|
|
2043
2043
|
a && a
|
|
2044
2044
|
] })
|
|
2045
2045
|
}
|
|
2046
2046
|
)
|
|
2047
2047
|
}
|
|
2048
|
-
),
|
|
2048
|
+
), dr = (n) => {
|
|
2049
2049
|
switch (n) {
|
|
2050
2050
|
case "primary":
|
|
2051
2051
|
return "border border-grey-0/0 bg-primary-action-button-light dark:bg-primary-action-button-dark hover:bg-primary-action-button-hover-light dark:hover:bg-primary-action-button-hover-dark disabled:bg-primary-action-disabled-light dark:disabled:bg-primary-action-disabled-dark";
|
|
@@ -2072,7 +2072,7 @@ const _ = Ke, J = ({
|
|
|
2072
2072
|
case "subtle":
|
|
2073
2073
|
return "text-label-primary-light dark:text-label-primary-dark";
|
|
2074
2074
|
}
|
|
2075
|
-
},
|
|
2075
|
+
}, pr = (n) => {
|
|
2076
2076
|
switch (n) {
|
|
2077
2077
|
case "xsmall":
|
|
2078
2078
|
return "p-1";
|
|
@@ -2081,7 +2081,7 @@ const _ = Ke, J = ({
|
|
|
2081
2081
|
case "medium":
|
|
2082
2082
|
return "p-3";
|
|
2083
2083
|
}
|
|
2084
|
-
},
|
|
2084
|
+
}, gr = (n) => {
|
|
2085
2085
|
switch (n) {
|
|
2086
2086
|
case "xsmall":
|
|
2087
2087
|
return "text-[10px] leading-[14px]";
|
|
@@ -2090,40 +2090,89 @@ const _ = Ke, J = ({
|
|
|
2090
2090
|
case "medium":
|
|
2091
2091
|
return "text-[15px] leading-[16px] -tracking-0,1";
|
|
2092
2092
|
}
|
|
2093
|
+
}, Kt = {
|
|
2094
|
+
Di1: "text-[72px] font-bold leading-[90px] -tracking-2,5",
|
|
2095
|
+
Di2: "text-[60px] font-bold leading-[72px] -tracking-2,0",
|
|
2096
|
+
Di3: "text-[48px] font-bold leading-[60px] -tracking-1,5",
|
|
2097
|
+
T1: "text-[40px] font-bold leading-[48px] -tracking-1,5",
|
|
2098
|
+
T2: "text-[32px] font-bold leading-[40px] -tracking-1",
|
|
2099
|
+
T3: "text-[24px] font-bold leading-[32px] -tracking-0,5",
|
|
2100
|
+
H1: "text-[24px] font-bold leading-[32px] -tracking-0,5",
|
|
2101
|
+
H2: "text-[20px] font-bold leading-[24px]",
|
|
2102
|
+
H3: "text-[15px] font-bold leading-[20px]",
|
|
2103
|
+
H4: "text-[13px] font-bold leading-[16px]",
|
|
2104
|
+
B1B: "text-[15px] font-bold leading-[24px] -tracking-0,1",
|
|
2105
|
+
B1: "text-[15px] leading-[24px] -tracking-0,1",
|
|
2106
|
+
B1Button: "text-[15px] leading-[16px] -tracking-0,1",
|
|
2107
|
+
B2: "text-[13px] leading-[20px]",
|
|
2108
|
+
B2Button: "text-[13px] leading-[16px]",
|
|
2109
|
+
D1B: "text-[12px] font-bold leading-[16px]",
|
|
2110
|
+
D1: "text-[12px] leading-[16px]",
|
|
2111
|
+
M: "text-[10px] leading-[16px]"
|
|
2112
|
+
}, X = ({ children: n, className: e, variant: t = "B1", significance: r = "primary", as: a }) => {
|
|
2113
|
+
const s = a ?? fr[t], i = Kt[t];
|
|
2114
|
+
return /* @__PURE__ */ $.jsx(s, { className: _("font-sans", hr[r], e, i), children: n });
|
|
2115
|
+
}, fr = {
|
|
2116
|
+
Di1: "h1",
|
|
2117
|
+
Di2: "h2",
|
|
2118
|
+
Di3: "h3",
|
|
2119
|
+
T1: "h1",
|
|
2120
|
+
T2: "h2",
|
|
2121
|
+
T3: "h3",
|
|
2122
|
+
H1: "h1",
|
|
2123
|
+
H2: "h2",
|
|
2124
|
+
H3: "h3",
|
|
2125
|
+
H4: "h4",
|
|
2126
|
+
B1B: "p",
|
|
2127
|
+
B1: "p",
|
|
2128
|
+
B1Button: "span",
|
|
2129
|
+
B2: "p",
|
|
2130
|
+
B2Button: "span",
|
|
2131
|
+
D1B: "p",
|
|
2132
|
+
D1: "p",
|
|
2133
|
+
M: "p"
|
|
2134
|
+
}, hr = {
|
|
2135
|
+
primary: "text-label-primary-light dark:text-label-primary-dark",
|
|
2136
|
+
secondary: "text-label-secondary-light dark:text-label-secondary-dark",
|
|
2137
|
+
tertiary: "text-label-tertiary-light dark:text-label-tertiary-dark",
|
|
2138
|
+
quaternary: "text-label-quaternary-light dark:text-label-quaternary-dark",
|
|
2139
|
+
placeholder: "text-label-placeholder-light dark:text-label-placeholder-dark",
|
|
2140
|
+
"nonadaptable-text": "text-nonadaptable-text-light dark:text-nonadaptable-text-dark",
|
|
2141
|
+
disabled: "text-primary-action-disabled-light dark:text-primary-action-disabled-dark"
|
|
2093
2142
|
};
|
|
2094
|
-
var
|
|
2143
|
+
var mr = Object.create, Fe = Object.defineProperty, yr = Object.defineProperties, br = Object.getOwnPropertyDescriptor, xr = Object.getOwnPropertyDescriptors, qt = Object.getOwnPropertyNames, Se = Object.getOwnPropertySymbols, wr = Object.getPrototypeOf, Ze = Object.prototype.hasOwnProperty, Zt = Object.prototype.propertyIsEnumerable, vt = (n, e, t) => e in n ? Fe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, G = (n, e) => {
|
|
2095
2144
|
for (var t in e || (e = {}))
|
|
2096
|
-
|
|
2145
|
+
Ze.call(e, t) && vt(n, t, e[t]);
|
|
2097
2146
|
if (Se)
|
|
2098
2147
|
for (var t of Se(e))
|
|
2099
|
-
|
|
2148
|
+
Zt.call(e, t) && vt(n, t, e[t]);
|
|
2100
2149
|
return n;
|
|
2101
|
-
}, Ae = (n, e) =>
|
|
2150
|
+
}, Ae = (n, e) => yr(n, xr(e)), Wt = (n, e) => {
|
|
2102
2151
|
var t = {};
|
|
2103
2152
|
for (var r in n)
|
|
2104
|
-
|
|
2153
|
+
Ze.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
2105
2154
|
if (n != null && Se)
|
|
2106
2155
|
for (var r of Se(n))
|
|
2107
|
-
e.indexOf(r) < 0 &&
|
|
2156
|
+
e.indexOf(r) < 0 && Zt.call(n, r) && (t[r] = n[r]);
|
|
2108
2157
|
return t;
|
|
2109
|
-
},
|
|
2110
|
-
return e || (0, n[
|
|
2111
|
-
},
|
|
2158
|
+
}, vr = (n, e) => function() {
|
|
2159
|
+
return e || (0, n[qt(n)[0]])((e = { exports: {} }).exports, e), e.exports;
|
|
2160
|
+
}, kr = (n, e) => {
|
|
2112
2161
|
for (var t in e)
|
|
2113
2162
|
Fe(n, t, { get: e[t], enumerable: !0 });
|
|
2114
|
-
},
|
|
2163
|
+
}, Sr = (n, e, t, r) => {
|
|
2115
2164
|
if (e && typeof e == "object" || typeof e == "function")
|
|
2116
|
-
for (let a of
|
|
2117
|
-
!
|
|
2165
|
+
for (let a of qt(e))
|
|
2166
|
+
!Ze.call(n, a) && a !== t && Fe(n, a, { get: () => e[a], enumerable: !(r = br(e, a)) || r.enumerable });
|
|
2118
2167
|
return n;
|
|
2119
|
-
},
|
|
2168
|
+
}, Er = (n, e, t) => (t = n != null ? mr(wr(n)) : {}, Sr(
|
|
2120
2169
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
2121
2170
|
// file that has been converted to a CommonJS file using a Babel-
|
|
2122
2171
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
2123
2172
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
2124
2173
|
!n || !n.__esModule ? Fe(t, "default", { value: n, enumerable: !0 }) : t,
|
|
2125
2174
|
n
|
|
2126
|
-
)),
|
|
2175
|
+
)), Lr = vr({
|
|
2127
2176
|
"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(n, e) {
|
|
2128
2177
|
var t = (function() {
|
|
2129
2178
|
var r = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, a = 0, s = {}, i = {
|
|
@@ -2396,8 +2445,8 @@ var gr = Object.create, Fe = Object.defineProperty, fr = Object.defineProperties
|
|
|
2396
2445
|
h.hasOwnProperty(k) || (v[k] = b[k]);
|
|
2397
2446
|
}
|
|
2398
2447
|
var A = w[p];
|
|
2399
|
-
return w[p] = v, i.languages.DFS(i.languages, function(F,
|
|
2400
|
-
|
|
2448
|
+
return w[p] = v, i.languages.DFS(i.languages, function(F, T) {
|
|
2449
|
+
T === A && F != p && (this[F] = v);
|
|
2401
2450
|
}), v;
|
|
2402
2451
|
},
|
|
2403
2452
|
// Traverse a language definition with Depth First Search
|
|
@@ -2561,8 +2610,8 @@ var gr = Object.create, Fe = Object.defineProperty, fr = Object.defineProperties
|
|
|
2561
2610
|
for (var A = 0; A < E.length; ++A) {
|
|
2562
2611
|
if (v && v.cause == k + "," + A)
|
|
2563
2612
|
return;
|
|
2564
|
-
var F = E[A],
|
|
2565
|
-
if (
|
|
2613
|
+
var F = E[A], T = F.inside, N = !!F.lookbehind, R = !!F.greedy, H = F.alias;
|
|
2614
|
+
if (R && !F.pattern.global) {
|
|
2566
2615
|
var U = F.pattern.toString().match(/[imsuy]*$/)[0];
|
|
2567
2616
|
F.pattern = RegExp(F.pattern.source, U + "g");
|
|
2568
2617
|
}
|
|
@@ -2572,7 +2621,7 @@ var gr = Object.create, Fe = Object.defineProperty, fr = Object.defineProperties
|
|
|
2572
2621
|
return;
|
|
2573
2622
|
if (!(P instanceof o)) {
|
|
2574
2623
|
var D = 1, j;
|
|
2575
|
-
if (
|
|
2624
|
+
if (R) {
|
|
2576
2625
|
if (j = l(M, B, p, N), !j || j.index >= p.length)
|
|
2577
2626
|
break;
|
|
2578
2627
|
var V = j.index, ee = j.index + j[0].length, K = B;
|
|
@@ -2585,17 +2634,17 @@ var gr = Object.create, Fe = Object.defineProperty, fr = Object.defineProperties
|
|
|
2585
2634
|
D--, P = p.slice(B, K), j.index -= B;
|
|
2586
2635
|
} else if (j = l(M, 0, P, N), !j)
|
|
2587
2636
|
continue;
|
|
2588
|
-
var V = j.index, Z = j[0], te = P.slice(0, V),
|
|
2637
|
+
var V = j.index, Z = j[0], te = P.slice(0, V), Je = P.slice(V + Z.length), Ne = B + P.length;
|
|
2589
2638
|
v && Ne > v.reach && (v.reach = Ne);
|
|
2590
2639
|
var be = O.prev;
|
|
2591
2640
|
te && (be = u(g, be, te), B += te.length), f(g, be, D);
|
|
2592
|
-
var
|
|
2593
|
-
if (O = u(g, be,
|
|
2594
|
-
var
|
|
2641
|
+
var un = new o(k, T ? i.tokenize(Z, T) : Z, H, Z);
|
|
2642
|
+
if (O = u(g, be, un), Je && u(g, O, Je), D > 1) {
|
|
2643
|
+
var Te = {
|
|
2595
2644
|
cause: k + "," + A,
|
|
2596
2645
|
reach: Ne
|
|
2597
2646
|
};
|
|
2598
|
-
c(p, g, h, O.prev, B,
|
|
2647
|
+
c(p, g, h, O.prev, B, Te), v && Te.reach > v.reach && (v.reach = Te.reach);
|
|
2599
2648
|
}
|
|
2600
2649
|
}
|
|
2601
2650
|
}
|
|
@@ -2624,7 +2673,7 @@ var gr = Object.create, Fe = Object.defineProperty, fr = Object.defineProperties
|
|
|
2624
2673
|
})();
|
|
2625
2674
|
e.exports = t, t.default = t;
|
|
2626
2675
|
}
|
|
2627
|
-
}), y =
|
|
2676
|
+
}), y = Er(Lr());
|
|
2628
2677
|
y.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, doctype: { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^<!|>$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, y.languages.markup.tag.inside["attr-value"].inside.entity = y.languages.markup.entity, y.languages.markup.doctype.inside["internal-subset"].inside = y.languages.markup, y.hooks.add("wrap", function(n) {
|
|
2629
2678
|
n.type === "entity" && (n.attributes.title = n.content.replace(/&/, "&"));
|
|
2630
2679
|
}), Object.defineProperty(y.languages.markup.tag, "addInlined", { value: function(n, r) {
|
|
@@ -2804,8 +2853,8 @@ y.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
2804
2853
|
for (var k = 0; k < v.length; k++) {
|
|
2805
2854
|
if (p >= w.length)
|
|
2806
2855
|
return;
|
|
2807
|
-
var E, A, F,
|
|
2808
|
-
typeof U == "string" || typeof U.content == "string" ? (E = w[p], (H = (
|
|
2856
|
+
var E, A, F, T, N, R, H, U = v[k];
|
|
2857
|
+
typeof U == "string" || typeof U.content == "string" ? (E = w[p], (H = (R = typeof U == "string" ? U : U.content).indexOf(E)) !== -1 && (++p, A = R.substring(0, H), N = g[E], F = void 0, (T = {})["interpolation-punctuation"] = a, (T = n.tokenize(N, T)).length === 3 && ((F = [1, 1]).push.apply(F, o(T[1], n.languages.javascript, "javascript")), T.splice.apply(T, F)), F = new n.Token("interpolation", T, r.alias, N), T = R.substring(H + E.length), N = [], A && N.push(A), N.push(F), T && (b(R = [T]), N.push.apply(N, R)), typeof U == "string" ? (v.splice.apply(v, [k, 1].concat(N)), k += N.length - 1) : U.content = N)) : (H = U.content, Array.isArray(H) ? b(H) : b([H]));
|
|
2809
2858
|
}
|
|
2810
2859
|
})(h), new n.Token(m, h, "language-" + m, u);
|
|
2811
2860
|
}
|
|
@@ -2895,30 +2944,30 @@ y.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
2895
2944
|
return t;
|
|
2896
2945
|
}) + ")"), lookbehind: !0, greedy: !0, inside: { string: /^[<"][\s\S]+/, operator: /:/, punctuation: /\./ } }, "raw-string": { pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, alias: "string", greedy: !0 } }), n.languages.insertBefore("cpp", "keyword", { "generic-function": { pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i, inside: { function: /^\w+/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: n.languages.cpp } } } }), n.languages.insertBefore("cpp", "operator", { "double-colon": { pattern: /::/, alias: "punctuation" } }), n.languages.insertBefore("cpp", "class-name", { "base-clause": { pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/, lookbehind: !0, greedy: !0, inside: n.languages.extend("cpp", {}) } }), n.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, n.languages.cpp["base-clause"]);
|
|
2897
2946
|
})(y), y.languages.python = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0, greedy: !0 }, "string-interpolation": { pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, lookbehind: !0, inside: { "format-spec": { pattern: /(:)[^:(){}]+(?=\}$)/, lookbehind: !0 }, "conversion-option": { pattern: //, alias: "punctuation" }, rest: null } }, string: /[\s\S]+/ } }, "triple-quoted-string": { pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: !0, alias: "string" }, string: { pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: !0 }, function: { pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, lookbehind: !0 }, "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: !0 }, decorator: { pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: !0, alias: ["annotation", "punctuation"], inside: { punctuation: /\./ } }, keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, boolean: /\b(?:False|None|True)\b/, number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\];(),.:]/ }, y.languages.python["string-interpolation"].inside.interpolation.inside.rest = y.languages.python, y.languages.py = y.languages.python, y.languages.json = { property: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, lookbehind: !0, greedy: !0 }, string: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, lookbehind: !0, greedy: !0 }, comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, punctuation: /[{}[\],]/, operator: /:/, boolean: /\b(?:false|true)\b/, null: { pattern: /\bnull\b/, alias: "keyword" } }, y.languages.webmanifest = y.languages.json;
|
|
2898
|
-
var
|
|
2899
|
-
|
|
2900
|
-
dracula: () =>
|
|
2901
|
-
duotoneDark: () =>
|
|
2902
|
-
duotoneLight: () =>
|
|
2903
|
-
github: () =>
|
|
2904
|
-
gruvboxMaterialDark: () =>
|
|
2905
|
-
gruvboxMaterialLight: () =>
|
|
2906
|
-
jettwaveDark: () =>
|
|
2907
|
-
jettwaveLight: () =>
|
|
2908
|
-
nightOwl: () =>
|
|
2909
|
-
nightOwlLight: () =>
|
|
2910
|
-
oceanicNext: () =>
|
|
2911
|
-
okaidia: () =>
|
|
2912
|
-
oneDark: () =>
|
|
2913
|
-
oneLight: () =>
|
|
2914
|
-
palenight: () =>
|
|
2915
|
-
shadesOfPurple: () =>
|
|
2916
|
-
synthwave84: () =>
|
|
2917
|
-
ultramin: () =>
|
|
2918
|
-
vsDark: () =>
|
|
2919
|
-
vsLight: () =>
|
|
2947
|
+
var Fr = {};
|
|
2948
|
+
kr(Fr, {
|
|
2949
|
+
dracula: () => Or,
|
|
2950
|
+
duotoneDark: () => Tr,
|
|
2951
|
+
duotoneLight: () => Cr,
|
|
2952
|
+
github: () => jr,
|
|
2953
|
+
gruvboxMaterialDark: () => ca,
|
|
2954
|
+
gruvboxMaterialLight: () => da,
|
|
2955
|
+
jettwaveDark: () => ta,
|
|
2956
|
+
jettwaveLight: () => ra,
|
|
2957
|
+
nightOwl: () => $r,
|
|
2958
|
+
nightOwlLight: () => _r,
|
|
2959
|
+
oceanicNext: () => Br,
|
|
2960
|
+
okaidia: () => Ur,
|
|
2961
|
+
oneDark: () => sa,
|
|
2962
|
+
oneLight: () => oa,
|
|
2963
|
+
palenight: () => Hr,
|
|
2964
|
+
shadesOfPurple: () => qr,
|
|
2965
|
+
synthwave84: () => Wr,
|
|
2966
|
+
ultramin: () => Yr,
|
|
2967
|
+
vsDark: () => Gt,
|
|
2968
|
+
vsLight: () => Qr
|
|
2920
2969
|
});
|
|
2921
|
-
var
|
|
2970
|
+
var Ar = {
|
|
2922
2971
|
plain: {
|
|
2923
2972
|
color: "#F8F8F2",
|
|
2924
2973
|
backgroundColor: "#282A36"
|
|
@@ -2980,7 +3029,7 @@ var Er = {
|
|
|
2980
3029
|
}
|
|
2981
3030
|
}
|
|
2982
3031
|
]
|
|
2983
|
-
},
|
|
3032
|
+
}, Or = Ar, Nr = {
|
|
2984
3033
|
plain: {
|
|
2985
3034
|
backgroundColor: "#2a2734",
|
|
2986
3035
|
color: "#9a86fd"
|
|
@@ -3074,7 +3123,7 @@ var Er = {
|
|
|
3074
3123
|
}
|
|
3075
3124
|
}
|
|
3076
3125
|
]
|
|
3077
|
-
},
|
|
3126
|
+
}, Tr = Nr, Rr = {
|
|
3078
3127
|
plain: {
|
|
3079
3128
|
backgroundColor: "#faf8f5",
|
|
3080
3129
|
color: "#728fcb"
|
|
@@ -3172,7 +3221,7 @@ var Er = {
|
|
|
3172
3221
|
}
|
|
3173
3222
|
}
|
|
3174
3223
|
]
|
|
3175
|
-
},
|
|
3224
|
+
}, Cr = Rr, Pr = {
|
|
3176
3225
|
plain: {
|
|
3177
3226
|
color: "#393A34",
|
|
3178
3227
|
backgroundColor: "#f6f8fa"
|
|
@@ -3245,7 +3294,7 @@ var Er = {
|
|
|
3245
3294
|
}
|
|
3246
3295
|
}
|
|
3247
3296
|
]
|
|
3248
|
-
},
|
|
3297
|
+
}, jr = Pr, Ir = {
|
|
3249
3298
|
plain: {
|
|
3250
3299
|
color: "#d6deeb",
|
|
3251
3300
|
backgroundColor: "#011627"
|
|
@@ -3349,7 +3398,7 @@ var Er = {
|
|
|
3349
3398
|
}
|
|
3350
3399
|
}
|
|
3351
3400
|
]
|
|
3352
|
-
},
|
|
3401
|
+
}, $r = Ir, Dr = {
|
|
3353
3402
|
plain: {
|
|
3354
3403
|
color: "#403f53",
|
|
3355
3404
|
backgroundColor: "#FBFBFB"
|
|
@@ -3441,7 +3490,7 @@ var Er = {
|
|
|
3441
3490
|
}
|
|
3442
3491
|
}
|
|
3443
3492
|
]
|
|
3444
|
-
},
|
|
3493
|
+
}, _r = Dr, z = {
|
|
3445
3494
|
char: "#D8DEE9",
|
|
3446
3495
|
comment: "#999999",
|
|
3447
3496
|
keyword: "#c5a5c5",
|
|
@@ -3452,7 +3501,7 @@ var Er = {
|
|
|
3452
3501
|
tag: "#fc929e",
|
|
3453
3502
|
function: "#79b6f2",
|
|
3454
3503
|
className: "#FAC863"
|
|
3455
|
-
},
|
|
3504
|
+
}, Mr = {
|
|
3456
3505
|
plain: {
|
|
3457
3506
|
backgroundColor: "#282c34",
|
|
3458
3507
|
color: "#ffffff"
|
|
@@ -3575,7 +3624,7 @@ var Er = {
|
|
|
3575
3624
|
}
|
|
3576
3625
|
}
|
|
3577
3626
|
]
|
|
3578
|
-
},
|
|
3627
|
+
}, Br = Mr, zr = {
|
|
3579
3628
|
plain: {
|
|
3580
3629
|
color: "#f8f8f2",
|
|
3581
3630
|
backgroundColor: "#272822"
|
|
@@ -3690,7 +3739,7 @@ var Er = {
|
|
|
3690
3739
|
}
|
|
3691
3740
|
}
|
|
3692
3741
|
]
|
|
3693
|
-
},
|
|
3742
|
+
}, Ur = zr, Vr = {
|
|
3694
3743
|
plain: {
|
|
3695
3744
|
color: "#bfc7d5",
|
|
3696
3745
|
backgroundColor: "#292d3e"
|
|
@@ -3783,7 +3832,7 @@ var Er = {
|
|
|
3783
3832
|
}
|
|
3784
3833
|
}
|
|
3785
3834
|
]
|
|
3786
|
-
},
|
|
3835
|
+
}, Hr = Vr, Kr = {
|
|
3787
3836
|
plain: {
|
|
3788
3837
|
color: "#9EFEFF",
|
|
3789
3838
|
backgroundColor: "#2D2A55"
|
|
@@ -3871,7 +3920,7 @@ var Er = {
|
|
|
3871
3920
|
}
|
|
3872
3921
|
}
|
|
3873
3922
|
]
|
|
3874
|
-
},
|
|
3923
|
+
}, qr = Kr, Zr = {
|
|
3875
3924
|
plain: {
|
|
3876
3925
|
backgroundColor: "linear-gradient(to bottom, #2a2139 75%, #34294f)",
|
|
3877
3926
|
backgroundImage: "#34294f",
|
|
@@ -3996,7 +4045,7 @@ var Er = {
|
|
|
3996
4045
|
}
|
|
3997
4046
|
}
|
|
3998
4047
|
]
|
|
3999
|
-
},
|
|
4048
|
+
}, Wr = Zr, Gr = {
|
|
4000
4049
|
plain: {
|
|
4001
4050
|
color: "#282a2e",
|
|
4002
4051
|
backgroundColor: "#ffffff"
|
|
@@ -4021,7 +4070,7 @@ var Er = {
|
|
|
4021
4070
|
}
|
|
4022
4071
|
}
|
|
4023
4072
|
]
|
|
4024
|
-
},
|
|
4073
|
+
}, Yr = Gr, Jr = {
|
|
4025
4074
|
plain: {
|
|
4026
4075
|
color: "#9CDCFE",
|
|
4027
4076
|
backgroundColor: "#1E1E1E"
|
|
@@ -4123,7 +4172,7 @@ var Er = {
|
|
|
4123
4172
|
}
|
|
4124
4173
|
}
|
|
4125
4174
|
]
|
|
4126
|
-
},
|
|
4175
|
+
}, Gt = Jr, Xr = {
|
|
4127
4176
|
plain: {
|
|
4128
4177
|
color: "#000000",
|
|
4129
4178
|
backgroundColor: "#ffffff"
|
|
@@ -4196,7 +4245,7 @@ var Er = {
|
|
|
4196
4245
|
}
|
|
4197
4246
|
}
|
|
4198
4247
|
]
|
|
4199
|
-
},
|
|
4248
|
+
}, Qr = Xr, ea = {
|
|
4200
4249
|
plain: {
|
|
4201
4250
|
color: "#f8fafc",
|
|
4202
4251
|
backgroundColor: "#011627"
|
|
@@ -4295,7 +4344,7 @@ var Er = {
|
|
|
4295
4344
|
}
|
|
4296
4345
|
}
|
|
4297
4346
|
]
|
|
4298
|
-
},
|
|
4347
|
+
}, ta = ea, na = {
|
|
4299
4348
|
plain: {
|
|
4300
4349
|
color: "#0f172a",
|
|
4301
4350
|
backgroundColor: "#f1f5f9"
|
|
@@ -4394,7 +4443,7 @@ var Er = {
|
|
|
4394
4443
|
}
|
|
4395
4444
|
}
|
|
4396
4445
|
]
|
|
4397
|
-
},
|
|
4446
|
+
}, ra = na, aa = {
|
|
4398
4447
|
plain: {
|
|
4399
4448
|
backgroundColor: "hsl(220, 13%, 18%)",
|
|
4400
4449
|
color: "hsl(220, 14%, 71%)",
|
|
@@ -4492,7 +4541,7 @@ var Er = {
|
|
|
4492
4541
|
}
|
|
4493
4542
|
}
|
|
4494
4543
|
]
|
|
4495
|
-
},
|
|
4544
|
+
}, sa = aa, ia = {
|
|
4496
4545
|
plain: {
|
|
4497
4546
|
backgroundColor: "hsl(230, 1%, 98%)",
|
|
4498
4547
|
color: "hsl(230, 8%, 24%)"
|
|
@@ -4593,7 +4642,7 @@ var Er = {
|
|
|
4593
4642
|
}
|
|
4594
4643
|
}
|
|
4595
4644
|
]
|
|
4596
|
-
},
|
|
4645
|
+
}, oa = ia, la = {
|
|
4597
4646
|
plain: {
|
|
4598
4647
|
color: "#ebdbb2",
|
|
4599
4648
|
backgroundColor: "#292828"
|
|
@@ -4666,7 +4715,7 @@ var Er = {
|
|
|
4666
4715
|
}
|
|
4667
4716
|
}
|
|
4668
4717
|
]
|
|
4669
|
-
},
|
|
4718
|
+
}, ca = la, ua = {
|
|
4670
4719
|
plain: {
|
|
4671
4720
|
color: "#654735",
|
|
4672
4721
|
backgroundColor: "#f9f5d7"
|
|
@@ -4738,16 +4787,16 @@ var Er = {
|
|
|
4738
4787
|
}
|
|
4739
4788
|
}
|
|
4740
4789
|
]
|
|
4741
|
-
},
|
|
4790
|
+
}, da = ua, pa = (n) => q(
|
|
4742
4791
|
(e) => {
|
|
4743
|
-
var t = e, { className: r, style: a } = t, s =
|
|
4792
|
+
var t = e, { className: r, style: a } = t, s = Wt(t, ["className", "style", "line"]);
|
|
4744
4793
|
const i = Ae(G({}, s), {
|
|
4745
|
-
className:
|
|
4794
|
+
className: qe("token-line", r)
|
|
4746
4795
|
});
|
|
4747
4796
|
return typeof n == "object" && "plain" in n && (i.style = n.plain), typeof a == "object" && (i.style = G(G({}, i.style || {}), a)), i;
|
|
4748
4797
|
},
|
|
4749
4798
|
[n]
|
|
4750
|
-
),
|
|
4799
|
+
), ga = (n) => {
|
|
4751
4800
|
const e = q(
|
|
4752
4801
|
({ types: t, empty: r }) => {
|
|
4753
4802
|
if (n != null) {
|
|
@@ -4767,9 +4816,9 @@ var Er = {
|
|
|
4767
4816
|
);
|
|
4768
4817
|
return q(
|
|
4769
4818
|
(t) => {
|
|
4770
|
-
var r = t, { token: a, className: s, style: i } = r, o =
|
|
4819
|
+
var r = t, { token: a, className: s, style: i } = r, o = Wt(r, ["token", "className", "style"]);
|
|
4771
4820
|
const l = Ae(G({}, o), {
|
|
4772
|
-
className:
|
|
4821
|
+
className: qe("token", ...a.types, s),
|
|
4773
4822
|
children: a.content,
|
|
4774
4823
|
style: e(a)
|
|
4775
4824
|
});
|
|
@@ -4777,7 +4826,7 @@ var Er = {
|
|
|
4777
4826
|
},
|
|
4778
4827
|
[e]
|
|
4779
4828
|
);
|
|
4780
|
-
},
|
|
4829
|
+
}, fa = /\r\n|\r|\n/, kt = (n) => {
|
|
4781
4830
|
n.length === 0 ? n.push({
|
|
4782
4831
|
types: ["plain"],
|
|
4783
4832
|
content: `
|
|
@@ -4785,10 +4834,10 @@ var Er = {
|
|
|
4785
4834
|
empty: !0
|
|
4786
4835
|
}) : n.length === 1 && n[0].content === "" && (n[0].content = `
|
|
4787
4836
|
`, n[0].empty = !0);
|
|
4788
|
-
},
|
|
4837
|
+
}, St = (n, e) => {
|
|
4789
4838
|
const t = n.length;
|
|
4790
4839
|
return t > 0 && n[t - 1] === e ? n : n.concat(e);
|
|
4791
|
-
},
|
|
4840
|
+
}, ha = (n) => {
|
|
4792
4841
|
const e = [[]], t = [n], r = [0], a = [n.length];
|
|
4793
4842
|
let s = 0, i = 0, o = [];
|
|
4794
4843
|
const l = [o];
|
|
@@ -4796,41 +4845,41 @@ var Er = {
|
|
|
4796
4845
|
for (; (s = r[i]++) < a[i]; ) {
|
|
4797
4846
|
let c, d = e[i];
|
|
4798
4847
|
const u = t[i][s];
|
|
4799
|
-
if (typeof u == "string" ? (d = i > 0 ? d : ["plain"], c = u) : (d =
|
|
4848
|
+
if (typeof u == "string" ? (d = i > 0 ? d : ["plain"], c = u) : (d = St(d, u.type), u.alias && (d = St(d, u.alias)), c = u.content), typeof c != "string") {
|
|
4800
4849
|
i++, e.push(d), t.push(c), r.push(0), a.push(c.length);
|
|
4801
4850
|
continue;
|
|
4802
4851
|
}
|
|
4803
|
-
const f = c.split(
|
|
4852
|
+
const f = c.split(fa), m = f.length;
|
|
4804
4853
|
o.push({
|
|
4805
4854
|
types: d,
|
|
4806
4855
|
content: f[0]
|
|
4807
4856
|
});
|
|
4808
4857
|
for (let p = 1; p < m; p++)
|
|
4809
|
-
|
|
4858
|
+
kt(o), l.push(o = []), o.push({
|
|
4810
4859
|
types: d,
|
|
4811
4860
|
content: f[p]
|
|
4812
4861
|
});
|
|
4813
4862
|
}
|
|
4814
4863
|
i--, e.pop(), t.pop(), r.pop(), a.pop();
|
|
4815
4864
|
}
|
|
4816
|
-
return
|
|
4817
|
-
},
|
|
4865
|
+
return kt(o), l;
|
|
4866
|
+
}, Et = ha, ma = ({ prism: n, code: e, grammar: t, language: r }) => de(() => {
|
|
4818
4867
|
if (t == null)
|
|
4819
|
-
return
|
|
4868
|
+
return Et([e]);
|
|
4820
4869
|
const a = {
|
|
4821
4870
|
code: e,
|
|
4822
4871
|
grammar: t,
|
|
4823
4872
|
language: r,
|
|
4824
4873
|
tokens: []
|
|
4825
4874
|
};
|
|
4826
|
-
return n.hooks.run("before-tokenize", a), a.tokens = n.tokenize(e, t), n.hooks.run("after-tokenize", a),
|
|
4875
|
+
return n.hooks.run("before-tokenize", a), a.tokens = n.tokenize(e, t), n.hooks.run("after-tokenize", a), Et(a.tokens);
|
|
4827
4876
|
}, [
|
|
4828
4877
|
e,
|
|
4829
4878
|
t,
|
|
4830
4879
|
r,
|
|
4831
4880
|
// prism is a stable import
|
|
4832
4881
|
n
|
|
4833
|
-
]),
|
|
4882
|
+
]), ya = (n, e) => {
|
|
4834
4883
|
const { plain: t } = n, r = n.styles.reduce((a, s) => {
|
|
4835
4884
|
const { languages: i, style: o } = s;
|
|
4836
4885
|
return i && !i.includes(e) || s.types.forEach((l) => {
|
|
@@ -4839,14 +4888,14 @@ var Er = {
|
|
|
4839
4888
|
}), a;
|
|
4840
4889
|
}, {});
|
|
4841
4890
|
return r.root = t, r.plain = Ae(G({}, t), { backgroundColor: void 0 }), r;
|
|
4842
|
-
},
|
|
4891
|
+
}, ba = ya, xa = ({
|
|
4843
4892
|
children: n,
|
|
4844
4893
|
language: e,
|
|
4845
4894
|
code: t,
|
|
4846
4895
|
theme: r,
|
|
4847
4896
|
prism: a
|
|
4848
4897
|
}) => {
|
|
4849
|
-
const s = e.toLowerCase(), i =
|
|
4898
|
+
const s = e.toLowerCase(), i = ba(r, s), o = pa(i), l = ga(i), c = a.languages[s], d = ma({ prism: a, language: s, code: t, grammar: c });
|
|
4850
4899
|
return n({
|
|
4851
4900
|
tokens: d,
|
|
4852
4901
|
className: `prism-code language-${s}`,
|
|
@@ -4854,9 +4903,9 @@ var Er = {
|
|
|
4854
4903
|
getLineProps: o,
|
|
4855
4904
|
getTokenProps: l
|
|
4856
4905
|
});
|
|
4857
|
-
},
|
|
4906
|
+
}, wa = (n) => we(xa, Ae(G({}, n), {
|
|
4858
4907
|
prism: n.prism || y,
|
|
4859
|
-
theme: n.theme ||
|
|
4908
|
+
theme: n.theme || Gt,
|
|
4860
4909
|
code: n.code,
|
|
4861
4910
|
language: n.language
|
|
4862
4911
|
}));
|
|
@@ -4872,97 +4921,48 @@ prismjs/prism.js:
|
|
|
4872
4921
|
* @public
|
|
4873
4922
|
*)
|
|
4874
4923
|
*/
|
|
4875
|
-
const
|
|
4924
|
+
const va = (n, e) => e.some((t) => {
|
|
4876
4925
|
if (typeof t == "number")
|
|
4877
4926
|
return n === t;
|
|
4878
4927
|
const [r, a] = t.split(":").map((s) => parseInt(s));
|
|
4879
4928
|
return r <= n && n <= a;
|
|
4880
|
-
}),
|
|
4881
|
-
const t =
|
|
4929
|
+
}), ka = (n, e, t) => t.some(([r, [a, s]]) => r === n && a <= e && e <= s), Sa = (n, e) => n.split(new RegExp(`(${e.map(([t]) => t).join("|")})`)).filter(Boolean), Yt = (n, e) => () => {
|
|
4930
|
+
const t = He(n);
|
|
4882
4931
|
if (t === void 0)
|
|
4883
4932
|
throw new Error(e);
|
|
4884
4933
|
return t;
|
|
4885
|
-
}, Oe = (n) => Object.assign(
|
|
4934
|
+
}, Oe = (n) => Object.assign(dn(n), {
|
|
4886
4935
|
displayName: n.displayName ?? n.name
|
|
4887
|
-
}),
|
|
4888
|
-
const { lines: a, words: s, ...i } =
|
|
4889
|
-
return $.jsx(
|
|
4890
|
-
const u = d + 1, f =
|
|
4891
|
-
return $.jsx(
|
|
4936
|
+
}), Ea = ye(void 0), Jt = ye(void 0), Xt = Yt(Ea, 'Could not find nearest <CodeBlock /> component. Please wrap this component with a <CodeBlock /> component imported from "react-code-block".'), We = Yt(Jt, 'Could not find nearest <CodeBlock.Code /> component. Please wrap this component with <CodeBlock.Code /> component imported from "react-code-block".'), La = ({ as: n, children: e, ...t }, r) => {
|
|
4937
|
+
const { lines: a, words: s, ...i } = Xt(), o = n ?? "pre";
|
|
4938
|
+
return $.jsx(wa, { ...i, children: (l) => $.jsx(o, { ...t, ref: r, children: l.tokens.map((c, d) => {
|
|
4939
|
+
const u = d + 1, f = va(u, a);
|
|
4940
|
+
return $.jsx(Jt.Provider, { value: { highlight: l, line: c, lineNumber: u }, children: typeof e == "function" ? e({ isLineHighlighted: f, lineNumber: u }, d) : e }, d);
|
|
4892
4941
|
}) }) });
|
|
4893
|
-
},
|
|
4894
|
-
const { highlight: s, line: i } =
|
|
4942
|
+
}, Fa = ({ as: n, children: e, className: t, ...r }, a) => {
|
|
4943
|
+
const { highlight: s, line: i } = We(), { getLineProps: o } = s, l = n ?? "div";
|
|
4895
4944
|
return $.jsx(l, { ...o({ line: i, className: t }), ...r, ref: a, children: e });
|
|
4896
|
-
},
|
|
4897
|
-
const { words: s } =
|
|
4945
|
+
}, Aa = ({ as: n, children: e = ({ children: s }) => $.jsx("span", { children: s }), className: t, ...r }, a) => {
|
|
4946
|
+
const { words: s } = Xt(), { line: i, highlight: o, lineNumber: l } = We(), { getTokenProps: c } = o, d = n ?? "span";
|
|
4898
4947
|
return $.jsx(fe.Fragment, { children: i.map((u, f) => {
|
|
4899
4948
|
const { children: m, ...p } = c({
|
|
4900
4949
|
token: u,
|
|
4901
4950
|
className: t
|
|
4902
|
-
}), g = s.length ?
|
|
4951
|
+
}), g = s.length ? Sa(m, s) : [m];
|
|
4903
4952
|
return $.jsx(fe.Fragment, { children: g.map((h, w) => $.jsx(d, { ...p, ...r, ref: a, children: e({
|
|
4904
4953
|
children: h,
|
|
4905
|
-
isTokenHighlighted:
|
|
4954
|
+
isTokenHighlighted: ka(h, l, s)
|
|
4906
4955
|
}) }, w)) }, f);
|
|
4907
4956
|
}) });
|
|
4908
|
-
},
|
|
4909
|
-
const { lineNumber: r } =
|
|
4957
|
+
}, Oa = ({ as: n, ...e }, t) => {
|
|
4958
|
+
const { lineNumber: r } = We(), a = n ?? "span";
|
|
4910
4959
|
return $.jsx(a, { ...e, ref: t, children: r });
|
|
4911
4960
|
};
|
|
4912
|
-
Oe(ka);
|
|
4913
|
-
Oe(Sa);
|
|
4914
|
-
Oe(Ea);
|
|
4915
4961
|
Oe(La);
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
T1: "text-[40px] font-bold leading-[48px] -tracking-1,5",
|
|
4921
|
-
T2: "text-[32px] font-bold leading-[40px] -tracking-1",
|
|
4922
|
-
T3: "text-[24px] font-bold leading-[32px] -tracking-0,5",
|
|
4923
|
-
H1: "text-[24px] font-bold leading-[32px] -tracking-0,5",
|
|
4924
|
-
H2: "text-[20px] font-bold leading-[24px]",
|
|
4925
|
-
H3: "text-[15px] font-bold leading-[20px]",
|
|
4926
|
-
H4: "text-[13px] font-bold leading-[16px]",
|
|
4927
|
-
B1B: "text-[15px] font-bold leading-[24px] -tracking-0,1",
|
|
4928
|
-
B1: "text-[15px] leading-[24px] -tracking-0,1",
|
|
4929
|
-
B1Button: "text-[15px] leading-[16px] -tracking-0,1",
|
|
4930
|
-
B2: "text-[13px] leading-[20px]",
|
|
4931
|
-
B2Button: "text-[13px] leading-[16px]",
|
|
4932
|
-
D1B: "text-[12px] font-bold leading-[16px]",
|
|
4933
|
-
D1: "text-[12px] leading-[16px]",
|
|
4934
|
-
M: "text-[10px] leading-[16px]"
|
|
4935
|
-
}, X = ({ children: n, className: e, variant: t = "B1", significance: r = "primary", as: a }) => {
|
|
4936
|
-
const s = a ?? Fa[t], i = Jt[t];
|
|
4937
|
-
return /* @__PURE__ */ $.jsx(s, { className: _("font-sans", Aa[r], e, i), children: n });
|
|
4938
|
-
}, Fa = {
|
|
4939
|
-
Di1: "h1",
|
|
4940
|
-
Di2: "h2",
|
|
4941
|
-
Di3: "h3",
|
|
4942
|
-
T1: "h1",
|
|
4943
|
-
T2: "h2",
|
|
4944
|
-
T3: "h3",
|
|
4945
|
-
H1: "h1",
|
|
4946
|
-
H2: "h2",
|
|
4947
|
-
H3: "h3",
|
|
4948
|
-
H4: "h4",
|
|
4949
|
-
B1B: "p",
|
|
4950
|
-
B1: "p",
|
|
4951
|
-
B1Button: "span",
|
|
4952
|
-
B2: "p",
|
|
4953
|
-
B2Button: "span",
|
|
4954
|
-
D1B: "p",
|
|
4955
|
-
D1: "p",
|
|
4956
|
-
M: "p"
|
|
4957
|
-
}, Aa = {
|
|
4958
|
-
primary: "text-label-primary-light dark:text-label-primary-dark",
|
|
4959
|
-
secondary: "text-label-secondary-light dark:text-label-secondary-dark",
|
|
4960
|
-
tertiary: "text-label-tertiary-light dark:text-label-tertiary-dark",
|
|
4961
|
-
quaternary: "text-label-quaternary-light dark:text-label-quaternary-dark",
|
|
4962
|
-
placeholder: "text-label-placeholder-light dark:text-label-placeholder-dark",
|
|
4963
|
-
"nonadaptable-text": "text-nonadaptable-text-light dark:text-nonadaptable-text-dark",
|
|
4964
|
-
disabled: "text-primary-action-disabled-light dark:text-primary-action-disabled-dark"
|
|
4965
|
-
}, Xt = ({
|
|
4962
|
+
Oe(Fa);
|
|
4963
|
+
Oe(Aa);
|
|
4964
|
+
Oe(Oa);
|
|
4965
|
+
const Qt = ({
|
|
4966
4966
|
title: n,
|
|
4967
4967
|
icon: e,
|
|
4968
4968
|
description: t,
|
|
@@ -4975,7 +4975,7 @@ const Jt = {
|
|
|
4975
4975
|
hasPreviousStep: c,
|
|
4976
4976
|
hasNextStep: d
|
|
4977
4977
|
}) => {
|
|
4978
|
-
const { t: u } =
|
|
4978
|
+
const { t: u } = Ke();
|
|
4979
4979
|
return /* @__PURE__ */ S.jsxs(
|
|
4980
4980
|
"div",
|
|
4981
4981
|
{
|
|
@@ -5012,7 +5012,7 @@ const Jt = {
|
|
|
5012
5012
|
{
|
|
5013
5013
|
variant: "subtle",
|
|
5014
5014
|
onClick: s,
|
|
5015
|
-
iconBefore: /* @__PURE__ */ S.jsx(
|
|
5015
|
+
iconBefore: /* @__PURE__ */ S.jsx(zt, {}),
|
|
5016
5016
|
disabled: !s,
|
|
5017
5017
|
text: u("Previous")
|
|
5018
5018
|
}
|
|
@@ -5022,7 +5022,7 @@ const Jt = {
|
|
|
5022
5022
|
{
|
|
5023
5023
|
variant: "subtle",
|
|
5024
5024
|
onClick: i,
|
|
5025
|
-
iconAfter: /* @__PURE__ */ S.jsx(
|
|
5025
|
+
iconAfter: /* @__PURE__ */ S.jsx(Ut, {}),
|
|
5026
5026
|
disabled: !i || !l,
|
|
5027
5027
|
text: u(d ? "Next" : "Submit")
|
|
5028
5028
|
}
|
|
@@ -5044,7 +5044,7 @@ const Jt = {
|
|
|
5044
5044
|
]
|
|
5045
5045
|
}
|
|
5046
5046
|
);
|
|
5047
|
-
},
|
|
5047
|
+
}, Na = ({
|
|
5048
5048
|
title: n,
|
|
5049
5049
|
icon: e,
|
|
5050
5050
|
description: t,
|
|
@@ -5061,7 +5061,7 @@ const Jt = {
|
|
|
5061
5061
|
hasPreviousStep: m,
|
|
5062
5062
|
hasNextStep: p
|
|
5063
5063
|
}) => /* @__PURE__ */ S.jsx(
|
|
5064
|
-
|
|
5064
|
+
Qt,
|
|
5065
5065
|
{
|
|
5066
5066
|
title: n,
|
|
5067
5067
|
icon: e,
|
|
@@ -5087,7 +5087,7 @@ const Jt = {
|
|
|
5087
5087
|
className: "flex md:flex-row-reverse items-center gap-2 p-3 justify-end rounded-lg border text-label-primary-light dark:text-label-primary-dark border-separator-regular-light dark:border-separator-regular-dark",
|
|
5088
5088
|
children: [
|
|
5089
5089
|
/* @__PURE__ */ S.jsx(X, { variant: "B1Button", children: g.text }),
|
|
5090
|
-
/* @__PURE__ */ S.jsx(
|
|
5090
|
+
/* @__PURE__ */ S.jsx(Ta, { size: 20, selected: c.includes(g.id) })
|
|
5091
5091
|
]
|
|
5092
5092
|
}
|
|
5093
5093
|
) }, g.id))
|
|
@@ -5120,7 +5120,7 @@ const Jt = {
|
|
|
5120
5120
|
}
|
|
5121
5121
|
) })
|
|
5122
5122
|
}
|
|
5123
|
-
),
|
|
5123
|
+
), Ta = ({ size: n = 16, strokeColor: e = "currentColor", fillColor: t = "none", selected: r = !1 }) => {
|
|
5124
5124
|
const a = n + 1, s = a / 2, i = (n - 2) / 2;
|
|
5125
5125
|
return /* @__PURE__ */ S.jsxs(
|
|
5126
5126
|
"svg",
|
|
@@ -5171,9 +5171,9 @@ const Jt = {
|
|
|
5171
5171
|
hasPreviousStep: u,
|
|
5172
5172
|
hasNextStep: f
|
|
5173
5173
|
}) => {
|
|
5174
|
-
const { t: m } =
|
|
5174
|
+
const { t: m } = Ke();
|
|
5175
5175
|
return /* @__PURE__ */ S.jsx(
|
|
5176
|
-
|
|
5176
|
+
Qt,
|
|
5177
5177
|
{
|
|
5178
5178
|
title: n,
|
|
5179
5179
|
icon: e,
|
|
@@ -5211,7 +5211,7 @@ const Jt = {
|
|
|
5211
5211
|
"overflow-hidden break-words outline-hidden resize-none material-medium",
|
|
5212
5212
|
"rounded-lg py-3 px-4 min-h-20 border border-separator-opaque-light dark:border-separator-opaque-dark",
|
|
5213
5213
|
"text-label-primary-light dark:text-label-primary-dark",
|
|
5214
|
-
|
|
5214
|
+
Kt.B1
|
|
5215
5215
|
),
|
|
5216
5216
|
value: o,
|
|
5217
5217
|
onChange: (p) => l(p.target.value)
|
|
@@ -5221,7 +5221,7 @@ const Jt = {
|
|
|
5221
5221
|
] })
|
|
5222
5222
|
}
|
|
5223
5223
|
);
|
|
5224
|
-
},
|
|
5224
|
+
}, en = ({ title: n, icon: e, description: t, image: r, children: a, wrapperClassName: s }) => /* @__PURE__ */ S.jsxs(
|
|
5225
5225
|
"div",
|
|
5226
5226
|
{
|
|
5227
5227
|
className: _(
|
|
@@ -5250,13 +5250,13 @@ const Jt = {
|
|
|
5250
5250
|
r && /* @__PURE__ */ S.jsx("div", { className: "flex flex-col justify-center order-1 md:order-2", children: /* @__PURE__ */ S.jsx("div", { className: "rounded-lg overflow-hidden mb-6 md:mb-0", children: /* @__PURE__ */ S.jsx("img", { className: "w-full h-full object-cover aspect-video md:aspect-square", src: r, alt: "image" }) }) })
|
|
5251
5251
|
]
|
|
5252
5252
|
}
|
|
5253
|
-
),
|
|
5253
|
+
), Ca = ({ title: n, icon: e, description: t, image: r, quitText: a, onQuit: s, externalLink: i }) => /* @__PURE__ */ S.jsxs(en, { title: n, icon: e, description: t, image: r, children: [
|
|
5254
5254
|
/* @__PURE__ */ S.jsx("div", { className: "flex justify-end gap-2", children: i ? /* @__PURE__ */ S.jsx(
|
|
5255
5255
|
J,
|
|
5256
5256
|
{
|
|
5257
5257
|
variant: "secondary",
|
|
5258
5258
|
text: a,
|
|
5259
|
-
iconAfter: /* @__PURE__ */ S.jsx(
|
|
5259
|
+
iconAfter: /* @__PURE__ */ S.jsx(Bt, {}),
|
|
5260
5260
|
onClick: () => {
|
|
5261
5261
|
window.open(i, "_blank"), s();
|
|
5262
5262
|
}
|
|
@@ -5273,7 +5273,7 @@ const Jt = {
|
|
|
5273
5273
|
"aria-label": "quit"
|
|
5274
5274
|
}
|
|
5275
5275
|
)
|
|
5276
|
-
] }),
|
|
5276
|
+
] }), Pa = ({
|
|
5277
5277
|
title: n,
|
|
5278
5278
|
icon: e,
|
|
5279
5279
|
description: t,
|
|
@@ -5282,7 +5282,7 @@ const Jt = {
|
|
|
5282
5282
|
onQuit: s,
|
|
5283
5283
|
startText: i,
|
|
5284
5284
|
onStart: o
|
|
5285
|
-
}) => /* @__PURE__ */ S.jsxs(
|
|
5285
|
+
}) => /* @__PURE__ */ S.jsxs(en, { title: n, icon: e, description: t, image: r, wrapperClassName: "relative", children: [
|
|
5286
5286
|
/* @__PURE__ */ S.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
5287
5287
|
s && a && /* @__PURE__ */ S.jsx(J, { variant: "subtle", text: a, onClick: s }),
|
|
5288
5288
|
/* @__PURE__ */ S.jsx(J, { variant: "secondary", text: i, onClick: o })
|
|
@@ -5299,14 +5299,14 @@ const Jt = {
|
|
|
5299
5299
|
}
|
|
5300
5300
|
)
|
|
5301
5301
|
] });
|
|
5302
|
-
let
|
|
5303
|
-
function
|
|
5304
|
-
return
|
|
5302
|
+
let tn = {};
|
|
5303
|
+
function ja() {
|
|
5304
|
+
return tn;
|
|
5305
5305
|
}
|
|
5306
|
-
function
|
|
5307
|
-
|
|
5306
|
+
function Ia(n) {
|
|
5307
|
+
tn = n;
|
|
5308
5308
|
}
|
|
5309
|
-
const
|
|
5309
|
+
const $a = {
|
|
5310
5310
|
lessThanXSeconds: {
|
|
5311
5311
|
one: "less than a second",
|
|
5312
5312
|
other: "less than {{count}} seconds"
|
|
@@ -5368,9 +5368,9 @@ const Ia = {
|
|
|
5368
5368
|
one: "almost 1 year",
|
|
5369
5369
|
other: "almost {{count}} years"
|
|
5370
5370
|
}
|
|
5371
|
-
},
|
|
5371
|
+
}, Da = (n, e, t) => {
|
|
5372
5372
|
let r;
|
|
5373
|
-
const a =
|
|
5373
|
+
const a = $a[n];
|
|
5374
5374
|
return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", e.toString()), t?.addSuffix ? t.comparison && t.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
5375
5375
|
};
|
|
5376
5376
|
function De(n) {
|
|
@@ -5379,14 +5379,14 @@ function De(n) {
|
|
|
5379
5379
|
return n.formats[t] || n.formats[n.defaultWidth];
|
|
5380
5380
|
};
|
|
5381
5381
|
}
|
|
5382
|
-
const
|
|
5382
|
+
const _a = {
|
|
5383
5383
|
lastWeek: "'last' eeee 'at' p",
|
|
5384
5384
|
yesterday: "'yesterday at' p",
|
|
5385
5385
|
today: "'today at' p",
|
|
5386
5386
|
tomorrow: "'tomorrow at' p",
|
|
5387
5387
|
nextWeek: "eeee 'at' p",
|
|
5388
5388
|
other: "P"
|
|
5389
|
-
},
|
|
5389
|
+
}, Ma = (n, e, t, r) => _a[n];
|
|
5390
5390
|
function ce(n) {
|
|
5391
5391
|
return (e, t) => {
|
|
5392
5392
|
const r = t?.context ? String(t.context) : "standalone";
|
|
@@ -5402,15 +5402,15 @@ function ce(n) {
|
|
|
5402
5402
|
return a[s];
|
|
5403
5403
|
};
|
|
5404
5404
|
}
|
|
5405
|
-
const
|
|
5405
|
+
const Ba = {
|
|
5406
5406
|
narrow: ["B", "A"],
|
|
5407
5407
|
abbreviated: ["BC", "AD"],
|
|
5408
5408
|
wide: ["Before Christ", "Anno Domini"]
|
|
5409
|
-
},
|
|
5409
|
+
}, za = {
|
|
5410
5410
|
narrow: ["1", "2", "3", "4"],
|
|
5411
5411
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
5412
5412
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
5413
|
-
},
|
|
5413
|
+
}, Ua = {
|
|
5414
5414
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
5415
5415
|
abbreviated: [
|
|
5416
5416
|
"Jan",
|
|
@@ -5440,7 +5440,7 @@ const Ma = {
|
|
|
5440
5440
|
"November",
|
|
5441
5441
|
"December"
|
|
5442
5442
|
]
|
|
5443
|
-
},
|
|
5443
|
+
}, Va = {
|
|
5444
5444
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
5445
5445
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
5446
5446
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -5453,7 +5453,7 @@ const Ma = {
|
|
|
5453
5453
|
"Friday",
|
|
5454
5454
|
"Saturday"
|
|
5455
5455
|
]
|
|
5456
|
-
},
|
|
5456
|
+
}, Ha = {
|
|
5457
5457
|
narrow: {
|
|
5458
5458
|
am: "a",
|
|
5459
5459
|
pm: "p",
|
|
@@ -5484,7 +5484,7 @@ const Ma = {
|
|
|
5484
5484
|
evening: "evening",
|
|
5485
5485
|
night: "night"
|
|
5486
5486
|
}
|
|
5487
|
-
},
|
|
5487
|
+
}, Ka = {
|
|
5488
5488
|
narrow: {
|
|
5489
5489
|
am: "a",
|
|
5490
5490
|
pm: "p",
|
|
@@ -5515,7 +5515,7 @@ const Ma = {
|
|
|
5515
5515
|
evening: "in the evening",
|
|
5516
5516
|
night: "at night"
|
|
5517
5517
|
}
|
|
5518
|
-
},
|
|
5518
|
+
}, qa = (n, e) => {
|
|
5519
5519
|
const t = Number(n), r = t % 100;
|
|
5520
5520
|
if (r > 20 || r < 10)
|
|
5521
5521
|
switch (r % 10) {
|
|
@@ -5527,29 +5527,29 @@ const Ma = {
|
|
|
5527
5527
|
return t + "rd";
|
|
5528
5528
|
}
|
|
5529
5529
|
return t + "th";
|
|
5530
|
-
},
|
|
5531
|
-
ordinalNumber:
|
|
5530
|
+
}, Za = {
|
|
5531
|
+
ordinalNumber: qa,
|
|
5532
5532
|
era: ce({
|
|
5533
|
-
values:
|
|
5533
|
+
values: Ba,
|
|
5534
5534
|
defaultWidth: "wide"
|
|
5535
5535
|
}),
|
|
5536
5536
|
quarter: ce({
|
|
5537
|
-
values:
|
|
5537
|
+
values: za,
|
|
5538
5538
|
defaultWidth: "wide",
|
|
5539
5539
|
argumentCallback: (n) => n - 1
|
|
5540
5540
|
}),
|
|
5541
5541
|
month: ce({
|
|
5542
|
-
values:
|
|
5542
|
+
values: Ua,
|
|
5543
5543
|
defaultWidth: "wide"
|
|
5544
5544
|
}),
|
|
5545
5545
|
day: ce({
|
|
5546
|
-
values:
|
|
5546
|
+
values: Va,
|
|
5547
5547
|
defaultWidth: "wide"
|
|
5548
5548
|
}),
|
|
5549
5549
|
dayPeriod: ce({
|
|
5550
|
-
values:
|
|
5550
|
+
values: Ha,
|
|
5551
5551
|
defaultWidth: "wide",
|
|
5552
|
-
formattingValues:
|
|
5552
|
+
formattingValues: Ka,
|
|
5553
5553
|
defaultFormattingWidth: "wide"
|
|
5554
5554
|
})
|
|
5555
5555
|
};
|
|
@@ -5558,9 +5558,9 @@ function ue(n) {
|
|
|
5558
5558
|
const r = t.width, a = r && n.matchPatterns[r] || n.matchPatterns[n.defaultMatchWidth], s = e.match(a);
|
|
5559
5559
|
if (!s)
|
|
5560
5560
|
return null;
|
|
5561
|
-
const i = s[0], o = r && n.parsePatterns[r] || n.parsePatterns[n.defaultParseWidth], l = Array.isArray(o) ?
|
|
5561
|
+
const i = s[0], o = r && n.parsePatterns[r] || n.parsePatterns[n.defaultParseWidth], l = Array.isArray(o) ? Ga(o, (u) => u.test(i)) : (
|
|
5562
5562
|
// [TODO] -- I challenge you to fix the type
|
|
5563
|
-
|
|
5563
|
+
Wa(o, (u) => u.test(i))
|
|
5564
5564
|
);
|
|
5565
5565
|
let c;
|
|
5566
5566
|
c = n.valueCallback ? n.valueCallback(l) : l, c = t.valueCallback ? (
|
|
@@ -5571,17 +5571,17 @@ function ue(n) {
|
|
|
5571
5571
|
return { value: c, rest: d };
|
|
5572
5572
|
};
|
|
5573
5573
|
}
|
|
5574
|
-
function
|
|
5574
|
+
function Wa(n, e) {
|
|
5575
5575
|
for (const t in n)
|
|
5576
5576
|
if (Object.prototype.hasOwnProperty.call(n, t) && e(n[t]))
|
|
5577
5577
|
return t;
|
|
5578
5578
|
}
|
|
5579
|
-
function
|
|
5579
|
+
function Ga(n, e) {
|
|
5580
5580
|
for (let t = 0; t < n.length; t++)
|
|
5581
5581
|
if (e(n[t]))
|
|
5582
5582
|
return t;
|
|
5583
5583
|
}
|
|
5584
|
-
function
|
|
5584
|
+
function Ya(n) {
|
|
5585
5585
|
return (e, t = {}) => {
|
|
5586
5586
|
const r = e.match(n.matchPattern);
|
|
5587
5587
|
if (!r) return null;
|
|
@@ -5593,23 +5593,23 @@ function Ga(n) {
|
|
|
5593
5593
|
return { value: i, rest: o };
|
|
5594
5594
|
};
|
|
5595
5595
|
}
|
|
5596
|
-
const
|
|
5596
|
+
const Ja = /^(\d+)(th|st|nd|rd)?/i, Xa = /\d+/i, Qa = {
|
|
5597
5597
|
narrow: /^(b|a)/i,
|
|
5598
5598
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
5599
5599
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
5600
|
-
}, Qa = {
|
|
5601
|
-
any: [/^b/i, /^(a|c)/i]
|
|
5602
5600
|
}, es = {
|
|
5601
|
+
any: [/^b/i, /^(a|c)/i]
|
|
5602
|
+
}, ts = {
|
|
5603
5603
|
narrow: /^[1234]/i,
|
|
5604
5604
|
abbreviated: /^q[1234]/i,
|
|
5605
5605
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
5606
|
-
}, ts = {
|
|
5607
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
5608
5606
|
}, ns = {
|
|
5607
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
5608
|
+
}, rs = {
|
|
5609
5609
|
narrow: /^[jfmasond]/i,
|
|
5610
5610
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
5611
5611
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
5612
|
-
},
|
|
5612
|
+
}, as = {
|
|
5613
5613
|
narrow: [
|
|
5614
5614
|
/^j/i,
|
|
5615
5615
|
/^f/i,
|
|
@@ -5638,18 +5638,18 @@ const Ya = /^(\d+)(th|st|nd|rd)?/i, Ja = /\d+/i, Xa = {
|
|
|
5638
5638
|
/^n/i,
|
|
5639
5639
|
/^d/i
|
|
5640
5640
|
]
|
|
5641
|
-
},
|
|
5641
|
+
}, ss = {
|
|
5642
5642
|
narrow: /^[smtwf]/i,
|
|
5643
5643
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
5644
5644
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
5645
5645
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
5646
|
-
},
|
|
5646
|
+
}, is = {
|
|
5647
5647
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
5648
5648
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
5649
|
-
},
|
|
5649
|
+
}, os = {
|
|
5650
5650
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
5651
5651
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
5652
|
-
},
|
|
5652
|
+
}, ls = {
|
|
5653
5653
|
any: {
|
|
5654
5654
|
am: /^a/i,
|
|
5655
5655
|
pm: /^p/i,
|
|
@@ -5660,106 +5660,106 @@ const Ya = /^(\d+)(th|st|nd|rd)?/i, Ja = /\d+/i, Xa = {
|
|
|
5660
5660
|
evening: /evening/i,
|
|
5661
5661
|
night: /night/i
|
|
5662
5662
|
}
|
|
5663
|
-
},
|
|
5664
|
-
ordinalNumber:
|
|
5665
|
-
matchPattern:
|
|
5666
|
-
parsePattern:
|
|
5663
|
+
}, cs = {
|
|
5664
|
+
ordinalNumber: Ya({
|
|
5665
|
+
matchPattern: Ja,
|
|
5666
|
+
parsePattern: Xa,
|
|
5667
5667
|
valueCallback: (n) => parseInt(n, 10)
|
|
5668
5668
|
}),
|
|
5669
5669
|
era: ue({
|
|
5670
|
-
matchPatterns:
|
|
5670
|
+
matchPatterns: Qa,
|
|
5671
5671
|
defaultMatchWidth: "wide",
|
|
5672
|
-
parsePatterns:
|
|
5672
|
+
parsePatterns: es,
|
|
5673
5673
|
defaultParseWidth: "any"
|
|
5674
5674
|
}),
|
|
5675
5675
|
quarter: ue({
|
|
5676
|
-
matchPatterns:
|
|
5676
|
+
matchPatterns: ts,
|
|
5677
5677
|
defaultMatchWidth: "wide",
|
|
5678
|
-
parsePatterns:
|
|
5678
|
+
parsePatterns: ns,
|
|
5679
5679
|
defaultParseWidth: "any",
|
|
5680
5680
|
valueCallback: (n) => n + 1
|
|
5681
5681
|
}),
|
|
5682
5682
|
month: ue({
|
|
5683
|
-
matchPatterns:
|
|
5683
|
+
matchPatterns: rs,
|
|
5684
5684
|
defaultMatchWidth: "wide",
|
|
5685
|
-
parsePatterns:
|
|
5685
|
+
parsePatterns: as,
|
|
5686
5686
|
defaultParseWidth: "any"
|
|
5687
5687
|
}),
|
|
5688
5688
|
day: ue({
|
|
5689
|
-
matchPatterns:
|
|
5689
|
+
matchPatterns: ss,
|
|
5690
5690
|
defaultMatchWidth: "wide",
|
|
5691
|
-
parsePatterns:
|
|
5691
|
+
parsePatterns: is,
|
|
5692
5692
|
defaultParseWidth: "any"
|
|
5693
5693
|
}),
|
|
5694
5694
|
dayPeriod: ue({
|
|
5695
|
-
matchPatterns:
|
|
5695
|
+
matchPatterns: os,
|
|
5696
5696
|
defaultMatchWidth: "any",
|
|
5697
|
-
parsePatterns:
|
|
5697
|
+
parsePatterns: ls,
|
|
5698
5698
|
defaultParseWidth: "any"
|
|
5699
5699
|
})
|
|
5700
5700
|
};
|
|
5701
|
-
function
|
|
5702
|
-
const e = {}, t =
|
|
5701
|
+
function us(n) {
|
|
5702
|
+
const e = {}, t = ja();
|
|
5703
5703
|
for (const r in t)
|
|
5704
5704
|
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
5705
5705
|
for (const r in n)
|
|
5706
5706
|
Object.prototype.hasOwnProperty.call(n, r) && (n[r] === void 0 ? delete e[r] : e[r] = n[r]);
|
|
5707
|
-
|
|
5707
|
+
Ia(e);
|
|
5708
5708
|
}
|
|
5709
|
-
const
|
|
5709
|
+
const ds = {
|
|
5710
5710
|
full: "EEEE, d MMMM yyyy",
|
|
5711
5711
|
long: "d MMMM yyyy",
|
|
5712
5712
|
medium: "d MMM yyyy",
|
|
5713
5713
|
short: "dd/MM/yyyy"
|
|
5714
|
-
},
|
|
5714
|
+
}, ps = {
|
|
5715
5715
|
full: "HH:mm:ss zzzz",
|
|
5716
5716
|
long: "HH:mm:ss z",
|
|
5717
5717
|
medium: "HH:mm:ss",
|
|
5718
5718
|
short: "HH:mm"
|
|
5719
|
-
},
|
|
5719
|
+
}, gs = {
|
|
5720
5720
|
full: "{{date}} 'at' {{time}}",
|
|
5721
5721
|
long: "{{date}} 'at' {{time}}",
|
|
5722
5722
|
medium: "{{date}}, {{time}}",
|
|
5723
5723
|
short: "{{date}}, {{time}}"
|
|
5724
|
-
},
|
|
5724
|
+
}, fs = {
|
|
5725
5725
|
date: De({
|
|
5726
|
-
formats:
|
|
5726
|
+
formats: ds,
|
|
5727
5727
|
defaultWidth: "full"
|
|
5728
5728
|
}),
|
|
5729
5729
|
time: De({
|
|
5730
|
-
formats:
|
|
5730
|
+
formats: ps,
|
|
5731
5731
|
defaultWidth: "full"
|
|
5732
5732
|
}),
|
|
5733
5733
|
dateTime: De({
|
|
5734
|
-
formats:
|
|
5734
|
+
formats: gs,
|
|
5735
5735
|
defaultWidth: "full"
|
|
5736
5736
|
})
|
|
5737
|
-
},
|
|
5737
|
+
}, hs = {
|
|
5738
5738
|
code: "en-GB",
|
|
5739
|
-
formatDistance:
|
|
5740
|
-
formatLong:
|
|
5741
|
-
formatRelative:
|
|
5742
|
-
localize:
|
|
5743
|
-
match:
|
|
5739
|
+
formatDistance: Da,
|
|
5740
|
+
formatLong: fs,
|
|
5741
|
+
formatRelative: Ma,
|
|
5742
|
+
localize: Za,
|
|
5743
|
+
match: cs,
|
|
5744
5744
|
options: {
|
|
5745
5745
|
weekStartsOn: 1,
|
|
5746
5746
|
firstWeekContainsDate: 4
|
|
5747
5747
|
}
|
|
5748
5748
|
}, {
|
|
5749
|
-
slice:
|
|
5750
|
-
forEach:
|
|
5749
|
+
slice: ms,
|
|
5750
|
+
forEach: ys
|
|
5751
5751
|
} = [];
|
|
5752
|
-
function
|
|
5753
|
-
return
|
|
5752
|
+
function bs(n) {
|
|
5753
|
+
return ys.call(ms.call(arguments, 1), (e) => {
|
|
5754
5754
|
if (e)
|
|
5755
5755
|
for (const t in e)
|
|
5756
5756
|
n[t] === void 0 && (n[t] = e[t]);
|
|
5757
5757
|
}), n;
|
|
5758
5758
|
}
|
|
5759
|
-
function
|
|
5759
|
+
function xs(n) {
|
|
5760
5760
|
return typeof n != "string" ? !1 : [/<\s*script.*?>/i, /<\s*\/\s*script\s*>/i, /<\s*img.*?on\w+\s*=/i, /<\s*\w+\s*on\w+\s*=.*?>/i, /javascript\s*:/i, /vbscript\s*:/i, /expression\s*\(/i, /eval\s*\(/i, /alert\s*\(/i, /document\.cookie/i, /document\.write\s*\(/i, /window\.location/i, /innerHTML/i].some((t) => t.test(n));
|
|
5761
5761
|
}
|
|
5762
|
-
const
|
|
5762
|
+
const Lt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, ws = function(n, e) {
|
|
5763
5763
|
const r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
5764
5764
|
path: "/"
|
|
5765
5765
|
}, a = encodeURIComponent(e);
|
|
@@ -5770,12 +5770,12 @@ const Et = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, xs = function(n, e) {
|
|
|
5770
5770
|
s += `; Max-Age=${Math.floor(i)}`;
|
|
5771
5771
|
}
|
|
5772
5772
|
if (r.domain) {
|
|
5773
|
-
if (!
|
|
5773
|
+
if (!Lt.test(r.domain))
|
|
5774
5774
|
throw new TypeError("option domain is invalid");
|
|
5775
5775
|
s += `; Domain=${r.domain}`;
|
|
5776
5776
|
}
|
|
5777
5777
|
if (r.path) {
|
|
5778
|
-
if (!
|
|
5778
|
+
if (!Lt.test(r.path))
|
|
5779
5779
|
throw new TypeError("option path is invalid");
|
|
5780
5780
|
s += `; Path=${r.path}`;
|
|
5781
5781
|
}
|
|
@@ -5802,13 +5802,13 @@ const Et = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, xs = function(n, e) {
|
|
|
5802
5802
|
throw new TypeError("option sameSite is invalid");
|
|
5803
5803
|
}
|
|
5804
5804
|
return r.partitioned && (s += "; Partitioned"), s;
|
|
5805
|
-
},
|
|
5805
|
+
}, Ft = {
|
|
5806
5806
|
create(n, e, t, r) {
|
|
5807
5807
|
let a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
5808
5808
|
path: "/",
|
|
5809
5809
|
sameSite: "strict"
|
|
5810
5810
|
};
|
|
5811
|
-
t && (a.expires = /* @__PURE__ */ new Date(), a.expires.setTime(a.expires.getTime() + t * 60 * 1e3)), r && (a.domain = r), document.cookie =
|
|
5811
|
+
t && (a.expires = /* @__PURE__ */ new Date(), a.expires.setTime(a.expires.getTime() + t * 60 * 1e3)), r && (a.domain = r), document.cookie = ws(n, e, a);
|
|
5812
5812
|
},
|
|
5813
5813
|
read(n) {
|
|
5814
5814
|
const e = `${n}=`, t = document.cookie.split(";");
|
|
@@ -5823,7 +5823,7 @@ const Et = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, xs = function(n, e) {
|
|
|
5823
5823
|
this.create(n, "", -1, e);
|
|
5824
5824
|
}
|
|
5825
5825
|
};
|
|
5826
|
-
var
|
|
5826
|
+
var vs = {
|
|
5827
5827
|
name: "cookie",
|
|
5828
5828
|
// Deconstruct the options object and extract the lookupCookie property
|
|
5829
5829
|
lookup(n) {
|
|
@@ -5831,7 +5831,7 @@ var ws = {
|
|
|
5831
5831
|
lookupCookie: e
|
|
5832
5832
|
} = n;
|
|
5833
5833
|
if (e && typeof document < "u")
|
|
5834
|
-
return
|
|
5834
|
+
return Ft.read(e) || void 0;
|
|
5835
5835
|
},
|
|
5836
5836
|
// Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties
|
|
5837
5837
|
cacheUserLanguage(n, e) {
|
|
@@ -5841,9 +5841,9 @@ var ws = {
|
|
|
5841
5841
|
cookieDomain: a,
|
|
5842
5842
|
cookieOptions: s
|
|
5843
5843
|
} = e;
|
|
5844
|
-
t && typeof document < "u" &&
|
|
5844
|
+
t && typeof document < "u" && Ft.create(t, n, r, a, s);
|
|
5845
5845
|
}
|
|
5846
|
-
},
|
|
5846
|
+
}, ks = {
|
|
5847
5847
|
name: "querystring",
|
|
5848
5848
|
// Deconstruct the options object and extract the lookupQuerystring property
|
|
5849
5849
|
lookup(n) {
|
|
@@ -5863,7 +5863,7 @@ var ws = {
|
|
|
5863
5863
|
}
|
|
5864
5864
|
return t;
|
|
5865
5865
|
}
|
|
5866
|
-
},
|
|
5866
|
+
}, Ss = {
|
|
5867
5867
|
name: "hash",
|
|
5868
5868
|
// Deconstruct the options object and extract the lookupHash property and the lookupFromHashIndex property
|
|
5869
5869
|
lookup(n) {
|
|
@@ -5895,7 +5895,7 @@ var ws = {
|
|
|
5895
5895
|
}
|
|
5896
5896
|
};
|
|
5897
5897
|
let re = null;
|
|
5898
|
-
const
|
|
5898
|
+
const At = () => {
|
|
5899
5899
|
if (re !== null) return re;
|
|
5900
5900
|
try {
|
|
5901
5901
|
if (re = typeof window < "u" && window.localStorage !== null, !re)
|
|
@@ -5907,14 +5907,14 @@ const Ft = () => {
|
|
|
5907
5907
|
}
|
|
5908
5908
|
return re;
|
|
5909
5909
|
};
|
|
5910
|
-
var
|
|
5910
|
+
var Es = {
|
|
5911
5911
|
name: "localStorage",
|
|
5912
5912
|
// Deconstruct the options object and extract the lookupLocalStorage property
|
|
5913
5913
|
lookup(n) {
|
|
5914
5914
|
let {
|
|
5915
5915
|
lookupLocalStorage: e
|
|
5916
5916
|
} = n;
|
|
5917
|
-
if (e &&
|
|
5917
|
+
if (e && At())
|
|
5918
5918
|
return window.localStorage.getItem(e) || void 0;
|
|
5919
5919
|
},
|
|
5920
5920
|
// Deconstruct the options object and extract the lookupLocalStorage property
|
|
@@ -5922,11 +5922,11 @@ var Ss = {
|
|
|
5922
5922
|
let {
|
|
5923
5923
|
lookupLocalStorage: t
|
|
5924
5924
|
} = e;
|
|
5925
|
-
t &&
|
|
5925
|
+
t && At() && window.localStorage.setItem(t, n);
|
|
5926
5926
|
}
|
|
5927
5927
|
};
|
|
5928
5928
|
let ae = null;
|
|
5929
|
-
const
|
|
5929
|
+
const Ot = () => {
|
|
5930
5930
|
if (ae !== null) return ae;
|
|
5931
5931
|
try {
|
|
5932
5932
|
if (ae = typeof window < "u" && window.sessionStorage !== null, !ae)
|
|
@@ -5938,22 +5938,22 @@ const At = () => {
|
|
|
5938
5938
|
}
|
|
5939
5939
|
return ae;
|
|
5940
5940
|
};
|
|
5941
|
-
var
|
|
5941
|
+
var Ls = {
|
|
5942
5942
|
name: "sessionStorage",
|
|
5943
5943
|
lookup(n) {
|
|
5944
5944
|
let {
|
|
5945
5945
|
lookupSessionStorage: e
|
|
5946
5946
|
} = n;
|
|
5947
|
-
if (e &&
|
|
5947
|
+
if (e && Ot())
|
|
5948
5948
|
return window.sessionStorage.getItem(e) || void 0;
|
|
5949
5949
|
},
|
|
5950
5950
|
cacheUserLanguage(n, e) {
|
|
5951
5951
|
let {
|
|
5952
5952
|
lookupSessionStorage: t
|
|
5953
5953
|
} = e;
|
|
5954
|
-
t &&
|
|
5954
|
+
t && Ot() && window.sessionStorage.setItem(t, n);
|
|
5955
5955
|
}
|
|
5956
|
-
},
|
|
5956
|
+
}, Fs = {
|
|
5957
5957
|
name: "navigator",
|
|
5958
5958
|
lookup(n) {
|
|
5959
5959
|
const e = [];
|
|
@@ -5970,7 +5970,7 @@ var Es = {
|
|
|
5970
5970
|
}
|
|
5971
5971
|
return e.length > 0 ? e : void 0;
|
|
5972
5972
|
}
|
|
5973
|
-
},
|
|
5973
|
+
}, As = {
|
|
5974
5974
|
name: "htmlTag",
|
|
5975
5975
|
// Deconstruct the options object and extract the htmlTag property
|
|
5976
5976
|
lookup(n) {
|
|
@@ -5980,7 +5980,7 @@ var Es = {
|
|
|
5980
5980
|
const r = e || (typeof document < "u" ? document.documentElement : null);
|
|
5981
5981
|
return r && typeof r.getAttribute == "function" && (t = r.getAttribute("lang")), t;
|
|
5982
5982
|
}
|
|
5983
|
-
},
|
|
5983
|
+
}, Os = {
|
|
5984
5984
|
name: "path",
|
|
5985
5985
|
// Deconstruct the options object and extract the lookupFromPathIndex property
|
|
5986
5986
|
lookup(n) {
|
|
@@ -5991,7 +5991,7 @@ var Es = {
|
|
|
5991
5991
|
const t = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
|
|
5992
5992
|
return Array.isArray(t) ? t[typeof e == "number" ? e : 0]?.replace("/", "") : void 0;
|
|
5993
5993
|
}
|
|
5994
|
-
},
|
|
5994
|
+
}, Ns = {
|
|
5995
5995
|
name: "subdomain",
|
|
5996
5996
|
lookup(n) {
|
|
5997
5997
|
let {
|
|
@@ -6002,15 +6002,15 @@ var Es = {
|
|
|
6002
6002
|
return r[t];
|
|
6003
6003
|
}
|
|
6004
6004
|
};
|
|
6005
|
-
let
|
|
6005
|
+
let nn = !1;
|
|
6006
6006
|
try {
|
|
6007
|
-
document.cookie,
|
|
6007
|
+
document.cookie, nn = !0;
|
|
6008
6008
|
} catch {
|
|
6009
6009
|
}
|
|
6010
|
-
const
|
|
6011
|
-
|
|
6012
|
-
const
|
|
6013
|
-
order:
|
|
6010
|
+
const rn = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
|
|
6011
|
+
nn || rn.splice(1, 1);
|
|
6012
|
+
const Ts = () => ({
|
|
6013
|
+
order: rn,
|
|
6014
6014
|
lookupQuerystring: "lng",
|
|
6015
6015
|
lookupCookie: "i18next",
|
|
6016
6016
|
lookupLocalStorage: "i18nextLng",
|
|
@@ -6022,7 +6022,7 @@ const Ns = () => ({
|
|
|
6022
6022
|
// cookieDomain: 'myDomain'
|
|
6023
6023
|
convertDetectedLanguage: (n) => n
|
|
6024
6024
|
});
|
|
6025
|
-
class
|
|
6025
|
+
class an {
|
|
6026
6026
|
constructor(e) {
|
|
6027
6027
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6028
6028
|
this.type = "languageDetector", this.detectors = {}, this.init(e, t);
|
|
@@ -6031,7 +6031,7 @@ class rn {
|
|
|
6031
6031
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
6032
6032
|
languageUtils: {}
|
|
6033
6033
|
}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
6034
|
-
this.services = e, this.options =
|
|
6034
|
+
this.services = e, this.options = bs(t, this.options || {}, Ts()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (a) => a.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = r, this.addDetector(vs), this.addDetector(ks), this.addDetector(Es), this.addDetector(Ls), this.addDetector(Fs), this.addDetector(As), this.addDetector(Os), this.addDetector(Ns), this.addDetector(Ss);
|
|
6035
6035
|
}
|
|
6036
6036
|
addDetector(e) {
|
|
6037
6037
|
return this.detectors[e.name] = e, this;
|
|
@@ -6043,7 +6043,7 @@ class rn {
|
|
|
6043
6043
|
let a = this.detectors[r].lookup(this.options);
|
|
6044
6044
|
a && typeof a == "string" && (a = [a]), a && (t = t.concat(a));
|
|
6045
6045
|
}
|
|
6046
|
-
}), t = t.filter((r) => r != null && !
|
|
6046
|
+
}), t = t.filter((r) => r != null && !xs(r)).map((r) => this.options.convertDetectedLanguage(r)), this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes ? t : t.length > 0 ? t[0] : null;
|
|
6047
6047
|
}
|
|
6048
6048
|
cacheUserLanguage(e) {
|
|
6049
6049
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.options.caches;
|
|
@@ -6052,21 +6052,21 @@ class rn {
|
|
|
6052
6052
|
}));
|
|
6053
6053
|
}
|
|
6054
6054
|
}
|
|
6055
|
-
|
|
6056
|
-
const
|
|
6055
|
+
an.type = "languageDetector";
|
|
6056
|
+
const sn = {
|
|
6057
6057
|
apiBaseUrl: "https://api.nemme.io",
|
|
6058
6058
|
debug: !1
|
|
6059
|
-
}, Rs = "Previous",
|
|
6059
|
+
}, Rs = "Previous", Cs = "Next", Ps = "Done", js = "Submit", Is = {
|
|
6060
6060
|
Previous: Rs,
|
|
6061
|
-
Next:
|
|
6062
|
-
Done:
|
|
6063
|
-
Submit:
|
|
6061
|
+
Next: Cs,
|
|
6062
|
+
Done: Ps,
|
|
6063
|
+
Submit: js,
|
|
6064
6064
|
"Type your answer here": "Type your answer here",
|
|
6065
6065
|
"Max {{maxCharacters}} characters": "Max {{maxCharacters}} characters"
|
|
6066
|
-
},
|
|
6067
|
-
|
|
6068
|
-
I.use(
|
|
6069
|
-
debug:
|
|
6066
|
+
}, $s = {};
|
|
6067
|
+
us({ locale: hs });
|
|
6068
|
+
I.use(an).use(Kn).init({
|
|
6069
|
+
debug: sn.debug,
|
|
6070
6070
|
fallbackLng: "en",
|
|
6071
6071
|
interpolation: {
|
|
6072
6072
|
escapeValue: !1
|
|
@@ -6074,20 +6074,20 @@ I.use(rn).use(Hn).init({
|
|
|
6074
6074
|
},
|
|
6075
6075
|
resources: {
|
|
6076
6076
|
en: {
|
|
6077
|
-
translation:
|
|
6077
|
+
translation: Is
|
|
6078
6078
|
},
|
|
6079
6079
|
nb: {
|
|
6080
|
-
tranlation:
|
|
6080
|
+
tranlation: $s
|
|
6081
6081
|
}
|
|
6082
6082
|
}
|
|
6083
6083
|
});
|
|
6084
|
-
const
|
|
6084
|
+
const Nt = {
|
|
6085
6085
|
debug: 0,
|
|
6086
6086
|
info: 1,
|
|
6087
6087
|
warn: 2,
|
|
6088
6088
|
error: 3
|
|
6089
6089
|
};
|
|
6090
|
-
class
|
|
6090
|
+
class Ge {
|
|
6091
6091
|
prefix;
|
|
6092
6092
|
enabled;
|
|
6093
6093
|
level;
|
|
@@ -6095,7 +6095,7 @@ class We {
|
|
|
6095
6095
|
this.prefix = e.prefix || "Nemme SDK", this.enabled = e.enabled !== void 0 ? e.enabled : !0, this.level = e.level || "info";
|
|
6096
6096
|
}
|
|
6097
6097
|
shouldLog(e) {
|
|
6098
|
-
return this.enabled &&
|
|
6098
|
+
return this.enabled && Nt[e] >= Nt[this.level];
|
|
6099
6099
|
}
|
|
6100
6100
|
formatMessage(e) {
|
|
6101
6101
|
return `[${this.prefix}] ${e}`;
|
|
@@ -6114,7 +6114,7 @@ class We {
|
|
|
6114
6114
|
}
|
|
6115
6115
|
// Create a child logger with a new prefix
|
|
6116
6116
|
child(e) {
|
|
6117
|
-
return new
|
|
6117
|
+
return new Ge({
|
|
6118
6118
|
prefix: `${this.prefix}:${e}`,
|
|
6119
6119
|
enabled: this.enabled,
|
|
6120
6120
|
level: this.level
|
|
@@ -6125,8 +6125,8 @@ class We {
|
|
|
6125
6125
|
e.prefix !== void 0 && (this.prefix = e.prefix), e.enabled !== void 0 && (this.enabled = e.enabled), e.level !== void 0 && (this.level = e.level);
|
|
6126
6126
|
}
|
|
6127
6127
|
}
|
|
6128
|
-
const
|
|
6129
|
-
const t = new URL(n,
|
|
6128
|
+
const on = new Ge(), Tt = on.child("network"), Ds = 3e4, _s = (n, e) => {
|
|
6129
|
+
const t = new URL(n, sn.apiBaseUrl);
|
|
6130
6130
|
return e && Object.entries(e).forEach(([r, a]) => {
|
|
6131
6131
|
a != null && t.searchParams.append(r, String(a));
|
|
6132
6132
|
}), t.toString();
|
|
@@ -6135,7 +6135,7 @@ const sn = new We(), Nt = sn.child("network"), $s = 3e4, Ds = (n, e) => {
|
|
|
6135
6135
|
* Make an HTTP request
|
|
6136
6136
|
*/
|
|
6137
6137
|
async request(n, e = {}) {
|
|
6138
|
-
const { method: t = "GET", headers: r = {}, body: a, params: s, timeout: i =
|
|
6138
|
+
const { method: t = "GET", headers: r = {}, body: a, params: s, timeout: i = Ds } = e, o = _s(n, s), l = {
|
|
6139
6139
|
"Content-Type": "application/json",
|
|
6140
6140
|
Accept: "application/json",
|
|
6141
6141
|
...r
|
|
@@ -6170,7 +6170,7 @@ const sn = new We(), Nt = sn.child("network"), $s = 3e4, Ds = (n, e) => {
|
|
|
6170
6170
|
g.ok = !0;
|
|
6171
6171
|
else {
|
|
6172
6172
|
const h = `Request failed with status ${f.status}: ${f.statusText}`;
|
|
6173
|
-
|
|
6173
|
+
Tt.error(h, {
|
|
6174
6174
|
url: o,
|
|
6175
6175
|
method: t,
|
|
6176
6176
|
status: f.status,
|
|
@@ -6187,7 +6187,7 @@ const sn = new We(), Nt = sn.child("network"), $s = 3e4, Ds = (n, e) => {
|
|
|
6187
6187
|
message: f instanceof Error ? f.message : String(f),
|
|
6188
6188
|
url: o,
|
|
6189
6189
|
method: t
|
|
6190
|
-
},
|
|
6190
|
+
}, Tt.error(m, p), {
|
|
6191
6191
|
data: {},
|
|
6192
6192
|
status: 0,
|
|
6193
6193
|
statusText: m,
|
|
@@ -6221,7 +6221,13 @@ const sn = new We(), Nt = sn.child("network"), $s = 3e4, Ds = (n, e) => {
|
|
|
6221
6221
|
return this.request(n, { ...e, method: "DELETE" });
|
|
6222
6222
|
}
|
|
6223
6223
|
};
|
|
6224
|
-
class
|
|
6224
|
+
class _e extends Error {
|
|
6225
|
+
errorType;
|
|
6226
|
+
constructor(e, t) {
|
|
6227
|
+
super(t), this.name = "FormError", this.errorType = e;
|
|
6228
|
+
}
|
|
6229
|
+
}
|
|
6230
|
+
class Ms {
|
|
6225
6231
|
logger;
|
|
6226
6232
|
headers;
|
|
6227
6233
|
config;
|
|
@@ -6234,18 +6240,25 @@ class _s {
|
|
|
6234
6240
|
const a = await Y.get(`/external/forms/${e}`, {
|
|
6235
6241
|
headers: this.headers
|
|
6236
6242
|
});
|
|
6243
|
+
if (!a.ok && this.config.onFormError) {
|
|
6244
|
+
const s = new _e("FETCH_ERROR", a.error?.message);
|
|
6245
|
+
this.config.onFormError(s);
|
|
6246
|
+
}
|
|
6237
6247
|
a.ok && a.data ? (this.logger.info(`Form config loaded for: ${e}`, a.data), this.displayForm(a.data, t, r)) : this.logger.warn(`No form config found for: ${e}`);
|
|
6238
6248
|
} catch (a) {
|
|
6239
|
-
this.logger.error(`Failed to fetch form config for: ${e}`, a)
|
|
6249
|
+
if (this.logger.error(`Failed to fetch form config for: ${e}`, a), this.config.onFormError) {
|
|
6250
|
+
const s = new _e("FETCH_ERROR");
|
|
6251
|
+
this.config.onFormError(s);
|
|
6252
|
+
}
|
|
6240
6253
|
}
|
|
6241
6254
|
}
|
|
6242
6255
|
displayForm(e, t, r) {
|
|
6243
6256
|
const a = document.createElement("div");
|
|
6244
6257
|
a.id = "nm", document.body.appendChild(a);
|
|
6245
|
-
const s =
|
|
6246
|
-
|
|
6258
|
+
const s = pn(a), i = we(
|
|
6259
|
+
Qn,
|
|
6247
6260
|
{ i18n: I },
|
|
6248
|
-
we(
|
|
6261
|
+
we(rr, {
|
|
6249
6262
|
form: e,
|
|
6250
6263
|
onDismiss: async (o) => {
|
|
6251
6264
|
await t(), s.unmount(), a.remove(), this.logger.info("Form dismissed", o);
|
|
@@ -6263,16 +6276,20 @@ class _s {
|
|
|
6263
6276
|
const r = await Y.post(`/external/forms/${e.slug}`, t, {
|
|
6264
6277
|
headers: this.headers
|
|
6265
6278
|
});
|
|
6266
|
-
|
|
6279
|
+
if (!r.ok && this.config.onFormError) {
|
|
6280
|
+
const a = new _e("SUBMISSION_ERROR", r.error?.message);
|
|
6281
|
+
this.config.onFormError(a);
|
|
6282
|
+
} else
|
|
6283
|
+
this.logger.info("Form response posted", r.data);
|
|
6267
6284
|
}
|
|
6268
6285
|
}
|
|
6269
|
-
class
|
|
6286
|
+
class Bs {
|
|
6270
6287
|
logger;
|
|
6271
6288
|
headers;
|
|
6272
6289
|
formManager;
|
|
6273
6290
|
deliveries = [];
|
|
6274
6291
|
constructor(e, t, r) {
|
|
6275
|
-
this.logger = e, this.headers = t, this.formManager = new
|
|
6292
|
+
this.logger = e, this.headers = t, this.formManager = new Ms(e, t, r);
|
|
6276
6293
|
}
|
|
6277
6294
|
async loadDeliveries() {
|
|
6278
6295
|
try {
|
|
@@ -6387,7 +6404,7 @@ class Ms {
|
|
|
6387
6404
|
}
|
|
6388
6405
|
}
|
|
6389
6406
|
}
|
|
6390
|
-
class
|
|
6407
|
+
class zs {
|
|
6391
6408
|
logger;
|
|
6392
6409
|
headers;
|
|
6393
6410
|
sessionId;
|
|
@@ -6553,11 +6570,12 @@ class Bs {
|
|
|
6553
6570
|
await Y.post("/external/trackings/batch", e, { headers: this.headers });
|
|
6554
6571
|
}
|
|
6555
6572
|
}
|
|
6556
|
-
class
|
|
6573
|
+
class Ye {
|
|
6557
6574
|
clientKey;
|
|
6558
6575
|
userIdentifier;
|
|
6559
6576
|
initialized = !1;
|
|
6560
|
-
|
|
6577
|
+
lastInitError = null;
|
|
6578
|
+
clientLogger = on.child("client");
|
|
6561
6579
|
headers = {};
|
|
6562
6580
|
formConfig;
|
|
6563
6581
|
constructor(e) {
|
|
@@ -6576,8 +6594,8 @@ class Ge {
|
|
|
6576
6594
|
deactivate: s = !1,
|
|
6577
6595
|
trackUrlParamChanges: i
|
|
6578
6596
|
}) {
|
|
6579
|
-
if (s)
|
|
6580
|
-
return this.clientLogger.info("Nemme client deactivated and will stop initialization."), this.initialized = !0, this.clientLogger.configure({ enabled: !1 }), this;
|
|
6597
|
+
if (this.initialized = !1, this.lastInitError = null, this.trackingManager?.destroy(), this.trackingManager = void 0, s)
|
|
6598
|
+
return this.clientLogger.info("Nemme client deactivated and will stop initialization."), this.initialized = !0, this.lastInitError = null, this.clientLogger.configure({ enabled: !1 }), this;
|
|
6581
6599
|
if (!e) throw new Error("userIdentifier is required parameter");
|
|
6582
6600
|
this.userIdentifier = e, this.clientLogger.configure({
|
|
6583
6601
|
enabled: t,
|
|
@@ -6588,12 +6606,12 @@ class Ge {
|
|
|
6588
6606
|
}, this.formConfig = a;
|
|
6589
6607
|
try {
|
|
6590
6608
|
const o = await this.initializeSession();
|
|
6591
|
-
await this.initializeManagers(o, r, i), this.initialized = !0, this.clientLogger.info("Nemme client initialized", {
|
|
6609
|
+
await this.initializeManagers(o, r, i), this.initialized = !0, this.lastInitError = null, this.clientLogger.info("Nemme client initialized", {
|
|
6592
6610
|
clientKey: this.clientKey,
|
|
6593
6611
|
userIdentifier: this.userIdentifier
|
|
6594
6612
|
});
|
|
6595
6613
|
} catch (o) {
|
|
6596
|
-
this.clientLogger.error("Error during initialization:", o);
|
|
6614
|
+
this.clientLogger.error("Error during initialization:", o), this.initialized = !1, this.lastInitError = o instanceof Error ? o : new Error("Error during initialization");
|
|
6597
6615
|
}
|
|
6598
6616
|
return this;
|
|
6599
6617
|
}
|
|
@@ -6625,7 +6643,7 @@ class Ge {
|
|
|
6625
6643
|
}
|
|
6626
6644
|
}
|
|
6627
6645
|
async initializeManagers(e, t, r) {
|
|
6628
|
-
const a = new
|
|
6646
|
+
const a = new Bs(this.clientLogger, this.headers, this.formConfig), s = new zs({
|
|
6629
6647
|
logger: this.clientLogger,
|
|
6630
6648
|
headers: this.headers,
|
|
6631
6649
|
sessionId: e.sessionId,
|
|
@@ -6642,18 +6660,18 @@ class Ge {
|
|
|
6642
6660
|
await a.loadDeliveries(), typeof window < "u" && (await s.setupPageViewTracking(), await s.trackPageView(), await s.flush()), this.trackingManager = s;
|
|
6643
6661
|
}
|
|
6644
6662
|
}
|
|
6645
|
-
const
|
|
6663
|
+
const ln = (n) => new Ye(n), cn = ye(void 0), Ws = ({ clientKey: n, config: e, children: t }) => {
|
|
6646
6664
|
const [r, a] = pe(null), [s, i] = pe(!1), [o, l] = pe(null);
|
|
6647
6665
|
Rt(() => {
|
|
6648
6666
|
let d = null, u = !1;
|
|
6649
6667
|
const f = async () => {
|
|
6650
6668
|
try {
|
|
6651
|
-
const p = new
|
|
6669
|
+
const p = new Ye(n);
|
|
6652
6670
|
if (await p.init(e), u) {
|
|
6653
6671
|
p.destroy();
|
|
6654
6672
|
return;
|
|
6655
6673
|
}
|
|
6656
|
-
d = p, a(p), i(
|
|
6674
|
+
d = p, a(p), i(p.initialized), l(p.lastInitError ? p.lastInitError.message : null);
|
|
6657
6675
|
} catch (p) {
|
|
6658
6676
|
u || (l(p instanceof Error ? p.message : "Failed to initialize Nemme client"), i(!1));
|
|
6659
6677
|
}
|
|
@@ -6669,14 +6687,14 @@ const on = (n) => new Ge(n), ln = ye(void 0), Zs = ({ clientKey: n, config: e, c
|
|
|
6669
6687
|
isInitialized: s,
|
|
6670
6688
|
error: o
|
|
6671
6689
|
};
|
|
6672
|
-
return /* @__PURE__ */ S.jsx(
|
|
6673
|
-
},
|
|
6674
|
-
const n =
|
|
6690
|
+
return /* @__PURE__ */ S.jsx(cn.Provider, { value: c, children: t });
|
|
6691
|
+
}, Us = () => {
|
|
6692
|
+
const n = He(cn);
|
|
6675
6693
|
if (n === void 0)
|
|
6676
6694
|
throw new Error("useNemmeContext must be used within a NemmeProvider");
|
|
6677
6695
|
return n;
|
|
6678
|
-
},
|
|
6679
|
-
const { client: n, isInitialized: e, error: t } =
|
|
6696
|
+
}, Gs = () => {
|
|
6697
|
+
const { client: n, isInitialized: e, error: t } = Us(), r = q(
|
|
6680
6698
|
async (s) => {
|
|
6681
6699
|
if (!n || !e) {
|
|
6682
6700
|
console.warn("Nemme client not initialized");
|
|
@@ -6699,20 +6717,20 @@ const on = (n) => new Ge(n), ln = ye(void 0), Zs = ({ clientKey: n, config: e, c
|
|
|
6699
6717
|
error: t,
|
|
6700
6718
|
client: n
|
|
6701
6719
|
};
|
|
6702
|
-
},
|
|
6720
|
+
}, Vs = (n) => ln(n), Hs = async (n) => {
|
|
6703
6721
|
const { clientKey: e, ...t } = n;
|
|
6704
|
-
return await
|
|
6705
|
-
},
|
|
6706
|
-
NemmeClient:
|
|
6707
|
-
init:
|
|
6722
|
+
return await ln(e).init(t);
|
|
6723
|
+
}, Ks = Object.assign((n) => Vs(n), {
|
|
6724
|
+
NemmeClient: Ye,
|
|
6725
|
+
init: Hs
|
|
6708
6726
|
});
|
|
6709
|
-
typeof window < "u" && (window.NemmeSDK =
|
|
6727
|
+
typeof window < "u" && (window.NemmeSDK = Ks);
|
|
6710
6728
|
export {
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6729
|
+
Ye as NemmeClient,
|
|
6730
|
+
Ws as NemmeProvider,
|
|
6731
|
+
Ks as NemmeSDK,
|
|
6732
|
+
Ks as default,
|
|
6733
|
+
Gs as useNemme,
|
|
6734
|
+
Us as useNemmeContext
|
|
6717
6735
|
};
|
|
6718
6736
|
//# sourceMappingURL=index.esm.js.map
|