@myxtra/authentication-green 1.16.0 → 2.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,22 @@
1
- var bt = (e, t, s) => {
1
+ var gt = (e, t, s) => {
2
2
  if (!t.has(e))
3
3
  throw TypeError("Cannot " + s);
4
4
  };
5
- var a = (e, t, s) => (bt(e, t, "read from private field"), s ? s.call(e) : t.get(e)), m = (e, t, s) => {
5
+ var n = (e, t, s) => (gt(e, t, "read from private field"), s ? s.call(e) : t.get(e)), p = (e, t, s) => {
6
6
  if (t.has(e))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  t instanceof WeakSet ? t.add(e) : t.set(e, s);
9
- }, h = (e, t, s, r) => (bt(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s);
10
- var lt = (e, t, s, r) => ({
11
- set _(n) {
12
- h(e, t, n, s);
9
+ }, h = (e, t, s, r) => (gt(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s);
10
+ var at = (e, t, s, r) => ({
11
+ set _(a) {
12
+ h(e, t, a, s);
13
13
  },
14
14
  get _() {
15
- return a(e, t, r);
15
+ return n(e, t, r);
16
16
  }
17
- }), b = (e, t, s) => (bt(e, t, "access private method"), s);
18
- import { r as d, j as i, u as Vs, a as Ws, b as Ee, c as fs, P as qt, d as Zs, E as zs } from "./index-ab1ba154.mjs";
19
- var Ge = class {
17
+ }), x = (e, t, s) => (gt(e, t, "access private method"), s);
18
+ import { r as d, j as i, u as Ks, a as Gs, b as _e, P as Qt, c as cs, d as Vs, e as qs, E as Ws, C as Zs } from "./index-c468a93b.mjs";
19
+ var Ke = class {
20
20
  constructor() {
21
21
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
22
22
  }
@@ -32,82 +32,82 @@ var Ge = class {
32
32
  }
33
33
  onUnsubscribe() {
34
34
  }
35
- }, Ke = typeof window > "u" || "Deno" in window;
35
+ }, $e = typeof window > "u" || "Deno" in window;
36
36
  function Z() {
37
37
  }
38
38
  function Ys(e, t) {
39
39
  return typeof e == "function" ? e(t) : e;
40
40
  }
41
- function jt(e) {
41
+ function xt(e) {
42
42
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
43
43
  }
44
- function ps(e, t) {
44
+ function us(e, t) {
45
45
  return Math.max(e + (t || 0) - Date.now(), 0);
46
46
  }
47
- function Vt(e, t) {
47
+ function Ht(e, t) {
48
48
  const {
49
49
  type: s = "all",
50
50
  exact: r,
51
- fetchStatus: n,
51
+ fetchStatus: a,
52
52
  predicate: o,
53
53
  queryKey: l,
54
54
  stale: c
55
55
  } = e;
56
56
  if (l) {
57
57
  if (r) {
58
- if (t.queryHash !== Qt(l, t.options))
58
+ if (t.queryHash !== Ft(l, t.options))
59
59
  return !1;
60
- } else if (!We(t.queryKey, l))
60
+ } else if (!Ve(t.queryKey, l))
61
61
  return !1;
62
62
  }
63
63
  if (s !== "all") {
64
- const f = t.isActive();
65
- if (s === "active" && !f || s === "inactive" && f)
64
+ const m = t.isActive();
65
+ if (s === "active" && !m || s === "inactive" && m)
66
66
  return !1;
67
67
  }
68
- return !(typeof c == "boolean" && t.isStale() !== c || typeof n < "u" && n !== t.state.fetchStatus || o && !o(t));
68
+ return !(typeof c == "boolean" && t.isStale() !== c || typeof a < "u" && a !== t.state.fetchStatus || o && !o(t));
69
69
  }
70
- function Wt(e, t) {
71
- const { exact: s, status: r, predicate: n, mutationKey: o } = e;
70
+ function $t(e, t) {
71
+ const { exact: s, status: r, predicate: a, mutationKey: o } = e;
72
72
  if (o) {
73
73
  if (!t.options.mutationKey)
74
74
  return !1;
75
75
  if (s) {
76
- if (je(t.options.mutationKey) !== je(o))
76
+ if (we(t.options.mutationKey) !== we(o))
77
77
  return !1;
78
- } else if (!We(t.options.mutationKey, o))
78
+ } else if (!Ve(t.options.mutationKey, o))
79
79
  return !1;
80
80
  }
81
- return !(r && t.state.status !== r || n && !n(t));
81
+ return !(r && t.state.status !== r || a && !a(t));
82
82
  }
83
- function Qt(e, t) {
84
- return ((t == null ? void 0 : t.queryKeyHashFn) || je)(e);
83
+ function Ft(e, t) {
84
+ return ((t == null ? void 0 : t.queryKeyHashFn) || we)(e);
85
85
  }
86
- function je(e) {
86
+ function we(e) {
87
87
  return JSON.stringify(
88
88
  e,
89
- (t, s) => _t(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
89
+ (t, s) => bt(s) ? Object.keys(s).sort().reduce((r, a) => (r[a] = s[a], r), {}) : s
90
90
  );
91
91
  }
92
- function We(e, t) {
93
- return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !We(e[s], t[s])) : !1;
92
+ function Ve(e, t) {
93
+ return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Ve(e[s], t[s])) : !1;
94
94
  }
95
- function ms(e, t) {
95
+ function ds(e, t) {
96
96
  if (e === t)
97
97
  return e;
98
- const s = Zt(e) && Zt(t);
99
- if (s || _t(e) && _t(t)) {
100
- const r = s ? e : Object.keys(e), n = r.length, o = s ? t : Object.keys(t), l = o.length, c = s ? [] : {};
101
- let f = 0;
102
- for (let y = 0; y < l; y++) {
103
- const u = s ? y : o[y];
104
- !s && e[u] === void 0 && t[u] === void 0 && r.includes(u) ? (c[u] = void 0, f++) : (c[u] = ms(e[u], t[u]), c[u] === e[u] && e[u] !== void 0 && f++);
98
+ const s = Kt(e) && Kt(t);
99
+ if (s || bt(e) && bt(t)) {
100
+ const r = s ? e : Object.keys(e), a = r.length, o = s ? t : Object.keys(t), l = o.length, c = s ? [] : {};
101
+ let m = 0;
102
+ for (let C = 0; C < l; C++) {
103
+ const u = s ? C : o[C];
104
+ !s && e[u] === void 0 && t[u] === void 0 && r.includes(u) ? (c[u] = void 0, m++) : (c[u] = ds(e[u], t[u]), c[u] === e[u] && e[u] !== void 0 && m++);
105
105
  }
106
- return n === l && f === n ? e : c;
106
+ return a === l && m === a ? e : c;
107
107
  }
108
108
  return t;
109
109
  }
110
- function ht(e, t) {
110
+ function ct(e, t) {
111
111
  if (e && !t || t && !e)
112
112
  return !1;
113
113
  for (const s in e)
@@ -115,45 +115,45 @@ function ht(e, t) {
115
115
  return !1;
116
116
  return !0;
117
117
  }
118
- function Zt(e) {
118
+ function Kt(e) {
119
119
  return Array.isArray(e) && e.length === Object.keys(e).length;
120
120
  }
121
- function _t(e) {
122
- if (!zt(e))
121
+ function bt(e) {
122
+ if (!Gt(e))
123
123
  return !1;
124
124
  const t = e.constructor;
125
125
  if (typeof t > "u")
126
126
  return !0;
127
127
  const s = t.prototype;
128
- return !(!zt(s) || !s.hasOwnProperty("isPrototypeOf"));
128
+ return !(!Gt(s) || !s.hasOwnProperty("isPrototypeOf"));
129
129
  }
130
- function zt(e) {
130
+ function Gt(e) {
131
131
  return Object.prototype.toString.call(e) === "[object Object]";
132
132
  }
133
- function Js(e) {
133
+ function zs(e) {
134
134
  return new Promise((t) => {
135
135
  setTimeout(t, e);
136
136
  });
137
137
  }
138
- function Et(e, t, s) {
139
- return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? ms(e, t) : t;
138
+ function wt(e, t, s) {
139
+ return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? ds(e, t) : t;
140
140
  }
141
- function Xs(e, t, s = 0) {
141
+ function Js(e, t, s = 0) {
142
142
  const r = [...e, t];
143
143
  return s && r.length > s ? r.slice(1) : r;
144
144
  }
145
- function Is(e, t, s = 0) {
145
+ function Xs(e, t, s = 0) {
146
146
  const r = [t, ...e];
147
147
  return s && r.length > s ? r.slice(0, -1) : r;
148
148
  }
149
- var me, ae, Ae, rs, Bs = (rs = class extends Ge {
149
+ var pe, ne, Ee, Bt, Is = (Bt = class extends Ke {
150
150
  constructor() {
151
151
  super();
152
- m(this, me, void 0);
153
- m(this, ae, void 0);
154
- m(this, Ae, void 0);
155
- h(this, Ae, (t) => {
156
- if (!Ke && window.addEventListener) {
152
+ p(this, pe, void 0);
153
+ p(this, ne, void 0);
154
+ p(this, Ee, void 0);
155
+ h(this, Ee, (t) => {
156
+ if (!$e && window.addEventListener) {
157
157
  const s = () => t();
158
158
  return window.addEventListener("visibilitychange", s, !1), () => {
159
159
  window.removeEventListener("visibilitychange", s);
@@ -162,20 +162,20 @@ var me, ae, Ae, rs, Bs = (rs = class extends Ge {
162
162
  });
163
163
  }
164
164
  onSubscribe() {
165
- a(this, ae) || this.setEventListener(a(this, Ae));
165
+ n(this, ne) || this.setEventListener(n(this, Ee));
166
166
  }
167
167
  onUnsubscribe() {
168
168
  var t;
169
- this.hasListeners() || ((t = a(this, ae)) == null || t.call(this), h(this, ae, void 0));
169
+ this.hasListeners() || ((t = n(this, ne)) == null || t.call(this), h(this, ne, void 0));
170
170
  }
171
171
  setEventListener(t) {
172
172
  var s;
173
- h(this, Ae, t), (s = a(this, ae)) == null || s.call(this), h(this, ae, t((r) => {
173
+ h(this, Ee, t), (s = n(this, ne)) == null || s.call(this), h(this, ne, t((r) => {
174
174
  typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
175
175
  }));
176
176
  }
177
177
  setFocused(t) {
178
- a(this, me) !== t && (h(this, me, t), this.onFocus());
178
+ n(this, pe) !== t && (h(this, pe, t), this.onFocus());
179
179
  }
180
180
  onFocus() {
181
181
  this.listeners.forEach((t) => {
@@ -184,16 +184,16 @@ var me, ae, Ae, rs, Bs = (rs = class extends Ge {
184
184
  }
185
185
  isFocused() {
186
186
  var t;
187
- return typeof a(this, me) == "boolean" ? a(this, me) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
187
+ return typeof n(this, pe) == "boolean" ? n(this, pe) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
188
188
  }
189
- }, me = new WeakMap(), ae = new WeakMap(), Ae = new WeakMap(), rs), ft = new Bs(), Se, oe, ke, is, er = (is = class extends Ge {
189
+ }, pe = new WeakMap(), ne = new WeakMap(), Ee = new WeakMap(), Bt), ut = new Is(), Se, ae, Ae, es, Bs = (es = class extends Ke {
190
190
  constructor() {
191
191
  super();
192
- m(this, Se, !0);
193
- m(this, oe, void 0);
194
- m(this, ke, void 0);
195
- h(this, ke, (t) => {
196
- if (!Ke && window.addEventListener) {
192
+ p(this, Se, !0);
193
+ p(this, ae, void 0);
194
+ p(this, Ae, void 0);
195
+ h(this, Ae, (t) => {
196
+ if (!$e && window.addEventListener) {
197
197
  const s = () => t(!0), r = () => t(!1);
198
198
  return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
199
199
  window.removeEventListener("online", s), window.removeEventListener("offline", r);
@@ -202,192 +202,192 @@ var me, ae, Ae, rs, Bs = (rs = class extends Ge {
202
202
  });
203
203
  }
204
204
  onSubscribe() {
205
- a(this, oe) || this.setEventListener(a(this, ke));
205
+ n(this, ae) || this.setEventListener(n(this, Ae));
206
206
  }
207
207
  onUnsubscribe() {
208
208
  var t;
209
- this.hasListeners() || ((t = a(this, oe)) == null || t.call(this), h(this, oe, void 0));
209
+ this.hasListeners() || ((t = n(this, ae)) == null || t.call(this), h(this, ae, void 0));
210
210
  }
211
211
  setEventListener(t) {
212
212
  var s;
213
- h(this, ke, t), (s = a(this, oe)) == null || s.call(this), h(this, oe, t(this.setOnline.bind(this)));
213
+ h(this, Ae, t), (s = n(this, ae)) == null || s.call(this), h(this, ae, t(this.setOnline.bind(this)));
214
214
  }
215
215
  setOnline(t) {
216
- a(this, Se) !== t && (h(this, Se, t), this.listeners.forEach((r) => {
216
+ n(this, Se) !== t && (h(this, Se, t), this.listeners.forEach((r) => {
217
217
  r(t);
218
218
  }));
219
219
  }
220
220
  isOnline() {
221
- return a(this, Se);
221
+ return n(this, Se);
222
222
  }
223
- }, Se = new WeakMap(), oe = new WeakMap(), ke = new WeakMap(), is), pt = new er();
224
- function tr(e) {
223
+ }, Se = new WeakMap(), ae = new WeakMap(), Ae = new WeakMap(), es), dt = new Bs();
224
+ function er(e) {
225
225
  return Math.min(1e3 * 2 ** e, 3e4);
226
226
  }
227
- function xt(e) {
228
- return (e ?? "online") === "online" ? pt.isOnline() : !0;
227
+ function vt(e) {
228
+ return (e ?? "online") === "online" ? dt.isOnline() : !0;
229
229
  }
230
- var vs = class {
230
+ var hs = class {
231
231
  constructor(e) {
232
232
  this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
233
233
  }
234
234
  };
235
- function wt(e) {
236
- return e instanceof vs;
235
+ function Ct(e) {
236
+ return e instanceof hs;
237
237
  }
238
- function gs(e) {
239
- let t = !1, s = 0, r = !1, n, o, l;
240
- const c = new Promise((v, C) => {
241
- o = v, l = C;
242
- }), f = (v) => {
243
- var C;
244
- r || (p(new vs(v)), (C = e.abort) == null || C.call(e));
245
- }, y = () => {
238
+ function fs(e) {
239
+ let t = !1, s = 0, r = !1, a, o, l;
240
+ const c = new Promise((y, g) => {
241
+ o = y, l = g;
242
+ }), m = (y) => {
243
+ var g;
244
+ r || (f(new hs(y)), (g = e.abort) == null || g.call(e));
245
+ }, C = () => {
246
246
  t = !0;
247
247
  }, u = () => {
248
248
  t = !1;
249
- }, x = () => !ft.isFocused() || e.networkMode !== "always" && !pt.isOnline(), g = (v) => {
250
- var C;
251
- r || (r = !0, (C = e.onSuccess) == null || C.call(e, v), n == null || n(), o(v));
252
- }, p = (v) => {
253
- var C;
254
- r || (r = !0, (C = e.onError) == null || C.call(e, v), n == null || n(), l(v));
255
- }, w = () => new Promise((v) => {
256
- var C;
257
- n = (S) => {
258
- const E = r || !x();
259
- return E && v(S), E;
260
- }, (C = e.onPause) == null || C.call(e);
249
+ }, b = () => !ut.isFocused() || e.networkMode !== "always" && !dt.isOnline(), v = (y) => {
250
+ var g;
251
+ r || (r = !0, (g = e.onSuccess) == null || g.call(e, y), a == null || a(), o(y));
252
+ }, f = (y) => {
253
+ var g;
254
+ r || (r = !0, (g = e.onError) == null || g.call(e, y), a == null || a(), l(y));
255
+ }, w = () => new Promise((y) => {
256
+ var g;
257
+ a = (S) => {
258
+ const _ = r || !b();
259
+ return _ && y(S), _;
260
+ }, (g = e.onPause) == null || g.call(e);
261
261
  }).then(() => {
262
- var v;
263
- n = void 0, r || (v = e.onContinue) == null || v.call(e);
264
- }), _ = () => {
262
+ var y;
263
+ a = void 0, r || (y = e.onContinue) == null || y.call(e);
264
+ }), E = () => {
265
265
  if (r)
266
266
  return;
267
- let v;
267
+ let y;
268
268
  try {
269
- v = e.fn();
270
- } catch (C) {
271
- v = Promise.reject(C);
269
+ y = e.fn();
270
+ } catch (g) {
271
+ y = Promise.reject(g);
272
272
  }
273
- Promise.resolve(v).then(g).catch((C) => {
273
+ Promise.resolve(y).then(v).catch((g) => {
274
274
  var $;
275
275
  if (r)
276
276
  return;
277
- const S = e.retry ?? (Ke ? 0 : 3), E = e.retryDelay ?? tr, k = typeof E == "function" ? E(s, C) : E, T = S === !0 || typeof S == "number" && s < S || typeof S == "function" && S(s, C);
278
- if (t || !T) {
279
- p(C);
277
+ const S = e.retry ?? ($e ? 0 : 3), _ = e.retryDelay ?? er, k = typeof _ == "function" ? _(s, g) : _, L = S === !0 || typeof S == "number" && s < S || typeof S == "function" && S(s, g);
278
+ if (t || !L) {
279
+ f(g);
280
280
  return;
281
281
  }
282
- s++, ($ = e.onFail) == null || $.call(e, s, C), Js(k).then(() => {
283
- if (x())
282
+ s++, ($ = e.onFail) == null || $.call(e, s, g), zs(k).then(() => {
283
+ if (b())
284
284
  return w();
285
285
  }).then(() => {
286
- t ? p(C) : _();
286
+ t ? f(g) : E();
287
287
  });
288
288
  });
289
289
  };
290
- return xt(e.networkMode) ? _() : w().then(_), {
290
+ return vt(e.networkMode) ? E() : w().then(E), {
291
291
  promise: c,
292
- cancel: f,
293
- continue: () => (n == null ? void 0 : n()) ? c : Promise.resolve(),
294
- cancelRetry: y,
292
+ cancel: m,
293
+ continue: () => (a == null ? void 0 : a()) ? c : Promise.resolve(),
294
+ cancelRetry: C,
295
295
  continueRetry: u
296
296
  };
297
297
  }
298
- function sr() {
299
- let e = [], t = 0, s = (g) => {
300
- g();
301
- }, r = (g) => {
302
- g();
303
- }, n = (g) => setTimeout(g, 0);
304
- const o = (g) => {
305
- n = g;
306
- }, l = (g) => {
307
- let p;
298
+ function tr() {
299
+ let e = [], t = 0, s = (v) => {
300
+ v();
301
+ }, r = (v) => {
302
+ v();
303
+ }, a = (v) => setTimeout(v, 0);
304
+ const o = (v) => {
305
+ a = v;
306
+ }, l = (v) => {
307
+ let f;
308
308
  t++;
309
309
  try {
310
- p = g();
310
+ f = v();
311
311
  } finally {
312
- t--, t || y();
312
+ t--, t || C();
313
313
  }
314
- return p;
315
- }, c = (g) => {
316
- t ? e.push(g) : n(() => {
317
- s(g);
314
+ return f;
315
+ }, c = (v) => {
316
+ t ? e.push(v) : a(() => {
317
+ s(v);
318
318
  });
319
- }, f = (g) => (...p) => {
319
+ }, m = (v) => (...f) => {
320
320
  c(() => {
321
- g(...p);
321
+ v(...f);
322
322
  });
323
- }, y = () => {
324
- const g = e;
325
- e = [], g.length && n(() => {
323
+ }, C = () => {
324
+ const v = e;
325
+ e = [], v.length && a(() => {
326
326
  r(() => {
327
- g.forEach((p) => {
328
- s(p);
327
+ v.forEach((f) => {
328
+ s(f);
329
329
  });
330
330
  });
331
331
  });
332
332
  };
333
333
  return {
334
334
  batch: l,
335
- batchCalls: f,
335
+ batchCalls: m,
336
336
  schedule: c,
337
- setNotifyFunction: (g) => {
338
- s = g;
337
+ setNotifyFunction: (v) => {
338
+ s = v;
339
339
  },
340
- setBatchNotifyFunction: (g) => {
341
- r = g;
340
+ setBatchNotifyFunction: (v) => {
341
+ r = v;
342
342
  },
343
343
  setScheduler: o
344
344
  };
345
345
  }
346
- var F = sr(), ve, ns, ys = (ns = class {
346
+ var R = tr(), me, ts, ps = (ts = class {
347
347
  constructor() {
348
- m(this, ve, void 0);
348
+ p(this, me, void 0);
349
349
  }
350
350
  destroy() {
351
351
  this.clearGcTimeout();
352
352
  }
353
353
  scheduleGc() {
354
- this.clearGcTimeout(), jt(this.gcTime) && h(this, ve, setTimeout(() => {
354
+ this.clearGcTimeout(), xt(this.gcTime) && h(this, me, setTimeout(() => {
355
355
  this.optionalRemove();
356
356
  }, this.gcTime));
357
357
  }
358
358
  updateGcTime(e) {
359
359
  this.gcTime = Math.max(
360
360
  this.gcTime || 0,
361
- e ?? (Ke ? 1 / 0 : 5 * 60 * 1e3)
361
+ e ?? ($e ? 1 / 0 : 5 * 60 * 1e3)
362
362
  );
363
363
  }
364
364
  clearGcTimeout() {
365
- a(this, ve) && (clearTimeout(a(this, ve)), h(this, ve, void 0));
365
+ n(this, me) && (clearTimeout(n(this, me)), h(this, me, void 0));
366
366
  }
367
- }, ve = new WeakMap(), ns), Pe, Ne, q, le, V, R, Ze, ge, Me, ut, J, se, as, rr = (as = class extends ys {
367
+ }, me = new WeakMap(), ts), Pe, Ne, V, oe, q, D, qe, ve, ke, ot, z, te, ss, sr = (ss = class extends ps {
368
368
  constructor(t) {
369
369
  super();
370
- m(this, Me);
371
- m(this, J);
372
- m(this, Pe, void 0);
373
- m(this, Ne, void 0);
374
- m(this, q, void 0);
375
- m(this, le, void 0);
376
- m(this, V, void 0);
377
- m(this, R, void 0);
378
- m(this, Ze, void 0);
379
- m(this, ge, void 0);
380
- h(this, ge, !1), h(this, Ze, t.defaultOptions), b(this, Me, ut).call(this, t.options), h(this, R, []), h(this, q, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, h(this, Pe, t.state || ir(this.options)), this.state = a(this, Pe), this.scheduleGc();
370
+ p(this, ke);
371
+ p(this, z);
372
+ p(this, Pe, void 0);
373
+ p(this, Ne, void 0);
374
+ p(this, V, void 0);
375
+ p(this, oe, void 0);
376
+ p(this, q, void 0);
377
+ p(this, D, void 0);
378
+ p(this, qe, void 0);
379
+ p(this, ve, void 0);
380
+ h(this, ve, !1), h(this, qe, t.defaultOptions), x(this, ke, ot).call(this, t.options), h(this, D, []), h(this, V, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, h(this, Pe, t.state || rr(this.options)), this.state = n(this, Pe), this.scheduleGc();
381
381
  }
382
382
  get meta() {
383
383
  return this.options.meta;
384
384
  }
385
385
  optionalRemove() {
386
- !a(this, R).length && this.state.fetchStatus === "idle" && a(this, q).remove(this);
386
+ !n(this, D).length && this.state.fetchStatus === "idle" && n(this, V).remove(this);
387
387
  }
388
388
  setData(t, s) {
389
- const r = Et(this.state.data, t, this.options);
390
- return b(this, J, se).call(this, {
389
+ const r = wt(this.state.data, t, this.options);
390
+ return x(this, z, te).call(this, {
391
391
  data: r,
392
392
  type: "success",
393
393
  dataUpdatedAt: s == null ? void 0 : s.updatedAt,
@@ -395,21 +395,21 @@ var F = sr(), ve, ns, ys = (ns = class {
395
395
  }), r;
396
396
  }
397
397
  setState(t, s) {
398
- b(this, J, se).call(this, { type: "setState", state: t, setStateOptions: s });
398
+ x(this, z, te).call(this, { type: "setState", state: t, setStateOptions: s });
399
399
  }
400
400
  cancel(t) {
401
401
  var r;
402
- const s = a(this, le);
403
- return (r = a(this, V)) == null || r.cancel(t), s ? s.then(Z).catch(Z) : Promise.resolve();
402
+ const s = n(this, oe);
403
+ return (r = n(this, q)) == null || r.cancel(t), s ? s.then(Z).catch(Z) : Promise.resolve();
404
404
  }
405
405
  destroy() {
406
406
  super.destroy(), this.cancel({ silent: !0 });
407
407
  }
408
408
  reset() {
409
- this.destroy(), this.setState(a(this, Pe));
409
+ this.destroy(), this.setState(n(this, Pe));
410
410
  }
411
411
  isActive() {
412
- return a(this, R).some(
412
+ return n(this, D).some(
413
413
  (t) => t.options.enabled !== !1
414
414
  );
415
415
  }
@@ -417,61 +417,61 @@ var F = sr(), ve, ns, ys = (ns = class {
417
417
  return this.getObserversCount() > 0 && !this.isActive();
418
418
  }
419
419
  isStale() {
420
- return this.state.isInvalidated || !this.state.dataUpdatedAt || a(this, R).some((t) => t.getCurrentResult().isStale);
420
+ return this.state.isInvalidated || !this.state.dataUpdatedAt || n(this, D).some((t) => t.getCurrentResult().isStale);
421
421
  }
422
422
  isStaleByTime(t = 0) {
423
- return this.state.isInvalidated || !this.state.dataUpdatedAt || !ps(this.state.dataUpdatedAt, t);
423
+ return this.state.isInvalidated || !this.state.dataUpdatedAt || !us(this.state.dataUpdatedAt, t);
424
424
  }
425
425
  onFocus() {
426
426
  var s;
427
- const t = a(this, R).find((r) => r.shouldFetchOnWindowFocus());
428
- t == null || t.refetch({ cancelRefetch: !1 }), (s = a(this, V)) == null || s.continue();
427
+ const t = n(this, D).find((r) => r.shouldFetchOnWindowFocus());
428
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = n(this, q)) == null || s.continue();
429
429
  }
430
430
  onOnline() {
431
431
  var s;
432
- const t = a(this, R).find((r) => r.shouldFetchOnReconnect());
433
- t == null || t.refetch({ cancelRefetch: !1 }), (s = a(this, V)) == null || s.continue();
432
+ const t = n(this, D).find((r) => r.shouldFetchOnReconnect());
433
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = n(this, q)) == null || s.continue();
434
434
  }
435
435
  addObserver(t) {
436
- a(this, R).includes(t) || (a(this, R).push(t), this.clearGcTimeout(), a(this, q).notify({ type: "observerAdded", query: this, observer: t }));
436
+ n(this, D).includes(t) || (n(this, D).push(t), this.clearGcTimeout(), n(this, V).notify({ type: "observerAdded", query: this, observer: t }));
437
437
  }
438
438
  removeObserver(t) {
439
- a(this, R).includes(t) && (h(this, R, a(this, R).filter((s) => s !== t)), a(this, R).length || (a(this, V) && (a(this, ge) ? a(this, V).cancel({ revert: !0 }) : a(this, V).cancelRetry()), this.scheduleGc()), a(this, q).notify({ type: "observerRemoved", query: this, observer: t }));
439
+ n(this, D).includes(t) && (h(this, D, n(this, D).filter((s) => s !== t)), n(this, D).length || (n(this, q) && (n(this, ve) ? n(this, q).cancel({ revert: !0 }) : n(this, q).cancelRetry()), this.scheduleGc()), n(this, V).notify({ type: "observerRemoved", query: this, observer: t }));
440
440
  }
441
441
  getObserversCount() {
442
- return a(this, R).length;
442
+ return n(this, D).length;
443
443
  }
444
444
  invalidate() {
445
- this.state.isInvalidated || b(this, J, se).call(this, { type: "invalidate" });
445
+ this.state.isInvalidated || x(this, z, te).call(this, { type: "invalidate" });
446
446
  }
447
447
  fetch(t, s) {
448
- var y, u, x, g;
448
+ var C, u, b, v;
449
449
  if (this.state.fetchStatus !== "idle") {
450
450
  if (this.state.dataUpdatedAt && (s != null && s.cancelRefetch))
451
451
  this.cancel({ silent: !0 });
452
- else if (a(this, le))
453
- return (y = a(this, V)) == null || y.continueRetry(), a(this, le);
452
+ else if (n(this, oe))
453
+ return (C = n(this, q)) == null || C.continueRetry(), n(this, oe);
454
454
  }
455
- if (t && b(this, Me, ut).call(this, t), !this.options.queryFn) {
456
- const p = a(this, R).find((w) => w.options.queryFn);
457
- p && b(this, Me, ut).call(this, p.options);
455
+ if (t && x(this, ke, ot).call(this, t), !this.options.queryFn) {
456
+ const f = n(this, D).find((w) => w.options.queryFn);
457
+ f && x(this, ke, ot).call(this, f.options);
458
458
  }
459
- const r = new AbortController(), n = {
459
+ const r = new AbortController(), a = {
460
460
  queryKey: this.queryKey,
461
461
  meta: this.meta
462
- }, o = (p) => {
463
- Object.defineProperty(p, "signal", {
462
+ }, o = (f) => {
463
+ Object.defineProperty(f, "signal", {
464
464
  enumerable: !0,
465
- get: () => (h(this, ge, !0), r.signal)
465
+ get: () => (h(this, ve, !0), r.signal)
466
466
  });
467
467
  };
468
- o(n);
469
- const l = () => this.options.queryFn ? (h(this, ge, !1), this.options.persister ? this.options.persister(
468
+ o(a);
469
+ const l = () => this.options.queryFn ? (h(this, ve, !1), this.options.persister ? this.options.persister(
470
470
  this.options.queryFn,
471
- n,
471
+ a,
472
472
  this
473
473
  ) : this.options.queryFn(
474
- n
474
+ a
475
475
  )) : Promise.reject(
476
476
  new Error(`Missing queryFn: '${this.options.queryHash}'`)
477
477
  ), c = {
@@ -484,57 +484,57 @@ var F = sr(), ve, ns, ys = (ns = class {
484
484
  o(c), (u = this.options.behavior) == null || u.onFetch(
485
485
  c,
486
486
  this
487
- ), h(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((x = c.fetchOptions) == null ? void 0 : x.meta)) && b(this, J, se).call(this, { type: "fetch", meta: (g = c.fetchOptions) == null ? void 0 : g.meta });
488
- const f = (p) => {
489
- var w, _, v, C;
490
- wt(p) && p.silent || b(this, J, se).call(this, {
487
+ ), h(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((b = c.fetchOptions) == null ? void 0 : b.meta)) && x(this, z, te).call(this, { type: "fetch", meta: (v = c.fetchOptions) == null ? void 0 : v.meta });
488
+ const m = (f) => {
489
+ var w, E, y, g;
490
+ Ct(f) && f.silent || x(this, z, te).call(this, {
491
491
  type: "error",
492
- error: p
493
- }), wt(p) || ((_ = (w = a(this, q).config).onError) == null || _.call(
492
+ error: f
493
+ }), Ct(f) || ((E = (w = n(this, V).config).onError) == null || E.call(
494
494
  w,
495
- p,
495
+ f,
496
496
  this
497
- ), (C = (v = a(this, q).config).onSettled) == null || C.call(
498
- v,
497
+ ), (g = (y = n(this, V).config).onSettled) == null || g.call(
498
+ y,
499
499
  this.state.data,
500
- p,
500
+ f,
501
501
  this
502
502
  )), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
503
503
  };
504
- return h(this, V, gs({
504
+ return h(this, q, fs({
505
505
  fn: c.fetchFn,
506
506
  abort: r.abort.bind(r),
507
- onSuccess: (p) => {
508
- var w, _, v, C;
509
- if (typeof p > "u") {
510
- f(new Error(`${this.queryHash} data is undefined`));
507
+ onSuccess: (f) => {
508
+ var w, E, y, g;
509
+ if (typeof f > "u") {
510
+ m(new Error(`${this.queryHash} data is undefined`));
511
511
  return;
512
512
  }
513
- this.setData(p), (_ = (w = a(this, q).config).onSuccess) == null || _.call(w, p, this), (C = (v = a(this, q).config).onSettled) == null || C.call(
514
- v,
515
- p,
513
+ this.setData(f), (E = (w = n(this, V).config).onSuccess) == null || E.call(w, f, this), (g = (y = n(this, V).config).onSettled) == null || g.call(
514
+ y,
515
+ f,
516
516
  this.state.error,
517
517
  this
518
518
  ), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
519
519
  },
520
- onError: f,
521
- onFail: (p, w) => {
522
- b(this, J, se).call(this, { type: "failed", failureCount: p, error: w });
520
+ onError: m,
521
+ onFail: (f, w) => {
522
+ x(this, z, te).call(this, { type: "failed", failureCount: f, error: w });
523
523
  },
524
524
  onPause: () => {
525
- b(this, J, se).call(this, { type: "pause" });
525
+ x(this, z, te).call(this, { type: "pause" });
526
526
  },
527
527
  onContinue: () => {
528
- b(this, J, se).call(this, { type: "continue" });
528
+ x(this, z, te).call(this, { type: "continue" });
529
529
  },
530
530
  retry: c.options.retry,
531
531
  retryDelay: c.options.retryDelay,
532
532
  networkMode: c.options.networkMode
533
- })), h(this, le, a(this, V).promise), a(this, le);
533
+ })), h(this, oe, n(this, q).promise), n(this, oe);
534
534
  }
535
- }, Pe = new WeakMap(), Ne = new WeakMap(), q = new WeakMap(), le = new WeakMap(), V = new WeakMap(), R = new WeakMap(), Ze = new WeakMap(), ge = new WeakMap(), Me = new WeakSet(), ut = function(t) {
536
- this.options = { ...a(this, Ze), ...t }, this.updateGcTime(this.options.gcTime);
537
- }, J = new WeakSet(), se = function(t) {
535
+ }, Pe = new WeakMap(), Ne = new WeakMap(), V = new WeakMap(), oe = new WeakMap(), q = new WeakMap(), D = new WeakMap(), qe = new WeakMap(), ve = new WeakMap(), ke = new WeakSet(), ot = function(t) {
536
+ this.options = { ...n(this, qe), ...t }, this.updateGcTime(this.options.gcTime);
537
+ }, z = new WeakSet(), te = function(t) {
538
538
  const s = (r) => {
539
539
  switch (t.type) {
540
540
  case "failed":
@@ -559,7 +559,7 @@ var F = sr(), ve, ns, ys = (ns = class {
559
559
  fetchFailureCount: 0,
560
560
  fetchFailureReason: null,
561
561
  fetchMeta: t.meta ?? null,
562
- fetchStatus: xt(this.options.networkMode) ? "fetching" : "paused",
562
+ fetchStatus: vt(this.options.networkMode) ? "fetching" : "paused",
563
563
  ...!r.dataUpdatedAt && {
564
564
  error: null,
565
565
  status: "pending"
@@ -581,14 +581,14 @@ var F = sr(), ve, ns, ys = (ns = class {
581
581
  }
582
582
  };
583
583
  case "error":
584
- const n = t.error;
585
- return wt(n) && n.revert && a(this, Ne) ? { ...a(this, Ne), fetchStatus: "idle" } : {
584
+ const a = t.error;
585
+ return Ct(a) && a.revert && n(this, Ne) ? { ...n(this, Ne), fetchStatus: "idle" } : {
586
586
  ...r,
587
- error: n,
587
+ error: a,
588
588
  errorUpdateCount: r.errorUpdateCount + 1,
589
589
  errorUpdatedAt: Date.now(),
590
590
  fetchFailureCount: r.fetchFailureCount + 1,
591
- fetchFailureReason: n,
591
+ fetchFailureReason: a,
592
592
  fetchStatus: "idle",
593
593
  status: "error"
594
594
  };
@@ -604,13 +604,13 @@ var F = sr(), ve, ns, ys = (ns = class {
604
604
  };
605
605
  }
606
606
  };
607
- this.state = s(this.state), F.batch(() => {
608
- a(this, R).forEach((r) => {
607
+ this.state = s(this.state), R.batch(() => {
608
+ n(this, D).forEach((r) => {
609
609
  r.onQueryUpdate();
610
- }), a(this, q).notify({ query: this, type: "updated", action: t });
610
+ }), n(this, V).notify({ query: this, type: "updated", action: t });
611
611
  });
612
- }, as);
613
- function ir(e) {
612
+ }, ss);
613
+ function rr(e) {
614
614
  const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = typeof t < "u", r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
615
615
  return {
616
616
  data: t,
@@ -627,183 +627,183 @@ function ir(e) {
627
627
  fetchStatus: "idle"
628
628
  };
629
629
  }
630
- var X, os, nr = (os = class extends Ge {
630
+ var J, rs, ir = (rs = class extends Ke {
631
631
  constructor(t = {}) {
632
632
  super();
633
- m(this, X, void 0);
634
- this.config = t, h(this, X, /* @__PURE__ */ new Map());
633
+ p(this, J, void 0);
634
+ this.config = t, h(this, J, /* @__PURE__ */ new Map());
635
635
  }
636
636
  build(t, s, r) {
637
- const n = s.queryKey, o = s.queryHash ?? Qt(n, s);
637
+ const a = s.queryKey, o = s.queryHash ?? Ft(a, s);
638
638
  let l = this.get(o);
639
- return l || (l = new rr({
639
+ return l || (l = new sr({
640
640
  cache: this,
641
- queryKey: n,
641
+ queryKey: a,
642
642
  queryHash: o,
643
643
  options: t.defaultQueryOptions(s),
644
644
  state: r,
645
- defaultOptions: t.getQueryDefaults(n)
645
+ defaultOptions: t.getQueryDefaults(a)
646
646
  }), this.add(l)), l;
647
647
  }
648
648
  add(t) {
649
- a(this, X).has(t.queryHash) || (a(this, X).set(t.queryHash, t), this.notify({
649
+ n(this, J).has(t.queryHash) || (n(this, J).set(t.queryHash, t), this.notify({
650
650
  type: "added",
651
651
  query: t
652
652
  }));
653
653
  }
654
654
  remove(t) {
655
- const s = a(this, X).get(t.queryHash);
656
- s && (t.destroy(), s === t && a(this, X).delete(t.queryHash), this.notify({ type: "removed", query: t }));
655
+ const s = n(this, J).get(t.queryHash);
656
+ s && (t.destroy(), s === t && n(this, J).delete(t.queryHash), this.notify({ type: "removed", query: t }));
657
657
  }
658
658
  clear() {
659
- F.batch(() => {
659
+ R.batch(() => {
660
660
  this.getAll().forEach((t) => {
661
661
  this.remove(t);
662
662
  });
663
663
  });
664
664
  }
665
665
  get(t) {
666
- return a(this, X).get(t);
666
+ return n(this, J).get(t);
667
667
  }
668
668
  getAll() {
669
- return [...a(this, X).values()];
669
+ return [...n(this, J).values()];
670
670
  }
671
671
  find(t) {
672
672
  const s = { exact: !0, ...t };
673
673
  return this.getAll().find(
674
- (r) => Vt(s, r)
674
+ (r) => Ht(s, r)
675
675
  );
676
676
  }
677
677
  findAll(t = {}) {
678
678
  const s = this.getAll();
679
- return Object.keys(t).length > 0 ? s.filter((r) => Vt(t, r)) : s;
679
+ return Object.keys(t).length > 0 ? s.filter((r) => Ht(t, r)) : s;
680
680
  }
681
681
  notify(t) {
682
- F.batch(() => {
682
+ R.batch(() => {
683
683
  this.listeners.forEach((s) => {
684
684
  s(t);
685
685
  });
686
686
  });
687
687
  }
688
688
  onFocus() {
689
- F.batch(() => {
689
+ R.batch(() => {
690
690
  this.getAll().forEach((t) => {
691
691
  t.onFocus();
692
692
  });
693
693
  });
694
694
  }
695
695
  onOnline() {
696
- F.batch(() => {
696
+ R.batch(() => {
697
697
  this.getAll().forEach((t) => {
698
698
  t.onOnline();
699
699
  });
700
700
  });
701
701
  }
702
- }, X = new WeakMap(), os), I, ze, K, Oe, B, ne, ls, ar = (ls = class extends ys {
702
+ }, J = new WeakMap(), rs), X, We, K, Me, I, ie, is, nr = (is = class extends ps {
703
703
  constructor(t) {
704
704
  super();
705
- m(this, B);
706
- m(this, I, void 0);
707
- m(this, ze, void 0);
708
- m(this, K, void 0);
709
- m(this, Oe, void 0);
710
- this.mutationId = t.mutationId, h(this, ze, t.defaultOptions), h(this, K, t.mutationCache), h(this, I, []), this.state = t.state || Cs(), this.setOptions(t.options), this.scheduleGc();
705
+ p(this, I);
706
+ p(this, X, void 0);
707
+ p(this, We, void 0);
708
+ p(this, K, void 0);
709
+ p(this, Me, void 0);
710
+ this.mutationId = t.mutationId, h(this, We, t.defaultOptions), h(this, K, t.mutationCache), h(this, X, []), this.state = t.state || ms(), this.setOptions(t.options), this.scheduleGc();
711
711
  }
712
712
  setOptions(t) {
713
- this.options = { ...a(this, ze), ...t }, this.updateGcTime(this.options.gcTime);
713
+ this.options = { ...n(this, We), ...t }, this.updateGcTime(this.options.gcTime);
714
714
  }
715
715
  get meta() {
716
716
  return this.options.meta;
717
717
  }
718
718
  addObserver(t) {
719
- a(this, I).includes(t) || (a(this, I).push(t), this.clearGcTimeout(), a(this, K).notify({
719
+ n(this, X).includes(t) || (n(this, X).push(t), this.clearGcTimeout(), n(this, K).notify({
720
720
  type: "observerAdded",
721
721
  mutation: this,
722
722
  observer: t
723
723
  }));
724
724
  }
725
725
  removeObserver(t) {
726
- h(this, I, a(this, I).filter((s) => s !== t)), this.scheduleGc(), a(this, K).notify({
726
+ h(this, X, n(this, X).filter((s) => s !== t)), this.scheduleGc(), n(this, K).notify({
727
727
  type: "observerRemoved",
728
728
  mutation: this,
729
729
  observer: t
730
730
  });
731
731
  }
732
732
  optionalRemove() {
733
- a(this, I).length || (this.state.status === "pending" ? this.scheduleGc() : a(this, K).remove(this));
733
+ n(this, X).length || (this.state.status === "pending" ? this.scheduleGc() : n(this, K).remove(this));
734
734
  }
735
735
  continue() {
736
736
  var t;
737
- return ((t = a(this, Oe)) == null ? void 0 : t.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
737
+ return ((t = n(this, Me)) == null ? void 0 : t.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
738
738
  this.execute(this.state.variables);
739
739
  }
740
740
  async execute(t) {
741
- var n, o, l, c, f, y, u, x, g, p, w, _, v, C, S, E, k, T, $, D;
742
- const s = () => (h(this, Oe, gs({
741
+ var a, o, l, c, m, C, u, b, v, f, w, E, y, g, S, _, k, L, $, T;
742
+ const s = () => (h(this, Me, fs({
743
743
  fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
744
- onFail: (M, te) => {
745
- b(this, B, ne).call(this, { type: "failed", failureCount: M, error: te });
744
+ onFail: (M, ee) => {
745
+ x(this, I, ie).call(this, { type: "failed", failureCount: M, error: ee });
746
746
  },
747
747
  onPause: () => {
748
- b(this, B, ne).call(this, { type: "pause" });
748
+ x(this, I, ie).call(this, { type: "pause" });
749
749
  },
750
750
  onContinue: () => {
751
- b(this, B, ne).call(this, { type: "continue" });
751
+ x(this, I, ie).call(this, { type: "continue" });
752
752
  },
753
753
  retry: this.options.retry ?? 0,
754
754
  retryDelay: this.options.retryDelay,
755
755
  networkMode: this.options.networkMode
756
- })), a(this, Oe).promise), r = this.state.status === "pending";
756
+ })), n(this, Me).promise), r = this.state.status === "pending";
757
757
  try {
758
758
  if (!r) {
759
- b(this, B, ne).call(this, { type: "pending", variables: t }), await ((o = (n = a(this, K).config).onMutate) == null ? void 0 : o.call(
760
- n,
759
+ x(this, I, ie).call(this, { type: "pending", variables: t }), await ((o = (a = n(this, K).config).onMutate) == null ? void 0 : o.call(
760
+ a,
761
761
  t,
762
762
  this
763
763
  ));
764
- const te = await ((c = (l = this.options).onMutate) == null ? void 0 : c.call(l, t));
765
- te !== this.state.context && b(this, B, ne).call(this, {
764
+ const ee = await ((c = (l = this.options).onMutate) == null ? void 0 : c.call(l, t));
765
+ ee !== this.state.context && x(this, I, ie).call(this, {
766
766
  type: "pending",
767
- context: te,
767
+ context: ee,
768
768
  variables: t
769
769
  });
770
770
  }
771
771
  const M = await s();
772
- return await ((y = (f = a(this, K).config).onSuccess) == null ? void 0 : y.call(
773
- f,
772
+ return await ((C = (m = n(this, K).config).onSuccess) == null ? void 0 : C.call(
773
+ m,
774
774
  M,
775
775
  t,
776
776
  this.state.context,
777
777
  this
778
- )), await ((x = (u = this.options).onSuccess) == null ? void 0 : x.call(u, M, t, this.state.context)), await ((p = (g = a(this, K).config).onSettled) == null ? void 0 : p.call(
779
- g,
778
+ )), await ((b = (u = this.options).onSuccess) == null ? void 0 : b.call(u, M, t, this.state.context)), await ((f = (v = n(this, K).config).onSettled) == null ? void 0 : f.call(
779
+ v,
780
780
  M,
781
781
  null,
782
782
  this.state.variables,
783
783
  this.state.context,
784
784
  this
785
- )), await ((_ = (w = this.options).onSettled) == null ? void 0 : _.call(w, M, null, t, this.state.context)), b(this, B, ne).call(this, { type: "success", data: M }), M;
785
+ )), await ((E = (w = this.options).onSettled) == null ? void 0 : E.call(w, M, null, t, this.state.context)), x(this, I, ie).call(this, { type: "success", data: M }), M;
786
786
  } catch (M) {
787
787
  try {
788
- throw await ((C = (v = a(this, K).config).onError) == null ? void 0 : C.call(
789
- v,
788
+ throw await ((g = (y = n(this, K).config).onError) == null ? void 0 : g.call(
789
+ y,
790
790
  M,
791
791
  t,
792
792
  this.state.context,
793
793
  this
794
- )), await ((E = (S = this.options).onError) == null ? void 0 : E.call(
794
+ )), await ((_ = (S = this.options).onError) == null ? void 0 : _.call(
795
795
  S,
796
796
  M,
797
797
  t,
798
798
  this.state.context
799
- )), await ((T = (k = a(this, K).config).onSettled) == null ? void 0 : T.call(
799
+ )), await ((L = (k = n(this, K).config).onSettled) == null ? void 0 : L.call(
800
800
  k,
801
801
  void 0,
802
802
  M,
803
803
  this.state.variables,
804
804
  this.state.context,
805
805
  this
806
- )), await ((D = ($ = this.options).onSettled) == null ? void 0 : D.call(
806
+ )), await ((T = ($ = this.options).onSettled) == null ? void 0 : T.call(
807
807
  $,
808
808
  void 0,
809
809
  M,
@@ -811,11 +811,11 @@ var X, os, nr = (os = class extends Ge {
811
811
  this.state.context
812
812
  )), M;
813
813
  } finally {
814
- b(this, B, ne).call(this, { type: "error", error: M });
814
+ x(this, I, ie).call(this, { type: "error", error: M });
815
815
  }
816
816
  }
817
817
  }
818
- }, I = new WeakMap(), ze = new WeakMap(), K = new WeakMap(), Oe = new WeakMap(), B = new WeakSet(), ne = function(t) {
818
+ }, X = new WeakMap(), We = new WeakMap(), K = new WeakMap(), Me = new WeakMap(), I = new WeakSet(), ie = function(t) {
819
819
  const s = (r) => {
820
820
  switch (t.type) {
821
821
  case "failed":
@@ -842,7 +842,7 @@ var X, os, nr = (os = class extends Ge {
842
842
  failureCount: 0,
843
843
  failureReason: null,
844
844
  error: null,
845
- isPaused: !xt(this.options.networkMode),
845
+ isPaused: !vt(this.options.networkMode),
846
846
  status: "pending",
847
847
  variables: t.variables,
848
848
  submittedAt: Date.now()
@@ -869,17 +869,17 @@ var X, os, nr = (os = class extends Ge {
869
869
  };
870
870
  }
871
871
  };
872
- this.state = s(this.state), F.batch(() => {
873
- a(this, I).forEach((r) => {
872
+ this.state = s(this.state), R.batch(() => {
873
+ n(this, X).forEach((r) => {
874
874
  r.onMutationUpdate(t);
875
- }), a(this, K).notify({
875
+ }), n(this, K).notify({
876
876
  mutation: this,
877
877
  type: "updated",
878
878
  action: t
879
879
  });
880
880
  });
881
- }, ls);
882
- function Cs() {
881
+ }, is);
882
+ function ms() {
883
883
  return {
884
884
  context: void 0,
885
885
  data: void 0,
@@ -892,61 +892,61 @@ function Cs() {
892
892
  submittedAt: 0
893
893
  };
894
894
  }
895
- var W, Ye, ye, cs, or = (cs = class extends Ge {
895
+ var W, Ze, ye, ns, ar = (ns = class extends Ke {
896
896
  constructor(t = {}) {
897
897
  super();
898
- m(this, W, void 0);
899
- m(this, Ye, void 0);
900
- m(this, ye, void 0);
901
- this.config = t, h(this, W, []), h(this, Ye, 0);
898
+ p(this, W, void 0);
899
+ p(this, Ze, void 0);
900
+ p(this, ye, void 0);
901
+ this.config = t, h(this, W, []), h(this, Ze, 0);
902
902
  }
903
903
  build(t, s, r) {
904
- const n = new ar({
904
+ const a = new nr({
905
905
  mutationCache: this,
906
- mutationId: ++lt(this, Ye)._,
906
+ mutationId: ++at(this, Ze)._,
907
907
  options: t.defaultMutationOptions(s),
908
908
  state: r
909
909
  });
910
- return this.add(n), n;
910
+ return this.add(a), a;
911
911
  }
912
912
  add(t) {
913
- a(this, W).push(t), this.notify({ type: "added", mutation: t });
913
+ n(this, W).push(t), this.notify({ type: "added", mutation: t });
914
914
  }
915
915
  remove(t) {
916
- h(this, W, a(this, W).filter((s) => s !== t)), this.notify({ type: "removed", mutation: t });
916
+ h(this, W, n(this, W).filter((s) => s !== t)), this.notify({ type: "removed", mutation: t });
917
917
  }
918
918
  clear() {
919
- F.batch(() => {
920
- a(this, W).forEach((t) => {
919
+ R.batch(() => {
920
+ n(this, W).forEach((t) => {
921
921
  this.remove(t);
922
922
  });
923
923
  });
924
924
  }
925
925
  getAll() {
926
- return a(this, W);
926
+ return n(this, W);
927
927
  }
928
928
  find(t) {
929
929
  const s = { exact: !0, ...t };
930
- return a(this, W).find(
931
- (r) => Wt(s, r)
930
+ return n(this, W).find(
931
+ (r) => $t(s, r)
932
932
  );
933
933
  }
934
934
  findAll(t = {}) {
935
- return a(this, W).filter(
936
- (s) => Wt(t, s)
935
+ return n(this, W).filter(
936
+ (s) => $t(t, s)
937
937
  );
938
938
  }
939
939
  notify(t) {
940
- F.batch(() => {
940
+ R.batch(() => {
941
941
  this.listeners.forEach((s) => {
942
942
  s(t);
943
943
  });
944
944
  });
945
945
  }
946
946
  resumePausedMutations() {
947
- return h(this, ye, (a(this, ye) ?? Promise.resolve()).then(() => {
948
- const t = a(this, W).filter((s) => s.state.isPaused);
949
- return F.batch(
947
+ return h(this, ye, (n(this, ye) ?? Promise.resolve()).then(() => {
948
+ const t = n(this, W).filter((s) => s.state.isPaused);
949
+ return R.batch(
950
950
  () => t.reduce(
951
951
  (s, r) => s.then(() => r.continue().catch(Z)),
952
952
  Promise.resolve()
@@ -954,69 +954,69 @@ var W, Ye, ye, cs, or = (cs = class extends Ge {
954
954
  );
955
955
  }).then(() => {
956
956
  h(this, ye, void 0);
957
- })), a(this, ye);
957
+ })), n(this, ye);
958
958
  }
959
- }, W = new WeakMap(), Ye = new WeakMap(), ye = new WeakMap(), cs);
960
- function lr(e) {
959
+ }, W = new WeakMap(), Ze = new WeakMap(), ye = new WeakMap(), ns);
960
+ function or(e) {
961
961
  return {
962
962
  onFetch: (t, s) => {
963
963
  const r = async () => {
964
- var w, _, v, C, S;
965
- const n = t.options, o = (v = (_ = (w = t.fetchOptions) == null ? void 0 : w.meta) == null ? void 0 : _.fetchMore) == null ? void 0 : v.direction, l = ((C = t.state.data) == null ? void 0 : C.pages) || [], c = ((S = t.state.data) == null ? void 0 : S.pageParams) || [], f = { pages: [], pageParams: [] };
966
- let y = !1;
967
- const u = (E) => {
968
- Object.defineProperty(E, "signal", {
964
+ var w, E, y, g, S;
965
+ const a = t.options, o = (y = (E = (w = t.fetchOptions) == null ? void 0 : w.meta) == null ? void 0 : E.fetchMore) == null ? void 0 : y.direction, l = ((g = t.state.data) == null ? void 0 : g.pages) || [], c = ((S = t.state.data) == null ? void 0 : S.pageParams) || [], m = { pages: [], pageParams: [] };
966
+ let C = !1;
967
+ const u = (_) => {
968
+ Object.defineProperty(_, "signal", {
969
969
  enumerable: !0,
970
- get: () => (t.signal.aborted ? y = !0 : t.signal.addEventListener("abort", () => {
971
- y = !0;
970
+ get: () => (t.signal.aborted ? C = !0 : t.signal.addEventListener("abort", () => {
971
+ C = !0;
972
972
  }), t.signal)
973
973
  });
974
- }, x = t.options.queryFn || (() => Promise.reject(
974
+ }, b = t.options.queryFn || (() => Promise.reject(
975
975
  new Error(`Missing queryFn: '${t.options.queryHash}'`)
976
- )), g = async (E, k, T) => {
977
- if (y)
976
+ )), v = async (_, k, L) => {
977
+ if (C)
978
978
  return Promise.reject();
979
- if (k == null && E.pages.length)
980
- return Promise.resolve(E);
979
+ if (k == null && _.pages.length)
980
+ return Promise.resolve(_);
981
981
  const $ = {
982
982
  queryKey: t.queryKey,
983
983
  pageParam: k,
984
- direction: T ? "backward" : "forward",
984
+ direction: L ? "backward" : "forward",
985
985
  meta: t.options.meta
986
986
  };
987
987
  u($);
988
- const D = await x(
988
+ const T = await b(
989
989
  $
990
- ), { maxPages: M } = t.options, te = T ? Is : Xs;
990
+ ), { maxPages: M } = t.options, ee = L ? Xs : Js;
991
991
  return {
992
- pages: te(E.pages, D, M),
993
- pageParams: te(E.pageParams, k, M)
992
+ pages: ee(_.pages, T, M),
993
+ pageParams: ee(_.pageParams, k, M)
994
994
  };
995
995
  };
996
- let p;
996
+ let f;
997
997
  if (o && l.length) {
998
- const E = o === "backward", k = E ? cr : Yt, T = {
998
+ const _ = o === "backward", k = _ ? lr : Vt, L = {
999
999
  pages: l,
1000
1000
  pageParams: c
1001
- }, $ = k(n, T);
1002
- p = await g(T, $, E);
1001
+ }, $ = k(a, L);
1002
+ f = await v(L, $, _);
1003
1003
  } else {
1004
- p = await g(
1005
- f,
1006
- c[0] ?? n.initialPageParam
1004
+ f = await v(
1005
+ m,
1006
+ c[0] ?? a.initialPageParam
1007
1007
  );
1008
- const E = e ?? l.length;
1009
- for (let k = 1; k < E; k++) {
1010
- const T = Yt(n, p);
1011
- p = await g(p, T);
1008
+ const _ = e ?? l.length;
1009
+ for (let k = 1; k < _; k++) {
1010
+ const L = Vt(a, f);
1011
+ f = await v(f, L);
1012
1012
  }
1013
1013
  }
1014
- return p;
1014
+ return f;
1015
1015
  };
1016
1016
  t.options.persister ? t.fetchFn = () => {
1017
- var n, o;
1018
- return (o = (n = t.options).persister) == null ? void 0 : o.call(
1019
- n,
1017
+ var a, o;
1018
+ return (o = (a = t.options).persister) == null ? void 0 : o.call(
1019
+ a,
1020
1020
  r,
1021
1021
  {
1022
1022
  queryKey: t.queryKey,
@@ -1029,7 +1029,7 @@ function lr(e) {
1029
1029
  }
1030
1030
  };
1031
1031
  }
1032
- function Yt(e, { pages: t, pageParams: s }) {
1032
+ function Vt(e, { pages: t, pageParams: s }) {
1033
1033
  const r = t.length - 1;
1034
1034
  return e.getNextPageParam(
1035
1035
  t[r],
@@ -1038,7 +1038,7 @@ function Yt(e, { pages: t, pageParams: s }) {
1038
1038
  s
1039
1039
  );
1040
1040
  }
1041
- function cr(e, { pages: t, pageParams: s }) {
1041
+ function lr(e, { pages: t, pageParams: s }) {
1042
1042
  var r;
1043
1043
  return (r = e.getPreviousPageParam) == null ? void 0 : r.call(
1044
1044
  e,
@@ -1048,38 +1048,38 @@ function cr(e, { pages: t, pageParams: s }) {
1048
1048
  s
1049
1049
  );
1050
1050
  }
1051
- var L, ce, ue, Le, Fe, de, Re, De, us, xs = (us = class {
1051
+ var F, le, ce, Oe, Le, ue, Fe, Re, as, vs = (as = class {
1052
1052
  constructor(e = {}) {
1053
- m(this, L, void 0);
1054
- m(this, ce, void 0);
1055
- m(this, ue, void 0);
1056
- m(this, Le, void 0);
1057
- m(this, Fe, void 0);
1058
- m(this, de, void 0);
1059
- m(this, Re, void 0);
1060
- m(this, De, void 0);
1061
- h(this, L, e.queryCache || new nr()), h(this, ce, e.mutationCache || new or()), h(this, ue, e.defaultOptions || {}), h(this, Le, /* @__PURE__ */ new Map()), h(this, Fe, /* @__PURE__ */ new Map()), h(this, de, 0);
1053
+ p(this, F, void 0);
1054
+ p(this, le, void 0);
1055
+ p(this, ce, void 0);
1056
+ p(this, Oe, void 0);
1057
+ p(this, Le, void 0);
1058
+ p(this, ue, void 0);
1059
+ p(this, Fe, void 0);
1060
+ p(this, Re, void 0);
1061
+ h(this, F, e.queryCache || new ir()), h(this, le, e.mutationCache || new ar()), h(this, ce, e.defaultOptions || {}), h(this, Oe, /* @__PURE__ */ new Map()), h(this, Le, /* @__PURE__ */ new Map()), h(this, ue, 0);
1062
1062
  }
1063
1063
  mount() {
1064
- lt(this, de)._++, a(this, de) === 1 && (h(this, Re, ft.subscribe(() => {
1065
- ft.isFocused() && (this.resumePausedMutations(), a(this, L).onFocus());
1066
- })), h(this, De, pt.subscribe(() => {
1067
- pt.isOnline() && (this.resumePausedMutations(), a(this, L).onOnline());
1064
+ at(this, ue)._++, n(this, ue) === 1 && (h(this, Fe, ut.subscribe(() => {
1065
+ ut.isFocused() && (this.resumePausedMutations(), n(this, F).onFocus());
1066
+ })), h(this, Re, dt.subscribe(() => {
1067
+ dt.isOnline() && (this.resumePausedMutations(), n(this, F).onOnline());
1068
1068
  })));
1069
1069
  }
1070
1070
  unmount() {
1071
1071
  var e, t;
1072
- lt(this, de)._--, a(this, de) === 0 && ((e = a(this, Re)) == null || e.call(this), h(this, Re, void 0), (t = a(this, De)) == null || t.call(this), h(this, De, void 0));
1072
+ at(this, ue)._--, n(this, ue) === 0 && ((e = n(this, Fe)) == null || e.call(this), h(this, Fe, void 0), (t = n(this, Re)) == null || t.call(this), h(this, Re, void 0));
1073
1073
  }
1074
1074
  isFetching(e) {
1075
- return a(this, L).findAll({ ...e, fetchStatus: "fetching" }).length;
1075
+ return n(this, F).findAll({ ...e, fetchStatus: "fetching" }).length;
1076
1076
  }
1077
1077
  isMutating(e) {
1078
- return a(this, ce).findAll({ ...e, status: "pending" }).length;
1078
+ return n(this, le).findAll({ ...e, status: "pending" }).length;
1079
1079
  }
1080
1080
  getQueryData(e) {
1081
1081
  var t;
1082
- return (t = a(this, L).find({ queryKey: e })) == null ? void 0 : t.state.data;
1082
+ return (t = n(this, F).find({ queryKey: e })) == null ? void 0 : t.state.data;
1083
1083
  }
1084
1084
  ensureQueryData(e) {
1085
1085
  const t = this.getQueryData(e.queryKey);
@@ -1092,14 +1092,14 @@ var L, ce, ue, Le, Fe, de, Re, De, us, xs = (us = class {
1092
1092
  });
1093
1093
  }
1094
1094
  setQueryData(e, t, s) {
1095
- const r = a(this, L).find({ queryKey: e }), n = r == null ? void 0 : r.state.data, o = Ys(t, n);
1095
+ const r = n(this, F).find({ queryKey: e }), a = r == null ? void 0 : r.state.data, o = Ys(t, a);
1096
1096
  if (typeof o > "u")
1097
1097
  return;
1098
1098
  const l = this.defaultQueryOptions({ queryKey: e });
1099
- return a(this, L).build(this, l).setData(o, { ...s, manual: !0 });
1099
+ return n(this, F).build(this, l).setData(o, { ...s, manual: !0 });
1100
1100
  }
1101
1101
  setQueriesData(e, t, s) {
1102
- return F.batch(
1102
+ return R.batch(
1103
1103
  () => this.getQueryCache().findAll(e).map(({ queryKey: r }) => [
1104
1104
  r,
1105
1105
  this.setQueryData(r, t, s)
@@ -1108,34 +1108,34 @@ var L, ce, ue, Le, Fe, de, Re, De, us, xs = (us = class {
1108
1108
  }
1109
1109
  getQueryState(e) {
1110
1110
  var t;
1111
- return (t = a(this, L).find({ queryKey: e })) == null ? void 0 : t.state;
1111
+ return (t = n(this, F).find({ queryKey: e })) == null ? void 0 : t.state;
1112
1112
  }
1113
1113
  removeQueries(e) {
1114
- const t = a(this, L);
1115
- F.batch(() => {
1114
+ const t = n(this, F);
1115
+ R.batch(() => {
1116
1116
  t.findAll(e).forEach((s) => {
1117
1117
  t.remove(s);
1118
1118
  });
1119
1119
  });
1120
1120
  }
1121
1121
  resetQueries(e, t) {
1122
- const s = a(this, L), r = {
1122
+ const s = n(this, F), r = {
1123
1123
  type: "active",
1124
1124
  ...e
1125
1125
  };
1126
- return F.batch(() => (s.findAll(e).forEach((n) => {
1127
- n.reset();
1126
+ return R.batch(() => (s.findAll(e).forEach((a) => {
1127
+ a.reset();
1128
1128
  }), this.refetchQueries(r, t)));
1129
1129
  }
1130
1130
  cancelQueries(e = {}, t = {}) {
1131
- const s = { revert: !0, ...t }, r = F.batch(
1132
- () => a(this, L).findAll(e).map((n) => n.cancel(s))
1131
+ const s = { revert: !0, ...t }, r = R.batch(
1132
+ () => n(this, F).findAll(e).map((a) => a.cancel(s))
1133
1133
  );
1134
1134
  return Promise.all(r).then(Z).catch(Z);
1135
1135
  }
1136
1136
  invalidateQueries(e = {}, t = {}) {
1137
- return F.batch(() => {
1138
- if (a(this, L).findAll(e).forEach((r) => {
1137
+ return R.batch(() => {
1138
+ if (n(this, F).findAll(e).forEach((r) => {
1139
1139
  r.invalidate();
1140
1140
  }), e.refetchType === "none")
1141
1141
  return Promise.resolve();
@@ -1150,10 +1150,10 @@ var L, ce, ue, Le, Fe, de, Re, De, us, xs = (us = class {
1150
1150
  const s = {
1151
1151
  ...t,
1152
1152
  cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
1153
- }, r = F.batch(
1154
- () => a(this, L).findAll(e).filter((n) => !n.isDisabled()).map((n) => {
1155
- let o = n.fetch(void 0, s);
1156
- return s.throwOnError || (o = o.catch(Z)), n.state.fetchStatus === "paused" ? Promise.resolve() : o;
1153
+ }, r = R.batch(
1154
+ () => n(this, F).findAll(e).filter((a) => !a.isDisabled()).map((a) => {
1155
+ let o = a.fetch(void 0, s);
1156
+ return s.throwOnError || (o = o.catch(Z)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
1157
1157
  })
1158
1158
  );
1159
1159
  return Promise.all(r).then(Z);
@@ -1161,165 +1161,165 @@ var L, ce, ue, Le, Fe, de, Re, De, us, xs = (us = class {
1161
1161
  fetchQuery(e) {
1162
1162
  const t = this.defaultQueryOptions(e);
1163
1163
  typeof t.retry > "u" && (t.retry = !1);
1164
- const s = a(this, L).build(this, t);
1164
+ const s = n(this, F).build(this, t);
1165
1165
  return s.isStaleByTime(t.staleTime) ? s.fetch(t) : Promise.resolve(s.state.data);
1166
1166
  }
1167
1167
  prefetchQuery(e) {
1168
1168
  return this.fetchQuery(e).then(Z).catch(Z);
1169
1169
  }
1170
1170
  fetchInfiniteQuery(e) {
1171
- return e.behavior = lr(e.pages), this.fetchQuery(e);
1171
+ return e.behavior = or(e.pages), this.fetchQuery(e);
1172
1172
  }
1173
1173
  prefetchInfiniteQuery(e) {
1174
1174
  return this.fetchInfiniteQuery(e).then(Z).catch(Z);
1175
1175
  }
1176
1176
  resumePausedMutations() {
1177
- return a(this, ce).resumePausedMutations();
1177
+ return n(this, le).resumePausedMutations();
1178
1178
  }
1179
1179
  getQueryCache() {
1180
- return a(this, L);
1180
+ return n(this, F);
1181
1181
  }
1182
1182
  getMutationCache() {
1183
- return a(this, ce);
1183
+ return n(this, le);
1184
1184
  }
1185
1185
  getDefaultOptions() {
1186
- return a(this, ue);
1186
+ return n(this, ce);
1187
1187
  }
1188
1188
  setDefaultOptions(e) {
1189
- h(this, ue, e);
1189
+ h(this, ce, e);
1190
1190
  }
1191
1191
  setQueryDefaults(e, t) {
1192
- a(this, Le).set(je(e), {
1192
+ n(this, Oe).set(we(e), {
1193
1193
  queryKey: e,
1194
1194
  defaultOptions: t
1195
1195
  });
1196
1196
  }
1197
1197
  getQueryDefaults(e) {
1198
- const t = [...a(this, Le).values()];
1198
+ const t = [...n(this, Oe).values()];
1199
1199
  let s = {};
1200
1200
  return t.forEach((r) => {
1201
- We(e, r.queryKey) && (s = { ...s, ...r.defaultOptions });
1201
+ Ve(e, r.queryKey) && (s = { ...s, ...r.defaultOptions });
1202
1202
  }), s;
1203
1203
  }
1204
1204
  setMutationDefaults(e, t) {
1205
- a(this, Fe).set(je(e), {
1205
+ n(this, Le).set(we(e), {
1206
1206
  mutationKey: e,
1207
1207
  defaultOptions: t
1208
1208
  });
1209
1209
  }
1210
1210
  getMutationDefaults(e) {
1211
- const t = [...a(this, Fe).values()];
1211
+ const t = [...n(this, Le).values()];
1212
1212
  let s = {};
1213
1213
  return t.forEach((r) => {
1214
- We(e, r.mutationKey) && (s = { ...s, ...r.defaultOptions });
1214
+ Ve(e, r.mutationKey) && (s = { ...s, ...r.defaultOptions });
1215
1215
  }), s;
1216
1216
  }
1217
1217
  defaultQueryOptions(e) {
1218
1218
  if (e != null && e._defaulted)
1219
1219
  return e;
1220
1220
  const t = {
1221
- ...a(this, ue).queries,
1221
+ ...n(this, ce).queries,
1222
1222
  ...(e == null ? void 0 : e.queryKey) && this.getQueryDefaults(e.queryKey),
1223
1223
  ...e,
1224
1224
  _defaulted: !0
1225
1225
  };
1226
- return t.queryHash || (t.queryHash = Qt(
1226
+ return t.queryHash || (t.queryHash = Ft(
1227
1227
  t.queryKey,
1228
1228
  t
1229
1229
  )), typeof t.refetchOnReconnect > "u" && (t.refetchOnReconnect = t.networkMode !== "always"), typeof t.throwOnError > "u" && (t.throwOnError = !!t.suspense), typeof t.networkMode > "u" && t.persister && (t.networkMode = "offlineFirst"), t;
1230
1230
  }
1231
1231
  defaultMutationOptions(e) {
1232
1232
  return e != null && e._defaulted ? e : {
1233
- ...a(this, ue).mutations,
1233
+ ...n(this, ce).mutations,
1234
1234
  ...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
1235
1235
  ...e,
1236
1236
  _defaulted: !0
1237
1237
  };
1238
1238
  }
1239
1239
  clear() {
1240
- a(this, L).clear(), a(this, ce).clear();
1240
+ n(this, F).clear(), n(this, le).clear();
1241
1241
  }
1242
- }, L = new WeakMap(), ce = new WeakMap(), ue = new WeakMap(), Le = new WeakMap(), Fe = new WeakMap(), de = new WeakMap(), Re = new WeakMap(), De = new WeakMap(), us), Q, N, Je, U, Ce, Te, ee, Xe, Ue, Qe, xe, be, he, He, we, Ve, Ie, At, Be, St, et, kt, tt, Pt, st, Nt, rt, Mt, it, Ot, Ct, bs, ds, ur = (ds = class extends Ge {
1242
+ }, F = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), Oe = new WeakMap(), Le = new WeakMap(), ue = new WeakMap(), Fe = new WeakMap(), Re = new WeakMap(), as), Q, N, Ye, U, ge, De, B, ze, Te, Ue, Ce, xe, de, Qe, be, Ge, Je, jt, Xe, _t, Ie, Et, Be, St, et, At, tt, Pt, st, Nt, mt, ys, os, cr = (os = class extends Ke {
1243
1243
  constructor(t, s) {
1244
1244
  super();
1245
- m(this, we);
1246
- m(this, Ie);
1247
- m(this, Be);
1248
- m(this, et);
1249
- m(this, tt);
1250
- m(this, st);
1251
- m(this, rt);
1252
- m(this, it);
1253
- m(this, Ct);
1254
- m(this, Q, void 0);
1255
- m(this, N, void 0);
1256
- m(this, Je, void 0);
1257
- m(this, U, void 0);
1258
- m(this, Ce, void 0);
1259
- m(this, Te, void 0);
1260
- m(this, ee, void 0);
1261
- m(this, Xe, void 0);
1262
- m(this, Ue, void 0);
1245
+ p(this, be);
1246
+ p(this, Je);
1247
+ p(this, Xe);
1248
+ p(this, Ie);
1249
+ p(this, Be);
1250
+ p(this, et);
1251
+ p(this, tt);
1252
+ p(this, st);
1253
+ p(this, mt);
1254
+ p(this, Q, void 0);
1255
+ p(this, N, void 0);
1256
+ p(this, Ye, void 0);
1257
+ p(this, U, void 0);
1258
+ p(this, ge, void 0);
1259
+ p(this, De, void 0);
1260
+ p(this, B, void 0);
1261
+ p(this, ze, void 0);
1262
+ p(this, Te, void 0);
1263
1263
  // This property keeps track of the last query with defined data.
1264
1264
  // It will be used to pass the previous data and query to the placeholder function between renders.
1265
- m(this, Qe, void 0);
1266
- m(this, xe, void 0);
1267
- m(this, be, void 0);
1268
- m(this, he, void 0);
1269
- m(this, He, /* @__PURE__ */ new Set());
1270
- this.options = s, h(this, Q, t), h(this, ee, null), this.bindMethods(), this.setOptions(s);
1265
+ p(this, Ue, void 0);
1266
+ p(this, Ce, void 0);
1267
+ p(this, xe, void 0);
1268
+ p(this, de, void 0);
1269
+ p(this, Qe, /* @__PURE__ */ new Set());
1270
+ this.options = s, h(this, Q, t), h(this, B, null), this.bindMethods(), this.setOptions(s);
1271
1271
  }
1272
1272
  bindMethods() {
1273
1273
  this.refetch = this.refetch.bind(this);
1274
1274
  }
1275
1275
  onSubscribe() {
1276
- this.listeners.size === 1 && (a(this, N).addObserver(this), Jt(a(this, N), this.options) ? b(this, we, Ve).call(this) : this.updateResult(), b(this, tt, Pt).call(this));
1276
+ this.listeners.size === 1 && (n(this, N).addObserver(this), qt(n(this, N), this.options) ? x(this, be, Ge).call(this) : this.updateResult(), x(this, Be, St).call(this));
1277
1277
  }
1278
1278
  onUnsubscribe() {
1279
1279
  this.hasListeners() || this.destroy();
1280
1280
  }
1281
1281
  shouldFetchOnReconnect() {
1282
- return Lt(
1283
- a(this, N),
1282
+ return kt(
1283
+ n(this, N),
1284
1284
  this.options,
1285
1285
  this.options.refetchOnReconnect
1286
1286
  );
1287
1287
  }
1288
1288
  shouldFetchOnWindowFocus() {
1289
- return Lt(
1290
- a(this, N),
1289
+ return kt(
1290
+ n(this, N),
1291
1291
  this.options,
1292
1292
  this.options.refetchOnWindowFocus
1293
1293
  );
1294
1294
  }
1295
1295
  destroy() {
1296
- this.listeners = /* @__PURE__ */ new Set(), b(this, st, Nt).call(this), b(this, rt, Mt).call(this), a(this, N).removeObserver(this);
1296
+ this.listeners = /* @__PURE__ */ new Set(), x(this, et, At).call(this), x(this, tt, Pt).call(this), n(this, N).removeObserver(this);
1297
1297
  }
1298
1298
  setOptions(t, s) {
1299
- const r = this.options, n = a(this, N);
1300
- if (this.options = a(this, Q).defaultQueryOptions(t), ht(r, this.options) || a(this, Q).getQueryCache().notify({
1299
+ const r = this.options, a = n(this, N);
1300
+ if (this.options = n(this, Q).defaultQueryOptions(t), ct(r, this.options) || n(this, Q).getQueryCache().notify({
1301
1301
  type: "observerOptionsUpdated",
1302
- query: a(this, N),
1302
+ query: n(this, N),
1303
1303
  observer: this
1304
1304
  }), typeof this.options.enabled < "u" && typeof this.options.enabled != "boolean")
1305
1305
  throw new Error("Expected enabled to be a boolean");
1306
- this.options.queryKey || (this.options.queryKey = r.queryKey), b(this, it, Ot).call(this);
1306
+ this.options.queryKey || (this.options.queryKey = r.queryKey), x(this, st, Nt).call(this);
1307
1307
  const o = this.hasListeners();
1308
- o && Xt(
1309
- a(this, N),
1310
- n,
1308
+ o && Wt(
1309
+ n(this, N),
1310
+ a,
1311
1311
  this.options,
1312
1312
  r
1313
- ) && b(this, we, Ve).call(this), this.updateResult(s), o && (a(this, N) !== n || this.options.enabled !== r.enabled || this.options.staleTime !== r.staleTime) && b(this, Ie, At).call(this);
1314
- const l = b(this, Be, St).call(this);
1315
- o && (a(this, N) !== n || this.options.enabled !== r.enabled || l !== a(this, he)) && b(this, et, kt).call(this, l);
1313
+ ) && x(this, be, Ge).call(this), this.updateResult(s), o && (n(this, N) !== a || this.options.enabled !== r.enabled || this.options.staleTime !== r.staleTime) && x(this, Je, jt).call(this);
1314
+ const l = x(this, Xe, _t).call(this);
1315
+ o && (n(this, N) !== a || this.options.enabled !== r.enabled || l !== n(this, de)) && x(this, Ie, Et).call(this, l);
1316
1316
  }
1317
1317
  getOptimisticResult(t) {
1318
- const s = a(this, Q).getQueryCache().build(a(this, Q), t), r = this.createResult(s, t);
1319
- return hr(this, r) && (h(this, U, r), h(this, Te, this.options), h(this, Ce, a(this, N).state)), r;
1318
+ const s = n(this, Q).getQueryCache().build(n(this, Q), t), r = this.createResult(s, t);
1319
+ return dr(this, r) && (h(this, U, r), h(this, De, this.options), h(this, ge, n(this, N).state)), r;
1320
1320
  }
1321
1321
  getCurrentResult() {
1322
- return a(this, U);
1322
+ return n(this, U);
1323
1323
  }
1324
1324
  trackResult(t) {
1325
1325
  const s = {};
@@ -1327,12 +1327,12 @@ var L, ce, ue, Le, Fe, de, Re, De, us, xs = (us = class {
1327
1327
  Object.defineProperty(s, r, {
1328
1328
  configurable: !1,
1329
1329
  enumerable: !0,
1330
- get: () => (a(this, He).add(r), t[r])
1330
+ get: () => (n(this, Qe).add(r), t[r])
1331
1331
  });
1332
1332
  }), s;
1333
1333
  }
1334
1334
  getCurrentQuery() {
1335
- return a(this, N);
1335
+ return n(this, N);
1336
1336
  }
1337
1337
  refetch({ ...t } = {}) {
1338
1338
  return this.fetch({
@@ -1340,183 +1340,183 @@ var L, ce, ue, Le, Fe, de, Re, De, us, xs = (us = class {
1340
1340
  });
1341
1341
  }
1342
1342
  fetchOptimistic(t) {
1343
- const s = a(this, Q).defaultQueryOptions(t), r = a(this, Q).getQueryCache().build(a(this, Q), s);
1343
+ const s = n(this, Q).defaultQueryOptions(t), r = n(this, Q).getQueryCache().build(n(this, Q), s);
1344
1344
  return r.isFetchingOptimistic = !0, r.fetch().then(() => this.createResult(r, s));
1345
1345
  }
1346
1346
  fetch(t) {
1347
- return b(this, we, Ve).call(this, {
1347
+ return x(this, be, Ge).call(this, {
1348
1348
  ...t,
1349
1349
  cancelRefetch: t.cancelRefetch ?? !0
1350
- }).then(() => (this.updateResult(), a(this, U)));
1350
+ }).then(() => (this.updateResult(), n(this, U)));
1351
1351
  }
1352
1352
  createResult(t, s) {
1353
1353
  var $;
1354
- const r = a(this, N), n = this.options, o = a(this, U), l = a(this, Ce), c = a(this, Te), y = t !== r ? t.state : a(this, Je), { state: u } = t;
1355
- let { error: x, errorUpdatedAt: g, fetchStatus: p, status: w } = u, _ = !1, v;
1354
+ const r = n(this, N), a = this.options, o = n(this, U), l = n(this, ge), c = n(this, De), C = t !== r ? t.state : n(this, Ye), { state: u } = t;
1355
+ let { error: b, errorUpdatedAt: v, fetchStatus: f, status: w } = u, E = !1, y;
1356
1356
  if (s._optimisticResults) {
1357
- const D = this.hasListeners(), M = !D && Jt(t, s), te = D && Xt(t, r, s, n);
1358
- (M || te) && (p = xt(t.options.networkMode) ? "fetching" : "paused", u.dataUpdatedAt || (w = "pending")), s._optimisticResults === "isRestoring" && (p = "idle");
1357
+ const T = this.hasListeners(), M = !T && qt(t, s), ee = T && Wt(t, r, s, a);
1358
+ (M || ee) && (f = vt(t.options.networkMode) ? "fetching" : "paused", u.dataUpdatedAt || (w = "pending")), s._optimisticResults === "isRestoring" && (f = "idle");
1359
1359
  }
1360
1360
  if (s.select && typeof u.data < "u")
1361
- if (o && u.data === (l == null ? void 0 : l.data) && s.select === a(this, Xe))
1362
- v = a(this, Ue);
1361
+ if (o && u.data === (l == null ? void 0 : l.data) && s.select === n(this, ze))
1362
+ y = n(this, Te);
1363
1363
  else
1364
1364
  try {
1365
- h(this, Xe, s.select), v = s.select(u.data), v = Et(o == null ? void 0 : o.data, v, s), h(this, Ue, v), h(this, ee, null);
1366
- } catch (D) {
1367
- h(this, ee, D);
1365
+ h(this, ze, s.select), y = s.select(u.data), y = wt(o == null ? void 0 : o.data, y, s), h(this, Te, y), h(this, B, null);
1366
+ } catch (T) {
1367
+ h(this, B, T);
1368
1368
  }
1369
1369
  else
1370
- v = u.data;
1371
- if (typeof s.placeholderData < "u" && typeof v > "u" && w === "pending") {
1372
- let D;
1370
+ y = u.data;
1371
+ if (typeof s.placeholderData < "u" && typeof y > "u" && w === "pending") {
1372
+ let T;
1373
1373
  if (o != null && o.isPlaceholderData && s.placeholderData === (c == null ? void 0 : c.placeholderData))
1374
- D = o.data;
1375
- else if (D = typeof s.placeholderData == "function" ? s.placeholderData(
1376
- ($ = a(this, Qe)) == null ? void 0 : $.state.data,
1377
- a(this, Qe)
1378
- ) : s.placeholderData, s.select && typeof D < "u")
1374
+ T = o.data;
1375
+ else if (T = typeof s.placeholderData == "function" ? s.placeholderData(
1376
+ ($ = n(this, Ue)) == null ? void 0 : $.state.data,
1377
+ n(this, Ue)
1378
+ ) : s.placeholderData, s.select && typeof T < "u")
1379
1379
  try {
1380
- D = s.select(D), h(this, ee, null);
1380
+ T = s.select(T), h(this, B, null);
1381
1381
  } catch (M) {
1382
- h(this, ee, M);
1382
+ h(this, B, M);
1383
1383
  }
1384
- typeof D < "u" && (w = "success", v = Et(
1384
+ typeof T < "u" && (w = "success", y = wt(
1385
1385
  o == null ? void 0 : o.data,
1386
- D,
1386
+ T,
1387
1387
  s
1388
- ), _ = !0);
1388
+ ), E = !0);
1389
1389
  }
1390
- a(this, ee) && (x = a(this, ee), v = a(this, Ue), g = Date.now(), w = "error");
1391
- const C = p === "fetching", S = w === "pending", E = w === "error", k = S && C;
1390
+ n(this, B) && (b = n(this, B), y = n(this, Te), v = Date.now(), w = "error");
1391
+ const g = f === "fetching", S = w === "pending", _ = w === "error", k = S && g;
1392
1392
  return {
1393
1393
  status: w,
1394
- fetchStatus: p,
1394
+ fetchStatus: f,
1395
1395
  isPending: S,
1396
1396
  isSuccess: w === "success",
1397
- isError: E,
1397
+ isError: _,
1398
1398
  isInitialLoading: k,
1399
1399
  isLoading: k,
1400
- data: v,
1400
+ data: y,
1401
1401
  dataUpdatedAt: u.dataUpdatedAt,
1402
- error: x,
1403
- errorUpdatedAt: g,
1402
+ error: b,
1403
+ errorUpdatedAt: v,
1404
1404
  failureCount: u.fetchFailureCount,
1405
1405
  failureReason: u.fetchFailureReason,
1406
1406
  errorUpdateCount: u.errorUpdateCount,
1407
1407
  isFetched: u.dataUpdateCount > 0 || u.errorUpdateCount > 0,
1408
- isFetchedAfterMount: u.dataUpdateCount > y.dataUpdateCount || u.errorUpdateCount > y.errorUpdateCount,
1409
- isFetching: C,
1410
- isRefetching: C && !S,
1411
- isLoadingError: E && u.dataUpdatedAt === 0,
1412
- isPaused: p === "paused",
1413
- isPlaceholderData: _,
1414
- isRefetchError: E && u.dataUpdatedAt !== 0,
1415
- isStale: Ht(t, s),
1408
+ isFetchedAfterMount: u.dataUpdateCount > C.dataUpdateCount || u.errorUpdateCount > C.errorUpdateCount,
1409
+ isFetching: g,
1410
+ isRefetching: g && !S,
1411
+ isLoadingError: _ && u.dataUpdatedAt === 0,
1412
+ isPaused: f === "paused",
1413
+ isPlaceholderData: E,
1414
+ isRefetchError: _ && u.dataUpdatedAt !== 0,
1415
+ isStale: Rt(t, s),
1416
1416
  refetch: this.refetch
1417
1417
  };
1418
1418
  }
1419
1419
  updateResult(t) {
1420
- const s = a(this, U), r = this.createResult(a(this, N), this.options);
1421
- if (h(this, Ce, a(this, N).state), h(this, Te, this.options), a(this, Ce).data !== void 0 && h(this, Qe, a(this, N)), ht(r, s))
1420
+ const s = n(this, U), r = this.createResult(n(this, N), this.options);
1421
+ if (h(this, ge, n(this, N).state), h(this, De, this.options), n(this, ge).data !== void 0 && h(this, Ue, n(this, N)), ct(r, s))
1422
1422
  return;
1423
1423
  h(this, U, r);
1424
- const n = {}, o = () => {
1424
+ const a = {}, o = () => {
1425
1425
  if (!s)
1426
1426
  return !0;
1427
1427
  const { notifyOnChangeProps: l } = this.options, c = typeof l == "function" ? l() : l;
1428
- if (c === "all" || !c && !a(this, He).size)
1428
+ if (c === "all" || !c && !n(this, Qe).size)
1429
1429
  return !0;
1430
- const f = new Set(
1431
- c ?? a(this, He)
1430
+ const m = new Set(
1431
+ c ?? n(this, Qe)
1432
1432
  );
1433
- return this.options.throwOnError && f.add("error"), Object.keys(a(this, U)).some((y) => {
1434
- const u = y;
1435
- return a(this, U)[u] !== s[u] && f.has(u);
1433
+ return this.options.throwOnError && m.add("error"), Object.keys(n(this, U)).some((C) => {
1434
+ const u = C;
1435
+ return n(this, U)[u] !== s[u] && m.has(u);
1436
1436
  });
1437
1437
  };
1438
- (t == null ? void 0 : t.listeners) !== !1 && o() && (n.listeners = !0), b(this, Ct, bs).call(this, { ...n, ...t });
1438
+ (t == null ? void 0 : t.listeners) !== !1 && o() && (a.listeners = !0), x(this, mt, ys).call(this, { ...a, ...t });
1439
1439
  }
1440
1440
  onQueryUpdate() {
1441
- this.updateResult(), this.hasListeners() && b(this, tt, Pt).call(this);
1441
+ this.updateResult(), this.hasListeners() && x(this, Be, St).call(this);
1442
1442
  }
1443
- }, Q = new WeakMap(), N = new WeakMap(), Je = new WeakMap(), U = new WeakMap(), Ce = new WeakMap(), Te = new WeakMap(), ee = new WeakMap(), Xe = new WeakMap(), Ue = new WeakMap(), Qe = new WeakMap(), xe = new WeakMap(), be = new WeakMap(), he = new WeakMap(), He = new WeakMap(), we = new WeakSet(), Ve = function(t) {
1444
- b(this, it, Ot).call(this);
1445
- let s = a(this, N).fetch(
1443
+ }, Q = new WeakMap(), N = new WeakMap(), Ye = new WeakMap(), U = new WeakMap(), ge = new WeakMap(), De = new WeakMap(), B = new WeakMap(), ze = new WeakMap(), Te = new WeakMap(), Ue = new WeakMap(), Ce = new WeakMap(), xe = new WeakMap(), de = new WeakMap(), Qe = new WeakMap(), be = new WeakSet(), Ge = function(t) {
1444
+ x(this, st, Nt).call(this);
1445
+ let s = n(this, N).fetch(
1446
1446
  this.options,
1447
1447
  t
1448
1448
  );
1449
1449
  return t != null && t.throwOnError || (s = s.catch(Z)), s;
1450
- }, Ie = new WeakSet(), At = function() {
1451
- if (b(this, st, Nt).call(this), Ke || a(this, U).isStale || !jt(this.options.staleTime))
1450
+ }, Je = new WeakSet(), jt = function() {
1451
+ if (x(this, et, At).call(this), $e || n(this, U).isStale || !xt(this.options.staleTime))
1452
1452
  return;
1453
- const s = ps(
1454
- a(this, U).dataUpdatedAt,
1453
+ const s = us(
1454
+ n(this, U).dataUpdatedAt,
1455
1455
  this.options.staleTime
1456
1456
  ) + 1;
1457
- h(this, xe, setTimeout(() => {
1458
- a(this, U).isStale || this.updateResult();
1457
+ h(this, Ce, setTimeout(() => {
1458
+ n(this, U).isStale || this.updateResult();
1459
1459
  }, s));
1460
+ }, Xe = new WeakSet(), _t = function() {
1461
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, N)) : this.options.refetchInterval) ?? !1;
1462
+ }, Ie = new WeakSet(), Et = function(t) {
1463
+ x(this, tt, Pt).call(this), h(this, de, t), !($e || this.options.enabled === !1 || !xt(n(this, de)) || n(this, de) === 0) && h(this, xe, setInterval(() => {
1464
+ (this.options.refetchIntervalInBackground || ut.isFocused()) && x(this, be, Ge).call(this);
1465
+ }, n(this, de)));
1460
1466
  }, Be = new WeakSet(), St = function() {
1461
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(a(this, N)) : this.options.refetchInterval) ?? !1;
1462
- }, et = new WeakSet(), kt = function(t) {
1463
- b(this, rt, Mt).call(this), h(this, he, t), !(Ke || this.options.enabled === !1 || !jt(a(this, he)) || a(this, he) === 0) && h(this, be, setInterval(() => {
1464
- (this.options.refetchIntervalInBackground || ft.isFocused()) && b(this, we, Ve).call(this);
1465
- }, a(this, he)));
1467
+ x(this, Je, jt).call(this), x(this, Ie, Et).call(this, x(this, Xe, _t).call(this));
1468
+ }, et = new WeakSet(), At = function() {
1469
+ n(this, Ce) && (clearTimeout(n(this, Ce)), h(this, Ce, void 0));
1466
1470
  }, tt = new WeakSet(), Pt = function() {
1467
- b(this, Ie, At).call(this), b(this, et, kt).call(this, b(this, Be, St).call(this));
1471
+ n(this, xe) && (clearInterval(n(this, xe)), h(this, xe, void 0));
1468
1472
  }, st = new WeakSet(), Nt = function() {
1469
- a(this, xe) && (clearTimeout(a(this, xe)), h(this, xe, void 0));
1470
- }, rt = new WeakSet(), Mt = function() {
1471
- a(this, be) && (clearInterval(a(this, be)), h(this, be, void 0));
1472
- }, it = new WeakSet(), Ot = function() {
1473
- const t = a(this, Q).getQueryCache().build(a(this, Q), this.options);
1474
- if (t === a(this, N))
1473
+ const t = n(this, Q).getQueryCache().build(n(this, Q), this.options);
1474
+ if (t === n(this, N))
1475
1475
  return;
1476
- const s = a(this, N);
1477
- h(this, N, t), h(this, Je, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
1478
- }, Ct = new WeakSet(), bs = function(t) {
1479
- F.batch(() => {
1476
+ const s = n(this, N);
1477
+ h(this, N, t), h(this, Ye, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
1478
+ }, mt = new WeakSet(), ys = function(t) {
1479
+ R.batch(() => {
1480
1480
  t.listeners && this.listeners.forEach((s) => {
1481
- s(a(this, U));
1482
- }), a(this, Q).getQueryCache().notify({
1483
- query: a(this, N),
1481
+ s(n(this, U));
1482
+ }), n(this, Q).getQueryCache().notify({
1483
+ query: n(this, N),
1484
1484
  type: "observerResultsUpdated"
1485
1485
  });
1486
1486
  });
1487
- }, ds);
1488
- function dr(e, t) {
1487
+ }, os);
1488
+ function ur(e, t) {
1489
1489
  return t.enabled !== !1 && !e.state.dataUpdatedAt && !(e.state.status === "error" && t.retryOnMount === !1);
1490
1490
  }
1491
- function Jt(e, t) {
1492
- return dr(e, t) || e.state.dataUpdatedAt > 0 && Lt(e, t, t.refetchOnMount);
1491
+ function qt(e, t) {
1492
+ return ur(e, t) || e.state.dataUpdatedAt > 0 && kt(e, t, t.refetchOnMount);
1493
1493
  }
1494
- function Lt(e, t, s) {
1494
+ function kt(e, t, s) {
1495
1495
  if (t.enabled !== !1) {
1496
1496
  const r = typeof s == "function" ? s(e) : s;
1497
- return r === "always" || r !== !1 && Ht(e, t);
1497
+ return r === "always" || r !== !1 && Rt(e, t);
1498
1498
  }
1499
1499
  return !1;
1500
1500
  }
1501
- function Xt(e, t, s, r) {
1502
- return s.enabled !== !1 && (e !== t || r.enabled === !1) && (!s.suspense || e.state.status !== "error") && Ht(e, s);
1501
+ function Wt(e, t, s, r) {
1502
+ return s.enabled !== !1 && (e !== t || r.enabled === !1) && (!s.suspense || e.state.status !== "error") && Rt(e, s);
1503
1503
  }
1504
- function Ht(e, t) {
1504
+ function Rt(e, t) {
1505
1505
  return e.isStaleByTime(t.staleTime);
1506
1506
  }
1507
- function hr(e, t) {
1508
- return !ht(e.getCurrentResult(), t);
1507
+ function dr(e, t) {
1508
+ return !ct(e.getCurrentResult(), t);
1509
1509
  }
1510
- var fe, re, G, ie, $e, dt, nt, Ft, hs, fr = (hs = class extends Ge {
1510
+ var he, se, G, re, He, lt, rt, Mt, ls, hr = (ls = class extends Ke {
1511
1511
  constructor(t, s) {
1512
1512
  super();
1513
- m(this, $e);
1514
- m(this, nt);
1515
- m(this, fe, void 0);
1516
- m(this, re, void 0);
1517
- m(this, G, void 0);
1518
- m(this, ie, void 0);
1519
- h(this, re, void 0), h(this, fe, t), this.setOptions(s), this.bindMethods(), b(this, $e, dt).call(this);
1513
+ p(this, He);
1514
+ p(this, rt);
1515
+ p(this, he, void 0);
1516
+ p(this, se, void 0);
1517
+ p(this, G, void 0);
1518
+ p(this, re, void 0);
1519
+ h(this, se, void 0), h(this, he, t), this.setOptions(s), this.bindMethods(), x(this, He, lt).call(this);
1520
1520
  }
1521
1521
  bindMethods() {
1522
1522
  this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
@@ -1524,34 +1524,34 @@ var fe, re, G, ie, $e, dt, nt, Ft, hs, fr = (hs = class extends Ge {
1524
1524
  setOptions(t) {
1525
1525
  var r;
1526
1526
  const s = this.options;
1527
- this.options = a(this, fe).defaultMutationOptions(t), ht(s, this.options) || a(this, fe).getMutationCache().notify({
1527
+ this.options = n(this, he).defaultMutationOptions(t), ct(s, this.options) || n(this, he).getMutationCache().notify({
1528
1528
  type: "observerOptionsUpdated",
1529
- mutation: a(this, G),
1529
+ mutation: n(this, G),
1530
1530
  observer: this
1531
- }), (r = a(this, G)) == null || r.setOptions(this.options), s != null && s.mutationKey && this.options.mutationKey && je(s.mutationKey) !== je(this.options.mutationKey) && this.reset();
1531
+ }), (r = n(this, G)) == null || r.setOptions(this.options), s != null && s.mutationKey && this.options.mutationKey && we(s.mutationKey) !== we(this.options.mutationKey) && this.reset();
1532
1532
  }
1533
1533
  onUnsubscribe() {
1534
1534
  var t;
1535
- this.hasListeners() || (t = a(this, G)) == null || t.removeObserver(this);
1535
+ this.hasListeners() || (t = n(this, G)) == null || t.removeObserver(this);
1536
1536
  }
1537
1537
  onMutationUpdate(t) {
1538
- b(this, $e, dt).call(this), b(this, nt, Ft).call(this, t);
1538
+ x(this, He, lt).call(this), x(this, rt, Mt).call(this, t);
1539
1539
  }
1540
1540
  getCurrentResult() {
1541
- return a(this, re);
1541
+ return n(this, se);
1542
1542
  }
1543
1543
  reset() {
1544
1544
  var t;
1545
- (t = a(this, G)) == null || t.removeObserver(this), h(this, G, void 0), b(this, $e, dt).call(this), b(this, nt, Ft).call(this);
1545
+ (t = n(this, G)) == null || t.removeObserver(this), h(this, G, void 0), x(this, He, lt).call(this), x(this, rt, Mt).call(this);
1546
1546
  }
1547
1547
  mutate(t, s) {
1548
1548
  var r;
1549
- return h(this, ie, s), (r = a(this, G)) == null || r.removeObserver(this), h(this, G, a(this, fe).getMutationCache().build(a(this, fe), this.options)), a(this, G).addObserver(this), a(this, G).execute(t);
1549
+ return h(this, re, s), (r = n(this, G)) == null || r.removeObserver(this), h(this, G, n(this, he).getMutationCache().build(n(this, he), this.options)), n(this, G).addObserver(this), n(this, G).execute(t);
1550
1550
  }
1551
- }, fe = new WeakMap(), re = new WeakMap(), G = new WeakMap(), ie = new WeakMap(), $e = new WeakSet(), dt = function() {
1551
+ }, he = new WeakMap(), se = new WeakMap(), G = new WeakMap(), re = new WeakMap(), He = new WeakSet(), lt = function() {
1552
1552
  var s;
1553
- const t = ((s = a(this, G)) == null ? void 0 : s.state) ?? Cs();
1554
- h(this, re, {
1553
+ const t = ((s = n(this, G)) == null ? void 0 : s.state) ?? ms();
1554
+ h(this, se, {
1555
1555
  ...t,
1556
1556
  isPending: t.status === "pending",
1557
1557
  isSuccess: t.status === "success",
@@ -1560,40 +1560,40 @@ var fe, re, G, ie, $e, dt, nt, Ft, hs, fr = (hs = class extends Ge {
1560
1560
  mutate: this.mutate,
1561
1561
  reset: this.reset
1562
1562
  });
1563
- }, nt = new WeakSet(), Ft = function(t) {
1564
- F.batch(() => {
1565
- var s, r, n, o, l, c, f, y;
1566
- if (a(this, ie) && this.hasListeners()) {
1567
- const u = a(this, re).variables, x = a(this, re).context;
1568
- (t == null ? void 0 : t.type) === "success" ? ((r = (s = a(this, ie)).onSuccess) == null || r.call(s, t.data, u, x), (o = (n = a(this, ie)).onSettled) == null || o.call(n, t.data, null, u, x)) : (t == null ? void 0 : t.type) === "error" && ((c = (l = a(this, ie)).onError) == null || c.call(l, t.error, u, x), (y = (f = a(this, ie)).onSettled) == null || y.call(
1569
- f,
1563
+ }, rt = new WeakSet(), Mt = function(t) {
1564
+ R.batch(() => {
1565
+ var s, r, a, o, l, c, m, C;
1566
+ if (n(this, re) && this.hasListeners()) {
1567
+ const u = n(this, se).variables, b = n(this, se).context;
1568
+ (t == null ? void 0 : t.type) === "success" ? ((r = (s = n(this, re)).onSuccess) == null || r.call(s, t.data, u, b), (o = (a = n(this, re)).onSettled) == null || o.call(a, t.data, null, u, b)) : (t == null ? void 0 : t.type) === "error" && ((c = (l = n(this, re)).onError) == null || c.call(l, t.error, u, b), (C = (m = n(this, re)).onSettled) == null || C.call(
1569
+ m,
1570
1570
  void 0,
1571
1571
  t.error,
1572
1572
  u,
1573
- x
1573
+ b
1574
1574
  ));
1575
1575
  }
1576
1576
  this.listeners.forEach((u) => {
1577
- u(a(this, re));
1577
+ u(n(this, se));
1578
1578
  });
1579
1579
  });
1580
- }, hs), ws = d.createContext(
1580
+ }, ls), gs = d.createContext(
1581
1581
  void 0
1582
- ), js = (e) => {
1583
- const t = d.useContext(ws);
1582
+ ), Dt = (e) => {
1583
+ const t = d.useContext(gs);
1584
1584
  if (e)
1585
1585
  return e;
1586
1586
  if (!t)
1587
1587
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1588
1588
  return t;
1589
- }, pr = ({
1589
+ }, fr = ({
1590
1590
  client: e,
1591
1591
  children: t
1592
1592
  }) => (d.useEffect(() => (e.mount(), () => {
1593
1593
  e.unmount();
1594
- }), [e]), /* @__PURE__ */ d.createElement(ws.Provider, { value: e }, t)), _s = d.createContext(!1), mr = () => d.useContext(_s);
1595
- _s.Provider;
1596
- function vr() {
1594
+ }), [e]), /* @__PURE__ */ d.createElement(gs.Provider, { value: e }, t)), Cs = d.createContext(!1), pr = () => d.useContext(Cs);
1595
+ Cs.Provider;
1596
+ function mr() {
1597
1597
  let e = !1;
1598
1598
  return {
1599
1599
  clearReset: () => {
@@ -1605,65 +1605,65 @@ function vr() {
1605
1605
  isReset: () => e
1606
1606
  };
1607
1607
  }
1608
- var gr = d.createContext(vr()), yr = () => d.useContext(gr);
1609
- function Es(e, t) {
1608
+ var vr = d.createContext(mr()), yr = () => d.useContext(vr);
1609
+ function xs(e, t) {
1610
1610
  return typeof e == "function" ? e(...t) : !!e;
1611
1611
  }
1612
- var Cr = (e, t) => {
1612
+ var gr = (e, t) => {
1613
1613
  (e.suspense || e.throwOnError) && (t.isReset() || (e.retryOnMount = !1));
1614
- }, xr = (e) => {
1614
+ }, Cr = (e) => {
1615
1615
  d.useEffect(() => {
1616
1616
  e.clearReset();
1617
1617
  }, [e]);
1618
- }, br = ({
1618
+ }, xr = ({
1619
1619
  result: e,
1620
1620
  errorResetBoundary: t,
1621
1621
  throwOnError: s,
1622
1622
  query: r
1623
- }) => e.isError && !t.isReset() && !e.isFetching && r && Es(s, [e.error, r]), wr = (e) => {
1623
+ }) => e.isError && !t.isReset() && !e.isFetching && r && xs(s, [e.error, r]), br = (e) => {
1624
1624
  e.suspense && typeof e.staleTime != "number" && (e.staleTime = 1e3);
1625
- }, jr = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, _r = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1625
+ }, wr = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, jr = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1626
1626
  s.clearReset();
1627
1627
  });
1628
- function Er(e, t, s) {
1629
- const r = js(s), n = mr(), o = yr(), l = r.defaultQueryOptions(e);
1630
- l._optimisticResults = n ? "isRestoring" : "optimistic", wr(l), Cr(l, o), xr(o);
1628
+ function _r(e, t, s) {
1629
+ const r = Dt(s), a = pr(), o = yr(), l = r.defaultQueryOptions(e);
1630
+ l._optimisticResults = a ? "isRestoring" : "optimistic", br(l), gr(l, o), Cr(o);
1631
1631
  const [c] = d.useState(
1632
1632
  () => new t(
1633
1633
  r,
1634
1634
  l
1635
1635
  )
1636
- ), f = c.getOptimisticResult(l);
1636
+ ), m = c.getOptimisticResult(l);
1637
1637
  if (d.useSyncExternalStore(
1638
1638
  d.useCallback(
1639
- (y) => {
1640
- const u = n ? () => {
1641
- } : c.subscribe(F.batchCalls(y));
1639
+ (C) => {
1640
+ const u = a ? () => {
1641
+ } : c.subscribe(R.batchCalls(C));
1642
1642
  return c.updateResult(), u;
1643
1643
  },
1644
- [c, n]
1644
+ [c, a]
1645
1645
  ),
1646
1646
  () => c.getCurrentResult(),
1647
1647
  () => c.getCurrentResult()
1648
1648
  ), d.useEffect(() => {
1649
1649
  c.setOptions(l, { listeners: !1 });
1650
- }, [l, c]), jr(l, f))
1651
- throw _r(l, c, o);
1652
- if (br({
1653
- result: f,
1650
+ }, [l, c]), wr(l, m))
1651
+ throw jr(l, c, o);
1652
+ if (xr({
1653
+ result: m,
1654
1654
  errorResetBoundary: o,
1655
1655
  throwOnError: l.throwOnError,
1656
1656
  query: r.getQueryCache().get(l.queryHash)
1657
1657
  }))
1658
- throw f.error;
1659
- return l.notifyOnChangeProps ? f : c.trackResult(f);
1658
+ throw m.error;
1659
+ return l.notifyOnChangeProps ? m : c.trackResult(m);
1660
1660
  }
1661
- function As(e, t) {
1662
- return Er(e, ur, t);
1661
+ function bs(e, t) {
1662
+ return _r(e, cr, t);
1663
1663
  }
1664
- function Ar(e, t) {
1665
- const s = js(t), [r] = d.useState(
1666
- () => new fr(
1664
+ function Er(e, t) {
1665
+ const s = Dt(t), [r] = d.useState(
1666
+ () => new hr(
1667
1667
  s,
1668
1668
  e
1669
1669
  )
@@ -1671,9 +1671,9 @@ function Ar(e, t) {
1671
1671
  d.useEffect(() => {
1672
1672
  r.setOptions(e);
1673
1673
  }, [r, e]);
1674
- const n = d.useSyncExternalStore(
1674
+ const a = d.useSyncExternalStore(
1675
1675
  d.useCallback(
1676
- (l) => r.subscribe(F.batchCalls(l)),
1676
+ (l) => r.subscribe(R.batchCalls(l)),
1677
1677
  [r]
1678
1678
  ),
1679
1679
  () => r.getCurrentResult(),
@@ -1684,103 +1684,103 @@ function Ar(e, t) {
1684
1684
  },
1685
1685
  [r]
1686
1686
  );
1687
- if (n.error && Es(r.options.throwOnError, [n.error]))
1688
- throw n.error;
1689
- return { ...n, mutate: o, mutateAsync: n.mutate };
1687
+ if (a.error && xs(r.options.throwOnError, [a.error]))
1688
+ throw a.error;
1689
+ return { ...a, mutate: o, mutateAsync: a.mutate };
1690
1690
  }
1691
1691
  function Sr() {
1692
1692
  }
1693
- function Ss(e) {
1693
+ function ws(e) {
1694
1694
  var t, s, r = "";
1695
1695
  if (typeof e == "string" || typeof e == "number")
1696
1696
  r += e;
1697
1697
  else if (typeof e == "object")
1698
1698
  if (Array.isArray(e)) {
1699
- var n = e.length;
1700
- for (t = 0; t < n; t++)
1701
- e[t] && (s = Ss(e[t])) && (r && (r += " "), r += s);
1699
+ var a = e.length;
1700
+ for (t = 0; t < a; t++)
1701
+ e[t] && (s = ws(e[t])) && (r && (r += " "), r += s);
1702
1702
  } else
1703
1703
  for (s in e)
1704
1704
  e[s] && (r && (r += " "), r += s);
1705
1705
  return r;
1706
1706
  }
1707
1707
  function P() {
1708
- for (var e, t, s = 0, r = "", n = arguments.length; s < n; s++)
1709
- (e = arguments[s]) && (t = Ss(e)) && (r && (r += " "), r += t);
1708
+ for (var e, t, s = 0, r = "", a = arguments.length; s < a; s++)
1709
+ (e = arguments[s]) && (t = ws(e)) && (r && (r += " "), r += t);
1710
1710
  return r;
1711
1711
  }
1712
- var kr = Object.defineProperty, Pr = Object.defineProperties, Nr = Object.getOwnPropertyDescriptors, mt = Object.getOwnPropertySymbols, ks = Object.prototype.hasOwnProperty, Ps = Object.prototype.propertyIsEnumerable, It = (e, t, s) => t in e ? kr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, j = (e, t) => {
1712
+ var Ar = Object.defineProperty, Pr = Object.defineProperties, Nr = Object.getOwnPropertyDescriptors, ht = Object.getOwnPropertySymbols, js = Object.prototype.hasOwnProperty, _s = Object.prototype.propertyIsEnumerable, Zt = (e, t, s) => t in e ? Ar(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, j = (e, t) => {
1713
1713
  for (var s in t || (t = {}))
1714
- ks.call(t, s) && It(e, s, t[s]);
1715
- if (mt)
1716
- for (var s of mt(t))
1717
- Ps.call(t, s) && It(e, s, t[s]);
1714
+ js.call(t, s) && Zt(e, s, t[s]);
1715
+ if (ht)
1716
+ for (var s of ht(t))
1717
+ _s.call(t, s) && Zt(e, s, t[s]);
1718
1718
  return e;
1719
1719
  }, A = (e, t) => Pr(e, Nr(t)), O = (e, t) => {
1720
1720
  var s = {};
1721
1721
  for (var r in e)
1722
- ks.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
1723
- if (e != null && mt)
1724
- for (var r of mt(e))
1725
- t.indexOf(r) < 0 && Ps.call(e, r) && (s[r] = e[r]);
1722
+ js.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
1723
+ if (e != null && ht)
1724
+ for (var r of ht(e))
1725
+ t.indexOf(r) < 0 && _s.call(e, r) && (s[r] = e[r]);
1726
1726
  return s;
1727
1727
  };
1728
- function vt() {
1729
- return vt = Object.assign ? Object.assign.bind() : function(e) {
1728
+ function ft() {
1729
+ return ft = Object.assign ? Object.assign.bind() : function(e) {
1730
1730
  for (var t = 1; t < arguments.length; t++) {
1731
1731
  var s = arguments[t];
1732
1732
  for (var r in s)
1733
1733
  Object.prototype.hasOwnProperty.call(s, r) && (e[r] = s[r]);
1734
1734
  }
1735
1735
  return e;
1736
- }, vt.apply(this, arguments);
1736
+ }, ft.apply(this, arguments);
1737
1737
  }
1738
- function Mr(e, t) {
1738
+ function kr(e, t) {
1739
1739
  typeof e == "function" ? e(t) : e != null && (e.current = t);
1740
1740
  }
1741
- function Or(...e) {
1741
+ function Mr(...e) {
1742
1742
  return (t) => e.forEach(
1743
- (s) => Mr(s, t)
1743
+ (s) => kr(s, t)
1744
1744
  );
1745
1745
  }
1746
- var Lr = /* @__PURE__ */ d.forwardRef((e, t) => {
1747
- const s = e, { children: r } = s, n = O(s, ["children"]), o = d.Children.toArray(r), l = o.find(Rr);
1746
+ var Or = /* @__PURE__ */ d.forwardRef((e, t) => {
1747
+ const s = e, { children: r } = s, a = O(s, ["children"]), o = d.Children.toArray(r), l = o.find(Fr);
1748
1748
  if (l) {
1749
- const c = l.props.children, f = o.map((y) => y === l ? d.Children.count(c) > 1 ? d.Children.only(null) : /* @__PURE__ */ d.isValidElement(c) ? c.props.children : null : y);
1750
- return /* @__PURE__ */ d.createElement(Rt, vt({}, n, {
1749
+ const c = l.props.children, m = o.map((C) => C === l ? d.Children.count(c) > 1 ? d.Children.only(null) : /* @__PURE__ */ d.isValidElement(c) ? c.props.children : null : C);
1750
+ return /* @__PURE__ */ d.createElement(Ot, ft({}, a, {
1751
1751
  ref: t
1752
- }), /* @__PURE__ */ d.isValidElement(c) ? /* @__PURE__ */ d.cloneElement(c, void 0, f) : null);
1752
+ }), /* @__PURE__ */ d.isValidElement(c) ? /* @__PURE__ */ d.cloneElement(c, void 0, m) : null);
1753
1753
  }
1754
- return /* @__PURE__ */ d.createElement(Rt, vt({}, n, {
1754
+ return /* @__PURE__ */ d.createElement(Ot, ft({}, a, {
1755
1755
  ref: t
1756
1756
  }), r);
1757
1757
  });
1758
- Lr.displayName = "Slot";
1759
- var Rt = /* @__PURE__ */ d.forwardRef((e, t) => {
1760
- const s = e, { children: r } = s, n = O(s, ["children"]);
1761
- return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, A(j({}, Dr(n, r.props)), {
1762
- ref: t ? Or(t, r.ref) : r.ref
1758
+ Or.displayName = "Slot";
1759
+ var Ot = /* @__PURE__ */ d.forwardRef((e, t) => {
1760
+ const s = e, { children: r } = s, a = O(s, ["children"]);
1761
+ return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, A(j({}, Rr(a, r.props)), {
1762
+ ref: t ? Mr(t, r.ref) : r.ref
1763
1763
  })) : d.Children.count(r) > 1 ? d.Children.only(null) : null;
1764
1764
  });
1765
- Rt.displayName = "SlotClone";
1766
- var Fr = ({ children: e }) => /* @__PURE__ */ d.createElement(d.Fragment, null, e);
1767
- function Rr(e) {
1768
- return /* @__PURE__ */ d.isValidElement(e) && e.type === Fr;
1765
+ Ot.displayName = "SlotClone";
1766
+ var Lr = ({ children: e }) => /* @__PURE__ */ d.createElement(d.Fragment, null, e);
1767
+ function Fr(e) {
1768
+ return /* @__PURE__ */ d.isValidElement(e) && e.type === Lr;
1769
1769
  }
1770
- function Dr(e, t) {
1770
+ function Rr(e, t) {
1771
1771
  const s = j({}, t);
1772
1772
  for (const r in t) {
1773
- const n = e[r], o = t[r];
1774
- /^on[A-Z]/.test(r) ? n && o ? s[r] = (...c) => {
1775
- o(...c), n(...c);
1776
- } : n && (s[r] = n) : r === "style" ? s[r] = j(j({}, n), o) : r === "className" && (s[r] = [
1777
- n,
1773
+ const a = e[r], o = t[r];
1774
+ /^on[A-Z]/.test(r) ? a && o ? s[r] = (...c) => {
1775
+ o(...c), a(...c);
1776
+ } : a && (s[r] = a) : r === "style" ? s[r] = j(j({}, a), o) : r === "className" && (s[r] = [
1777
+ a,
1778
1778
  o
1779
1779
  ].filter(Boolean).join(" "));
1780
1780
  }
1781
1781
  return j(j({}, e), s);
1782
1782
  }
1783
- var Tr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1783
+ var Dr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1784
1784
  const r = `${e.charAt(0)}${t.charAt(0)}`;
1785
1785
  return /* @__PURE__ */ i.jsx(
1786
1786
  "span",
@@ -1791,16 +1791,16 @@ var Tr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1791
1791
  children: /* @__PURE__ */ i.jsx("span", { className: "avatar__initials", children: r })
1792
1792
  }
1793
1793
  );
1794
- }, at = d.forwardRef(
1794
+ }, it = d.forwardRef(
1795
1795
  (e, t) => {
1796
1796
  var s = e, {
1797
1797
  iconLeft: r,
1798
- iconRight: n,
1798
+ iconRight: a,
1799
1799
  isPending: o = !1,
1800
1800
  isFilled: l = !1,
1801
1801
  variant: c,
1802
- className: f,
1803
- children: y
1802
+ className: m,
1803
+ children: C
1804
1804
  } = s, u = O(s, [
1805
1805
  "iconLeft",
1806
1806
  "iconRight",
@@ -1810,7 +1810,7 @@ var Tr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1810
1810
  "className",
1811
1811
  "children"
1812
1812
  ]);
1813
- const x = !!r || !!n;
1813
+ const b = !!r || !!a;
1814
1814
  return /* @__PURE__ */ i.jsxs(
1815
1815
  "button",
1816
1816
  A(j({
@@ -1820,24 +1820,24 @@ var Tr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1820
1820
  "button",
1821
1821
  c && `button--${c}`,
1822
1822
  c && l && `button--${c}--filled`,
1823
- x && "button--with-icon",
1823
+ b && "button--with-icon",
1824
1824
  o && "button--pending",
1825
- f
1825
+ m
1826
1826
  ),
1827
1827
  children: [
1828
1828
  r && /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: r }),
1829
- !!y && /* @__PURE__ */ i.jsx("span", { className: "button__label", children: y }),
1830
- n && /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: n })
1829
+ !!C && /* @__PURE__ */ i.jsx("span", { className: "button__label", children: C }),
1830
+ a && /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: a })
1831
1831
  ]
1832
1832
  })
1833
1833
  );
1834
1834
  }
1835
1835
  );
1836
- at.displayName = "Button";
1836
+ it.displayName = "Button";
1837
1837
  d.createContext(void 0);
1838
- var Ur = d.forwardRef(
1838
+ var Tr = d.forwardRef(
1839
1839
  (e, t) => {
1840
- var s = e, { prefix: r, suffix: n, className: o } = s, l = O(s, ["prefix", "suffix", "className"]);
1840
+ var s = e, { prefix: r, suffix: a, className: o } = s, l = O(s, ["prefix", "suffix", "className"]);
1841
1841
  return /* @__PURE__ */ i.jsxs("div", { className: "input__wrapper", children: [
1842
1842
  r && /* @__PURE__ */ i.jsx("span", { className: "input__prefix", children: r }),
1843
1843
  /* @__PURE__ */ i.jsx(
@@ -1847,21 +1847,21 @@ var Ur = d.forwardRef(
1847
1847
  className: P(
1848
1848
  "input",
1849
1849
  r && "input--with-prefix",
1850
- n && "input--with-suffix",
1850
+ a && "input--with-suffix",
1851
1851
  o
1852
1852
  )
1853
1853
  }, l)
1854
1854
  ),
1855
- n && /* @__PURE__ */ i.jsx("span", { className: "input__suffix", children: n })
1855
+ a && /* @__PURE__ */ i.jsx("span", { className: "input__suffix", children: a })
1856
1856
  ] });
1857
1857
  }
1858
1858
  );
1859
- Ur.displayName = "TextField";
1859
+ Tr.displayName = "TextField";
1860
1860
  d.createContext(void 0);
1861
- var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__header__action", children: e }), Hr = (e) => {
1862
- var t = e, { children: s, className: r } = t, n = O(t, ["children", "className"]);
1863
- return /* @__PURE__ */ i.jsx("div", A(j({ className: P("card__body", r) }, n), { children: s }));
1864
- }, $r = (e) => /* @__PURE__ */ i.jsx(
1861
+ var Ur = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__header__action", children: e }), Qr = (e) => {
1862
+ var t = e, { children: s, className: r } = t, a = O(t, ["children", "className"]);
1863
+ return /* @__PURE__ */ i.jsx("div", A(j({ className: P("card__body", r) }, a), { children: s }));
1864
+ }, Hr = (e) => /* @__PURE__ */ i.jsx(
1865
1865
  "svg",
1866
1866
  A(j({
1867
1867
  width: "24",
@@ -1881,7 +1881,7 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1881
1881
  }
1882
1882
  )
1883
1883
  })
1884
- ), $t = $r, Kr = (e) => /* @__PURE__ */ i.jsx(
1884
+ ), Tt = Hr, $r = (e) => /* @__PURE__ */ i.jsx(
1885
1885
  "svg",
1886
1886
  A(j({
1887
1887
  width: "24",
@@ -1901,7 +1901,7 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1901
1901
  }
1902
1902
  )
1903
1903
  })
1904
- ), Gr = Kr, qr = (e) => /* @__PURE__ */ i.jsx(
1904
+ ), Kr = $r, Gr = (e) => /* @__PURE__ */ i.jsx(
1905
1905
  "svg",
1906
1906
  A(j({
1907
1907
  width: "24",
@@ -1920,7 +1920,7 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1920
1920
  }
1921
1921
  )
1922
1922
  })
1923
- ), Vr = qr, Wr = (e) => /* @__PURE__ */ i.jsx(
1923
+ ), Vr = Gr, qr = (e) => /* @__PURE__ */ i.jsx(
1924
1924
  "svg",
1925
1925
  A(j({
1926
1926
  width: "24",
@@ -1939,7 +1939,7 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1939
1939
  }
1940
1940
  )
1941
1941
  })
1942
- ), Zr = Wr, zr = (e) => /* @__PURE__ */ i.jsx(
1942
+ ), Wr = qr, Zr = (e) => /* @__PURE__ */ i.jsx(
1943
1943
  "svg",
1944
1944
  A(j({
1945
1945
  width: "24",
@@ -1958,7 +1958,7 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1958
1958
  }
1959
1959
  )
1960
1960
  })
1961
- ), Yr = zr, Jr = (e) => /* @__PURE__ */ i.jsxs(
1961
+ ), Yr = Zr, zr = (e) => /* @__PURE__ */ i.jsxs(
1962
1962
  "svg",
1963
1963
  A(j({
1964
1964
  width: "24",
@@ -1995,7 +1995,7 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1995
1995
  /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("clipPath", { id: "clip0_19_444", children: /* @__PURE__ */ i.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
1996
1996
  ]
1997
1997
  })
1998
- ), Xr = Jr, Ir = (e) => /* @__PURE__ */ i.jsxs(
1998
+ ), Jr = zr, Xr = (e) => /* @__PURE__ */ i.jsxs(
1999
1999
  "svg",
2000
2000
  A(j({
2001
2001
  width: "24",
@@ -2027,7 +2027,7 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2027
2027
  )
2028
2028
  ]
2029
2029
  })
2030
- ), Br = Ir, ei = (e) => /* @__PURE__ */ i.jsxs(
2030
+ ), Ir = Xr, Br = (e) => /* @__PURE__ */ i.jsxs(
2031
2031
  "svg",
2032
2032
  A(j({
2033
2033
  width: "24",
@@ -2079,31 +2079,36 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2079
2079
  )
2080
2080
  ]
2081
2081
  })
2082
- ), ti = ei, si = (e) => /* @__PURE__ */ i.jsxs(
2083
- "svg",
2084
- A(j({
2085
- width: "20",
2086
- height: "21",
2087
- fill: "none",
2088
- viewBox: "0 0 20 21",
2089
- xmlns: "http://www.w3.org/2000/svg"
2090
- }, e), {
2091
- children: [
2092
- /* @__PURE__ */ i.jsx("circle", { cx: "10", cy: "10.0996", r: "7.5", stroke: "#00ab9e", strokeWidth: "1.25" }),
2093
- /* @__PURE__ */ i.jsx(
2094
- "circle",
2095
- {
2096
- cx: "10",
2097
- cy: "10.0996",
2098
- r: "7.5",
2099
- stroke: "white",
2100
- strokeDasharray: "15 30",
2101
- strokeWidth: "1.25"
2102
- }
2103
- )
2104
- ]
2105
- })
2106
- ), ri = si, ii = (e) => /* @__PURE__ */ i.jsxs(
2082
+ ), ei = Br, ti = (e) => {
2083
+ var t = e, { className: s } = t, r = O(t, ["className"]);
2084
+ return /* @__PURE__ */ i.jsxs(
2085
+ "svg",
2086
+ A(j({
2087
+ width: "20",
2088
+ height: "20",
2089
+ viewBox: "0 0 20 20",
2090
+ fill: "none",
2091
+ xmlns: "http://www.w3.org/2000/svg",
2092
+ className: P("spinner", s)
2093
+ }, r), {
2094
+ children: [
2095
+ /* @__PURE__ */ i.jsx("circle", { cx: "10", cy: "10", r: "9", stroke: "currentColor", strokeOpacity: "0.2", strokeWidth: "1.5" }),
2096
+ /* @__PURE__ */ i.jsx(
2097
+ "circle",
2098
+ {
2099
+ cx: "10",
2100
+ cy: "10",
2101
+ r: "9",
2102
+ stroke: "currentColor",
2103
+ strokeWidth: "1.5",
2104
+ strokeLinecap: "round",
2105
+ strokeDasharray: "42.42 14.14"
2106
+ }
2107
+ )
2108
+ ]
2109
+ })
2110
+ );
2111
+ }, si = ti, ri = (e) => /* @__PURE__ */ i.jsxs(
2107
2112
  "svg",
2108
2113
  A(j({
2109
2114
  width: "24",
@@ -2137,7 +2142,7 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2137
2142
  /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("clipPath", { id: "clip0_762_2934", children: /* @__PURE__ */ i.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
2138
2143
  ]
2139
2144
  })
2140
- ), ni = ii, ai = (e) => {
2145
+ ), ii = ri, ni = (e) => {
2141
2146
  const t = (s) => `${s}${e.suffix ? `_${e.suffix}` : ""}`;
2142
2147
  return /* @__PURE__ */ i.jsxs(
2143
2148
  "svg",
@@ -2308,7 +2313,7 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2308
2313
  ]
2309
2314
  })
2310
2315
  );
2311
- }, Kt = ai, oi = (e) => /* @__PURE__ */ i.jsxs(
2316
+ }, Es = ni, ai = (e) => /* @__PURE__ */ i.jsxs(
2312
2317
  "svg",
2313
2318
  A(j({
2314
2319
  fill: "none",
@@ -2370,7 +2375,7 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2370
2375
  )
2371
2376
  ]
2372
2377
  })
2373
- ), li = oi, ci = (e) => /* @__PURE__ */ i.jsx(
2378
+ ), oi = ai, li = (e) => /* @__PURE__ */ i.jsx(
2374
2379
  "svg",
2375
2380
  A(j({
2376
2381
  fill: "none",
@@ -2390,7 +2395,7 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2390
2395
  }
2391
2396
  )
2392
2397
  })
2393
- ), ui = ci, di = (e) => /* @__PURE__ */ i.jsxs(
2398
+ ), ci = li, ui = (e) => /* @__PURE__ */ i.jsxs(
2394
2399
  "svg",
2395
2400
  A(j({
2396
2401
  width: "24",
@@ -2417,15 +2422,15 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2417
2422
  /* @__PURE__ */ i.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 20.8 20.7)", fill: "currentColor" })
2418
2423
  ]
2419
2424
  })
2420
- ), hi = di, fi = (e) => {
2425
+ ), di = ui, hi = (e) => {
2421
2426
  var t = e, {
2422
2427
  variant: s,
2423
2428
  icon: r,
2424
- isStandalone: n,
2429
+ isStandalone: a,
2425
2430
  title: o,
2426
2431
  description: l,
2427
2432
  className: c
2428
- } = t, f = O(t, [
2433
+ } = t, m = O(t, [
2429
2434
  "variant",
2430
2435
  "icon",
2431
2436
  "isStandalone",
@@ -2435,15 +2440,15 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2435
2440
  ]);
2436
2441
  return /* @__PURE__ */ i.jsx(
2437
2442
  "div",
2438
- A(j({}, f), {
2443
+ A(j({}, m), {
2439
2444
  className: P(
2440
2445
  "card__empty-state",
2441
2446
  s === "error" && "card__empty-state--error",
2442
- n && "card__empty-state--standalone",
2447
+ a && "card__empty-state--standalone",
2443
2448
  c
2444
2449
  ),
2445
2450
  children: /* @__PURE__ */ i.jsxs("div", { className: "card__empty-state__wrapper", children: [
2446
- /* @__PURE__ */ i.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ i.jsx(ni, {}) : r }),
2451
+ /* @__PURE__ */ i.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ i.jsx(ii, {}) : r }),
2447
2452
  /* @__PURE__ */ i.jsxs("div", { className: "card__empty-state__content", children: [
2448
2453
  /* @__PURE__ */ i.jsx("p", { className: "card__empty-state__title", children: o }),
2449
2454
  /* @__PURE__ */ i.jsx("p", { className: "card__empty-state__description", children: l })
@@ -2451,11 +2456,11 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2451
2456
  ] })
2452
2457
  })
2453
2458
  );
2454
- }, pi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__footer", children: e }), mi = (e) => {
2459
+ }, fi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__footer", children: e }), pi = (e) => {
2455
2460
  var t = e, {
2456
2461
  variant: s = "default",
2457
2462
  sticky: r,
2458
- className: n,
2463
+ className: a,
2459
2464
  children: o
2460
2465
  } = t, l = O(t, [
2461
2466
  "variant",
@@ -2470,17 +2475,17 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2470
2475
  "card__header",
2471
2476
  s && `card__header--${s}`,
2472
2477
  r && "card__header--sticky",
2473
- n
2478
+ a
2474
2479
  ),
2475
2480
  children: o
2476
2481
  })
2477
2482
  );
2478
- }, vi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__image", children: e }), gi = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: P("card__body__item", t), children: e }), yi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__body__subtitle", children: e }), Ci = ({ icon: e, children: t }) => /* @__PURE__ */ i.jsxs("div", { className: "card__header__title", children: [
2483
+ }, mi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__image", children: e }), vi = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: P("card__body__item", t), children: e }), yi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__body__subtitle", children: e }), gi = ({ icon: e, children: t }) => /* @__PURE__ */ i.jsxs("div", { className: "card__header__title", children: [
2479
2484
  e && /* @__PURE__ */ i.jsx("span", { className: "card__header__title__icon", children: e }),
2480
2485
  t
2481
- ] }), Ns = d.forwardRef(
2486
+ ] }), Ss = d.forwardRef(
2482
2487
  (e, t) => {
2483
- var s = e, { type: r, children: n, className: o, variant: l = "default", disabled: c = !1 } = s, f = O(s, ["type", "children", "className", "variant", "disabled"]);
2488
+ var s = e, { type: r, children: a, className: o, variant: l = "default", disabled: c = !1 } = s, m = O(s, ["type", "children", "className", "variant", "disabled"]);
2484
2489
  return d.createElement(
2485
2490
  r,
2486
2491
  j({
@@ -2491,48 +2496,48 @@ var Qr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2491
2496
  o
2492
2497
  ),
2493
2498
  ref: t
2494
- }, f),
2495
- n
2499
+ }, m),
2500
+ a
2496
2501
  );
2497
2502
  }
2498
2503
  );
2499
- Ns.displayName = "Card";
2500
- Object.assign(Ns, {
2501
- Header: mi,
2502
- Action: Qr,
2503
- Title: Ci,
2504
+ Ss.displayName = "Card";
2505
+ Object.assign(Ss, {
2506
+ Header: pi,
2507
+ Action: Ur,
2508
+ Title: gi,
2504
2509
  Subtitle: yi,
2505
- Body: Hr,
2506
- Image: vi,
2507
- Item: gi,
2508
- Footer: pi,
2509
- EmptyState: fi
2510
+ Body: Qr,
2511
+ Image: mi,
2512
+ Item: vi,
2513
+ Footer: fi,
2514
+ EmptyState: hi
2510
2515
  });
2511
- var xi = (e) => {
2512
- var t = e, { className: s, children: r } = t, n = O(t, ["className", "children"]);
2513
- return /* @__PURE__ */ i.jsx("div", A(j({ className: P("checkbox__content", s) }, n), { children: r }));
2514
- }, bi = (e) => {
2515
- var t = e, { className: s, children: r } = t, n = O(t, ["className", "children"]);
2516
- return /* @__PURE__ */ i.jsx("span", A(j({ className: P("checkbox__hint", s) }, n), { children: r }));
2517
- }, Ms = d.createContext(void 0), wi = ({ id: e, name: t, children: s }) => /* @__PURE__ */ i.jsx(Ms.Provider, { value: { id: e, name: t }, children: s }), ji = () => {
2518
- const e = d.useContext(Ms);
2516
+ var Ci = (e) => {
2517
+ var t = e, { className: s, children: r } = t, a = O(t, ["className", "children"]);
2518
+ return /* @__PURE__ */ i.jsx("div", A(j({ className: P("checkbox__content", s) }, a), { children: r }));
2519
+ }, xi = (e) => {
2520
+ var t = e, { className: s, children: r } = t, a = O(t, ["className", "children"]);
2521
+ return /* @__PURE__ */ i.jsx("span", A(j({ className: P("checkbox__hint", s) }, a), { children: r }));
2522
+ }, As = d.createContext(void 0), bi = ({ id: e, name: t, children: s }) => /* @__PURE__ */ i.jsx(As.Provider, { value: { id: e, name: t }, children: s }), wi = () => {
2523
+ const e = d.useContext(As);
2519
2524
  if (!e)
2520
2525
  throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
2521
2526
  return e;
2522
- }, _i = (e) => {
2523
- var t = e, { className: s, children: r } = t, n = O(t, ["className", "children"]);
2524
- const { id: o } = ji();
2525
- return /* @__PURE__ */ i.jsx("label", A(j({ htmlFor: o, className: P("checkbox__label", s) }, n), { children: r }));
2526
- }, _e = (e) => {
2527
+ }, ji = (e) => {
2528
+ var t = e, { className: s, children: r } = t, a = O(t, ["className", "children"]);
2529
+ const { id: o } = wi();
2530
+ return /* @__PURE__ */ i.jsx("label", A(j({ htmlFor: o, className: P("checkbox__label", s) }, a), { children: r }));
2531
+ }, je = (e) => {
2527
2532
  var t = e, {
2528
2533
  id: s,
2529
2534
  name: r,
2530
- isPending: n = !1,
2535
+ isPending: a = !1,
2531
2536
  variant: o = "neutral",
2532
2537
  hasError: l = !1,
2533
2538
  single: c,
2534
- className: f,
2535
- children: y
2539
+ className: m,
2540
+ children: C
2536
2541
  } = t, u = O(t, [
2537
2542
  "id",
2538
2543
  "name",
@@ -2543,10 +2548,10 @@ var xi = (e) => {
2543
2548
  "className",
2544
2549
  "children"
2545
2550
  ]);
2546
- const x = d.useRef(null);
2551
+ const b = d.useRef(null);
2547
2552
  return d.useEffect(() => {
2548
- x.current && (n ? x.current.indeterminate = !0 : x.current.indeterminate = !1);
2549
- }, [n]), /* @__PURE__ */ i.jsxs(
2553
+ b.current && (a ? b.current.indeterminate = !0 : b.current.indeterminate = !1);
2554
+ }, [a]), /* @__PURE__ */ i.jsxs(
2550
2555
  "div",
2551
2556
  {
2552
2557
  className: P("checkbox", o && `checkbox--${o}`, l && "checkbox--error"),
@@ -2557,84 +2562,84 @@ var xi = (e) => {
2557
2562
  id: s,
2558
2563
  name: r,
2559
2564
  type: "checkbox",
2560
- ref: x,
2561
- className: P("checkbox__input", f),
2565
+ ref: b,
2566
+ className: P("checkbox__input", m),
2562
2567
  value: c ? "true" : ""
2563
2568
  }, u)
2564
2569
  ),
2565
- n ? /* @__PURE__ */ i.jsx(ri, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx(Gr, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2566
- /* @__PURE__ */ i.jsx(wi, { id: s, name: r, children: y })
2570
+ a ? /* @__PURE__ */ i.jsx(si, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx(Kr, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2571
+ /* @__PURE__ */ i.jsx(bi, { id: s, name: r, children: C })
2567
2572
  ]
2568
2573
  }
2569
2574
  );
2570
2575
  };
2571
- _e.Content = xi;
2572
- _e.Label = _i;
2573
- _e.Hint = bi;
2574
- _e.Error = Error;
2575
- var Ei = (e) => {
2576
- var t = e, { type: s = "div", className: r, children: n } = t, o = O(t, ["type", "className", "children"]);
2577
- return d.createElement(s, j({ className: P("dialog__body", r) }, o), n);
2578
- }, Dt = () => document.body.style.removeProperty("overflow"), Bt = (e) => e.preventDefault(), Ai = 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])', Si = (e) => {
2579
- var t = e, { className: s, children: r, shouldAnimate: n = !0 } = t, o = O(t, ["className", "children", "shouldAnimate"]);
2580
- const { ref: l, defaultOpen: c, isModal: f, onClose: y } = ot();
2576
+ je.Content = Ci;
2577
+ je.Label = ji;
2578
+ je.Hint = xi;
2579
+ je.Error = Error;
2580
+ var _i = (e) => {
2581
+ var t = e, { type: s = "div", className: r, children: a } = t, o = O(t, ["type", "className", "children"]);
2582
+ return d.createElement(s, j({ className: P("dialog__body", r) }, o), a);
2583
+ }, Lt = () => document.body.style.removeProperty("overflow"), Yt = (e) => e.preventDefault(), Ei = 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])', Si = (e) => {
2584
+ var t = e, { className: s, children: r, shouldAnimate: a = !0 } = t, o = O(t, ["className", "children", "shouldAnimate"]);
2585
+ const { ref: l, defaultOpen: c, isModal: m, onClose: C } = nt();
2581
2586
  return d.useEffect(() => {
2582
2587
  const u = l == null ? void 0 : l.current;
2583
2588
  if (u != null && u.open) {
2584
- const x = u.querySelectorAll(Ai), g = x[0], p = x[x.length - 1], w = (_) => {
2585
- if (!(_.key === "Tab"))
2589
+ const b = u.querySelectorAll(Ei), v = b[0], f = b[b.length - 1], w = (E) => {
2590
+ if (!(E.key === "Tab"))
2586
2591
  return;
2587
- _.shiftKey ? document.activeElement === g && (p.focus(), _.preventDefault()) : document.activeElement === p && (g.focus(), _.preventDefault());
2592
+ E.shiftKey ? document.activeElement === v && (f.focus(), E.preventDefault()) : document.activeElement === f && (v.focus(), E.preventDefault());
2588
2593
  };
2589
- return document.body.style.overflow = "hidden", u.addEventListener("keydown", w), window.addEventListener("popstate", () => Dt()), () => {
2590
- u.removeEventListener("keydown", w), window.removeEventListener("popstate", () => Dt());
2594
+ return document.body.style.overflow = "hidden", u.addEventListener("keydown", w), window.addEventListener("popstate", () => Lt()), () => {
2595
+ u.removeEventListener("keydown", w), window.removeEventListener("popstate", () => Lt());
2591
2596
  };
2592
2597
  }
2593
2598
  }, [l]), d.useEffect(() => {
2594
2599
  const u = l == null ? void 0 : l.current;
2595
2600
  if (!u)
2596
2601
  return;
2597
- if (c && (u.removeAttribute("open"), u.showModal(), u.focus()), f)
2598
- return u.addEventListener("cancel", Bt), () => u.removeEventListener("cancel", Bt);
2599
- const x = ({ clientX: g, clientY: p }) => {
2600
- const { top: w, right: _, bottom: v, left: C } = u.getBoundingClientRect(), S = 0 < p && 0 < g, E = w < p && p < v, k = C < g && g < _;
2601
- S && !(E && k) && y();
2602
+ if (c && (u.removeAttribute("open"), u.showModal(), u.focus()), m)
2603
+ return u.addEventListener("cancel", Yt), () => u.removeEventListener("cancel", Yt);
2604
+ const b = ({ clientX: v, clientY: f }) => {
2605
+ const { top: w, right: E, bottom: y, left: g } = u.getBoundingClientRect(), S = 0 < f && 0 < v, _ = w < f && f < y, k = g < v && v < E;
2606
+ S && !(_ && k) && C();
2602
2607
  };
2603
- return u.addEventListener("cancel", y), u.addEventListener("mousedown", x), () => {
2604
- u.removeEventListener("cancel", y), u.removeEventListener("mousedown", x);
2608
+ return u.addEventListener("cancel", C), u.addEventListener("mousedown", b), () => {
2609
+ u.removeEventListener("cancel", C), u.removeEventListener("mousedown", b);
2605
2610
  };
2606
- }, [l, f, y, c]), /* @__PURE__ */ i.jsx(
2611
+ }, [l, m, C, c]), /* @__PURE__ */ i.jsx(
2607
2612
  "dialog",
2608
2613
  A(j({
2609
2614
  ref: l,
2610
2615
  open: c,
2611
- "aria-modal": !!f,
2616
+ "aria-modal": !!m,
2612
2617
  "aria-labelledby": "dialogTitle",
2613
- className: P("dialog", n && "dialog--animated", s)
2618
+ className: P("dialog", a && "dialog--animated", s)
2614
2619
  }, o), {
2615
2620
  children: r
2616
2621
  })
2617
2622
  );
2618
- }, Os = d.createContext(void 0), ki = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
2619
- const n = d.useRef(null), o = d.useRef(t), l = d.useCallback(() => {
2623
+ }, Ps = d.createContext(void 0), Ai = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
2624
+ const a = d.useRef(null), o = d.useRef(t), l = d.useCallback(() => {
2620
2625
  var c;
2621
- Dt(), (c = n.current) == null || c.close(), o.current && (o == null || o.current());
2622
- }, [n]);
2623
- return /* @__PURE__ */ i.jsx(Os.Provider, { value: { ref: n, defaultOpen: e, isModal: s, onClose: l }, children: r });
2624
- }, ot = () => {
2625
- const e = d.useContext(Os);
2626
+ Lt(), (c = a.current) == null || c.close(), o.current && (o == null || o.current());
2627
+ }, [a]);
2628
+ return /* @__PURE__ */ i.jsx(Ps.Provider, { value: { ref: a, defaultOpen: e, isModal: s, onClose: l }, children: r });
2629
+ }, nt = () => {
2630
+ const e = d.useContext(Ps);
2626
2631
  if (!e)
2627
2632
  throw new Error("Dialog compound components can not be rendered outside of Dialog");
2628
2633
  return e;
2629
2634
  }, Pi = (e) => {
2630
2635
  var t = e, { children: s } = t, r = O(t, ["children"]);
2631
- const { onClose: n } = ot();
2632
- return /* @__PURE__ */ i.jsx(at, A(j({ onClick: n }, r), { children: s }));
2633
- }, Ls = d.forwardRef((e, t) => {
2634
- var s = e, { className: r } = s, n = O(s, ["className"]);
2635
- const { onClose: o } = ot();
2636
+ const { onClose: a } = nt();
2637
+ return /* @__PURE__ */ i.jsx(it, A(j({ onClick: a }, r), { children: s }));
2638
+ }, Ns = d.forwardRef((e, t) => {
2639
+ var s = e, { className: r } = s, a = O(s, ["className"]);
2640
+ const { onClose: o } = nt();
2636
2641
  return /* @__PURE__ */ i.jsx(
2637
- at,
2642
+ it,
2638
2643
  j({
2639
2644
  type: "submit",
2640
2645
  ref: t,
@@ -2643,16 +2648,16 @@ var Ei = (e) => {
2643
2648
  iconLeft: /* @__PURE__ */ i.jsx(Vr, {}),
2644
2649
  variant: "icon--secondary",
2645
2650
  className: P("dialog__close button--icon", r)
2646
- }, n)
2651
+ }, a)
2647
2652
  );
2648
2653
  });
2649
- Ls.displayName = "Close";
2654
+ Ns.displayName = "Close";
2650
2655
  var Ni = (e) => {
2651
- var t = e, { className: s, children: r } = t, n = O(t, ["className", "children"]);
2652
- return /* @__PURE__ */ i.jsx("div", A(j({ className: P("dialog__footer", s) }, n), { children: r }));
2653
- }, Mi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "dialog__header", children: e }), Oi = (e) => {
2654
- var t = e, { icon: s, children: r, className: n } = t, o = O(t, ["icon", "children", "className"]);
2655
- const { ref: l } = ot(), c = d.useRef(null);
2656
+ var t = e, { className: s, children: r } = t, a = O(t, ["className", "children"]);
2657
+ return /* @__PURE__ */ i.jsx("div", A(j({ className: P("dialog__footer", s) }, a), { children: r }));
2658
+ }, ki = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "dialog__header", children: e }), Mi = (e) => {
2659
+ var t = e, { icon: s, children: r, className: a } = t, o = O(t, ["icon", "children", "className"]);
2660
+ const { ref: l } = nt(), c = d.useRef(null);
2656
2661
  return d.useEffect(() => {
2657
2662
  l != null && l.current && l.current.focus();
2658
2663
  }, [l]), /* @__PURE__ */ i.jsxs(
@@ -2661,7 +2666,7 @@ var Ni = (e) => {
2661
2666
  tabIndex: 0,
2662
2667
  ref: c,
2663
2668
  id: "dialogTitle",
2664
- className: P("dialog__header__title", n)
2669
+ className: P("dialog__header__title", a)
2665
2670
  }, o), {
2666
2671
  children: [
2667
2672
  s && /* @__PURE__ */ i.jsx("span", { className: "dialog__header__icon", children: s }),
@@ -2669,96 +2674,96 @@ var Ni = (e) => {
2669
2674
  ]
2670
2675
  })
2671
2676
  );
2672
- }, Li = (e) => {
2677
+ }, Oi = (e) => {
2673
2678
  var t = e, { children: s } = t, r = O(t, ["children"]);
2674
- const { ref: n } = ot();
2675
- return /* @__PURE__ */ i.jsx(at, A(j({ onClick: () => {
2679
+ const { ref: a } = nt();
2680
+ return /* @__PURE__ */ i.jsx(it, A(j({ onClick: () => {
2676
2681
  var o;
2677
- return (o = n == null ? void 0 : n.current) == null ? void 0 : o.showModal();
2682
+ return (o = a == null ? void 0 : a.current) == null ? void 0 : o.showModal();
2678
2683
  } }, r), { children: s }));
2679
- }, H = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ i.jsx(ki, { defaultOpen: !!e, isModal: t, onClose: r, children: s });
2680
- H.Trigger = Li;
2684
+ }, H = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ i.jsx(Ai, { defaultOpen: !!e, isModal: t, onClose: r, children: s });
2685
+ H.Trigger = Oi;
2681
2686
  H.Root = Si;
2682
- H.Title = Oi;
2683
- H.Header = Mi;
2684
- H.Body = Ei;
2687
+ H.Title = Mi;
2688
+ H.Header = ki;
2689
+ H.Body = _i;
2685
2690
  H.Footer = Ni;
2686
2691
  H.Button = Pi;
2687
- H.Close = Ls;
2688
- var Fs = d.createContext(void 0), Fi = ({
2692
+ H.Close = Ns;
2693
+ var ks = d.createContext(void 0), Li = ({
2689
2694
  id: e,
2690
2695
  position: t,
2691
2696
  isOpen: s,
2692
2697
  setIsOpen: r,
2693
- activeItemIndex: n,
2698
+ activeItemIndex: a,
2694
2699
  setActiveItemIndex: o,
2695
2700
  clearActiveItemIndex: l,
2696
2701
  triggerRef: c,
2697
- contentRef: f,
2698
- children: y
2702
+ contentRef: m,
2703
+ children: C
2699
2704
  }) => /* @__PURE__ */ i.jsx(
2700
- Fs.Provider,
2705
+ ks.Provider,
2701
2706
  {
2702
2707
  value: {
2703
2708
  id: e,
2704
2709
  position: t,
2705
2710
  isOpen: s,
2706
2711
  setIsOpen: r,
2707
- activeItemIndex: n,
2712
+ activeItemIndex: a,
2708
2713
  setActiveItemIndex: o,
2709
2714
  clearActiveItemIndex: l,
2710
2715
  triggerRef: c,
2711
- contentRef: f
2716
+ contentRef: m
2712
2717
  },
2713
- children: y
2718
+ children: C
2714
2719
  }
2715
- ), Rs = () => {
2716
- const e = d.useContext(Fs);
2720
+ ), Ms = () => {
2721
+ const e = d.useContext(ks);
2717
2722
  if (e === void 0)
2718
2723
  throw new Error("useMenu must be used within a MenuProvider");
2719
2724
  return e;
2720
- }, Ri = ({ as: e, children: t }) => {
2725
+ }, Fi = ({ as: e, children: t }) => {
2721
2726
  const {
2722
2727
  id: s,
2723
2728
  position: r,
2724
- isOpen: n,
2729
+ isOpen: a,
2725
2730
  setIsOpen: o,
2726
2731
  activeItemIndex: l,
2727
2732
  setActiveItemIndex: c,
2728
- clearActiveItemIndex: f,
2729
- triggerRef: y,
2733
+ clearActiveItemIndex: m,
2734
+ triggerRef: C,
2730
2735
  contentRef: u
2731
- } = Rs(), x = (g) => {
2732
- var p;
2733
- if (!n)
2736
+ } = Ms(), b = (v) => {
2737
+ var f;
2738
+ if (!a)
2734
2739
  return;
2735
- if (g.key === "Escape")
2736
- return f(), o(!1), (p = y.current) == null ? void 0 : p.focus();
2737
- const w = g.shiftKey, _ = Ts(u.current).length - 1;
2738
- switch (g.key) {
2740
+ if (v.key === "Escape")
2741
+ return m(), o(!1), (f = C.current) == null ? void 0 : f.focus();
2742
+ const w = v.shiftKey, E = Ls(u.current).length - 1;
2743
+ switch (v.key) {
2739
2744
  case "Tab": {
2740
2745
  if (w && l !== 0)
2741
- return g.preventDefault(), c(l ? Math.max(0, l - 1) : 0);
2742
- if (!w && l !== _) {
2743
- g.preventDefault();
2744
- const v = l !== void 0 ? l + 1 : 0;
2745
- return c(Math.min(_, v));
2746
+ return v.preventDefault(), c(l ? Math.max(0, l - 1) : 0);
2747
+ if (!w && l !== E) {
2748
+ v.preventDefault();
2749
+ const y = l !== void 0 ? l + 1 : 0;
2750
+ return c(Math.min(E, y));
2746
2751
  }
2747
2752
  break;
2748
2753
  }
2749
2754
  case "ArrowUp":
2750
2755
  case "ArrowLeft":
2751
- return g.preventDefault(), c(l ? Math.max(0, l - 1) : 0);
2756
+ return v.preventDefault(), c(l ? Math.max(0, l - 1) : 0);
2752
2757
  case "ArrowDown":
2753
2758
  case "ArrowRight": {
2754
- g.preventDefault();
2755
- const v = l !== void 0 ? l + 1 : 0;
2756
- return c(Math.min(_, v));
2759
+ v.preventDefault();
2760
+ const y = l !== void 0 ? l + 1 : 0;
2761
+ return c(Math.min(E, y));
2757
2762
  }
2758
2763
  case "Home":
2759
- return g.preventDefault(), c(0);
2764
+ return v.preventDefault(), c(0);
2760
2765
  case "End":
2761
- return g.preventDefault(), c(_);
2766
+ return v.preventDefault(), c(E);
2762
2767
  }
2763
2768
  };
2764
2769
  return e ? d.createElement(
@@ -2766,8 +2771,8 @@ var Fs = d.createContext(void 0), Fi = ({
2766
2771
  {
2767
2772
  id: `${s}-content`,
2768
2773
  ref: u,
2769
- className: P("menu__list", `menu__list--${r}`, n && "menu__list--active"),
2770
- onKeyDown: x
2774
+ className: P("menu__list", `menu__list--${r}`, a && "menu__list--active"),
2775
+ onKeyDown: b
2771
2776
  },
2772
2777
  t
2773
2778
  ) : (
@@ -2777,22 +2782,22 @@ var Fs = d.createContext(void 0), Fi = ({
2777
2782
  {
2778
2783
  id: `${s}-content`,
2779
2784
  ref: u,
2780
- className: P("menu__list", `menu__list--${r}`, n && "menu__list--active"),
2781
- onKeyDown: x,
2785
+ className: P("menu__list", `menu__list--${r}`, a && "menu__list--active"),
2786
+ onKeyDown: b,
2782
2787
  children: t
2783
2788
  }
2784
2789
  )
2785
2790
  );
2786
- }, Di = (e) => {
2787
- var t = e, { children: s, className: r } = t, n = O(t, ["children", "className"]);
2788
- return /* @__PURE__ */ i.jsx("li", A(j({}, n), { className: P("menu__list-item", r), children: s }));
2789
- }, Ds = ({ children: e, className: t }) => {
2790
- const { id: s, isOpen: r, setIsOpen: n, clearActiveItemIndex: o, setActiveItemIndex: l, triggerRef: c } = Rs(), f = () => {
2791
- o(), n((u) => !u), r || l(0);
2792
- }, y = (u) => {
2791
+ }, Ri = (e) => {
2792
+ var t = e, { children: s, className: r } = t, a = O(t, ["children", "className"]);
2793
+ return /* @__PURE__ */ i.jsx("li", A(j({}, a), { className: P("menu__list-item", r), children: s }));
2794
+ }, Os = ({ children: e, className: t }) => {
2795
+ const { id: s, isOpen: r, setIsOpen: a, clearActiveItemIndex: o, setActiveItemIndex: l, triggerRef: c } = Ms(), m = () => {
2796
+ o(), a((u) => !u), r || l(0);
2797
+ }, C = (u) => {
2793
2798
  if (r) {
2794
2799
  if (u.key === "Escape")
2795
- return o(), n(!1);
2800
+ return o(), a(!1);
2796
2801
  u.key === "ArrowDown" && (u.preventDefault(), l(0));
2797
2802
  }
2798
2803
  };
@@ -2800,40 +2805,40 @@ var Fs = d.createContext(void 0), Fi = ({
2800
2805
  id: `${s}-trigger`,
2801
2806
  ref: c,
2802
2807
  className: P("menu__trigger", t),
2803
- onClick: f,
2804
- onKeyDown: y,
2808
+ onClick: m,
2809
+ onKeyDown: C,
2805
2810
  "aria-expanded": r,
2806
2811
  "aria-controls": `${s}-content`
2807
2812
  });
2808
2813
  };
2809
- Ds.displayName = "Trigger";
2810
- var Ts = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsByTagName("ul")).reduce((s, r) => [...s, ...Array.from(r.getElementsByTagName("li"))], []) : [], Y = (e) => {
2811
- var t = e, { type: s, id: r, position: n = "right", children: o, className: l } = t, c = O(t, ["type", "id", "position", "children", "className"]);
2812
- const f = d.useRef(null), y = d.useRef(null), u = d.useRef(null), [x, g] = d.useState(!1), [p, w] = d.useState(), [_, v] = d.useState(p);
2813
- p !== _ && p !== void 0 && u.current && (Ts(u.current)[p].firstChild.focus(), v(p));
2814
- const C = () => {
2815
- w(void 0), v(void 0);
2816
- }, S = (E) => {
2814
+ Os.displayName = "Trigger";
2815
+ var Ls = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsByTagName("ul")).reduce((s, r) => [...s, ...Array.from(r.getElementsByTagName("li"))], []) : [], Y = (e) => {
2816
+ var t = e, { type: s, id: r, position: a = "right", children: o, className: l } = t, c = O(t, ["type", "id", "position", "children", "className"]);
2817
+ const m = d.useRef(null), C = d.useRef(null), u = d.useRef(null), [b, v] = d.useState(!1), [f, w] = d.useState(), [E, y] = d.useState(f);
2818
+ f !== E && f !== void 0 && u.current && (Ls(u.current)[f].firstChild.focus(), y(f));
2819
+ const g = () => {
2820
+ w(void 0), y(void 0);
2821
+ }, S = (_) => {
2817
2822
  var k;
2818
- ((k = f.current) == null ? void 0 : k.contains(E.relatedTarget)) || (C(), g(!1));
2823
+ ((k = m.current) == null ? void 0 : k.contains(_.relatedTarget)) || (g(), v(!1));
2819
2824
  };
2820
2825
  return /* @__PURE__ */ i.jsx(
2821
- Fi,
2826
+ Li,
2822
2827
  {
2823
2828
  id: r,
2824
- position: n,
2825
- isOpen: x,
2826
- setIsOpen: g,
2827
- activeItemIndex: p,
2829
+ position: a,
2830
+ isOpen: b,
2831
+ setIsOpen: v,
2832
+ activeItemIndex: f,
2828
2833
  setActiveItemIndex: w,
2829
- clearActiveItemIndex: C,
2830
- triggerRef: y,
2834
+ clearActiveItemIndex: g,
2835
+ triggerRef: C,
2831
2836
  contentRef: u,
2832
2837
  children: d.createElement(
2833
2838
  s,
2834
2839
  A(j({}, c), {
2835
2840
  id: r,
2836
- ref: f,
2841
+ ref: m,
2837
2842
  className: `menu ${l || ""}`,
2838
2843
  onBlur: S
2839
2844
  }),
@@ -2842,29 +2847,29 @@ var Ts = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsBy
2842
2847
  }
2843
2848
  );
2844
2849
  };
2845
- Y.Trigger = Ds;
2846
- Y.Content = Ri;
2847
- Y.Item = Di;
2850
+ Y.Trigger = Os;
2851
+ Y.Content = Fi;
2852
+ Y.Item = Ri;
2848
2853
  d.createContext(void 0);
2849
- var Ti = (/* @__PURE__ */ new Map()).set("BE", "32").set("FR", "33").set("NL", "31").set("LU", "352").set("DE", "49").set("CA", "1").set("PR", "1").set("TC", "1").set("US", "1").set("BS", "1242").set("BB", "1246").set("AI", "1264").set("AG", "1268").set("KY", "1345").set("BM", "1441").set("GD", "1473").set("MS", "1664").set("GU", "1671").set("LC", "1758").set("DM", "1767").set("VC", "1784").set("DO", "1809").set("TT", "1868").set("KN", "1869").set("JM", "1876").set("EG", "20").set("SS", "211").set("MA", "212").set("DZ", "213").set("TN", "216").set("LY", "218").set("GM", "220").set("SN", "221").set("MR", "222").set("ML", "223").set("GN", "224").set("CI", "225").set("BF", "226").set("NE", "227").set("TG", "228").set("BJ", "229").set("MU", "230").set("LR", "231").set("SL", "232").set("GH", "233").set("NG", "234").set("TD", "235").set("CF", "236").set("CM", "237").set("CV", "238").set("ST", "239").set("GQ", "240").set("GA", "241").set("CG", "242").set("CD", "243").set("AO", "244").set("GW", "245").set("SC", "248").set("SD", "249").set("RW", "250").set("ET", "251").set("SO", "252").set("DJ", "253").set("KE", "254").set("TZ", "255").set("UG", "256").set("BI", "257").set("MZ", "258").set("ZM", "260").set("MG", "261").set("RE", "262").set("ZW", "263").set("NA", "264").set("MW", "265").set("LS", "266").set("BW", "267").set("SZ", "268").set("KM", "269").set("ZA", "27").set("VG", "284").set("ER", "291").set("AW", "297").set("FO", "298").set("GL", "299").set("GR", "30").set("ES", "34").set("GI", "350").set("PT", "351").set("IE", "353").set("IS", "354").set("AL", "355").set("MT", "356").set("CY", "357").set("FI", "358").set("BG", "359").set("HU", "36").set("LT", "370").set("LV", "371").set("EE", "372").set("MD", "373").set("AM", "374").set("BY", "375").set("AD", "376").set("MC", "377").set("SM", "378").set("UA", "380").set("RS", "381").set("ME", "382").set("HR", "385").set("SI", "386").set("BA", "387").set("MK", "389").set("IT", "39").set("RO", "40").set("CH", "41").set("CZ", "420").set("SK", "421").set("LI", "423").set("AT", "43").set("GB", "44").set("DK", "45").set("SE", "46").set("NO", "47").set("PL", "48").set("FK", "500").set("BZ", "501").set("GT", "502").set("SV", "503").set("HN", "504").set("NI", "505").set("CR", "506").set("PA", "507").set("PM", "508").set("HT", "509").set("PE", "51").set("MX", "52").set("CU", "53").set("AR", "54").set("BR", "55").set("CL", "56").set("CO", "57").set("VE", "58").set("GP", "590").set("BO", "591").set("GY", "592").set("EC", "593").set("FG", "594").set("PY", "595").set("MQ", "596").set("SR", "597").set("UY", "598").set("CW", "599").set("AN", "599").set("MY", "60").set("AU", "61").set("ID", "62").set("PH", "63").set("NZ", "64").set("SG", "65").set("TH", "66").set("TP", "670").set("BN", "673").set("PG", "675").set("TO", "676").set("SB", "677").set("VU", "678").set("FJ", "679").set("PW", "680").set("CK", "682").set("NU", "683").set("AS", "684").set("WS", "685").set("KI", "686").set("NC", "687").set("TV", "688").set("PF", "689").set("FM", "691").set("KZ", "7").set("RU", "7").set("JP", "81").set("KR", "82").set("VN", "84").set("KP", "850").set("HK", "852").set("MO", "853").set("KH", "855").set("LA", "856").set("CN", "86").set("BD", "880").set("TW", "886").set("TR", "90").set("IN", "91").set("PK", "92").set("AF", "93").set("LK", "94").set("MM", "95").set("MV", "960").set("LB", "961").set("JO", "962").set("SY", "963").set("IQ", "964").set("KW", "965").set("SA", "966").set("YE", "967").set("OM", "968").set("PS", "970").set("AE", "971").set("IL", "972").set("BH", "973").set("QA", "974").set("BT", "975").set("MN", "976").set("NP", "977").set("IR", "98").set("TK", "992").set("TM", "993").set("AZ", "994").set("GE", "995").set("KG", "996").set("UZ", "998");
2850
- [...new Set(Ti.values())].map((e) => ({
2854
+ var Di = (/* @__PURE__ */ new Map()).set("BE", "32").set("FR", "33").set("NL", "31").set("LU", "352").set("DE", "49").set("CA", "1").set("PR", "1").set("TC", "1").set("US", "1").set("BS", "1242").set("BB", "1246").set("AI", "1264").set("AG", "1268").set("KY", "1345").set("BM", "1441").set("GD", "1473").set("MS", "1664").set("GU", "1671").set("LC", "1758").set("DM", "1767").set("VC", "1784").set("DO", "1809").set("TT", "1868").set("KN", "1869").set("JM", "1876").set("EG", "20").set("SS", "211").set("MA", "212").set("DZ", "213").set("TN", "216").set("LY", "218").set("GM", "220").set("SN", "221").set("MR", "222").set("ML", "223").set("GN", "224").set("CI", "225").set("BF", "226").set("NE", "227").set("TG", "228").set("BJ", "229").set("MU", "230").set("LR", "231").set("SL", "232").set("GH", "233").set("NG", "234").set("TD", "235").set("CF", "236").set("CM", "237").set("CV", "238").set("ST", "239").set("GQ", "240").set("GA", "241").set("CG", "242").set("CD", "243").set("AO", "244").set("GW", "245").set("SC", "248").set("SD", "249").set("RW", "250").set("ET", "251").set("SO", "252").set("DJ", "253").set("KE", "254").set("TZ", "255").set("UG", "256").set("BI", "257").set("MZ", "258").set("ZM", "260").set("MG", "261").set("RE", "262").set("ZW", "263").set("NA", "264").set("MW", "265").set("LS", "266").set("BW", "267").set("SZ", "268").set("KM", "269").set("ZA", "27").set("VG", "284").set("ER", "291").set("AW", "297").set("FO", "298").set("GL", "299").set("GR", "30").set("ES", "34").set("GI", "350").set("PT", "351").set("IE", "353").set("IS", "354").set("AL", "355").set("MT", "356").set("CY", "357").set("FI", "358").set("BG", "359").set("HU", "36").set("LT", "370").set("LV", "371").set("EE", "372").set("MD", "373").set("AM", "374").set("BY", "375").set("AD", "376").set("MC", "377").set("SM", "378").set("UA", "380").set("RS", "381").set("ME", "382").set("HR", "385").set("SI", "386").set("BA", "387").set("MK", "389").set("IT", "39").set("RO", "40").set("CH", "41").set("CZ", "420").set("SK", "421").set("LI", "423").set("AT", "43").set("GB", "44").set("DK", "45").set("SE", "46").set("NO", "47").set("PL", "48").set("FK", "500").set("BZ", "501").set("GT", "502").set("SV", "503").set("HN", "504").set("NI", "505").set("CR", "506").set("PA", "507").set("PM", "508").set("HT", "509").set("PE", "51").set("MX", "52").set("CU", "53").set("AR", "54").set("BR", "55").set("CL", "56").set("CO", "57").set("VE", "58").set("GP", "590").set("BO", "591").set("GY", "592").set("EC", "593").set("FG", "594").set("PY", "595").set("MQ", "596").set("SR", "597").set("UY", "598").set("CW", "599").set("AN", "599").set("MY", "60").set("AU", "61").set("ID", "62").set("PH", "63").set("NZ", "64").set("SG", "65").set("TH", "66").set("TP", "670").set("BN", "673").set("PG", "675").set("TO", "676").set("SB", "677").set("VU", "678").set("FJ", "679").set("PW", "680").set("CK", "682").set("NU", "683").set("AS", "684").set("WS", "685").set("KI", "686").set("NC", "687").set("TV", "688").set("PF", "689").set("FM", "691").set("KZ", "7").set("RU", "7").set("JP", "81").set("KR", "82").set("VN", "84").set("KP", "850").set("HK", "852").set("MO", "853").set("KH", "855").set("LA", "856").set("CN", "86").set("BD", "880").set("TW", "886").set("TR", "90").set("IN", "91").set("PK", "92").set("AF", "93").set("LK", "94").set("MM", "95").set("MV", "960").set("LB", "961").set("JO", "962").set("SY", "963").set("IQ", "964").set("KW", "965").set("SA", "966").set("YE", "967").set("OM", "968").set("PS", "970").set("AE", "971").set("IL", "972").set("BH", "973").set("QA", "974").set("BT", "975").set("MN", "976").set("NP", "977").set("IR", "98").set("TK", "992").set("TM", "993").set("AZ", "994").set("GE", "995").set("KG", "996").set("UZ", "998");
2855
+ [...new Set(Di.values())].map((e) => ({
2851
2856
  label: `+${e}`,
2852
2857
  value: e
2853
2858
  }));
2854
2859
  d.createContext(void 0);
2855
2860
  d.createContext(void 0);
2856
- var gt = /* @__PURE__ */ ((e) => (e[e.categoriesVegetables = 0] = "categoriesVegetables", e[e.categoriesMeat = 1] = "categoriesMeat", e[e.categoriesFish = 2] = "categoriesFish", e[e.categoriesDairy = 3] = "categoriesDairy", e[e.categoriesBreakfast = 4] = "categoriesBreakfast", e[e.categoriesSnacks = 5] = "categoriesSnacks", e[e.categoriesCandy = 6] = "categoriesCandy", e[e.categoriesNonFood = 7] = "categoriesNonFood", e[e.categoriesDryFood = 8] = "categoriesDryFood", e[e.categoriesTins = 9] = "categoriesTins", e[e.categoriesGrid = 10] = "categoriesGrid", e[e.categoriesSoda = 11] = "categoriesSoda", e[e.categoriesBakery = 12] = "categoriesBakery", e[e.categoriesWine = 13] = "categoriesWine", e[e.categoriesBaby = 14] = "categoriesBaby", e[e.categoriesDiet = 15] = "categoriesDiet", e[e.categoriesHygiene = 16] = "categoriesHygiene", e[e.categoriesCleaning = 17] = "categoriesCleaning", e[e.categoriesPets = 18] = "categoriesPets", e[e.categoriesFreezer = 19] = "categoriesFreezer", e[e.categoriesBbq = 20] = "categoriesBbq", e[e.categoriesMealbox = 21] = "categoriesMealbox", e[e.categoriesBrik = 22] = "categoriesBrik", e[e.categoriesGranen = 23] = "categoriesGranen", e[e.categoriesConserve = 24] = "categoriesConserve", e[e.categoriesHome = 25] = "categoriesHome", e[e.categoriesEaster = 26] = "categoriesEaster", e[e.categoriesOnlinePromo = 27] = "categoriesOnlinePromo", e[e.categoriesSportFood = 28] = "categoriesSportFood", e[e.categoriesClothing = 29] = "categoriesClothing", e[e.categoriesEnergy = 30] = "categoriesEnergy", e[e.categoriesDeskAndTravel = 31] = "categoriesDeskAndTravel", e[e.categoriesCigarette = 32] = "categoriesCigarette", e[e.categoriesFood = 33] = "categoriesFood", e[e.categoriesChild = 34] = "categoriesChild", e[e.categoriesPuzzle = 35] = "categoriesPuzzle", e[e.categoriesToys = 36] = "categoriesToys", e[e.categoriesCar = 37] = "categoriesCar", e[e.categoriesPlaceholder = 38] = "categoriesPlaceholder", e[e.categoriesFuel = 39] = "categoriesFuel", e[e.categoriesCarAndBike = 40] = "categoriesCarAndBike", e[e.categoriesToyAndHobby = 41] = "categoriesToyAndHobby", e[e.categoriesMultimedia = 42] = "categoriesMultimedia", e[e.categoriesParty = 43] = "categoriesParty", e[e.toolsPay = 44] = "toolsPay", e[e.toolsReceipt = 45] = "toolsReceipt", e[e.toolsFuel = 46] = "toolsFuel", e[e.toolsStoreLocator = 47] = "toolsStoreLocator", e[e.toolsStats = 48] = "toolsStats", e[e.toolsShowXtraOld = 49] = "toolsShowXtraOld", e[e.toolsShowXtraNew = 50] = "toolsShowXtraNew", e[e.toolsScan2 = 51] = "toolsScan2", e[e.toolsRecipes2 = 52] = "toolsRecipes2", e[e.toolsWarranty = 53] = "toolsWarranty", e[e.toolsCoupons = 54] = "toolsCoupons", e[e.toolsFavoriteInactive = 55] = "toolsFavoriteInactive", e[e.toolsFavoriteActive = 56] = "toolsFavoriteActive", e[e.toolsAssortment = 57] = "toolsAssortment", e[e.toolsPromo = 58] = "toolsPromo", e[e.fuelCng = 59] = "fuelCng", e[e.fuelE5 = 60] = "fuelE5", e[e.fuelAdblue = 61] = "fuelAdblue", e[e.fuelB7 = 62] = "fuelB7", e[e.fuelH2 = 63] = "fuelH2", e[e.fuelE10 = 64] = "fuelE10", e[e.fuelFreeTireInflation = 65] = "fuelFreeTireInflation", e[e.functionalClose = 66] = "functionalClose", e[e.functionalBack = 67] = "functionalBack", e[e.functionalSearch = 68] = "functionalSearch", e[e.functionalEdit = 69] = "functionalEdit", e[e.functionalShare = 70] = "functionalShare", e[e.functionalLocation = 71] = "functionalLocation", e[e.functionalTrash = 72] = "functionalTrash", e[e.functionalCamera = 73] = "functionalCamera", e[e.functionalPhone = 74] = "functionalPhone", e[e.functionalPushNotifications = 75] = "functionalPushNotifications", e[e.functionalMail = 76] = "functionalMail", e[e.functionalGift = 77] = "functionalGift", e[e.functionalPresent = 78] = "functionalPresent", e[e.functionalLoading = 79] = "functionalLoading", e[e.functionalChevronRight = 80] = "functionalChevronRight", e[e.functionalCheck = 81] = "functionalCheck", e[e.functionalChevronDown = 82] = "functionalChevronDown", e[e.functionalChevronUp = 83] = "functionalChevronUp", e[e.functionalPlus = 84] = "functionalPlus", e[e.functionalReset = 85] = "functionalReset", e[e.functionalDownload = 86] = "functionalDownload", e[e.functionalExport = 87] = "functionalExport", e[e.functionalCustomerService = 88] = "functionalCustomerService", e[e.functionalTruck = 89] = "functionalTruck", e[e.functionalBox = 90] = "functionalBox", e[e.functionalEllipsis = 91] = "functionalEllipsis", e[e.functionalLocationHome = 92] = "functionalLocationHome", e[e.functionalLocationPickup = 93] = "functionalLocationPickup", e[e.functionalAccount = 94] = "functionalAccount", e[e.functionalPrivacy = 95] = "functionalPrivacy", e[e.functionalSettings = 96] = "functionalSettings", e[e.functionalUserInfo = 97] = "functionalUserInfo", e[e.functionalPinOutlines = 98] = "functionalPinOutlines", e[e.functionalCalendar = 99] = "functionalCalendar", e[e.functionalMinus = 100] = "functionalMinus", e[e.functionalLifestyle = 101] = "functionalLifestyle", e[e.functionalSms = 102] = "functionalSms", e[e.functionalSwitch = 103] = "functionalSwitch", e[e.functionalSorting = 104] = "functionalSorting", e[e.functionalWarningCircle = 105] = "functionalWarningCircle", e[e.functionalQuestionCircle = 106] = "functionalQuestionCircle", e[e.functionalErrorCircle = 107] = "functionalErrorCircle", e[e.functionalSuccessCircle = 108] = "functionalSuccessCircle", e[e.functionalMessage = 109] = "functionalMessage", e[e.functionalExternalLink = 110] = "functionalExternalLink", e[e.functionalAddToList = 111] = "functionalAddToList", e[e.functionalShoppingcart = 112] = "functionalShoppingcart", e[e.functionalFilter = 113] = "functionalFilter", e[e.functionalLocate = 114] = "functionalLocate", e[e.functionalBarcode = 115] = "functionalBarcode", e[e.functionalClock = 116] = "functionalClock", e[e.functionalHistory = 117] = "functionalHistory", e[e.functionalShops = 118] = "functionalShops", e[e.functionalAddUser = 119] = "functionalAddUser", e[e.functionalOther = 120] = "functionalOther", e[e.functionalInAppNotifications = 121] = "functionalInAppNotifications", e[e.functionalExit = 122] = "functionalExit", e[e.functionalShared = 123] = "functionalShared", e[e.functionalThumbsup = 124] = "functionalThumbsup", e[e.functionalDiscount = 125] = "functionalDiscount", e[e.functionalPercentage = 126] = "functionalPercentage", e[e.functionalList = 127] = "functionalList", e[e.functionalMapLocation = 128] = "functionalMapLocation", e[e.functionalNoConnection = 129] = "functionalNoConnection", e[e.functionalSwap = 130] = "functionalSwap", e[e.functionalPiece = 131] = "functionalPiece", e[e.functionalWeight = 132] = "functionalWeight", e[e.functionalPack = 133] = "functionalPack", e[e.functionalCommunications = 134] = "functionalCommunications", e[e.functionalDeliveryAddresses = 135] = "functionalDeliveryAddresses", e[e["functional18+"] = 136] = "functional18+", e[e.functionalReadtime = 137] = "functionalReadtime", e[e.functionalCopy = 138] = "functionalCopy", e[e.functionalMessageField = 139] = "functionalMessageField", e[e.functionalNext = 140] = "functionalNext", e[e.functionalSave = 141] = "functionalSave", e[e.functionalLogin = 142] = "functionalLogin", e[e.functionalLogout = 143] = "functionalLogout", e[e.functionalWebsite = 144] = "functionalWebsite", e[e.functionalMenu = 145] = "functionalMenu", e[e.functionalRegister = 146] = "functionalRegister", e[e.functionalNews = 147] = "functionalNews", e[e.functionalTimer = 148] = "functionalTimer", e[e.functionalEyeShow = 149] = "functionalEyeShow", e[e.functionalMobilePay = 150] = "functionalMobilePay", e[e.functionalConnectionCable = 151] = "functionalConnectionCable", e[e.functionalDryCleaning = 152] = "functionalDryCleaning", e[e.functionalKiosk = 153] = "functionalKiosk", e[e.functionalConnectedDevice = 154] = "functionalConnectedDevice", e[e.functionalCookies = 155] = "functionalCookies", e[e.functionalViewFile = 156] = "functionalViewFile", e[e.functionalLastAdded = 157] = "functionalLastAdded", e[e.functionalFirstAdded = 158] = "functionalFirstAdded", e[e.functionalStoreLayout = 159] = "functionalStoreLayout", e[e.functionalBlock = 160] = "functionalBlock", e[e.functionalChecklist = 161] = "functionalChecklist", e[e.functionalCartCheckout = 162] = "functionalCartCheckout", e[e.functionalCartEdit = 163] = "functionalCartEdit", e[e.functionalEyeHidden = 164] = "functionalEyeHidden", e[e.functionalWarningCircleFilled = 165] = "functionalWarningCircleFilled", e[e.functionalErrorCircleFilled = 166] = "functionalErrorCircleFilled", e[e.functionalSuccessCircleFilled = 167] = "functionalSuccessCircleFilled", e[e.functionalPlusCircle = 168] = "functionalPlusCircle", e[e.functionalSpinner = 169] = "functionalSpinner", e[e.functionalEcoEarth = 170] = "functionalEcoEarth", e[e.functionalAlphaBeta = 171] = "functionalAlphaBeta", e[e.functionalEuro = 172] = "functionalEuro", e[e.functionalNumber = 173] = "functionalNumber", e[e.functionalIdea = 174] = "functionalIdea", e[e.functionalMultifactorAuthenticator = 175] = "functionalMultifactorAuthenticator", e[e.functionalPassword = 176] = "functionalPassword", e[e.functionalDiscountCode = 177] = "functionalDiscountCode", e))(gt || {});
2857
- const Ui = "/icons/bouMenuIcons.svg", Qi = ({
2861
+ var pt = /* @__PURE__ */ ((e) => (e[e.categoriesVegetables = 0] = "categoriesVegetables", e[e.categoriesMeat = 1] = "categoriesMeat", e[e.categoriesFish = 2] = "categoriesFish", e[e.categoriesDairy = 3] = "categoriesDairy", e[e.categoriesBreakfast = 4] = "categoriesBreakfast", e[e.categoriesSnacks = 5] = "categoriesSnacks", e[e.categoriesCandy = 6] = "categoriesCandy", e[e.categoriesNonFood = 7] = "categoriesNonFood", e[e.categoriesDryFood = 8] = "categoriesDryFood", e[e.categoriesTins = 9] = "categoriesTins", e[e.categoriesGrid = 10] = "categoriesGrid", e[e.categoriesSoda = 11] = "categoriesSoda", e[e.categoriesBakery = 12] = "categoriesBakery", e[e.categoriesWine = 13] = "categoriesWine", e[e.categoriesBaby = 14] = "categoriesBaby", e[e.categoriesDiet = 15] = "categoriesDiet", e[e.categoriesHygiene = 16] = "categoriesHygiene", e[e.categoriesCleaning = 17] = "categoriesCleaning", e[e.categoriesPets = 18] = "categoriesPets", e[e.categoriesFreezer = 19] = "categoriesFreezer", e[e.categoriesBbq = 20] = "categoriesBbq", e[e.categoriesMealbox = 21] = "categoriesMealbox", e[e.categoriesBrik = 22] = "categoriesBrik", e[e.categoriesGranen = 23] = "categoriesGranen", e[e.categoriesConserve = 24] = "categoriesConserve", e[e.categoriesHome = 25] = "categoriesHome", e[e.categoriesEaster = 26] = "categoriesEaster", e[e.categoriesOnlinePromo = 27] = "categoriesOnlinePromo", e[e.categoriesSportFood = 28] = "categoriesSportFood", e[e.categoriesClothing = 29] = "categoriesClothing", e[e.categoriesEnergy = 30] = "categoriesEnergy", e[e.categoriesDeskAndTravel = 31] = "categoriesDeskAndTravel", e[e.categoriesCigarette = 32] = "categoriesCigarette", e[e.categoriesFood = 33] = "categoriesFood", e[e.categoriesChild = 34] = "categoriesChild", e[e.categoriesPuzzle = 35] = "categoriesPuzzle", e[e.categoriesToys = 36] = "categoriesToys", e[e.categoriesCar = 37] = "categoriesCar", e[e.categoriesPlaceholder = 38] = "categoriesPlaceholder", e[e.categoriesFuel = 39] = "categoriesFuel", e[e.categoriesCarAndBike = 40] = "categoriesCarAndBike", e[e.categoriesToyAndHobby = 41] = "categoriesToyAndHobby", e[e.categoriesMultimedia = 42] = "categoriesMultimedia", e[e.categoriesParty = 43] = "categoriesParty", e[e.toolsPay = 44] = "toolsPay", e[e.toolsReceipt = 45] = "toolsReceipt", e[e.toolsFuel = 46] = "toolsFuel", e[e.toolsStoreLocator = 47] = "toolsStoreLocator", e[e.toolsStats = 48] = "toolsStats", e[e.toolsShowXtraOld = 49] = "toolsShowXtraOld", e[e.toolsShowXtraNew = 50] = "toolsShowXtraNew", e[e.toolsScan2 = 51] = "toolsScan2", e[e.toolsRecipes2 = 52] = "toolsRecipes2", e[e.toolsWarranty = 53] = "toolsWarranty", e[e.toolsCoupons = 54] = "toolsCoupons", e[e.toolsFavoriteInactive = 55] = "toolsFavoriteInactive", e[e.toolsFavoriteActive = 56] = "toolsFavoriteActive", e[e.toolsAssortment = 57] = "toolsAssortment", e[e.toolsPromo = 58] = "toolsPromo", e[e.fuelCng = 59] = "fuelCng", e[e.fuelE5 = 60] = "fuelE5", e[e.fuelAdblue = 61] = "fuelAdblue", e[e.fuelB7 = 62] = "fuelB7", e[e.fuelH2 = 63] = "fuelH2", e[e.fuelE10 = 64] = "fuelE10", e[e.fuelFreeTireInflation = 65] = "fuelFreeTireInflation", e[e.functionalClose = 66] = "functionalClose", e[e.functionalBack = 67] = "functionalBack", e[e.functionalSearch = 68] = "functionalSearch", e[e.functionalEdit = 69] = "functionalEdit", e[e.functionalShare = 70] = "functionalShare", e[e.functionalLocation = 71] = "functionalLocation", e[e.functionalTrash = 72] = "functionalTrash", e[e.functionalCamera = 73] = "functionalCamera", e[e.functionalPhone = 74] = "functionalPhone", e[e.functionalPushNotifications = 75] = "functionalPushNotifications", e[e.functionalMail = 76] = "functionalMail", e[e.functionalGift = 77] = "functionalGift", e[e.functionalPresent = 78] = "functionalPresent", e[e.functionalLoading = 79] = "functionalLoading", e[e.functionalChevronRight = 80] = "functionalChevronRight", e[e.functionalCheck = 81] = "functionalCheck", e[e.functionalChevronDown = 82] = "functionalChevronDown", e[e.functionalChevronUp = 83] = "functionalChevronUp", e[e.functionalPlus = 84] = "functionalPlus", e[e.functionalReset = 85] = "functionalReset", e[e.functionalDownload = 86] = "functionalDownload", e[e.functionalExport = 87] = "functionalExport", e[e.functionalCustomerService = 88] = "functionalCustomerService", e[e.functionalTruck = 89] = "functionalTruck", e[e.functionalBox = 90] = "functionalBox", e[e.functionalEllipsis = 91] = "functionalEllipsis", e[e.functionalLocationHome = 92] = "functionalLocationHome", e[e.functionalLocationPickup = 93] = "functionalLocationPickup", e[e.functionalAccount = 94] = "functionalAccount", e[e.functionalPrivacy = 95] = "functionalPrivacy", e[e.functionalSettings = 96] = "functionalSettings", e[e.functionalUserInfo = 97] = "functionalUserInfo", e[e.functionalPinOutlines = 98] = "functionalPinOutlines", e[e.functionalCalendar = 99] = "functionalCalendar", e[e.functionalMinus = 100] = "functionalMinus", e[e.functionalLifestyle = 101] = "functionalLifestyle", e[e.functionalSms = 102] = "functionalSms", e[e.functionalSwitch = 103] = "functionalSwitch", e[e.functionalSorting = 104] = "functionalSorting", e[e.functionalWarningCircle = 105] = "functionalWarningCircle", e[e.functionalQuestionCircle = 106] = "functionalQuestionCircle", e[e.functionalErrorCircle = 107] = "functionalErrorCircle", e[e.functionalSuccessCircle = 108] = "functionalSuccessCircle", e[e.functionalMessage = 109] = "functionalMessage", e[e.functionalExternalLink = 110] = "functionalExternalLink", e[e.functionalAddToList = 111] = "functionalAddToList", e[e.functionalShoppingcart = 112] = "functionalShoppingcart", e[e.functionalFilter = 113] = "functionalFilter", e[e.functionalLocate = 114] = "functionalLocate", e[e.functionalBarcode = 115] = "functionalBarcode", e[e.functionalClock = 116] = "functionalClock", e[e.functionalHistory = 117] = "functionalHistory", e[e.functionalShops = 118] = "functionalShops", e[e.functionalAddUser = 119] = "functionalAddUser", e[e.functionalOther = 120] = "functionalOther", e[e.functionalInAppNotifications = 121] = "functionalInAppNotifications", e[e.functionalExit = 122] = "functionalExit", e[e.functionalShared = 123] = "functionalShared", e[e.functionalThumbsup = 124] = "functionalThumbsup", e[e.functionalDiscount = 125] = "functionalDiscount", e[e.functionalPercentage = 126] = "functionalPercentage", e[e.functionalList = 127] = "functionalList", e[e.functionalMapLocation = 128] = "functionalMapLocation", e[e.functionalNoConnection = 129] = "functionalNoConnection", e[e.functionalSwap = 130] = "functionalSwap", e[e.functionalPiece = 131] = "functionalPiece", e[e.functionalWeight = 132] = "functionalWeight", e[e.functionalPack = 133] = "functionalPack", e[e.functionalCommunications = 134] = "functionalCommunications", e[e.functionalDeliveryAddresses = 135] = "functionalDeliveryAddresses", e[e["functional18+"] = 136] = "functional18+", e[e.functionalReadtime = 137] = "functionalReadtime", e[e.functionalCopy = 138] = "functionalCopy", e[e.functionalMessageField = 139] = "functionalMessageField", e[e.functionalNext = 140] = "functionalNext", e[e.functionalSave = 141] = "functionalSave", e[e.functionalLogin = 142] = "functionalLogin", e[e.functionalLogout = 143] = "functionalLogout", e[e.functionalWebsite = 144] = "functionalWebsite", e[e.functionalMenu = 145] = "functionalMenu", e[e.functionalRegister = 146] = "functionalRegister", e[e.functionalNews = 147] = "functionalNews", e[e.functionalTimer = 148] = "functionalTimer", e[e.functionalEyeShow = 149] = "functionalEyeShow", e[e.functionalMobilePay = 150] = "functionalMobilePay", e[e.functionalConnectionCable = 151] = "functionalConnectionCable", e[e.functionalDryCleaning = 152] = "functionalDryCleaning", e[e.functionalKiosk = 153] = "functionalKiosk", e[e.functionalConnectedDevice = 154] = "functionalConnectedDevice", e[e.functionalCookies = 155] = "functionalCookies", e[e.functionalViewFile = 156] = "functionalViewFile", e[e.functionalLastAdded = 157] = "functionalLastAdded", e[e.functionalFirstAdded = 158] = "functionalFirstAdded", e[e.functionalStoreLayout = 159] = "functionalStoreLayout", e[e.functionalBlock = 160] = "functionalBlock", e[e.functionalChecklist = 161] = "functionalChecklist", e[e.functionalCartCheckout = 162] = "functionalCartCheckout", e[e.functionalCartEdit = 163] = "functionalCartEdit", e[e.functionalEyeHidden = 164] = "functionalEyeHidden", e[e.functionalWarningCircleFilled = 165] = "functionalWarningCircleFilled", e[e.functionalErrorCircleFilled = 166] = "functionalErrorCircleFilled", e[e.functionalSuccessCircleFilled = 167] = "functionalSuccessCircleFilled", e[e.functionalPlusCircle = 168] = "functionalPlusCircle", e[e.functionalSpinner = 169] = "functionalSpinner", e[e.functionalEcoEarth = 170] = "functionalEcoEarth", e[e.functionalAlphaBeta = 171] = "functionalAlphaBeta", e[e.functionalEuro = 172] = "functionalEuro", e[e.functionalNumber = 173] = "functionalNumber", e[e.functionalIdea = 174] = "functionalIdea", e[e.functionalMultifactorAuthenticator = 175] = "functionalMultifactorAuthenticator", e[e.functionalPassword = 176] = "functionalPassword", e[e.functionalDiscountCode = 177] = "functionalDiscountCode", e))(pt || {});
2862
+ const Ti = "/icons/bouMenuIcons.svg", Ui = ({
2858
2863
  bouIconId: e,
2859
2864
  ...t
2860
- }) => /* @__PURE__ */ i.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i.jsx("use", { href: `${Ui}#${gt[e]}` }) }), pe = ({
2865
+ }) => /* @__PURE__ */ i.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i.jsx("use", { href: `${Ti}#${pt[e]}` }) }), fe = ({
2861
2866
  className: e,
2862
2867
  label: t,
2863
2868
  mobileUrl: s,
2864
2869
  desktopUrl: r,
2865
- icon: n
2870
+ icon: a
2866
2871
  }) => {
2867
- const o = Vs(), l = () => typeof n == "string" && n in gt ? /* @__PURE__ */ i.jsx(Qi, { bouIconId: gt[n] }) : n;
2872
+ const o = Ks(), l = () => typeof a == "string" && a in pt ? /* @__PURE__ */ i.jsx(Ui, { bouIconId: pt[a] }) : a;
2868
2873
  return /* @__PURE__ */ i.jsxs(Y.Item, { className: e, children: [
2869
2874
  (!o || o && !r) && /* @__PURE__ */ i.jsxs("a", { href: s, referrerPolicy: "no-referrer-when-downgrade", children: [
2870
2875
  l(),
@@ -2875,50 +2880,120 @@ const Ui = "/icons/bouMenuIcons.svg", Qi = ({
2875
2880
  t
2876
2881
  ] })
2877
2882
  ] });
2878
- }, Us = d.createContext(void 0), Hi = ({
2879
- position: e,
2880
- bouMenuItems: t,
2881
- authenticationStatus: s,
2882
- profile: r,
2883
- children: n
2884
- }) => /* @__PURE__ */ i.jsx(Us.Provider, { value: { position: e, bouMenuItems: t, authenticationStatus: s, profile: r }, children: n }), Gt = () => {
2885
- const e = d.useContext(Us);
2883
+ }, Fs = d.createContext(void 0), Qi = ({ position: e, bouMenuItems: t, children: s }) => /* @__PURE__ */ i.jsx(Fs.Provider, { value: { position: e, bouMenuItems: t }, children: s }), Rs = () => {
2884
+ const e = d.useContext(Fs);
2886
2885
  if (!e)
2887
2886
  throw new Error("Authentication context can not be rendered outside of Authentication");
2888
2887
  return e;
2889
- }, Qs = d.createContext(void 0), $i = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ i.jsx(Qs.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), Hs = () => {
2890
- const e = d.useContext(Qs);
2888
+ }, Ds = d.createContext(void 0), Hi = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ i.jsx(Ds.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), Ut = () => {
2889
+ const e = d.useContext(Ds);
2891
2890
  if (!e)
2892
2891
  throw new Error("Api context can not be rendered outside of Api");
2893
2892
  return e;
2894
- }, $s = ({ apiUrl: e, redirectUrl: t, trackingInfo: s }) => {
2893
+ }, Ts = ({ apiUrl: e, redirectUrl: t, trackingInfo: s }) => {
2895
2894
  const r = new URLSearchParams({ redirectUrl: t });
2896
2895
  s && r.append("trackingInfo", s);
2897
- const n = `${e}/login?${r.toString()}`, o = `${e}/logout?${r.toString()}`;
2898
- return { loginUrl: n, logoutUrl: o };
2899
- }, Ks = () => {
2900
- const { apiUrl: e, redirectUrl: t } = Hs(), s = Ws();
2901
- return $s({ apiUrl: e, redirectUrl: t, trackingInfo: s });
2902
- }, qe = () => {
2903
- const { apiUrl: e } = Hs(), { loginUrl: t, logoutUrl: s } = Ks(), r = `${e}/user/profile`, n = `${e}/gdpr/tc/check`, o = `${e}/gdpr/tc`;
2896
+ const a = `${e}/login?${r.toString()}`, o = `${e}/logout?${r.toString()}`;
2897
+ return { loginUrl: a, logoutUrl: o };
2898
+ }, yt = () => {
2899
+ const { apiUrl: e, redirectUrl: t } = Ut(), s = Gs();
2900
+ return Ts({ apiUrl: e, redirectUrl: t, trackingInfo: s });
2901
+ }, $i = () => {
2902
+ const { apiUrl: e } = Ut();
2903
+ return `${`${e}/xtra`}/authentication/v1/user/profile`;
2904
+ }, zt = (e) => e ? `+${e.countryCode} ${e.number}` : "", Jt = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), Xt = ({ apiUrl: e, redirectUrl: t }) => {
2905
+ const { loginUrl: s } = Ts({ apiUrl: e, redirectUrl: t });
2906
+ window.location.replace(s);
2907
+ }, It = (e) => {
2908
+ if (!e)
2909
+ return { user: { state: () => "NotAuthenticated" }, tryToLogon: Xt };
2910
+ const t = new Date(e.dateOfBirth), s = Jt(Qt.Mobile, e.phone), r = Jt(Qt.Fixed, e.phone), a = zt(s) ?? zt(r) ?? "";
2904
2911
  return {
2905
- loginUrl: t,
2906
- logoutUrl: s,
2907
- profileEndpoint: r,
2908
- getTermsAndConditionsEndpoint: n,
2909
- postTermsAndConditionsEndpoint: o
2912
+ user: {
2913
+ firstName: () => e.firstName,
2914
+ lastName: () => e.lastName,
2915
+ dob: () => t.getDate(),
2916
+ mob: () => t.getMonth() + 1,
2917
+ yob: () => t.getFullYear(),
2918
+ gender: () => e.genderCode,
2919
+ phone: () => a,
2920
+ streetName: () => {
2921
+ var o;
2922
+ return (o = e.address) == null ? void 0 : o.streetName;
2923
+ },
2924
+ houseNr: () => {
2925
+ var o;
2926
+ return (o = e.address) == null ? void 0 : o.houseNumber;
2927
+ },
2928
+ box: () => {
2929
+ var o;
2930
+ return (o = e.address) == null ? void 0 : o.letterBoxName;
2931
+ },
2932
+ zip: () => {
2933
+ var o;
2934
+ return (o = e.address) == null ? void 0 : o.postalCode;
2935
+ },
2936
+ city: () => {
2937
+ var o;
2938
+ return (o = e.address) == null ? void 0 : o.locationName;
2939
+ },
2940
+ country: () => {
2941
+ var o;
2942
+ return (o = e.address) == null ? void 0 : o.countryCode;
2943
+ },
2944
+ email: () => e.email,
2945
+ cbh: () => e.customerIdentifier,
2946
+ state: () => "Authenticated"
2947
+ },
2948
+ tryToLogon: Xt
2910
2949
  };
2911
- }, Ki = (e) => e != null && e.length ? /* @__PURE__ */ i.jsx("ul", { className: "bou-menu__list", children: e == null ? void 0 : e.map(({ label: t, icon: s, url: r }, n) => /* @__PURE__ */ i.jsx(
2912
- pe,
2950
+ }, Us = ["profile"], Qs = () => {
2951
+ const { i18n: e } = _e(), t = $i(), s = sessionStorage.getItem("profile"), r = !!s;
2952
+ return bs({
2953
+ queryKey: Us,
2954
+ queryFn: async () => {
2955
+ const o = await fetch(t, {
2956
+ credentials: "include",
2957
+ mode: "cors",
2958
+ headers: { "Accept-Language": e.language }
2959
+ });
2960
+ if (!o.ok) {
2961
+ if (o.status === 401)
2962
+ return window.XTRA = { ...window.XTRA, ...It() }, window.postMessage(
2963
+ { source: "xtra-authentication", isAuthenticated: !1 },
2964
+ new URL(window.location.href).origin
2965
+ ), sessionStorage.removeItem("profile"), { authenticationStatus: "NotAuthenticated" };
2966
+ if (r)
2967
+ return { authenticationStatus: "Authenticated", profile: JSON.parse(s) };
2968
+ throw new Error("Failed to retrieve profile");
2969
+ }
2970
+ const l = await o.json(), { firstName: c, lastName: m } = l;
2971
+ return sessionStorage.setItem("profile", JSON.stringify({ firstName: c, lastName: m })), window.postMessage(
2972
+ { source: "xtra-authentication", isAuthenticated: !0 },
2973
+ new URL(window.location.href).origin
2974
+ ), window.XTRA = { ...window.XTRA, ...It(l) }, {
2975
+ authenticationStatus: "Authenticated",
2976
+ profile: { firstName: l.firstName, lastName: l.lastName }
2977
+ };
2978
+ },
2979
+ initialData: r ? {
2980
+ authenticationStatus: "Authenticated",
2981
+ profile: JSON.parse(s)
2982
+ } : void 0,
2983
+ placeholderData: { authenticationStatus: "Pending" },
2984
+ refetchOnWindowFocus: !1
2985
+ });
2986
+ }, Ki = (e) => e != null && e.length ? /* @__PURE__ */ i.jsx("ul", { className: "bou-menu__list", children: e == null ? void 0 : e.map(({ label: t, icon: s, url: r }, a) => /* @__PURE__ */ i.jsx(
2987
+ fe,
2913
2988
  {
2914
2989
  className: "bou-menu-item",
2915
2990
  mobileUrl: r,
2916
2991
  icon: s,
2917
2992
  label: t
2918
2993
  },
2919
- n
2994
+ a
2920
2995
  )) }) : null, Gi = () => {
2921
- const { t: e } = Ee(), t = fs(), { position: s, profile: r, bouMenuItems: n } = Gt(), { logoutUrl: o } = qe(), l = (r == null ? void 0 : r.firstName) ?? "", c = (r == null ? void 0 : r.lastName) ?? "";
2996
+ const { t: e } = _e(), t = cs(), { position: s, bouMenuItems: r } = Rs(), { logoutUrl: a } = yt(), l = Dt().getQueryData(Us), c = (l == null ? void 0 : l.profile.firstName) ?? "", m = (l == null ? void 0 : l.profile.lastName) ?? "";
2922
2997
  return /* @__PURE__ */ i.jsxs(Y, { type: "nav", id: "xtra-menu", position: s, children: [
2923
2998
  /* @__PURE__ */ i.jsx(
2924
2999
  Y.Trigger,
@@ -2930,67 +3005,67 @@ const Ui = "/icons/bouMenuIcons.svg", Qi = ({
2930
3005
  "button--authentication--authenticated"
2931
3006
  ),
2932
3007
  children: /* @__PURE__ */ i.jsxs("button", { children: [
2933
- /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Tr, { variant: "small", firstName: l, lastName: c }) }),
2934
- /* @__PURE__ */ i.jsx("span", { className: "button__label", children: l }),
2935
- /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx($t, {}) })
3008
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Dr, { variant: "small", firstName: c, lastName: m }) }),
3009
+ /* @__PURE__ */ i.jsx("span", { className: "button__label", children: c }),
3010
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Tt, {}) })
2936
3011
  ] })
2937
3012
  }
2938
3013
  ),
2939
3014
  /* @__PURE__ */ i.jsxs(Y.Content, { as: "div", children: [
2940
- Ki(n),
3015
+ Ki(r),
2941
3016
  /* @__PURE__ */ i.jsxs("ul", { children: [
2942
3017
  /* @__PURE__ */ i.jsx(
2943
- pe,
3018
+ fe,
2944
3019
  {
2945
3020
  className: "manage-profile",
2946
3021
  mobileUrl: `${t}/manage-profile`,
2947
3022
  desktopUrl: `${t}/manage-profile/personal-data`,
2948
- icon: /* @__PURE__ */ i.jsx(Br, {}),
3023
+ icon: /* @__PURE__ */ i.jsx(Ir, {}),
2949
3024
  label: e("manageProfile")
2950
3025
  }
2951
3026
  ),
2952
3027
  /* @__PURE__ */ i.jsx(
2953
- pe,
3028
+ fe,
2954
3029
  {
2955
3030
  className: "payment",
2956
3031
  mobileUrl: `${t}/payment`,
2957
- icon: /* @__PURE__ */ i.jsx(ui, {}),
3032
+ icon: /* @__PURE__ */ i.jsx(ci, {}),
2958
3033
  label: e("payment")
2959
3034
  }
2960
3035
  ),
2961
3036
  /* @__PURE__ */ i.jsx(
2962
- pe,
3037
+ fe,
2963
3038
  {
2964
3039
  className: "gift-cards",
2965
3040
  mobileUrl: `${t}/gift-cards`,
2966
- icon: /* @__PURE__ */ i.jsx(li, {}),
3041
+ icon: /* @__PURE__ */ i.jsx(oi, {}),
2967
3042
  label: e("giftCards")
2968
3043
  }
2969
3044
  ),
2970
3045
  /* @__PURE__ */ i.jsx(
2971
- pe,
3046
+ fe,
2972
3047
  {
2973
3048
  mobileUrl: `${t}/identifiers`,
2974
- icon: /* @__PURE__ */ i.jsx(hi, {}),
3049
+ icon: /* @__PURE__ */ i.jsx(di, {}),
2975
3050
  label: e("qrCode")
2976
3051
  }
2977
3052
  ),
2978
3053
  /* @__PURE__ */ i.jsx(
2979
- pe,
3054
+ fe,
2980
3055
  {
2981
3056
  className: "manage-privacy",
2982
3057
  mobileUrl: `${t}/manage-privacy`,
2983
3058
  desktopUrl: `${t}/manage-privacy/permissions`,
2984
- icon: /* @__PURE__ */ i.jsx(Xr, {}),
3059
+ icon: /* @__PURE__ */ i.jsx(Jr, {}),
2985
3060
  label: e("privacy")
2986
3061
  }
2987
3062
  ),
2988
- /* @__PURE__ */ i.jsx(pe, { mobileUrl: o, icon: /* @__PURE__ */ i.jsx(Yr, {}), label: e("logout") })
3063
+ /* @__PURE__ */ i.jsx(fe, { mobileUrl: a, icon: /* @__PURE__ */ i.jsx(Yr, {}), label: e("logout") })
2989
3064
  ] })
2990
3065
  ] })
2991
3066
  ] });
2992
- }, qi = () => {
2993
- const { t: e } = Ee();
3067
+ }, Vi = () => {
3068
+ const { t: e } = _e();
2994
3069
  return /* @__PURE__ */ i.jsxs("button", { className: P("button", "button--neutral", "button--authentication"), children: [
2995
3070
  /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx("i", { className: "spinner" }) }),
2996
3071
  /* @__PURE__ */ i.jsxs("span", { className: "button__label", children: [
@@ -2998,8 +3073,8 @@ const Ui = "/icons/bouMenuIcons.svg", Qi = ({
2998
3073
  "..."
2999
3074
  ] })
3000
3075
  ] });
3001
- }, Vi = ({ className: e }) => {
3002
- const { t } = Ee(), { loginUrl: s } = qe();
3076
+ }, qi = ({ className: e }) => {
3077
+ const { t } = _e(), { loginUrl: s } = yt();
3003
3078
  return /* @__PURE__ */ i.jsxs(
3004
3079
  "a",
3005
3080
  {
@@ -3012,15 +3087,15 @@ const Ui = "/icons/bouMenuIcons.svg", Qi = ({
3012
3087
  e
3013
3088
  ),
3014
3089
  children: [
3015
- /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Kt, { width: 24, height: 24, suffix: "desktop" }) }),
3090
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Es, { width: 24, height: 24, suffix: "desktop" }) }),
3016
3091
  /* @__PURE__ */ i.jsx("span", { className: "button__label", children: t("login") }),
3017
- /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx($t, {}) })
3092
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Tt, {}) })
3018
3093
  ]
3019
3094
  }
3020
3095
  );
3021
3096
  };
3022
3097
  const Wi = () => {
3023
- const { t: e } = Ee(), { loginUrl: t } = qe(), s = fs(), { position: r } = Gt();
3098
+ const { t: e } = _e(), { loginUrl: t } = yt(), s = cs(), { position: r } = Rs();
3024
3099
  return /* @__PURE__ */ i.jsxs(
3025
3100
  Y,
3026
3101
  {
@@ -3031,281 +3106,111 @@ const Wi = () => {
3031
3106
  "aria-label": e("xtraMenuAriaLabel"),
3032
3107
  children: [
3033
3108
  /* @__PURE__ */ i.jsx(Y.Trigger, { className: P("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ i.jsxs("button", { children: [
3034
- /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Kt, { width: 24, height: 24, suffix: "mobile" }) }),
3035
- /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx($t, {}) })
3109
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Es, { width: 24, height: 24, suffix: "mobile" }) }),
3110
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Tt, {}) })
3036
3111
  ] }) }),
3037
3112
  /* @__PURE__ */ i.jsxs(Y.Content, { children: [
3038
3113
  /* @__PURE__ */ i.jsx(Y.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: t, className: "button button--with-icon", children: [
3039
- /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Zr, {}) }),
3114
+ /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Wr, {}) }),
3040
3115
  /* @__PURE__ */ i.jsx("span", { className: "button__label", children: e("login") })
3041
3116
  ] }) }),
3042
3117
  /* @__PURE__ */ i.jsx(Y.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: `${s}/onboarding/register`, className: "button button--with-icon", children: [
3043
- /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(ti, {}) }),
3118
+ /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(ei, {}) }),
3044
3119
  /* @__PURE__ */ i.jsx("span", { className: "button__label", children: e("register") })
3045
3120
  ] }) })
3046
3121
  ] })
3047
3122
  ]
3048
3123
  }
3049
3124
  );
3050
- };
3051
- var z = /* @__PURE__ */ ((e) => (e.Authenticated = "authenticated", e.NotAuthenticated = "notAuthenticated", e.Pending = "pending", e))(z || {});
3052
- const Zi = () => {
3053
- const { authenticationStatus: e } = Gt();
3054
- return e === z.NotAuthenticated ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
3055
- /* @__PURE__ */ i.jsx(Vi, {}),
3125
+ }, Zi = () => {
3126
+ var t, s;
3127
+ const e = Qs();
3128
+ return ((t = e.data) == null ? void 0 : t.authenticationStatus) === "Authenticated" ? /* @__PURE__ */ i.jsx(Gi, {}) : ((s = e.data) == null ? void 0 : s.authenticationStatus) === "NotAuthenticated" || e.isError ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
3129
+ /* @__PURE__ */ i.jsx(qi, {}),
3056
3130
  /* @__PURE__ */ i.jsx(Wi, {})
3057
- ] }) : e === z.Pending ? /* @__PURE__ */ i.jsx(qi, {}) : /* @__PURE__ */ i.jsx(Gi, {});
3058
- };
3059
- /*! js-cookie v3.0.5 | MIT */
3060
- function ct(e) {
3061
- for (var t = 1; t < arguments.length; t++) {
3062
- var s = arguments[t];
3063
- for (var r in s)
3064
- e[r] = s[r];
3065
- }
3066
- return e;
3067
- }
3068
- var zi = {
3069
- read: function(e) {
3070
- return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
3071
- },
3072
- write: function(e) {
3073
- return encodeURIComponent(e).replace(
3074
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
3075
- decodeURIComponent
3076
- );
3077
- }
3078
- };
3079
- function Tt(e, t) {
3080
- function s(n, o, l) {
3081
- if (!(typeof document > "u")) {
3082
- l = ct({}, t, l), typeof l.expires == "number" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
3083
- var c = "";
3084
- for (var f in l)
3085
- l[f] && (c += "; " + f, l[f] !== !0 && (c += "=" + l[f].split(";")[0]));
3086
- return document.cookie = n + "=" + e.write(o, n) + c;
3087
- }
3088
- }
3089
- function r(n) {
3090
- if (!(typeof document > "u" || arguments.length && !n)) {
3091
- for (var o = document.cookie ? document.cookie.split("; ") : [], l = {}, c = 0; c < o.length; c++) {
3092
- var f = o[c].split("="), y = f.slice(1).join("=");
3093
- try {
3094
- var u = decodeURIComponent(f[0]);
3095
- if (l[u] = e.read(y, u), n === u)
3096
- break;
3097
- } catch {
3098
- }
3099
- }
3100
- return n ? l[n] : l;
3101
- }
3102
- }
3103
- return Object.create(
3104
- {
3105
- set: s,
3106
- get: r,
3107
- remove: function(n, o) {
3108
- s(
3109
- n,
3110
- "",
3111
- ct({}, o, {
3112
- expires: -1
3113
- })
3114
- );
3115
- },
3116
- withAttributes: function(n) {
3117
- return Tt(this.converter, ct({}, this.attributes, n));
3118
- },
3119
- withConverter: function(n) {
3120
- return Tt(ct({}, this.converter, n), this.attributes);
3121
- }
3122
- },
3123
- {
3124
- attributes: { value: Object.freeze(t) },
3125
- converter: { value: Object.freeze(e) }
3126
- }
3127
- );
3128
- }
3129
- var Ut = Tt(zi, { path: "/" });
3130
- class yt extends Error {
3131
- constructor(t) {
3132
- super(t), this.name = "UnauthorizedError";
3133
- }
3134
- }
3135
- const Yi = () => {
3136
- const { i18n: e } = Ee(), { profileEndpoint: t } = qe();
3137
- return As({
3138
- queryKey: ["profile"],
3139
- queryFn: async () => {
3140
- const r = await fetch(t, {
3141
- credentials: "include",
3142
- mode: "cors",
3143
- headers: { "Accept-Language": e.language }
3144
- });
3145
- if (!r.ok)
3146
- throw r.status === 401 ? new yt(`${r.status} - ${r.statusText}`) : new Error("Network response was not ok");
3147
- return await r.json();
3148
- },
3149
- retry: (r, n) => n instanceof yt ? !1 : r < 2,
3150
- refetchOnWindowFocus: !1
3151
- });
3152
- }, es = (e) => e ? `+${e.countryCode} ${e.number}` : "", ts = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), ss = ({ apiUrl: e, redirectUrl: t }) => {
3153
- const { loginUrl: s } = $s({ apiUrl: e, redirectUrl: t });
3154
- window.location.replace(s);
3155
- }, Ji = (e) => {
3156
- if (!e)
3157
- return { user: { state: () => z.NotAuthenticated }, tryToLogon: ss };
3158
- const t = new Date(e.dateOfBirth), s = ts(qt.Mobile, e.phone), r = ts(qt.Fixed, e.phone), n = es(s) ?? es(r) ?? "";
3159
- return {
3160
- user: {
3161
- firstName: () => e.firstName,
3162
- lastName: () => e.lastName,
3163
- dob: () => t.getDate(),
3164
- mob: () => t.getMonth() + 1,
3165
- yob: () => t.getFullYear(),
3166
- gender: () => e.genderCode,
3167
- phone: () => n,
3168
- streetName: () => {
3169
- var o;
3170
- return (o = e.address) == null ? void 0 : o.streetName;
3171
- },
3172
- houseNr: () => {
3173
- var o;
3174
- return (o = e.address) == null ? void 0 : o.houseNumber;
3175
- },
3176
- box: () => {
3177
- var o;
3178
- return (o = e.address) == null ? void 0 : o.letterBoxName;
3179
- },
3180
- zip: () => {
3181
- var o;
3182
- return (o = e.address) == null ? void 0 : o.postalCode;
3183
- },
3184
- city: () => {
3185
- var o;
3186
- return (o = e.address) == null ? void 0 : o.locationName;
3187
- },
3188
- country: () => {
3189
- var o;
3190
- return (o = e.address) == null ? void 0 : o.countryCode;
3191
- },
3192
- email: () => e.email,
3193
- cbh: () => e.customerIdentifier,
3194
- state: () => z.Authenticated
3195
- },
3196
- tryToLogon: ss
3197
- };
3198
- }, Gs = () => {
3199
- const e = Yi(), t = Ut.get("profile"), s = !!t, [r, n] = d.useState(
3200
- s ? z.Authenticated : z.Pending
3201
- ), [o, l] = d.useState(
3202
- s ? JSON.parse(t) : void 0
3203
- );
3204
- return d.useEffect(() => {
3205
- e.isError && e.error instanceof yt && (Ut.remove("profile"), n(z.NotAuthenticated)), e.isError && !(e.error instanceof yt) && n(
3206
- s ? z.Authenticated : z.NotAuthenticated
3207
- ), e.isSuccess && (n(z.Authenticated), l(e.data), window.postMessage(
3208
- { source: "xtra-authentication", isAuthenticated: !0 },
3209
- new URL(window.location.href).origin
3210
- )), window.XTRA = {
3211
- ...window.XTRA,
3212
- ...Ji(e.data)
3213
- };
3214
- }, [
3215
- s,
3216
- e.data,
3217
- e.error,
3218
- e.isError,
3219
- e.isSuccess
3220
- ]), { authenticationStatus: r, profile: o };
3221
- }, Xi = ({ position: e, bouMenuItems: t }) => {
3222
- const { authenticationStatus: s, profile: r } = Gs();
3223
- return /* @__PURE__ */ i.jsx(
3224
- Hi,
3225
- {
3226
- bouMenuItems: t,
3227
- authenticationStatus: s,
3228
- position: e,
3229
- profile: r,
3230
- children: /* @__PURE__ */ i.jsx(Zi, {})
3231
- }
3232
- );
3233
- }, Ii = () => {
3234
- const { postTermsAndConditionsEndpoint: e } = qe(), t = new xs();
3235
- return Ar({
3131
+ ] }) : /* @__PURE__ */ i.jsx(Vi, {});
3132
+ }, Hs = () => {
3133
+ const { apiUrl: e } = Ut();
3134
+ return `${`${e}/xtra`}/authentication/v1/gdpr`;
3135
+ }, Yi = () => {
3136
+ const e = Hs(), t = new vs();
3137
+ return Er({
3236
3138
  mutationFn: async (r) => {
3237
- const n = await fetch(e, {
3238
- method: "post",
3139
+ const a = await fetch(`${e}/tc`, {
3239
3140
  body: JSON.stringify({ acceptedTC: r }),
3240
3141
  credentials: "include",
3142
+ method: "POST",
3241
3143
  mode: "cors"
3242
3144
  });
3243
- if (!n.ok)
3145
+ if (!a.ok)
3244
3146
  throw new Error("Network response was not ok");
3245
- return n;
3147
+ return a;
3246
3148
  },
3247
3149
  onSuccess: async () => {
3248
3150
  await t.invalidateQueries({ queryKey: ["gdpr"] });
3249
3151
  }
3250
3152
  });
3251
- }, Bi = () => {
3252
- const { i18n: e } = Ee(), { getTermsAndConditionsEndpoint: t } = qe(), { authenticationStatus: s } = Gs(), r = Ut.get("hasAcceptedLatestTermsAndConditions"), n = [], o = r === "true", l = s === z.Authenticated;
3253
- return As({
3153
+ }, zi = () => {
3154
+ var o;
3155
+ const { i18n: e } = _e(), t = Hs(), r = ((o = Qs().data) == null ? void 0 : o.authenticationStatus) === "Authenticated";
3156
+ return bs({
3254
3157
  queryKey: ["gdpr"],
3255
3158
  queryFn: async () => {
3256
- const f = await fetch(t, {
3159
+ const l = await fetch(`${t}/tc/check`, {
3257
3160
  credentials: "include",
3258
3161
  mode: "cors",
3259
3162
  headers: { "Accept-Language": e.language }
3260
3163
  });
3261
- if (!f.ok)
3164
+ if (!l.ok)
3262
3165
  throw new Error("Network response was not ok");
3263
- return await f.json();
3166
+ return l.status === 204 ? [] : await l.json();
3264
3167
  },
3265
- enabled: l && !o,
3266
- initialData: n
3168
+ enabled: r
3267
3169
  });
3268
- }, en = () => {
3269
- const { t: e } = Ee(), { logoutUrl: t } = Ks(), s = d.useRef(null), [r, n] = d.useState(0), [o, l] = d.useState({}), { mutate: c, isError: f } = Ii(), { AccessibleFormMessage: y, formRef: u } = Zs({ submitCount: r, errors: o }), { data: x } = Bi(), g = !!(x != null && x.length), p = e("termsAndConditions.error.required"), w = () => {
3270
- var v;
3271
- (v = s == null ? void 0 : s.current) == null || v.click(), document.body.style.removeProperty("overflow");
3170
+ }, Ji = () => {
3171
+ var y;
3172
+ const { t: e } = _e();
3173
+ Vs({ element: "xtra-authentication" });
3174
+ const { logoutUrl: t } = yt(), s = d.useRef(null), [r, a] = d.useState(0), [o, l] = d.useState({}), { mutate: c, isError: m } = Yi(), { AccessibleFormMessage: C, formRef: u } = qs({ submitCount: r, errors: o }), b = zi(), v = !!((y = b.data) != null && y.length), f = e("termsAndConditions.error.required"), w = () => {
3175
+ var g;
3176
+ (g = s == null ? void 0 : s.current) == null || g.click(), document.body.style.removeProperty("overflow");
3272
3177
  };
3273
3178
  d.useEffect(() => {
3274
- g && document.body.style.setProperty("overflow", "hidden");
3275
- }, [g]), d.useEffect(() => {
3276
- f && l({ acceptedTC: p });
3277
- }, [p, f]);
3278
- const _ = (v) => {
3279
- v.preventDefault(), n(r + 1);
3280
- const { acceptedTC: C } = v.target;
3281
- if (C instanceof RadioNodeList) {
3282
- const S = Object.values(C);
3283
- S.every((k) => k.checked) ? (l({}), c(S.map((k) => k.value)), w()) : l({ acceptedTC: p });
3179
+ v && document.body.style.setProperty("overflow", "hidden");
3180
+ }, [v]), d.useEffect(() => {
3181
+ m && l({ acceptedTC: f });
3182
+ }, [f, m]);
3183
+ const E = (g) => {
3184
+ g.preventDefault(), a(r + 1);
3185
+ const { acceptedTC: S } = g.target;
3186
+ if (S instanceof RadioNodeList) {
3187
+ const _ = Object.values(S);
3188
+ _.every((L) => L.checked) ? (l({}), c(_.map((L) => L.value)), w()) : l({ acceptedTC: f });
3284
3189
  } else
3285
- C != null && C.checked ? (l({}), c([C.value]), w()) : l({ acceptedTC: p });
3190
+ S != null && S.checked ? (l({}), c([S.value]), w()) : l({ acceptedTC: f });
3286
3191
  };
3287
- return g ? /* @__PURE__ */ i.jsxs(H, { defaultOpen: g, isModal: !0, children: [
3288
- y,
3192
+ return v ? /* @__PURE__ */ i.jsxs(H, { defaultOpen: v, isModal: !0, children: [
3193
+ C,
3289
3194
  /* @__PURE__ */ i.jsxs(H.Root, { children: [
3290
- /* @__PURE__ */ i.jsx(H.Header, { children: /* @__PURE__ */ i.jsx(H.Title, { icon: /* @__PURE__ */ i.jsx(Kt, { role: "presentation" }), children: /* @__PURE__ */ i.jsx(nn, { children: e("termsAndConditions.title") }) }) }),
3291
- /* @__PURE__ */ i.jsx(H.Body, { children: /* @__PURE__ */ i.jsxs(qs, { ref: u, id: "tc-form", onSubmit: _, children: [
3292
- /* @__PURE__ */ i.jsxs(sn, { children: [
3195
+ /* @__PURE__ */ i.jsx(H.Header, { children: /* @__PURE__ */ i.jsx(H.Title, { icon: /* @__PURE__ */ i.jsx("i", { className: "commerce__icon" }), children: /* @__PURE__ */ i.jsx(en, { children: e("termsAndConditions.title") }) }) }),
3196
+ /* @__PURE__ */ i.jsx(H.Body, { children: /* @__PURE__ */ i.jsxs($s, { ref: u, id: "tc-form", onSubmit: E, children: [
3197
+ /* @__PURE__ */ i.jsxs(Ii, { children: [
3293
3198
  e("termsAndConditions.description"),
3294
- o.acceptedTC && /* @__PURE__ */ i.jsx(an, { children: p })
3199
+ o.acceptedTC && /* @__PURE__ */ i.jsx(tn, { children: f })
3295
3200
  ] }),
3296
- x.map(({ tcCode: v, title: C, URL: S }) => /* @__PURE__ */ i.jsx(
3297
- _e,
3201
+ b.data.map(({ tcCode: g, title: S, URL: _ }) => /* @__PURE__ */ i.jsx(
3202
+ je,
3298
3203
  {
3299
- id: v,
3300
- value: v,
3204
+ id: g,
3205
+ value: g,
3301
3206
  name: "acceptedTC",
3302
3207
  variant: "primary",
3303
- children: /* @__PURE__ */ i.jsxs(_e.Content, { children: [
3304
- /* @__PURE__ */ i.jsx(tn, { children: C }),
3305
- /* @__PURE__ */ i.jsx(rn, { href: S, children: e("termsAndConditions.action", { title: C }) })
3208
+ children: /* @__PURE__ */ i.jsxs(je.Content, { children: [
3209
+ /* @__PURE__ */ i.jsx(Xi, { children: S }),
3210
+ /* @__PURE__ */ i.jsx(Bi, { href: _, children: e("termsAndConditions.action", { title: S }) })
3306
3211
  ] })
3307
3212
  },
3308
- v
3213
+ g
3309
3214
  ))
3310
3215
  ] }) }),
3311
3216
  /* @__PURE__ */ i.jsxs(H.Footer, { children: [
@@ -3317,19 +3222,19 @@ const Yi = () => {
3317
3222
  children: e("logout")
3318
3223
  }
3319
3224
  ),
3320
- /* @__PURE__ */ i.jsx(at, { form: "tc-form", type: "submit", variant: "primary", children: e("confirm") })
3225
+ /* @__PURE__ */ i.jsx(it, { form: "tc-form", type: "submit", variant: "primary", children: e("confirm") })
3321
3226
  ] })
3322
3227
  ] })
3323
3228
  ] }) : /* @__PURE__ */ i.jsx(i.Fragment, {});
3324
- }, tn = ({
3229
+ }, Xi = ({
3325
3230
  children: e,
3326
3231
  ...t
3327
- }) => /* @__PURE__ */ i.jsx(_e.Label, { className: "form--tc__label", ...t, children: e }), qs = d.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ i.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
3328
- qs.displayName = "TermsAndConditionsForm";
3329
- const sn = ({
3232
+ }) => /* @__PURE__ */ i.jsx(je.Label, { className: "form--tc__label", ...t, children: e }), $s = d.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ i.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
3233
+ $s.displayName = "TermsAndConditionsForm";
3234
+ const Ii = ({
3330
3235
  children: e,
3331
3236
  ...t
3332
- }) => /* @__PURE__ */ i.jsx("p", { className: "form--tc__description", ...t, children: e }), rn = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx(
3237
+ }) => /* @__PURE__ */ i.jsx("p", { className: "form--tc__description", ...t, children: e }), Bi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx(
3333
3238
  "a",
3334
3239
  {
3335
3240
  className: "form--tc__link",
@@ -3340,10 +3245,10 @@ const sn = ({
3340
3245
  ...t,
3341
3246
  children: e
3342
3247
  }
3343
- ), nn = ({ children: e }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: e }), an = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), on = new xs(), un = ({ environment: e, redirectUrl: t, apiUrl: s, position: r, bouMenuItems: n }) => /* @__PURE__ */ i.jsx(zs, { environment: e, children: /* @__PURE__ */ i.jsx($i, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ i.jsxs(pr, { client: on, children: [
3344
- /* @__PURE__ */ i.jsx(Xi, { position: r, bouMenuItems: n }),
3345
- /* @__PURE__ */ i.jsx(en, {})
3346
- ] }) }) });
3248
+ ), en = ({ children: e }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: e }), tn = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), sn = new vs(), an = ({ environment: e, redirectUrl: t, apiUrl: s, position: r, commerceId: a, bouMenuItems: o }) => /* @__PURE__ */ i.jsx(Ws, { environment: e, children: /* @__PURE__ */ i.jsx(Zs, { commerceId: a, children: /* @__PURE__ */ i.jsx(Hi, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ i.jsxs(fr, { client: sn, children: [
3249
+ /* @__PURE__ */ i.jsx(Qi, { position: r, bouMenuItems: o, children: /* @__PURE__ */ i.jsx(Zi, {}) }),
3250
+ /* @__PURE__ */ i.jsx(Ji, {})
3251
+ ] }) }) }) });
3347
3252
  export {
3348
- un as default
3253
+ an as default
3349
3254
  };