@nizza/core 0.5.0-beta.11 → 0.5.0-beta.13

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/index.mjs CHANGED
@@ -1,1129 +1,6 @@
1
- var Qt = Object.defineProperty;
2
- var Gt = (n, e, t) => e in n ? Qt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var R = (n, e, t) => (Gt(n, typeof e != "symbol" ? e + "" : e, t), t);
4
- import * as M from "react";
5
- import pe, { createContext as gt, useReducer as Kt, useEffect as kt, useDebugValue as Wt, useCallback as Jt, useContext as Oe, useMemo as qt } from "react";
6
- import { jsx as Ht } from "react/jsx-runtime";
7
- var _ = { NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
8
- let Zt = 0;
9
- function Xt(n, e) {
10
- const t = `atom${++Zt}`, i = {
11
- toString: () => t
12
- };
13
- return typeof n == "function" ? i.read = n : (i.init = n, i.read = function(a) {
14
- return a(this);
15
- }, i.write = function(a, s, r) {
16
- return s(
17
- this,
18
- typeof r == "function" ? r(a(this)) : r
19
- );
20
- }), e && (i.write = e), i;
21
- }
22
- const Se = (n) => "init" in n, ye = (n) => !!n.write, oe = /* @__PURE__ */ new WeakMap(), Yt = (n, e) => {
23
- oe.set(n, e), n.catch(() => {
24
- }).finally(() => oe.delete(n));
25
- }, _e = (n, e) => {
26
- const t = oe.get(n);
27
- t && (oe.delete(n), t(e));
28
- }, Ue = (n, e) => {
29
- n.status = "fulfilled", n.value = e;
30
- }, Me = (n, e) => {
31
- n.status = "rejected", n.reason = e;
32
- }, en = (n) => typeof (n == null ? void 0 : n.then) == "function", J = (n, e) => !!n && "v" in n && "v" in e && Object.is(n.v, e.v), $e = (n, e) => !!n && "e" in n && "e" in e && Object.is(n.e, e.e), z = (n) => !!n && "v" in n && n.v instanceof Promise, tn = (n, e) => "v" in n && "v" in e && n.v.orig && n.v.orig === e.v.orig, ie = (n) => {
33
- if ("e" in n)
34
- throw n.e;
35
- return n.v;
36
- }, vt = () => {
37
- const n = /* @__PURE__ */ new WeakMap(), e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new Map();
38
- let i, a;
39
- (_ ? "production" : void 0) !== "production" && (i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set());
40
- const s = (m) => n.get(m), r = (m, p) => {
41
- (_ ? "production" : void 0) !== "production" && Object.freeze(p);
42
- const h = n.get(m);
43
- if (n.set(m, p), t.has(m) || t.set(m, h), z(h)) {
44
- const g = "v" in p ? p.v instanceof Promise ? p.v : Promise.resolve(p.v) : Promise.reject(p.e);
45
- h.v !== g && _e(h.v, g);
46
- }
47
- }, o = (m, p, h) => {
48
- const g = /* @__PURE__ */ new Map();
49
- let b = !1;
50
- h.forEach((C, v) => {
51
- !C && v === m && (C = p), C ? (g.set(v, C), p.d.get(v) !== C && (b = !0)) : (_ ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
52
- }), (b || p.d.size !== g.size) && (p.d = g);
53
- }, l = (m, p, h) => {
54
- const g = s(m), b = {
55
- d: (g == null ? void 0 : g.d) || /* @__PURE__ */ new Map(),
56
- v: p
57
- };
58
- if (h && o(m, b, h), J(g, b) && g.d === b.d)
59
- return g;
60
- if (z(g) && z(b) && tn(g, b)) {
61
- if (g.d === b.d)
62
- return g;
63
- b.v = g.v;
64
- }
65
- return r(m, b), b;
66
- }, u = (m, p, h, g) => {
67
- if (en(p)) {
68
- let b;
69
- const C = () => {
70
- const E = s(m);
71
- if (!z(E) || E.v !== v)
72
- return;
73
- const P = l(
74
- m,
75
- v,
76
- h
77
- );
78
- e.has(m) && E.d !== P.d && D(m, P, E.d);
79
- }, v = new Promise((E, P) => {
80
- let x = !1;
81
- p.then(
82
- (T) => {
83
- x || (x = !0, Ue(v, T), E(T), C());
84
- },
85
- (T) => {
86
- x || (x = !0, Me(v, T), P(T), C());
87
- }
88
- ), b = (T) => {
89
- x || (x = !0, T.then(
90
- (V) => Ue(v, V),
91
- (V) => Me(v, V)
92
- ), E(T));
93
- };
94
- });
95
- return v.orig = p, v.status = "pending", Yt(v, (E) => {
96
- E && b(E), g == null || g();
97
- }), l(m, v, h);
98
- }
99
- return l(m, p, h);
100
- }, d = (m, p, h) => {
101
- const g = s(m), b = {
102
- d: (g == null ? void 0 : g.d) || /* @__PURE__ */ new Map(),
103
- e: p
104
- };
105
- return h && o(m, b, h), $e(g, b) && g.d === b.d ? g : (r(m, b), b);
106
- }, f = (m, p) => {
107
- const h = s(m);
108
- if (!p && h && (e.has(m) || Array.from(h.d).every(([x, T]) => {
109
- if (x === m)
110
- return !0;
111
- const V = f(x);
112
- return V === T || J(V, T);
113
- })))
114
- return h;
115
- const g = /* @__PURE__ */ new Map();
116
- let b = !0;
117
- const C = (x) => {
118
- if (x === m) {
119
- const V = s(x);
120
- if (V)
121
- return g.set(x, V), ie(V);
122
- if (Se(x))
123
- return g.set(x, void 0), x.init;
124
- throw new Error("no atom init");
125
- }
126
- const T = f(x);
127
- return g.set(x, T), ie(T);
128
- };
129
- let v, E;
130
- const P = {
131
- get signal() {
132
- return v || (v = new AbortController()), v.signal;
133
- },
134
- get setSelf() {
135
- return (_ ? "production" : void 0) !== "production" && !ye(m) && console.warn("setSelf function cannot be used with read-only atom"), !E && ye(m) && (E = (...x) => {
136
- if ((_ ? "production" : void 0) !== "production" && b && console.warn("setSelf function cannot be called in sync"), !b)
137
- return F(m, ...x);
138
- }), E;
139
- }
140
- };
141
- try {
142
- const x = m.read(C, P);
143
- return u(
144
- m,
145
- x,
146
- g,
147
- () => v == null ? void 0 : v.abort()
148
- );
149
- } catch (x) {
150
- return d(m, x, g);
151
- } finally {
152
- b = !1;
153
- }
154
- }, c = (m) => ie(f(m)), S = (m) => {
155
- let p = e.get(m);
156
- return p || (p = I(m)), p;
157
- }, y = (m, p) => !p.l.size && (!p.t.size || p.t.size === 1 && p.t.has(m)), k = (m) => {
158
- const p = e.get(m);
159
- p && y(m, p) && w(m);
160
- }, N = (m) => {
161
- const p = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new WeakMap(), g = (v) => {
162
- var E;
163
- const P = new Set((E = e.get(v)) == null ? void 0 : E.t);
164
- return t.forEach((x, T) => {
165
- var V;
166
- (V = s(T)) != null && V.d.has(v) && P.add(T);
167
- }), P;
168
- }, b = (v) => {
169
- g(v).forEach((E) => {
170
- E !== v && (p.set(
171
- E,
172
- (p.get(E) || /* @__PURE__ */ new Set()).add(v)
173
- ), h.set(E, (h.get(E) || 0) + 1), b(E));
174
- });
175
- };
176
- b(m);
177
- const C = (v) => {
178
- g(v).forEach((E) => {
179
- var P;
180
- if (E !== v) {
181
- let x = h.get(E);
182
- if (x && h.set(E, --x), !x) {
183
- let T = !!((P = p.get(E)) != null && P.size);
184
- if (T) {
185
- const V = s(E), ne = f(E, !0);
186
- T = !J(V, ne);
187
- }
188
- T || p.forEach((V) => V.delete(E));
189
- }
190
- C(E);
191
- }
192
- });
193
- };
194
- C(m);
195
- }, O = (m, ...p) => {
196
- let h = !0;
197
- const g = (v) => ie(f(v)), b = (v, ...E) => {
198
- let P;
199
- if (v === m) {
200
- if (!Se(v))
201
- throw new Error("atom not writable");
202
- const x = s(v), T = u(v, E[0]);
203
- J(x, T) || N(v);
204
- } else
205
- P = O(v, ...E);
206
- if (!h) {
207
- const x = L();
208
- (_ ? "production" : void 0) !== "production" && i.forEach(
209
- (T) => T({ type: "async-write", flushed: x })
210
- );
211
- }
212
- return P;
213
- }, C = m.write(g, b, ...p);
214
- return h = !1, C;
215
- }, F = (m, ...p) => {
216
- const h = O(m, ...p), g = L();
217
- return (_ ? "production" : void 0) !== "production" && i.forEach(
218
- (b) => b({ type: "write", flushed: g })
219
- ), h;
220
- }, I = (m, p, h) => {
221
- var g;
222
- const b = h || [];
223
- (g = s(m)) == null || g.d.forEach((v, E) => {
224
- const P = e.get(E);
225
- P ? P.t.add(m) : E !== m && I(E, m, b);
226
- }), f(m);
227
- const C = {
228
- t: new Set(p && [p]),
229
- l: /* @__PURE__ */ new Set()
230
- };
231
- if (e.set(m, C), (_ ? "production" : void 0) !== "production" && a.add(m), ye(m) && m.onMount) {
232
- const { onMount: v } = m;
233
- b.push(() => {
234
- const E = v((...P) => F(m, ...P));
235
- E && (C.u = E);
236
- });
237
- }
238
- return h || b.forEach((v) => v()), C;
239
- }, w = (m) => {
240
- var p;
241
- const h = (p = e.get(m)) == null ? void 0 : p.u;
242
- h && h(), e.delete(m), (_ ? "production" : void 0) !== "production" && a.delete(m);
243
- const g = s(m);
244
- g ? (z(g) && _e(g.v), g.d.forEach((b, C) => {
245
- if (C !== m) {
246
- const v = e.get(C);
247
- v && (v.t.delete(m), y(C, v) && w(C));
248
- }
249
- })) : (_ ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", m);
250
- }, D = (m, p, h) => {
251
- const g = new Set(p.d.keys());
252
- h == null || h.forEach((b, C) => {
253
- if (g.has(C)) {
254
- g.delete(C);
255
- return;
256
- }
257
- const v = e.get(C);
258
- v && (v.t.delete(m), y(C, v) && w(C));
259
- }), g.forEach((b) => {
260
- const C = e.get(b);
261
- C ? C.t.add(m) : e.has(m) && I(b, m);
262
- });
263
- }, L = () => {
264
- let m;
265
- for ((_ ? "production" : void 0) !== "production" && (m = /* @__PURE__ */ new Set()); t.size; ) {
266
- const p = Array.from(t);
267
- t.clear(), p.forEach(([h, g]) => {
268
- const b = s(h);
269
- if (b) {
270
- const C = e.get(h);
271
- C && b.d !== (g == null ? void 0 : g.d) && D(h, b, g == null ? void 0 : g.d), C && !// TODO This seems pretty hacky. Hope to fix it.
272
- // Maybe we could `mountDependencies` in `setAtomState`?
273
- (!z(g) && (J(g, b) || $e(g, b))) && (C.l.forEach((v) => v()), (_ ? "production" : void 0) !== "production" && m.add(h));
274
- } else
275
- (_ ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
276
- });
277
- }
278
- if ((_ ? "production" : void 0) !== "production")
279
- return m;
280
- }, A = (m, p) => {
281
- const h = S(m), g = L(), b = h.l;
282
- return b.add(p), (_ ? "production" : void 0) !== "production" && i.forEach(
283
- (C) => C({ type: "sub", flushed: g })
284
- ), () => {
285
- b.delete(p), k(m), (_ ? "production" : void 0) !== "production" && i.forEach((C) => C({ type: "unsub" }));
286
- };
287
- };
288
- return (_ ? "production" : void 0) !== "production" ? {
289
- get: c,
290
- set: F,
291
- sub: A,
292
- // store dev methods (these are tentative and subject to change without notice)
293
- dev_subscribe_store: (m, p) => {
294
- if (p !== 2)
295
- throw new Error("The current StoreListener revision is 2.");
296
- return i.add(m), () => {
297
- i.delete(m);
298
- };
299
- },
300
- dev_get_mounted_atoms: () => a.values(),
301
- dev_get_atom_state: (m) => n.get(m),
302
- dev_get_mounted: (m) => e.get(m),
303
- dev_restore_atoms: (m) => {
304
- for (const [h, g] of m)
305
- Se(h) && (u(h, g), N(h));
306
- const p = L();
307
- i.forEach(
308
- (h) => h({ type: "restore", flushed: p })
309
- );
310
- }
311
- } : {
312
- get: c,
313
- set: F,
314
- sub: A
315
- };
316
- };
317
- let Ne;
318
- (_ ? "production" : void 0) !== "production" && (typeof globalThis.__NUMBER_OF_JOTAI_INSTANCES__ == "number" ? ++globalThis.__NUMBER_OF_JOTAI_INSTANCES__ : globalThis.__NUMBER_OF_JOTAI_INSTANCES__ = 1);
319
- const nn = () => (Ne || ((_ ? "production" : void 0) !== "production" && globalThis.__NUMBER_OF_JOTAI_INSTANCES__ !== 1 && console.warn(
320
- "Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"
321
- ), Ne = vt()), Ne);
322
- var an = { NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
323
- const sn = gt(void 0), St = (n) => {
324
- const e = Oe(sn);
325
- return (n == null ? void 0 : n.store) || e || nn();
326
- }, rn = (n) => typeof (n == null ? void 0 : n.then) == "function", on = pe.use || ((n) => {
327
- if (n.status === "pending")
328
- throw n;
329
- if (n.status === "fulfilled")
330
- return n.value;
331
- throw n.status === "rejected" ? n.reason : (n.status = "pending", n.then(
332
- (e) => {
333
- n.status = "fulfilled", n.value = e;
334
- },
335
- (e) => {
336
- n.status = "rejected", n.reason = e;
337
- }
338
- ), n);
339
- });
340
- function ln(n, e) {
341
- const t = St(e), [[i, a, s], r] = Kt(
342
- (u) => {
343
- const d = t.get(n);
344
- return Object.is(u[0], d) && u[1] === t && u[2] === n ? u : [d, t, n];
345
- },
346
- void 0,
347
- () => [t.get(n), t, n]
348
- );
349
- let o = i;
350
- (a !== t || s !== n) && (r(), o = t.get(n));
351
- const l = e == null ? void 0 : e.delay;
352
- return kt(() => {
353
- const u = t.sub(n, () => {
354
- if (typeof l == "number") {
355
- setTimeout(r, l);
356
- return;
357
- }
358
- r();
359
- });
360
- return r(), u;
361
- }, [t, n, l]), Wt(o), rn(o) ? on(o) : o;
362
- }
363
- function dn(n, e) {
364
- const t = St(e);
365
- return Jt(
366
- (...a) => {
367
- if ((an ? "production" : void 0) !== "production" && !("write" in n))
368
- throw new Error("not writable atom");
369
- return t.set(n, ...a);
370
- },
371
- [t, n]
372
- );
373
- }
374
- function un(n, e) {
375
- return [
376
- ln(n, e),
377
- // We do wrong type assertion here, which results in throwing an error.
378
- dn(n, e)
379
- ];
380
- }
381
- const Re = Xt(null);
382
- Re.debugLabel = "accountAtom";
383
- var cn = { NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
384
- const {
385
- NZ_AWS_REGION: mn,
386
- NZ_BACKOFFICE_BACK_URL: fn,
387
- NZ_CORE_SERVICES_GRAPHQL_URL: pn,
388
- NZ_CORE_SERVICES_REST_URL: hn
389
- } = cn, gn = {
390
- AWS: {
391
- region: mn,
392
- cognito: {
393
- userPoolId: "us-east-1_knSlGEmJ0",
394
- userPoolWebClientId: "3hmbfhf7nl3kq20qr9i5lihf1p"
395
- }
396
- },
397
- // Back services
398
- apiUrls: {
399
- restV1: fn || "https://pabprg32bj.execute-api.us-east-1.amazonaws.com",
400
- restV2: hn || "https://core-services-dev.nizza.com/api",
401
- graphql: pn || "https://core-services-dev.nizza.com/graphql",
402
- corsProxy: "https://1qmd8jteh1.execute-api.us-east-1.amazonaws.com"
403
- },
404
- publicUrls: {
405
- // Public app url
406
- platformSite: "https://platformdev.nizza.com",
407
- // Nizza CDN
408
- nizzaCdn: "https://cdn.nizza.com",
409
- // Bundle
410
- bundleSite: "https://bundledev.nizza.com",
411
- // WSS IVS CHAT
412
- wssIVSChat: "wss://edge.ivschat.us-east-1.amazonaws.com"
413
- }
414
- };
415
- async function yt(n) {
416
- const {
417
- url: e,
418
- method: t = "GET",
419
- body: i,
420
- raw: a = !1,
421
- contentTypeJson: s = !0,
422
- timeout: r,
423
- ...o
424
- } = n, l = s && !n.headers ? new Headers({
425
- "content-type": "application/json"
426
- }) : n.headers;
427
- try {
428
- const u = new AbortController(), { signal: d } = u;
429
- let f;
430
- const c = fetch(e, {
431
- method: t,
432
- headers: l,
433
- body: i,
434
- signal: d,
435
- ...o
436
- });
437
- r && (f = setTimeout(() => {
438
- u.abort();
439
- }, r));
440
- const S = await c;
441
- if (a)
442
- return S;
443
- const y = await S.json();
444
- if (clearTimeout(f), !S.ok) {
445
- const k = y ? JSON.stringify(y) : S.statusText;
446
- throw new Error(k);
447
- }
448
- return y;
449
- } catch (u) {
450
- throw console.error("[CustomFetch] ", u), u;
451
- }
452
- }
453
- const Is = (n) => yt({ ...n, contentTypeJson: !1, raw: !1 });
454
- function Ds(n, e, t) {
455
- fetch(e).then((i) => i.blob()).then((i) => kn(i, `${n}.${t}`));
456
- }
457
- const kn = (n, e, t) => {
458
- const i = [n], a = new Blob(i, {
459
- type: t != null ? t : "application/octet-stream"
460
- });
461
- if (typeof window.navigator.msSaveBlob != "undefined")
462
- return window.navigator.msSaveBlob(a, e);
463
- const s = window.URL && window.URL.createObjectURL ? window.URL.createObjectURL(a) : window.webkitURL.createObjectURL(a), r = document.createElement("a");
464
- return r.style.display = "none", r.href = s, r.setAttribute("download", e), typeof r.download == "undefined" && r.setAttribute("target", "_blank"), document.body.appendChild(r), r.click(), setTimeout(() => {
465
- document.body.removeChild(r), window.URL.revokeObjectURL(s);
466
- }, 200);
467
- };
468
- var vn = { NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
469
- const je = (n) => {
470
- let e;
471
- const t = /* @__PURE__ */ new Set(), i = (l, u) => {
472
- const d = typeof l == "function" ? l(e) : l;
473
- if (!Object.is(d, e)) {
474
- const f = e;
475
- e = (u != null ? u : typeof d != "object" || d === null) ? d : Object.assign({}, e, d), t.forEach((c) => c(e, f));
476
- }
477
- }, a = () => e, o = { setState: i, getState: a, subscribe: (l) => (t.add(l), () => t.delete(l)), destroy: () => {
478
- (vn ? "production" : void 0) !== "production" && console.warn(
479
- "[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
480
- ), t.clear();
481
- } };
482
- return e = n(i, a, o), o;
483
- }, Sn = (n) => n ? je(n) : je;
484
- var Nt = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
485
- function Te(n) {
486
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
487
- }
488
- var bt = { exports: {} }, Ft = {}, wt = { exports: {} }, Ct = {};
489
- /**
490
- * @license React
491
- * use-sync-external-store-shim.production.min.js
492
- *
493
- * Copyright (c) Facebook, Inc. and its affiliates.
494
- *
495
- * This source code is licensed under the MIT license found in the
496
- * LICENSE file in the root directory of this source tree.
497
- */
498
- var W = pe;
499
- function yn(n, e) {
500
- return n === e && (n !== 0 || 1 / n === 1 / e) || n !== n && e !== e;
501
- }
502
- var Nn = typeof Object.is == "function" ? Object.is : yn, bn = W.useState, Fn = W.useEffect, wn = W.useLayoutEffect, Cn = W.useDebugValue;
503
- function En(n, e) {
504
- var t = e(), i = bn({ inst: { value: t, getSnapshot: e } }), a = i[0].inst, s = i[1];
505
- return wn(function() {
506
- a.value = t, a.getSnapshot = e, be(a) && s({ inst: a });
507
- }, [n, t, e]), Fn(function() {
508
- return be(a) && s({ inst: a }), n(function() {
509
- be(a) && s({ inst: a });
510
- });
511
- }, [n]), Cn(t), t;
512
- }
513
- function be(n) {
514
- var e = n.getSnapshot;
515
- n = n.value;
516
- try {
517
- var t = e();
518
- return !Nn(n, t);
519
- } catch {
520
- return !0;
521
- }
522
- }
523
- function xn(n, e) {
524
- return e();
525
- }
526
- var On = typeof window == "undefined" || typeof window.document == "undefined" || typeof window.document.createElement == "undefined" ? xn : En;
527
- Ct.useSyncExternalStore = W.useSyncExternalStore !== void 0 ? W.useSyncExternalStore : On;
528
- wt.exports = Ct;
529
- var Et = wt.exports;
530
- /**
531
- * @license React
532
- * use-sync-external-store-shim/with-selector.production.min.js
533
- *
534
- * Copyright (c) Facebook, Inc. and its affiliates.
535
- *
536
- * This source code is licensed under the MIT license found in the
537
- * LICENSE file in the root directory of this source tree.
538
- */
539
- var he = pe, Rn = Et;
540
- function Tn(n, e) {
541
- return n === e && (n !== 0 || 1 / n === 1 / e) || n !== n && e !== e;
542
- }
543
- var In = typeof Object.is == "function" ? Object.is : Tn, Dn = Rn.useSyncExternalStore, Ln = he.useRef, An = he.useEffect, Pn = he.useMemo, Vn = he.useDebugValue;
544
- Ft.useSyncExternalStoreWithSelector = function(n, e, t, i, a) {
545
- var s = Ln(null);
546
- if (s.current === null) {
547
- var r = { hasValue: !1, value: null };
548
- s.current = r;
549
- } else
550
- r = s.current;
551
- s = Pn(function() {
552
- function l(S) {
553
- if (!u) {
554
- if (u = !0, d = S, S = i(S), a !== void 0 && r.hasValue) {
555
- var y = r.value;
556
- if (a(y, S))
557
- return f = y;
558
- }
559
- return f = S;
560
- }
561
- if (y = f, In(d, S))
562
- return y;
563
- var k = i(S);
564
- return a !== void 0 && a(y, k) ? y : (d = S, f = k);
565
- }
566
- var u = !1, d, f, c = t === void 0 ? null : t;
567
- return [function() {
568
- return l(e());
569
- }, c === null ? void 0 : function() {
570
- return l(c());
571
- }];
572
- }, [e, t, i, a]);
573
- var o = Dn(n, s[0], s[1]);
574
- return An(function() {
575
- r.hasValue = !0, r.value = o;
576
- }, [o]), Vn(o), o;
577
- };
578
- bt.exports = Ft;
579
- var _n = bt.exports;
580
- const Un = /* @__PURE__ */ Te(_n);
581
- var xt = { NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
582
- const { useDebugValue: Mn } = pe, { useSyncExternalStoreWithSelector: $n } = Un;
583
- let ze = !1;
584
- function jn(n, e = n.getState, t) {
585
- (xt ? "production" : void 0) !== "production" && t && !ze && (console.warn(
586
- "[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
587
- ), ze = !0);
588
- const i = $n(
589
- n.subscribe,
590
- n.getState,
591
- n.getServerState || n.getState,
592
- e,
593
- t
594
- );
595
- return Mn(i), i;
596
- }
597
- const Be = (n) => {
598
- (xt ? "production" : void 0) !== "production" && typeof n != "function" && console.warn(
599
- "[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
600
- );
601
- const e = typeof n == "function" ? Sn(n) : n, t = (i, a) => jn(e, i, a);
602
- return Object.assign(t, e), t;
603
- }, zn = (n) => n ? Be(n) : Be;
604
- class Bn {
605
- constructor(e) {
606
- R(this, "channel");
607
- R(this, "listeners", /* @__PURE__ */ new Map());
608
- R(this, "eventQueue", /* @__PURE__ */ new Map());
609
- try {
610
- this.channel = new BroadcastChannel(e), this.channel.onmessage = (t) => this.handleMessage(t), this.channel.onmessageerror = (t) => X.error("NizzaBroadcastChannel:", t);
611
- } catch (t) {
612
- throw X.error("Failed to create NizzaBroadcastChannel:", t), t;
613
- }
614
- }
615
- /**
616
- * Subscribe a listener function to a specific event with wildcards.
617
- *
618
- * @param {string} event - The event name to subscribe to. You can use wildcards like 'user:*' or 'chat:**'.
619
- * @param {EventBusListener} listener - The listener function to handle the event.
620
- * @returns {EventBusSubscription} - A subscription object that includes the event name and the `off()` function for unsubscribing.
621
- * @example
622
- * const subscription = eventBus.on('user:*', (event) => {
623
- * console.log('User event:', event.name);
624
- * });
625
- * const chatSubscription = eventBus.on('chat:**', (event) => {
626
- * console.log('Chat event:', event.name);
627
- * });
628
- */
629
- on(e, t) {
630
- return this.subscribeToEvent(e, t), {
631
- off: () => this.unsubscribeFromEvent(e, t)
632
- };
633
- }
634
- /**
635
- * Emit an event through the BroadcastChannel.
636
- *
637
- * @param {string} event - The event name to emit.
638
- * @param {any} data - The data associated with the event.
639
- * @param {Attributes} attrs - Optional attributes associated with the event.
640
- * @example
641
- * // Emit a user login event
642
- * eventBus.emit('user:login', { username: 'user123' });
643
- *
644
- * // Emit a chat message event
645
- * eventBus.emit('chat:message', { text: 'Hello, world!' });
646
- */
647
- emit(e, t, i = {}) {
648
- this.emitEvent(e, t, i);
649
- }
650
- /**
651
- * Handle messages received through the BroadcastChannel and call the corresponding listener functions.
652
- *
653
- * @private
654
- * @param {MessageEvent} event - The received message event.
655
- */
656
- handleMessage(e) {
657
- const t = e.data, { name: i } = t;
658
- for (const [a, s] of this.listeners.entries())
659
- this.matchWildcard(a, i) && s.forEach(
660
- (r) => r({ ...t, wildcard: a })
661
- );
662
- }
663
- /**
664
- * Subscribe a listener function to a specific event.
665
- *
666
- * @private
667
- * @param {string} event - The event name to subscribe to.
668
- * @param {EventBusListener} listener - The listener function to handle the event.
669
- */
670
- subscribeToEvent(e, t) {
671
- if (typeof e != "string" || typeof t != "function") {
672
- const i = new Error("Invalid arguments");
673
- throw X.error(i), i;
674
- }
675
- for (const [i, a] of this.listeners.entries())
676
- if (this.matchWildcard(i, e)) {
677
- a.add(t);
678
- const s = this.eventQueue.get(i);
679
- s && (s.forEach((r) => {
680
- t({ ...r, wildcard: i });
681
- }), this.eventQueue.delete(i));
682
- return;
683
- }
684
- this.listeners.set(e, /* @__PURE__ */ new Set([t]));
685
- }
686
- /**
687
- * Emit an event and deliver it to the corresponding listeners.
688
- *
689
- * @private
690
- * @param {string} event - The event name to emit.
691
- * @param {any} data - The data associated with the event.
692
- * @param {Attributes} attrs - Optional attributes associated with the event.
693
- */
694
- emitEvent(e, t, i) {
695
- if (typeof e != "string") {
696
- const r = new Error("Invalid arguments");
697
- throw X.error(r), r;
698
- }
699
- const a = {
700
- name: e,
701
- data: t,
702
- attrs: i
703
- }, s = Array.from(this.getMatchingListeners(e));
704
- if (s.length)
705
- for (const [r, o] of s)
706
- o({ ...a, wildcard: r });
707
- else
708
- this.eventQueue.has(e) || this.eventQueue.set(e, []), this.eventQueue.get(e).push(a);
709
- this.channel.postMessage(a);
710
- }
711
- /**
712
- * Get listeners that match the event name pattern.
713
- *
714
- * @private
715
- * @param {string} event - The event name to match.
716
- * @returns {Iterable<[string, EventBusListener]>} - Iterable of matching listeners and their patterns.
717
- */
718
- *getMatchingListeners(e) {
719
- for (const [t, i] of this.listeners.entries())
720
- if (this.matchWildcard(t, e))
721
- for (const a of i)
722
- yield [t, a];
723
- }
724
- /**
725
- * Unsubscribe a listener function from a specific event.
726
- *
727
- * @private
728
- * @param {string} event - The event name to unsubscribe from.
729
- * @param {EventBusListener} listener - The listener function to unsubscribe.
730
- */
731
- unsubscribeFromEvent(e, t) {
732
- if (this.listeners.has(e)) {
733
- const i = this.listeners.get(e);
734
- i.delete(t), i.size === 0 && this.listeners.delete(e);
735
- }
736
- }
737
- /**
738
- * Match wildcards in event names.
739
- *
740
- * @private
741
- * @param {string} pattern - The wildcard pattern to match.
742
- * @param {string} eventName - The event name to check.
743
- * @returns {boolean} - `true` if the event name matches the pattern, otherwise `false`.
744
- */
745
- matchWildcard(e, t) {
746
- const i = e.replace(/\*/g, "[^:]*").replace(/\*\*/g, ".*");
747
- return new RegExp(`^${i}$`).test(t);
748
- }
749
- }
750
- let Qn = (n = 21) => crypto.getRandomValues(new Uint8Array(n)).reduce((e, t) => (t &= 63, t < 36 ? e += t.toString(36) : t < 62 ? e += (t - 26).toString(36).toUpperCase() : t > 62 ? e += "-" : e += "_", e), "");
751
- const Gn = (n = 8) => Qn(n), Ls = (n) => {
752
- const e = Object.entries(n).reduce((t, [i, a]) => a !== void 0 ? `${t}${t ? "&" : ""}${i}=${a}` : t, "");
753
- return e ? `?${e}` : "";
754
- };
755
- function As() {
756
- const n = new Error().stack.split(`
757
- `);
758
- return n.length < 3 ? "" : n[2].trim().substring(3);
759
- }
760
- var Ot = { exports: {} };
761
- (function(n) {
762
- (function(e, t) {
763
- n.exports ? n.exports = t() : e.log = t();
764
- })(Nt, function() {
765
- var e = function() {
766
- }, t = "undefined", i = typeof window !== t && typeof window.navigator !== t && /Trident\/|MSIE /.test(window.navigator.userAgent), a = [
767
- "trace",
768
- "debug",
769
- "info",
770
- "warn",
771
- "error"
772
- ];
773
- function s(k, N) {
774
- var O = k[N];
775
- if (typeof O.bind == "function")
776
- return O.bind(k);
777
- try {
778
- return Function.prototype.bind.call(O, k);
779
- } catch {
780
- return function() {
781
- return Function.prototype.apply.apply(O, [k, arguments]);
782
- };
783
- }
784
- }
785
- function r() {
786
- console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
787
- }
788
- function o(k) {
789
- return k === "debug" && (k = "log"), typeof console === t ? !1 : k === "trace" && i ? r : console[k] !== void 0 ? s(console, k) : console.log !== void 0 ? s(console, "log") : e;
790
- }
791
- function l(k, N) {
792
- for (var O = 0; O < a.length; O++) {
793
- var F = a[O];
794
- this[F] = O < k ? e : this.methodFactory(F, k, N);
795
- }
796
- this.log = this.debug;
797
- }
798
- function u(k, N, O) {
799
- return function() {
800
- typeof console !== t && (l.call(this, N, O), this[k].apply(this, arguments));
801
- };
802
- }
803
- function d(k, N, O) {
804
- return o(k) || u.apply(this, arguments);
805
- }
806
- function f(k, N, O) {
807
- var F = this, I;
808
- N = N == null ? "WARN" : N;
809
- var w = "loglevel";
810
- typeof k == "string" ? w += ":" + k : typeof k == "symbol" && (w = void 0);
811
- function D(p) {
812
- var h = (a[p] || "silent").toUpperCase();
813
- if (!(typeof window === t || !w)) {
814
- try {
815
- window.localStorage[w] = h;
816
- return;
817
- } catch {
818
- }
819
- try {
820
- window.document.cookie = encodeURIComponent(w) + "=" + h + ";";
821
- } catch {
822
- }
823
- }
824
- }
825
- function L() {
826
- var p;
827
- if (!(typeof window === t || !w)) {
828
- try {
829
- p = window.localStorage[w];
830
- } catch {
831
- }
832
- if (typeof p === t)
833
- try {
834
- var h = window.document.cookie, g = h.indexOf(
835
- encodeURIComponent(w) + "="
836
- );
837
- g !== -1 && (p = /^([^;]+)/.exec(h.slice(g))[1]);
838
- } catch {
839
- }
840
- return F.levels[p] === void 0 && (p = void 0), p;
841
- }
842
- }
843
- function A() {
844
- if (!(typeof window === t || !w)) {
845
- try {
846
- window.localStorage.removeItem(w);
847
- return;
848
- } catch {
849
- }
850
- try {
851
- window.document.cookie = encodeURIComponent(w) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
852
- } catch {
853
- }
854
- }
855
- }
856
- F.name = k, F.levels = {
857
- TRACE: 0,
858
- DEBUG: 1,
859
- INFO: 2,
860
- WARN: 3,
861
- ERROR: 4,
862
- SILENT: 5
863
- }, F.methodFactory = O || d, F.getLevel = function() {
864
- return I;
865
- }, F.setLevel = function(p, h) {
866
- if (typeof p == "string" && F.levels[p.toUpperCase()] !== void 0 && (p = F.levels[p.toUpperCase()]), typeof p == "number" && p >= 0 && p <= F.levels.SILENT) {
867
- if (I = p, h !== !1 && D(p), l.call(F, p, k), typeof console === t && p < F.levels.SILENT)
868
- return "No console available for logging";
869
- } else
870
- throw "log.setLevel() called with invalid level: " + p;
871
- }, F.setDefaultLevel = function(p) {
872
- N = p, L() || F.setLevel(p, !1);
873
- }, F.resetLevel = function() {
874
- F.setLevel(N, !1), A();
875
- }, F.enableAll = function(p) {
876
- F.setLevel(F.levels.TRACE, p);
877
- }, F.disableAll = function(p) {
878
- F.setLevel(F.levels.SILENT, p);
879
- };
880
- var m = L();
881
- m == null && (m = N), F.setLevel(m, !1);
882
- }
883
- var c = new f(), S = {};
884
- c.getLogger = function(N) {
885
- if (typeof N != "symbol" && typeof N != "string" || N === "")
886
- throw new TypeError("You must supply a name when creating a logger.");
887
- var O = S[N];
888
- return O || (O = S[N] = new f(
889
- N,
890
- c.getLevel(),
891
- c.methodFactory
892
- )), O;
893
- };
894
- var y = typeof window !== t ? window.log : void 0;
895
- return c.noConflict = function() {
896
- return typeof window !== t && window.log === c && (window.log = y), c;
897
- }, c.getLoggers = function() {
898
- return S;
899
- }, c.default = c, c;
900
- });
901
- })(Ot);
902
- var Rt = Ot.exports;
903
- const ae = /* @__PURE__ */ Te(Rt);
904
- var Tt = { exports: {} };
905
- (function(n) {
906
- (function(e, t) {
907
- n.exports ? n.exports = t() : e.prefix = t(e);
908
- })(Nt, function(e) {
909
- var t = function(d) {
910
- for (var f = 1, c = arguments.length, S; f < c; f++)
911
- for (S in arguments[f])
912
- Object.prototype.hasOwnProperty.call(arguments[f], S) && (d[S] = arguments[f][S]);
913
- return d;
914
- }, i = {
915
- template: "[%t] %l:",
916
- levelFormatter: function(d) {
917
- return d.toUpperCase();
918
- },
919
- nameFormatter: function(d) {
920
- return d || "root";
921
- },
922
- timestampFormatter: function(d) {
923
- return d.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1");
924
- },
925
- format: void 0
926
- }, a, s = {}, r = function(d) {
927
- if (!d || !d.getLogger)
928
- throw new TypeError("Argument is not a root logger");
929
- a = d;
930
- }, o = function(d, f) {
931
- if (!d || !d.setLevel)
932
- throw new TypeError("Argument is not a logger");
933
- var c = d.methodFactory, S = d.name || "", y = s[S] || s[""] || i;
934
- function k(N, O, F) {
935
- var I = c(N, O, F), w = s[F] || s[""], D = w.template.indexOf("%t") !== -1, L = w.template.indexOf("%l") !== -1, A = w.template.indexOf("%n") !== -1;
936
- return function() {
937
- for (var m = "", p = arguments.length, h = Array(p), g = 0; g < p; g++)
938
- h[g] = arguments[g];
939
- if (S || !s[F]) {
940
- var b = w.timestampFormatter(/* @__PURE__ */ new Date()), C = w.levelFormatter(N), v = w.nameFormatter(F);
941
- w.format ? m += w.format(C, v, b) : (m += w.template, D && (m = m.replace(/%t/, b)), L && (m = m.replace(/%l/, C)), A && (m = m.replace(/%n/, v))), h.length && typeof h[0] == "string" ? h[0] = m + " " + h[0] : h.unshift(m);
942
- }
943
- I.apply(void 0, h);
944
- };
945
- }
946
- return s[S] || (d.methodFactory = k), f = f || {}, f.template && (f.format = void 0), s[S] = t({}, y, f), d.setLevel(d.getLevel()), a || d.warn(
947
- "It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"
948
- ), d;
949
- }, l = {
950
- reg: r,
951
- apply: o
952
- }, u;
953
- return e && (u = e.prefix, l.noConflict = function() {
954
- return e.prefix === l && (e.prefix = u), l;
955
- }), l;
956
- });
957
- })(Tt);
958
- var Kn = Tt.exports;
959
- const Qe = /* @__PURE__ */ Te(Kn), K = class K {
960
- constructor(e) {
961
- R(this, "defaultLevel", Rt.levels.INFO);
962
- R(this, "namePrefix");
963
- this.namePrefix = e ? `${e}-` : "", ae.setDefaultLevel(this.defaultLevel), Qe.reg(ae), Qe.apply(ae, {
964
- template: "[%t] %l (%n)",
965
- nameFormatter: (t) => {
966
- var i;
967
- return (i = t == null ? void 0 : t.toLowerCase()) != null ? i : "";
968
- },
969
- timestampFormatter: () => (/* @__PURE__ */ new Date()).toTimeString().slice(0, 8)
970
- });
971
- }
972
- static create(e) {
973
- return window != null && window.nzlog || (K.instance = new K(e), window.nzlog = K.instance), window.nzlog;
974
- }
975
- createLogger(e) {
976
- const t = this.namePrefix + e.toLowerCase(), i = ae.getLogger(t), a = localStorage.getItem(`loglevel:${t}`);
977
- return a ? i.setLevel(a) : i.setLevel(this.defaultLevel), i;
978
- }
979
- };
980
- R(K, "instance");
981
- let we = K;
982
- const ge = we.create("nz"), Ps = ge.createLogger("main"), X = ge.createLogger("core");
983
- let j = { log: ge }, It;
984
- function Vs() {
985
- return j = Wn(), It = j.store, j;
986
- }
987
- function Wn() {
988
- if (!window.nizza) {
989
- const n = Jn();
990
- window.nizza = n, window.nz = n;
991
- }
992
- return window.nizza;
993
- }
994
- function Jn() {
995
- const n = zn(() => ({
996
- config: null
997
- }));
998
- return {
999
- version: "1.0.4",
1000
- log: ge,
1001
- store: n,
1002
- configure: qn,
1003
- setProductDataSource: Hn,
1004
- instanceId: Gn(),
1005
- eventBus: new Bn("nizza"),
1006
- get state() {
1007
- return n.getState();
1008
- }
1009
- };
1010
- }
1011
- async function qn(n) {
1012
- try {
1013
- const e = j.store.getState().account;
1014
- if (j.store.setState({ config: n }), (e == null ? void 0 : e.account) !== n.account) {
1015
- const t = await na(n.account);
1016
- j.store.setState({ account: t });
1017
- }
1018
- if (n.getProductDataSource) {
1019
- const t = await n.getProductDataSource();
1020
- j.store.setState({ productDataSource: t });
1021
- }
1022
- } catch (e) {
1023
- console.error("Error configuring NizzaStore:", e);
1024
- }
1025
- }
1026
- function Hn(n) {
1027
- j.store.setState({ productDataSource: n });
1028
- }
1029
- function G(n) {
1030
- return n != null && typeof n == "object" && n["@@functional/placeholder"] === !0;
1031
- }
1032
- function re(n) {
1033
- return function e(t) {
1034
- return arguments.length === 0 || G(t) ? e : n.apply(this, arguments);
1035
- };
1036
- }
1037
- function Ie(n) {
1038
- return function e(t, i) {
1039
- switch (arguments.length) {
1040
- case 0:
1041
- return e;
1042
- case 1:
1043
- return G(t) ? e : re(function(a) {
1044
- return n(t, a);
1045
- });
1046
- default:
1047
- return G(t) && G(i) ? e : G(t) ? re(function(a) {
1048
- return n(a, i);
1049
- }) : G(i) ? re(function(a) {
1050
- return n(t, a);
1051
- }) : n(t, i);
1052
- }
1053
- };
1054
- }
1055
- const Zn = Number.isInteger || function(e) {
1056
- return e << 0 === e;
1057
- };
1058
- function Xn(n) {
1059
- return Object.prototype.toString.call(n) === "[object String]";
1060
- }
1061
- var Yn = /* @__PURE__ */ Ie(function(e, t) {
1062
- var i = e < 0 ? t.length + e : e;
1063
- return Xn(t) ? t.charAt(i) : t[i];
1064
- });
1065
- const ei = Yn;
1066
- var ti = /* @__PURE__ */ re(function(e) {
1067
- return e == null;
1068
- });
1069
- const ni = ti;
1070
- var ii = /* @__PURE__ */ Ie(function(e, t) {
1071
- return e.map(function(i) {
1072
- for (var a = t, s = 0, r; s < i.length; ) {
1073
- if (a == null)
1074
- return;
1075
- r = i[s], a = Zn(r) ? ei(r, a) : a[r], s += 1;
1076
- }
1077
- return a;
1078
- });
1079
- });
1080
- const ai = ii;
1081
- var si = /* @__PURE__ */ Ie(function(e, t) {
1082
- return ai([e], t)[0];
1083
- });
1084
- const ri = si;
1085
- class ke extends Error {
1086
- constructor(e, t, i) {
1087
- super(t), this.value = i, this.name = e;
1088
- }
1089
- toDTO() {
1090
- return {
1091
- name: this.name,
1092
- message: this.message,
1093
- ...this.value && { value: this.value }
1094
- };
1095
- }
1096
- }
1097
- class oi extends ke {
1098
- constructor(e) {
1099
- super(
1100
- "RESOURCE_NOT_FOUND_ERROR",
1101
- `Resource with id '${e}' not found.`,
1102
- e
1103
- );
1104
- }
1105
- }
1106
- class li extends ke {
1107
- constructor(e) {
1108
- var t;
1109
- super(
1110
- "APP_UNEXPECTED_ERROR",
1111
- (t = e.message) != null ? t : "An unexpected error occurred.",
1112
- e
1113
- );
1114
- }
1115
- }
1116
- class _s extends ke {
1117
- constructor() {
1118
- super("APP_ACCOUNT_INVALID_ERROR", "Account not defined");
1119
- }
1120
- }
1121
- class di extends ke {
1122
- constructor(e) {
1123
- super(
1124
- "INVALID_NIZZA_GLOBAL_OBJECT_ERROR",
1125
- `
1126
- Configuration property invalid: "${e}".
1
+ var Jo=Object.defineProperty;var Wo=(V,$,B)=>$ in V?Jo(V,$,{enumerable:!0,configurable:!0,writable:!0,value:B}):V[$]=B;var x=(V,$,B)=>(Wo(V,typeof $!="symbol"?$+"":$,B),B);import{environment as Ho}from"./__federation_expose_EnvsEnvironment-yHiDdOw7.js";import{importShared as M,__tla as Zo}from"./__federation_fn_import-_OlAogWs.js";import{r as ei,g as Be,c as ti}from"./__federation_shared_react-OrlvfACW.js";import{jsx as Xo}from"react/jsx-runtime";let Fe,Ge,ni,Qe,qe,Ke,Je,we,We,ii,ai,He,H,oi,si,Ze,Xe,Ye,Ce,et,Z,tt,nt,it,ri,at,li,oe,Ee,di,ot,st,rt,G,lt,ui,Te,ci,mi,dt,pi,ut,gi,ct,mt,pt,hi,z,ki,fi,gt,vi,ht,kt,yi,ft,Si,Ni,Yo=Promise.all([(()=>{try{return Zo}catch{}})()]).then(async()=>{var ze;var V={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let $=0;function B(t,e){const n=`atom${++$}`,i={toString:()=>n};return typeof t=="function"?i.read=t:(i.init=t,i.read=bi,i.write=Fi),e&&(i.write=e),i}function bi(t){return t(this)}function Fi(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const se=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,Oe=t=>"init"in t,xe=t=>!!t.write,re=new WeakMap,wi=(t,e)=>{re.set(t,e),t.catch(()=>{}).finally(()=>re.delete(t))},vt=(t,e)=>{const n=re.get(t);n&&(re.delete(t),n(e))},yt=(t,e)=>{t.status="fulfilled",t.value=e},St=(t,e)=>{t.status="rejected",t.reason=e},Ci=t=>typeof(t==null?void 0:t.then)=="function",X=(t,e)=>!!t&&"v"in t&&"v"in e&&Object.is(t.v,e.v),Nt=(t,e)=>!!t&&"e"in t&&"e"in e&&Object.is(t.e,e.e),Q=t=>!!t&&"v"in t&&t.v instanceof Promise,Ei=(t,e)=>"v"in t&&"v"in e&&t.v.orig&&t.v.orig===e.v.orig,le=t=>{if("e"in t)throw t.e;return t.v},bt=()=>{const t=new WeakMap,e=new WeakMap,n=new Map;let i,a;(V?"production":void 0)!=="production"&&(i=new Set,a=new Set);const o=c=>t.get(c),s=(c,k)=>{(V?"production":void 0)!=="production"&&Object.freeze(k);const y=t.get(c);if(t.set(c,k),n.has(c)||n.set(c,y),Q(y)){const g="v"in k?k.v instanceof Promise?k.v:Promise.resolve(k.v):Promise.reject(k.e);y.v!==g&&vt(y.v,g)}},l=(c,k,y,g)=>{const h=new Map(g?k.d:null);let N=!1;y.forEach((v,F)=>{!v&&se(c,F)&&(v=k),v?(h.set(F,v),k.d.get(F)!==v&&(N=!0)):(V?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(N||k.d.size!==h.size)&&(k.d=h)},r=(c,k,y,g)=>{const h=o(c),N={d:(h==null?void 0:h.d)||new Map,v:k};if(y&&l(c,N,y,g),X(h,N)&&h.d===N.d)return h;if(Q(h)&&Q(N)&&Ei(h,N)){if(h.d===N.d)return h;N.v=h.v}return s(c,N),N},d=(c,k,y,g)=>{if(Ci(k)){let h;const N=()=>{const F=o(c);if(!Q(F)||F.v!==v)return;const R=r(c,v,y);e.has(c)&&F.d!==R.d&&I(c,R,F.d)},v=new Promise((F,R)=>{let T=!1;k.then(D=>{T||(T=!0,yt(v,D),F(D),N())},D=>{T||(T=!0,St(v,D),R(D),N())}),h=D=>{T||(T=!0,D.then(_=>yt(v,_),_=>St(v,_)),F(D))}});return v.orig=k,v.status="pending",wi(v,F=>{F&&h(F),g==null||g()}),r(c,v,y,!0)}return r(c,k,y)},u=(c,k,y)=>{const g=o(c),h={d:(g==null?void 0:g.d)||new Map,e:k};return y&&l(c,h,y),Nt(g,h)&&g.d===h.d?g:(s(c,h),h)},m=(c,k)=>{const y=o(c);if(!k&&y&&(e.has(c)||Array.from(y.d).every(([T,D])=>{if(se(c,T))return!0;const _=m(T);return _===D||X(_,D)})))return y;const g=new Map;let h=!0;const N=T=>{if(se(c,T)){const _=o(T);if(_)return g.set(T,_),le(_);if(Oe(T))return g.set(T,void 0),T.init;throw new Error("no atom init")}const D=m(T);return g.set(T,D),le(D)};let v,F;const R={get signal(){return v||(v=new AbortController),v.signal},get setSelf(){return(V?"production":void 0)!=="production"&&!xe(c)&&console.warn("setSelf function cannot be used with read-only atom"),!F&&xe(c)&&(F=(...T)=>{if((V?"production":void 0)!=="production"&&h&&console.warn("setSelf function cannot be called in sync"),!h)return A(c,...T)}),F}};try{const T=c.read(N,R);return d(c,T,g,()=>v==null?void 0:v.abort())}catch(T){return u(c,T,g)}finally{h=!1}},p=c=>le(m(c)),f=c=>{let k=e.get(c);return k||(k=O(c)),k},w=(c,k)=>!k.l.size&&(!k.t.size||k.t.size===1&&k.t.has(c)),S=c=>{const k=e.get(c);k&&w(c,k)&&C(c)},E=c=>{const k=new Map,y=new WeakMap,g=v=>{var F;const R=new Set((F=e.get(v))==null?void 0:F.t);return n.forEach((T,D)=>{var _;(_=o(D))!=null&&_.d.has(v)&&R.add(D)}),R},h=v=>{g(v).forEach(F=>{F!==v&&(k.set(F,(k.get(F)||new Set).add(v)),y.set(F,(y.get(F)||0)+1),h(F))})};h(c);const N=v=>{g(v).forEach(F=>{var R;if(F!==v){let T=y.get(F);if(T&&y.set(F,--T),!T){let D=!!((R=k.get(F))!=null&&R.size);if(D){const _=o(F),Ko=m(F,!0);D=!X(_,Ko)}D||k.forEach(_=>_.delete(F))}N(F)}})};N(c)},b=(c,...k)=>{let y=!0;const g=v=>le(m(v)),h=(v,...F)=>{let R;if(se(c,v)){if(!Oe(v))throw new Error("atom not writable");const T=o(v),D=d(v,F[0]);X(T,D)||E(v)}else R=b(v,...F);if(!y){const T=P();(V?"production":void 0)!=="production"&&i.forEach(D=>D({type:"async-write",flushed:T}))}return R},N=c.write(g,h,...k);return y=!1,N},A=(c,...k)=>{const y=b(c,...k),g=P();return(V?"production":void 0)!=="production"&&i.forEach(h=>h({type:"write",flushed:g})),y},O=(c,k,y)=>{var g;const h=y||[];(g=o(c))==null||g.d.forEach((v,F)=>{const R=e.get(F);R?R.t.add(c):F!==c&&O(F,c,h)}),m(c);const N={t:new Set(k&&[k]),l:new Set};if(e.set(c,N),(V?"production":void 0)!=="production"&&a.add(c),xe(c)&&c.onMount){const{onMount:v}=c;h.push(()=>{const F=v((...R)=>A(c,...R));F&&(N.u=F)})}return y||h.forEach(v=>v()),N},C=c=>{var k;const y=(k=e.get(c))==null?void 0:k.u;y&&y(),e.delete(c),(V?"production":void 0)!=="production"&&a.delete(c);const g=o(c);g?(Q(g)&&vt(g.v),g.d.forEach((h,N)=>{if(N!==c){const v=e.get(N);v&&(v.t.delete(c),w(N,v)&&C(N))}})):(V?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",c)},I=(c,k,y)=>{const g=new Set(k.d.keys()),h=new Set;y==null||y.forEach((N,v)=>{if(g.has(v)){g.delete(v);return}h.add(v);const F=e.get(v);F&&F.t.delete(c)}),g.forEach(N=>{const v=e.get(N);v?v.t.add(c):e.has(c)&&O(N,c)}),h.forEach(N=>{const v=e.get(N);v&&w(N,v)&&C(N)})},P=()=>{let c;for((V?"production":void 0)!=="production"&&(c=new Set);n.size;){const k=Array.from(n);n.clear(),k.forEach(([y,g])=>{const h=o(y);if(h){const N=e.get(y);N&&h.d!==(g==null?void 0:g.d)&&I(y,h,g==null?void 0:g.d),N&&!(!Q(g)&&(X(g,h)||Nt(g,h)))&&(N.l.forEach(v=>v()),(V?"production":void 0)!=="production"&&c.add(y))}else(V?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((V?"production":void 0)!=="production")return c},L=(c,k)=>{const y=f(c),g=P(),h=y.l;return h.add(k),(V?"production":void 0)!=="production"&&i.forEach(N=>N({type:"sub",flushed:g})),()=>{h.delete(k),S(c),(V?"production":void 0)!=="production"&&i.forEach(N=>N({type:"unsub"}))}};return(V?"production":void 0)!=="production"?{get:p,set:A,sub:L,dev_subscribe_store:(c,k)=>{if(k!==2)throw new Error("The current StoreListener revision is 2.");return i.add(c),()=>{i.delete(c)}},dev_get_mounted_atoms:()=>a.values(),dev_get_atom_state:c=>t.get(c),dev_get_mounted:c=>e.get(c),dev_restore_atoms:c=>{for(const[y,g]of c)Oe(y)&&(d(y,g),E(y));const k=P();i.forEach(y=>y({type:"restore",flushed:k}))}}:{get:p,set:A,sub:L}};let Re;(V?"production":void 0)!=="production"&&(typeof globalThis.__NUMBER_OF_JOTAI_INSTANCES__=="number"?++globalThis.__NUMBER_OF_JOTAI_INSTANCES__:globalThis.__NUMBER_OF_JOTAI_INSTANCES__=1);const Ti=()=>(Re||((V?"production":void 0)!=="production"&&globalThis.__NUMBER_OF_JOTAI_INSTANCES__!==1&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"),Re=bt()),Re);var Oi={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ft=await M("react"),{createContext:xi,useContext:Ri,useRef:es,createElement:ts,useReducer:Di,useEffect:Ii,useDebugValue:Li,useCallback:Ai}=Ft,Pi=xi(void 0),wt=t=>{const e=Ri(Pi);return(t==null?void 0:t.store)||e||Ti()},Vi=t=>typeof(t==null?void 0:t.then)=="function",_i=Ft.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)});function Ui(t,e){const n=wt(e),[[i,a,o],s]=Di(d=>{const u=n.get(t);return Object.is(d[0],u)&&d[1]===n&&d[2]===t?d:[u,n,t]},void 0,()=>[n.get(t),n,t]);let l=i;(a!==n||o!==t)&&(s(),l=n.get(t));const r=e==null?void 0:e.delay;return Ii(()=>{const d=n.sub(t,()=>{if(typeof r=="number"){setTimeout(s,r);return}s()});return s(),d},[n,t,r]),Li(l),Vi(l)?_i(l):l}function ji(t,e){const n=wt(e);return Ai((...i)=>{if((Oi?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...i)},[n,t])}function $i(t,e){return[Ui(t,e),ji(t,e)]}oe=B(null),oe.debugLabel="accountAtom",Te=async function(t){const{url:e,method:n="GET",body:i,raw:a=!1,contentTypeJson:o=!0,timeout:s,...l}=t,r=o&&!t.headers?new Headers({"content-type":"application/json"}):t.headers;try{const d=new AbortController,{signal:u}=d;let m;const p=fetch(e,{method:n,headers:r,body:i,signal:u,...l});s&&(m=setTimeout(()=>{d.abort()},s));const f=await p;if(a)return f;const w=await f.json();if(clearTimeout(m),!f.ok){const S=w?JSON.stringify(w):f.statusText;throw new Error(S)}return w}catch(d){throw console.error("[CustomFetch] ",d),d}},di=t=>Te({...t,contentTypeJson:!1,raw:!1}),ci=function(t,e,n){fetch(e).then(i=>i.blob()).then(i=>pt(i,`${t}.${n}`))},pt=(t,e,n)=>{const i=[t],a=new Blob(i,{type:n!=null?n:"application/octet-stream"});if(typeof window.navigator.msSaveBlob<"u")return window.navigator.msSaveBlob(a,e);const o=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(a):window.webkitURL.createObjectURL(a),s=document.createElement("a");return s.style.display="none",s.href=o,s.setAttribute("download",e),typeof s.download>"u"&&s.setAttribute("target","_blank"),document.body.appendChild(s),s.click(),setTimeout(()=>{document.body.removeChild(s),window.URL.revokeObjectURL(o)},200)};var Mi={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ct=t=>{let e;const n=new Set,i=(l,r)=>{const d=typeof l=="function"?l(e):l;if(!Object.is(d,e)){const u=e;e=(r!=null?r:typeof d!="object"||d===null)?d:Object.assign({},e,d),n.forEach(m=>m(e,u))}},a=()=>e,o={setState:i,getState:a,getInitialState:()=>s,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(Mi?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=e=t(i,a,o);return o},zi=t=>t?Ct(t):Ct;var Et={exports:{}},Tt={},Ot={exports:{}},xt={},q=ei;function Bi(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Gi=typeof Object.is=="function"?Object.is:Bi,Qi=q.useState,qi=q.useEffect,Ki=q.useLayoutEffect,Ji=q.useDebugValue;function Wi(t,e){var n=e(),i=Qi({inst:{value:n,getSnapshot:e}}),a=i[0].inst,o=i[1];return Ki(function(){a.value=n,a.getSnapshot=e,De(a)&&o({inst:a})},[t,n,e]),qi(function(){return De(a)&&o({inst:a}),t(function(){De(a)&&o({inst:a})})},[t]),Ji(n),n}function De(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Gi(t,n)}catch{return!0}}function Hi(t,e){return e()}var Zi=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Hi:Wi;xt.useSyncExternalStore=q.useSyncExternalStore!==void 0?q.useSyncExternalStore:Zi,Ot.exports=xt;var Rt=Ot.exports,de=ei,Xi=Rt;function Yi(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ea=typeof Object.is=="function"?Object.is:Yi,ta=Xi.useSyncExternalStore,na=de.useRef,ia=de.useEffect,aa=de.useMemo,oa=de.useDebugValue;Tt.useSyncExternalStoreWithSelector=function(t,e,n,i,a){var o=na(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=aa(function(){function r(f){if(!d){if(d=!0,u=f,f=i(f),a!==void 0&&s.hasValue){var w=s.value;if(a(w,f))return m=w}return m=f}if(w=m,ea(u,f))return w;var S=i(f);return a!==void 0&&a(w,S)?w:(u=f,m=S)}var d=!1,u,m,p=n===void 0?null:n;return[function(){return r(e())},p===null?void 0:function(){return r(p())}]},[e,n,i,a]);var l=ta(t,o[0],o[1]);return ia(function(){s.hasValue=!0,s.value=l},[l]),oa(l),l},Et.exports=Tt;var sa=Et.exports;const ra=Be(sa);var Dt={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const la=await M("react"),{useDebugValue:da}=la,{useSyncExternalStoreWithSelector:ua}=ra;let It=!1;const ca=t=>t;function ma(t,e=ca,n){(Dt?"production":void 0)!=="production"&&n&&!It&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),It=!0);const i=ua(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return da(i),i}const Lt=t=>{(Dt?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?zi(t):t,n=(i,a)=>ma(e,i,a);return Object.assign(n,e),n},pa=t=>t?Lt(t):Lt;He=class{constructor(t){x(this,"channel");x(this,"listeners",new Map);x(this,"eventQueue",new Map);try{this.channel=new BroadcastChannel(t),this.channel.onmessage=e=>this.handleMessage(e),this.channel.onmessageerror=e=>G.error("NizzaBroadcastChannel:",e)}catch(e){throw G.error("Failed to create NizzaBroadcastChannel:",e),e}}on(t,e){return this.subscribeToEvent(t,e),{off:()=>this.unsubscribeFromEvent(t,e)}}emit(t,e,n={}){this.emitEvent(t,e,n)}handleMessage(t){const e=t.data,{name:n}=e;for(const[i,a]of this.listeners.entries())this.matchWildcard(i,n)&&a.forEach(o=>o({...e,wildcard:i}))}subscribeToEvent(t,e){if(typeof t!="string"||typeof e!="function"){const n=new Error("Invalid arguments");throw G.error(n),n}for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,t)){i.add(e);const a=this.eventQueue.get(n);a&&(a.forEach(o=>{e({...o,wildcard:n})}),this.eventQueue.delete(n));return}this.listeners.set(t,new Set([e]))}emitEvent(t,e,n){if(typeof t!="string"){const o=new Error("Invalid arguments");throw G.error(o),o}const i={name:t,data:e,attrs:n},a=Array.from(this.getMatchingListeners(t));if(a.length)for(const[o,s]of a)s({...i,wildcard:o});else this.eventQueue.has(t)||this.eventQueue.set(t,[]),this.eventQueue.get(t).push(i);this.channel.postMessage(i)}*getMatchingListeners(t){for(const[e,n]of this.listeners.entries())if(this.matchWildcard(e,t))for(const i of n)yield[e,i]}unsubscribeFromEvent(t,e){if(this.listeners.has(t)){const n=this.listeners.get(t);n.delete(e),n.size===0&&this.listeners.delete(t)}}matchWildcard(t,e){const n=t.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*");return new RegExp(`^${n}$`).test(e)}};let ga=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");kt=(t=8)=>ga(t),vi=t=>{const e=Object.entries(t).reduce((n,[i,a])=>a!==void 0?`${n}${n?"&":""}${i}=${a}`:n,"");return e?`?${e}`:""},mi=function(){const t=new Error().stack.split(`
2
+ `);return t.length<3?"":t[2].trim().substring(3)};var At={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(ti,function(){var e=function(){},n="undefined",i=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"],o={},s=null;function l(S,E){var b=S[E];if(typeof b.bind=="function")return b.bind(S);try{return Function.prototype.bind.call(b,S)}catch{return function(){return Function.prototype.apply.apply(b,[S,arguments])}}}function r(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function d(S){return S==="debug"&&(S="log"),typeof console===n?!1:S==="trace"&&i?r:console[S]!==void 0?l(console,S):console.log!==void 0?l(console,"log"):e}function u(){for(var S=this.getLevel(),E=0;E<a.length;E++){var b=a[E];this[b]=E<S?e:this.methodFactory(b,S,this.name)}if(this.log=this.debug,typeof console===n&&S<this.levels.SILENT)return"No console available for logging"}function m(S){return function(){typeof console!==n&&(u.call(this),this[S].apply(this,arguments))}}function p(S,E,b){return d(S)||m.apply(this,arguments)}function f(S,E){var b=this,A,O,C,I="loglevel";typeof S=="string"?I+=":"+S:typeof S=="symbol"&&(I=void 0);function P(g){var h=(a[g]||"silent").toUpperCase();if(!(typeof window===n||!I)){try{window.localStorage[I]=h;return}catch{}try{window.document.cookie=encodeURIComponent(I)+"="+h+";"}catch{}}}function L(){var g;if(!(typeof window===n||!I)){try{g=window.localStorage[I]}catch{}if(typeof g===n)try{var h=window.document.cookie,N=encodeURIComponent(I),v=h.indexOf(N+"=");v!==-1&&(g=/^([^;]+)/.exec(h.slice(v+N.length+1))[1])}catch{}return b.levels[g]===void 0&&(g=void 0),g}}function c(){if(!(typeof window===n||!I)){try{window.localStorage.removeItem(I)}catch{}try{window.document.cookie=encodeURIComponent(I)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function k(g){var h=g;if(typeof h=="string"&&b.levels[h.toUpperCase()]!==void 0&&(h=b.levels[h.toUpperCase()]),typeof h=="number"&&h>=0&&h<=b.levels.SILENT)return h;throw new TypeError("log.setLevel() called with invalid level: "+g)}b.name=S,b.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},b.methodFactory=E||p,b.getLevel=function(){var g;return(g=C!=null?C:O)!=null?g:A},b.setLevel=function(g,h){return C=k(g),h!==!1&&P(C),u.call(b)},b.setDefaultLevel=function(g){O=k(g),L()||b.setLevel(g,!1)},b.resetLevel=function(){C=null,c(),u.call(b)},b.enableAll=function(g){b.setLevel(b.levels.TRACE,g)},b.disableAll=function(g){b.setLevel(b.levels.SILENT,g)},b.rebuild=function(){if(s!==b&&(A=k(s.getLevel())),u.call(b),s===b)for(var g in o)o[g].rebuild()},A=k(s?s.getLevel():"WARN");var y=L();y!=null&&(C=k(y)),u.call(b)}s=new f,s.getLogger=function(S){if(typeof S!="symbol"&&typeof S!="string"||S==="")throw new TypeError("You must supply a name when creating a logger.");var E=o[S];return E||(E=o[S]=new f(S,s.methodFactory)),E};var w=typeof window!==n?window.log:void 0;return s.noConflict=function(){return typeof window!==n&&window.log===s&&(window.log=w),s},s.getLoggers=function(){return o},s.default=s,s})})(At);var Pt=At.exports;const ue=Be(Pt);var Vt={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.prefix=n(e)})(ti,function(e){var n=function(u){for(var m=1,p=arguments.length,f;m<p;m++)for(f in arguments[m])Object.prototype.hasOwnProperty.call(arguments[m],f)&&(u[f]=arguments[m][f]);return u},i={template:"[%t] %l:",levelFormatter:function(u){return u.toUpperCase()},nameFormatter:function(u){return u||"root"},timestampFormatter:function(u){return u.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")},format:void 0},a,o={},s=function(u){if(!u||!u.getLogger)throw new TypeError("Argument is not a root logger");a=u},l=function(u,m){if(!u||!u.setLevel)throw new TypeError("Argument is not a logger");var p=u.methodFactory,f=u.name||"",w=o[f]||o[""]||i;function S(E,b,A){var O=p(E,b,A),C=o[A]||o[""],I=C.template.indexOf("%t")!==-1,P=C.template.indexOf("%l")!==-1,L=C.template.indexOf("%n")!==-1;return function(){for(var c="",k=arguments.length,y=Array(k),g=0;g<k;g++)y[g]=arguments[g];if(f||!o[A]){var h=C.timestampFormatter(new Date),N=C.levelFormatter(E),v=C.nameFormatter(A);C.format?c+=C.format(N,v,h):(c+=C.template,I&&(c=c.replace(/%t/,h)),P&&(c=c.replace(/%l/,N)),L&&(c=c.replace(/%n/,v))),y.length&&typeof y[0]=="string"?y[0]=c+" "+y[0]:y.unshift(c)}O.apply(void 0,y)}}return o[f]||(u.methodFactory=S),m=m||{},m.template&&(m.format=void 0),o[f]=n({},w,m),u.setLevel(u.getLevel()),a||u.warn("It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"),u},r={reg:s,apply:l},d;return e&&(d=e.prefix,r.noConflict=function(){return e.prefix===r&&(e.prefix=d),r}),r})})(Vt);var ha=Vt.exports;const _t=Be(ha);Z=(ze=class{constructor(t){x(this,"defaultLevel",Pt.levels.INFO);x(this,"namePrefix");this.namePrefix=t?`${t}-`:"",ue.setDefaultLevel(this.defaultLevel),_t.reg(ue),_t.apply(ue,{template:"[%t] %l (%n)",nameFormatter:e=>{var n;return(n=e==null?void 0:e.toLowerCase())!=null?n:""},timestampFormatter:()=>new Date().toTimeString().slice(0,8)})}static create(t){const e=`${t}log`;return window!=null&&window[e]||(Z.instance=new Z(t),window[e]=Z.instance),window[e]}createLogger(t){const e=this.namePrefix+t.toLowerCase(),n=ue.getLogger(e),i=localStorage.getItem(`loglevel:${e}`);return i?n.setLevel(i):n.setLevel(this.defaultLevel),n}},x(ze,"instance"),ze);let ce;ce=Z.create("nz"),hi=ce.createLogger("main"),G=ce.createLogger("core"),z=ut(),ft=z.store,ki=function(){return z},ut=function(){if(!window.nizza){const t=ka();window.nizza=t,window.nz=t}return window.nizza};function ka(){const t=pa(()=>({config:null}));return{version:"1.0.4",log:ce,store:t,configure:rt,setProductDataSource:ht,instanceId:kt(),eventBus:new He("nizza"),get state(){return t.getState()}}}rt=async function(t){try{const e=z.store.getState().account;if(z.store.setState({config:t}),(e==null?void 0:e.account)!==t.account){const n=await dt(t.account);z.store.setState({account:n})}if(t.getProductDataSource){const n=await t.getProductDataSource();z.store.setState({productDataSource:n})}}catch(e){console.error("Error configuring NizzaStore:",e)}},ht=function(t){z.store.setState({productDataSource:t})};function K(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function me(t){return function e(n){return arguments.length===0||K(n)?e:t.apply(this,arguments)}}function Ie(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return K(n)?e:me(function(a){return t(n,a)});default:return K(n)&&K(i)?e:K(n)?me(function(a){return t(a,i)}):K(i)?me(function(a){return t(n,a)}):t(n,i)}}}const fa=Number.isInteger||function(t){return t<<0===t};function va(t){return Object.prototype.toString.call(t)==="[object String]"}var ya=Ie(function(t,e){var n=t<0?e.length+t:t;return va(e)?e.charAt(n):e[n]}),Sa=me(function(t){return t==null}),Na=Ie(function(t,e){return t.map(function(n){for(var i=e,a=0,o;a<n.length;){if(i==null)return;o=n[a],i=fa(o)?ya(o,i):i[o],a+=1}return i})}),ba=Ie(function(t,e){return Na([t],e)[0]});H=class extends Error{constructor(t,e,n){super(e),this.value=n,this.name=t}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value}}}},it=class extends H{constructor(t){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${t}' not found.`,t)}},at=class extends H{constructor(t){var e;super("APP_UNEXPECTED_ERROR",(e=t.message)!=null?e:"An unexpected error occurred.",t)}},ni=class extends H{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}},Xe=class extends H{constructor(t){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
3
+ Configuration property invalid: "${t}".
1127
4
 
1128
5
  It looks like you are trying to use a configuration property that is required but is "undefined", make sure you have initialized the global object "nizza".
1129
6
 
@@ -1142,2813 +19,4 @@ class di extends ke {
1142
19
  account: env.account,
1143
20
  ...
1144
21
  });
1145
- `
1146
- );
1147
- }
1148
- }
1149
- function Us(n, e) {
1150
- e.forEach((t) => {
1151
- if (ni(ri(t.split("."), n)))
1152
- throw new di(t);
1153
- });
1154
- }
1155
- function Ms() {
1156
- var i, a, s;
1157
- let n = null, e = null, t = null;
1158
- try {
1159
- n = (s = (a = (i = Intl.DateTimeFormat()) == null ? void 0 : i.resolvedOptions()) == null ? void 0 : a.timeZone) != null ? s : null;
1160
- const r = -(/* @__PURE__ */ new Date()).getTimezoneOffset();
1161
- t = r;
1162
- const o = r >= 0 ? "+" : "-", l = String(
1163
- Math.floor(Math.abs(r) / 60)
1164
- ).padStart(2, "0"), u = String(Math.abs(r) % 60).padStart(
1165
- 2,
1166
- "0"
1167
- );
1168
- e = `${o}${l}:${u}`;
1169
- } catch {
1170
- X.error("Error obtaining time zone or offset");
1171
- }
1172
- return {
1173
- offset: e,
1174
- offsetValue: t,
1175
- value: n,
1176
- country: null,
1177
- included: null,
1178
- label: null
1179
- };
1180
- }
1181
- class ui {
1182
- constructor(e) {
1183
- R(this, "aggregate");
1184
- R(this, "_numSetPropsApplied", 0);
1185
- this.aggregate = e;
1186
- }
1187
- setProps(e) {
1188
- for (const [t, i] of Object.entries(e))
1189
- t in this.aggregate && (this.aggregate[t] = i);
1190
- this._numSetPropsApplied++;
1191
- }
1192
- get isFirstSetProps() {
1193
- return this._numSetPropsApplied === 1;
1194
- }
1195
- }
1196
- function ci(n) {
1197
- return new ui(n);
1198
- }
1199
- class $s {
1200
- }
1201
- class js {
1202
- constructor(e) {
1203
- R(this, "_value");
1204
- e !== void 0 && (this._value = e);
1205
- }
1206
- get value() {
1207
- return this._value;
1208
- }
1209
- }
1210
- var Dt = /* @__PURE__ */ ((n) => (n.VTEX = "VTEX", n.VTEX_IO = "VTEX-IO", n.VTEX_CMS = "PORTAL-VTEX", n.PLATFORM = "PLATFORM", n.UNKNOWN = "UNKNOWN", n))(Dt || {}), mi = /* @__PURE__ */ ((n) => (n.PLATFORM = "platform_module", n.ADENDA = "subscription_module", n.APP_STORE = "app_store", n))(mi || {}), Lt = /* @__PURE__ */ ((n) => (n.ACTIVE = "active_contract", n.INACTIVE = "inactive_contract", n))(Lt || {}), fi = /* @__PURE__ */ ((n) => (n.LITE = "lite", n.STANDARD = "standard", n.PRO = "pro", n))(fi || {}), pi = /* @__PURE__ */ ((n) => (n.LITE = "PLAN_LITE", n.STANDARD = "PLAN_ESTANDAR", n.PRO = "PLAN_PRO", n.NONE = "NO_PLAN", n))(pi || {}), hi = /* @__PURE__ */ ((n) => (n.PAST = "past", n.LIVE = "live", n.FUTURE = "future", n))(hi || {});
1211
- class De {
1212
- constructor(e) {
1213
- R(this, "root", ci(this));
1214
- R(this, "id");
1215
- R(this, "account");
1216
- R(this, "accountType", Dt.UNKNOWN);
1217
- R(this, "username");
1218
- R(this, "currencyConfig");
1219
- R(this, "contractType");
1220
- R(this, "nextDateMetricRecord");
1221
- R(this, "spendedMinutes", 0);
1222
- R(this, "unlimitedService", !1);
1223
- R(this, "hoursAvailable", 0);
1224
- R(this, "contractStatus", Lt.ACTIVE);
1225
- R(this, "createdAt");
1226
- R(this, "installationDateApp");
1227
- R(this, "cxAccount");
1228
- R(this, "freeService", !1);
1229
- R(this, "subscriptionType", null);
1230
- R(this, "minutesAvailable", 0);
1231
- R(this, "globalPage");
1232
- R(this, "stripe");
1233
- R(this, "descriptionPlan");
1234
- R(this, "planType");
1235
- R(this, "selectFreeTrial");
1236
- R(this, "exceededFeatures");
1237
- R(this, "host", null);
1238
- this.root.setProps(e);
1239
- }
1240
- static toDomain(e) {
1241
- const { createdAt: t, username: i, ...a } = e, s = {
1242
- ...a,
1243
- username: i != null ? i : a.account,
1244
- createdAt: new Date(Number(t))
1245
- };
1246
- return new De(s);
1247
- }
1248
- toPrimitives() {
1249
- const { root: e, createdAt: t, ...i } = this;
1250
- return {
1251
- ...i,
1252
- created: t.toISOString()
1253
- };
1254
- }
1255
- }
1256
- const gi = `${gn.apiUrls.restV1}/accounts/v2`;
1257
- class ki {
1258
- async get(e) {
1259
- const t = `${gi}/${e}`, { data: i } = await yt({
1260
- url: t
1261
- });
1262
- return i ? De.toDomain(i) : null;
1263
- }
1264
- }
1265
- class vi {
1266
- constructor(e) {
1267
- this.accountRepository = e;
1268
- }
1269
- async get(e) {
1270
- try {
1271
- const t = await this.accountRepository.get(e);
1272
- if (!t)
1273
- throw new oi(e);
1274
- return t;
1275
- } catch (t) {
1276
- throw new li(t);
1277
- }
1278
- }
1279
- }
1280
- const Si = new ki(), At = new vi(Si);
1281
- class Le {
1282
- constructor() {
1283
- this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
1284
- }
1285
- subscribe(e) {
1286
- const t = {
1287
- listener: e
1288
- };
1289
- return this.listeners.add(t), this.onSubscribe(), () => {
1290
- this.listeners.delete(t), this.onUnsubscribe();
1291
- };
1292
- }
1293
- hasListeners() {
1294
- return this.listeners.size > 0;
1295
- }
1296
- onSubscribe() {
1297
- }
1298
- onUnsubscribe() {
1299
- }
1300
- }
1301
- const le = typeof window == "undefined" || "Deno" in window;
1302
- function yi() {
1303
- }
1304
- function Ge(n) {
1305
- return typeof n == "number" && n >= 0 && n !== 1 / 0;
1306
- }
1307
- function Ni(n, e) {
1308
- return Math.max(n + (e || 0) - Date.now(), 0);
1309
- }
1310
- function bi(n, e, t) {
1311
- return Fi(n) ? typeof e == "function" ? {
1312
- ...t,
1313
- queryKey: n,
1314
- queryFn: e
1315
- } : {
1316
- ...e,
1317
- queryKey: n
1318
- } : n;
1319
- }
1320
- function Pt(n, e) {
1321
- if (n === e)
1322
- return n;
1323
- const t = Ke(n) && Ke(e);
1324
- if (t || We(n) && We(e)) {
1325
- const i = t ? n.length : Object.keys(n).length, a = t ? e : Object.keys(e), s = a.length, r = t ? [] : {};
1326
- let o = 0;
1327
- for (let l = 0; l < s; l++) {
1328
- const u = t ? l : a[l];
1329
- r[u] = Pt(n[u], e[u]), r[u] === n[u] && o++;
1330
- }
1331
- return i === s && o === i ? n : r;
1332
- }
1333
- return e;
1334
- }
1335
- function Ce(n, e) {
1336
- if (n && !e || e && !n)
1337
- return !1;
1338
- for (const t in n)
1339
- if (n[t] !== e[t])
1340
- return !1;
1341
- return !0;
1342
- }
1343
- function Ke(n) {
1344
- return Array.isArray(n) && n.length === Object.keys(n).length;
1345
- }
1346
- function We(n) {
1347
- if (!Je(n))
1348
- return !1;
1349
- const e = n.constructor;
1350
- if (typeof e == "undefined")
1351
- return !0;
1352
- const t = e.prototype;
1353
- return !(!Je(t) || !t.hasOwnProperty("isPrototypeOf"));
1354
- }
1355
- function Je(n) {
1356
- return Object.prototype.toString.call(n) === "[object Object]";
1357
- }
1358
- function Fi(n) {
1359
- return Array.isArray(n);
1360
- }
1361
- function wi(n) {
1362
- return new Promise((e) => {
1363
- setTimeout(e, n);
1364
- });
1365
- }
1366
- function qe(n) {
1367
- wi(0).then(n);
1368
- }
1369
- function He(n, e, t) {
1370
- return t.isDataEqual != null && t.isDataEqual(n, e) ? n : typeof t.structuralSharing == "function" ? t.structuralSharing(n, e) : t.structuralSharing !== !1 ? Pt(n, e) : e;
1371
- }
1372
- class Ci extends Le {
1373
- constructor() {
1374
- super(), this.setup = (e) => {
1375
- if (!le && window.addEventListener) {
1376
- const t = () => e();
1377
- return window.addEventListener("visibilitychange", t, !1), window.addEventListener("focus", t, !1), () => {
1378
- window.removeEventListener("visibilitychange", t), window.removeEventListener("focus", t);
1379
- };
1380
- }
1381
- };
1382
- }
1383
- onSubscribe() {
1384
- this.cleanup || this.setEventListener(this.setup);
1385
- }
1386
- onUnsubscribe() {
1387
- if (!this.hasListeners()) {
1388
- var e;
1389
- (e = this.cleanup) == null || e.call(this), this.cleanup = void 0;
1390
- }
1391
- }
1392
- setEventListener(e) {
1393
- var t;
1394
- this.setup = e, (t = this.cleanup) == null || t.call(this), this.cleanup = e((i) => {
1395
- typeof i == "boolean" ? this.setFocused(i) : this.onFocus();
1396
- });
1397
- }
1398
- setFocused(e) {
1399
- this.focused !== e && (this.focused = e, this.onFocus());
1400
- }
1401
- onFocus() {
1402
- this.listeners.forEach(({
1403
- listener: e
1404
- }) => {
1405
- e();
1406
- });
1407
- }
1408
- isFocused() {
1409
- return typeof this.focused == "boolean" ? this.focused : typeof document == "undefined" ? !0 : [void 0, "visible", "prerender"].includes(document.visibilityState);
1410
- }
1411
- }
1412
- const Ei = new Ci(), Ze = ["online", "offline"];
1413
- class xi extends Le {
1414
- constructor() {
1415
- super(), this.setup = (e) => {
1416
- if (!le && window.addEventListener) {
1417
- const t = () => e();
1418
- return Ze.forEach((i) => {
1419
- window.addEventListener(i, t, !1);
1420
- }), () => {
1421
- Ze.forEach((i) => {
1422
- window.removeEventListener(i, t);
1423
- });
1424
- };
1425
- }
1426
- };
1427
- }
1428
- onSubscribe() {
1429
- this.cleanup || this.setEventListener(this.setup);
1430
- }
1431
- onUnsubscribe() {
1432
- if (!this.hasListeners()) {
1433
- var e;
1434
- (e = this.cleanup) == null || e.call(this), this.cleanup = void 0;
1435
- }
1436
- }
1437
- setEventListener(e) {
1438
- var t;
1439
- this.setup = e, (t = this.cleanup) == null || t.call(this), this.cleanup = e((i) => {
1440
- typeof i == "boolean" ? this.setOnline(i) : this.onOnline();
1441
- });
1442
- }
1443
- setOnline(e) {
1444
- this.online !== e && (this.online = e, this.onOnline());
1445
- }
1446
- onOnline() {
1447
- this.listeners.forEach(({
1448
- listener: e
1449
- }) => {
1450
- e();
1451
- });
1452
- }
1453
- isOnline() {
1454
- return typeof this.online == "boolean" ? this.online : typeof navigator == "undefined" || typeof navigator.onLine == "undefined" ? !0 : navigator.onLine;
1455
- }
1456
- }
1457
- const Oi = new xi();
1458
- function Ri(n) {
1459
- return (n != null ? n : "online") === "online" ? Oi.isOnline() : !0;
1460
- }
1461
- class Ti {
1462
- constructor(e) {
1463
- this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
1464
- }
1465
- }
1466
- function Ii(n) {
1467
- return n instanceof Ti;
1468
- }
1469
- function Di() {
1470
- let n = [], e = 0, t = (d) => {
1471
- d();
1472
- }, i = (d) => {
1473
- d();
1474
- };
1475
- const a = (d) => {
1476
- let f;
1477
- e++;
1478
- try {
1479
- f = d();
1480
- } finally {
1481
- e--, e || o();
1482
- }
1483
- return f;
1484
- }, s = (d) => {
1485
- e ? n.push(d) : qe(() => {
1486
- t(d);
1487
- });
1488
- }, r = (d) => (...f) => {
1489
- s(() => {
1490
- d(...f);
1491
- });
1492
- }, o = () => {
1493
- const d = n;
1494
- n = [], d.length && qe(() => {
1495
- i(() => {
1496
- d.forEach((f) => {
1497
- t(f);
1498
- });
1499
- });
1500
- });
1501
- };
1502
- return {
1503
- batch: a,
1504
- batchCalls: r,
1505
- schedule: s,
1506
- setNotifyFunction: (d) => {
1507
- t = d;
1508
- },
1509
- setBatchNotifyFunction: (d) => {
1510
- i = d;
1511
- }
1512
- };
1513
- }
1514
- const Y = Di();
1515
- class Li extends Le {
1516
- constructor(e, t) {
1517
- super(), this.client = e, this.options = t, this.trackedProps = /* @__PURE__ */ new Set(), this.selectError = null, this.bindMethods(), this.setOptions(t);
1518
- }
1519
- bindMethods() {
1520
- this.remove = this.remove.bind(this), this.refetch = this.refetch.bind(this);
1521
- }
1522
- onSubscribe() {
1523
- this.listeners.size === 1 && (this.currentQuery.addObserver(this), Xe(this.currentQuery, this.options) && this.executeFetch(), this.updateTimers());
1524
- }
1525
- onUnsubscribe() {
1526
- this.hasListeners() || this.destroy();
1527
- }
1528
- shouldFetchOnReconnect() {
1529
- return Ee(this.currentQuery, this.options, this.options.refetchOnReconnect);
1530
- }
1531
- shouldFetchOnWindowFocus() {
1532
- return Ee(this.currentQuery, this.options, this.options.refetchOnWindowFocus);
1533
- }
1534
- destroy() {
1535
- this.listeners = /* @__PURE__ */ new Set(), this.clearStaleTimeout(), this.clearRefetchInterval(), this.currentQuery.removeObserver(this);
1536
- }
1537
- setOptions(e, t) {
1538
- const i = this.options, a = this.currentQuery;
1539
- if (this.options = this.client.defaultQueryOptions(e), Ce(i, this.options) || this.client.getQueryCache().notify({
1540
- type: "observerOptionsUpdated",
1541
- query: this.currentQuery,
1542
- observer: this
1543
- }), typeof this.options.enabled != "undefined" && typeof this.options.enabled != "boolean")
1544
- throw new Error("Expected enabled to be a boolean");
1545
- this.options.queryKey || (this.options.queryKey = i.queryKey), this.updateQuery();
1546
- const s = this.hasListeners();
1547
- s && Ye(this.currentQuery, a, this.options, i) && this.executeFetch(), this.updateResult(t), s && (this.currentQuery !== a || this.options.enabled !== i.enabled || this.options.staleTime !== i.staleTime) && this.updateStaleTimeout();
1548
- const r = this.computeRefetchInterval();
1549
- s && (this.currentQuery !== a || this.options.enabled !== i.enabled || r !== this.currentRefetchInterval) && this.updateRefetchInterval(r);
1550
- }
1551
- getOptimisticResult(e) {
1552
- const t = this.client.getQueryCache().build(this.client, e), i = this.createResult(t, e);
1553
- return Pi(this, i, e) && (this.currentResult = i, this.currentResultOptions = this.options, this.currentResultState = this.currentQuery.state), i;
1554
- }
1555
- getCurrentResult() {
1556
- return this.currentResult;
1557
- }
1558
- trackResult(e) {
1559
- const t = {};
1560
- return Object.keys(e).forEach((i) => {
1561
- Object.defineProperty(t, i, {
1562
- configurable: !1,
1563
- enumerable: !0,
1564
- get: () => (this.trackedProps.add(i), e[i])
1565
- });
1566
- }), t;
1567
- }
1568
- getCurrentQuery() {
1569
- return this.currentQuery;
1570
- }
1571
- remove() {
1572
- this.client.getQueryCache().remove(this.currentQuery);
1573
- }
1574
- refetch({
1575
- refetchPage: e,
1576
- ...t
1577
- } = {}) {
1578
- return this.fetch({
1579
- ...t,
1580
- meta: {
1581
- refetchPage: e
1582
- }
1583
- });
1584
- }
1585
- fetchOptimistic(e) {
1586
- const t = this.client.defaultQueryOptions(e), i = this.client.getQueryCache().build(this.client, t);
1587
- return i.isFetchingOptimistic = !0, i.fetch().then(() => this.createResult(i, t));
1588
- }
1589
- fetch(e) {
1590
- var t;
1591
- return this.executeFetch({
1592
- ...e,
1593
- cancelRefetch: (t = e.cancelRefetch) != null ? t : !0
1594
- }).then(() => (this.updateResult(), this.currentResult));
1595
- }
1596
- executeFetch(e) {
1597
- this.updateQuery();
1598
- let t = this.currentQuery.fetch(this.options, e);
1599
- return e != null && e.throwOnError || (t = t.catch(yi)), t;
1600
- }
1601
- updateStaleTimeout() {
1602
- if (this.clearStaleTimeout(), le || this.currentResult.isStale || !Ge(this.options.staleTime))
1603
- return;
1604
- const t = Ni(this.currentResult.dataUpdatedAt, this.options.staleTime) + 1;
1605
- this.staleTimeoutId = setTimeout(() => {
1606
- this.currentResult.isStale || this.updateResult();
1607
- }, t);
1608
- }
1609
- computeRefetchInterval() {
1610
- var e;
1611
- return typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (e = this.options.refetchInterval) != null ? e : !1;
1612
- }
1613
- updateRefetchInterval(e) {
1614
- this.clearRefetchInterval(), this.currentRefetchInterval = e, !(le || this.options.enabled === !1 || !Ge(this.currentRefetchInterval) || this.currentRefetchInterval === 0) && (this.refetchIntervalId = setInterval(() => {
1615
- (this.options.refetchIntervalInBackground || Ei.isFocused()) && this.executeFetch();
1616
- }, this.currentRefetchInterval));
1617
- }
1618
- updateTimers() {
1619
- this.updateStaleTimeout(), this.updateRefetchInterval(this.computeRefetchInterval());
1620
- }
1621
- clearStaleTimeout() {
1622
- this.staleTimeoutId && (clearTimeout(this.staleTimeoutId), this.staleTimeoutId = void 0);
1623
- }
1624
- clearRefetchInterval() {
1625
- this.refetchIntervalId && (clearInterval(this.refetchIntervalId), this.refetchIntervalId = void 0);
1626
- }
1627
- createResult(e, t) {
1628
- const i = this.currentQuery, a = this.options, s = this.currentResult, r = this.currentResultState, o = this.currentResultOptions, l = e !== i, u = l ? e.state : this.currentQueryInitialState, d = l ? this.currentResult : this.previousQueryResult, {
1629
- state: f
1630
- } = e;
1631
- let {
1632
- dataUpdatedAt: c,
1633
- error: S,
1634
- errorUpdatedAt: y,
1635
- fetchStatus: k,
1636
- status: N
1637
- } = f, O = !1, F = !1, I;
1638
- if (t._optimisticResults) {
1639
- const m = this.hasListeners(), p = !m && Xe(e, t), h = m && Ye(e, i, t, a);
1640
- (p || h) && (k = Ri(e.options.networkMode) ? "fetching" : "paused", c || (N = "loading")), t._optimisticResults === "isRestoring" && (k = "idle");
1641
- }
1642
- if (t.keepPreviousData && !f.dataUpdatedAt && d != null && d.isSuccess && N !== "error")
1643
- I = d.data, c = d.dataUpdatedAt, N = d.status, O = !0;
1644
- else if (t.select && typeof f.data != "undefined")
1645
- if (s && f.data === (r == null ? void 0 : r.data) && t.select === this.selectFn)
1646
- I = this.selectResult;
1647
- else
1648
- try {
1649
- this.selectFn = t.select, I = t.select(f.data), I = He(s == null ? void 0 : s.data, I, t), this.selectResult = I, this.selectError = null;
1650
- } catch (m) {
1651
- this.selectError = m;
1652
- }
1653
- else
1654
- I = f.data;
1655
- if (typeof t.placeholderData != "undefined" && typeof I == "undefined" && N === "loading") {
1656
- let m;
1657
- if (s != null && s.isPlaceholderData && t.placeholderData === (o == null ? void 0 : o.placeholderData))
1658
- m = s.data;
1659
- else if (m = typeof t.placeholderData == "function" ? t.placeholderData() : t.placeholderData, t.select && typeof m != "undefined")
1660
- try {
1661
- m = t.select(m), this.selectError = null;
1662
- } catch (p) {
1663
- this.selectError = p;
1664
- }
1665
- typeof m != "undefined" && (N = "success", I = He(s == null ? void 0 : s.data, m, t), F = !0);
1666
- }
1667
- this.selectError && (S = this.selectError, I = this.selectResult, y = Date.now(), N = "error");
1668
- const w = k === "fetching", D = N === "loading", L = N === "error";
1669
- return {
1670
- status: N,
1671
- fetchStatus: k,
1672
- isLoading: D,
1673
- isSuccess: N === "success",
1674
- isError: L,
1675
- isInitialLoading: D && w,
1676
- data: I,
1677
- dataUpdatedAt: c,
1678
- error: S,
1679
- errorUpdatedAt: y,
1680
- failureCount: f.fetchFailureCount,
1681
- failureReason: f.fetchFailureReason,
1682
- errorUpdateCount: f.errorUpdateCount,
1683
- isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
1684
- isFetchedAfterMount: f.dataUpdateCount > u.dataUpdateCount || f.errorUpdateCount > u.errorUpdateCount,
1685
- isFetching: w,
1686
- isRefetching: w && !D,
1687
- isLoadingError: L && f.dataUpdatedAt === 0,
1688
- isPaused: k === "paused",
1689
- isPlaceholderData: F,
1690
- isPreviousData: O,
1691
- isRefetchError: L && f.dataUpdatedAt !== 0,
1692
- isStale: Ae(e, t),
1693
- refetch: this.refetch,
1694
- remove: this.remove
1695
- };
1696
- }
1697
- updateResult(e) {
1698
- const t = this.currentResult, i = this.createResult(this.currentQuery, this.options);
1699
- if (this.currentResultState = this.currentQuery.state, this.currentResultOptions = this.options, Ce(i, t))
1700
- return;
1701
- this.currentResult = i;
1702
- const a = {
1703
- cache: !0
1704
- }, s = () => {
1705
- if (!t)
1706
- return !0;
1707
- const {
1708
- notifyOnChangeProps: r
1709
- } = this.options, o = typeof r == "function" ? r() : r;
1710
- if (o === "all" || !o && !this.trackedProps.size)
1711
- return !0;
1712
- const l = new Set(o != null ? o : this.trackedProps);
1713
- return this.options.useErrorBoundary && l.add("error"), Object.keys(this.currentResult).some((u) => {
1714
- const d = u;
1715
- return this.currentResult[d] !== t[d] && l.has(d);
1716
- });
1717
- };
1718
- (e == null ? void 0 : e.listeners) !== !1 && s() && (a.listeners = !0), this.notify({
1719
- ...a,
1720
- ...e
1721
- });
1722
- }
1723
- updateQuery() {
1724
- const e = this.client.getQueryCache().build(this.client, this.options);
1725
- if (e === this.currentQuery)
1726
- return;
1727
- const t = this.currentQuery;
1728
- this.currentQuery = e, this.currentQueryInitialState = e.state, this.previousQueryResult = this.currentResult, this.hasListeners() && (t == null || t.removeObserver(this), e.addObserver(this));
1729
- }
1730
- onQueryUpdate(e) {
1731
- const t = {};
1732
- e.type === "success" ? t.onSuccess = !e.manual : e.type === "error" && !Ii(e.error) && (t.onError = !0), this.updateResult(t), this.hasListeners() && this.updateTimers();
1733
- }
1734
- notify(e) {
1735
- Y.batch(() => {
1736
- if (e.onSuccess) {
1737
- var t, i, a, s;
1738
- (t = (i = this.options).onSuccess) == null || t.call(i, this.currentResult.data), (a = (s = this.options).onSettled) == null || a.call(s, this.currentResult.data, null);
1739
- } else if (e.onError) {
1740
- var r, o, l, u;
1741
- (r = (o = this.options).onError) == null || r.call(o, this.currentResult.error), (l = (u = this.options).onSettled) == null || l.call(u, void 0, this.currentResult.error);
1742
- }
1743
- e.listeners && this.listeners.forEach(({
1744
- listener: d
1745
- }) => {
1746
- d(this.currentResult);
1747
- }), e.cache && this.client.getQueryCache().notify({
1748
- query: this.currentQuery,
1749
- type: "observerResultsUpdated"
1750
- });
1751
- });
1752
- }
1753
- }
1754
- function Ai(n, e) {
1755
- return e.enabled !== !1 && !n.state.dataUpdatedAt && !(n.state.status === "error" && e.retryOnMount === !1);
1756
- }
1757
- function Xe(n, e) {
1758
- return Ai(n, e) || n.state.dataUpdatedAt > 0 && Ee(n, e, e.refetchOnMount);
1759
- }
1760
- function Ee(n, e, t) {
1761
- if (e.enabled !== !1) {
1762
- const i = typeof t == "function" ? t(n) : t;
1763
- return i === "always" || i !== !1 && Ae(n, e);
1764
- }
1765
- return !1;
1766
- }
1767
- function Ye(n, e, t, i) {
1768
- return t.enabled !== !1 && (n !== e || i.enabled === !1) && (!t.suspense || n.state.status !== "error") && Ae(n, t);
1769
- }
1770
- function Ae(n, e) {
1771
- return n.isStaleByTime(e.staleTime);
1772
- }
1773
- function Pi(n, e, t) {
1774
- return t.keepPreviousData ? !1 : t.placeholderData !== void 0 ? e.isPlaceholderData : !Ce(n.getCurrentResult(), e);
1775
- }
1776
- const Vi = Et.useSyncExternalStore, et = /* @__PURE__ */ M.createContext(void 0), _i = /* @__PURE__ */ M.createContext(!1);
1777
- function Ui(n, e) {
1778
- return n || (e && typeof window != "undefined" ? (window.ReactQueryClientContext || (window.ReactQueryClientContext = et), window.ReactQueryClientContext) : et);
1779
- }
1780
- const Mi = ({
1781
- context: n
1782
- } = {}) => {
1783
- const e = M.useContext(Ui(n, M.useContext(_i)));
1784
- if (!e)
1785
- throw new Error("No QueryClient set, use QueryClientProvider to set one");
1786
- return e;
1787
- }, Vt = /* @__PURE__ */ M.createContext(!1), $i = () => M.useContext(Vt);
1788
- Vt.Provider;
1789
- function ji() {
1790
- let n = !1;
1791
- return {
1792
- clearReset: () => {
1793
- n = !1;
1794
- },
1795
- reset: () => {
1796
- n = !0;
1797
- },
1798
- isReset: () => n
1799
- };
1800
- }
1801
- const zi = /* @__PURE__ */ M.createContext(ji()), Bi = () => M.useContext(zi);
1802
- function Qi(n, e) {
1803
- return typeof n == "function" ? n(...e) : !!n;
1804
- }
1805
- const Gi = (n, e) => {
1806
- (n.suspense || n.useErrorBoundary) && (e.isReset() || (n.retryOnMount = !1));
1807
- }, Ki = (n) => {
1808
- M.useEffect(() => {
1809
- n.clearReset();
1810
- }, [n]);
1811
- }, Wi = ({
1812
- result: n,
1813
- errorResetBoundary: e,
1814
- useErrorBoundary: t,
1815
- query: i
1816
- }) => n.isError && !e.isReset() && !n.isFetching && Qi(t, [n.error, i]), Ji = (n) => {
1817
- n.suspense && typeof n.staleTime != "number" && (n.staleTime = 1e3);
1818
- }, qi = (n, e) => n.isLoading && n.isFetching && !e, Hi = (n, e, t) => (n == null ? void 0 : n.suspense) && qi(e, t), Zi = (n, e, t) => e.fetchOptimistic(n).then(({
1819
- data: i
1820
- }) => {
1821
- n.onSuccess == null || n.onSuccess(i), n.onSettled == null || n.onSettled(i, null);
1822
- }).catch((i) => {
1823
- t.clearReset(), n.onError == null || n.onError(i), n.onSettled == null || n.onSettled(void 0, i);
1824
- });
1825
- function Xi(n, e) {
1826
- const t = Mi({
1827
- context: n.context
1828
- }), i = $i(), a = Bi(), s = t.defaultQueryOptions(n);
1829
- s._optimisticResults = i ? "isRestoring" : "optimistic", s.onError && (s.onError = Y.batchCalls(s.onError)), s.onSuccess && (s.onSuccess = Y.batchCalls(s.onSuccess)), s.onSettled && (s.onSettled = Y.batchCalls(s.onSettled)), Ji(s), Gi(s, a), Ki(a);
1830
- const [r] = M.useState(() => new e(t, s)), o = r.getOptimisticResult(s);
1831
- if (Vi(M.useCallback((l) => {
1832
- const u = i ? () => {
1833
- } : r.subscribe(Y.batchCalls(l));
1834
- return r.updateResult(), u;
1835
- }, [r, i]), () => r.getCurrentResult(), () => r.getCurrentResult()), M.useEffect(() => {
1836
- r.setOptions(s, {
1837
- listeners: !1
1838
- });
1839
- }, [s, r]), Hi(s, o, i))
1840
- throw Zi(s, r, a);
1841
- if (Wi({
1842
- result: o,
1843
- errorResetBoundary: a,
1844
- useErrorBoundary: s.useErrorBoundary,
1845
- query: r.getCurrentQuery()
1846
- }))
1847
- throw o.error;
1848
- return s.notifyOnChangeProps ? o : r.trackResult(o);
1849
- }
1850
- function Yi(n, e, t) {
1851
- const i = bi(n, e, t);
1852
- return Xi(i, Li);
1853
- }
1854
- const ea = () => ["account"], zs = () => {
1855
- const n = It((a) => {
1856
- var s;
1857
- return (s = a.config) == null ? void 0 : s.account;
1858
- }), [e, t] = un(Re), i = Yi(ea(), () => At.get(n), {
1859
- enabled: !!n && !e,
1860
- refetchOnWindowFocus: !1,
1861
- refetchOnMount: !1
1862
- });
1863
- return kt(() => {
1864
- const a = i.data;
1865
- !i.isSuccess || !a || t(a);
1866
- }, [i.status]), {
1867
- findQuery: i,
1868
- account: e
1869
- };
1870
- }, ta = vt();
1871
- async function na(n) {
1872
- const e = await At.get(n);
1873
- return ta.set(Re, e), e;
1874
- }
1875
- var ia = /* @__PURE__ */ ((n) => (n.CREATED = "CREATED", n.STARTING = "STARTING", n.LIVE = "LIVE", n.FINALIZED = "FINALIZED", n))(ia || {});
1876
- const Bs = {
1877
- ALL: "*",
1878
- CORE: "core:**",
1879
- LIVE_STREAMING_EVENT: "event:**",
1880
- EVENT_CHAT: "event:chat:**",
1881
- EVENT_PRODUCTS: "event:products:**",
1882
- CUSTOMIZE_LIVE: "customize-live:**",
1883
- PLAYER: "player:**",
1884
- SNACK_SIZE_VIDEO: "ssv:**",
1885
- SNACK_SIZE_VIDEO_ADMIN: "ssv-admin:**",
1886
- UI: "ui:**",
1887
- UTILS: "utils:**"
1888
- }, Qs = {
1889
- EVENT_STATUS_CHANGED: "event:statusChanged"
1890
- };
1891
- var aa = /* @__PURE__ */ ((n) => (n.English = "en", n.Spanish = "es", n.Portuguese = "pt", n))(aa || {}), sa = /* @__PURE__ */ ((n) => (n.COMBO = "Combo", n))(sa || {}), ra = /* @__PURE__ */ ((n) => (n.VTEX = "VTEX", n.PLATFORM = "platform", n.CACE = "CACE", n.GLOBAL_PAGE = "globalPage", n.DEV_LOCAL = "dev:local", n.CUSTOMIZATION = "customization", n.FAST_STORE = "faststore", n))(ra || {});
1892
- function oa(n) {
1893
- const e = Object.values(n);
1894
- return Object.assign({}, ...e);
1895
- }
1896
- function la(n) {
1897
- return Object.entries(n).reduce(
1898
- (e, [t, i]) => {
1899
- const a = oa(i);
1900
- return { ...e, [t]: a };
1901
- },
1902
- {}
1903
- );
1904
- }
1905
- function da(n, e) {
1906
- const t = la(e);
1907
- Object.entries(t).forEach(([i, a]) => {
1908
- n.addResourceBundle(i, "translation", a, !0);
1909
- });
1910
- }
1911
- function ua(n, e) {
1912
- if (!(n instanceof e))
1913
- throw new TypeError("Cannot call a class as a function");
1914
- }
1915
- function ee(n) {
1916
- "@babel/helpers - typeof";
1917
- return ee = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
1918
- return typeof e;
1919
- } : function(e) {
1920
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1921
- }, ee(n);
1922
- }
1923
- function ca(n, e) {
1924
- if (ee(n) !== "object" || n === null)
1925
- return n;
1926
- var t = n[Symbol.toPrimitive];
1927
- if (t !== void 0) {
1928
- var i = t.call(n, e || "default");
1929
- if (ee(i) !== "object")
1930
- return i;
1931
- throw new TypeError("@@toPrimitive must return a primitive value.");
1932
- }
1933
- return (e === "string" ? String : Number)(n);
1934
- }
1935
- function ma(n) {
1936
- var e = ca(n, "string");
1937
- return ee(e) === "symbol" ? e : String(e);
1938
- }
1939
- function tt(n, e) {
1940
- for (var t = 0; t < e.length; t++) {
1941
- var i = e[t];
1942
- i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, ma(i.key), i);
1943
- }
1944
- }
1945
- function fa(n, e, t) {
1946
- return e && tt(n.prototype, e), t && tt(n, t), Object.defineProperty(n, "prototype", {
1947
- writable: !1
1948
- }), n;
1949
- }
1950
- var _t = [], pa = _t.forEach, ha = _t.slice;
1951
- function ga(n) {
1952
- return pa.call(ha.call(arguments, 1), function(e) {
1953
- if (e)
1954
- for (var t in e)
1955
- n[t] === void 0 && (n[t] = e[t]);
1956
- }), n;
1957
- }
1958
- var nt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, ka = function(e, t, i) {
1959
- var a = i || {};
1960
- a.path = a.path || "/";
1961
- var s = encodeURIComponent(t), r = "".concat(e, "=").concat(s);
1962
- if (a.maxAge > 0) {
1963
- var o = a.maxAge - 0;
1964
- if (Number.isNaN(o))
1965
- throw new Error("maxAge should be a Number");
1966
- r += "; Max-Age=".concat(Math.floor(o));
1967
- }
1968
- if (a.domain) {
1969
- if (!nt.test(a.domain))
1970
- throw new TypeError("option domain is invalid");
1971
- r += "; Domain=".concat(a.domain);
1972
- }
1973
- if (a.path) {
1974
- if (!nt.test(a.path))
1975
- throw new TypeError("option path is invalid");
1976
- r += "; Path=".concat(a.path);
1977
- }
1978
- if (a.expires) {
1979
- if (typeof a.expires.toUTCString != "function")
1980
- throw new TypeError("option expires is invalid");
1981
- r += "; Expires=".concat(a.expires.toUTCString());
1982
- }
1983
- if (a.httpOnly && (r += "; HttpOnly"), a.secure && (r += "; Secure"), a.sameSite) {
1984
- var l = typeof a.sameSite == "string" ? a.sameSite.toLowerCase() : a.sameSite;
1985
- switch (l) {
1986
- case !0:
1987
- r += "; SameSite=Strict";
1988
- break;
1989
- case "lax":
1990
- r += "; SameSite=Lax";
1991
- break;
1992
- case "strict":
1993
- r += "; SameSite=Strict";
1994
- break;
1995
- case "none":
1996
- r += "; SameSite=None";
1997
- break;
1998
- default:
1999
- throw new TypeError("option sameSite is invalid");
2000
- }
2001
- }
2002
- return r;
2003
- }, it = {
2004
- create: function(e, t, i, a) {
2005
- var s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
2006
- path: "/",
2007
- sameSite: "strict"
2008
- };
2009
- i && (s.expires = /* @__PURE__ */ new Date(), s.expires.setTime(s.expires.getTime() + i * 60 * 1e3)), a && (s.domain = a), document.cookie = ka(e, encodeURIComponent(t), s);
2010
- },
2011
- read: function(e) {
2012
- for (var t = "".concat(e, "="), i = document.cookie.split(";"), a = 0; a < i.length; a++) {
2013
- for (var s = i[a]; s.charAt(0) === " "; )
2014
- s = s.substring(1, s.length);
2015
- if (s.indexOf(t) === 0)
2016
- return s.substring(t.length, s.length);
2017
- }
2018
- return null;
2019
- },
2020
- remove: function(e) {
2021
- this.create(e, "", -1);
2022
- }
2023
- }, va = {
2024
- name: "cookie",
2025
- lookup: function(e) {
2026
- var t;
2027
- if (e.lookupCookie && typeof document != "undefined") {
2028
- var i = it.read(e.lookupCookie);
2029
- i && (t = i);
2030
- }
2031
- return t;
2032
- },
2033
- cacheUserLanguage: function(e, t) {
2034
- t.lookupCookie && typeof document != "undefined" && it.create(t.lookupCookie, e, t.cookieMinutes, t.cookieDomain, t.cookieOptions);
2035
- }
2036
- }, Sa = {
2037
- name: "querystring",
2038
- lookup: function(e) {
2039
- var t;
2040
- if (typeof window != "undefined") {
2041
- var i = window.location.search;
2042
- !window.location.search && window.location.hash && window.location.hash.indexOf("?") > -1 && (i = window.location.hash.substring(window.location.hash.indexOf("?")));
2043
- for (var a = i.substring(1), s = a.split("&"), r = 0; r < s.length; r++) {
2044
- var o = s[r].indexOf("=");
2045
- if (o > 0) {
2046
- var l = s[r].substring(0, o);
2047
- l === e.lookupQuerystring && (t = s[r].substring(o + 1));
2048
- }
2049
- }
2050
- }
2051
- return t;
2052
- }
2053
- }, q = null, at = function() {
2054
- if (q !== null)
2055
- return q;
2056
- try {
2057
- q = window !== "undefined" && window.localStorage !== null;
2058
- var e = "i18next.translate.boo";
2059
- window.localStorage.setItem(e, "foo"), window.localStorage.removeItem(e);
2060
- } catch {
2061
- q = !1;
2062
- }
2063
- return q;
2064
- }, ya = {
2065
- name: "localStorage",
2066
- lookup: function(e) {
2067
- var t;
2068
- if (e.lookupLocalStorage && at()) {
2069
- var i = window.localStorage.getItem(e.lookupLocalStorage);
2070
- i && (t = i);
2071
- }
2072
- return t;
2073
- },
2074
- cacheUserLanguage: function(e, t) {
2075
- t.lookupLocalStorage && at() && window.localStorage.setItem(t.lookupLocalStorage, e);
2076
- }
2077
- }, H = null, st = function() {
2078
- if (H !== null)
2079
- return H;
2080
- try {
2081
- H = window !== "undefined" && window.sessionStorage !== null;
2082
- var e = "i18next.translate.boo";
2083
- window.sessionStorage.setItem(e, "foo"), window.sessionStorage.removeItem(e);
2084
- } catch {
2085
- H = !1;
2086
- }
2087
- return H;
2088
- }, Na = {
2089
- name: "sessionStorage",
2090
- lookup: function(e) {
2091
- var t;
2092
- if (e.lookupSessionStorage && st()) {
2093
- var i = window.sessionStorage.getItem(e.lookupSessionStorage);
2094
- i && (t = i);
2095
- }
2096
- return t;
2097
- },
2098
- cacheUserLanguage: function(e, t) {
2099
- t.lookupSessionStorage && st() && window.sessionStorage.setItem(t.lookupSessionStorage, e);
2100
- }
2101
- }, ba = {
2102
- name: "navigator",
2103
- lookup: function(e) {
2104
- var t = [];
2105
- if (typeof navigator != "undefined") {
2106
- if (navigator.languages)
2107
- for (var i = 0; i < navigator.languages.length; i++)
2108
- t.push(navigator.languages[i]);
2109
- navigator.userLanguage && t.push(navigator.userLanguage), navigator.language && t.push(navigator.language);
2110
- }
2111
- return t.length > 0 ? t : void 0;
2112
- }
2113
- }, Fa = {
2114
- name: "htmlTag",
2115
- lookup: function(e) {
2116
- var t, i = e.htmlTag || (typeof document != "undefined" ? document.documentElement : null);
2117
- return i && typeof i.getAttribute == "function" && (t = i.getAttribute("lang")), t;
2118
- }
2119
- }, wa = {
2120
- name: "path",
2121
- lookup: function(e) {
2122
- var t;
2123
- if (typeof window != "undefined") {
2124
- var i = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
2125
- if (i instanceof Array)
2126
- if (typeof e.lookupFromPathIndex == "number") {
2127
- if (typeof i[e.lookupFromPathIndex] != "string")
2128
- return;
2129
- t = i[e.lookupFromPathIndex].replace("/", "");
2130
- } else
2131
- t = i[0].replace("/", "");
2132
- }
2133
- return t;
2134
- }
2135
- }, Ca = {
2136
- name: "subdomain",
2137
- lookup: function(e) {
2138
- var t = typeof e.lookupFromSubdomainIndex == "number" ? e.lookupFromSubdomainIndex + 1 : 1, i = typeof window != "undefined" && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
2139
- if (i)
2140
- return i[t];
2141
- }
2142
- };
2143
- function Ea() {
2144
- return {
2145
- order: ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"],
2146
- lookupQuerystring: "lng",
2147
- lookupCookie: "i18next",
2148
- lookupLocalStorage: "i18nextLng",
2149
- lookupSessionStorage: "i18nextLng",
2150
- // cache user language
2151
- caches: ["localStorage"],
2152
- excludeCacheFor: ["cimode"],
2153
- // cookieMinutes: 10,
2154
- // cookieDomain: 'myDomain'
2155
- convertDetectedLanguage: function(e) {
2156
- return e;
2157
- }
2158
- };
2159
- }
2160
- var Ut = /* @__PURE__ */ function() {
2161
- function n(e) {
2162
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2163
- ua(this, n), this.type = "languageDetector", this.detectors = {}, this.init(e, t);
2164
- }
2165
- return fa(n, [{
2166
- key: "init",
2167
- value: function(t) {
2168
- var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2169
- this.services = t || {
2170
- languageUtils: {}
2171
- }, this.options = ga(i, this.options || {}, Ea()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = function(s) {
2172
- return s.replace("-", "_");
2173
- }), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = a, this.addDetector(va), this.addDetector(Sa), this.addDetector(ya), this.addDetector(Na), this.addDetector(ba), this.addDetector(Fa), this.addDetector(wa), this.addDetector(Ca);
2174
- }
2175
- }, {
2176
- key: "addDetector",
2177
- value: function(t) {
2178
- this.detectors[t.name] = t;
2179
- }
2180
- }, {
2181
- key: "detect",
2182
- value: function(t) {
2183
- var i = this;
2184
- t || (t = this.options.order);
2185
- var a = [];
2186
- return t.forEach(function(s) {
2187
- if (i.detectors[s]) {
2188
- var r = i.detectors[s].lookup(i.options);
2189
- r && typeof r == "string" && (r = [r]), r && (a = a.concat(r));
2190
- }
2191
- }), a = a.map(function(s) {
2192
- return i.options.convertDetectedLanguage(s);
2193
- }), this.services.languageUtils.getBestMatchFromCodes ? a : a.length > 0 ? a[0] : null;
2194
- }
2195
- }, {
2196
- key: "cacheUserLanguage",
2197
- value: function(t, i) {
2198
- var a = this;
2199
- i || (i = this.options.caches), i && (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(t) > -1 || i.forEach(function(s) {
2200
- a.detectors[s] && a.detectors[s].cacheUserLanguage(t, a.options);
2201
- }));
2202
- }
2203
- }]), n;
2204
- }();
2205
- Ut.type = "languageDetector";
2206
- function xa(n, e) {
2207
- n.use(e).use(Ut).init({
2208
- resources: {},
2209
- fallbackLng: "en",
2210
- debug: !1,
2211
- interpolation: {
2212
- escapeValue: !1,
2213
- // not needed for react as it escapes by default
2214
- format: (t, i, a) => {
2215
- if (i) {
2216
- const [s, ...r] = i.split(",").map((o) => o.trim());
2217
- if (s === "number")
2218
- return new Intl.NumberFormat(a).format(t);
2219
- if (s === "date")
2220
- return new Intl.DateTimeFormat(a).format(t);
2221
- if (s === "currency")
2222
- return new Intl.NumberFormat(a, {
2223
- style: "currency",
2224
- currency: r[0] || "USD",
2225
- currencyDisplay: "narrowSymbol"
2226
- }).format(t).replace("$", "").trim();
2227
- }
2228
- return t;
2229
- }
2230
- },
2231
- detection: {
2232
- // order and from where user language should be detected
2233
- order: [
2234
- "navigator",
2235
- "cookie",
2236
- "localStorage",
2237
- "sessionStorage",
2238
- "querystring",
2239
- "htmlTag",
2240
- "path",
2241
- "subdomain"
2242
- ]
2243
- }
2244
- });
2245
- }
2246
- const Oa = {
2247
- type: "logger",
2248
- log(n) {
2249
- this.output("log", n);
2250
- },
2251
- warn(n) {
2252
- this.output("warn", n);
2253
- },
2254
- error(n) {
2255
- this.output("error", n);
2256
- },
2257
- output(n, e) {
2258
- console && console[n] && console[n].apply(console, e);
2259
- }
2260
- };
2261
- class de {
2262
- constructor(e) {
2263
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2264
- this.init(e, t);
2265
- }
2266
- init(e) {
2267
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2268
- this.prefix = t.prefix || "i18next:", this.logger = e || Oa, this.options = t, this.debug = t.debug;
2269
- }
2270
- log() {
2271
- for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
2272
- t[i] = arguments[i];
2273
- return this.forward(t, "log", "", !0);
2274
- }
2275
- warn() {
2276
- for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
2277
- t[i] = arguments[i];
2278
- return this.forward(t, "warn", "", !0);
2279
- }
2280
- error() {
2281
- for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
2282
- t[i] = arguments[i];
2283
- return this.forward(t, "error", "");
2284
- }
2285
- deprecate() {
2286
- for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
2287
- t[i] = arguments[i];
2288
- return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
2289
- }
2290
- forward(e, t, i, a) {
2291
- return a && !this.debug ? null : (typeof e[0] == "string" && (e[0] = `${i}${this.prefix} ${e[0]}`), this.logger[t](e));
2292
- }
2293
- create(e) {
2294
- return new de(this.logger, {
2295
- prefix: `${this.prefix}:${e}:`,
2296
- ...this.options
2297
- });
2298
- }
2299
- clone(e) {
2300
- return e = e || this.options, e.prefix = e.prefix || this.prefix, new de(this.logger, e);
2301
- }
2302
- }
2303
- var $ = new de();
2304
- class ve {
2305
- constructor() {
2306
- this.observers = {};
2307
- }
2308
- on(e, t) {
2309
- return e.split(" ").forEach((i) => {
2310
- this.observers[i] = this.observers[i] || [], this.observers[i].push(t);
2311
- }), this;
2312
- }
2313
- off(e, t) {
2314
- if (this.observers[e]) {
2315
- if (!t) {
2316
- delete this.observers[e];
2317
- return;
2318
- }
2319
- this.observers[e] = this.observers[e].filter((i) => i !== t);
2320
- }
2321
- }
2322
- emit(e) {
2323
- for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
2324
- i[a - 1] = arguments[a];
2325
- this.observers[e] && [].concat(this.observers[e]).forEach((r) => {
2326
- r(...i);
2327
- }), this.observers["*"] && [].concat(this.observers["*"]).forEach((r) => {
2328
- r.apply(r, [e, ...i]);
2329
- });
2330
- }
2331
- }
2332
- function Z() {
2333
- let n, e;
2334
- const t = new Promise((i, a) => {
2335
- n = i, e = a;
2336
- });
2337
- return t.resolve = n, t.reject = e, t;
2338
- }
2339
- function rt(n) {
2340
- return n == null ? "" : "" + n;
2341
- }
2342
- function Ra(n, e, t) {
2343
- n.forEach((i) => {
2344
- e[i] && (t[i] = e[i]);
2345
- });
2346
- }
2347
- function Pe(n, e, t) {
2348
- function i(r) {
2349
- return r && r.indexOf("###") > -1 ? r.replace(/###/g, ".") : r;
2350
- }
2351
- function a() {
2352
- return !n || typeof n == "string";
2353
- }
2354
- const s = typeof e != "string" ? [].concat(e) : e.split(".");
2355
- for (; s.length > 1; ) {
2356
- if (a())
2357
- return {};
2358
- const r = i(s.shift());
2359
- !n[r] && t && (n[r] = new t()), Object.prototype.hasOwnProperty.call(n, r) ? n = n[r] : n = {};
2360
- }
2361
- return a() ? {} : {
2362
- obj: n,
2363
- k: i(s.shift())
2364
- };
2365
- }
2366
- function ot(n, e, t) {
2367
- const {
2368
- obj: i,
2369
- k: a
2370
- } = Pe(n, e, Object);
2371
- i[a] = t;
2372
- }
2373
- function Ta(n, e, t, i) {
2374
- const {
2375
- obj: a,
2376
- k: s
2377
- } = Pe(n, e, Object);
2378
- a[s] = a[s] || [], i && (a[s] = a[s].concat(t)), i || a[s].push(t);
2379
- }
2380
- function ue(n, e) {
2381
- const {
2382
- obj: t,
2383
- k: i
2384
- } = Pe(n, e);
2385
- if (t)
2386
- return t[i];
2387
- }
2388
- function Ia(n, e, t) {
2389
- const i = ue(n, t);
2390
- return i !== void 0 ? i : ue(e, t);
2391
- }
2392
- function Mt(n, e, t) {
2393
- for (const i in e)
2394
- i !== "__proto__" && i !== "constructor" && (i in n ? typeof n[i] == "string" || n[i] instanceof String || typeof e[i] == "string" || e[i] instanceof String ? t && (n[i] = e[i]) : Mt(n[i], e[i], t) : n[i] = e[i]);
2395
- return n;
2396
- }
2397
- function B(n) {
2398
- return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
2399
- }
2400
- var Da = {
2401
- "&": "&amp;",
2402
- "<": "&lt;",
2403
- ">": "&gt;",
2404
- '"': "&quot;",
2405
- "'": "&#39;",
2406
- "/": "&#x2F;"
2407
- };
2408
- function La(n) {
2409
- return typeof n == "string" ? n.replace(/[&<>"'\/]/g, (e) => Da[e]) : n;
2410
- }
2411
- const Aa = [" ", ",", "?", "!", ";"];
2412
- function Pa(n, e, t) {
2413
- e = e || "", t = t || "";
2414
- const i = Aa.filter((r) => e.indexOf(r) < 0 && t.indexOf(r) < 0);
2415
- if (i.length === 0)
2416
- return !0;
2417
- const a = new RegExp(`(${i.map((r) => r === "?" ? "\\?" : r).join("|")})`);
2418
- let s = !a.test(n);
2419
- if (!s) {
2420
- const r = n.indexOf(t);
2421
- r > 0 && !a.test(n.substring(0, r)) && (s = !0);
2422
- }
2423
- return s;
2424
- }
2425
- function ce(n, e) {
2426
- let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
2427
- if (!n)
2428
- return;
2429
- if (n[e])
2430
- return n[e];
2431
- const i = e.split(t);
2432
- let a = n;
2433
- for (let s = 0; s < i.length; ++s) {
2434
- if (!a || typeof a[i[s]] == "string" && s + 1 < i.length)
2435
- return;
2436
- if (a[i[s]] === void 0) {
2437
- let r = 2, o = i.slice(s, s + r).join(t), l = a[o];
2438
- for (; l === void 0 && i.length > s + r; )
2439
- r++, o = i.slice(s, s + r).join(t), l = a[o];
2440
- if (l === void 0)
2441
- return;
2442
- if (l === null)
2443
- return null;
2444
- if (e.endsWith(o)) {
2445
- if (typeof l == "string")
2446
- return l;
2447
- if (o && typeof l[o] == "string")
2448
- return l[o];
2449
- }
2450
- const u = i.slice(s + r).join(t);
2451
- return u ? ce(l, u, t) : void 0;
2452
- }
2453
- a = a[i[s]];
2454
- }
2455
- return a;
2456
- }
2457
- function me(n) {
2458
- return n && n.indexOf("_") > 0 ? n.replace("_", "-") : n;
2459
- }
2460
- class lt extends ve {
2461
- constructor(e) {
2462
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
2463
- ns: ["translation"],
2464
- defaultNS: "translation"
2465
- };
2466
- super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
2467
- }
2468
- addNamespaces(e) {
2469
- this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
2470
- }
2471
- removeNamespaces(e) {
2472
- const t = this.options.ns.indexOf(e);
2473
- t > -1 && this.options.ns.splice(t, 1);
2474
- }
2475
- getResource(e, t, i) {
2476
- let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
2477
- const s = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, r = a.ignoreJSONStructure !== void 0 ? a.ignoreJSONStructure : this.options.ignoreJSONStructure;
2478
- let o = [e, t];
2479
- i && typeof i != "string" && (o = o.concat(i)), i && typeof i == "string" && (o = o.concat(s ? i.split(s) : i)), e.indexOf(".") > -1 && (o = e.split("."));
2480
- const l = ue(this.data, o);
2481
- return l || !r || typeof i != "string" ? l : ce(this.data && this.data[e] && this.data[e][t], i, s);
2482
- }
2483
- addResource(e, t, i, a) {
2484
- let s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
2485
- silent: !1
2486
- };
2487
- const r = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator;
2488
- let o = [e, t];
2489
- i && (o = o.concat(r ? i.split(r) : i)), e.indexOf(".") > -1 && (o = e.split("."), a = t, t = o[1]), this.addNamespaces(t), ot(this.data, o, a), s.silent || this.emit("added", e, t, i, a);
2490
- }
2491
- addResources(e, t, i) {
2492
- let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
2493
- silent: !1
2494
- };
2495
- for (const s in i)
2496
- (typeof i[s] == "string" || Object.prototype.toString.apply(i[s]) === "[object Array]") && this.addResource(e, t, s, i[s], {
2497
- silent: !0
2498
- });
2499
- a.silent || this.emit("added", e, t, i);
2500
- }
2501
- addResourceBundle(e, t, i, a, s) {
2502
- let r = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
2503
- silent: !1
2504
- }, o = [e, t];
2505
- e.indexOf(".") > -1 && (o = e.split("."), a = i, i = t, t = o[1]), this.addNamespaces(t);
2506
- let l = ue(this.data, o) || {};
2507
- a ? Mt(l, i, s) : l = {
2508
- ...l,
2509
- ...i
2510
- }, ot(this.data, o, l), r.silent || this.emit("added", e, t, i);
2511
- }
2512
- removeResourceBundle(e, t) {
2513
- this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
2514
- }
2515
- hasResourceBundle(e, t) {
2516
- return this.getResource(e, t) !== void 0;
2517
- }
2518
- getResourceBundle(e, t) {
2519
- return t || (t = this.options.defaultNS), this.options.compatibilityAPI === "v1" ? {
2520
- ...this.getResource(e, t)
2521
- } : this.getResource(e, t);
2522
- }
2523
- getDataByLanguage(e) {
2524
- return this.data[e];
2525
- }
2526
- hasLanguageSomeTranslations(e) {
2527
- const t = this.getDataByLanguage(e);
2528
- return !!(t && Object.keys(t) || []).find((a) => t[a] && Object.keys(t[a]).length > 0);
2529
- }
2530
- toJSON() {
2531
- return this.data;
2532
- }
2533
- }
2534
- var $t = {
2535
- processors: {},
2536
- addPostProcessor(n) {
2537
- this.processors[n.name] = n;
2538
- },
2539
- handle(n, e, t, i, a) {
2540
- return n.forEach((s) => {
2541
- this.processors[s] && (e = this.processors[s].process(e, t, i, a));
2542
- }), e;
2543
- }
2544
- };
2545
- const dt = {};
2546
- class fe extends ve {
2547
- constructor(e) {
2548
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2549
- super(), Ra(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = $.create("translator");
2550
- }
2551
- changeLanguage(e) {
2552
- e && (this.language = e);
2553
- }
2554
- exists(e) {
2555
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
2556
- interpolation: {}
2557
- };
2558
- if (e == null)
2559
- return !1;
2560
- const i = this.resolve(e, t);
2561
- return i && i.res !== void 0;
2562
- }
2563
- extractFromKey(e, t) {
2564
- let i = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
2565
- i === void 0 && (i = ":");
2566
- const a = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
2567
- let s = t.ns || this.options.defaultNS || [];
2568
- const r = i && e.indexOf(i) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Pa(e, i, a);
2569
- if (r && !o) {
2570
- const l = e.match(this.interpolator.nestingRegexp);
2571
- if (l && l.length > 0)
2572
- return {
2573
- key: e,
2574
- namespaces: s
2575
- };
2576
- const u = e.split(i);
2577
- (i !== a || i === a && this.options.ns.indexOf(u[0]) > -1) && (s = u.shift()), e = u.join(a);
2578
- }
2579
- return typeof s == "string" && (s = [s]), {
2580
- key: e,
2581
- namespaces: s
2582
- };
2583
- }
2584
- translate(e, t, i) {
2585
- if (typeof t != "object" && this.options.overloadTranslationOptionHandler && (t = this.options.overloadTranslationOptionHandler(arguments)), typeof t == "object" && (t = {
2586
- ...t
2587
- }), t || (t = {}), e == null)
2588
- return "";
2589
- Array.isArray(e) || (e = [String(e)]);
2590
- const a = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, {
2591
- key: r,
2592
- namespaces: o
2593
- } = this.extractFromKey(e[e.length - 1], t), l = o[o.length - 1], u = t.lng || this.language, d = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
2594
- if (u && u.toLowerCase() === "cimode") {
2595
- if (d) {
2596
- const w = t.nsSeparator || this.options.nsSeparator;
2597
- return a ? {
2598
- res: `${l}${w}${r}`,
2599
- usedKey: r,
2600
- exactUsedKey: r,
2601
- usedLng: u,
2602
- usedNS: l,
2603
- usedParams: this.getUsedParamsDetails(t)
2604
- } : `${l}${w}${r}`;
2605
- }
2606
- return a ? {
2607
- res: r,
2608
- usedKey: r,
2609
- exactUsedKey: r,
2610
- usedLng: u,
2611
- usedNS: l,
2612
- usedParams: this.getUsedParamsDetails(t)
2613
- } : r;
2614
- }
2615
- const f = this.resolve(e, t);
2616
- let c = f && f.res;
2617
- const S = f && f.usedKey || r, y = f && f.exactUsedKey || r, k = Object.prototype.toString.apply(c), N = ["[object Number]", "[object Function]", "[object RegExp]"], O = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, F = !this.i18nFormat || this.i18nFormat.handleAsObject;
2618
- if (F && c && (typeof c != "string" && typeof c != "boolean" && typeof c != "number") && N.indexOf(k) < 0 && !(typeof O == "string" && k === "[object Array]")) {
2619
- if (!t.returnObjects && !this.options.returnObjects) {
2620
- this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
2621
- const w = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(S, c, {
2622
- ...t,
2623
- ns: o
2624
- }) : `key '${r} (${this.language})' returned an object instead of string.`;
2625
- return a ? (f.res = w, f.usedParams = this.getUsedParamsDetails(t), f) : w;
2626
- }
2627
- if (s) {
2628
- const w = k === "[object Array]", D = w ? [] : {}, L = w ? y : S;
2629
- for (const A in c)
2630
- if (Object.prototype.hasOwnProperty.call(c, A)) {
2631
- const m = `${L}${s}${A}`;
2632
- D[A] = this.translate(m, {
2633
- ...t,
2634
- joinArrays: !1,
2635
- ns: o
2636
- }), D[A] === m && (D[A] = c[A]);
2637
- }
2638
- c = D;
2639
- }
2640
- } else if (F && typeof O == "string" && k === "[object Array]")
2641
- c = c.join(O), c && (c = this.extendTranslation(c, e, t, i));
2642
- else {
2643
- let w = !1, D = !1;
2644
- const L = t.count !== void 0 && typeof t.count != "string", A = fe.hasDefaultValue(t), m = L ? this.pluralResolver.getSuffix(u, t.count, t) : "", p = t.ordinal && L ? this.pluralResolver.getSuffix(u, t.count, {
2645
- ordinal: !1
2646
- }) : "", h = t[`defaultValue${m}`] || t[`defaultValue${p}`] || t.defaultValue;
2647
- !this.isValidLookup(c) && A && (w = !0, c = h), this.isValidLookup(c) || (D = !0, c = r);
2648
- const b = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && D ? void 0 : c, C = A && h !== c && this.options.updateMissing;
2649
- if (D || w || C) {
2650
- if (this.logger.log(C ? "updateKey" : "missingKey", u, l, r, C ? h : c), s) {
2651
- const x = this.resolve(r, {
2652
- ...t,
2653
- keySeparator: !1
2654
- });
2655
- x && x.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
2656
- }
2657
- let v = [];
2658
- const E = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
2659
- if (this.options.saveMissingTo === "fallback" && E && E[0])
2660
- for (let x = 0; x < E.length; x++)
2661
- v.push(E[x]);
2662
- else
2663
- this.options.saveMissingTo === "all" ? v = this.languageUtils.toResolveHierarchy(t.lng || this.language) : v.push(t.lng || this.language);
2664
- const P = (x, T, V) => {
2665
- const ne = A && V !== c ? V : b;
2666
- this.options.missingKeyHandler ? this.options.missingKeyHandler(x, l, T, ne, C, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(x, l, T, ne, C, t), this.emit("missingKey", x, l, T, c);
2667
- };
2668
- this.options.saveMissing && (this.options.saveMissingPlurals && L ? v.forEach((x) => {
2669
- this.pluralResolver.getSuffixes(x, t).forEach((T) => {
2670
- P([x], r + T, t[`defaultValue${T}`] || h);
2671
- });
2672
- }) : P(v, r, h));
2673
- }
2674
- c = this.extendTranslation(c, e, t, f, i), D && c === r && this.options.appendNamespaceToMissingKey && (c = `${l}:${r}`), (D || w) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? c = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}:${r}` : r, w ? c : void 0) : c = this.options.parseMissingKeyHandler(c));
2675
- }
2676
- return a ? (f.res = c, f.usedParams = this.getUsedParamsDetails(t), f) : c;
2677
- }
2678
- extendTranslation(e, t, i, a, s) {
2679
- var r = this;
2680
- if (this.i18nFormat && this.i18nFormat.parse)
2681
- e = this.i18nFormat.parse(e, {
2682
- ...this.options.interpolation.defaultVariables,
2683
- ...i
2684
- }, i.lng || this.language || a.usedLng, a.usedNS, a.usedKey, {
2685
- resolved: a
2686
- });
2687
- else if (!i.skipInterpolation) {
2688
- i.interpolation && this.interpolator.init({
2689
- ...i,
2690
- interpolation: {
2691
- ...this.options.interpolation,
2692
- ...i.interpolation
2693
- }
2694
- });
2695
- const u = typeof e == "string" && (i && i.interpolation && i.interpolation.skipOnVariables !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
2696
- let d;
2697
- if (u) {
2698
- const c = e.match(this.interpolator.nestingRegexp);
2699
- d = c && c.length;
2700
- }
2701
- let f = i.replace && typeof i.replace != "string" ? i.replace : i;
2702
- if (this.options.interpolation.defaultVariables && (f = {
2703
- ...this.options.interpolation.defaultVariables,
2704
- ...f
2705
- }), e = this.interpolator.interpolate(e, f, i.lng || this.language, i), u) {
2706
- const c = e.match(this.interpolator.nestingRegexp), S = c && c.length;
2707
- d < S && (i.nest = !1);
2708
- }
2709
- !i.lng && this.options.compatibilityAPI !== "v1" && a && a.res && (i.lng = a.usedLng), i.nest !== !1 && (e = this.interpolator.nest(e, function() {
2710
- for (var c = arguments.length, S = new Array(c), y = 0; y < c; y++)
2711
- S[y] = arguments[y];
2712
- return s && s[0] === S[0] && !i.context ? (r.logger.warn(`It seems you are nesting recursively key: ${S[0]} in key: ${t[0]}`), null) : r.translate(...S, t);
2713
- }, i)), i.interpolation && this.interpolator.reset();
2714
- }
2715
- const o = i.postProcess || this.options.postProcess, l = typeof o == "string" ? [o] : o;
2716
- return e != null && l && l.length && i.applyPostProcessor !== !1 && (e = $t.handle(l, e, t, this.options && this.options.postProcessPassResolved ? {
2717
- i18nResolved: {
2718
- ...a,
2719
- usedParams: this.getUsedParamsDetails(i)
2720
- },
2721
- ...i
2722
- } : i, this)), e;
2723
- }
2724
- resolve(e) {
2725
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i, a, s, r, o;
2726
- return typeof e == "string" && (e = [e]), e.forEach((l) => {
2727
- if (this.isValidLookup(i))
2728
- return;
2729
- const u = this.extractFromKey(l, t), d = u.key;
2730
- a = d;
2731
- let f = u.namespaces;
2732
- this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
2733
- const c = t.count !== void 0 && typeof t.count != "string", S = c && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), y = t.context !== void 0 && (typeof t.context == "string" || typeof t.context == "number") && t.context !== "", k = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
2734
- f.forEach((N) => {
2735
- this.isValidLookup(i) || (o = N, !dt[`${k[0]}-${N}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(o) && (dt[`${k[0]}-${N}`] = !0, this.logger.warn(`key "${a}" for languages "${k.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!!!")), k.forEach((O) => {
2736
- if (this.isValidLookup(i))
2737
- return;
2738
- r = O;
2739
- const F = [d];
2740
- if (this.i18nFormat && this.i18nFormat.addLookupKeys)
2741
- this.i18nFormat.addLookupKeys(F, d, O, N, t);
2742
- else {
2743
- let w;
2744
- c && (w = this.pluralResolver.getSuffix(O, t.count, t));
2745
- const D = `${this.options.pluralSeparator}zero`, L = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
2746
- if (c && (F.push(d + w), t.ordinal && w.indexOf(L) === 0 && F.push(d + w.replace(L, this.options.pluralSeparator)), S && F.push(d + D)), y) {
2747
- const A = `${d}${this.options.contextSeparator}${t.context}`;
2748
- F.push(A), c && (F.push(A + w), t.ordinal && w.indexOf(L) === 0 && F.push(A + w.replace(L, this.options.pluralSeparator)), S && F.push(A + D));
2749
- }
2750
- }
2751
- let I;
2752
- for (; I = F.pop(); )
2753
- this.isValidLookup(i) || (s = I, i = this.getResource(O, N, I, t));
2754
- }));
2755
- });
2756
- }), {
2757
- res: i,
2758
- usedKey: a,
2759
- exactUsedKey: s,
2760
- usedLng: r,
2761
- usedNS: o
2762
- };
2763
- }
2764
- isValidLookup(e) {
2765
- return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
2766
- }
2767
- getResource(e, t, i) {
2768
- let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
2769
- return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(e, t, i, a) : this.resourceStore.getResource(e, t, i, a);
2770
- }
2771
- getUsedParamsDetails() {
2772
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2773
- const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], i = e.replace && typeof e.replace != "string";
2774
- let a = i ? e.replace : e;
2775
- if (i && typeof e.count != "undefined" && (a.count = e.count), this.options.interpolation.defaultVariables && (a = {
2776
- ...this.options.interpolation.defaultVariables,
2777
- ...a
2778
- }), !i) {
2779
- a = {
2780
- ...a
2781
- };
2782
- for (const s of t)
2783
- delete a[s];
2784
- }
2785
- return a;
2786
- }
2787
- static hasDefaultValue(e) {
2788
- const t = "defaultValue";
2789
- for (const i in e)
2790
- if (Object.prototype.hasOwnProperty.call(e, i) && t === i.substring(0, t.length) && e[i] !== void 0)
2791
- return !0;
2792
- return !1;
2793
- }
2794
- }
2795
- function Fe(n) {
2796
- return n.charAt(0).toUpperCase() + n.slice(1);
2797
- }
2798
- class ut {
2799
- constructor(e) {
2800
- this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = $.create("languageUtils");
2801
- }
2802
- getScriptPartFromCode(e) {
2803
- if (e = me(e), !e || e.indexOf("-") < 0)
2804
- return null;
2805
- const t = e.split("-");
2806
- return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
2807
- }
2808
- getLanguagePartFromCode(e) {
2809
- if (e = me(e), !e || e.indexOf("-") < 0)
2810
- return e;
2811
- const t = e.split("-");
2812
- return this.formatLanguageCode(t[0]);
2813
- }
2814
- formatLanguageCode(e) {
2815
- if (typeof e == "string" && e.indexOf("-") > -1) {
2816
- const t = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
2817
- let i = e.split("-");
2818
- return this.options.lowerCaseLng ? i = i.map((a) => a.toLowerCase()) : i.length === 2 ? (i[0] = i[0].toLowerCase(), i[1] = i[1].toUpperCase(), t.indexOf(i[1].toLowerCase()) > -1 && (i[1] = Fe(i[1].toLowerCase()))) : i.length === 3 && (i[0] = i[0].toLowerCase(), i[1].length === 2 && (i[1] = i[1].toUpperCase()), i[0] !== "sgn" && i[2].length === 2 && (i[2] = i[2].toUpperCase()), t.indexOf(i[1].toLowerCase()) > -1 && (i[1] = Fe(i[1].toLowerCase())), t.indexOf(i[2].toLowerCase()) > -1 && (i[2] = Fe(i[2].toLowerCase()))), i.join("-");
2819
- }
2820
- return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
2821
- }
2822
- isSupportedCode(e) {
2823
- return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
2824
- }
2825
- getBestMatchFromCodes(e) {
2826
- if (!e)
2827
- return null;
2828
- let t;
2829
- return e.forEach((i) => {
2830
- if (t)
2831
- return;
2832
- const a = this.formatLanguageCode(i);
2833
- (!this.options.supportedLngs || this.isSupportedCode(a)) && (t = a);
2834
- }), !t && this.options.supportedLngs && e.forEach((i) => {
2835
- if (t)
2836
- return;
2837
- const a = this.getLanguagePartFromCode(i);
2838
- if (this.isSupportedCode(a))
2839
- return t = a;
2840
- t = this.options.supportedLngs.find((s) => {
2841
- if (s === a)
2842
- return s;
2843
- if (!(s.indexOf("-") < 0 && a.indexOf("-") < 0) && s.indexOf(a) === 0)
2844
- return s;
2845
- });
2846
- }), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
2847
- }
2848
- getFallbackCodes(e, t) {
2849
- if (!e)
2850
- return [];
2851
- if (typeof e == "function" && (e = e(t)), typeof e == "string" && (e = [e]), Object.prototype.toString.apply(e) === "[object Array]")
2852
- return e;
2853
- if (!t)
2854
- return e.default || [];
2855
- let i = e[t];
2856
- return i || (i = e[this.getScriptPartFromCode(t)]), i || (i = e[this.formatLanguageCode(t)]), i || (i = e[this.getLanguagePartFromCode(t)]), i || (i = e.default), i || [];
2857
- }
2858
- toResolveHierarchy(e, t) {
2859
- const i = this.getFallbackCodes(t || this.options.fallbackLng || [], e), a = [], s = (r) => {
2860
- r && (this.isSupportedCode(r) ? a.push(r) : this.logger.warn(`rejecting language code not found in supportedLngs: ${r}`));
2861
- };
2862
- return typeof e == "string" && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && s(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && s(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && s(this.getLanguagePartFromCode(e))) : typeof e == "string" && s(this.formatLanguageCode(e)), i.forEach((r) => {
2863
- a.indexOf(r) < 0 && s(this.formatLanguageCode(r));
2864
- }), a;
2865
- }
2866
- }
2867
- let Va = [{
2868
- lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
2869
- nr: [1, 2],
2870
- fc: 1
2871
- }, {
2872
- lngs: ["af", "an", "ast", "az", "bg", "bn", "ca", "da", "de", "dev", "el", "en", "eo", "es", "et", "eu", "fi", "fo", "fur", "fy", "gl", "gu", "ha", "hi", "hu", "hy", "ia", "it", "kk", "kn", "ku", "lb", "mai", "ml", "mn", "mr", "nah", "nap", "nb", "ne", "nl", "nn", "no", "nso", "pa", "pap", "pms", "ps", "pt-PT", "rm", "sco", "se", "si", "so", "son", "sq", "sv", "sw", "ta", "te", "tk", "ur", "yo"],
2873
- nr: [1, 2],
2874
- fc: 2
2875
- }, {
2876
- lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"],
2877
- nr: [1],
2878
- fc: 3
2879
- }, {
2880
- lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"],
2881
- nr: [1, 2, 5],
2882
- fc: 4
2883
- }, {
2884
- lngs: ["ar"],
2885
- nr: [0, 1, 2, 3, 11, 100],
2886
- fc: 5
2887
- }, {
2888
- lngs: ["cs", "sk"],
2889
- nr: [1, 2, 5],
2890
- fc: 6
2891
- }, {
2892
- lngs: ["csb", "pl"],
2893
- nr: [1, 2, 5],
2894
- fc: 7
2895
- }, {
2896
- lngs: ["cy"],
2897
- nr: [1, 2, 3, 8],
2898
- fc: 8
2899
- }, {
2900
- lngs: ["fr"],
2901
- nr: [1, 2],
2902
- fc: 9
2903
- }, {
2904
- lngs: ["ga"],
2905
- nr: [1, 2, 3, 7, 11],
2906
- fc: 10
2907
- }, {
2908
- lngs: ["gd"],
2909
- nr: [1, 2, 3, 20],
2910
- fc: 11
2911
- }, {
2912
- lngs: ["is"],
2913
- nr: [1, 2],
2914
- fc: 12
2915
- }, {
2916
- lngs: ["jv"],
2917
- nr: [0, 1],
2918
- fc: 13
2919
- }, {
2920
- lngs: ["kw"],
2921
- nr: [1, 2, 3, 4],
2922
- fc: 14
2923
- }, {
2924
- lngs: ["lt"],
2925
- nr: [1, 2, 10],
2926
- fc: 15
2927
- }, {
2928
- lngs: ["lv"],
2929
- nr: [1, 2, 0],
2930
- fc: 16
2931
- }, {
2932
- lngs: ["mk"],
2933
- nr: [1, 2],
2934
- fc: 17
2935
- }, {
2936
- lngs: ["mnk"],
2937
- nr: [0, 1, 2],
2938
- fc: 18
2939
- }, {
2940
- lngs: ["mt"],
2941
- nr: [1, 2, 11, 20],
2942
- fc: 19
2943
- }, {
2944
- lngs: ["or"],
2945
- nr: [2, 1],
2946
- fc: 2
2947
- }, {
2948
- lngs: ["ro"],
2949
- nr: [1, 2, 20],
2950
- fc: 20
2951
- }, {
2952
- lngs: ["sl"],
2953
- nr: [5, 1, 2, 3],
2954
- fc: 21
2955
- }, {
2956
- lngs: ["he", "iw"],
2957
- nr: [1, 2, 20, 21],
2958
- fc: 22
2959
- }], _a = {
2960
- 1: function(n) {
2961
- return +(n > 1);
2962
- },
2963
- 2: function(n) {
2964
- return +(n != 1);
2965
- },
2966
- 3: function(n) {
2967
- return 0;
2968
- },
2969
- 4: function(n) {
2970
- return n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2;
2971
- },
2972
- 5: function(n) {
2973
- return n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
2974
- },
2975
- 6: function(n) {
2976
- return n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2;
2977
- },
2978
- 7: function(n) {
2979
- return n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2;
2980
- },
2981
- 8: function(n) {
2982
- return n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3;
2983
- },
2984
- 9: function(n) {
2985
- return +(n >= 2);
2986
- },
2987
- 10: function(n) {
2988
- return n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4;
2989
- },
2990
- 11: function(n) {
2991
- return n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3;
2992
- },
2993
- 12: function(n) {
2994
- return +(n % 10 != 1 || n % 100 == 11);
2995
- },
2996
- 13: function(n) {
2997
- return +(n !== 0);
2998
- },
2999
- 14: function(n) {
3000
- return n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3;
3001
- },
3002
- 15: function(n) {
3003
- return n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2;
3004
- },
3005
- 16: function(n) {
3006
- return n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2;
3007
- },
3008
- 17: function(n) {
3009
- return n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1;
3010
- },
3011
- 18: function(n) {
3012
- return n == 0 ? 0 : n == 1 ? 1 : 2;
3013
- },
3014
- 19: function(n) {
3015
- return n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3;
3016
- },
3017
- 20: function(n) {
3018
- return n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2;
3019
- },
3020
- 21: function(n) {
3021
- return n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0;
3022
- },
3023
- 22: function(n) {
3024
- return n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3;
3025
- }
3026
- };
3027
- const Ua = ["v1", "v2", "v3"], Ma = ["v4"], ct = {
3028
- zero: 0,
3029
- one: 1,
3030
- two: 2,
3031
- few: 3,
3032
- many: 4,
3033
- other: 5
3034
- };
3035
- function $a() {
3036
- const n = {};
3037
- return Va.forEach((e) => {
3038
- e.lngs.forEach((t) => {
3039
- n[t] = {
3040
- numbers: e.nr,
3041
- plurals: _a[e.fc]
3042
- };
3043
- });
3044
- }), n;
3045
- }
3046
- class ja {
3047
- constructor(e) {
3048
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3049
- this.languageUtils = e, this.options = t, this.logger = $.create("pluralResolver"), (!this.options.compatibilityJSON || Ma.includes(this.options.compatibilityJSON)) && (typeof Intl == "undefined" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = $a();
3050
- }
3051
- addRule(e, t) {
3052
- this.rules[e] = t;
3053
- }
3054
- getRule(e) {
3055
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3056
- if (this.shouldUseIntlApi())
3057
- try {
3058
- return new Intl.PluralRules(me(e), {
3059
- type: t.ordinal ? "ordinal" : "cardinal"
3060
- });
3061
- } catch {
3062
- return;
3063
- }
3064
- return this.rules[e] || this.rules[this.languageUtils.getLanguagePartFromCode(e)];
3065
- }
3066
- needsPlural(e) {
3067
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3068
- const i = this.getRule(e, t);
3069
- return this.shouldUseIntlApi() ? i && i.resolvedOptions().pluralCategories.length > 1 : i && i.numbers.length > 1;
3070
- }
3071
- getPluralFormsOfKey(e, t) {
3072
- let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3073
- return this.getSuffixes(e, i).map((a) => `${t}${a}`);
3074
- }
3075
- getSuffixes(e) {
3076
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3077
- const i = this.getRule(e, t);
3078
- return i ? this.shouldUseIntlApi() ? i.resolvedOptions().pluralCategories.sort((a, s) => ct[a] - ct[s]).map((a) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${a}`) : i.numbers.map((a) => this.getSuffix(e, a, t)) : [];
3079
- }
3080
- getSuffix(e, t) {
3081
- let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3082
- const a = this.getRule(e, i);
3083
- return a ? this.shouldUseIntlApi() ? `${this.options.prepend}${i.ordinal ? `ordinal${this.options.prepend}` : ""}${a.select(t)}` : this.getSuffixRetroCompatible(a, t) : (this.logger.warn(`no plural rule found for: ${e}`), "");
3084
- }
3085
- getSuffixRetroCompatible(e, t) {
3086
- const i = e.noAbs ? e.plurals(t) : e.plurals(Math.abs(t));
3087
- let a = e.numbers[i];
3088
- this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 && (a === 2 ? a = "plural" : a === 1 && (a = ""));
3089
- const s = () => this.options.prepend && a.toString() ? this.options.prepend + a.toString() : a.toString();
3090
- return this.options.compatibilityJSON === "v1" ? a === 1 ? "" : typeof a == "number" ? `_plural_${a.toString()}` : s() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 ? s() : this.options.prepend && i.toString() ? this.options.prepend + i.toString() : i.toString();
3091
- }
3092
- shouldUseIntlApi() {
3093
- return !Ua.includes(this.options.compatibilityJSON);
3094
- }
3095
- }
3096
- function mt(n, e, t) {
3097
- let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s = Ia(n, e, t);
3098
- return !s && a && typeof t == "string" && (s = ce(n, t, i), s === void 0 && (s = ce(e, t, i))), s;
3099
- }
3100
- class za {
3101
- constructor() {
3102
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3103
- this.logger = $.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
3104
- }
3105
- init() {
3106
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3107
- e.interpolation || (e.interpolation = {
3108
- escapeValue: !0
3109
- });
3110
- const t = e.interpolation;
3111
- this.escape = t.escape !== void 0 ? t.escape : La, this.escapeValue = t.escapeValue !== void 0 ? t.escapeValue : !0, this.useRawValueToEscape = t.useRawValueToEscape !== void 0 ? t.useRawValueToEscape : !1, this.prefix = t.prefix ? B(t.prefix) : t.prefixEscaped || "{{", this.suffix = t.suffix ? B(t.suffix) : t.suffixEscaped || "}}", this.formatSeparator = t.formatSeparator ? t.formatSeparator : t.formatSeparator || ",", this.unescapePrefix = t.unescapeSuffix ? "" : t.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : t.unescapeSuffix || "", this.nestingPrefix = t.nestingPrefix ? B(t.nestingPrefix) : t.nestingPrefixEscaped || B("$t("), this.nestingSuffix = t.nestingSuffix ? B(t.nestingSuffix) : t.nestingSuffixEscaped || B(")"), this.nestingOptionsSeparator = t.nestingOptionsSeparator ? t.nestingOptionsSeparator : t.nestingOptionsSeparator || ",", this.maxReplaces = t.maxReplaces ? t.maxReplaces : 1e3, this.alwaysFormat = t.alwaysFormat !== void 0 ? t.alwaysFormat : !1, this.resetRegExp();
3112
- }
3113
- reset() {
3114
- this.options && this.init(this.options);
3115
- }
3116
- resetRegExp() {
3117
- const e = `${this.prefix}(.+?)${this.suffix}`;
3118
- this.regexp = new RegExp(e, "g");
3119
- const t = `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;
3120
- this.regexpUnescape = new RegExp(t, "g");
3121
- const i = `${this.nestingPrefix}(.+?)${this.nestingSuffix}`;
3122
- this.nestingRegexp = new RegExp(i, "g");
3123
- }
3124
- interpolate(e, t, i, a) {
3125
- let s, r, o;
3126
- const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
3127
- function u(y) {
3128
- return y.replace(/\$/g, "$$$$");
3129
- }
3130
- const d = (y) => {
3131
- if (y.indexOf(this.formatSeparator) < 0) {
3132
- const F = mt(t, l, y, this.options.keySeparator, this.options.ignoreJSONStructure);
3133
- return this.alwaysFormat ? this.format(F, void 0, i, {
3134
- ...a,
3135
- ...t,
3136
- interpolationkey: y
3137
- }) : F;
3138
- }
3139
- const k = y.split(this.formatSeparator), N = k.shift().trim(), O = k.join(this.formatSeparator).trim();
3140
- return this.format(mt(t, l, N, this.options.keySeparator, this.options.ignoreJSONStructure), O, i, {
3141
- ...a,
3142
- ...t,
3143
- interpolationkey: N
3144
- });
3145
- };
3146
- this.resetRegExp();
3147
- const f = a && a.missingInterpolationHandler || this.options.missingInterpolationHandler, c = a && a.interpolation && a.interpolation.skipOnVariables !== void 0 ? a.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
3148
- return [{
3149
- regex: this.regexpUnescape,
3150
- safeValue: (y) => u(y)
3151
- }, {
3152
- regex: this.regexp,
3153
- safeValue: (y) => this.escapeValue ? u(this.escape(y)) : u(y)
3154
- }].forEach((y) => {
3155
- for (o = 0; s = y.regex.exec(e); ) {
3156
- const k = s[1].trim();
3157
- if (r = d(k), r === void 0)
3158
- if (typeof f == "function") {
3159
- const O = f(e, s, a);
3160
- r = typeof O == "string" ? O : "";
3161
- } else if (a && Object.prototype.hasOwnProperty.call(a, k))
3162
- r = "";
3163
- else if (c) {
3164
- r = s[0];
3165
- continue;
3166
- } else
3167
- this.logger.warn(`missed to pass in variable ${k} for interpolating ${e}`), r = "";
3168
- else
3169
- typeof r != "string" && !this.useRawValueToEscape && (r = rt(r));
3170
- const N = y.safeValue(r);
3171
- if (e = e.replace(s[0], N), c ? (y.regex.lastIndex += r.length, y.regex.lastIndex -= s[0].length) : y.regex.lastIndex = 0, o++, o >= this.maxReplaces)
3172
- break;
3173
- }
3174
- }), e;
3175
- }
3176
- nest(e, t) {
3177
- let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, a, s, r;
3178
- function o(l, u) {
3179
- const d = this.nestingOptionsSeparator;
3180
- if (l.indexOf(d) < 0)
3181
- return l;
3182
- const f = l.split(new RegExp(`${d}[ ]*{`));
3183
- let c = `{${f[1]}`;
3184
- l = f[0], c = this.interpolate(c, r);
3185
- const S = c.match(/'/g), y = c.match(/"/g);
3186
- (S && S.length % 2 === 0 && !y || y.length % 2 !== 0) && (c = c.replace(/'/g, '"'));
3187
- try {
3188
- r = JSON.parse(c), u && (r = {
3189
- ...u,
3190
- ...r
3191
- });
3192
- } catch (k) {
3193
- return this.logger.warn(`failed parsing options string in nesting for key ${l}`, k), `${l}${d}${c}`;
3194
- }
3195
- return delete r.defaultValue, l;
3196
- }
3197
- for (; a = this.nestingRegexp.exec(e); ) {
3198
- let l = [];
3199
- r = {
3200
- ...i
3201
- }, r = r.replace && typeof r.replace != "string" ? r.replace : r, r.applyPostProcessor = !1, delete r.defaultValue;
3202
- let u = !1;
3203
- if (a[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(a[1])) {
3204
- const d = a[1].split(this.formatSeparator).map((f) => f.trim());
3205
- a[1] = d.shift(), l = d, u = !0;
3206
- }
3207
- if (s = t(o.call(this, a[1].trim(), r), r), s && a[0] === e && typeof s != "string")
3208
- return s;
3209
- typeof s != "string" && (s = rt(s)), s || (this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`), s = ""), u && (s = l.reduce((d, f) => this.format(d, f, i.lng, {
3210
- ...i,
3211
- interpolationkey: a[1].trim()
3212
- }), s.trim())), e = e.replace(a[0], s), this.regexp.lastIndex = 0;
3213
- }
3214
- return e;
3215
- }
3216
- }
3217
- function Ba(n) {
3218
- let e = n.toLowerCase().trim();
3219
- const t = {};
3220
- if (n.indexOf("(") > -1) {
3221
- const i = n.split("(");
3222
- e = i[0].toLowerCase().trim();
3223
- const a = i[1].substring(0, i[1].length - 1);
3224
- e === "currency" && a.indexOf(":") < 0 ? t.currency || (t.currency = a.trim()) : e === "relativetime" && a.indexOf(":") < 0 ? t.range || (t.range = a.trim()) : a.split(";").forEach((r) => {
3225
- if (!r)
3226
- return;
3227
- const [o, ...l] = r.split(":"), u = l.join(":").trim().replace(/^'+|'+$/g, "");
3228
- t[o.trim()] || (t[o.trim()] = u), u === "false" && (t[o.trim()] = !1), u === "true" && (t[o.trim()] = !0), isNaN(u) || (t[o.trim()] = parseInt(u, 10));
3229
- });
3230
- }
3231
- return {
3232
- formatName: e,
3233
- formatOptions: t
3234
- };
3235
- }
3236
- function Q(n) {
3237
- const e = {};
3238
- return function(i, a, s) {
3239
- const r = a + JSON.stringify(s);
3240
- let o = e[r];
3241
- return o || (o = n(me(a), s), e[r] = o), o(i);
3242
- };
3243
- }
3244
- class Qa {
3245
- constructor() {
3246
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3247
- this.logger = $.create("formatter"), this.options = e, this.formats = {
3248
- number: Q((t, i) => {
3249
- const a = new Intl.NumberFormat(t, {
3250
- ...i
3251
- });
3252
- return (s) => a.format(s);
3253
- }),
3254
- currency: Q((t, i) => {
3255
- const a = new Intl.NumberFormat(t, {
3256
- ...i,
3257
- style: "currency"
3258
- });
3259
- return (s) => a.format(s);
3260
- }),
3261
- datetime: Q((t, i) => {
3262
- const a = new Intl.DateTimeFormat(t, {
3263
- ...i
3264
- });
3265
- return (s) => a.format(s);
3266
- }),
3267
- relativetime: Q((t, i) => {
3268
- const a = new Intl.RelativeTimeFormat(t, {
3269
- ...i
3270
- });
3271
- return (s) => a.format(s, i.range || "day");
3272
- }),
3273
- list: Q((t, i) => {
3274
- const a = new Intl.ListFormat(t, {
3275
- ...i
3276
- });
3277
- return (s) => a.format(s);
3278
- })
3279
- }, this.init(e);
3280
- }
3281
- init(e) {
3282
- const i = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
3283
- interpolation: {}
3284
- }).interpolation;
3285
- this.formatSeparator = i.formatSeparator ? i.formatSeparator : i.formatSeparator || ",";
3286
- }
3287
- add(e, t) {
3288
- this.formats[e.toLowerCase().trim()] = t;
3289
- }
3290
- addCached(e, t) {
3291
- this.formats[e.toLowerCase().trim()] = Q(t);
3292
- }
3293
- format(e, t, i) {
3294
- let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
3295
- return t.split(this.formatSeparator).reduce((o, l) => {
3296
- const {
3297
- formatName: u,
3298
- formatOptions: d
3299
- } = Ba(l);
3300
- if (this.formats[u]) {
3301
- let f = o;
3302
- try {
3303
- const c = a && a.formatParams && a.formatParams[a.interpolationkey] || {}, S = c.locale || c.lng || a.locale || a.lng || i;
3304
- f = this.formats[u](o, S, {
3305
- ...d,
3306
- ...a,
3307
- ...c
3308
- });
3309
- } catch (c) {
3310
- this.logger.warn(c);
3311
- }
3312
- return f;
3313
- } else
3314
- this.logger.warn(`there was no format function for ${u}`);
3315
- return o;
3316
- }, e);
3317
- }
3318
- }
3319
- function Ga(n, e) {
3320
- n.pending[e] !== void 0 && (delete n.pending[e], n.pendingCount--);
3321
- }
3322
- class Ka extends ve {
3323
- constructor(e, t, i) {
3324
- let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
3325
- super(), this.backend = e, this.store = t, this.services = i, this.languageUtils = i.languageUtils, this.options = a, this.logger = $.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 && this.backend.init && this.backend.init(i, a.backend, a);
3326
- }
3327
- queueLoad(e, t, i, a) {
3328
- const s = {}, r = {}, o = {}, l = {};
3329
- return e.forEach((u) => {
3330
- let d = !0;
3331
- t.forEach((f) => {
3332
- const c = `${u}|${f}`;
3333
- !i.reload && this.store.hasResourceBundle(u, f) ? this.state[c] = 2 : this.state[c] < 0 || (this.state[c] === 1 ? r[c] === void 0 && (r[c] = !0) : (this.state[c] = 1, d = !1, r[c] === void 0 && (r[c] = !0), s[c] === void 0 && (s[c] = !0), l[f] === void 0 && (l[f] = !0)));
3334
- }), d || (o[u] = !0);
3335
- }), (Object.keys(s).length || Object.keys(r).length) && this.queue.push({
3336
- pending: r,
3337
- pendingCount: Object.keys(r).length,
3338
- loaded: {},
3339
- errors: [],
3340
- callback: a
3341
- }), {
3342
- toLoad: Object.keys(s),
3343
- pending: Object.keys(r),
3344
- toLoadLanguages: Object.keys(o),
3345
- toLoadNamespaces: Object.keys(l)
3346
- };
3347
- }
3348
- loaded(e, t, i) {
3349
- const a = e.split("|"), s = a[0], r = a[1];
3350
- t && this.emit("failedLoading", s, r, t), i && this.store.addResourceBundle(s, r, i), this.state[e] = t ? -1 : 2;
3351
- const o = {};
3352
- this.queue.forEach((l) => {
3353
- Ta(l.loaded, [s], r), Ga(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((u) => {
3354
- o[u] || (o[u] = {});
3355
- const d = l.loaded[u];
3356
- d.length && d.forEach((f) => {
3357
- o[u][f] === void 0 && (o[u][f] = !0);
3358
- });
3359
- }), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback());
3360
- }), this.emit("loaded", o), this.queue = this.queue.filter((l) => !l.done);
3361
- }
3362
- read(e, t, i) {
3363
- let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, r = arguments.length > 5 ? arguments[5] : void 0;
3364
- if (!e.length)
3365
- return r(null, {});
3366
- if (this.readingCalls >= this.maxParallelReads) {
3367
- this.waitingReads.push({
3368
- lng: e,
3369
- ns: t,
3370
- fcName: i,
3371
- tried: a,
3372
- wait: s,
3373
- callback: r
3374
- });
3375
- return;
3376
- }
3377
- this.readingCalls++;
3378
- const o = (u, d) => {
3379
- if (this.readingCalls--, this.waitingReads.length > 0) {
3380
- const f = this.waitingReads.shift();
3381
- this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
3382
- }
3383
- if (u && d && a < this.maxRetries) {
3384
- setTimeout(() => {
3385
- this.read.call(this, e, t, i, a + 1, s * 2, r);
3386
- }, s);
3387
- return;
3388
- }
3389
- r(u, d);
3390
- }, l = this.backend[i].bind(this.backend);
3391
- if (l.length === 2) {
3392
- try {
3393
- const u = l(e, t);
3394
- u && typeof u.then == "function" ? u.then((d) => o(null, d)).catch(o) : o(null, u);
3395
- } catch (u) {
3396
- o(u);
3397
- }
3398
- return;
3399
- }
3400
- return l(e, t, o);
3401
- }
3402
- prepareLoading(e, t) {
3403
- let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, a = arguments.length > 3 ? arguments[3] : void 0;
3404
- if (!this.backend)
3405
- return this.logger.warn("No backend was added via i18next.use. Will not load resources."), a && a();
3406
- typeof e == "string" && (e = this.languageUtils.toResolveHierarchy(e)), typeof t == "string" && (t = [t]);
3407
- const s = this.queueLoad(e, t, i, a);
3408
- if (!s.toLoad.length)
3409
- return s.pending.length || a(), null;
3410
- s.toLoad.forEach((r) => {
3411
- this.loadOne(r);
3412
- });
3413
- }
3414
- load(e, t, i) {
3415
- this.prepareLoading(e, t, {}, i);
3416
- }
3417
- reload(e, t, i) {
3418
- this.prepareLoading(e, t, {
3419
- reload: !0
3420
- }, i);
3421
- }
3422
- loadOne(e) {
3423
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
3424
- const i = e.split("|"), a = i[0], s = i[1];
3425
- this.read(a, s, "read", void 0, void 0, (r, o) => {
3426
- r && this.logger.warn(`${t}loading namespace ${s} for language ${a} failed`, r), !r && o && this.logger.log(`${t}loaded namespace ${s} for language ${a}`, o), this.loaded(e, r, o);
3427
- });
3428
- }
3429
- saveMissing(e, t, i, a, s) {
3430
- let r = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
3431
- };
3432
- if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(t)) {
3433
- this.logger.warn(`did not save key "${i}" as the namespace "${t}" 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!!!");
3434
- return;
3435
- }
3436
- if (!(i == null || i === "")) {
3437
- if (this.backend && this.backend.create) {
3438
- const l = {
3439
- ...r,
3440
- isUpdate: s
3441
- }, u = this.backend.create.bind(this.backend);
3442
- if (u.length < 6)
3443
- try {
3444
- let d;
3445
- u.length === 5 ? d = u(e, t, i, a, l) : d = u(e, t, i, a), d && typeof d.then == "function" ? d.then((f) => o(null, f)).catch(o) : o(null, d);
3446
- } catch (d) {
3447
- o(d);
3448
- }
3449
- else
3450
- u(e, t, i, a, o, l);
3451
- }
3452
- !e || !e[0] || this.store.addResource(e[0], t, i, a);
3453
- }
3454
- }
3455
- }
3456
- function ft() {
3457
- return {
3458
- debug: !1,
3459
- initImmediate: !0,
3460
- ns: ["translation"],
3461
- defaultNS: ["translation"],
3462
- fallbackLng: ["dev"],
3463
- fallbackNS: !1,
3464
- supportedLngs: !1,
3465
- nonExplicitSupportedLngs: !1,
3466
- load: "all",
3467
- preload: !1,
3468
- simplifyPluralSuffix: !0,
3469
- keySeparator: ".",
3470
- nsSeparator: ":",
3471
- pluralSeparator: "_",
3472
- contextSeparator: "_",
3473
- partialBundledLanguages: !1,
3474
- saveMissing: !1,
3475
- updateMissing: !1,
3476
- saveMissingTo: "fallback",
3477
- saveMissingPlurals: !0,
3478
- missingKeyHandler: !1,
3479
- missingInterpolationHandler: !1,
3480
- postProcess: !1,
3481
- postProcessPassResolved: !1,
3482
- returnNull: !1,
3483
- returnEmptyString: !0,
3484
- returnObjects: !1,
3485
- joinArrays: !1,
3486
- returnedObjectHandler: !1,
3487
- parseMissingKeyHandler: !1,
3488
- appendNamespaceToMissingKey: !1,
3489
- appendNamespaceToCIMode: !1,
3490
- overloadTranslationOptionHandler: function(e) {
3491
- let t = {};
3492
- if (typeof e[1] == "object" && (t = e[1]), typeof e[1] == "string" && (t.defaultValue = e[1]), typeof e[2] == "string" && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
3493
- const i = e[3] || e[2];
3494
- Object.keys(i).forEach((a) => {
3495
- t[a] = i[a];
3496
- });
3497
- }
3498
- return t;
3499
- },
3500
- interpolation: {
3501
- escapeValue: !0,
3502
- format: (n, e, t, i) => n,
3503
- prefix: "{{",
3504
- suffix: "}}",
3505
- formatSeparator: ",",
3506
- unescapePrefix: "-",
3507
- nestingPrefix: "$t(",
3508
- nestingSuffix: ")",
3509
- nestingOptionsSeparator: ",",
3510
- maxReplaces: 1e3,
3511
- skipOnVariables: !0
3512
- }
3513
- };
3514
- }
3515
- function pt(n) {
3516
- return typeof n.ns == "string" && (n.ns = [n.ns]), typeof n.fallbackLng == "string" && (n.fallbackLng = [n.fallbackLng]), typeof n.fallbackNS == "string" && (n.fallbackNS = [n.fallbackNS]), n.supportedLngs && n.supportedLngs.indexOf("cimode") < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), n;
3517
- }
3518
- function se() {
3519
- }
3520
- function Wa(n) {
3521
- Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
3522
- typeof n[t] == "function" && (n[t] = n[t].bind(n));
3523
- });
3524
- }
3525
- class te extends ve {
3526
- constructor() {
3527
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
3528
- if (super(), this.options = pt(e), this.services = {}, this.logger = $, this.modules = {
3529
- external: []
3530
- }, Wa(this), t && !this.isInitialized && !e.isClone) {
3531
- if (!this.options.initImmediate)
3532
- return this.init(e, t), this;
3533
- setTimeout(() => {
3534
- this.init(e, t);
3535
- }, 0);
3536
- }
3537
- }
3538
- init() {
3539
- var e = this;
3540
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = arguments.length > 1 ? arguments[1] : void 0;
3541
- typeof t == "function" && (i = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (typeof t.ns == "string" ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
3542
- const a = ft();
3543
- this.options = {
3544
- ...a,
3545
- ...this.options,
3546
- ...pt(t)
3547
- }, this.options.compatibilityAPI !== "v1" && (this.options.interpolation = {
3548
- ...a.interpolation,
3549
- ...this.options.interpolation
3550
- }), t.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = t.keySeparator), t.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = t.nsSeparator);
3551
- function s(d) {
3552
- return d ? typeof d == "function" ? new d() : d : null;
3553
- }
3554
- if (!this.options.isClone) {
3555
- this.modules.logger ? $.init(s(this.modules.logger), this.options) : $.init(null, this.options);
3556
- let d;
3557
- this.modules.formatter ? d = this.modules.formatter : typeof Intl != "undefined" && (d = Qa);
3558
- const f = new ut(this.options);
3559
- this.store = new lt(this.options.resources, this.options);
3560
- const c = this.services;
3561
- c.logger = $, c.resourceStore = this.store, c.languageUtils = f, c.pluralResolver = new ja(f, {
3562
- prepend: this.options.pluralSeparator,
3563
- compatibilityJSON: this.options.compatibilityJSON,
3564
- simplifyPluralSuffix: this.options.simplifyPluralSuffix
3565
- }), d && (!this.options.interpolation.format || this.options.interpolation.format === a.interpolation.format) && (c.formatter = s(d), c.formatter.init(c, this.options), this.options.interpolation.format = c.formatter.format.bind(c.formatter)), c.interpolator = new za(this.options), c.utils = {
3566
- hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
3567
- }, c.backendConnector = new Ka(s(this.modules.backend), c.resourceStore, c, this.options), c.backendConnector.on("*", function(S) {
3568
- for (var y = arguments.length, k = new Array(y > 1 ? y - 1 : 0), N = 1; N < y; N++)
3569
- k[N - 1] = arguments[N];
3570
- e.emit(S, ...k);
3571
- }), this.modules.languageDetector && (c.languageDetector = s(this.modules.languageDetector), c.languageDetector.init && c.languageDetector.init(c, this.options.detection, this.options)), this.modules.i18nFormat && (c.i18nFormat = s(this.modules.i18nFormat), c.i18nFormat.init && c.i18nFormat.init(this)), this.translator = new fe(this.services, this.options), this.translator.on("*", function(S) {
3572
- for (var y = arguments.length, k = new Array(y > 1 ? y - 1 : 0), N = 1; N < y; N++)
3573
- k[N - 1] = arguments[N];
3574
- e.emit(S, ...k);
3575
- }), this.modules.external.forEach((S) => {
3576
- S.init && S.init(this);
3577
- });
3578
- }
3579
- if (this.format = this.options.interpolation.format, i || (i = se), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3580
- const d = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
3581
- d.length > 0 && d[0] !== "dev" && (this.options.lng = d[0]);
3582
- }
3583
- !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((d) => {
3584
- this[d] = function() {
3585
- return e.store[d](...arguments);
3586
- };
3587
- }), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((d) => {
3588
- this[d] = function() {
3589
- return e.store[d](...arguments), e;
3590
- };
3591
- });
3592
- const l = Z(), u = () => {
3593
- const d = (f, c) => {
3594
- this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), l.resolve(c), i(f, c);
3595
- };
3596
- if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized)
3597
- return d(null, this.t.bind(this));
3598
- this.changeLanguage(this.options.lng, d);
3599
- };
3600
- return this.options.resources || !this.options.initImmediate ? u() : setTimeout(u, 0), l;
3601
- }
3602
- loadResources(e) {
3603
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : se;
3604
- const a = typeof e == "string" ? e : this.language;
3605
- if (typeof e == "function" && (i = e), !this.options.resources || this.options.partialBundledLanguages) {
3606
- if (a && a.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0))
3607
- return i();
3608
- const s = [], r = (o) => {
3609
- if (!o || o === "cimode")
3610
- return;
3611
- this.services.languageUtils.toResolveHierarchy(o).forEach((u) => {
3612
- u !== "cimode" && s.indexOf(u) < 0 && s.push(u);
3613
- });
3614
- };
3615
- a ? r(a) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((l) => r(l)), this.options.preload && this.options.preload.forEach((o) => r(o)), this.services.backendConnector.load(s, this.options.ns, (o) => {
3616
- !o && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), i(o);
3617
- });
3618
- } else
3619
- i(null);
3620
- }
3621
- reloadResources(e, t, i) {
3622
- const a = Z();
3623
- return e || (e = this.languages), t || (t = this.options.ns), i || (i = se), this.services.backendConnector.reload(e, t, (s) => {
3624
- a.resolve(), i(s);
3625
- }), a;
3626
- }
3627
- use(e) {
3628
- if (!e)
3629
- throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
3630
- if (!e.type)
3631
- throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
3632
- 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" && $t.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
3633
- }
3634
- setResolvedLanguage(e) {
3635
- if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1))
3636
- for (let t = 0; t < this.languages.length; t++) {
3637
- const i = this.languages[t];
3638
- if (!(["cimode", "dev"].indexOf(i) > -1) && this.store.hasLanguageSomeTranslations(i)) {
3639
- this.resolvedLanguage = i;
3640
- break;
3641
- }
3642
- }
3643
- }
3644
- changeLanguage(e, t) {
3645
- var i = this;
3646
- this.isLanguageChangingTo = e;
3647
- const a = Z();
3648
- this.emit("languageChanging", e);
3649
- const s = (l) => {
3650
- this.language = l, this.languages = this.services.languageUtils.toResolveHierarchy(l), this.resolvedLanguage = void 0, this.setResolvedLanguage(l);
3651
- }, r = (l, u) => {
3652
- u ? (s(u), this.translator.changeLanguage(u), this.isLanguageChangingTo = void 0, this.emit("languageChanged", u), this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0, a.resolve(function() {
3653
- return i.t(...arguments);
3654
- }), t && t(l, function() {
3655
- return i.t(...arguments);
3656
- });
3657
- }, o = (l) => {
3658
- !e && !l && this.services.languageDetector && (l = []);
3659
- const u = typeof l == "string" ? l : this.services.languageUtils.getBestMatchFromCodes(l);
3660
- u && (this.language || s(u), this.translator.language || this.translator.changeLanguage(u), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(u)), this.loadResources(u, (d) => {
3661
- r(d, u);
3662
- });
3663
- };
3664
- return !e && this.services.languageDetector && !this.services.languageDetector.async ? o(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(o) : this.services.languageDetector.detect(o) : o(e), a;
3665
- }
3666
- getFixedT(e, t, i) {
3667
- var a = this;
3668
- const s = function(r, o) {
3669
- let l;
3670
- if (typeof o != "object") {
3671
- for (var u = arguments.length, d = new Array(u > 2 ? u - 2 : 0), f = 2; f < u; f++)
3672
- d[f - 2] = arguments[f];
3673
- l = a.options.overloadTranslationOptionHandler([r, o].concat(d));
3674
- } else
3675
- l = {
3676
- ...o
3677
- };
3678
- l.lng = l.lng || s.lng, l.lngs = l.lngs || s.lngs, l.ns = l.ns || s.ns, l.keyPrefix = l.keyPrefix || i || s.keyPrefix;
3679
- const c = a.options.keySeparator || ".";
3680
- let S;
3681
- return l.keyPrefix && Array.isArray(r) ? S = r.map((y) => `${l.keyPrefix}${c}${y}`) : S = l.keyPrefix ? `${l.keyPrefix}${c}${r}` : r, a.t(S, l);
3682
- };
3683
- return typeof e == "string" ? s.lng = e : s.lngs = e, s.ns = t, s.keyPrefix = i, s;
3684
- }
3685
- t() {
3686
- return this.translator && this.translator.translate(...arguments);
3687
- }
3688
- exists() {
3689
- return this.translator && this.translator.exists(...arguments);
3690
- }
3691
- setDefaultNamespace(e) {
3692
- this.options.defaultNS = e;
3693
- }
3694
- hasLoadedNamespace(e) {
3695
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3696
- if (!this.isInitialized)
3697
- return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
3698
- if (!this.languages || !this.languages.length)
3699
- return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
3700
- const i = t.lng || this.resolvedLanguage || this.languages[0], a = this.options ? this.options.fallbackLng : !1, s = this.languages[this.languages.length - 1];
3701
- if (i.toLowerCase() === "cimode")
3702
- return !0;
3703
- const r = (o, l) => {
3704
- const u = this.services.backendConnector.state[`${o}|${l}`];
3705
- return u === -1 || u === 2;
3706
- };
3707
- if (t.precheck) {
3708
- const o = t.precheck(this, r);
3709
- if (o !== void 0)
3710
- return o;
3711
- }
3712
- return !!(this.hasResourceBundle(i, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || r(i, e) && (!a || r(s, e)));
3713
- }
3714
- loadNamespaces(e, t) {
3715
- const i = Z();
3716
- return this.options.ns ? (typeof e == "string" && (e = [e]), e.forEach((a) => {
3717
- this.options.ns.indexOf(a) < 0 && this.options.ns.push(a);
3718
- }), this.loadResources((a) => {
3719
- i.resolve(), t && t(a);
3720
- }), i) : (t && t(), Promise.resolve());
3721
- }
3722
- loadLanguages(e, t) {
3723
- const i = Z();
3724
- typeof e == "string" && (e = [e]);
3725
- const a = this.options.preload || [], s = e.filter((r) => a.indexOf(r) < 0);
3726
- return s.length ? (this.options.preload = a.concat(s), this.loadResources((r) => {
3727
- i.resolve(), t && t(r);
3728
- }), i) : (t && t(), Promise.resolve());
3729
- }
3730
- dir(e) {
3731
- if (e || (e = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language)), !e)
3732
- return "rtl";
3733
- 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"], i = this.services && this.services.languageUtils || new ut(ft());
3734
- return t.indexOf(i.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
3735
- }
3736
- static createInstance() {
3737
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
3738
- return new te(e, t);
3739
- }
3740
- cloneInstance() {
3741
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : se;
3742
- const i = e.forkResourceStore;
3743
- i && delete e.forkResourceStore;
3744
- const a = {
3745
- ...this.options,
3746
- ...e,
3747
- isClone: !0
3748
- }, s = new te(a);
3749
- return (e.debug !== void 0 || e.prefix !== void 0) && (s.logger = s.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
3750
- s[o] = this[o];
3751
- }), s.services = {
3752
- ...this.services
3753
- }, s.services.utils = {
3754
- hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
3755
- }, i && (s.store = new lt(this.store.data, a), s.services.resourceStore = s.store), s.translator = new fe(s.services, a), s.translator.on("*", function(o) {
3756
- for (var l = arguments.length, u = new Array(l > 1 ? l - 1 : 0), d = 1; d < l; d++)
3757
- u[d - 1] = arguments[d];
3758
- s.emit(o, ...u);
3759
- }), s.init(a, t), s.translator.options = a, s.translator.backendConnector.services.utils = {
3760
- hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
3761
- }, s;
3762
- }
3763
- toJSON() {
3764
- return {
3765
- options: this.options,
3766
- store: this.store,
3767
- language: this.language,
3768
- languages: this.languages,
3769
- resolvedLanguage: this.resolvedLanguage
3770
- };
3771
- }
3772
- }
3773
- const U = te.createInstance();
3774
- U.createInstance = te.createInstance;
3775
- U.createInstance;
3776
- U.dir;
3777
- U.init;
3778
- U.loadResources;
3779
- U.reloadResources;
3780
- U.use;
3781
- U.changeLanguage;
3782
- U.getFixedT;
3783
- U.t;
3784
- U.exists;
3785
- U.setDefaultNamespace;
3786
- U.hasLoadedNamespace;
3787
- U.loadNamespaces;
3788
- U.loadLanguages;
3789
- const Ja = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, qa = {
3790
- "&amp;": "&",
3791
- "&#38;": "&",
3792
- "&lt;": "<",
3793
- "&#60;": "<",
3794
- "&gt;": ">",
3795
- "&#62;": ">",
3796
- "&apos;": "'",
3797
- "&#39;": "'",
3798
- "&quot;": '"',
3799
- "&#34;": '"',
3800
- "&nbsp;": " ",
3801
- "&#160;": " ",
3802
- "&copy;": "©",
3803
- "&#169;": "©",
3804
- "&reg;": "®",
3805
- "&#174;": "®",
3806
- "&hellip;": "…",
3807
- "&#8230;": "…",
3808
- "&#x2F;": "/",
3809
- "&#47;": "/"
3810
- }, Ha = (n) => qa[n], Za = (n) => n.replace(Ja, Ha);
3811
- let ht = {
3812
- bindI18n: "languageChanged",
3813
- bindI18nStore: "",
3814
- transEmptyNodeValue: "",
3815
- transSupportBasicHtmlNodes: !0,
3816
- transWrapTextNodes: "",
3817
- transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
3818
- useSuspense: !0,
3819
- unescape: Za
3820
- };
3821
- function Xa() {
3822
- let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3823
- ht = {
3824
- ...ht,
3825
- ...n
3826
- };
3827
- }
3828
- const Ya = {
3829
- type: "3rdParty",
3830
- init(n) {
3831
- Xa(n.options.react);
3832
- }
3833
- };
3834
- xa(U, Ya);
3835
- const Gs = (n) => da(U, n);
3836
- let Ve = /* @__PURE__ */ new Map();
3837
- const xe = gt(Ve), Ks = ({ children: n, stores: e }) => {
3838
- const t = Oe(xe), i = qt(() => {
3839
- const a = /* @__PURE__ */ new Map();
3840
- return e.forEach((s) => a.set(s.class, s.value)), Ve = new Map([...t, ...a]);
3841
- }, []);
3842
- return /* @__PURE__ */ Ht(xe.Provider, { value: i, children: n });
3843
- };
3844
- function Ws(n) {
3845
- return Oe(xe).get(n);
3846
- }
3847
- function Js(n) {
3848
- return Ve.get(n);
3849
- }
3850
- var jt = /* @__PURE__ */ ((n) => (n.Created = "CREATED", n.Finalized = "FINALIZED", n.Live = "LIVE", n.Starting = "STARTING", n))(jt || {}), zt = /* @__PURE__ */ ((n) => (n.Add = "add", n.Remove = "remove", n))(zt || {}), Bt = /* @__PURE__ */ ((n) => (n.Active = "active", n.Inactive = "inactive", n))(Bt || {});
3851
- const es = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "AddCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CreateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ts = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ns = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, is = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, as = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "ManageCollectionProduct" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ManageCollectionProductInInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "manageCollectionProduct" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ss = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, rs = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "UpdateCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "UpdateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, os = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindMinimalEvent" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "FindEventInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findEvent" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EventData" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailsPath" } }, { kind: "Field", name: { kind: "Name", value: "recordVideoPath" } }, { kind: "Field", name: { kind: "Name", value: "createdAt" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "thumbnails" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ls = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchMinimalEvents" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "SearchEventInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchEvent" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EventArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailsPath" } }, { kind: "Field", name: { kind: "Name", value: "recordVideoPath" } }, { kind: "Field", name: { kind: "Name", value: "createdAt" } }, { kind: "Field", name: { kind: "Name", value: "status" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ds = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "BlockUser" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "BlockUserInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "blockUser" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "BlockUserSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, us = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "ChangeAccountUsername" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ChangeUsernameInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "changeAccountUsername" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ChangeUsernameSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, cs = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteChatMessage" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "DeleteChatInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteChatMessage" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "DeleteChatMessageSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, ms = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllChatMessage" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "GetAllChatMessageInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllChatMessage" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ChatMessageArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "connectionId" } }, { kind: "Field", name: { kind: "Name", value: "data" } }, { kind: "Field", name: { kind: "Name", value: "email" } }, { kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "idEvent" } }, { kind: "Field", name: { kind: "Name", value: "sendDate" } }, { kind: "Field", name: { kind: "Name", value: "sessionId" } }, { kind: "Field", name: { kind: "Name", value: "type" } }, { kind: "Field", name: { kind: "Name", value: "username" } }, { kind: "Field", name: { kind: "Name", value: "isAdmin" } }, { kind: "Field", name: { kind: "Name", value: "urlGif" } }, { kind: "Field", name: { kind: "Name", value: "second" } }, { kind: "Field", name: { kind: "Name", value: "ip" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, fs = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChatRoomToken" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "GetChatRoomInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getChatRoomToken" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ChatRoomTokenData" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "token" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ps = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "PinChatMessage" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "PinChatInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "pinChatMessage" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "PinChatMessageSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, hs = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "deleteAllCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerInputAccount" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteAllCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, gs = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "getAllCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "data" } }, { kind: "Field", name: { kind: "Name", value: "section" } }, { kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ks = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "updateCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, vs = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetTimeLine" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "GetTimeLineInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getTimeLine" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "TimeLineArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "time" } }, { kind: "Field", name: { kind: "Name", value: "likes" } }, { kind: "Field", name: { kind: "Name", value: "comments" } }, { kind: "Field", name: { kind: "Name", value: "viewers" } }, { kind: "Field", name: { kind: "Name", value: "orders" } }, { kind: "Field", name: { kind: "Name", value: "minute" } }, { kind: "Field", name: { kind: "Name", value: "hour" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Ss = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "AppendProductsToSnackVideo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "RelateToProductsSnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "appendProductsSnackVideo" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ActionSnackVideoSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ys = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "CreateSnackVideoBatch" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CreateSnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createSnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Ns = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteRelationshipWithSnackVideo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoRelationshipKeys" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteRelationshipSnackVideo" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ActionSnackVideoSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }] } }] } }] } }] }, bs = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteSnackVideo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "DeleteSnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteSnackVideo" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ActionSnackVideoSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, Fs = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindManySnackVideos" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "FindManySnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findManySnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "uploadProgress" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "eventId" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ws = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllSnackVideos" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllSnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoCreatedArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "snackVideos" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "uploadProgress" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "eventId" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "created" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }] } }, { kind: "Field", name: { kind: "Name", value: "cursor" } }, { kind: "Field", name: { kind: "Name", value: "totalItems" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Cs = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetSnackVideoRelationships" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoRelationshipInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getRelationshipSnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "RelationshipSnackVideoArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "sourceEntity" } }, { kind: "Field", name: { kind: "Name", value: "attributeId" } }] } }] } }] } }] } }] }, Es = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchSnackVideos" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "SearchInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchSnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoCreatedArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "snackVideos" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "uploadProgress" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "eventId" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "created" } }] } }, { kind: "Field", name: { kind: "Name", value: "cursor" } }, { kind: "Field", name: { kind: "Name", value: "totalItems" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, xs = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindByProductSnackVideo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "FindByProductSnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findByProductSnackVideo" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3852
- __proto__: null,
3853
- AddCollectionDocument: es,
3854
- AppendProductsToSnackVideoDocument: Ss,
3855
- BlockUserDocument: ds,
3856
- ChangeAccountUsernameDocument: us,
3857
- CreateSnackVideoBatchDocument: ys,
3858
- DeleteAllCustomizationDocument: hs,
3859
- DeleteChatMessageDocument: cs,
3860
- DeleteCollectionDocument: ts,
3861
- DeleteRelationshipWithSnackVideoDocument: Ns,
3862
- DeleteSnackVideoDocument: bs,
3863
- EventStatus: jt,
3864
- FindByProductSnackVideoDocument: xs,
3865
- FindCollectionDocument: ns,
3866
- FindManySnackVideosDocument: Fs,
3867
- FindMinimalEventDocument: os,
3868
- GetAllChatMessageDocument: ms,
3869
- GetAllCollectionsDocument: is,
3870
- GetAllCustomizationDocument: gs,
3871
- GetAllSnackVideosDocument: ws,
3872
- GetChatRoomTokenDocument: fs,
3873
- GetSnackVideoRelationshipsDocument: Cs,
3874
- GetTimeLineDocument: vs,
3875
- ManageCollectionProductDocument: as,
3876
- Methods: zt,
3877
- PinChatMessageDocument: ps,
3878
- SearchCollectionsDocument: ss,
3879
- SearchMinimalEventsDocument: ls,
3880
- SearchSnackVideosDocument: Es,
3881
- Status: Bt,
3882
- UpdateCollectionDocument: rs,
3883
- UpdateCustomizationDocument: ks
3884
- }, Symbol.toStringTag, { value: "Module" }));
3885
- function Hs(n) {
3886
- return {
3887
- class: n,
3888
- _value: null,
3889
- get value() {
3890
- return this._value || (this._value = new n(), Object.freeze(this)), this._value;
3891
- }
3892
- };
3893
- }
3894
- export {
3895
- Lt as AccountContractStatusTypes,
3896
- mi as AccountContractTypes,
3897
- _s as AccountInvalidError,
3898
- pi as AccountPlanDescriptionTypes,
3899
- ki as AccountRestRepository,
3900
- vi as AccountService,
3901
- fi as AccountSubscriptionTypes,
3902
- Dt as AccountTypes,
3903
- ui as AggregateRoot,
3904
- qs as ApiGraphqlTypes,
3905
- $s as BaseMobxStore,
3906
- Bn as BroadcastChannelEventBus,
3907
- ke as DomainError,
3908
- Bs as EventBusWildcards,
3909
- Qs as EventNames,
3910
- hi as GlobalPageSectionTypes,
3911
- di as InvalidNizzaGlobalObjectError,
3912
- aa as LanguageTypes,
3913
- De as NizzaAccount,
3914
- ia as NizzaEventStatus,
3915
- we as NizzaLogger,
3916
- ra as NizzaProductRequestOriginTypes,
3917
- sa as NizzaVariationTypes,
3918
- oi as ResourceNotFoundError,
3919
- Ks as StoreProvider,
3920
- li as UnexpectedError,
3921
- js as ValueObject,
3922
- Re as accountAtom,
3923
- At as accountService,
3924
- Is as apiCall,
3925
- oa as buildLanguageTranslations,
3926
- la as buildTranslations,
3927
- qn as configure,
3928
- X as coreLogger,
3929
- ci as createAggregateRoot,
3930
- Hs as createStore,
3931
- yt as customFetch,
3932
- Ds as downloadFile,
3933
- As as fileOrigin,
3934
- na as getAccount,
3935
- Ms as getClientTimeZone,
3936
- Wn as getInstance,
3937
- Js as getStore,
3938
- ta as globalAtomStore,
3939
- xa as i18Init,
3940
- kn as jsDownload,
3941
- Ps as logger,
3942
- j as nizza,
3943
- Vs as nizzaInit,
3944
- Gs as registerTranslations,
3945
- da as registerTranslationsOf,
3946
- Ls as searchParams,
3947
- Hn as setProductDataSource,
3948
- Gn as shortId,
3949
- zs as useAccount,
3950
- It as useNizza,
3951
- Ws as useStore,
3952
- Us as validateRequiredProps
3953
- };
3954
- //# sourceMappingURL=index.mjs.map
22
+ `)}},Ni=function(t,e){e.forEach(n=>{if(Sa(ba(n.split("."),t)))throw new Xe(n)})},pi=function(){var i,a,o;let t=null,e=null,n=null;try{t=(o=(a=(i=Intl.DateTimeFormat())==null?void 0:i.resolvedOptions())==null?void 0:a.timeZone)!=null?o:null;const s=-new Date().getTimezoneOffset();n=s;const l=s>=0?"+":"-",r=String(Math.floor(Math.abs(s)/60)).padStart(2,"0"),d=String(Math.abs(s)%60).padStart(2,"0");e=`${l}${r}:${d}`}catch{G.error("Error obtaining time zone or offset")}return{offset:e,offsetValue:n,value:t,country:null,included:null,label:null}},We=class{constructor(t){x(this,"aggregate");x(this,"_numSetPropsApplied",0);this.aggregate=t}setProps(t){for(const[e,n]of Object.entries(t))e in this.aggregate&&(this.aggregate[e]=n);this._numSetPropsApplied++}get isFirstSetProps(){return this._numSetPropsApplied===1}},lt=function(t){return new We(t)},ai=class{},li=class{constructor(t){x(this,"_value");t!==void 0&&(this._value=t)}get value(){return this._value}},we=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(we||{}),Ge=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(Ge||{}),Fe=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(Fe||{}),Je=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(Je||{}),Qe=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(Qe||{}),Ze=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(Ze||{}),Ce=class{constructor(t){x(this,"root",lt(this));x(this,"id");x(this,"account");x(this,"accountType",we.UNKNOWN);x(this,"username");x(this,"currencyConfig");x(this,"contractType");x(this,"nextDateMetricRecord");x(this,"spendedMinutes",0);x(this,"unlimitedService",!1);x(this,"hoursAvailable",0);x(this,"contractStatus",Fe.ACTIVE);x(this,"createdAt");x(this,"installationDateApp");x(this,"cxAccount");x(this,"freeService",!1);x(this,"subscriptionType",null);x(this,"minutesAvailable",0);x(this,"globalPage");x(this,"stripe");x(this,"descriptionPlan");x(this,"planType");x(this,"selectFreeTrial");x(this,"exceededFeatures");x(this,"host",null);this.root.setProps(t)}static toDomain(t){const{createdAt:e,username:n,...i}=t,a={...i,username:n!=null?n:i.account,createdAt:new Date(Number(e))};return new Ce(a)}toPrimitives(){const{root:t,createdAt:e,...n}=this;return{...n,created:e.toISOString()}}};const Fa=`${Ho.apiUrls.restV1}/accounts/v2`;qe=class{async get(t){const e=`${Fa}/${t}`,{data:n}=await Te({url:e});return n?Ce.toDomain(n):null}},Ke=class{constructor(t){this.accountRepository=t}async get(t){try{const e=await this.accountRepository.get(t);if(!e)throw new it(t);return e}catch(e){throw new at(e)}}};let Ut;Ut=new qe,Ee=new Ke(Ut);class Le{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const n={listener:e};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const pe=typeof window>"u"||"Deno"in window;function wa(){}function jt(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ca(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ea(t,e,n){return Ta(t)?typeof e=="function"?{...n,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function $t(t,e){if(t===e)return t;const n=Mt(t)&&Mt(e);if(n||zt(t)&&zt(e)){const i=n?t.length:Object.keys(t).length,a=n?e:Object.keys(e),o=a.length,s=n?[]:{};let l=0;for(let r=0;r<o;r++){const d=n?r:a[r];s[d]=$t(t[d],e[d]),s[d]===t[d]&&l++}return i===o&&l===i?t:s}return e}function Ae(t,e){if(t&&!e||e&&!t)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function Mt(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function zt(t){if(!Bt(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!Bt(n)||!n.hasOwnProperty("isPrototypeOf"))}function Bt(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ta(t){return Array.isArray(t)}function Oa(t){return new Promise(e=>{setTimeout(e,t)})}function Gt(t){Oa(0).then(t)}function Qt(t,e,n){return n.isDataEqual!=null&&n.isDataEqual(t,e)?t:typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?$t(t,e):e}class xa extends Le{constructor(){super(),this.setup=e=>{if(!pe&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Ra=new xa,qt=["online","offline"];class Da extends Le{constructor(){super(),this.setup=e=>{if(!pe&&window.addEventListener){const n=()=>e();return qt.forEach(i=>{window.addEventListener(i,n,!1)}),()=>{qt.forEach(i=>{window.removeEventListener(i,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setOnline(i):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Ia=new Da;function La(t){return(t!=null?t:"online")==="online"?Ia.isOnline():!0}class Aa{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Pa(t){return t instanceof Aa}function Va(){let t=[],e=0,n=r=>{r()},i=r=>{r()};const a=r=>{let d;e++;try{d=r()}finally{e--,e||l()}return d},o=r=>{e?t.push(r):Gt(()=>{n(r)})},s=r=>(...d)=>{o(()=>{r(...d)})},l=()=>{const r=t;t=[],r.length&&Gt(()=>{i(()=>{r.forEach(d=>{n(d)})})})};return{batch:a,batchCalls:s,schedule:o,setNotifyFunction:r=>{n=r},setBatchNotifyFunction:r=>{i=r}}}const Y=Va();class _a extends Le{constructor(e,n){super(),this.client=e,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),Kt(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pe(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,n){const i=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),Ae(i,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();const o=this.hasListeners();o&&Jt(this.currentQuery,a,this.options,i)&&this.executeFetch(),this.updateResult(n),o&&(this.currentQuery!==a||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(this.currentQuery!==a||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(e){const n=this.client.getQueryCache().build(this.client,e),i=this.createResult(n,e);return ja(this,i,e)&&(this.currentResult=i,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),i}getCurrentResult(){return this.currentResult}trackResult(e){const n={};return Object.keys(e).forEach(i=>{Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(i),e[i])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...n}={}){return this.fetch({...n,meta:{refetchPage:e}})}fetchOptimistic(e){const n=this.client.defaultQueryOptions(e),i=this.client.getQueryCache().build(this.client,n);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,n))}fetch(e){var n;return this.executeFetch({...e,cancelRefetch:(n=e.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let n=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(wa)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),pe||this.currentResult.isStale||!jt(this.options.staleTime))return;const e=Ca(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},e)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(pe||this.options.enabled===!1||!jt(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Ra.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,n){const i=this.currentQuery,a=this.options,o=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,r=e!==i,d=r?e.state:this.currentQueryInitialState,u=r?this.currentResult:this.previousQueryResult,{state:m}=e;let{dataUpdatedAt:p,error:f,errorUpdatedAt:w,fetchStatus:S,status:E}=m,b=!1,A=!1,O;if(n._optimisticResults){const L=this.hasListeners(),c=!L&&Kt(e,n),k=L&&Jt(e,i,n,a);(c||k)&&(S=La(e.options.networkMode)?"fetching":"paused",p||(E="loading")),n._optimisticResults==="isRestoring"&&(S="idle")}if(n.keepPreviousData&&!m.dataUpdatedAt&&u!=null&&u.isSuccess&&E!=="error")O=u.data,p=u.dataUpdatedAt,E=u.status,b=!0;else if(n.select&&typeof m.data<"u")if(o&&m.data===(s==null?void 0:s.data)&&n.select===this.selectFn)O=this.selectResult;else try{this.selectFn=n.select,O=n.select(m.data),O=Qt(o==null?void 0:o.data,O,n),this.selectResult=O,this.selectError=null}catch(L){this.selectError=L}else O=m.data;if(typeof n.placeholderData<"u"&&typeof O>"u"&&E==="loading"){let L;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))L=o.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof L<"u")try{L=n.select(L),this.selectError=null}catch(c){this.selectError=c}typeof L<"u"&&(E="success",O=Qt(o==null?void 0:o.data,L,n),A=!0)}this.selectError&&(f=this.selectError,O=this.selectResult,w=Date.now(),E="error");const C=S==="fetching",I=E==="loading",P=E==="error";return{status:E,fetchStatus:S,isLoading:I,isSuccess:E==="success",isError:P,isInitialLoading:I&&C,data:O,dataUpdatedAt:p,error:f,errorUpdatedAt:w,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:C,isRefetching:C&&!I,isLoadingError:P&&m.dataUpdatedAt===0,isPaused:S==="paused",isPlaceholderData:A,isPreviousData:b,isRefetchError:P&&m.dataUpdatedAt!==0,isStale:Ve(e,n),refetch:this.refetch,remove:this.remove}}updateResult(e){const n=this.currentResult,i=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Ae(i,n))return;this.currentResult=i;const a={cache:!0},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,l=typeof s=="function"?s():s;if(l==="all"||!l&&!this.trackedProps.size)return!0;const r=new Set(l!=null?l:this.trackedProps);return this.options.useErrorBoundary&&r.add("error"),Object.keys(this.currentResult).some(d=>{const u=d;return this.currentResult[u]!==n[u]&&r.has(u)})};(e==null?void 0:e.listeners)!==!1&&o()&&(a.listeners=!0),this.notify({...a,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const n={};e.type==="success"?n.onSuccess=!e.manual:e.type==="error"&&!Pa(e.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(e){Y.batch(()=>{if(e.onSuccess){var n,i,a,o;(n=(i=this.options).onSuccess)==null||n.call(i,this.currentResult.data),(a=(o=this.options).onSettled)==null||a.call(o,this.currentResult.data,null)}else if(e.onError){var s,l,r,d;(s=(l=this.options).onError)==null||s.call(l,this.currentResult.error),(r=(d=this.options).onSettled)==null||r.call(d,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:u})=>{u(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Ua(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Kt(t,e){return Ua(t,e)||t.state.dataUpdatedAt>0&&Pe(t,e,e.refetchOnMount)}function Pe(t,e,n){if(e.enabled!==!1){const i=typeof n=="function"?n(t):n;return i==="always"||i!==!1&&Ve(t,e)}return!1}function Jt(t,e,n,i){return n.enabled!==!1&&(t!==e||i.enabled===!1)&&(!n.suspense||t.state.status!=="error")&&Ve(t,n)}function Ve(t,e){return t.isStaleByTime(e.staleTime)}function ja(t,e,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?e.isPlaceholderData:!Ae(t.getCurrentResult(),e)}const $a=Rt.useSyncExternalStore,ge=await M("react"),Wt=ge.createContext(void 0),Ma=ge.createContext(!1);function za(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Wt),window.ReactQueryClientContext):Wt)}const Ba=({context:t}={})=>{const e=ge.useContext(za(t,ge.useContext(Ma)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Ht=await M("react"),Zt=Ht.createContext(!1),Ga=()=>Ht.useContext(Zt);Zt.Provider;const Xt=await M("react");function Qa(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const qa=Xt.createContext(Qa()),Ka=()=>Xt.useContext(qa);function Ja(t,e){return typeof t=="function"?t(...e):!!t}const Wa=await M("react"),Ha=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},Za=t=>{Wa.useEffect(()=>{t.clearReset()},[t])},Xa=({result:t,errorResetBoundary:e,useErrorBoundary:n,query:i})=>t.isError&&!e.isReset()&&!t.isFetching&&Ja(n,[t.error,i]),Ya=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},eo=(t,e)=>t.isLoading&&t.isFetching&&!e,to=(t,e,n)=>(t==null?void 0:t.suspense)&&eo(e,n),no=(t,e,n)=>e.fetchOptimistic(t).then(({data:i})=>{t.onSuccess==null||t.onSuccess(i),t.onSettled==null||t.onSettled(i,null)}).catch(i=>{n.clearReset(),t.onError==null||t.onError(i),t.onSettled==null||t.onSettled(void 0,i)}),_e=await M("react");function io(t,e){const n=Ba({context:t.context}),i=Ga(),a=Ka(),o=n.defaultQueryOptions(t);o._optimisticResults=i?"isRestoring":"optimistic",o.onError&&(o.onError=Y.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=Y.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=Y.batchCalls(o.onSettled)),Ya(o),Ha(o,a),Za(a);const[s]=_e.useState(()=>new e(n,o)),l=s.getOptimisticResult(o);if($a(_e.useCallback(r=>{const d=i?()=>{}:s.subscribe(Y.batchCalls(r));return s.updateResult(),d},[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),_e.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),to(o,l,i))throw no(o,s,a);if(Xa({result:l,errorResetBoundary:a,useErrorBoundary:o.useErrorBoundary,query:s.getCurrentQuery()}))throw l.error;return o.notifyOnChangeProps?l:s.trackResult(l)}function ao(t,e,n){const i=Ea(t,e,n);return io(i,_a)}let Yt,en;({useEffect:Yt}=await M("react")),en=()=>["account"],yi=()=>{const t=ft(a=>{var o;return(o=a.config)==null?void 0:o.account}),[e,n]=$i(oe),i=ao(en(),()=>Ee.get(t),{enabled:!!t&&!e,refetchOnWindowFocus:!1,refetchOnMount:!1});return Yt(()=>{const a=i.data;!i.isSuccess||!a||n(a)},[i.status]),{findQuery:i,account:e}},ct=bt(),dt=async function(t){const e=await Ee.get(t);return ct.set(oe,e),e},et=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(et||{}),oi={ALL:"*",CORE:"core:**",LIVE_STREAMING_EVENT:"event:**",EVENT_CHAT:"event:chat:**",EVENT_PRODUCTS:"event:products:**",CUSTOMIZE_LIVE:"customize-live:**",PLAYER:"player:**",SNACK_SIZE_VIDEO:"ssv:**",SNACK_SIZE_VIDEO_ADMIN:"ssv-admin:**",UI:"ui:**",UTILS:"utils:**"},si={EVENT_STATUS_CHANGED:"event:statusChanged"},Ye=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(Ye||{}),nt=(t=>(t.COMBO="Combo",t))(nt||{}),tt=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.DEV_LOCAL="dev:local",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t))(tt||{}),ot=function(t){const e=Object.values(t);return Object.assign({},...e)},st=function(t){return Object.entries(t).reduce((e,[n,i])=>{const a=ot(i);return{...e,[n]:a}},{})},gt=function(t,e){const n=st(e);Object.entries(n).forEach(([i,a])=>{t.addResourceBundle(i,"translation",a,!0)})};function oo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ee(t){"@babel/helpers - typeof";return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(t)}function so(t,e){if(ee(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(ee(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ro(t){var e=so(t,"string");return ee(e)=="symbol"?e:String(e)}function tn(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ro(i.key),i)}}function lo(t,e,n){return e&&tn(t.prototype,e),n&&tn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var nn=[],uo=nn.forEach,co=nn.slice;function mo(t){return uo.call(co.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var an=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,po=function(t,e,n){var i=n||{};i.path=i.path||"/";var a=encodeURIComponent(e),o="".concat(t,"=").concat(a);if(i.maxAge>0){var s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(s))}if(i.domain){if(!an.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(i.domain)}if(i.path){if(!an.test(i.path))throw new TypeError("option path is invalid");o+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(o+="; HttpOnly"),i.secure&&(o+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o},on={create:function(t,e,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+n*60*1e3)),i&&(a.domain=i),document.cookie=po(t,encodeURIComponent(e),a)},read:function(t){for(var e="".concat(t,"="),n=document.cookie.split(";"),i=0;i<n.length;i++){for(var a=n[i];a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(e)===0)return a.substring(e.length,a.length)}return null},remove:function(t){this.create(t,"",-1)}},go={name:"cookie",lookup:function(t){var e;if(t.lookupCookie&&typeof document<"u"){var n=on.read(t.lookupCookie);n&&(e=n)}return e},cacheUserLanguage:function(t,e){e.lookupCookie&&typeof document<"u"&&on.create(e.lookupCookie,t,e.cookieMinutes,e.cookieDomain,e.cookieOptions)}},ho={name:"querystring",lookup:function(t){var e;if(typeof window<"u"){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=n.substring(1),a=i.split("&"),o=0;o<a.length;o++){var s=a[o].indexOf("=");if(s>0){var l=a[o].substring(0,s);l===t.lookupQuerystring&&(e=a[o].substring(s+1))}}}return e}},te=null,sn=function(){if(te!==null)return te;try{te=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{te=!1}return te},ko={name:"localStorage",lookup:function(t){var e;if(t.lookupLocalStorage&&sn()){var n=window.localStorage.getItem(t.lookupLocalStorage);n&&(e=n)}return e},cacheUserLanguage:function(t,e){e.lookupLocalStorage&&sn()&&window.localStorage.setItem(e.lookupLocalStorage,t)}},ne=null,rn=function(){if(ne!==null)return ne;try{ne=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{ne=!1}return ne},fo={name:"sessionStorage",lookup:function(t){var e;if(t.lookupSessionStorage&&rn()){var n=window.sessionStorage.getItem(t.lookupSessionStorage);n&&(e=n)}return e},cacheUserLanguage:function(t,e){e.lookupSessionStorage&&rn()&&window.sessionStorage.setItem(e.lookupSessionStorage,t)}},vo={name:"navigator",lookup:function(t){var e=[];if(typeof navigator<"u"){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)e.push(navigator.languages[n]);navigator.userLanguage&&e.push(navigator.userLanguage),navigator.language&&e.push(navigator.language)}return e.length>0?e:void 0}},yo={name:"htmlTag",lookup:function(t){var e,n=t.htmlTag||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(e=n.getAttribute("lang")),e}},So={name:"path",lookup:function(t){var e;if(typeof window<"u"){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof n[t.lookupFromPathIndex]!="string")return;e=n[t.lookupFromPathIndex].replace("/","")}else e=n[0].replace("/","")}return e}},No={name:"subdomain",lookup:function(t){var e=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,n=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[e]}};function bo(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}}var ln=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};oo(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return lo(t,[{key:"init",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=mo(n,this.options||{},bo()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(a){return a.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(go),this.addDetector(ho),this.addDetector(ko),this.addDetector(fo),this.addDetector(vo),this.addDetector(yo),this.addDetector(So),this.addDetector(No)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var n=this;e||(e=this.options.order);var i=[];return e.forEach(function(a){if(n.detectors[a]){var o=n.detectors[a].lookup(n.options);o&&typeof o=="string"&&(o=[o]),o&&(i=i.concat(o))}}),i=i.map(function(a){return n.options.convertDetectedLanguage(a)}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(e,n){var i=this;n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(function(a){i.detectors[a]&&i.detectors[a].cacheUserLanguage(e,i.options)}))}}]),t}();ln.type="languageDetector",mt=function(t,e){t.use(e).use(ln).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,a)=>{if(i){const[o,...s]=i.split(",").map(l=>l.trim());if(o==="number")return new Intl.NumberFormat(a).format(n);if(o==="date")return new Intl.DateTimeFormat(a).format(n);if(o==="currency")return new Intl.NumberFormat(a,{style:"currency",currency:s[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})};const Fo={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class he{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||Fo,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,a){return a&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new he(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new he(this.logger,e)}}var j=new he;class ke{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]=this.observers[i]||[],this.observers[i].push(n)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(i=>i!==n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];this.observers[e]&&[].concat(this.observers[e]).forEach(o=>{o(...i)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(o=>{o.apply(o,[e,...i])})}}function ie(){let t,e;const n=new Promise((i,a)=>{t=i,e=a});return n.resolve=t,n.reject=e,n}function dn(t){return t==null?"":""+t}function wo(t,e,n){t.forEach(i=>{e[i]&&(n[i]=e[i])})}function Ue(t,e,n){function i(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function a(){return!t||typeof t=="string"}const o=typeof e!="string"?[].concat(e):e.split(".");for(;o.length>1;){if(a())return{};const s=i(o.shift());!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={}}return a()?{}:{obj:t,k:i(o.shift())}}function un(t,e,n){const{obj:i,k:a}=Ue(t,e,Object);i[a]=n}function Co(t,e,n,i){const{obj:a,k:o}=Ue(t,e,Object);a[o]=a[o]||[],i&&(a[o]=a[o].concat(n)),i||a[o].push(n)}function fe(t,e){const{obj:n,k:i}=Ue(t,e);if(n)return n[i]}function Eo(t,e,n){const i=fe(t,n);return i!==void 0?i:fe(e,n)}function cn(t,e,n){for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?typeof t[i]=="string"||t[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?n&&(t[i]=e[i]):cn(t[i],e[i],n):t[i]=e[i]);return t}function J(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var To={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Oo(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>To[e]):t}const xo=[" ",",","?","!",";"];function Ro(t,e,n){e=e||"",n=n||"";const i=xo.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const a=new RegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!a.test(t);if(!o){const s=t.indexOf(n);s>0&&!a.test(t.substring(0,s))&&(o=!0)}return o}function ve(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let a=t;for(let o=0;o<i.length;++o){if(!a||typeof a[i[o]]=="string"&&o+1<i.length)return;if(a[i[o]]===void 0){let s=2,l=i.slice(o,o+s).join(n),r=a[l];for(;r===void 0&&i.length>o+s;)s++,l=i.slice(o,o+s).join(n),r=a[l];if(r===void 0)return;if(r===null)return null;if(e.endsWith(l)){if(typeof r=="string")return r;if(l&&typeof r[l]=="string")return r[l]}const d=i.slice(o+s).join(n);return d?ve(r,d,n):void 0}a=a[i[o]]}return a}function ye(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class mn extends ke{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let l=[e,n];i&&typeof i!="string"&&(l=l.concat(i)),i&&typeof i=="string"&&(l=l.concat(o?i.split(o):i)),e.indexOf(".")>-1&&(l=e.split("."));const r=fe(this.data,l);return r||!s||typeof i!="string"?r:ve(this.data&&this.data[e]&&this.data[e][n],i,o)}addResource(e,n,i,a){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[e,n];i&&(l=l.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(l=e.split("."),a=n,n=l[1]),this.addNamespaces(n),un(this.data,l,a),o.silent||this.emit("added",e,n,i,a)}addResources(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in i)(typeof i[o]=="string"||Object.prototype.toString.apply(i[o])==="[object Array]")&&this.addResource(e,n,o,i[o],{silent:!0});a.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,a,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},l=[e,n];e.indexOf(".")>-1&&(l=e.split("."),a=i,i=n,n=l[1]),this.addNamespaces(n);let r=fe(this.data,l)||{};a?cn(r,i,o):r={...r,...i},un(this.data,l,r),s.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var pn={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,a){return t.forEach(o=>{this.processors[o]&&(e=this.processors[o].process(e,n,i,a))}),e}};const gn={};class Se extends ke{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),wo(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=j.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,n);return i&&i.res!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Ro(e,i,a);if(s&&!l){const r=e.match(this.interpolator.nestingRegexp);if(r&&r.length>0)return{key:e,namespaces:o};const d=e.split(i);(i!==a||i===a&&this.options.ns.indexOf(d[0])>-1)&&(o=d.shift()),e=d.join(a)}return typeof o=="string"&&(o=[o]),{key:e,namespaces:o}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const a=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],n),r=l[l.length-1],d=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(u){const O=n.nsSeparator||this.options.nsSeparator;return a?{res:`${r}${O}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:r,usedParams:this.getUsedParamsDetails(n)}:`${r}${O}${s}`}return a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:r,usedParams:this.getUsedParamsDetails(n)}:s}const m=this.resolve(e,n);let p=m&&m.res;const f=m&&m.usedKey||s,w=m&&m.exactUsedKey||s,S=Object.prototype.toString.apply(p),E=["[object Number]","[object Function]","[object RegExp]"],b=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject;if(A&&p&&typeof p!="string"&&typeof p!="boolean"&&typeof p!="number"&&E.indexOf(S)<0&&!(typeof b=="string"&&S==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,p,{...n,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(m.res=O,m.usedParams=this.getUsedParamsDetails(n),m):O}if(o){const O=S==="[object Array]",C=O?[]:{},I=O?w:f;for(const P in p)if(Object.prototype.hasOwnProperty.call(p,P)){const L=`${I}${o}${P}`;C[P]=this.translate(L,{...n,joinArrays:!1,ns:l}),C[P]===L&&(C[P]=p[P])}p=C}}else if(A&&typeof b=="string"&&S==="[object Array]")p=p.join(b),p&&(p=this.extendTranslation(p,e,n,i));else{let O=!1,C=!1;const I=n.count!==void 0&&typeof n.count!="string",P=Se.hasDefaultValue(n),L=I?this.pluralResolver.getSuffix(d,n.count,n):"",c=n.ordinal&&I?this.pluralResolver.getSuffix(d,n.count,{ordinal:!1}):"",k=I&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),y=k&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${L}`]||n[`defaultValue${c}`]||n.defaultValue;!this.isValidLookup(p)&&P&&(O=!0,p=y),this.isValidLookup(p)||(C=!0,p=s);const g=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:p,h=P&&y!==p&&this.options.updateMissing;if(C||O||h){if(this.logger.log(h?"updateKey":"missingKey",d,r,s,h?y:p),o){const R=this.resolve(s,{...n,keySeparator:!1});R&&R.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let N=[];const v=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&v&&v[0])for(let R=0;R<v.length;R++)N.push(v[R]);else this.options.saveMissingTo==="all"?N=this.languageUtils.toResolveHierarchy(n.lng||this.language):N.push(n.lng||this.language);const F=(R,T,D)=>{const _=P&&D!==p?D:g;this.options.missingKeyHandler?this.options.missingKeyHandler(R,r,T,_,h,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(R,r,T,_,h,n),this.emit("missingKey",R,r,T,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?N.forEach(R=>{const T=this.pluralResolver.getSuffixes(R,n);k&&n[`defaultValue${this.options.pluralSeparator}zero`]&&T.indexOf(`${this.options.pluralSeparator}zero`)<0&&T.push(`${this.options.pluralSeparator}zero`),T.forEach(D=>{F([R],s+D,n[`defaultValue${D}`]||y)})}):F(N,s,y))}p=this.extendTranslation(p,e,n,m,i),C&&p===s&&this.options.appendNamespaceToMissingKey&&(p=`${r}:${s}`),(C||O)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${r}:${s}`:s,O?p:void 0):p=this.options.parseMissingKeyHandler(p))}return a?(m.res=p,m.usedParams=this.getUsedParamsDetails(n),m):p}extendTranslation(e,n,i,a,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const d=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(d){const p=e.match(this.interpolator.nestingRegexp);u=p&&p.length}let m=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),e=this.interpolator.interpolate(e,m,i.lng||this.language,i),d){const p=e.match(this.interpolator.nestingRegexp),f=p&&p.length;u<f&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&a&&a.res&&(i.lng=a.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var p=arguments.length,f=new Array(p),w=0;w<p;w++)f[w]=arguments[w];return o&&o[0]===f[0]&&!i.context?(s.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):s.translate(...f,n)},i)),i.interpolation&&this.interpolator.reset()}const l=i.postProcess||this.options.postProcess,r=typeof l=="string"?[l]:l;return e!=null&&r&&r.length&&i.applyPostProcessor!==!1&&(e=pn.handle(r,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,a,o,s,l;return typeof e=="string"&&(e=[e]),e.forEach(r=>{if(this.isValidLookup(i))return;const d=this.extractFromKey(r,n),u=d.key;a=u;let m=d.namespaces;this.options.fallbackNS&&(m=m.concat(this.options.fallbackNS));const p=n.count!==void 0&&typeof n.count!="string",f=p&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),w=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",S=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);m.forEach(E=>{this.isValidLookup(i)||(l=E,!gn[`${S[0]}-${E}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(gn[`${S[0]}-${E}`]=!0,this.logger.warn(`key "${a}" for languages "${S.join(", ")}" won't get resolved as namespace "${l}" 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!!!")),S.forEach(b=>{if(this.isValidLookup(i))return;s=b;const A=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(A,u,b,E,n);else{let C;p&&(C=this.pluralResolver.getSuffix(b,n.count,n));const I=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(A.push(u+C),n.ordinal&&C.indexOf(P)===0&&A.push(u+C.replace(P,this.options.pluralSeparator)),f&&A.push(u+I)),w){const L=`${u}${this.options.contextSeparator}${n.context}`;A.push(L),p&&(A.push(L+C),n.ordinal&&C.indexOf(P)===0&&A.push(L+C.replace(P,this.options.pluralSeparator)),f&&A.push(L+I))}}let O;for(;O=A.pop();)this.isValidLookup(i)||(o=O,i=this.getResource(b,E,O,n))}))})}),{res:i,usedKey:a,exactUsedKey:o,usedLng:s,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,a):this.resourceStore.getResource(e,n,i,a)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&typeof e.replace!="string";let a=i?e.replace:e;if(i&&typeof e.count<"u"&&(a.count=e.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!i){a={...a};for(const o of n)delete a[o]}return a}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}function je(t){return t.charAt(0).toUpperCase()+t.slice(1)}class hn{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=j.create("languageUtils")}getScriptPartFromCode(e){if(e=ye(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=ye(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(a=>a.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=je(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=je(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=je(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const a=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const a=this.getLanguagePartFromCode(i);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(o=>{if(o===a||!(o.indexOf("-")<0&&a.indexOf("-")<0)&&o.indexOf(a)===0)return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),a=[],o=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):typeof e=="string"&&o(this.formatLanguageCode(e)),i.forEach(s=>{a.indexOf(s)<0&&o(this.formatLanguageCode(s))}),a}}let Do=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Io={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const Lo=["v1","v2","v3"],Ao=["v4"],kn={zero:0,one:1,two:2,few:3,many:4,other:5};function Po(){const t={};return Do.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Io[e.fc]}})}),t}class Vo{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=j.create("pluralResolver"),(!this.options.compatibilityJSON||Ao.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Po()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(ye(e==="dev"?"en":e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(a=>`${n}${a}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((a,o)=>kn[a]-kn[o]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):i.numbers.map(a=>this.getSuffix(e,a,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(e,i);return a?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:this.getSuffixRetroCompatible(a,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let a=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));const o=()=>this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString();return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?`_plural_${a.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?o():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Lo.includes(this.options.compatibilityJSON)}}function fn(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=Eo(t,e,n);return!o&&a&&typeof n=="string"&&(o=ve(t,n,i),o===void 0&&(o=ve(e,n,i))),o}class _o{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=j.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const n=e.interpolation;this.escape=n.escape!==void 0?n.escape:Oo,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?J(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?J(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?J(n.nestingPrefix):n.nestingPrefixEscaped||J("$t("),this.nestingSuffix=n.nestingSuffix?J(n.nestingSuffix):n.nestingSuffixEscaped||J(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const i=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(i,"g")}interpolate(e,n,i,a){let o,s,l;const r=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(f){return f.replace(/\$/g,"$$$$")}const u=f=>{if(f.indexOf(this.formatSeparator)<0){const b=fn(n,r,f,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,i,{...a,...n,interpolationkey:f}):b}const w=f.split(this.formatSeparator),S=w.shift().trim(),E=w.join(this.formatSeparator).trim();return this.format(fn(n,r,S,this.options.keySeparator,this.options.ignoreJSONStructure),E,i,{...a,...n,interpolationkey:S})};this.resetRegExp();const m=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,p=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:f=>d(f)},{regex:this.regexp,safeValue:f=>this.escapeValue?d(this.escape(f)):d(f)}].forEach(f=>{for(l=0;o=f.regex.exec(e);){const w=o[1].trim();if(s=u(w),s===void 0)if(typeof m=="function"){const E=m(e,o,a);s=typeof E=="string"?E:""}else if(a&&Object.prototype.hasOwnProperty.call(a,w))s="";else if(p){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=dn(s));const S=f.safeValue(s);if(e=e.replace(o[0],S),p?(f.regex.lastIndex+=s.length,f.regex.lastIndex-=o[0].length):f.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,o,s;function l(r,d){const u=this.nestingOptionsSeparator;if(r.indexOf(u)<0)return r;const m=r.split(new RegExp(`${u}[ ]*{`));let p=`{${m[1]}`;r=m[0],p=this.interpolate(p,s);const f=p.match(/'/g),w=p.match(/"/g);(f&&f.length%2===0&&!w||w.length%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),d&&(s={...d,...s})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${r}`,S),`${r}${u}${p}`}return delete s.defaultValue,r}for(;a=this.nestingRegexp.exec(e);){let r=[];s={...i},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let d=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const u=a[1].split(this.formatSeparator).map(m=>m.trim());a[1]=u.shift(),r=u,d=!0}if(o=n(l.call(this,a[1].trim(),s),s),o&&a[0]===e&&typeof o!="string")return o;typeof o!="string"&&(o=dn(o)),o||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),o=""),d&&(o=r.reduce((u,m)=>this.format(u,m,i.lng,{...i,interpolationkey:a[1].trim()}),o.trim())),e=e.replace(a[0],o),this.regexp.lastIndex=0}return e}}function Uo(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const a=i[1].substring(0,i[1].length-1);e==="currency"&&a.indexOf(":")<0?n.currency||(n.currency=a.trim()):e==="relativetime"&&a.indexOf(":")<0?n.range||(n.range=a.trim()):a.split(";").forEach(o=>{if(!o)return;const[s,...l]=o.split(":"),r=l.join(":").trim().replace(/^'+|'+$/g,"");n[s.trim()]||(n[s.trim()]=r),r==="false"&&(n[s.trim()]=!1),r==="true"&&(n[s.trim()]=!0),isNaN(r)||(n[s.trim()]=parseInt(r,10))})}return{formatName:e,formatOptions:n}}function W(t){const e={};return function(n,i,a){const o=i+JSON.stringify(a);let s=e[o];return s||(s=t(ye(i),a),e[o]=s),s(n)}}class jo{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=j.create("formatter"),this.options=e,this.formats={number:W((n,i)=>{const a=new Intl.NumberFormat(n,{...i});return o=>a.format(o)}),currency:W((n,i)=>{const a=new Intl.NumberFormat(n,{...i,style:"currency"});return o=>a.format(o)}),datetime:W((n,i)=>{const a=new Intl.DateTimeFormat(n,{...i});return o=>a.format(o)}),relativetime:W((n,i)=>{const a=new Intl.RelativeTimeFormat(n,{...i});return o=>a.format(o,i.range||"day")}),list:W((n,i)=>{const a=new Intl.ListFormat(n,{...i});return o=>a.format(o)})},this.init(e)}init(e){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=W(n)}format(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((o,s)=>{const{formatName:l,formatOptions:r}=Uo(s);if(this.formats[l]){let d=o;try{const u=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},m=u.locale||u.lng||a.locale||a.lng||i;d=this.formats[l](o,m,{...r,...a,...u})}catch(u){this.logger.warn(u)}return d}else this.logger.warn(`there was no format function for ${l}`);return o},e)}}function $o(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class Mo extends ke{constructor(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=a,this.logger=j.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&&this.backend.init&&this.backend.init(i,a.backend,a)}queueLoad(e,n,i,a){const o={},s={},l={},r={};return e.forEach(d=>{let u=!0;n.forEach(m=>{const p=`${d}|${m}`;!i.reload&&this.store.hasResourceBundle(d,m)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,u=!1,s[p]===void 0&&(s[p]=!0),o[p]===void 0&&(o[p]=!0),r[m]===void 0&&(r[m]=!0)))}),u||(l[d]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(r)}}loaded(e,n,i){const a=e.split("|"),o=a[0],s=a[1];n&&this.emit("failedLoading",o,s,n),i&&this.store.addResourceBundle(o,s,i),this.state[e]=n?-1:2;const l={};this.queue.forEach(r=>{Co(r.loaded,[o],s),$o(r,e),n&&r.errors.push(n),r.pendingCount===0&&!r.done&&(Object.keys(r.loaded).forEach(d=>{l[d]||(l[d]={});const u=r.loaded[d];u.length&&u.forEach(m=>{l[d][m]===void 0&&(l[d][m]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(r=>!r.done)}read(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:a,wait:o,callback:s});return}this.readingCalls++;const l=(d,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const m=this.waitingReads.shift();this.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(d&&u&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,a+1,o*2,s)},o);return}s(d,u)},r=this.backend[i].bind(this.backend);if(r.length===2){try{const d=r(e,n);d&&typeof d.then=="function"?d.then(u=>l(null,u)).catch(l):l(null,d)}catch(d){l(d)}return}return r(e,n,l)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(e,n,i,a);if(!o.toLoad.length)return o.pending.length||a(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),a=i[0],o=i[1];this.read(a,o,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${a} failed`,s),!s&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${a}`,l),this.loaded(e,s,l)})}saveMissing(e,n,i,a,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${i}" as the namespace "${n}" 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!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){const r={...s,isUpdate:o},d=this.backend.create.bind(this.backend);if(d.length<6)try{let u;d.length===5?u=d(e,n,i,a,r):u=d(e,n,i,a),u&&typeof u.then=="function"?u.then(m=>l(null,m)).catch(l):l(null,u)}catch(u){l(u)}else d(e,n,i,a,l,r)}!e||!e[0]||this.store.addResource(e[0],n,i,a)}}}function vn(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let e={};if(typeof t[1]=="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function yn(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function Ne(){}function zo(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(e=>{typeof t[e]=="function"&&(t[e]=t[e].bind(t))})}class ae extends ke{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=yn(e),this.services={},this.logger=j,this.modules={external:[]},zo(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(i=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const a=vn();this.options={...a,...this.options,...yn(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...a.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function o(r){return r?typeof r=="function"?new r:r:null}if(!this.options.isClone){this.modules.logger?j.init(o(this.modules.logger),this.options):j.init(null,this.options);let r;this.modules.formatter?r=this.modules.formatter:typeof Intl<"u"&&(r=jo);const d=new hn(this.options);this.store=new mn(this.options.resources,this.options);const u=this.services;u.logger=j,u.resourceStore=this.store,u.languageUtils=d,u.pluralResolver=new Vo(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),r&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(u.formatter=o(r),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new _o(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Mo(o(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(m){for(var p=arguments.length,f=new Array(p>1?p-1:0),w=1;w<p;w++)f[w-1]=arguments[w];e.emit(m,...f)}),this.modules.languageDetector&&(u.languageDetector=o(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=o(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new Se(this.services,this.options),this.translator.on("*",function(m){for(var p=arguments.length,f=new Array(p>1?p-1:0),w=1;w<p;w++)f[w-1]=arguments[w];e.emit(m,...f)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,i||(i=Ne),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const r=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);r.length>0&&r[0]!=="dev"&&(this.options.lng=r[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(r=>{this[r]=function(){return e.store[r](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(r=>{this[r]=function(){return e.store[r](...arguments),e}});const s=ie(),l=()=>{const r=(d,u)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(u),i(d,u)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return r(null,this.t.bind(this));this.changeLanguage(this.options.lng,r)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),s}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ne;const i=typeof e=="string"?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{!s||s==="cimode"||this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&a.indexOf(l)<0&&a.push(l)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(s=>o(s)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(e,n,i){const a=ie();return e||(e=this.languages),n||(n=this.options.ns),i||(i=Ne),this.services.backendConnector.reload(e,n,o=>{a.resolve(),i(o)}),a}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");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"&&pn.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const a=ie();this.emit("languageChanging",e);const o=r=>{this.language=r,this.languages=this.services.languageUtils.toResolveHierarchy(r),this.resolvedLanguage=void 0,this.setResolvedLanguage(r)},s=(r,d)=>{d?(o(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,a.resolve(function(){return i.t(...arguments)}),n&&n(r,function(){return i.t(...arguments)})},l=r=>{!e&&!r&&this.services.languageDetector&&(r=[]);const d=typeof r=="string"?r:this.services.languageUtils.getBestMatchFromCodes(r);d&&(this.language||o(d),this.translator.language||this.translator.changeLanguage(d),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(d)),this.loadResources(d,u=>{s(u,d)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),a}getFixedT(e,n,i){var a=this;const o=function(s,l){let r;if(typeof l!="object"){for(var d=arguments.length,u=new Array(d>2?d-2:0),m=2;m<d;m++)u[m-2]=arguments[m];r=a.options.overloadTranslationOptionHandler([s,l].concat(u))}else r={...l};r.lng=r.lng||o.lng,r.lngs=r.lngs||o.lngs,r.ns=r.ns||o.ns,r.keyPrefix=r.keyPrefix||i||o.keyPrefix;const p=a.options.keySeparator||".";let f;return r.keyPrefix&&Array.isArray(s)?f=s.map(w=>`${r.keyPrefix}${p}${w}`):f=r.keyPrefix?`${r.keyPrefix}${p}${s}`:s,a.t(f,r)};return typeof e=="string"?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=i,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(l,r)=>{const d=this.services.backendConnector.state[`${l}|${r}`];return d===-1||d===2};if(n.precheck){const l=n.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!a||s(o,e)))}loadNamespaces(e,n){const i=ie();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{i.resolve(),n&&n(a)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=ie();typeof e=="string"&&(e=[e]);const a=this.options.preload||[],o=e.filter(s=>a.indexOf(s)<0);return o.length?(this.options.preload=a.concat(o),this.loadResources(s=>{i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["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"],i=this.services&&this.services.languageUtils||new hn(vn());return n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new ae(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ne;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},o=new ae(a);return(e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},i&&(o.store=new mn(this.store.data,a),o.services.resourceStore=o.store),o.translator=new Se(o.services,a),o.translator.on("*",function(s){for(var l=arguments.length,r=new Array(l>1?l-1:0),d=1;d<l;d++)r[d-1]=arguments[d];o.emit(s,...r)}),o.init(a,n),o.translator.options=a,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const U=ae.createInstance();U.createInstance=ae.createInstance,U.createInstance,U.dir,U.init,U.loadResources,U.reloadResources,U.use,U.changeLanguage,U.getFixedT,U.t,U.exists,U.setDefaultNamespace,U.hasLoadedNamespace,U.loadNamespaces,U.loadLanguages;const Bo=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Go={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},Qo=t=>Go[t];let Sn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:t=>t.replace(Bo,Qo)};function qo(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Sn={...Sn,...t}}mt(U,{type:"3rdParty",init(t){qo(t.options.react)}});let Nn,$e,bn;fi=t=>gt(U,t),{createContext:Nn,useContext:$e,useMemo:bn}=await M("react");let Me=new Map,be;be=Nn(Me),ri=({children:t,stores:e})=>{const n=$e(be),i=bn(()=>{const a=new Map;return e.forEach(o=>a.set(o.class,o.value)),Me=new Map([...n,...a])},[]);return Xo(be.Provider,{value:i,children:t})},Si=function(t){return $e(be).get(t)},gi=function(t){return Me.get(t)};var Fn=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(Fn||{}),wn=(t=>(t.Add="add",t.Remove="remove",t))(wn||{}),Cn=(t=>(t.Active="active",t.Inactive="inactive",t))(Cn||{});let En,Tn,On,xn,Rn,Dn,In,Ln,An,Pn,Vn,_n,Un,jn,$n,Mn,zn,Bn,Gn,Qn,qn,Kn,Jn,Wn,Hn,Zn,Xn,Yn;En={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Tn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},On={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},xn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Rn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ManageCollectionProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ManageCollectionProductInInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Dn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},In={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Ln={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindMinimalEvent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"thumbnails"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},An={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchMinimalEvents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Pn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BlockUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BlockUserInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"blockUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BlockUserSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Vn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ChangeAccountUsername"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeAccountUsername"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},_n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Un={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetAllChatMessageInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatMessageArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"connectionId"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"idEvent"}},{kind:"Field",name:{kind:"Name",value:"sendDate"}},{kind:"Field",name:{kind:"Name",value:"sessionId"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"isAdmin"}},{kind:"Field",name:{kind:"Name",value:"urlGif"}},{kind:"Field",name:{kind:"Name",value:"second"}},{kind:"Field",name:{kind:"Name",value:"ip"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},jn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetChatRoomToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetChatRoomInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getChatRoomToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatRoomTokenData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},$n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PinChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PinChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pinChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PinChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Mn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInputAccount"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},zn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"section"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Bn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Gn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTimeLine"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetTimeLineInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTimeLine"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TimeLineArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"time"}},{kind:"Field",name:{kind:"Name",value:"likes"}},{kind:"Field",name:{kind:"Name",value:"comments"}},{kind:"Field",name:{kind:"Name",value:"viewers"}},{kind:"Field",name:{kind:"Name",value:"orders"}},{kind:"Field",name:{kind:"Name",value:"minute"}},{kind:"Field",name:{kind:"Name",value:"hour"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Qn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppendProductsToSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RelateToProductsSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appendProductsSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},qn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateSnackVideoBatch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Kn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteRelationshipWithSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteRelationshipSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}}]}}]}}]},Jn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Wn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindManySnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindManySnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findManySnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Hn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Zn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSnackVideoRelationships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRelationshipSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RelationshipSnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceEntity"}},{kind:"Field",name:{kind:"Name",value:"attributeId"}}]}}]}}]}}]}}]},Xn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Yn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindByProductSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindByProductSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findByProductSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ii=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:En,AppendProductsToSnackVideoDocument:Qn,BlockUserDocument:Pn,ChangeAccountUsernameDocument:Vn,CreateSnackVideoBatchDocument:qn,DeleteAllCustomizationDocument:Mn,DeleteChatMessageDocument:_n,DeleteCollectionDocument:Tn,DeleteRelationshipWithSnackVideoDocument:Kn,DeleteSnackVideoDocument:Jn,EventStatus:Fn,FindByProductSnackVideoDocument:Yn,FindCollectionDocument:On,FindManySnackVideosDocument:Wn,FindMinimalEventDocument:Ln,GetAllChatMessageDocument:Un,GetAllCollectionsDocument:xn,GetAllCustomizationDocument:zn,GetAllSnackVideosDocument:Hn,GetChatRoomTokenDocument:jn,GetSnackVideoRelationshipsDocument:Zn,GetTimeLineDocument:Gn,ManageCollectionProductDocument:Rn,Methods:wn,PinChatMessageDocument:$n,SearchCollectionsDocument:Dn,SearchMinimalEventsDocument:An,SearchSnackVideosDocument:Xn,Status:Cn,UpdateCollectionDocument:In,UpdateCustomizationDocument:Bn},Symbol.toStringTag,{value:"Module"})),ui=function(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}});export{Fe as AccountContractStatusTypes,Ge as AccountContractTypes,ni as AccountInvalidError,Qe as AccountPlanDescriptionTypes,qe as AccountRestRepository,Ke as AccountService,Je as AccountSubscriptionTypes,we as AccountTypes,We as AggregateRoot,ii as ApiGraphqlTypes,ai as BaseMobxStore,He as BroadcastChannelEventBus,H as DomainError,oi as EventBusWildcards,si as EventNames,Ze as GlobalPageSectionTypes,Xe as InvalidNizzaGlobalObjectError,Ye as LanguageTypes,Ce as NizzaAccount,et as NizzaEventStatus,Z as NizzaLogger,tt as NizzaProductRequestOriginTypes,nt as NizzaVariationTypes,it as ResourceNotFoundError,ri as StoreProvider,at as UnexpectedError,li as ValueObject,Yo as __tla,oe as accountAtom,Ee as accountService,di as apiCall,ot as buildLanguageTranslations,st as buildTranslations,rt as configure,G as coreLogger,lt as createAggregateRoot,ui as createStore,Te as customFetch,ci as downloadFile,mi as fileOrigin,dt as getAccount,pi as getClientTimeZone,ut as getInstance,gi as getStore,ct as globalAtomStore,mt as i18Init,pt as jsDownload,hi as logger,z as nizza,ki as nizzaInit,fi as registerTranslations,gt as registerTranslationsOf,vi as searchParams,ht as setProductDataSource,kt as shortId,yi as useAccount,ft as useNizza,Si as useStore,Ni as validateRequiredProps};