@myxtra/authentication-green 2.15.0 → 2.17.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,17 +1,17 @@
1
- var Et = (e) => {
1
+ var kt = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
- var rt = (e, t, s) => t.has(e) || Et("Cannot " + s);
5
- var n = (e, t, s) => (rt(e, t, "read from private field"), s ? s.call(e) : t.get(e)), y = (e, t, s) => t.has(e) ? Et("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), p = (e, t, s, r) => (rt(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s), w = (e, t, s) => (rt(e, t, "access private method"), s);
6
- var ze = (e, t, s, r) => ({
7
- set _(a) {
8
- p(e, t, a, s);
4
+ var it = (e, t, s) => t.has(e) || kt("Cannot " + s);
5
+ var a = (e, t, s) => (it(e, t, "read from private field"), s ? s.call(e) : t.get(e)), y = (e, t, s) => t.has(e) ? kt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), p = (e, t, s, r) => (it(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s), w = (e, t, s) => (it(e, t, "access private method"), s);
6
+ var Ye = (e, t, s, r) => ({
7
+ set _(n) {
8
+ p(e, t, n, s);
9
9
  },
10
10
  get _() {
11
- return n(e, t, r);
11
+ return a(e, t, r);
12
12
  }
13
13
  });
14
- import { r as f, j as i, u as Fs, a as Ds, b as je, P as Pt, c as Xt, d as Ts, e as Us, E as Qs, C as Hs } from "./index-C6YE3hyL.js";
14
+ import { r as f, j as i, u as Qs, a as Hs, b as je, P as At, c as ts, d as Ks, e as Gs, E as qs, C as Ws } from "./index-BEO_i3HI.js";
15
15
  var He = class {
16
16
  constructor() {
17
17
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
@@ -31,46 +31,46 @@ var He = class {
31
31
  }, Qe = typeof window > "u" || "Deno" in globalThis;
32
32
  function $() {
33
33
  }
34
- function Ks(e, t) {
34
+ function Vs(e, t) {
35
35
  return typeof e == "function" ? e(t) : e;
36
36
  }
37
- function nt(e) {
37
+ function at(e) {
38
38
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
39
39
  }
40
- function It(e, t) {
40
+ function ss(e, t) {
41
41
  return Math.max(e + (t || 0) - Date.now(), 0);
42
42
  }
43
43
  function Se(e, t) {
44
44
  return typeof e == "function" ? e(t) : e;
45
45
  }
46
- function z(e, t) {
46
+ function Y(e, t) {
47
47
  return typeof e == "function" ? e(t) : e;
48
48
  }
49
- function At(e, t) {
49
+ function Nt(e, t) {
50
50
  const {
51
51
  type: s = "all",
52
52
  exact: r,
53
- fetchStatus: a,
53
+ fetchStatus: n,
54
54
  predicate: l,
55
55
  queryKey: o,
56
56
  stale: c
57
57
  } = e;
58
58
  if (o) {
59
59
  if (r) {
60
- if (t.queryHash !== xt(o, t.options))
60
+ if (t.queryHash !== wt(o, t.options))
61
61
  return !1;
62
62
  } else if (!Ge(t.queryKey, o))
63
63
  return !1;
64
64
  }
65
65
  if (s !== "all") {
66
- const v = t.isActive();
67
- if (s === "active" && !v || s === "inactive" && v)
66
+ const d = t.isActive();
67
+ if (s === "active" && !d || s === "inactive" && d)
68
68
  return !1;
69
69
  }
70
- return !(typeof c == "boolean" && t.isStale() !== c || a && a !== t.state.fetchStatus || l && !l(t));
70
+ return !(typeof c == "boolean" && t.isStale() !== c || n && n !== t.state.fetchStatus || l && !l(t));
71
71
  }
72
- function kt(e, t) {
73
- const { exact: s, status: r, predicate: a, mutationKey: l } = e;
72
+ function Mt(e, t) {
73
+ const { exact: s, status: r, predicate: n, mutationKey: l } = e;
74
74
  if (l) {
75
75
  if (!t.options.mutationKey)
76
76
  return !1;
@@ -80,36 +80,36 @@ function kt(e, t) {
80
80
  } else if (!Ge(t.options.mutationKey, l))
81
81
  return !1;
82
82
  }
83
- return !(r && t.state.status !== r || a && !a(t));
83
+ return !(r && t.state.status !== r || n && !n(t));
84
84
  }
85
- function xt(e, t) {
85
+ function wt(e, t) {
86
86
  return ((t == null ? void 0 : t.queryKeyHashFn) || be)(e);
87
87
  }
88
88
  function be(e) {
89
89
  return JSON.stringify(
90
90
  e,
91
- (t, s) => at(s) ? Object.keys(s).sort().reduce((r, a) => (r[a] = s[a], r), {}) : s
91
+ (t, s) => ot(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
92
92
  );
93
93
  }
94
94
  function Ge(e, t) {
95
95
  return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Ge(e[s], t[s])) : !1;
96
96
  }
97
- function Bt(e, t) {
97
+ function rs(e, t) {
98
98
  if (e === t)
99
99
  return e;
100
- const s = Nt(e) && Nt(t);
101
- if (s || at(e) && at(t)) {
102
- const r = s ? e : Object.keys(e), a = r.length, l = s ? t : Object.keys(t), o = l.length, c = s ? [] : {};
103
- let v = 0;
104
- for (let g = 0; g < o; g++) {
105
- const h = s ? g : l[g];
106
- (!s && r.includes(h) || s) && e[h] === void 0 && t[h] === void 0 ? (c[h] = void 0, v++) : (c[h] = Bt(e[h], t[h]), c[h] === e[h] && e[h] !== void 0 && v++);
100
+ const s = Rt(e) && Rt(t);
101
+ if (s || ot(e) && ot(t)) {
102
+ const r = s ? e : Object.keys(e), n = r.length, l = s ? t : Object.keys(t), o = l.length, c = s ? [] : {};
103
+ let d = 0;
104
+ for (let m = 0; m < o; m++) {
105
+ const h = s ? m : l[m];
106
+ (!s && r.includes(h) || s) && e[h] === void 0 && t[h] === void 0 ? (c[h] = void 0, d++) : (c[h] = rs(e[h], t[h]), c[h] === e[h] && e[h] !== void 0 && d++);
107
107
  }
108
- return a === o && v === a ? e : c;
108
+ return n === o && d === n ? e : c;
109
109
  }
110
110
  return t;
111
111
  }
112
- function Ie(e, t) {
112
+ function Be(e, t) {
113
113
  if (!t || Object.keys(e).length !== Object.keys(t).length)
114
114
  return !1;
115
115
  for (const s in e)
@@ -117,42 +117,42 @@ function Ie(e, t) {
117
117
  return !1;
118
118
  return !0;
119
119
  }
120
- function Nt(e) {
120
+ function Rt(e) {
121
121
  return Array.isArray(e) && e.length === Object.keys(e).length;
122
122
  }
123
- function at(e) {
124
- if (!Mt(e))
123
+ function ot(e) {
124
+ if (!Ot(e))
125
125
  return !1;
126
126
  const t = e.constructor;
127
127
  if (t === void 0)
128
128
  return !0;
129
129
  const s = t.prototype;
130
- return !(!Mt(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
130
+ return !(!Ot(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
131
131
  }
132
- function Mt(e) {
132
+ function Ot(e) {
133
133
  return Object.prototype.toString.call(e) === "[object Object]";
134
134
  }
135
- function Gs(e) {
135
+ function $s(e) {
136
136
  return new Promise((t) => {
137
137
  setTimeout(t, e);
138
138
  });
139
139
  }
140
- function ot(e, t, s) {
141
- return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? Bt(e, t) : t;
140
+ function lt(e, t, s) {
141
+ return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? rs(e, t) : t;
142
142
  }
143
- function qs(e, t, s = 0) {
143
+ function Zs(e, t, s = 0) {
144
144
  const r = [...e, t];
145
145
  return s && r.length > s ? r.slice(1) : r;
146
146
  }
147
- function Ws(e, t, s = 0) {
147
+ function zs(e, t, s = 0) {
148
148
  const r = [t, ...e];
149
149
  return s && r.length > s ? r.slice(0, -1) : r;
150
150
  }
151
- var es = Symbol();
152
- function ts(e, t) {
153
- return !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === es ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
151
+ var is = Symbol();
152
+ function ns(e, t) {
153
+ return !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === is ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
154
154
  }
155
- var pe, ae, Ee, Kt, Vs = (Kt = class extends He {
155
+ var pe, ae, Ee, Vt, Ys = (Vt = class extends He {
156
156
  constructor() {
157
157
  super();
158
158
  y(this, pe);
@@ -168,20 +168,20 @@ var pe, ae, Ee, Kt, Vs = (Kt = class extends He {
168
168
  });
169
169
  }
170
170
  onSubscribe() {
171
- n(this, ae) || this.setEventListener(n(this, Ee));
171
+ a(this, ae) || this.setEventListener(a(this, Ee));
172
172
  }
173
173
  onUnsubscribe() {
174
174
  var t;
175
- this.hasListeners() || ((t = n(this, ae)) == null || t.call(this), p(this, ae, void 0));
175
+ this.hasListeners() || ((t = a(this, ae)) == null || t.call(this), p(this, ae, void 0));
176
176
  }
177
177
  setEventListener(t) {
178
178
  var s;
179
- p(this, Ee, t), (s = n(this, ae)) == null || s.call(this), p(this, ae, t((r) => {
179
+ p(this, Ee, t), (s = a(this, ae)) == null || s.call(this), p(this, ae, t((r) => {
180
180
  typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
181
181
  }));
182
182
  }
183
183
  setFocused(t) {
184
- n(this, pe) !== t && (p(this, pe, t), this.onFocus());
184
+ a(this, pe) !== t && (p(this, pe, t), this.onFocus());
185
185
  }
186
186
  onFocus() {
187
187
  const t = this.isFocused();
@@ -191,15 +191,15 @@ var pe, ae, Ee, Kt, Vs = (Kt = class extends He {
191
191
  }
192
192
  isFocused() {
193
193
  var t;
194
- return typeof n(this, pe) == "boolean" ? n(this, pe) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
194
+ return typeof a(this, pe) == "boolean" ? a(this, pe) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
195
195
  }
196
- }, pe = new WeakMap(), ae = new WeakMap(), Ee = new WeakMap(), Kt), bt = new Vs(), Pe, oe, Ae, Gt, $s = (Gt = class extends He {
196
+ }, pe = new WeakMap(), ae = new WeakMap(), Ee = new WeakMap(), Vt), jt = new Ys(), Pe, oe, ke, $t, Js = ($t = class extends He {
197
197
  constructor() {
198
198
  super();
199
199
  y(this, Pe, !0);
200
200
  y(this, oe);
201
- y(this, Ae);
202
- p(this, Ae, (t) => {
201
+ y(this, ke);
202
+ p(this, ke, (t) => {
203
203
  if (!Qe && window.addEventListener) {
204
204
  const s = () => t(!0), r = () => t(!1);
205
205
  return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
@@ -209,65 +209,65 @@ var pe, ae, Ee, Kt, Vs = (Kt = class extends He {
209
209
  });
210
210
  }
211
211
  onSubscribe() {
212
- n(this, oe) || this.setEventListener(n(this, Ae));
212
+ a(this, oe) || this.setEventListener(a(this, ke));
213
213
  }
214
214
  onUnsubscribe() {
215
215
  var t;
216
- this.hasListeners() || ((t = n(this, oe)) == null || t.call(this), p(this, oe, void 0));
216
+ this.hasListeners() || ((t = a(this, oe)) == null || t.call(this), p(this, oe, void 0));
217
217
  }
218
218
  setEventListener(t) {
219
219
  var s;
220
- p(this, Ae, t), (s = n(this, oe)) == null || s.call(this), p(this, oe, t(this.setOnline.bind(this)));
220
+ p(this, ke, t), (s = a(this, oe)) == null || s.call(this), p(this, oe, t(this.setOnline.bind(this)));
221
221
  }
222
222
  setOnline(t) {
223
- n(this, Pe) !== t && (p(this, Pe, t), this.listeners.forEach((r) => {
223
+ a(this, Pe) !== t && (p(this, Pe, t), this.listeners.forEach((r) => {
224
224
  r(t);
225
225
  }));
226
226
  }
227
227
  isOnline() {
228
- return n(this, Pe);
228
+ return a(this, Pe);
229
229
  }
230
- }, Pe = new WeakMap(), oe = new WeakMap(), Ae = new WeakMap(), Gt), Be = new $s();
231
- function Zs(e) {
230
+ }, Pe = new WeakMap(), oe = new WeakMap(), ke = new WeakMap(), $t), et = new Js();
231
+ function Xs(e) {
232
232
  return Math.min(1e3 * 2 ** e, 3e4);
233
233
  }
234
- function ss(e) {
235
- return (e ?? "online") === "online" ? Be.isOnline() : !0;
234
+ function as(e) {
235
+ return (e ?? "online") === "online" ? et.isOnline() : !0;
236
236
  }
237
- var rs = class extends Error {
237
+ var os = class extends Error {
238
238
  constructor(e) {
239
239
  super("CancelledError"), this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
240
240
  }
241
241
  };
242
- function it(e) {
243
- return e instanceof rs;
242
+ function nt(e) {
243
+ return e instanceof os;
244
244
  }
245
- function is(e) {
246
- let t = !1, s = 0, r = !1, a, l, o;
245
+ function ls(e) {
246
+ let t = !1, s = 0, r = !1, n, l, o;
247
247
  const c = new Promise((C, j) => {
248
248
  l = C, o = j;
249
- }), v = (C) => {
249
+ }), d = (C) => {
250
250
  var j;
251
- r || (S(new rs(C)), (j = e.abort) == null || j.call(e));
252
- }, g = () => {
251
+ r || (S(new os(C)), (j = e.abort) == null || j.call(e));
252
+ }, m = () => {
253
253
  t = !0;
254
254
  }, h = () => {
255
255
  t = !1;
256
- }, u = () => bt.isFocused() && (e.networkMode === "always" || Be.isOnline()) && e.canRun(), d = () => ss(e.networkMode) && e.canRun(), m = (C) => {
256
+ }, u = () => jt.isFocused() && (e.networkMode === "always" || et.isOnline()) && e.canRun(), v = () => as(e.networkMode) && e.canRun(), g = (C) => {
257
257
  var j;
258
- r || (r = !0, (j = e.onSuccess) == null || j.call(e, C), a == null || a(), l(C));
258
+ r || (r = !0, (j = e.onSuccess) == null || j.call(e, C), n == null || n(), l(C));
259
259
  }, S = (C) => {
260
260
  var j;
261
- r || (r = !0, (j = e.onError) == null || j.call(e, C), a == null || a(), o(C));
262
- }, P = () => new Promise((C) => {
261
+ r || (r = !0, (j = e.onError) == null || j.call(e, C), n == null || n(), o(C));
262
+ }, _ = () => new Promise((C) => {
263
263
  var j;
264
- a = (b) => {
264
+ n = (b) => {
265
265
  (r || u()) && C(b);
266
266
  }, (j = e.onPause) == null || j.call(e);
267
267
  }).then(() => {
268
268
  var C;
269
- a = void 0, r || (C = e.onContinue) == null || C.call(e);
270
- }), k = () => {
269
+ n = void 0, r || (C = e.onContinue) == null || C.call(e);
270
+ }), P = () => {
271
271
  if (r)
272
272
  return;
273
273
  let C;
@@ -277,79 +277,90 @@ function is(e) {
277
277
  } catch (b) {
278
278
  C = Promise.reject(b);
279
279
  }
280
- Promise.resolve(C).then(m).catch((b) => {
281
- var E;
280
+ Promise.resolve(C).then(g).catch((b) => {
281
+ var k;
282
282
  if (r)
283
283
  return;
284
- const M = e.retry ?? (Qe ? 0 : 3), R = e.retryDelay ?? Zs, J = typeof R == "function" ? R(s, b) : R, te = M === !0 || typeof M == "number" && s < M || typeof M == "function" && M(s, b);
284
+ const M = e.retry ?? (Qe ? 0 : 3), F = e.retryDelay ?? Xs, J = typeof F == "function" ? F(s, b) : F, te = M === !0 || typeof M == "number" && s < M || typeof M == "function" && M(s, b);
285
285
  if (t || !te) {
286
286
  S(b);
287
287
  return;
288
288
  }
289
- s++, (E = e.onFail) == null || E.call(e, s, b), Gs(J).then(() => u() ? void 0 : P()).then(() => {
290
- t ? S(b) : k();
289
+ s++, (k = e.onFail) == null || k.call(e, s, b), $s(J).then(() => u() ? void 0 : _()).then(() => {
290
+ t ? S(b) : P();
291
291
  });
292
292
  });
293
293
  };
294
294
  return {
295
295
  promise: c,
296
- cancel: v,
297
- continue: () => (a == null || a(), c),
298
- cancelRetry: g,
296
+ cancel: d,
297
+ continue: () => (n == null || n(), c),
298
+ cancelRetry: m,
299
299
  continueRetry: h,
300
- canStart: d,
301
- start: () => (d() ? k() : P().then(k), c)
300
+ canStart: v,
301
+ start: () => (v() ? P() : _().then(P), c)
302
302
  };
303
303
  }
304
- function Ys() {
305
- let e = [], t = 0, s = (d) => {
306
- d();
307
- }, r = (d) => {
308
- d();
309
- }, a = (d) => setTimeout(d, 0);
310
- const l = (d) => {
311
- a = d;
312
- }, o = (d) => {
313
- let m;
314
- t++;
315
- try {
316
- m = d();
317
- } finally {
318
- t--, t || g();
319
- }
320
- return m;
321
- }, c = (d) => {
322
- t ? e.push(d) : a(() => {
323
- s(d);
324
- });
325
- }, v = (d) => (...m) => {
326
- c(() => {
327
- d(...m);
304
+ function Is() {
305
+ let e = [], t = 0, s = (c) => {
306
+ c();
307
+ }, r = (c) => {
308
+ c();
309
+ }, n = (c) => setTimeout(c, 0);
310
+ const l = (c) => {
311
+ t ? e.push(c) : n(() => {
312
+ s(c);
328
313
  });
329
- }, g = () => {
330
- const d = e;
331
- e = [], d.length && a(() => {
314
+ }, o = () => {
315
+ const c = e;
316
+ e = [], c.length && n(() => {
332
317
  r(() => {
333
- d.forEach((m) => {
334
- s(m);
318
+ c.forEach((d) => {
319
+ s(d);
335
320
  });
336
321
  });
337
322
  });
338
323
  };
339
324
  return {
340
- batch: o,
341
- batchCalls: v,
342
- schedule: c,
343
- setNotifyFunction: (d) => {
344
- s = d;
325
+ batch: (c) => {
326
+ let d;
327
+ t++;
328
+ try {
329
+ d = c();
330
+ } finally {
331
+ t--, t || o();
332
+ }
333
+ return d;
334
+ },
335
+ /**
336
+ * All calls to the wrapped function will be batched.
337
+ */
338
+ batchCalls: (c) => (...d) => {
339
+ l(() => {
340
+ c(...d);
341
+ });
342
+ },
343
+ schedule: l,
344
+ /**
345
+ * Use this method to set a custom notify function.
346
+ * This can be used to for example wrap notifications with `React.act` while running tests.
347
+ */
348
+ setNotifyFunction: (c) => {
349
+ s = c;
345
350
  },
346
- setBatchNotifyFunction: (d) => {
347
- r = d;
351
+ /**
352
+ * Use this method to set a custom function to batch notifications together into a single tick.
353
+ * By default React Query will use the batch function provided by ReactDOM or React Native.
354
+ */
355
+ setBatchNotifyFunction: (c) => {
356
+ r = c;
348
357
  },
349
- setScheduler: l
358
+ setScheduler: (c) => {
359
+ n = c;
360
+ }
350
361
  };
351
362
  }
352
- var D = Ys(), me, qt, ns = (qt = class {
363
+ var D = Is(), me, Zt, cs = (Zt = class {
353
364
  constructor() {
354
365
  y(this, me);
355
366
  }
@@ -357,7 +368,7 @@ var D = Ys(), me, qt, ns = (qt = class {
357
368
  this.clearGcTimeout();
358
369
  }
359
370
  scheduleGc() {
360
- this.clearGcTimeout(), nt(this.gcTime) && p(this, me, setTimeout(() => {
371
+ this.clearGcTimeout(), at(this.gcTime) && p(this, me, setTimeout(() => {
361
372
  this.optionalRemove();
362
373
  }, this.gcTime));
363
374
  }
@@ -368,36 +379,36 @@ var D = Ys(), me, qt, ns = (qt = class {
368
379
  );
369
380
  }
370
381
  clearGcTimeout() {
371
- n(this, me) && (clearTimeout(n(this, me)), p(this, me, void 0));
382
+ a(this, me) && (clearTimeout(a(this, me)), p(this, me, void 0));
372
383
  }
373
- }, me = new WeakMap(), qt), ke, Ne, V, T, qe, ve, Y, se, Wt, zs = (Wt = class extends ns {
384
+ }, me = new WeakMap(), Zt), Ae, Ne, V, T, qe, ve, z, se, zt, Bs = (zt = class extends cs {
374
385
  constructor(t) {
375
386
  super();
376
- y(this, Y);
377
- y(this, ke);
387
+ y(this, z);
388
+ y(this, Ae);
378
389
  y(this, Ne);
379
390
  y(this, V);
380
391
  y(this, T);
381
392
  y(this, qe);
382
393
  y(this, ve);
383
- p(this, ve, !1), p(this, qe, t.defaultOptions), this.setOptions(t.options), this.observers = [], p(this, V, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, p(this, ke, Js(this.options)), this.state = t.state ?? n(this, ke), this.scheduleGc();
394
+ p(this, ve, !1), p(this, qe, t.defaultOptions), this.setOptions(t.options), this.observers = [], p(this, V, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, p(this, Ae, er(this.options)), this.state = t.state ?? a(this, Ae), this.scheduleGc();
384
395
  }
385
396
  get meta() {
386
397
  return this.options.meta;
387
398
  }
388
399
  get promise() {
389
400
  var t;
390
- return (t = n(this, T)) == null ? void 0 : t.promise;
401
+ return (t = a(this, T)) == null ? void 0 : t.promise;
391
402
  }
392
403
  setOptions(t) {
393
- this.options = { ...n(this, qe), ...t }, this.updateGcTime(this.options.gcTime);
404
+ this.options = { ...a(this, qe), ...t }, this.updateGcTime(this.options.gcTime);
394
405
  }
395
406
  optionalRemove() {
396
- !this.observers.length && this.state.fetchStatus === "idle" && n(this, V).remove(this);
407
+ !this.observers.length && this.state.fetchStatus === "idle" && a(this, V).remove(this);
397
408
  }
398
409
  setData(t, s) {
399
- const r = ot(this.state.data, t, this.options);
400
- return w(this, Y, se).call(this, {
410
+ const r = lt(this.state.data, t, this.options);
411
+ return w(this, z, se).call(this, {
401
412
  data: r,
402
413
  type: "success",
403
414
  dataUpdatedAt: s == null ? void 0 : s.updatedAt,
@@ -405,22 +416,22 @@ var D = Ys(), me, qt, ns = (qt = class {
405
416
  }), r;
406
417
  }
407
418
  setState(t, s) {
408
- w(this, Y, se).call(this, { type: "setState", state: t, setStateOptions: s });
419
+ w(this, z, se).call(this, { type: "setState", state: t, setStateOptions: s });
409
420
  }
410
421
  cancel(t) {
411
- var r, a;
412
- const s = (r = n(this, T)) == null ? void 0 : r.promise;
413
- return (a = n(this, T)) == null || a.cancel(t), s ? s.then($).catch($) : Promise.resolve();
422
+ var r, n;
423
+ const s = (r = a(this, T)) == null ? void 0 : r.promise;
424
+ return (n = a(this, T)) == null || n.cancel(t), s ? s.then($).catch($) : Promise.resolve();
414
425
  }
415
426
  destroy() {
416
427
  super.destroy(), this.cancel({ silent: !0 });
417
428
  }
418
429
  reset() {
419
- this.destroy(), this.setState(n(this, ke));
430
+ this.destroy(), this.setState(a(this, Ae));
420
431
  }
421
432
  isActive() {
422
433
  return this.observers.some(
423
- (t) => z(t.options.enabled, this) !== !1
434
+ (t) => Y(t.options.enabled, this) !== !1
424
435
  );
425
436
  }
426
437
  isDisabled() {
@@ -432,57 +443,57 @@ var D = Ys(), me, qt, ns = (qt = class {
432
443
  ) : this.state.data === void 0;
433
444
  }
434
445
  isStaleByTime(t = 0) {
435
- return this.state.isInvalidated || this.state.data === void 0 || !It(this.state.dataUpdatedAt, t);
446
+ return this.state.isInvalidated || this.state.data === void 0 || !ss(this.state.dataUpdatedAt, t);
436
447
  }
437
448
  onFocus() {
438
449
  var s;
439
450
  const t = this.observers.find((r) => r.shouldFetchOnWindowFocus());
440
- t == null || t.refetch({ cancelRefetch: !1 }), (s = n(this, T)) == null || s.continue();
451
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = a(this, T)) == null || s.continue();
441
452
  }
442
453
  onOnline() {
443
454
  var s;
444
455
  const t = this.observers.find((r) => r.shouldFetchOnReconnect());
445
- t == null || t.refetch({ cancelRefetch: !1 }), (s = n(this, T)) == null || s.continue();
456
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = a(this, T)) == null || s.continue();
446
457
  }
447
458
  addObserver(t) {
448
- this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), n(this, V).notify({ type: "observerAdded", query: this, observer: t }));
459
+ this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), a(this, V).notify({ type: "observerAdded", query: this, observer: t }));
449
460
  }
450
461
  removeObserver(t) {
451
- this.observers.includes(t) && (this.observers = this.observers.filter((s) => s !== t), this.observers.length || (n(this, T) && (n(this, ve) ? n(this, T).cancel({ revert: !0 }) : n(this, T).cancelRetry()), this.scheduleGc()), n(this, V).notify({ type: "observerRemoved", query: this, observer: t }));
462
+ this.observers.includes(t) && (this.observers = this.observers.filter((s) => s !== t), this.observers.length || (a(this, T) && (a(this, ve) ? a(this, T).cancel({ revert: !0 }) : a(this, T).cancelRetry()), this.scheduleGc()), a(this, V).notify({ type: "observerRemoved", query: this, observer: t }));
452
463
  }
453
464
  getObserversCount() {
454
465
  return this.observers.length;
455
466
  }
456
467
  invalidate() {
457
- this.state.isInvalidated || w(this, Y, se).call(this, { type: "invalidate" });
468
+ this.state.isInvalidated || w(this, z, se).call(this, { type: "invalidate" });
458
469
  }
459
470
  fetch(t, s) {
460
- var v, g, h;
471
+ var d, m, h;
461
472
  if (this.state.fetchStatus !== "idle") {
462
473
  if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
463
474
  this.cancel({ silent: !0 });
464
- else if (n(this, T))
465
- return n(this, T).continueRetry(), n(this, T).promise;
475
+ else if (a(this, T))
476
+ return a(this, T).continueRetry(), a(this, T).promise;
466
477
  }
467
478
  if (t && this.setOptions(t), !this.options.queryFn) {
468
- const u = this.observers.find((d) => d.options.queryFn);
479
+ const u = this.observers.find((v) => v.options.queryFn);
469
480
  u && this.setOptions(u.options);
470
481
  }
471
- const r = new AbortController(), a = (u) => {
482
+ const r = new AbortController(), n = (u) => {
472
483
  Object.defineProperty(u, "signal", {
473
484
  enumerable: !0,
474
485
  get: () => (p(this, ve, !0), r.signal)
475
486
  });
476
487
  }, l = () => {
477
- const u = ts(this.options, s), d = {
488
+ const u = ns(this.options, s), v = {
478
489
  queryKey: this.queryKey,
479
490
  meta: this.meta
480
491
  };
481
- return a(d), p(this, ve, !1), this.options.persister ? this.options.persister(
492
+ return n(v), p(this, ve, !1), this.options.persister ? this.options.persister(
482
493
  u,
483
- d,
494
+ v,
484
495
  this
485
- ) : u(d);
496
+ ) : u(v);
486
497
  }, o = {
487
498
  fetchOptions: s,
488
499
  options: this.options,
@@ -490,37 +501,43 @@ var D = Ys(), me, qt, ns = (qt = class {
490
501
  state: this.state,
491
502
  fetchFn: l
492
503
  };
493
- a(o), (v = this.options.behavior) == null || v.onFetch(
504
+ n(o), (d = this.options.behavior) == null || d.onFetch(
494
505
  o,
495
506
  this
496
- ), p(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((g = o.fetchOptions) == null ? void 0 : g.meta)) && w(this, Y, se).call(this, { type: "fetch", meta: (h = o.fetchOptions) == null ? void 0 : h.meta });
507
+ ), p(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((m = o.fetchOptions) == null ? void 0 : m.meta)) && w(this, z, se).call(this, { type: "fetch", meta: (h = o.fetchOptions) == null ? void 0 : h.meta });
497
508
  const c = (u) => {
498
- var d, m, S, P;
499
- it(u) && u.silent || w(this, Y, se).call(this, {
509
+ var v, g, S, _;
510
+ nt(u) && u.silent || w(this, z, se).call(this, {
500
511
  type: "error",
501
512
  error: u
502
- }), it(u) || ((m = (d = n(this, V).config).onError) == null || m.call(
503
- d,
513
+ }), nt(u) || ((g = (v = a(this, V).config).onError) == null || g.call(
514
+ v,
504
515
  u,
505
516
  this
506
- ), (P = (S = n(this, V).config).onSettled) == null || P.call(
517
+ ), (_ = (S = a(this, V).config).onSettled) == null || _.call(
507
518
  S,
508
519
  this.state.data,
509
520
  u,
510
521
  this
511
522
  )), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
512
523
  };
513
- return p(this, T, is({
524
+ return p(this, T, ls({
514
525
  initialPromise: s == null ? void 0 : s.initialPromise,
515
526
  fn: o.fetchFn,
516
527
  abort: r.abort.bind(r),
517
528
  onSuccess: (u) => {
518
- var d, m, S, P;
529
+ var v, g, S, _;
519
530
  if (u === void 0) {
520
531
  c(new Error(`${this.queryHash} data is undefined`));
521
532
  return;
522
533
  }
523
- this.setData(u), (m = (d = n(this, V).config).onSuccess) == null || m.call(d, u, this), (P = (S = n(this, V).config).onSettled) == null || P.call(
534
+ try {
535
+ this.setData(u);
536
+ } catch (P) {
537
+ c(P);
538
+ return;
539
+ }
540
+ (g = (v = a(this, V).config).onSuccess) == null || g.call(v, u, this), (_ = (S = a(this, V).config).onSettled) == null || _.call(
524
541
  S,
525
542
  u,
526
543
  this.state.error,
@@ -528,22 +545,22 @@ var D = Ys(), me, qt, ns = (qt = class {
528
545
  ), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
529
546
  },
530
547
  onError: c,
531
- onFail: (u, d) => {
532
- w(this, Y, se).call(this, { type: "failed", failureCount: u, error: d });
548
+ onFail: (u, v) => {
549
+ w(this, z, se).call(this, { type: "failed", failureCount: u, error: v });
533
550
  },
534
551
  onPause: () => {
535
- w(this, Y, se).call(this, { type: "pause" });
552
+ w(this, z, se).call(this, { type: "pause" });
536
553
  },
537
554
  onContinue: () => {
538
- w(this, Y, se).call(this, { type: "continue" });
555
+ w(this, z, se).call(this, { type: "continue" });
539
556
  },
540
557
  retry: o.options.retry,
541
558
  retryDelay: o.options.retryDelay,
542
559
  networkMode: o.options.networkMode,
543
560
  canRun: () => !0
544
- })), n(this, T).start();
561
+ })), a(this, T).start();
545
562
  }
546
- }, ke = new WeakMap(), Ne = new WeakMap(), V = new WeakMap(), T = new WeakMap(), qe = new WeakMap(), ve = new WeakMap(), Y = new WeakSet(), se = function(t) {
563
+ }, Ae = new WeakMap(), Ne = new WeakMap(), V = new WeakMap(), T = new WeakMap(), qe = new WeakMap(), ve = new WeakMap(), z = new WeakSet(), se = function(t) {
547
564
  const s = (r) => {
548
565
  switch (t.type) {
549
566
  case "failed":
@@ -565,7 +582,7 @@ var D = Ys(), me, qt, ns = (qt = class {
565
582
  case "fetch":
566
583
  return {
567
584
  ...r,
568
- ...as(r.data, this.options),
585
+ ...us(r.data, this.options),
569
586
  fetchMeta: t.meta ?? null
570
587
  };
571
588
  case "success":
@@ -584,14 +601,14 @@ var D = Ys(), me, qt, ns = (qt = class {
584
601
  }
585
602
  };
586
603
  case "error":
587
- const a = t.error;
588
- return it(a) && a.revert && n(this, Ne) ? { ...n(this, Ne), fetchStatus: "idle" } : {
604
+ const n = t.error;
605
+ return nt(n) && n.revert && a(this, Ne) ? { ...a(this, Ne), fetchStatus: "idle" } : {
589
606
  ...r,
590
- error: a,
607
+ error: n,
591
608
  errorUpdateCount: r.errorUpdateCount + 1,
592
609
  errorUpdatedAt: Date.now(),
593
610
  fetchFailureCount: r.fetchFailureCount + 1,
594
- fetchFailureReason: a,
611
+ fetchFailureReason: n,
595
612
  fetchStatus: "idle",
596
613
  status: "error"
597
614
  };
@@ -610,21 +627,21 @@ var D = Ys(), me, qt, ns = (qt = class {
610
627
  this.state = s(this.state), D.batch(() => {
611
628
  this.observers.forEach((r) => {
612
629
  r.onQueryUpdate();
613
- }), n(this, V).notify({ query: this, type: "updated", action: t });
630
+ }), a(this, V).notify({ query: this, type: "updated", action: t });
614
631
  });
615
- }, Wt);
616
- function as(e, t) {
632
+ }, zt);
633
+ function us(e, t) {
617
634
  return {
618
635
  fetchFailureCount: 0,
619
636
  fetchFailureReason: null,
620
- fetchStatus: ss(t.networkMode) ? "fetching" : "paused",
637
+ fetchStatus: as(t.networkMode) ? "fetching" : "paused",
621
638
  ...e === void 0 && {
622
639
  error: null,
623
640
  status: "pending"
624
641
  }
625
642
  };
626
643
  }
627
- function Js(e) {
644
+ function er(e) {
628
645
  const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
629
646
  return {
630
647
  data: t,
@@ -641,33 +658,33 @@ function Js(e) {
641
658
  fetchStatus: "idle"
642
659
  };
643
660
  }
644
- var X, Vt, Xs = (Vt = class extends He {
661
+ var X, Yt, tr = (Yt = class extends He {
645
662
  constructor(t = {}) {
646
663
  super();
647
664
  y(this, X);
648
665
  this.config = t, p(this, X, /* @__PURE__ */ new Map());
649
666
  }
650
667
  build(t, s, r) {
651
- const a = s.queryKey, l = s.queryHash ?? xt(a, s);
668
+ const n = s.queryKey, l = s.queryHash ?? wt(n, s);
652
669
  let o = this.get(l);
653
- return o || (o = new zs({
670
+ return o || (o = new Bs({
654
671
  cache: this,
655
- queryKey: a,
672
+ queryKey: n,
656
673
  queryHash: l,
657
674
  options: t.defaultQueryOptions(s),
658
675
  state: r,
659
- defaultOptions: t.getQueryDefaults(a)
676
+ defaultOptions: t.getQueryDefaults(n)
660
677
  }), this.add(o)), o;
661
678
  }
662
679
  add(t) {
663
- n(this, X).has(t.queryHash) || (n(this, X).set(t.queryHash, t), this.notify({
680
+ a(this, X).has(t.queryHash) || (a(this, X).set(t.queryHash, t), this.notify({
664
681
  type: "added",
665
682
  query: t
666
683
  }));
667
684
  }
668
685
  remove(t) {
669
- const s = n(this, X).get(t.queryHash);
670
- s && (t.destroy(), s === t && n(this, X).delete(t.queryHash), this.notify({ type: "removed", query: t }));
686
+ const s = a(this, X).get(t.queryHash);
687
+ s && (t.destroy(), s === t && a(this, X).delete(t.queryHash), this.notify({ type: "removed", query: t }));
671
688
  }
672
689
  clear() {
673
690
  D.batch(() => {
@@ -677,20 +694,20 @@ var X, Vt, Xs = (Vt = class extends He {
677
694
  });
678
695
  }
679
696
  get(t) {
680
- return n(this, X).get(t);
697
+ return a(this, X).get(t);
681
698
  }
682
699
  getAll() {
683
- return [...n(this, X).values()];
700
+ return [...a(this, X).values()];
684
701
  }
685
702
  find(t) {
686
703
  const s = { exact: !0, ...t };
687
704
  return this.getAll().find(
688
- (r) => At(s, r)
705
+ (r) => Nt(s, r)
689
706
  );
690
707
  }
691
708
  findAll(t = {}) {
692
709
  const s = this.getAll();
693
- return Object.keys(t).length > 0 ? s.filter((r) => At(t, r)) : s;
710
+ return Object.keys(t).length > 0 ? s.filter((r) => Nt(t, r)) : s;
694
711
  }
695
712
  notify(t) {
696
713
  D.batch(() => {
@@ -713,14 +730,14 @@ var X, Vt, Xs = (Vt = class extends He {
713
730
  });
714
731
  });
715
732
  }
716
- }, X = new WeakMap(), Vt), I, U, ge, B, ne, $t, Is = ($t = class extends ns {
733
+ }, X = new WeakMap(), Yt), I, U, ge, B, ne, Jt, sr = (Jt = class extends cs {
717
734
  constructor(t) {
718
735
  super();
719
736
  y(this, B);
720
737
  y(this, I);
721
738
  y(this, U);
722
739
  y(this, ge);
723
- this.mutationId = t.mutationId, p(this, U, t.mutationCache), p(this, I, []), this.state = t.state || os(), this.setOptions(t.options), this.scheduleGc();
740
+ this.mutationId = t.mutationId, p(this, U, t.mutationCache), p(this, I, []), this.state = t.state || hs(), this.setOptions(t.options), this.scheduleGc();
724
741
  }
725
742
  setOptions(t) {
726
743
  this.options = t, this.updateGcTime(this.options.gcTime);
@@ -729,33 +746,33 @@ var X, Vt, Xs = (Vt = class extends He {
729
746
  return this.options.meta;
730
747
  }
731
748
  addObserver(t) {
732
- n(this, I).includes(t) || (n(this, I).push(t), this.clearGcTimeout(), n(this, U).notify({
749
+ a(this, I).includes(t) || (a(this, I).push(t), this.clearGcTimeout(), a(this, U).notify({
733
750
  type: "observerAdded",
734
751
  mutation: this,
735
752
  observer: t
736
753
  }));
737
754
  }
738
755
  removeObserver(t) {
739
- p(this, I, n(this, I).filter((s) => s !== t)), this.scheduleGc(), n(this, U).notify({
756
+ p(this, I, a(this, I).filter((s) => s !== t)), this.scheduleGc(), a(this, U).notify({
740
757
  type: "observerRemoved",
741
758
  mutation: this,
742
759
  observer: t
743
760
  });
744
761
  }
745
762
  optionalRemove() {
746
- n(this, I).length || (this.state.status === "pending" ? this.scheduleGc() : n(this, U).remove(this));
763
+ a(this, I).length || (this.state.status === "pending" ? this.scheduleGc() : a(this, U).remove(this));
747
764
  }
748
765
  continue() {
749
766
  var t;
750
- return ((t = n(this, ge)) == null ? void 0 : t.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
767
+ return ((t = a(this, ge)) == null ? void 0 : t.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
751
768
  this.execute(this.state.variables);
752
769
  }
753
770
  async execute(t) {
754
- var a, l, o, c, v, g, h, u, d, m, S, P, k, C, j, b, M, R, J, te;
755
- p(this, ge, is({
771
+ var n, l, o, c, d, m, h, u, v, g, S, _, P, C, j, b, M, F, J, te;
772
+ p(this, ge, ls({
756
773
  fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
757
- onFail: (E, Z) => {
758
- w(this, B, ne).call(this, { type: "failed", failureCount: E, error: Z });
774
+ onFail: (k, Z) => {
775
+ w(this, B, ne).call(this, { type: "failed", failureCount: k, error: Z });
759
776
  },
760
777
  onPause: () => {
761
778
  w(this, B, ne).call(this, { type: "pause" });
@@ -766,13 +783,13 @@ var X, Vt, Xs = (Vt = class extends He {
766
783
  retry: this.options.retry ?? 0,
767
784
  retryDelay: this.options.retryDelay,
768
785
  networkMode: this.options.networkMode,
769
- canRun: () => n(this, U).canRun(this)
786
+ canRun: () => a(this, U).canRun(this)
770
787
  }));
771
- const s = this.state.status === "pending", r = !n(this, ge).canStart();
788
+ const s = this.state.status === "pending", r = !a(this, ge).canStart();
772
789
  try {
773
790
  if (!s) {
774
- w(this, B, ne).call(this, { type: "pending", variables: t, isPaused: r }), await ((l = (a = n(this, U).config).onMutate) == null ? void 0 : l.call(
775
- a,
791
+ w(this, B, ne).call(this, { type: "pending", variables: t, isPaused: r }), await ((l = (n = a(this, U).config).onMutate) == null ? void 0 : l.call(
792
+ n,
776
793
  t,
777
794
  this
778
795
  ));
@@ -784,53 +801,53 @@ var X, Vt, Xs = (Vt = class extends He {
784
801
  isPaused: r
785
802
  });
786
803
  }
787
- const E = await n(this, ge).start();
788
- return await ((g = (v = n(this, U).config).onSuccess) == null ? void 0 : g.call(
789
- v,
790
- E,
804
+ const k = await a(this, ge).start();
805
+ return await ((m = (d = a(this, U).config).onSuccess) == null ? void 0 : m.call(
806
+ d,
807
+ k,
791
808
  t,
792
809
  this.state.context,
793
810
  this
794
- )), await ((u = (h = this.options).onSuccess) == null ? void 0 : u.call(h, E, t, this.state.context)), await ((m = (d = n(this, U).config).onSettled) == null ? void 0 : m.call(
795
- d,
796
- E,
811
+ )), await ((u = (h = this.options).onSuccess) == null ? void 0 : u.call(h, k, t, this.state.context)), await ((g = (v = a(this, U).config).onSettled) == null ? void 0 : g.call(
812
+ v,
813
+ k,
797
814
  null,
798
815
  this.state.variables,
799
816
  this.state.context,
800
817
  this
801
- )), await ((P = (S = this.options).onSettled) == null ? void 0 : P.call(S, E, null, t, this.state.context)), w(this, B, ne).call(this, { type: "success", data: E }), E;
802
- } catch (E) {
818
+ )), await ((_ = (S = this.options).onSettled) == null ? void 0 : _.call(S, k, null, t, this.state.context)), w(this, B, ne).call(this, { type: "success", data: k }), k;
819
+ } catch (k) {
803
820
  try {
804
- throw await ((C = (k = n(this, U).config).onError) == null ? void 0 : C.call(
821
+ throw await ((C = (P = a(this, U).config).onError) == null ? void 0 : C.call(
822
+ P,
805
823
  k,
806
- E,
807
824
  t,
808
825
  this.state.context,
809
826
  this
810
827
  )), await ((b = (j = this.options).onError) == null ? void 0 : b.call(
811
828
  j,
812
- E,
829
+ k,
813
830
  t,
814
831
  this.state.context
815
- )), await ((R = (M = n(this, U).config).onSettled) == null ? void 0 : R.call(
832
+ )), await ((F = (M = a(this, U).config).onSettled) == null ? void 0 : F.call(
816
833
  M,
817
834
  void 0,
818
- E,
835
+ k,
819
836
  this.state.variables,
820
837
  this.state.context,
821
838
  this
822
839
  )), await ((te = (J = this.options).onSettled) == null ? void 0 : te.call(
823
840
  J,
824
841
  void 0,
825
- E,
842
+ k,
826
843
  t,
827
844
  this.state.context
828
- )), E;
845
+ )), k;
829
846
  } finally {
830
- w(this, B, ne).call(this, { type: "error", error: E });
847
+ w(this, B, ne).call(this, { type: "error", error: k });
831
848
  }
832
849
  } finally {
833
- n(this, U).runNext(this);
850
+ a(this, U).runNext(this);
834
851
  }
835
852
  }
836
853
  }, I = new WeakMap(), U = new WeakMap(), ge = new WeakMap(), B = new WeakSet(), ne = function(t) {
@@ -888,16 +905,16 @@ var X, Vt, Xs = (Vt = class extends He {
888
905
  }
889
906
  };
890
907
  this.state = s(this.state), D.batch(() => {
891
- n(this, I).forEach((r) => {
908
+ a(this, I).forEach((r) => {
892
909
  r.onMutationUpdate(t);
893
- }), n(this, U).notify({
910
+ }), a(this, U).notify({
894
911
  mutation: this,
895
912
  type: "updated",
896
913
  action: t
897
914
  });
898
915
  });
899
- }, $t);
900
- function os() {
916
+ }, Jt);
917
+ function hs() {
901
918
  return {
902
919
  context: void 0,
903
920
  data: void 0,
@@ -910,7 +927,7 @@ function os() {
910
927
  submittedAt: 0
911
928
  };
912
929
  }
913
- var q, We, Zt, Bs = (Zt = class extends He {
930
+ var q, We, Xt, rr = (Xt = class extends He {
914
931
  constructor(t = {}) {
915
932
  super();
916
933
  y(this, q);
@@ -918,35 +935,35 @@ var q, We, Zt, Bs = (Zt = class extends He {
918
935
  this.config = t, p(this, q, /* @__PURE__ */ new Map()), p(this, We, Date.now());
919
936
  }
920
937
  build(t, s, r) {
921
- const a = new Is({
938
+ const n = new sr({
922
939
  mutationCache: this,
923
- mutationId: ++ze(this, We)._,
940
+ mutationId: ++Ye(this, We)._,
924
941
  options: t.defaultMutationOptions(s),
925
942
  state: r
926
943
  });
927
- return this.add(a), a;
944
+ return this.add(n), n;
928
945
  }
929
946
  add(t) {
930
- const s = Je(t), r = n(this, q).get(s) ?? [];
931
- r.push(t), n(this, q).set(s, r), this.notify({ type: "added", mutation: t });
947
+ const s = Je(t), r = a(this, q).get(s) ?? [];
948
+ r.push(t), a(this, q).set(s, r), this.notify({ type: "added", mutation: t });
932
949
  }
933
950
  remove(t) {
934
951
  var r;
935
952
  const s = Je(t);
936
- if (n(this, q).has(s)) {
937
- const a = (r = n(this, q).get(s)) == null ? void 0 : r.filter((l) => l !== t);
938
- a && (a.length === 0 ? n(this, q).delete(s) : n(this, q).set(s, a));
953
+ if (a(this, q).has(s)) {
954
+ const n = (r = a(this, q).get(s)) == null ? void 0 : r.filter((l) => l !== t);
955
+ n && (n.length === 0 ? a(this, q).delete(s) : a(this, q).set(s, n));
939
956
  }
940
957
  this.notify({ type: "removed", mutation: t });
941
958
  }
942
959
  canRun(t) {
943
960
  var r;
944
- const s = (r = n(this, q).get(Je(t))) == null ? void 0 : r.find((a) => a.state.status === "pending");
961
+ const s = (r = a(this, q).get(Je(t))) == null ? void 0 : r.find((n) => n.state.status === "pending");
945
962
  return !s || s === t;
946
963
  }
947
964
  runNext(t) {
948
965
  var r;
949
- const s = (r = n(this, q).get(Je(t))) == null ? void 0 : r.find((a) => a !== t && a.state.isPaused);
966
+ const s = (r = a(this, q).get(Je(t))) == null ? void 0 : r.find((n) => n !== t && n.state.isPaused);
950
967
  return (s == null ? void 0 : s.continue()) ?? Promise.resolve();
951
968
  }
952
969
  clear() {
@@ -957,16 +974,16 @@ var q, We, Zt, Bs = (Zt = class extends He {
957
974
  });
958
975
  }
959
976
  getAll() {
960
- return [...n(this, q).values()].flat();
977
+ return [...a(this, q).values()].flat();
961
978
  }
962
979
  find(t) {
963
980
  const s = { exact: !0, ...t };
964
981
  return this.getAll().find(
965
- (r) => kt(s, r)
982
+ (r) => Mt(s, r)
966
983
  );
967
984
  }
968
985
  findAll(t = {}) {
969
- return this.getAll().filter((s) => kt(t, s));
986
+ return this.getAll().filter((s) => Mt(t, s));
970
987
  }
971
988
  notify(t) {
972
989
  D.batch(() => {
@@ -983,72 +1000,68 @@ var q, We, Zt, Bs = (Zt = class extends He {
983
1000
  )
984
1001
  );
985
1002
  }
986
- }, q = new WeakMap(), We = new WeakMap(), Zt);
1003
+ }, q = new WeakMap(), We = new WeakMap(), Xt);
987
1004
  function Je(e) {
988
1005
  var t;
989
1006
  return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
990
1007
  }
991
- function er(e) {
1008
+ function Lt(e) {
992
1009
  return {
993
1010
  onFetch: (t, s) => {
994
- const r = async () => {
995
- var S, P, k, C, j;
996
- const a = t.options, l = (k = (P = (S = t.fetchOptions) == null ? void 0 : S.meta) == null ? void 0 : P.fetchMore) == null ? void 0 : k.direction, o = ((C = t.state.data) == null ? void 0 : C.pages) || [], c = ((j = t.state.data) == null ? void 0 : j.pageParams) || [], v = { pages: [], pageParams: [] };
997
- let g = !1;
998
- const h = (b) => {
1011
+ var h, u, v, g, S;
1012
+ const r = t.options, n = (v = (u = (h = t.fetchOptions) == null ? void 0 : h.meta) == null ? void 0 : u.fetchMore) == null ? void 0 : v.direction, l = ((g = t.state.data) == null ? void 0 : g.pages) || [], o = ((S = t.state.data) == null ? void 0 : S.pageParams) || [];
1013
+ let c = { pages: [], pageParams: [] }, d = 0;
1014
+ const m = async () => {
1015
+ let _ = !1;
1016
+ const P = (b) => {
999
1017
  Object.defineProperty(b, "signal", {
1000
1018
  enumerable: !0,
1001
- get: () => (t.signal.aborted ? g = !0 : t.signal.addEventListener("abort", () => {
1002
- g = !0;
1019
+ get: () => (t.signal.aborted ? _ = !0 : t.signal.addEventListener("abort", () => {
1020
+ _ = !0;
1003
1021
  }), t.signal)
1004
1022
  });
1005
- }, u = ts(t.options, t.fetchOptions), d = async (b, M, R) => {
1006
- if (g)
1023
+ }, C = ns(t.options, t.fetchOptions), j = async (b, M, F) => {
1024
+ if (_)
1007
1025
  return Promise.reject();
1008
1026
  if (M == null && b.pages.length)
1009
1027
  return Promise.resolve(b);
1010
1028
  const J = {
1011
1029
  queryKey: t.queryKey,
1012
1030
  pageParam: M,
1013
- direction: R ? "backward" : "forward",
1031
+ direction: F ? "backward" : "forward",
1014
1032
  meta: t.options.meta
1015
1033
  };
1016
- h(J);
1017
- const te = await u(
1034
+ P(J);
1035
+ const te = await C(
1018
1036
  J
1019
- ), { maxPages: E } = t.options, Z = R ? Ws : qs;
1037
+ ), { maxPages: k } = t.options, Z = F ? zs : Zs;
1020
1038
  return {
1021
- pages: Z(b.pages, te, E),
1022
- pageParams: Z(b.pageParams, M, E)
1039
+ pages: Z(b.pages, te, k),
1040
+ pageParams: Z(b.pageParams, M, k)
1023
1041
  };
1024
1042
  };
1025
- let m;
1026
- if (l && o.length) {
1027
- const b = l === "backward", M = b ? tr : Ot, R = {
1028
- pages: o,
1029
- pageParams: c
1030
- }, J = M(a, R);
1031
- m = await d(R, J, b);
1043
+ if (n && l.length) {
1044
+ const b = n === "backward", M = b ? ir : Ft, F = {
1045
+ pages: l,
1046
+ pageParams: o
1047
+ }, J = M(r, F);
1048
+ c = await j(F, J, b);
1032
1049
  } else {
1033
- m = await d(
1034
- v,
1035
- c[0] ?? a.initialPageParam
1036
- );
1037
- const b = e ?? o.length;
1038
- for (let M = 1; M < b; M++) {
1039
- const R = Ot(a, m);
1040
- if (R == null)
1050
+ const b = e ?? l.length;
1051
+ do {
1052
+ const M = d === 0 ? o[0] ?? r.initialPageParam : Ft(r, c);
1053
+ if (d > 0 && M == null)
1041
1054
  break;
1042
- m = await d(m, R);
1043
- }
1055
+ c = await j(c, M), d++;
1056
+ } while (d < b);
1044
1057
  }
1045
- return m;
1058
+ return c;
1046
1059
  };
1047
1060
  t.options.persister ? t.fetchFn = () => {
1048
- var a, l;
1049
- return (l = (a = t.options).persister) == null ? void 0 : l.call(
1050
- a,
1051
- r,
1061
+ var _, P;
1062
+ return (P = (_ = t.options).persister) == null ? void 0 : P.call(
1063
+ _,
1064
+ m,
1052
1065
  {
1053
1066
  queryKey: t.queryKey,
1054
1067
  meta: t.options.meta,
@@ -1056,11 +1069,11 @@ function er(e) {
1056
1069
  },
1057
1070
  s
1058
1071
  );
1059
- } : t.fetchFn = r;
1072
+ } : t.fetchFn = m;
1060
1073
  }
1061
1074
  };
1062
1075
  }
1063
- function Ot(e, { pages: t, pageParams: s }) {
1076
+ function Ft(e, { pages: t, pageParams: s }) {
1064
1077
  const r = t.length - 1;
1065
1078
  return t.length > 0 ? e.getNextPageParam(
1066
1079
  t[r],
@@ -1069,69 +1082,69 @@ function Ot(e, { pages: t, pageParams: s }) {
1069
1082
  s
1070
1083
  ) : void 0;
1071
1084
  }
1072
- function tr(e, { pages: t, pageParams: s }) {
1085
+ function ir(e, { pages: t, pageParams: s }) {
1073
1086
  var r;
1074
1087
  return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, s[0], s) : void 0;
1075
1088
  }
1076
- var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1089
+ var O, le, ce, Me, Re, ue, Oe, Le, It, ds = (It = class {
1077
1090
  constructor(e = {}) {
1078
- y(this, L);
1091
+ y(this, O);
1079
1092
  y(this, le);
1080
1093
  y(this, ce);
1081
1094
  y(this, Me);
1082
- y(this, Oe);
1083
- y(this, ue);
1084
1095
  y(this, Re);
1096
+ y(this, ue);
1097
+ y(this, Oe);
1085
1098
  y(this, Le);
1086
- p(this, L, e.queryCache || new Xs()), p(this, le, e.mutationCache || new Bs()), p(this, ce, e.defaultOptions || {}), p(this, Me, /* @__PURE__ */ new Map()), p(this, Oe, /* @__PURE__ */ new Map()), p(this, ue, 0);
1099
+ p(this, O, e.queryCache || new tr()), p(this, le, e.mutationCache || new rr()), p(this, ce, e.defaultOptions || {}), p(this, Me, /* @__PURE__ */ new Map()), p(this, Re, /* @__PURE__ */ new Map()), p(this, ue, 0);
1087
1100
  }
1088
1101
  mount() {
1089
- ze(this, ue)._++, n(this, ue) === 1 && (p(this, Re, bt.subscribe(async (e) => {
1090
- e && (await this.resumePausedMutations(), n(this, L).onFocus());
1091
- })), p(this, Le, Be.subscribe(async (e) => {
1092
- e && (await this.resumePausedMutations(), n(this, L).onOnline());
1102
+ Ye(this, ue)._++, a(this, ue) === 1 && (p(this, Oe, jt.subscribe(async (e) => {
1103
+ e && (await this.resumePausedMutations(), a(this, O).onFocus());
1104
+ })), p(this, Le, et.subscribe(async (e) => {
1105
+ e && (await this.resumePausedMutations(), a(this, O).onOnline());
1093
1106
  })));
1094
1107
  }
1095
1108
  unmount() {
1096
1109
  var e, t;
1097
- ze(this, ue)._--, n(this, ue) === 0 && ((e = n(this, Re)) == null || e.call(this), p(this, Re, void 0), (t = n(this, Le)) == null || t.call(this), p(this, Le, void 0));
1110
+ Ye(this, ue)._--, a(this, ue) === 0 && ((e = a(this, Oe)) == null || e.call(this), p(this, Oe, void 0), (t = a(this, Le)) == null || t.call(this), p(this, Le, void 0));
1098
1111
  }
1099
1112
  isFetching(e) {
1100
- return n(this, L).findAll({ ...e, fetchStatus: "fetching" }).length;
1113
+ return a(this, O).findAll({ ...e, fetchStatus: "fetching" }).length;
1101
1114
  }
1102
1115
  isMutating(e) {
1103
- return n(this, le).findAll({ ...e, status: "pending" }).length;
1116
+ return a(this, le).findAll({ ...e, status: "pending" }).length;
1104
1117
  }
1105
1118
  getQueryData(e) {
1106
1119
  var s;
1107
1120
  const t = this.defaultQueryOptions({ queryKey: e });
1108
- return (s = n(this, L).get(t.queryHash)) == null ? void 0 : s.state.data;
1121
+ return (s = a(this, O).get(t.queryHash)) == null ? void 0 : s.state.data;
1109
1122
  }
1110
1123
  ensureQueryData(e) {
1111
1124
  const t = this.getQueryData(e.queryKey);
1112
1125
  if (t === void 0)
1113
1126
  return this.fetchQuery(e);
1114
1127
  {
1115
- const s = this.defaultQueryOptions(e), r = n(this, L).build(this, s);
1128
+ const s = this.defaultQueryOptions(e), r = a(this, O).build(this, s);
1116
1129
  return e.revalidateIfStale && r.isStaleByTime(Se(s.staleTime, r)) && this.prefetchQuery(s), Promise.resolve(t);
1117
1130
  }
1118
1131
  }
1119
1132
  getQueriesData(e) {
1120
- return n(this, L).findAll(e).map(({ queryKey: t, state: s }) => {
1133
+ return a(this, O).findAll(e).map(({ queryKey: t, state: s }) => {
1121
1134
  const r = s.data;
1122
1135
  return [t, r];
1123
1136
  });
1124
1137
  }
1125
1138
  setQueryData(e, t, s) {
1126
- const r = this.defaultQueryOptions({ queryKey: e }), a = n(this, L).get(
1139
+ const r = this.defaultQueryOptions({ queryKey: e }), n = a(this, O).get(
1127
1140
  r.queryHash
1128
- ), l = a == null ? void 0 : a.state.data, o = Ks(t, l);
1141
+ ), l = n == null ? void 0 : n.state.data, o = Vs(t, l);
1129
1142
  if (o !== void 0)
1130
- return n(this, L).build(this, r).setData(o, { ...s, manual: !0 });
1143
+ return a(this, O).build(this, r).setData(o, { ...s, manual: !0 });
1131
1144
  }
1132
1145
  setQueriesData(e, t, s) {
1133
1146
  return D.batch(
1134
- () => n(this, L).findAll(e).map(({ queryKey: r }) => [
1147
+ () => a(this, O).findAll(e).map(({ queryKey: r }) => [
1135
1148
  r,
1136
1149
  this.setQueryData(r, t, s)
1137
1150
  ])
@@ -1140,10 +1153,10 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1140
1153
  getQueryState(e) {
1141
1154
  var s;
1142
1155
  const t = this.defaultQueryOptions({ queryKey: e });
1143
- return (s = n(this, L).get(t.queryHash)) == null ? void 0 : s.state;
1156
+ return (s = a(this, O).get(t.queryHash)) == null ? void 0 : s.state;
1144
1157
  }
1145
1158
  removeQueries(e) {
1146
- const t = n(this, L);
1159
+ const t = a(this, O);
1147
1160
  D.batch(() => {
1148
1161
  t.findAll(e).forEach((s) => {
1149
1162
  t.remove(s);
@@ -1151,23 +1164,23 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1151
1164
  });
1152
1165
  }
1153
1166
  resetQueries(e, t) {
1154
- const s = n(this, L), r = {
1167
+ const s = a(this, O), r = {
1155
1168
  type: "active",
1156
1169
  ...e
1157
1170
  };
1158
- return D.batch(() => (s.findAll(e).forEach((a) => {
1159
- a.reset();
1171
+ return D.batch(() => (s.findAll(e).forEach((n) => {
1172
+ n.reset();
1160
1173
  }), this.refetchQueries(r, t)));
1161
1174
  }
1162
1175
  cancelQueries(e = {}, t = {}) {
1163
1176
  const s = { revert: !0, ...t }, r = D.batch(
1164
- () => n(this, L).findAll(e).map((a) => a.cancel(s))
1177
+ () => a(this, O).findAll(e).map((n) => n.cancel(s))
1165
1178
  );
1166
1179
  return Promise.all(r).then($).catch($);
1167
1180
  }
1168
1181
  invalidateQueries(e = {}, t = {}) {
1169
1182
  return D.batch(() => {
1170
- if (n(this, L).findAll(e).forEach((r) => {
1183
+ if (a(this, O).findAll(e).forEach((r) => {
1171
1184
  r.invalidate();
1172
1185
  }), e.refetchType === "none")
1173
1186
  return Promise.resolve();
@@ -1183,9 +1196,9 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1183
1196
  ...t,
1184
1197
  cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
1185
1198
  }, r = D.batch(
1186
- () => n(this, L).findAll(e).filter((a) => !a.isDisabled()).map((a) => {
1187
- let l = a.fetch(void 0, s);
1188
- return s.throwOnError || (l = l.catch($)), a.state.fetchStatus === "paused" ? Promise.resolve() : l;
1199
+ () => a(this, O).findAll(e).filter((n) => !n.isDisabled()).map((n) => {
1200
+ let l = n.fetch(void 0, s);
1201
+ return s.throwOnError || (l = l.catch($)), n.state.fetchStatus === "paused" ? Promise.resolve() : l;
1189
1202
  })
1190
1203
  );
1191
1204
  return Promise.all(r).then($);
@@ -1193,7 +1206,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1193
1206
  fetchQuery(e) {
1194
1207
  const t = this.defaultQueryOptions(e);
1195
1208
  t.retry === void 0 && (t.retry = !1);
1196
- const s = n(this, L).build(this, t);
1209
+ const s = a(this, O).build(this, t);
1197
1210
  return s.isStaleByTime(
1198
1211
  Se(t.staleTime, s)
1199
1212
  ) ? s.fetch(t) : Promise.resolve(s.state.data);
@@ -1202,47 +1215,50 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1202
1215
  return this.fetchQuery(e).then($).catch($);
1203
1216
  }
1204
1217
  fetchInfiniteQuery(e) {
1205
- return e.behavior = er(e.pages), this.fetchQuery(e);
1218
+ return e.behavior = Lt(e.pages), this.fetchQuery(e);
1206
1219
  }
1207
1220
  prefetchInfiniteQuery(e) {
1208
1221
  return this.fetchInfiniteQuery(e).then($).catch($);
1209
1222
  }
1223
+ ensureInfiniteQueryData(e) {
1224
+ return e.behavior = Lt(e.pages), this.ensureQueryData(e);
1225
+ }
1210
1226
  resumePausedMutations() {
1211
- return Be.isOnline() ? n(this, le).resumePausedMutations() : Promise.resolve();
1227
+ return et.isOnline() ? a(this, le).resumePausedMutations() : Promise.resolve();
1212
1228
  }
1213
1229
  getQueryCache() {
1214
- return n(this, L);
1230
+ return a(this, O);
1215
1231
  }
1216
1232
  getMutationCache() {
1217
- return n(this, le);
1233
+ return a(this, le);
1218
1234
  }
1219
1235
  getDefaultOptions() {
1220
- return n(this, ce);
1236
+ return a(this, ce);
1221
1237
  }
1222
1238
  setDefaultOptions(e) {
1223
1239
  p(this, ce, e);
1224
1240
  }
1225
1241
  setQueryDefaults(e, t) {
1226
- n(this, Me).set(be(e), {
1242
+ a(this, Me).set(be(e), {
1227
1243
  queryKey: e,
1228
1244
  defaultOptions: t
1229
1245
  });
1230
1246
  }
1231
1247
  getQueryDefaults(e) {
1232
- const t = [...n(this, Me).values()];
1248
+ const t = [...a(this, Me).values()];
1233
1249
  let s = {};
1234
1250
  return t.forEach((r) => {
1235
1251
  Ge(e, r.queryKey) && (s = { ...s, ...r.defaultOptions });
1236
1252
  }), s;
1237
1253
  }
1238
1254
  setMutationDefaults(e, t) {
1239
- n(this, Oe).set(be(e), {
1255
+ a(this, Re).set(be(e), {
1240
1256
  mutationKey: e,
1241
1257
  defaultOptions: t
1242
1258
  });
1243
1259
  }
1244
1260
  getMutationDefaults(e) {
1245
- const t = [...n(this, Oe).values()];
1261
+ const t = [...a(this, Re).values()];
1246
1262
  let s = {};
1247
1263
  return t.forEach((r) => {
1248
1264
  Ge(e, r.mutationKey) && (s = { ...s, ...r.defaultOptions });
@@ -1252,33 +1268,33 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1252
1268
  if (e._defaulted)
1253
1269
  return e;
1254
1270
  const t = {
1255
- ...n(this, ce).queries,
1271
+ ...a(this, ce).queries,
1256
1272
  ...this.getQueryDefaults(e.queryKey),
1257
1273
  ...e,
1258
1274
  _defaulted: !0
1259
1275
  };
1260
- return t.queryHash || (t.queryHash = xt(
1276
+ return t.queryHash || (t.queryHash = wt(
1261
1277
  t.queryKey,
1262
1278
  t
1263
- )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === es && (t.enabled = !1), t;
1279
+ )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === is && (t.enabled = !1), t;
1264
1280
  }
1265
1281
  defaultMutationOptions(e) {
1266
1282
  return e != null && e._defaulted ? e : {
1267
- ...n(this, ce).mutations,
1283
+ ...a(this, ce).mutations,
1268
1284
  ...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
1269
1285
  ...e,
1270
1286
  _defaulted: !0
1271
1287
  };
1272
1288
  }
1273
1289
  clear() {
1274
- n(this, L).clear(), n(this, le).clear();
1290
+ a(this, O).clear(), a(this, le).clear();
1275
1291
  }
1276
- }, L = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), Me = new WeakMap(), Oe = new WeakMap(), ue = new WeakMap(), Re = new WeakMap(), Le = new WeakMap(), Yt), H, _, Ve, Q, ye, Fe, ee, $e, De, Te, Ce, xe, he, Ue, N, Ke, lt, ct, ut, ht, dt, ft, pt, cs, zt, sr = (zt = class extends He {
1292
+ }, O = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), Me = new WeakMap(), Re = new WeakMap(), ue = new WeakMap(), Oe = new WeakMap(), Le = new WeakMap(), It), H, E, Ve, Q, ye, Fe, ee, $e, De, Te, Ce, xe, he, Ue, N, Ke, ct, ut, ht, dt, ft, pt, mt, fs, Bt, nr = (Bt = class extends He {
1277
1293
  constructor(t, s) {
1278
1294
  super();
1279
1295
  y(this, N);
1280
1296
  y(this, H);
1281
- y(this, _);
1297
+ y(this, E);
1282
1298
  y(this, Ve);
1283
1299
  y(this, Q);
1284
1300
  y(this, ye);
@@ -1299,71 +1315,71 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1299
1315
  this.refetch = this.refetch.bind(this);
1300
1316
  }
1301
1317
  onSubscribe() {
1302
- this.listeners.size === 1 && (n(this, _).addObserver(this), Rt(n(this, _), this.options) ? w(this, N, Ke).call(this) : this.updateResult(), w(this, N, ht).call(this));
1318
+ this.listeners.size === 1 && (a(this, E).addObserver(this), Dt(a(this, E), this.options) ? w(this, N, Ke).call(this) : this.updateResult(), w(this, N, dt).call(this));
1303
1319
  }
1304
1320
  onUnsubscribe() {
1305
1321
  this.hasListeners() || this.destroy();
1306
1322
  }
1307
1323
  shouldFetchOnReconnect() {
1308
- return mt(
1309
- n(this, _),
1324
+ return vt(
1325
+ a(this, E),
1310
1326
  this.options,
1311
1327
  this.options.refetchOnReconnect
1312
1328
  );
1313
1329
  }
1314
1330
  shouldFetchOnWindowFocus() {
1315
- return mt(
1316
- n(this, _),
1331
+ return vt(
1332
+ a(this, E),
1317
1333
  this.options,
1318
1334
  this.options.refetchOnWindowFocus
1319
1335
  );
1320
1336
  }
1321
1337
  destroy() {
1322
- this.listeners = /* @__PURE__ */ new Set(), w(this, N, dt).call(this), w(this, N, ft).call(this), n(this, _).removeObserver(this);
1338
+ this.listeners = /* @__PURE__ */ new Set(), w(this, N, ft).call(this), w(this, N, pt).call(this), a(this, E).removeObserver(this);
1323
1339
  }
1324
1340
  setOptions(t, s) {
1325
- const r = this.options, a = n(this, _);
1326
- if (this.options = n(this, H).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof z(this.options.enabled, n(this, _)) != "boolean")
1341
+ const r = this.options, n = a(this, E);
1342
+ if (this.options = a(this, H).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof Y(this.options.enabled, a(this, E)) != "boolean")
1327
1343
  throw new Error(
1328
1344
  "Expected enabled to be a boolean or a callback that returns a boolean"
1329
1345
  );
1330
- w(this, N, pt).call(this), n(this, _).setOptions(this.options), r._defaulted && !Ie(this.options, r) && n(this, H).getQueryCache().notify({
1346
+ w(this, N, mt).call(this), a(this, E).setOptions(this.options), r._defaulted && !Be(this.options, r) && a(this, H).getQueryCache().notify({
1331
1347
  type: "observerOptionsUpdated",
1332
- query: n(this, _),
1348
+ query: a(this, E),
1333
1349
  observer: this
1334
1350
  });
1335
1351
  const l = this.hasListeners();
1336
- l && Lt(
1337
- n(this, _),
1338
- a,
1352
+ l && Tt(
1353
+ a(this, E),
1354
+ n,
1339
1355
  this.options,
1340
1356
  r
1341
- ) && w(this, N, Ke).call(this), this.updateResult(s), l && (n(this, _) !== a || z(this.options.enabled, n(this, _)) !== z(r.enabled, n(this, _)) || Se(this.options.staleTime, n(this, _)) !== Se(r.staleTime, n(this, _))) && w(this, N, lt).call(this);
1342
- const o = w(this, N, ct).call(this);
1343
- l && (n(this, _) !== a || z(this.options.enabled, n(this, _)) !== z(r.enabled, n(this, _)) || o !== n(this, he)) && w(this, N, ut).call(this, o);
1357
+ ) && w(this, N, Ke).call(this), this.updateResult(s), l && (a(this, E) !== n || Y(this.options.enabled, a(this, E)) !== Y(r.enabled, a(this, E)) || Se(this.options.staleTime, a(this, E)) !== Se(r.staleTime, a(this, E))) && w(this, N, ct).call(this);
1358
+ const o = w(this, N, ut).call(this);
1359
+ l && (a(this, E) !== n || Y(this.options.enabled, a(this, E)) !== Y(r.enabled, a(this, E)) || o !== a(this, he)) && w(this, N, ht).call(this, o);
1344
1360
  }
1345
1361
  getOptimisticResult(t) {
1346
- const s = n(this, H).getQueryCache().build(n(this, H), t), r = this.createResult(s, t);
1347
- return ir(this, r) && (p(this, Q, r), p(this, Fe, this.options), p(this, ye, n(this, _).state)), r;
1362
+ const s = a(this, H).getQueryCache().build(a(this, H), t), r = this.createResult(s, t);
1363
+ return or(this, r) && (p(this, Q, r), p(this, Fe, this.options), p(this, ye, a(this, E).state)), r;
1348
1364
  }
1349
1365
  getCurrentResult() {
1350
- return n(this, Q);
1366
+ return a(this, Q);
1351
1367
  }
1352
1368
  trackResult(t, s) {
1353
1369
  const r = {};
1354
- return Object.keys(t).forEach((a) => {
1355
- Object.defineProperty(r, a, {
1370
+ return Object.keys(t).forEach((n) => {
1371
+ Object.defineProperty(r, n, {
1356
1372
  configurable: !1,
1357
1373
  enumerable: !0,
1358
- get: () => (this.trackProp(a), s == null || s(a), t[a])
1374
+ get: () => (this.trackProp(n), s == null || s(n), t[n])
1359
1375
  });
1360
1376
  }), r;
1361
1377
  }
1362
1378
  trackProp(t) {
1363
- n(this, Ue).add(t);
1379
+ a(this, Ue).add(t);
1364
1380
  }
1365
1381
  getCurrentQuery() {
1366
- return n(this, _);
1382
+ return a(this, E);
1367
1383
  }
1368
1384
  refetch({ ...t } = {}) {
1369
1385
  return this.fetch({
@@ -1371,180 +1387,180 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1371
1387
  });
1372
1388
  }
1373
1389
  fetchOptimistic(t) {
1374
- const s = n(this, H).defaultQueryOptions(t), r = n(this, H).getQueryCache().build(n(this, H), s);
1390
+ const s = a(this, H).defaultQueryOptions(t), r = a(this, H).getQueryCache().build(a(this, H), s);
1375
1391
  return r.isFetchingOptimistic = !0, r.fetch().then(() => this.createResult(r, s));
1376
1392
  }
1377
1393
  fetch(t) {
1378
1394
  return w(this, N, Ke).call(this, {
1379
1395
  ...t,
1380
1396
  cancelRefetch: t.cancelRefetch ?? !0
1381
- }).then(() => (this.updateResult(), n(this, Q)));
1397
+ }).then(() => (this.updateResult(), a(this, Q)));
1382
1398
  }
1383
1399
  createResult(t, s) {
1384
1400
  var te;
1385
- const r = n(this, _), a = this.options, l = n(this, Q), o = n(this, ye), c = n(this, Fe), g = t !== r ? t.state : n(this, Ve), { state: h } = t;
1386
- let u = { ...h }, d = !1, m;
1401
+ const r = a(this, E), n = this.options, l = a(this, Q), o = a(this, ye), c = a(this, Fe), m = t !== r ? t.state : a(this, Ve), { state: h } = t;
1402
+ let u = { ...h }, v = !1, g;
1387
1403
  if (s._optimisticResults) {
1388
- const E = this.hasListeners(), Z = !E && Rt(t, s), Ls = E && Lt(t, r, s, a);
1389
- (Z || Ls) && (u = {
1404
+ const k = this.hasListeners(), Z = !k && Dt(t, s), Us = k && Tt(t, r, s, n);
1405
+ (Z || Us) && (u = {
1390
1406
  ...u,
1391
- ...as(h.data, t.options)
1407
+ ...us(h.data, t.options)
1392
1408
  }), s._optimisticResults === "isRestoring" && (u.fetchStatus = "idle");
1393
1409
  }
1394
- let { error: S, errorUpdatedAt: P, status: k } = u;
1410
+ let { error: S, errorUpdatedAt: _, status: P } = u;
1395
1411
  if (s.select && u.data !== void 0)
1396
- if (l && u.data === (o == null ? void 0 : o.data) && s.select === n(this, $e))
1397
- m = n(this, De);
1412
+ if (l && u.data === (o == null ? void 0 : o.data) && s.select === a(this, $e))
1413
+ g = a(this, De);
1398
1414
  else
1399
1415
  try {
1400
- p(this, $e, s.select), m = s.select(u.data), m = ot(l == null ? void 0 : l.data, m, s), p(this, De, m), p(this, ee, null);
1401
- } catch (E) {
1402
- p(this, ee, E);
1416
+ p(this, $e, s.select), g = s.select(u.data), g = lt(l == null ? void 0 : l.data, g, s), p(this, De, g), p(this, ee, null);
1417
+ } catch (k) {
1418
+ p(this, ee, k);
1403
1419
  }
1404
1420
  else
1405
- m = u.data;
1406
- if (s.placeholderData !== void 0 && m === void 0 && k === "pending") {
1407
- let E;
1421
+ g = u.data;
1422
+ if (s.placeholderData !== void 0 && g === void 0 && P === "pending") {
1423
+ let k;
1408
1424
  if (l != null && l.isPlaceholderData && s.placeholderData === (c == null ? void 0 : c.placeholderData))
1409
- E = l.data;
1410
- else if (E = typeof s.placeholderData == "function" ? s.placeholderData(
1411
- (te = n(this, Te)) == null ? void 0 : te.state.data,
1412
- n(this, Te)
1413
- ) : s.placeholderData, s.select && E !== void 0)
1425
+ k = l.data;
1426
+ else if (k = typeof s.placeholderData == "function" ? s.placeholderData(
1427
+ (te = a(this, Te)) == null ? void 0 : te.state.data,
1428
+ a(this, Te)
1429
+ ) : s.placeholderData, s.select && k !== void 0)
1414
1430
  try {
1415
- E = s.select(E), p(this, ee, null);
1431
+ k = s.select(k), p(this, ee, null);
1416
1432
  } catch (Z) {
1417
1433
  p(this, ee, Z);
1418
1434
  }
1419
- E !== void 0 && (k = "success", m = ot(
1435
+ k !== void 0 && (P = "success", g = lt(
1420
1436
  l == null ? void 0 : l.data,
1421
- E,
1437
+ k,
1422
1438
  s
1423
- ), d = !0);
1439
+ ), v = !0);
1424
1440
  }
1425
- n(this, ee) && (S = n(this, ee), m = n(this, De), P = Date.now(), k = "error");
1426
- const C = u.fetchStatus === "fetching", j = k === "pending", b = k === "error", M = j && C, R = m !== void 0;
1441
+ a(this, ee) && (S = a(this, ee), g = a(this, De), _ = Date.now(), P = "error");
1442
+ const C = u.fetchStatus === "fetching", j = P === "pending", b = P === "error", M = j && C, F = g !== void 0;
1427
1443
  return {
1428
- status: k,
1444
+ status: P,
1429
1445
  fetchStatus: u.fetchStatus,
1430
1446
  isPending: j,
1431
- isSuccess: k === "success",
1447
+ isSuccess: P === "success",
1432
1448
  isError: b,
1433
1449
  isInitialLoading: M,
1434
1450
  isLoading: M,
1435
- data: m,
1451
+ data: g,
1436
1452
  dataUpdatedAt: u.dataUpdatedAt,
1437
1453
  error: S,
1438
- errorUpdatedAt: P,
1454
+ errorUpdatedAt: _,
1439
1455
  failureCount: u.fetchFailureCount,
1440
1456
  failureReason: u.fetchFailureReason,
1441
1457
  errorUpdateCount: u.errorUpdateCount,
1442
1458
  isFetched: u.dataUpdateCount > 0 || u.errorUpdateCount > 0,
1443
- isFetchedAfterMount: u.dataUpdateCount > g.dataUpdateCount || u.errorUpdateCount > g.errorUpdateCount,
1459
+ isFetchedAfterMount: u.dataUpdateCount > m.dataUpdateCount || u.errorUpdateCount > m.errorUpdateCount,
1444
1460
  isFetching: C,
1445
1461
  isRefetching: C && !j,
1446
- isLoadingError: b && !R,
1462
+ isLoadingError: b && !F,
1447
1463
  isPaused: u.fetchStatus === "paused",
1448
- isPlaceholderData: d,
1449
- isRefetchError: b && R,
1450
- isStale: wt(t, s),
1464
+ isPlaceholderData: v,
1465
+ isRefetchError: b && F,
1466
+ isStale: _t(t, s),
1451
1467
  refetch: this.refetch
1452
1468
  };
1453
1469
  }
1454
1470
  updateResult(t) {
1455
- const s = n(this, Q), r = this.createResult(n(this, _), this.options);
1456
- if (p(this, ye, n(this, _).state), p(this, Fe, this.options), n(this, ye).data !== void 0 && p(this, Te, n(this, _)), Ie(r, s))
1471
+ const s = a(this, Q), r = this.createResult(a(this, E), this.options);
1472
+ if (p(this, ye, a(this, E).state), p(this, Fe, this.options), a(this, ye).data !== void 0 && p(this, Te, a(this, E)), Be(r, s))
1457
1473
  return;
1458
1474
  p(this, Q, r);
1459
- const a = {}, l = () => {
1475
+ const n = {}, l = () => {
1460
1476
  if (!s)
1461
1477
  return !0;
1462
1478
  const { notifyOnChangeProps: o } = this.options, c = typeof o == "function" ? o() : o;
1463
- if (c === "all" || !c && !n(this, Ue).size)
1479
+ if (c === "all" || !c && !a(this, Ue).size)
1464
1480
  return !0;
1465
- const v = new Set(
1466
- c ?? n(this, Ue)
1481
+ const d = new Set(
1482
+ c ?? a(this, Ue)
1467
1483
  );
1468
- return this.options.throwOnError && v.add("error"), Object.keys(n(this, Q)).some((g) => {
1469
- const h = g;
1470
- return n(this, Q)[h] !== s[h] && v.has(h);
1484
+ return this.options.throwOnError && d.add("error"), Object.keys(a(this, Q)).some((m) => {
1485
+ const h = m;
1486
+ return a(this, Q)[h] !== s[h] && d.has(h);
1471
1487
  });
1472
1488
  };
1473
- (t == null ? void 0 : t.listeners) !== !1 && l() && (a.listeners = !0), w(this, N, cs).call(this, { ...a, ...t });
1489
+ (t == null ? void 0 : t.listeners) !== !1 && l() && (n.listeners = !0), w(this, N, fs).call(this, { ...n, ...t });
1474
1490
  }
1475
1491
  onQueryUpdate() {
1476
- this.updateResult(), this.hasListeners() && w(this, N, ht).call(this);
1492
+ this.updateResult(), this.hasListeners() && w(this, N, dt).call(this);
1477
1493
  }
1478
- }, H = new WeakMap(), _ = new WeakMap(), Ve = new WeakMap(), Q = new WeakMap(), ye = new WeakMap(), Fe = new WeakMap(), ee = new WeakMap(), $e = new WeakMap(), De = new WeakMap(), Te = new WeakMap(), Ce = new WeakMap(), xe = new WeakMap(), he = new WeakMap(), Ue = new WeakMap(), N = new WeakSet(), Ke = function(t) {
1479
- w(this, N, pt).call(this);
1480
- let s = n(this, _).fetch(
1494
+ }, H = new WeakMap(), E = new WeakMap(), Ve = new WeakMap(), Q = new WeakMap(), ye = new WeakMap(), Fe = new WeakMap(), ee = new WeakMap(), $e = new WeakMap(), De = new WeakMap(), Te = new WeakMap(), Ce = new WeakMap(), xe = new WeakMap(), he = new WeakMap(), Ue = new WeakMap(), N = new WeakSet(), Ke = function(t) {
1495
+ w(this, N, mt).call(this);
1496
+ let s = a(this, E).fetch(
1481
1497
  this.options,
1482
1498
  t
1483
1499
  );
1484
1500
  return t != null && t.throwOnError || (s = s.catch($)), s;
1485
- }, lt = function() {
1486
- w(this, N, dt).call(this);
1501
+ }, ct = function() {
1502
+ w(this, N, ft).call(this);
1487
1503
  const t = Se(
1488
1504
  this.options.staleTime,
1489
- n(this, _)
1505
+ a(this, E)
1490
1506
  );
1491
- if (Qe || n(this, Q).isStale || !nt(t))
1507
+ if (Qe || a(this, Q).isStale || !at(t))
1492
1508
  return;
1493
- const r = It(n(this, Q).dataUpdatedAt, t) + 1;
1509
+ const r = ss(a(this, Q).dataUpdatedAt, t) + 1;
1494
1510
  p(this, Ce, setTimeout(() => {
1495
- n(this, Q).isStale || this.updateResult();
1511
+ a(this, Q).isStale || this.updateResult();
1496
1512
  }, r));
1497
- }, ct = function() {
1498
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, _)) : this.options.refetchInterval) ?? !1;
1499
- }, ut = function(t) {
1500
- w(this, N, ft).call(this), p(this, he, t), !(Qe || z(this.options.enabled, n(this, _)) === !1 || !nt(n(this, he)) || n(this, he) === 0) && p(this, xe, setInterval(() => {
1501
- (this.options.refetchIntervalInBackground || bt.isFocused()) && w(this, N, Ke).call(this);
1502
- }, n(this, he)));
1503
- }, ht = function() {
1504
- w(this, N, lt).call(this), w(this, N, ut).call(this, w(this, N, ct).call(this));
1513
+ }, ut = function() {
1514
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(a(this, E)) : this.options.refetchInterval) ?? !1;
1515
+ }, ht = function(t) {
1516
+ w(this, N, pt).call(this), p(this, he, t), !(Qe || Y(this.options.enabled, a(this, E)) === !1 || !at(a(this, he)) || a(this, he) === 0) && p(this, xe, setInterval(() => {
1517
+ (this.options.refetchIntervalInBackground || jt.isFocused()) && w(this, N, Ke).call(this);
1518
+ }, a(this, he)));
1505
1519
  }, dt = function() {
1506
- n(this, Ce) && (clearTimeout(n(this, Ce)), p(this, Ce, void 0));
1520
+ w(this, N, ct).call(this), w(this, N, ht).call(this, w(this, N, ut).call(this));
1507
1521
  }, ft = function() {
1508
- n(this, xe) && (clearInterval(n(this, xe)), p(this, xe, void 0));
1522
+ a(this, Ce) && (clearTimeout(a(this, Ce)), p(this, Ce, void 0));
1509
1523
  }, pt = function() {
1510
- const t = n(this, H).getQueryCache().build(n(this, H), this.options);
1511
- if (t === n(this, _))
1524
+ a(this, xe) && (clearInterval(a(this, xe)), p(this, xe, void 0));
1525
+ }, mt = function() {
1526
+ const t = a(this, H).getQueryCache().build(a(this, H), this.options);
1527
+ if (t === a(this, E))
1512
1528
  return;
1513
- const s = n(this, _);
1514
- p(this, _, t), p(this, Ve, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
1515
- }, cs = function(t) {
1529
+ const s = a(this, E);
1530
+ p(this, E, t), p(this, Ve, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
1531
+ }, fs = function(t) {
1516
1532
  D.batch(() => {
1517
1533
  t.listeners && this.listeners.forEach((s) => {
1518
- s(n(this, Q));
1519
- }), n(this, H).getQueryCache().notify({
1520
- query: n(this, _),
1534
+ s(a(this, Q));
1535
+ }), a(this, H).getQueryCache().notify({
1536
+ query: a(this, E),
1521
1537
  type: "observerResultsUpdated"
1522
1538
  });
1523
1539
  });
1524
- }, zt);
1525
- function rr(e, t) {
1526
- return z(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
1540
+ }, Bt);
1541
+ function ar(e, t) {
1542
+ return Y(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
1527
1543
  }
1528
- function Rt(e, t) {
1529
- return rr(e, t) || e.state.data !== void 0 && mt(e, t, t.refetchOnMount);
1544
+ function Dt(e, t) {
1545
+ return ar(e, t) || e.state.data !== void 0 && vt(e, t, t.refetchOnMount);
1530
1546
  }
1531
- function mt(e, t, s) {
1532
- if (z(t.enabled, e) !== !1) {
1547
+ function vt(e, t, s) {
1548
+ if (Y(t.enabled, e) !== !1) {
1533
1549
  const r = typeof s == "function" ? s(e) : s;
1534
- return r === "always" || r !== !1 && wt(e, t);
1550
+ return r === "always" || r !== !1 && _t(e, t);
1535
1551
  }
1536
1552
  return !1;
1537
1553
  }
1538
- function Lt(e, t, s, r) {
1539
- return (e !== t || z(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && wt(e, s);
1554
+ function Tt(e, t, s, r) {
1555
+ return (e !== t || Y(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && _t(e, s);
1540
1556
  }
1541
- function wt(e, t) {
1542
- return z(t.enabled, e) !== !1 && e.isStaleByTime(Se(t.staleTime, e));
1557
+ function _t(e, t) {
1558
+ return Y(t.enabled, e) !== !1 && e.isStaleByTime(Se(t.staleTime, e));
1543
1559
  }
1544
- function ir(e, t) {
1545
- return !Ie(e.getCurrentResult(), t);
1560
+ function or(e, t) {
1561
+ return !Be(e.getCurrentResult(), t);
1546
1562
  }
1547
- var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
1563
+ var de, fe, K, re, ie, Ie, gt, es, lr = (es = class extends He {
1548
1564
  constructor(t, s) {
1549
1565
  super();
1550
1566
  y(this, ie);
@@ -1552,7 +1568,7 @@ var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
1552
1568
  y(this, fe);
1553
1569
  y(this, K);
1554
1570
  y(this, re);
1555
- p(this, de, t), this.setOptions(s), this.bindMethods(), w(this, ie, Xe).call(this);
1571
+ p(this, de, t), this.setOptions(s), this.bindMethods(), w(this, ie, Ie).call(this);
1556
1572
  }
1557
1573
  bindMethods() {
1558
1574
  this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
@@ -1560,33 +1576,33 @@ var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
1560
1576
  setOptions(t) {
1561
1577
  var r;
1562
1578
  const s = this.options;
1563
- this.options = n(this, de).defaultMutationOptions(t), Ie(this.options, s) || n(this, de).getMutationCache().notify({
1579
+ this.options = a(this, de).defaultMutationOptions(t), Be(this.options, s) || a(this, de).getMutationCache().notify({
1564
1580
  type: "observerOptionsUpdated",
1565
- mutation: n(this, K),
1581
+ mutation: a(this, K),
1566
1582
  observer: this
1567
- }), s != null && s.mutationKey && this.options.mutationKey && be(s.mutationKey) !== be(this.options.mutationKey) ? this.reset() : ((r = n(this, K)) == null ? void 0 : r.state.status) === "pending" && n(this, K).setOptions(this.options);
1583
+ }), s != null && s.mutationKey && this.options.mutationKey && be(s.mutationKey) !== be(this.options.mutationKey) ? this.reset() : ((r = a(this, K)) == null ? void 0 : r.state.status) === "pending" && a(this, K).setOptions(this.options);
1568
1584
  }
1569
1585
  onUnsubscribe() {
1570
1586
  var t;
1571
- this.hasListeners() || (t = n(this, K)) == null || t.removeObserver(this);
1587
+ this.hasListeners() || (t = a(this, K)) == null || t.removeObserver(this);
1572
1588
  }
1573
1589
  onMutationUpdate(t) {
1574
- w(this, ie, Xe).call(this), w(this, ie, vt).call(this, t);
1590
+ w(this, ie, Ie).call(this), w(this, ie, gt).call(this, t);
1575
1591
  }
1576
1592
  getCurrentResult() {
1577
- return n(this, fe);
1593
+ return a(this, fe);
1578
1594
  }
1579
1595
  reset() {
1580
1596
  var t;
1581
- (t = n(this, K)) == null || t.removeObserver(this), p(this, K, void 0), w(this, ie, Xe).call(this), w(this, ie, vt).call(this);
1597
+ (t = a(this, K)) == null || t.removeObserver(this), p(this, K, void 0), w(this, ie, Ie).call(this), w(this, ie, gt).call(this);
1582
1598
  }
1583
1599
  mutate(t, s) {
1584
1600
  var r;
1585
- return p(this, re, s), (r = n(this, K)) == null || r.removeObserver(this), p(this, K, n(this, de).getMutationCache().build(n(this, de), this.options)), n(this, K).addObserver(this), n(this, K).execute(t);
1601
+ return p(this, re, s), (r = a(this, K)) == null || r.removeObserver(this), p(this, K, a(this, de).getMutationCache().build(a(this, de), this.options)), a(this, K).addObserver(this), a(this, K).execute(t);
1586
1602
  }
1587
- }, de = new WeakMap(), fe = new WeakMap(), K = new WeakMap(), re = new WeakMap(), ie = new WeakSet(), Xe = function() {
1603
+ }, de = new WeakMap(), fe = new WeakMap(), K = new WeakMap(), re = new WeakMap(), ie = new WeakSet(), Ie = function() {
1588
1604
  var s;
1589
- const t = ((s = n(this, K)) == null ? void 0 : s.state) ?? os();
1605
+ const t = ((s = a(this, K)) == null ? void 0 : s.state) ?? hs();
1590
1606
  p(this, fe, {
1591
1607
  ...t,
1592
1608
  isPending: t.status === "pending",
@@ -1596,13 +1612,13 @@ var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
1596
1612
  mutate: this.mutate,
1597
1613
  reset: this.reset
1598
1614
  });
1599
- }, vt = function(t) {
1615
+ }, gt = function(t) {
1600
1616
  D.batch(() => {
1601
- var s, r, a, l, o, c, v, g;
1602
- if (n(this, re) && this.hasListeners()) {
1603
- const h = n(this, fe).variables, u = n(this, fe).context;
1604
- (t == null ? void 0 : t.type) === "success" ? ((r = (s = n(this, re)).onSuccess) == null || r.call(s, t.data, h, u), (l = (a = n(this, re)).onSettled) == null || l.call(a, t.data, null, h, u)) : (t == null ? void 0 : t.type) === "error" && ((c = (o = n(this, re)).onError) == null || c.call(o, t.error, h, u), (g = (v = n(this, re)).onSettled) == null || g.call(
1605
- v,
1617
+ var s, r, n, l, o, c, d, m;
1618
+ if (a(this, re) && this.hasListeners()) {
1619
+ const h = a(this, fe).variables, u = a(this, fe).context;
1620
+ (t == null ? void 0 : t.type) === "success" ? ((r = (s = a(this, re)).onSuccess) == null || r.call(s, t.data, h, u), (l = (n = a(this, re)).onSettled) == null || l.call(n, t.data, null, h, u)) : (t == null ? void 0 : t.type) === "error" && ((c = (o = a(this, re)).onError) == null || c.call(o, t.error, h, u), (m = (d = a(this, re)).onSettled) == null || m.call(
1621
+ d,
1606
1622
  void 0,
1607
1623
  t.error,
1608
1624
  h,
@@ -1610,24 +1626,24 @@ var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
1610
1626
  ));
1611
1627
  }
1612
1628
  this.listeners.forEach((h) => {
1613
- h(n(this, fe));
1629
+ h(a(this, fe));
1614
1630
  });
1615
1631
  });
1616
- }, Jt), us = f.createContext(
1632
+ }, es), ps = f.createContext(
1617
1633
  void 0
1618
- ), jt = (e) => {
1619
- const t = f.useContext(us);
1634
+ ), St = (e) => {
1635
+ const t = f.useContext(ps);
1620
1636
  if (!t)
1621
1637
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1622
1638
  return t;
1623
- }, ar = ({
1639
+ }, cr = ({
1624
1640
  client: e,
1625
1641
  children: t
1626
1642
  }) => (f.useEffect(() => (e.mount(), () => {
1627
1643
  e.unmount();
1628
- }), [e]), /* @__PURE__ */ i.jsx(us.Provider, { value: e, children: t })), hs = f.createContext(!1), or = () => f.useContext(hs);
1629
- hs.Provider;
1630
- function lr() {
1644
+ }), [e]), /* @__PURE__ */ i.jsx(ps.Provider, { value: e, children: t })), ms = f.createContext(!1), ur = () => f.useContext(ms);
1645
+ ms.Provider;
1646
+ function hr() {
1631
1647
  let e = !1;
1632
1648
  return {
1633
1649
  clearReset: () => {
@@ -1639,75 +1655,75 @@ function lr() {
1639
1655
  isReset: () => e
1640
1656
  };
1641
1657
  }
1642
- var cr = f.createContext(lr()), ur = () => f.useContext(cr);
1643
- function ds(e, t) {
1658
+ var dr = f.createContext(hr()), fr = () => f.useContext(dr);
1659
+ function vs(e, t) {
1644
1660
  return typeof e == "function" ? e(...t) : !!e;
1645
1661
  }
1646
- function hr() {
1662
+ function pr() {
1647
1663
  }
1648
- var dr = (e, t) => {
1664
+ var mr = (e, t) => {
1649
1665
  (e.suspense || e.throwOnError) && (t.isReset() || (e.retryOnMount = !1));
1650
- }, fr = (e) => {
1666
+ }, vr = (e) => {
1651
1667
  f.useEffect(() => {
1652
1668
  e.clearReset();
1653
1669
  }, [e]);
1654
- }, pr = ({
1670
+ }, gr = ({
1655
1671
  result: e,
1656
1672
  errorResetBoundary: t,
1657
1673
  throwOnError: s,
1658
1674
  query: r
1659
- }) => e.isError && !t.isReset() && !e.isFetching && r && ds(s, [e.error, r]), mr = (e) => {
1675
+ }) => e.isError && !t.isReset() && !e.isFetching && r && vs(s, [e.error, r]), yr = (e) => {
1660
1676
  e.suspense && (typeof e.staleTime != "number" && (e.staleTime = 1e3), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, 1e3)));
1661
- }, vr = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, gr = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1677
+ }, Cr = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, xr = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1662
1678
  s.clearReset();
1663
1679
  });
1664
- function yr(e, t, s) {
1665
- var g, h, u, d;
1666
- const r = jt(), a = or(), l = ur(), o = r.defaultQueryOptions(e);
1667
- (h = (g = r.getDefaultOptions().queries) == null ? void 0 : g._experimental_beforeQuery) == null || h.call(
1668
- g,
1680
+ function br(e, t, s) {
1681
+ var m, h, u, v;
1682
+ const r = St(), n = ur(), l = fr(), o = r.defaultQueryOptions(e);
1683
+ (h = (m = r.getDefaultOptions().queries) == null ? void 0 : m._experimental_beforeQuery) == null || h.call(
1684
+ m,
1669
1685
  o
1670
- ), o._optimisticResults = a ? "isRestoring" : "optimistic", mr(o), dr(o, l), fr(l);
1686
+ ), o._optimisticResults = n ? "isRestoring" : "optimistic", yr(o), mr(o, l), vr(l);
1671
1687
  const [c] = f.useState(
1672
1688
  () => new t(
1673
1689
  r,
1674
1690
  o
1675
1691
  )
1676
- ), v = c.getOptimisticResult(o);
1692
+ ), d = c.getOptimisticResult(o);
1677
1693
  if (f.useSyncExternalStore(
1678
1694
  f.useCallback(
1679
- (m) => {
1680
- const S = a ? () => {
1681
- } : c.subscribe(D.batchCalls(m));
1695
+ (g) => {
1696
+ const S = n ? () => {
1697
+ } : c.subscribe(D.batchCalls(g));
1682
1698
  return c.updateResult(), S;
1683
1699
  },
1684
- [c, a]
1700
+ [c, n]
1685
1701
  ),
1686
1702
  () => c.getCurrentResult(),
1687
1703
  () => c.getCurrentResult()
1688
1704
  ), f.useEffect(() => {
1689
1705
  c.setOptions(o, { listeners: !1 });
1690
- }, [o, c]), vr(o, v))
1691
- throw gr(o, c, l);
1692
- if (pr({
1693
- result: v,
1706
+ }, [o, c]), Cr(o, d))
1707
+ throw xr(o, c, l);
1708
+ if (gr({
1709
+ result: d,
1694
1710
  errorResetBoundary: l,
1695
1711
  throwOnError: o.throwOnError,
1696
1712
  query: r.getQueryCache().get(o.queryHash)
1697
1713
  }))
1698
- throw v.error;
1699
- return (d = (u = r.getDefaultOptions().queries) == null ? void 0 : u._experimental_afterQuery) == null || d.call(
1714
+ throw d.error;
1715
+ return (v = (u = r.getDefaultOptions().queries) == null ? void 0 : u._experimental_afterQuery) == null || v.call(
1700
1716
  u,
1701
1717
  o,
1702
- v
1703
- ), o.notifyOnChangeProps ? v : c.trackResult(v);
1718
+ d
1719
+ ), o.notifyOnChangeProps ? d : c.trackResult(d);
1704
1720
  }
1705
- function fs(e, t) {
1706
- return yr(e, sr);
1721
+ function gs(e, t) {
1722
+ return br(e, nr);
1707
1723
  }
1708
- function Cr(e, t) {
1709
- const s = jt(), [r] = f.useState(
1710
- () => new nr(
1724
+ function wr(e, t) {
1725
+ const s = St(), [r] = f.useState(
1726
+ () => new lr(
1711
1727
  s,
1712
1728
  e
1713
1729
  )
@@ -1715,7 +1731,7 @@ function Cr(e, t) {
1715
1731
  f.useEffect(() => {
1716
1732
  r.setOptions(e);
1717
1733
  }, [r, e]);
1718
- const a = f.useSyncExternalStore(
1734
+ const n = f.useSyncExternalStore(
1719
1735
  f.useCallback(
1720
1736
  (o) => r.subscribe(D.batchCalls(o)),
1721
1737
  [r]
@@ -1724,90 +1740,90 @@ function Cr(e, t) {
1724
1740
  () => r.getCurrentResult()
1725
1741
  ), l = f.useCallback(
1726
1742
  (o, c) => {
1727
- r.mutate(o, c).catch(hr);
1743
+ r.mutate(o, c).catch(pr);
1728
1744
  },
1729
1745
  [r]
1730
1746
  );
1731
- if (a.error && ds(r.options.throwOnError, [a.error]))
1732
- throw a.error;
1733
- return { ...a, mutate: l, mutateAsync: a.mutate };
1747
+ if (n.error && vs(r.options.throwOnError, [n.error]))
1748
+ throw n.error;
1749
+ return { ...n, mutate: l, mutateAsync: n.mutate };
1734
1750
  }
1735
- function ps(e) {
1751
+ function ys(e) {
1736
1752
  var t, s, r = "";
1737
1753
  if (typeof e == "string" || typeof e == "number") r += e;
1738
1754
  else if (typeof e == "object") if (Array.isArray(e)) {
1739
- var a = e.length;
1740
- for (t = 0; t < a; t++) e[t] && (s = ps(e[t])) && (r && (r += " "), r += s);
1755
+ var n = e.length;
1756
+ for (t = 0; t < n; t++) e[t] && (s = ys(e[t])) && (r && (r += " "), r += s);
1741
1757
  } else for (s in e) e[s] && (r && (r += " "), r += s);
1742
1758
  return r;
1743
1759
  }
1744
- function O() {
1745
- for (var e, t, s = 0, r = "", a = arguments.length; s < a; s++) (e = arguments[s]) && (t = ps(e)) && (r && (r += " "), r += t);
1760
+ function R() {
1761
+ for (var e, t, s = 0, r = "", n = arguments.length; s < n; s++) (e = arguments[s]) && (t = ys(e)) && (r && (r += " "), r += t);
1746
1762
  return r;
1747
1763
  }
1748
- var xr = Object.defineProperty, br = Object.defineProperties, wr = Object.getOwnPropertyDescriptors, et = Object.getOwnPropertySymbols, ms = Object.prototype.hasOwnProperty, vs = Object.prototype.propertyIsEnumerable, Ft = (e, t, s) => t in e ? xr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, x = (e, t) => {
1764
+ var jr = Object.defineProperty, _r = Object.defineProperties, Sr = Object.getOwnPropertyDescriptors, tt = Object.getOwnPropertySymbols, Cs = Object.prototype.hasOwnProperty, xs = Object.prototype.propertyIsEnumerable, Ut = (e, t, s) => t in e ? jr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, x = (e, t) => {
1749
1765
  for (var s in t || (t = {}))
1750
- ms.call(t, s) && Ft(e, s, t[s]);
1751
- if (et)
1752
- for (var s of et(t))
1753
- vs.call(t, s) && Ft(e, s, t[s]);
1766
+ Cs.call(t, s) && Ut(e, s, t[s]);
1767
+ if (tt)
1768
+ for (var s of tt(t))
1769
+ xs.call(t, s) && Ut(e, s, t[s]);
1754
1770
  return e;
1755
- }, A = (e, t) => br(e, wr(t)), F = (e, t) => {
1771
+ }, A = (e, t) => _r(e, Sr(t)), L = (e, t) => {
1756
1772
  var s = {};
1757
1773
  for (var r in e)
1758
- ms.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
1759
- if (e != null && et)
1760
- for (var r of et(e))
1761
- t.indexOf(r) < 0 && vs.call(e, r) && (s[r] = e[r]);
1774
+ Cs.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
1775
+ if (e != null && tt)
1776
+ for (var r of tt(e))
1777
+ t.indexOf(r) < 0 && xs.call(e, r) && (s[r] = e[r]);
1762
1778
  return s;
1763
1779
  };
1764
- function jr(e, t) {
1780
+ function Er(e, t) {
1765
1781
  typeof e == "function" ? e(t) : e != null && (e.current = t);
1766
1782
  }
1767
- function _r(...e) {
1768
- return (t) => e.forEach((s) => jr(s, t));
1783
+ function Pr(...e) {
1784
+ return (t) => e.forEach((s) => Er(s, t));
1769
1785
  }
1770
- var Sr = f.forwardRef((e, t) => {
1771
- const s = e, { children: r } = s, a = F(s, ["children"]), l = f.Children.toArray(r), o = l.find(Pr);
1786
+ var kr = f.forwardRef((e, t) => {
1787
+ const s = e, { children: r } = s, n = L(s, ["children"]), l = f.Children.toArray(r), o = l.find(Nr);
1772
1788
  if (o) {
1773
- const c = o.props.children, v = l.map((g) => g === o ? f.Children.count(c) > 1 ? f.Children.only(null) : f.isValidElement(c) ? c.props.children : null : g);
1774
- return /* @__PURE__ */ i.jsx(gt, A(x({}, a), { ref: t, children: f.isValidElement(c) ? f.cloneElement(c, void 0, v) : null }));
1789
+ const c = o.props.children, d = l.map((m) => m === o ? f.Children.count(c) > 1 ? f.Children.only(null) : f.isValidElement(c) ? c.props.children : null : m);
1790
+ return /* @__PURE__ */ i.jsx(yt, A(x({}, n), { ref: t, children: f.isValidElement(c) ? f.cloneElement(c, void 0, d) : null }));
1775
1791
  }
1776
- return /* @__PURE__ */ i.jsx(gt, A(x({}, a), { ref: t, children: r }));
1792
+ return /* @__PURE__ */ i.jsx(yt, A(x({}, n), { ref: t, children: r }));
1777
1793
  });
1778
- Sr.displayName = "Slot";
1779
- var gt = f.forwardRef((e, t) => {
1780
- const s = e, { children: r } = s, a = F(s, ["children"]);
1794
+ kr.displayName = "Slot";
1795
+ var yt = f.forwardRef((e, t) => {
1796
+ const s = e, { children: r } = s, n = L(s, ["children"]);
1781
1797
  if (f.isValidElement(r)) {
1782
- const l = kr(r);
1783
- return f.cloneElement(r, A(x({}, Ar(a, r.props)), {
1798
+ const l = Rr(r);
1799
+ return f.cloneElement(r, A(x({}, Mr(n, r.props)), {
1784
1800
  // @ts-ignore
1785
- ref: t ? _r(t, l) : l
1801
+ ref: t ? Pr(t, l) : l
1786
1802
  }));
1787
1803
  }
1788
1804
  return f.Children.count(r) > 1 ? f.Children.only(null) : null;
1789
1805
  });
1790
- gt.displayName = "SlotClone";
1791
- var Er = ({ children: e }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: e });
1792
- function Pr(e) {
1793
- return f.isValidElement(e) && e.type === Er;
1806
+ yt.displayName = "SlotClone";
1807
+ var Ar = ({ children: e }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: e });
1808
+ function Nr(e) {
1809
+ return f.isValidElement(e) && e.type === Ar;
1794
1810
  }
1795
- function Ar(e, t) {
1811
+ function Mr(e, t) {
1796
1812
  const s = x({}, t);
1797
1813
  for (const r in t) {
1798
- const a = e[r], l = t[r];
1799
- /^on[A-Z]/.test(r) ? a && l ? s[r] = (...c) => {
1800
- l(...c), a(...c);
1801
- } : a && (s[r] = a) : r === "style" ? s[r] = x(x({}, a), l) : r === "className" && (s[r] = [a, l].filter(Boolean).join(" "));
1814
+ const n = e[r], l = t[r];
1815
+ /^on[A-Z]/.test(r) ? n && l ? s[r] = (...c) => {
1816
+ l(...c), n(...c);
1817
+ } : n && (s[r] = n) : r === "style" ? s[r] = x(x({}, n), l) : r === "className" && (s[r] = [n, l].filter(Boolean).join(" "));
1802
1818
  }
1803
1819
  return x(x({}, e), s);
1804
1820
  }
1805
- function kr(e) {
1821
+ function Rr(e) {
1806
1822
  var t, s;
1807
- let r = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = r && "isReactWarning" in r && r.isReactWarning;
1808
- return a ? e.ref : (r = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, a = r && "isReactWarning" in r && r.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
1823
+ let r = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, n = r && "isReactWarning" in r && r.isReactWarning;
1824
+ return n ? e.ref : (r = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, n = r && "isReactWarning" in r && r.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
1809
1825
  }
1810
- var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1826
+ var Or = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1811
1827
  const r = `${e.charAt(0)}${t.charAt(0)}`;
1812
1828
  return /* @__PURE__ */ i.jsx(
1813
1829
  "span",
@@ -1822,13 +1838,13 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1822
1838
  (e, t) => {
1823
1839
  var s = e, {
1824
1840
  iconLeft: r,
1825
- iconRight: a,
1841
+ iconRight: n,
1826
1842
  isPending: l = !1,
1827
1843
  isFilled: o = !1,
1828
1844
  variant: c,
1829
- className: v,
1830
- children: g
1831
- } = s, h = F(s, [
1845
+ className: d,
1846
+ children: m
1847
+ } = s, h = L(s, [
1832
1848
  "iconLeft",
1833
1849
  "iconRight",
1834
1850
  "isPending",
@@ -1837,24 +1853,24 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1837
1853
  "className",
1838
1854
  "children"
1839
1855
  ]);
1840
- const u = !!r || !!a;
1856
+ const u = !!r || !!n;
1841
1857
  return /* @__PURE__ */ i.jsxs(
1842
1858
  "button",
1843
1859
  A(x({
1844
1860
  ref: t
1845
1861
  }, h), {
1846
- className: O(
1862
+ className: R(
1847
1863
  "button",
1848
1864
  c && `button--${c}`,
1849
1865
  c && o && `button--${c}--filled`,
1850
1866
  u && "button--with-icon",
1851
1867
  l && "button--pending",
1852
- v
1868
+ d
1853
1869
  ),
1854
1870
  children: [
1855
1871
  r && /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: r }),
1856
- !!g && /* @__PURE__ */ i.jsx("span", { className: "button__label", children: g }),
1857
- a && /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: a })
1872
+ !!m && /* @__PURE__ */ i.jsx("span", { className: "button__label", children: m }),
1873
+ n && /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: n })
1858
1874
  ]
1859
1875
  })
1860
1876
  );
@@ -1862,33 +1878,33 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1862
1878
  );
1863
1879
  Ze.displayName = "Button";
1864
1880
  f.createContext(void 0);
1865
- var Mr = f.forwardRef(
1881
+ var Lr = f.forwardRef(
1866
1882
  (e, t) => {
1867
- var s = e, { prefix: r, suffix: a, className: l } = s, o = F(s, ["prefix", "suffix", "className"]);
1883
+ var s = e, { prefix: r, suffix: n, className: l } = s, o = L(s, ["prefix", "suffix", "className"]);
1868
1884
  return /* @__PURE__ */ i.jsxs("div", { className: "input__wrapper", children: [
1869
1885
  r && /* @__PURE__ */ i.jsx("span", { className: "input__prefix", children: r }),
1870
1886
  /* @__PURE__ */ i.jsx(
1871
1887
  "input",
1872
1888
  x({
1873
1889
  ref: t,
1874
- className: O(
1890
+ className: R(
1875
1891
  "input",
1876
1892
  r && "input--with-prefix",
1877
- a && "input--with-suffix",
1893
+ n && "input--with-suffix",
1878
1894
  l
1879
1895
  )
1880
1896
  }, o)
1881
1897
  ),
1882
- a && /* @__PURE__ */ i.jsx("span", { className: "input__suffix", children: a })
1898
+ n && /* @__PURE__ */ i.jsx("span", { className: "input__suffix", children: n })
1883
1899
  ] });
1884
1900
  }
1885
1901
  );
1886
- Mr.displayName = "TextField";
1902
+ Lr.displayName = "TextField";
1887
1903
  f.createContext(void 0);
1888
- var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__header__action", children: e }), Rr = (e) => {
1889
- var t = e, { children: s, className: r } = t, a = F(t, ["children", "className"]);
1890
- return /* @__PURE__ */ i.jsx("div", A(x({ className: O("card__body", r) }, a), { children: s }));
1891
- }, Lr = (e) => /* @__PURE__ */ i.jsx(
1904
+ var Fr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__header__action", children: e }), Dr = (e) => {
1905
+ var t = e, { children: s, className: r } = t, n = L(t, ["children", "className"]);
1906
+ return /* @__PURE__ */ i.jsx("div", A(x({ className: R("card__body", r) }, n), { children: s }));
1907
+ }, Tr = (e) => /* @__PURE__ */ i.jsx(
1892
1908
  "svg",
1893
1909
  A(x({
1894
1910
  width: "24",
@@ -1908,7 +1924,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1908
1924
  }
1909
1925
  )
1910
1926
  })
1911
- ), _t = Lr, Fr = (e) => /* @__PURE__ */ i.jsx(
1927
+ ), Et = Tr, Ur = (e) => /* @__PURE__ */ i.jsx(
1912
1928
  "svg",
1913
1929
  A(x({
1914
1930
  width: "24",
@@ -1928,7 +1944,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1928
1944
  }
1929
1945
  )
1930
1946
  })
1931
- ), Dr = Fr, Tr = (e) => /* @__PURE__ */ i.jsx(
1947
+ ), Qr = Ur, Hr = (e) => /* @__PURE__ */ i.jsx(
1932
1948
  "svg",
1933
1949
  A(x({
1934
1950
  width: "24",
@@ -1947,7 +1963,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1947
1963
  }
1948
1964
  )
1949
1965
  })
1950
- ), Ur = Tr, Qr = (e) => /* @__PURE__ */ i.jsx(
1966
+ ), Kr = Hr, Gr = (e) => /* @__PURE__ */ i.jsx(
1951
1967
  "svg",
1952
1968
  A(x({
1953
1969
  width: "24",
@@ -1966,7 +1982,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1966
1982
  }
1967
1983
  )
1968
1984
  })
1969
- ), Hr = Qr, Kr = (e) => /* @__PURE__ */ i.jsx(
1985
+ ), qr = Gr, Wr = (e) => /* @__PURE__ */ i.jsx(
1970
1986
  "svg",
1971
1987
  A(x({
1972
1988
  width: "24",
@@ -1985,7 +2001,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1985
2001
  }
1986
2002
  )
1987
2003
  })
1988
- ), Gr = Kr, qr = (e) => /* @__PURE__ */ i.jsxs(
2004
+ ), Vr = Wr, $r = (e) => /* @__PURE__ */ i.jsxs(
1989
2005
  "svg",
1990
2006
  A(x({
1991
2007
  width: "24",
@@ -2022,7 +2038,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2022
2038
  /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("clipPath", { id: "clip0_19_444", children: /* @__PURE__ */ i.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
2023
2039
  ]
2024
2040
  })
2025
- ), Wr = qr, Vr = (e) => /* @__PURE__ */ i.jsxs(
2041
+ ), Zr = $r, zr = (e) => /* @__PURE__ */ i.jsxs(
2026
2042
  "svg",
2027
2043
  A(x({
2028
2044
  width: "24",
@@ -2054,7 +2070,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2054
2070
  )
2055
2071
  ]
2056
2072
  })
2057
- ), $r = Vr, Zr = (e) => /* @__PURE__ */ i.jsxs(
2073
+ ), Yr = zr, Jr = (e) => /* @__PURE__ */ i.jsxs(
2058
2074
  "svg",
2059
2075
  A(x({
2060
2076
  width: "24",
@@ -2106,8 +2122,8 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2106
2122
  )
2107
2123
  ]
2108
2124
  })
2109
- ), Yr = Zr, zr = (e) => {
2110
- var t = e, { className: s } = t, r = F(t, ["className"]);
2125
+ ), Xr = Jr, Ir = (e) => {
2126
+ var t = e, { className: s } = t, r = L(t, ["className"]);
2111
2127
  return /* @__PURE__ */ i.jsxs(
2112
2128
  "svg",
2113
2129
  A(x({
@@ -2116,7 +2132,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2116
2132
  viewBox: "0 0 20 20",
2117
2133
  fill: "none",
2118
2134
  xmlns: "http://www.w3.org/2000/svg",
2119
- className: O("spinner", s)
2135
+ className: R("spinner", s)
2120
2136
  }, r), {
2121
2137
  children: [
2122
2138
  /* @__PURE__ */ i.jsx("circle", { cx: "10", cy: "10", r: "9", stroke: "currentColor", strokeOpacity: "0.2", strokeWidth: "1.5" }),
@@ -2135,7 +2151,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2135
2151
  ]
2136
2152
  })
2137
2153
  );
2138
- }, Jr = zr, Xr = (e) => /* @__PURE__ */ i.jsxs(
2154
+ }, Br = Ir, ei = (e) => /* @__PURE__ */ i.jsxs(
2139
2155
  "svg",
2140
2156
  A(x({
2141
2157
  width: "24",
@@ -2169,7 +2185,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2169
2185
  /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("clipPath", { id: "clip0_762_2934", children: /* @__PURE__ */ i.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
2170
2186
  ]
2171
2187
  })
2172
- ), Ir = Xr, Br = (e) => {
2188
+ ), ti = ei, si = (e) => {
2173
2189
  const t = (s) => `${s}${e.suffix ? `_${e.suffix}` : ""}`;
2174
2190
  return /* @__PURE__ */ i.jsxs(
2175
2191
  "svg",
@@ -2340,7 +2356,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2340
2356
  ]
2341
2357
  })
2342
2358
  );
2343
- }, gs = Br, ei = (e) => /* @__PURE__ */ i.jsxs(
2359
+ }, bs = si, ri = (e) => /* @__PURE__ */ i.jsxs(
2344
2360
  "svg",
2345
2361
  A(x({
2346
2362
  fill: "none",
@@ -2402,7 +2418,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2402
2418
  )
2403
2419
  ]
2404
2420
  })
2405
- ), ti = ei, si = (e) => /* @__PURE__ */ i.jsx(
2421
+ ), ii = ri, ni = (e) => /* @__PURE__ */ i.jsx(
2406
2422
  "svg",
2407
2423
  A(x({
2408
2424
  fill: "none",
@@ -2422,7 +2438,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2422
2438
  }
2423
2439
  )
2424
2440
  })
2425
- ), ri = si, ii = (e) => /* @__PURE__ */ i.jsxs(
2441
+ ), ai = ni, oi = (e) => /* @__PURE__ */ i.jsxs(
2426
2442
  "svg",
2427
2443
  A(x({
2428
2444
  width: "24",
@@ -2449,15 +2465,15 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2449
2465
  /* @__PURE__ */ i.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 20.8 20.7)", fill: "currentColor" })
2450
2466
  ]
2451
2467
  })
2452
- ), ni = ii, ai = (e) => {
2468
+ ), li = oi, ci = (e) => {
2453
2469
  var t = e, {
2454
2470
  variant: s,
2455
2471
  icon: r,
2456
- isStandalone: a,
2472
+ isStandalone: n,
2457
2473
  title: l,
2458
2474
  description: o,
2459
2475
  className: c
2460
- } = t, v = F(t, [
2476
+ } = t, d = L(t, [
2461
2477
  "variant",
2462
2478
  "icon",
2463
2479
  "isStandalone",
@@ -2467,15 +2483,15 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2467
2483
  ]);
2468
2484
  return /* @__PURE__ */ i.jsx(
2469
2485
  "div",
2470
- A(x({}, v), {
2471
- className: O(
2486
+ A(x({}, d), {
2487
+ className: R(
2472
2488
  "card__empty-state",
2473
2489
  s === "error" && "card__empty-state--error",
2474
- a && "card__empty-state--standalone",
2490
+ n && "card__empty-state--standalone",
2475
2491
  c
2476
2492
  ),
2477
2493
  children: /* @__PURE__ */ i.jsxs("div", { className: "card__empty-state__wrapper", children: [
2478
- /* @__PURE__ */ i.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ i.jsx(Ir, {}) : r }),
2494
+ /* @__PURE__ */ i.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ i.jsx(ti, {}) : r }),
2479
2495
  /* @__PURE__ */ i.jsxs("div", { className: "card__empty-state__content", children: [
2480
2496
  /* @__PURE__ */ i.jsx("p", { className: "card__empty-state__title", children: l }),
2481
2497
  /* @__PURE__ */ i.jsx("p", { className: "card__empty-state__description", children: o })
@@ -2483,13 +2499,13 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2483
2499
  ] })
2484
2500
  })
2485
2501
  );
2486
- }, oi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__footer", children: e }), li = (e) => {
2502
+ }, ui = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__footer", children: e }), hi = (e) => {
2487
2503
  var t = e, {
2488
2504
  variant: s = "default",
2489
2505
  sticky: r,
2490
- className: a,
2506
+ className: n,
2491
2507
  children: l
2492
- } = t, o = F(t, [
2508
+ } = t, o = L(t, [
2493
2509
  "variant",
2494
2510
  "sticky",
2495
2511
  "className",
@@ -2498,74 +2514,74 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2498
2514
  return /* @__PURE__ */ i.jsx(
2499
2515
  "div",
2500
2516
  A(x({}, o), {
2501
- className: O(
2517
+ className: R(
2502
2518
  "card__header",
2503
2519
  s && `card__header--${s}`,
2504
2520
  r && "card__header--sticky",
2505
- a
2521
+ n
2506
2522
  ),
2507
2523
  children: l
2508
2524
  })
2509
2525
  );
2510
- }, ci = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__image", children: e }), ui = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: O("card__body__item", t), children: e }), hi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__body__subtitle", children: e }), di = ({ icon: e, children: t }) => /* @__PURE__ */ i.jsxs("div", { className: "card__header__title", children: [
2526
+ }, di = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__image", children: e }), fi = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: R("card__body__item", t), children: e }), pi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__body__subtitle", children: e }), mi = ({ icon: e, children: t }) => /* @__PURE__ */ i.jsxs("div", { className: "card__header__title", children: [
2511
2527
  e && /* @__PURE__ */ i.jsx("span", { className: "card__header__title__icon", children: e }),
2512
2528
  t
2513
- ] }), ys = f.forwardRef(
2529
+ ] }), ws = f.forwardRef(
2514
2530
  (e, t) => {
2515
- var s = e, { type: r, children: a, className: l, variant: o = "default", disabled: c = !1 } = s, v = F(s, ["type", "children", "className", "variant", "disabled"]);
2531
+ var s = e, { type: r, children: n, className: l, variant: o = "default", disabled: c = !1 } = s, d = L(s, ["type", "children", "className", "variant", "disabled"]);
2516
2532
  return f.createElement(
2517
2533
  r,
2518
2534
  x({
2519
- className: O(
2535
+ className: R(
2520
2536
  "card",
2521
2537
  c && "card--disabled",
2522
2538
  o && `card--${o}`,
2523
2539
  l
2524
2540
  ),
2525
2541
  ref: t
2526
- }, v),
2527
- a
2542
+ }, d),
2543
+ n
2528
2544
  );
2529
2545
  }
2530
2546
  );
2531
- ys.displayName = "Card";
2532
- Object.assign(ys, {
2533
- Header: li,
2534
- Action: Or,
2535
- Title: di,
2536
- Subtitle: hi,
2537
- Body: Rr,
2538
- Image: ci,
2539
- Item: ui,
2540
- Footer: oi,
2541
- EmptyState: ai
2547
+ ws.displayName = "Card";
2548
+ Object.assign(ws, {
2549
+ Header: hi,
2550
+ Action: Fr,
2551
+ Title: mi,
2552
+ Subtitle: pi,
2553
+ Body: Dr,
2554
+ Image: di,
2555
+ Item: fi,
2556
+ Footer: ui,
2557
+ EmptyState: ci
2542
2558
  });
2543
- var fi = (e) => {
2544
- var t = e, { className: s, children: r } = t, a = F(t, ["className", "children"]);
2545
- return /* @__PURE__ */ i.jsx("div", A(x({ className: O("checkbox__content", s) }, a), { children: r }));
2546
- }, pi = (e) => {
2547
- var t = e, { className: s, children: r } = t, a = F(t, ["className", "children"]);
2548
- return /* @__PURE__ */ i.jsx("span", A(x({ className: O("checkbox__hint", s) }, a), { children: r }));
2549
- }, Cs = f.createContext(void 0), mi = ({ id: e, name: t, children: s }) => /* @__PURE__ */ i.jsx(Cs.Provider, { value: { id: e, name: t }, children: s }), vi = () => {
2550
- const e = f.useContext(Cs);
2559
+ var vi = (e) => {
2560
+ var t = e, { className: s, children: r } = t, n = L(t, ["className", "children"]);
2561
+ return /* @__PURE__ */ i.jsx("div", A(x({ className: R("checkbox__content", s) }, n), { children: r }));
2562
+ }, gi = (e) => {
2563
+ var t = e, { className: s, children: r } = t, n = L(t, ["className", "children"]);
2564
+ return /* @__PURE__ */ i.jsx("span", A(x({ className: R("checkbox__hint", s) }, n), { children: r }));
2565
+ }, js = f.createContext(void 0), yi = ({ id: e, name: t, children: s }) => /* @__PURE__ */ i.jsx(js.Provider, { value: { id: e, name: t }, children: s }), Ci = () => {
2566
+ const e = f.useContext(js);
2551
2567
  if (!e)
2552
2568
  throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
2553
2569
  return e;
2554
- }, gi = (e) => {
2555
- var t = e, { className: s, children: r } = t, a = F(t, ["className", "children"]);
2556
- const { id: l } = vi();
2557
- return /* @__PURE__ */ i.jsx("label", A(x({ htmlFor: l, className: O("checkbox__label", s) }, a), { children: r }));
2570
+ }, xi = (e) => {
2571
+ var t = e, { className: s, children: r } = t, n = L(t, ["className", "children"]);
2572
+ const { id: l } = Ci();
2573
+ return /* @__PURE__ */ i.jsx("label", A(x({ htmlFor: l, className: R("checkbox__label", s) }, n), { children: r }));
2558
2574
  }, we = (e) => {
2559
2575
  var t = e, {
2560
2576
  id: s,
2561
2577
  name: r,
2562
- isPending: a = !1,
2578
+ isPending: n = !1,
2563
2579
  variant: l = "neutral",
2564
2580
  hasError: o = !1,
2565
2581
  single: c,
2566
- className: v,
2567
- children: g
2568
- } = t, h = F(t, [
2582
+ className: d,
2583
+ children: m
2584
+ } = t, h = L(t, [
2569
2585
  "id",
2570
2586
  "name",
2571
2587
  "isPending",
@@ -2577,11 +2593,11 @@ var fi = (e) => {
2577
2593
  ]);
2578
2594
  const u = f.useRef(null);
2579
2595
  return f.useEffect(() => {
2580
- u.current && (a ? u.current.indeterminate = !0 : u.current.indeterminate = !1);
2581
- }, [a]), /* @__PURE__ */ i.jsxs(
2596
+ u.current && (n ? u.current.indeterminate = !0 : u.current.indeterminate = !1);
2597
+ }, [n]), /* @__PURE__ */ i.jsxs(
2582
2598
  "div",
2583
2599
  {
2584
- className: O("checkbox", l && `checkbox--${l}`, o && "checkbox--error"),
2600
+ className: R("checkbox", l && `checkbox--${l}`, o && "checkbox--error"),
2585
2601
  children: [
2586
2602
  /* @__PURE__ */ i.jsx(
2587
2603
  "input",
@@ -2590,81 +2606,81 @@ var fi = (e) => {
2590
2606
  name: r,
2591
2607
  type: "checkbox",
2592
2608
  ref: u,
2593
- className: O("checkbox__input", v),
2609
+ className: R("checkbox__input", d),
2594
2610
  value: c ? "true" : ""
2595
2611
  }, h)
2596
2612
  ),
2597
- a ? /* @__PURE__ */ i.jsx(Jr, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx(Dr, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2598
- /* @__PURE__ */ i.jsx(mi, { id: s, name: r, children: g })
2613
+ n ? /* @__PURE__ */ i.jsx(Br, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx(Qr, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2614
+ /* @__PURE__ */ i.jsx(yi, { id: s, name: r, children: m })
2599
2615
  ]
2600
2616
  }
2601
2617
  );
2602
2618
  };
2603
- we.Content = fi;
2604
- we.Label = gi;
2605
- we.Hint = pi;
2619
+ we.Content = vi;
2620
+ we.Label = xi;
2621
+ we.Hint = gi;
2606
2622
  we.Error = Error;
2607
- var yi = (e) => {
2608
- var t = e, { type: s = "div", className: r, children: a } = t, l = F(t, ["type", "className", "children"]);
2609
- return f.createElement(s, x({ className: O("dialog__body", r) }, l), a);
2610
- }, yt = () => document.body.style.removeProperty("overflow"), Dt = (e) => e.preventDefault(), Ci = '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])', xi = (e) => {
2611
- var t = e, { className: s, children: r, shouldAnimate: a = !0 } = t, l = F(t, ["className", "children", "shouldAnimate"]);
2612
- const { ref: o, defaultOpen: c, isModal: v, onClose: g } = Ye();
2623
+ var bi = (e) => {
2624
+ var t = e, { type: s = "div", className: r, children: n } = t, l = L(t, ["type", "className", "children"]);
2625
+ return f.createElement(s, x({ className: R("dialog__body", r) }, l), n);
2626
+ }, Ct = () => document.body.style.removeProperty("overflow"), Qt = (e) => e.preventDefault(), wi = '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])', ji = (e) => {
2627
+ var t = e, { className: s, children: r, shouldAnimate: n = !0 } = t, l = L(t, ["className", "children", "shouldAnimate"]);
2628
+ const { ref: o, defaultOpen: c, isModal: d, onClose: m } = ze();
2613
2629
  return f.useEffect(() => {
2614
2630
  const h = o == null ? void 0 : o.current;
2615
2631
  if (h != null && h.open) {
2616
- const u = h.querySelectorAll(Ci), d = u[0], m = u[u.length - 1], S = (P) => {
2617
- if (!(P.key === "Tab"))
2632
+ const u = h.querySelectorAll(wi), v = u[0], g = u[u.length - 1], S = (_) => {
2633
+ if (!(_.key === "Tab"))
2618
2634
  return;
2619
- P.shiftKey ? document.activeElement === d && (m.focus(), P.preventDefault()) : document.activeElement === m && (d.focus(), P.preventDefault());
2635
+ _.shiftKey ? document.activeElement === v && (g.focus(), _.preventDefault()) : document.activeElement === g && (v.focus(), _.preventDefault());
2620
2636
  };
2621
- return document.body.style.overflow = "hidden", h.addEventListener("keydown", S), window.addEventListener("popstate", () => yt()), () => {
2622
- h.removeEventListener("keydown", S), window.removeEventListener("popstate", () => yt());
2637
+ return document.body.style.overflow = "hidden", h.addEventListener("keydown", S), window.addEventListener("popstate", () => Ct()), () => {
2638
+ h.removeEventListener("keydown", S), window.removeEventListener("popstate", () => Ct());
2623
2639
  };
2624
2640
  }
2625
2641
  }, [o]), f.useEffect(() => {
2626
2642
  const h = o == null ? void 0 : o.current;
2627
2643
  if (!h)
2628
2644
  return;
2629
- if (c && (h.removeAttribute("open"), h.showModal(), h.focus()), v)
2630
- return h.addEventListener("cancel", Dt), () => h.removeEventListener("cancel", Dt);
2631
- const u = ({ clientX: d, clientY: m }) => {
2632
- const { top: S, right: P, bottom: k, left: C } = h.getBoundingClientRect(), j = 0 < m && 0 < d, b = S < m && m < k, M = C < d && d < P;
2633
- j && !(b && M) && g();
2645
+ if (c && (h.removeAttribute("open"), h.showModal(), h.focus()), d)
2646
+ return h.addEventListener("cancel", Qt), () => h.removeEventListener("cancel", Qt);
2647
+ const u = ({ clientX: v, clientY: g }) => {
2648
+ const { top: S, right: _, bottom: P, left: C } = h.getBoundingClientRect(), j = 0 < g && 0 < v, b = S < g && g < P, M = C < v && v < _;
2649
+ j && !(b && M) && m();
2634
2650
  };
2635
- return h.addEventListener("cancel", g), h.addEventListener("mousedown", u), () => {
2636
- h.removeEventListener("cancel", g), h.removeEventListener("mousedown", u);
2651
+ return h.addEventListener("cancel", m), h.addEventListener("mousedown", u), () => {
2652
+ h.removeEventListener("cancel", m), h.removeEventListener("mousedown", u);
2637
2653
  };
2638
- }, [o, v, g, c]), /* @__PURE__ */ i.jsx(
2654
+ }, [o, d, m, c]), /* @__PURE__ */ i.jsx(
2639
2655
  "dialog",
2640
2656
  A(x({
2641
2657
  ref: o,
2642
2658
  open: c,
2643
- "aria-modal": !!v,
2659
+ "aria-modal": !!d,
2644
2660
  "aria-labelledby": "dialogTitle",
2645
- className: O("dialog", a && "dialog--animated", s)
2661
+ className: R("dialog", n && "dialog--animated", s)
2646
2662
  }, l), {
2647
2663
  children: r
2648
2664
  })
2649
2665
  );
2650
- }, xs = f.createContext(void 0), bi = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
2651
- const a = f.useRef(null), l = f.useRef(t), o = f.useCallback(() => {
2666
+ }, _s = f.createContext(void 0), _i = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
2667
+ const n = f.useRef(null), l = f.useRef(t), o = f.useCallback(() => {
2652
2668
  var c;
2653
- yt(), (c = a.current) == null || c.close(), l.current && (l == null || l.current());
2654
- }, [a]);
2655
- return /* @__PURE__ */ i.jsx(xs.Provider, { value: { ref: a, defaultOpen: e, isModal: s, onClose: o }, children: r });
2656
- }, Ye = () => {
2657
- const e = f.useContext(xs);
2669
+ Ct(), (c = n.current) == null || c.close(), l.current && (l == null || l.current());
2670
+ }, [n]);
2671
+ return /* @__PURE__ */ i.jsx(_s.Provider, { value: { ref: n, defaultOpen: e, isModal: s, onClose: o }, children: r });
2672
+ }, ze = () => {
2673
+ const e = f.useContext(_s);
2658
2674
  if (!e)
2659
2675
  throw new Error("Dialog compound components can not be rendered outside of Dialog");
2660
2676
  return e;
2661
- }, wi = (e) => {
2662
- var t = e, { children: s } = t, r = F(t, ["children"]);
2663
- const { onClose: a } = Ye();
2664
- return /* @__PURE__ */ i.jsx(Ze, A(x({ onClick: a }, r), { children: s }));
2665
- }, bs = f.forwardRef((e, t) => {
2666
- var s = e, { className: r } = s, a = F(s, ["className"]);
2667
- const { onClose: l } = Ye();
2677
+ }, Si = (e) => {
2678
+ var t = e, { children: s } = t, r = L(t, ["children"]);
2679
+ const { onClose: n } = ze();
2680
+ return /* @__PURE__ */ i.jsx(Ze, A(x({ onClick: n }, r), { children: s }));
2681
+ }, Ss = f.forwardRef((e, t) => {
2682
+ var s = e, { className: r } = s, n = L(s, ["className"]);
2683
+ const { onClose: l } = ze();
2668
2684
  return /* @__PURE__ */ i.jsx(
2669
2685
  Ze,
2670
2686
  x({
@@ -2672,19 +2688,19 @@ var yi = (e) => {
2672
2688
  ref: t,
2673
2689
  formMethod: "dialog",
2674
2690
  onClick: l,
2675
- iconLeft: /* @__PURE__ */ i.jsx(Ur, {}),
2691
+ iconLeft: /* @__PURE__ */ i.jsx(Kr, {}),
2676
2692
  variant: "icon--secondary",
2677
- className: O("dialog__close button--icon", r)
2678
- }, a)
2693
+ className: R("dialog__close button--icon", r)
2694
+ }, n)
2679
2695
  );
2680
2696
  });
2681
- bs.displayName = "Close";
2682
- var ji = (e) => {
2683
- var t = e, { className: s, children: r } = t, a = F(t, ["className", "children"]);
2684
- return /* @__PURE__ */ i.jsx("div", A(x({ className: O("dialog__footer", s) }, a), { children: r }));
2685
- }, _i = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "dialog__header", children: e }), Si = (e) => {
2686
- var t = e, { icon: s, children: r, className: a } = t, l = F(t, ["icon", "children", "className"]);
2687
- const { ref: o } = Ye(), c = f.useRef(null);
2697
+ Ss.displayName = "Close";
2698
+ var Ei = (e) => {
2699
+ var t = e, { className: s, children: r } = t, n = L(t, ["className", "children"]);
2700
+ return /* @__PURE__ */ i.jsx("div", A(x({ className: R("dialog__footer", s) }, n), { children: r }));
2701
+ }, Pi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "dialog__header", children: e }), ki = (e) => {
2702
+ var t = e, { icon: s, children: r, className: n } = t, l = L(t, ["icon", "children", "className"]);
2703
+ const { ref: o } = ze(), c = f.useRef(null);
2688
2704
  return f.useEffect(() => {
2689
2705
  o != null && o.current && o.current.focus();
2690
2706
  }, [o]), /* @__PURE__ */ i.jsxs(
@@ -2693,7 +2709,7 @@ var ji = (e) => {
2693
2709
  tabIndex: 0,
2694
2710
  ref: c,
2695
2711
  id: "dialogTitle",
2696
- className: O("dialog__header__title", a)
2712
+ className: R("dialog__header__title", n)
2697
2713
  }, l), {
2698
2714
  children: [
2699
2715
  s && /* @__PURE__ */ i.jsx("span", { className: "dialog__header__icon", children: s }),
@@ -2701,96 +2717,96 @@ var ji = (e) => {
2701
2717
  ]
2702
2718
  })
2703
2719
  );
2704
- }, Ei = (e) => {
2705
- var t = e, { children: s } = t, r = F(t, ["children"]);
2706
- const { ref: a } = Ye();
2720
+ }, Ai = (e) => {
2721
+ var t = e, { children: s } = t, r = L(t, ["children"]);
2722
+ const { ref: n } = ze();
2707
2723
  return /* @__PURE__ */ i.jsx(Ze, A(x({ onClick: () => {
2708
2724
  var l;
2709
- return (l = a == null ? void 0 : a.current) == null ? void 0 : l.showModal();
2725
+ return (l = n == null ? void 0 : n.current) == null ? void 0 : l.showModal();
2710
2726
  } }, r), { children: s }));
2711
- }, G = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ i.jsx(bi, { defaultOpen: !!e, isModal: t, onClose: r, children: s });
2712
- G.Trigger = Ei;
2713
- G.Root = xi;
2714
- G.Title = Si;
2715
- G.Header = _i;
2716
- G.Body = yi;
2717
- G.Footer = ji;
2718
- G.Button = wi;
2719
- G.Close = bs;
2720
- var ws = f.createContext(void 0), Pi = ({
2727
+ }, G = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ i.jsx(_i, { defaultOpen: !!e, isModal: t, onClose: r, children: s });
2728
+ G.Trigger = Ai;
2729
+ G.Root = ji;
2730
+ G.Title = ki;
2731
+ G.Header = Pi;
2732
+ G.Body = bi;
2733
+ G.Footer = Ei;
2734
+ G.Button = Si;
2735
+ G.Close = Ss;
2736
+ var Es = f.createContext(void 0), Ni = ({
2721
2737
  id: e,
2722
2738
  position: t,
2723
2739
  isOpen: s,
2724
2740
  setIsOpen: r,
2725
- activeItemIndex: a,
2741
+ activeItemIndex: n,
2726
2742
  setActiveItemIndex: l,
2727
2743
  clearActiveItemIndex: o,
2728
2744
  triggerRef: c,
2729
- contentRef: v,
2730
- children: g
2745
+ contentRef: d,
2746
+ children: m
2731
2747
  }) => /* @__PURE__ */ i.jsx(
2732
- ws.Provider,
2748
+ Es.Provider,
2733
2749
  {
2734
2750
  value: {
2735
2751
  id: e,
2736
2752
  position: t,
2737
2753
  isOpen: s,
2738
2754
  setIsOpen: r,
2739
- activeItemIndex: a,
2755
+ activeItemIndex: n,
2740
2756
  setActiveItemIndex: l,
2741
2757
  clearActiveItemIndex: o,
2742
2758
  triggerRef: c,
2743
- contentRef: v
2759
+ contentRef: d
2744
2760
  },
2745
- children: g
2761
+ children: m
2746
2762
  }
2747
- ), js = () => {
2748
- const e = f.useContext(ws);
2763
+ ), Ps = () => {
2764
+ const e = f.useContext(Es);
2749
2765
  if (e === void 0)
2750
2766
  throw new Error("useMenu must be used within a MenuProvider");
2751
2767
  return e;
2752
- }, Ai = ({ as: e, children: t }) => {
2768
+ }, Mi = ({ as: e, children: t }) => {
2753
2769
  const {
2754
2770
  id: s,
2755
2771
  position: r,
2756
- isOpen: a,
2772
+ isOpen: n,
2757
2773
  setIsOpen: l,
2758
2774
  activeItemIndex: o,
2759
2775
  setActiveItemIndex: c,
2760
- clearActiveItemIndex: v,
2761
- triggerRef: g,
2776
+ clearActiveItemIndex: d,
2777
+ triggerRef: m,
2762
2778
  contentRef: h
2763
- } = js(), u = (d) => {
2764
- var m;
2765
- if (!a)
2779
+ } = Ps(), u = (v) => {
2780
+ var g;
2781
+ if (!n)
2766
2782
  return;
2767
- if (d.key === "Escape")
2768
- return v(), l(!1), (m = g.current) == null ? void 0 : m.focus();
2769
- const S = d.shiftKey, P = Ss(h.current).length - 1;
2770
- switch (d.key) {
2783
+ if (v.key === "Escape")
2784
+ return d(), l(!1), (g = m.current) == null ? void 0 : g.focus();
2785
+ const S = v.shiftKey, _ = As(h.current).length - 1;
2786
+ switch (v.key) {
2771
2787
  case "Tab": {
2772
2788
  if (S && o !== 0)
2773
- return d.preventDefault(), c(o ? Math.max(0, o - 1) : 0);
2774
- if (!S && o !== P) {
2775
- d.preventDefault();
2776
- const k = o !== void 0 ? o + 1 : 0;
2777
- return c(Math.min(P, k));
2789
+ return v.preventDefault(), c(o ? Math.max(0, o - 1) : 0);
2790
+ if (!S && o !== _) {
2791
+ v.preventDefault();
2792
+ const P = o !== void 0 ? o + 1 : 0;
2793
+ return c(Math.min(_, P));
2778
2794
  }
2779
2795
  break;
2780
2796
  }
2781
2797
  case "ArrowUp":
2782
2798
  case "ArrowLeft":
2783
- return d.preventDefault(), c(o ? Math.max(0, o - 1) : 0);
2799
+ return v.preventDefault(), c(o ? Math.max(0, o - 1) : 0);
2784
2800
  case "ArrowDown":
2785
2801
  case "ArrowRight": {
2786
- d.preventDefault();
2787
- const k = o !== void 0 ? o + 1 : 0;
2788
- return c(Math.min(P, k));
2802
+ v.preventDefault();
2803
+ const P = o !== void 0 ? o + 1 : 0;
2804
+ return c(Math.min(_, P));
2789
2805
  }
2790
2806
  case "Home":
2791
- return d.preventDefault(), c(0);
2807
+ return v.preventDefault(), c(0);
2792
2808
  case "End":
2793
- return d.preventDefault(), c(P);
2809
+ return v.preventDefault(), c(_);
2794
2810
  }
2795
2811
  };
2796
2812
  return e ? f.createElement(
@@ -2798,7 +2814,7 @@ var ws = f.createContext(void 0), Pi = ({
2798
2814
  {
2799
2815
  id: `${s}-content`,
2800
2816
  ref: h,
2801
- className: O("menu__list", `menu__list--${r}`, a && "menu__list--active"),
2817
+ className: R("menu__list", `menu__list--${r}`, n && "menu__list--active"),
2802
2818
  onKeyDown: u
2803
2819
  },
2804
2820
  t
@@ -2809,63 +2825,63 @@ var ws = f.createContext(void 0), Pi = ({
2809
2825
  {
2810
2826
  id: `${s}-content`,
2811
2827
  ref: h,
2812
- className: O("menu__list", `menu__list--${r}`, a && "menu__list--active"),
2828
+ className: R("menu__list", `menu__list--${r}`, n && "menu__list--active"),
2813
2829
  onKeyDown: u,
2814
2830
  children: t
2815
2831
  }
2816
2832
  )
2817
2833
  );
2818
- }, ki = (e) => {
2819
- var t = e, { children: s, className: r } = t, a = F(t, ["children", "className"]);
2820
- return /* @__PURE__ */ i.jsx("li", A(x({}, a), { className: O("menu__list-item", r), children: s }));
2821
- }, _s = ({ children: e, className: t }) => {
2822
- const { id: s, isOpen: r, setIsOpen: a, clearActiveItemIndex: l, setActiveItemIndex: o, triggerRef: c } = js(), v = () => {
2823
- l(), a((h) => !h), r || o(0);
2824
- }, g = (h) => {
2834
+ }, Ri = (e) => {
2835
+ var t = e, { children: s, className: r } = t, n = L(t, ["children", "className"]);
2836
+ return /* @__PURE__ */ i.jsx("li", A(x({}, n), { className: R("menu__list-item", r), children: s }));
2837
+ }, ks = ({ children: e, className: t }) => {
2838
+ const { id: s, isOpen: r, setIsOpen: n, clearActiveItemIndex: l, setActiveItemIndex: o, triggerRef: c } = Ps(), d = () => {
2839
+ l(), n((h) => !h), r || o(0);
2840
+ }, m = (h) => {
2825
2841
  if (r) {
2826
2842
  if (h.key === "Escape")
2827
- return l(), a(!1);
2843
+ return l(), n(!1);
2828
2844
  h.key === "ArrowDown" && (h.preventDefault(), o(0));
2829
2845
  }
2830
2846
  };
2831
2847
  return f.cloneElement(e, {
2832
2848
  id: `${s}-trigger`,
2833
2849
  ref: c,
2834
- className: O("menu__trigger", t),
2835
- onClick: v,
2836
- onKeyDown: g,
2850
+ className: R("menu__trigger", t),
2851
+ onClick: d,
2852
+ onKeyDown: m,
2837
2853
  "aria-expanded": r,
2838
2854
  "aria-controls": `${s}-content`
2839
2855
  });
2840
2856
  };
2841
- _s.displayName = "Trigger";
2842
- var Ss = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsByTagName("ul")).reduce((s, r) => [...s, ...Array.from(r.getElementsByTagName("li"))], []) : [], W = (e) => {
2843
- var t = e, { type: s, id: r, position: a = "bottom-end", children: l, className: o } = t, c = F(t, ["type", "id", "position", "children", "className"]);
2844
- const v = f.useRef(null), g = f.useRef(null), h = f.useRef(null), [u, d] = f.useState(!1), [m, S] = f.useState(), [P, k] = f.useState(m);
2845
- m !== P && m !== void 0 && h.current && (Ss(h.current)[m].firstChild.focus(), k(m));
2857
+ ks.displayName = "Trigger";
2858
+ var As = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsByTagName("ul")).reduce((s, r) => [...s, ...Array.from(r.getElementsByTagName("li"))], []) : [], W = (e) => {
2859
+ var t = e, { type: s, id: r, position: n = "bottom-end", children: l, className: o } = t, c = L(t, ["type", "id", "position", "children", "className"]);
2860
+ const d = f.useRef(null), m = f.useRef(null), h = f.useRef(null), [u, v] = f.useState(!1), [g, S] = f.useState(), [_, P] = f.useState(g);
2861
+ g !== _ && g !== void 0 && h.current && (As(h.current)[g].firstChild.focus(), P(g));
2846
2862
  const C = () => {
2847
- S(void 0), k(void 0);
2863
+ S(void 0), P(void 0);
2848
2864
  }, j = (b) => {
2849
2865
  var M;
2850
- ((M = v.current) == null ? void 0 : M.contains(b.relatedTarget)) || (C(), d(!1));
2866
+ ((M = d.current) == null ? void 0 : M.contains(b.relatedTarget)) || (C(), v(!1));
2851
2867
  };
2852
2868
  return /* @__PURE__ */ i.jsx(
2853
- Pi,
2869
+ Ni,
2854
2870
  {
2855
2871
  id: r,
2856
- position: a,
2872
+ position: n,
2857
2873
  isOpen: u,
2858
- setIsOpen: d,
2859
- activeItemIndex: m,
2874
+ setIsOpen: v,
2875
+ activeItemIndex: g,
2860
2876
  setActiveItemIndex: S,
2861
2877
  clearActiveItemIndex: C,
2862
- triggerRef: g,
2878
+ triggerRef: m,
2863
2879
  contentRef: h,
2864
2880
  children: f.createElement(
2865
2881
  s,
2866
2882
  A(x({}, c), {
2867
2883
  id: r,
2868
- ref: v,
2884
+ ref: d,
2869
2885
  className: `menu ${o || ""}`,
2870
2886
  onBlur: j
2871
2887
  }),
@@ -2874,70 +2890,70 @@ var Ss = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsBy
2874
2890
  }
2875
2891
  );
2876
2892
  };
2877
- W.Trigger = _s;
2878
- W.Content = Ai;
2879
- W.Item = ki;
2893
+ W.Trigger = ks;
2894
+ W.Content = Mi;
2895
+ W.Item = Ri;
2880
2896
  f.createContext(void 0);
2881
- var Ni = (/* @__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");
2882
- [...new Set(Ni.values())].map((e) => ({
2897
+ var Oi = (/* @__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");
2898
+ [...new Set(Oi.values())].map((e) => ({
2883
2899
  label: `+${e}`,
2884
2900
  value: e
2885
2901
  }));
2886
2902
  f.createContext(void 0);
2887
2903
  f.createContext(void 0);
2888
- var tt = /* @__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))(tt || {});
2889
- const Mi = "/icons/bouMenuIcons.svg", Oi = ({
2904
+ var st = /* @__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))(st || {});
2905
+ const Li = "/icons/bouMenuIcons.svg", Fi = ({
2890
2906
  bouIconId: e,
2891
2907
  ...t
2892
- }) => /* @__PURE__ */ i.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i.jsx("use", { href: `${Mi}#${tt[e]}` }) }), Ct = (e) => typeof e.icon == "string" && e.icon in tt ? /* @__PURE__ */ i.jsx(Oi, { bouIconId: tt[e.icon] }) : e.icon, Ri = ({
2908
+ }) => /* @__PURE__ */ i.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i.jsx("use", { href: `${Li}#${st[e]}` }) }), xt = (e) => typeof e.icon == "string" && e.icon in st ? /* @__PURE__ */ i.jsx(Fi, { bouIconId: st[e.icon] }) : e.icon, Di = ({
2893
2909
  label: e,
2894
2910
  className: t,
2895
2911
  onClick: s,
2896
2912
  icon: r
2897
2913
  }) => /* @__PURE__ */ i.jsx(W.Item, { className: t, children: /* @__PURE__ */ i.jsxs("button", { onClick: s, children: [
2898
- /* @__PURE__ */ i.jsx(Ct, { icon: r }),
2914
+ /* @__PURE__ */ i.jsx(xt, { icon: r }),
2899
2915
  e
2900
2916
  ] }) }), _e = (e) => {
2901
- const t = Fs(), { className: s, label: r, mobileUrl: a, desktopUrl: l, icon: o } = e;
2917
+ const t = Qs(), { className: s, label: r, mobileUrl: n, desktopUrl: l, icon: o } = e;
2902
2918
  return /* @__PURE__ */ i.jsxs(W.Item, { className: s, children: [
2903
- (!t || t && !l) && /* @__PURE__ */ i.jsxs("a", { href: a, referrerPolicy: "no-referrer-when-downgrade", children: [
2904
- /* @__PURE__ */ i.jsx(Ct, { icon: o }),
2919
+ (!t || t && !l) && /* @__PURE__ */ i.jsxs("a", { href: n, referrerPolicy: "no-referrer-when-downgrade", children: [
2920
+ /* @__PURE__ */ i.jsx(xt, { icon: o }),
2905
2921
  r
2906
2922
  ] }),
2907
2923
  !!l && /* @__PURE__ */ i.jsxs("a", { href: l, referrerPolicy: "no-referrer-when-downgrade", children: [
2908
- /* @__PURE__ */ i.jsx(Ct, { icon: o }),
2924
+ /* @__PURE__ */ i.jsx(xt, { icon: o }),
2909
2925
  r
2910
2926
  ] })
2911
2927
  ] });
2912
- }, Es = f.createContext(void 0), Li = ({ position: e, bouMenuItems: t, children: s }) => /* @__PURE__ */ i.jsx(Es.Provider, { value: { position: e, bouMenuItems: t }, children: s }), Ps = () => {
2913
- const e = f.useContext(Es);
2928
+ }, Ns = f.createContext(void 0), Ti = ({ position: e, bouMenuItems: t, country: s, children: r }) => /* @__PURE__ */ i.jsx(Ns.Provider, { value: { position: e, bouMenuItems: t, country: s }, children: r }), Ms = () => {
2929
+ const e = f.useContext(Ns);
2914
2930
  if (!e)
2915
2931
  throw new Error("Authentication context can not be rendered outside of Authentication");
2916
2932
  return e;
2917
- }, As = f.createContext(void 0), Fi = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ i.jsx(As.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), St = () => {
2918
- const e = f.useContext(As);
2933
+ }, Rs = f.createContext(void 0), Ui = ({ apiUrl: e, authUrl: t, redirectUrl: s, children: r }) => /* @__PURE__ */ i.jsx(Rs.Provider, { value: { apiUrl: e, authUrl: t, redirectUrl: s }, children: r }), Pt = () => {
2934
+ const e = f.useContext(Rs);
2919
2935
  if (!e)
2920
2936
  throw new Error("Api context can not be rendered outside of Api");
2921
2937
  return e;
2922
- }, ks = ({ apiUrl: e, redirectUrl: t, trackingInfo: s }) => {
2938
+ }, Os = ({ authUrl: e, redirectUrl: t, trackingInfo: s }) => {
2923
2939
  const r = new URLSearchParams({ redirectUrl: t });
2924
2940
  s && r.append("trackingInfo", s);
2925
- const a = `${e}/login?${r.toString()}`, l = `${e}/logout?${r.toString()}`;
2926
- return { loginUrl: a, logoutUrl: l };
2927
- }, st = () => {
2928
- const { apiUrl: e, redirectUrl: t } = St(), s = Ds();
2929
- return ks({ apiUrl: e, redirectUrl: t, trackingInfo: s });
2930
- }, Di = () => {
2931
- const { apiUrl: e } = St();
2941
+ const n = `${e}/login?${r.toString()}`, l = `${e}/logout?${r.toString()}`;
2942
+ return { loginUrl: n, logoutUrl: l };
2943
+ }, rt = () => {
2944
+ const { authUrl: e, redirectUrl: t } = Pt(), s = Hs();
2945
+ return Os({ authUrl: e, redirectUrl: t, trackingInfo: s });
2946
+ }, Qi = () => {
2947
+ const { apiUrl: e } = Pt();
2932
2948
  return `${`${e}/xtra`}/authentication/v1/user/profile`;
2933
- }, Tt = (e) => e ? `+${e.countryCode} ${e.number}` : "", Ut = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), Qt = ({ apiUrl: e, redirectUrl: t }) => {
2934
- const { loginUrl: s } = ks({ apiUrl: e, redirectUrl: t });
2949
+ }, Ht = (e) => e ? `+${e.countryCode} ${e.number}` : "", Kt = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), Gt = ({ apiUrl: e, redirectUrl: t }) => {
2950
+ const { loginUrl: s } = Os({ authUrl: e, redirectUrl: t });
2935
2951
  window.location.replace(s);
2936
- }, Ht = (e) => {
2952
+ }, qt = (e) => {
2937
2953
  var l;
2938
2954
  if (!e)
2939
- return { user: { state: () => "NotAuthenticated" }, tryToLogon: Qt };
2940
- const t = new Date(e.dateOfBirth), s = Ut(Pt.Mobile, e.phone), r = Ut(Pt.Fixed, e.phone), a = Tt(s) ?? Tt(r) ?? "";
2955
+ return { user: { state: () => "NotAuthenticated" }, tryToLogon: Gt };
2956
+ const t = new Date(e.dateOfBirth), s = Kt(At.Mobile, e.phone), r = Kt(At.Fixed, e.phone), n = Ht(s) ?? Ht(r) ?? "";
2941
2957
  return {
2942
2958
  user: {
2943
2959
  ...(l = window.XTRA) == null ? void 0 : l.user,
@@ -2947,7 +2963,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
2947
2963
  mob: () => t.getMonth() + 1,
2948
2964
  yob: () => t.getFullYear(),
2949
2965
  gender: () => e.genderCode,
2950
- phone: () => a,
2966
+ phone: () => n,
2951
2967
  streetName: () => {
2952
2968
  var o;
2953
2969
  return (o = e.address) == null ? void 0 : o.streetName;
@@ -2976,12 +2992,12 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
2976
2992
  cbh: () => e.customerIdentifier,
2977
2993
  state: () => "Authenticated"
2978
2994
  },
2979
- tryToLogon: Qt
2995
+ tryToLogon: Gt
2980
2996
  };
2981
- }, Ns = ["profile"], Ms = () => {
2982
- const { i18n: e } = je(), t = Di(), s = sessionStorage.getItem("profile"), r = !!s;
2983
- return fs({
2984
- queryKey: Ns,
2997
+ }, Ls = ["profile"], Fs = () => {
2998
+ const { i18n: e } = je(), t = Qi(), s = sessionStorage.getItem("profile"), r = !!s;
2999
+ return gs({
3000
+ queryKey: Ls,
2985
3001
  queryFn: async () => {
2986
3002
  const l = await fetch(t, {
2987
3003
  credentials: "include",
@@ -2990,7 +3006,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
2990
3006
  });
2991
3007
  if (!l.ok) {
2992
3008
  if (l.status === 401)
2993
- return window.XTRA = { ...window.XTRA, ...Ht() }, window.postMessage(
3009
+ return window.XTRA = { ...window.XTRA, ...qt() }, window.postMessage(
2994
3010
  { source: "xtra-authentication", isAuthenticated: !1 },
2995
3011
  new URL(window.location.href).origin
2996
3012
  ), sessionStorage.removeItem("profile"), { authenticationStatus: "NotAuthenticated" };
@@ -2998,11 +3014,11 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
2998
3014
  return { authenticationStatus: "Authenticated", profile: JSON.parse(s) };
2999
3015
  throw new Error("Failed to retrieve profile");
3000
3016
  }
3001
- const o = await l.json(), { firstName: c, lastName: v } = o;
3002
- return sessionStorage.setItem("profile", JSON.stringify({ firstName: c, lastName: v })), window.postMessage(
3017
+ const o = await l.json(), { firstName: c, lastName: d } = o;
3018
+ return sessionStorage.setItem("profile", JSON.stringify({ firstName: c, lastName: d })), window.postMessage(
3003
3019
  { source: "xtra-authentication", isAuthenticated: !0 },
3004
3020
  new URL(window.location.href).origin
3005
- ), window.XTRA = { ...window.XTRA, ...Ht(o) }, {
3021
+ ), window.XTRA = { ...window.XTRA, ...qt(o) }, {
3006
3022
  authenticationStatus: "Authenticated",
3007
3023
  profile: { firstName: o.firstName, lastName: o.lastName }
3008
3024
  };
@@ -3014,55 +3030,55 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3014
3030
  placeholderData: { authenticationStatus: "Pending" },
3015
3031
  refetchOnWindowFocus: !1
3016
3032
  });
3017
- }, Ti = () => {
3018
- const { t: e } = je(), t = Xt(), { position: s, bouMenuItems: r } = Ps(), { logoutUrl: a } = st(), o = jt().getQueryData(Ns), c = (o == null ? void 0 : o.profile.firstName) ?? "", v = (o == null ? void 0 : o.profile.lastName) ?? "", g = () => {
3019
- sessionStorage.removeItem("profile"), window.location.href = a;
3033
+ }, Hi = () => {
3034
+ const { t: e } = je(), { position: t, bouMenuItems: s, country: r } = Ms(), n = ts({ country: r }), { logoutUrl: l } = rt(), c = St().getQueryData(Ls), d = (c == null ? void 0 : c.profile.firstName) ?? "", m = (c == null ? void 0 : c.profile.lastName) ?? "", h = () => {
3035
+ sessionStorage.removeItem("profile"), window.location.href = l;
3020
3036
  };
3021
- return /* @__PURE__ */ i.jsxs(W, { type: "nav", id: "xtra-menu", position: s, children: [
3037
+ return /* @__PURE__ */ i.jsxs(W, { type: "nav", id: "xtra-menu", position: t, children: [
3022
3038
  /* @__PURE__ */ i.jsx(
3023
3039
  W.Trigger,
3024
3040
  {
3025
- className: O(
3041
+ className: R(
3026
3042
  "button",
3027
3043
  "button--neutral",
3028
3044
  "button--authentication",
3029
3045
  "button--authentication--authenticated"
3030
3046
  ),
3031
3047
  children: /* @__PURE__ */ i.jsxs("button", { children: [
3032
- /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Nr, { variant: "small", firstName: c, lastName: v }) }),
3033
- /* @__PURE__ */ i.jsx("span", { className: "button__label", children: c }),
3034
- /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(_t, {}) })
3048
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Or, { variant: "small", firstName: d, lastName: m }) }),
3049
+ /* @__PURE__ */ i.jsx("span", { className: "button__label", children: d }),
3050
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Et, {}) })
3035
3051
  ] })
3036
3052
  }
3037
3053
  ),
3038
3054
  /* @__PURE__ */ i.jsxs(W.Content, { as: "div", children: [
3039
- !!r && r.length > 0 && /* @__PURE__ */ i.jsx("ul", { className: "bou-menu__list", children: r.map(({ label: h, icon: u, url: d }, m) => /* @__PURE__ */ i.jsx(
3055
+ !!s && s.length > 0 && /* @__PURE__ */ i.jsx("ul", { className: "bou-menu__list", children: s.map(({ label: u, icon: v, url: g }, S) => /* @__PURE__ */ i.jsx(
3040
3056
  _e,
3041
3057
  {
3042
3058
  className: "bou-menu-item",
3043
- mobileUrl: d,
3044
- icon: u,
3045
- label: h
3059
+ mobileUrl: g,
3060
+ icon: v,
3061
+ label: u
3046
3062
  },
3047
- m
3063
+ S
3048
3064
  )) }),
3049
3065
  /* @__PURE__ */ i.jsxs("ul", { children: [
3050
3066
  /* @__PURE__ */ i.jsx(
3051
3067
  _e,
3052
3068
  {
3053
3069
  className: "manage-profile",
3054
- mobileUrl: `${t}/manage-profile`,
3055
- desktopUrl: `${t}/manage-profile/personal-data`,
3056
- icon: /* @__PURE__ */ i.jsx($r, {}),
3070
+ mobileUrl: `${n}/manage-profile`,
3071
+ desktopUrl: `${n}/manage-profile/personal-data`,
3072
+ icon: /* @__PURE__ */ i.jsx(Yr, {}),
3057
3073
  label: e("manageProfile")
3058
3074
  }
3059
3075
  ),
3060
- /* @__PURE__ */ i.jsx(
3076
+ r === "BE" && /* @__PURE__ */ i.jsx(
3061
3077
  _e,
3062
3078
  {
3063
3079
  className: "payment",
3064
- mobileUrl: `${t}/payment`,
3065
- icon: /* @__PURE__ */ i.jsx(ri, {}),
3080
+ mobileUrl: `${n}/payment`,
3081
+ icon: /* @__PURE__ */ i.jsx(ai, {}),
3066
3082
  label: e("payment")
3067
3083
  }
3068
3084
  ),
@@ -3070,16 +3086,16 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3070
3086
  _e,
3071
3087
  {
3072
3088
  className: "gift-cards",
3073
- mobileUrl: `${t}/gift-cards`,
3074
- icon: /* @__PURE__ */ i.jsx(ti, {}),
3089
+ mobileUrl: `${n}/gift-cards`,
3090
+ icon: /* @__PURE__ */ i.jsx(ii, {}),
3075
3091
  label: e("giftCards")
3076
3092
  }
3077
3093
  ),
3078
3094
  /* @__PURE__ */ i.jsx(
3079
3095
  _e,
3080
3096
  {
3081
- mobileUrl: `${t}/identifiers`,
3082
- icon: /* @__PURE__ */ i.jsx(ni, {}),
3097
+ mobileUrl: `${n}/identifiers`,
3098
+ icon: /* @__PURE__ */ i.jsx(li, {}),
3083
3099
  label: e("qrCode")
3084
3100
  }
3085
3101
  ),
@@ -3087,32 +3103,108 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3087
3103
  _e,
3088
3104
  {
3089
3105
  className: "manage-privacy",
3090
- mobileUrl: `${t}/manage-privacy`,
3091
- desktopUrl: `${t}/manage-privacy/permissions`,
3092
- icon: /* @__PURE__ */ i.jsx(Wr, {}),
3106
+ mobileUrl: `${n}/manage-privacy`,
3107
+ desktopUrl: `${n}/manage-privacy/permissions`,
3108
+ icon: /* @__PURE__ */ i.jsx(Zr, {}),
3093
3109
  label: e("privacy")
3094
3110
  }
3095
3111
  ),
3096
- /* @__PURE__ */ i.jsx(Ri, { onClick: g, icon: /* @__PURE__ */ i.jsx(Gr, {}), label: e("logout") })
3112
+ /* @__PURE__ */ i.jsx(Di, { onClick: h, icon: /* @__PURE__ */ i.jsx(Vr, {}), label: e("logout") })
3097
3113
  ] })
3098
3114
  ] })
3099
3115
  ] });
3100
- }, Ui = () => {
3116
+ }, Ki = () => {
3101
3117
  const { t: e } = je();
3102
- return /* @__PURE__ */ i.jsxs("button", { className: O("button", "button--neutral", "button--authentication"), children: [
3118
+ return /* @__PURE__ */ i.jsxs("button", { className: R("button", "button--neutral", "button--authentication"), children: [
3103
3119
  /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx("i", { className: "spinner" }) }),
3104
3120
  /* @__PURE__ */ i.jsxs("span", { className: "button__label", children: [
3105
3121
  e("loading"),
3106
3122
  "..."
3107
3123
  ] })
3108
3124
  ] });
3109
- }, Qi = ({ className: e }) => {
3110
- const { t } = je(), { loginUrl: s } = st();
3111
- return /* @__PURE__ */ i.jsxs(
3125
+ };
3126
+ /*! js-cookie v3.0.5 | MIT */
3127
+ function Xe(e) {
3128
+ for (var t = 1; t < arguments.length; t++) {
3129
+ var s = arguments[t];
3130
+ for (var r in s)
3131
+ e[r] = s[r];
3132
+ }
3133
+ return e;
3134
+ }
3135
+ var Gi = {
3136
+ read: function(e) {
3137
+ return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
3138
+ },
3139
+ write: function(e) {
3140
+ return encodeURIComponent(e).replace(
3141
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
3142
+ decodeURIComponent
3143
+ );
3144
+ }
3145
+ };
3146
+ function bt(e, t) {
3147
+ function s(n, l, o) {
3148
+ if (!(typeof document > "u")) {
3149
+ o = Xe({}, t, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
3150
+ var c = "";
3151
+ for (var d in o)
3152
+ o[d] && (c += "; " + d, o[d] !== !0 && (c += "=" + o[d].split(";")[0]));
3153
+ return document.cookie = n + "=" + e.write(l, n) + c;
3154
+ }
3155
+ }
3156
+ function r(n) {
3157
+ if (!(typeof document > "u" || arguments.length && !n)) {
3158
+ for (var l = document.cookie ? document.cookie.split("; ") : [], o = {}, c = 0; c < l.length; c++) {
3159
+ var d = l[c].split("="), m = d.slice(1).join("=");
3160
+ try {
3161
+ var h = decodeURIComponent(d[0]);
3162
+ if (o[h] = e.read(m, h), n === h)
3163
+ break;
3164
+ } catch {
3165
+ }
3166
+ }
3167
+ return n ? o[n] : o;
3168
+ }
3169
+ }
3170
+ return Object.create(
3171
+ {
3172
+ set: s,
3173
+ get: r,
3174
+ remove: function(n, l) {
3175
+ s(
3176
+ n,
3177
+ "",
3178
+ Xe({}, l, {
3179
+ expires: -1
3180
+ })
3181
+ );
3182
+ },
3183
+ withAttributes: function(n) {
3184
+ return bt(this.converter, Xe({}, this.attributes, n));
3185
+ },
3186
+ withConverter: function(n) {
3187
+ return bt(Xe({}, this.converter, n), this.attributes);
3188
+ }
3189
+ },
3190
+ {
3191
+ attributes: { value: Object.freeze(t) },
3192
+ converter: { value: Object.freeze(e) }
3193
+ }
3194
+ );
3195
+ }
3196
+ var Wt = bt(Gi, { path: "/" });
3197
+ const qi = ({ className: e }) => {
3198
+ const { t } = je(), { loginUrl: s } = rt(), r = f.useRef(null);
3199
+ return f.useEffect(() => {
3200
+ const n = Wt.get("shouldLogin"), l = !!n && !!atob(n);
3201
+ r != null && r.current && l && (Wt.remove("shouldLogin"), r.current.click());
3202
+ }, [r]), /* @__PURE__ */ i.jsxs(
3112
3203
  "a",
3113
3204
  {
3205
+ ref: r,
3114
3206
  href: s,
3115
- className: O(
3207
+ className: R(
3116
3208
  "button",
3117
3209
  "button--neutral",
3118
3210
  "button--authentication",
@@ -3120,14 +3212,14 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3120
3212
  e
3121
3213
  ),
3122
3214
  children: [
3123
- /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(gs, { width: 24, height: 24, suffix: "desktop" }) }),
3215
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(bs, { width: 24, height: 24, suffix: "desktop" }) }),
3124
3216
  /* @__PURE__ */ i.jsx("span", { className: "button__label", children: t("login") }),
3125
- /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(_t, {}) })
3217
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Et, {}) })
3126
3218
  ]
3127
3219
  }
3128
3220
  );
3129
- }, Hi = () => {
3130
- const { t: e } = je(), { loginUrl: t } = st(), s = Xt(), { position: r } = Ps();
3221
+ }, Wi = () => {
3222
+ const { t: e } = je(), { loginUrl: t } = rt(), s = ts(), { position: r } = Ms();
3131
3223
  return /* @__PURE__ */ i.jsxs(
3132
3224
  W,
3133
3225
  {
@@ -3137,56 +3229,56 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3137
3229
  className: "menu--unauthenticated",
3138
3230
  "aria-label": e("xtraMenuAriaLabel"),
3139
3231
  children: [
3140
- /* @__PURE__ */ i.jsx(W.Trigger, { className: O("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ i.jsxs("button", { children: [
3141
- /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(gs, { width: 24, height: 24, suffix: "mobile" }) }),
3142
- /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(_t, {}) })
3232
+ /* @__PURE__ */ i.jsx(W.Trigger, { className: R("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ i.jsxs("button", { children: [
3233
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(bs, { width: 24, height: 24, suffix: "mobile" }) }),
3234
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Et, {}) })
3143
3235
  ] }) }),
3144
3236
  /* @__PURE__ */ i.jsxs(W.Content, { children: [
3145
3237
  /* @__PURE__ */ i.jsx(W.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: t, className: "button button--with-icon", children: [
3146
- /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Hr, {}) }),
3238
+ /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(qr, {}) }),
3147
3239
  /* @__PURE__ */ i.jsx("span", { className: "button__label", children: e("login") })
3148
3240
  ] }) }),
3149
3241
  /* @__PURE__ */ i.jsx(W.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: `${s}/onboarding/register`, className: "button button--with-icon", children: [
3150
- /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Yr, {}) }),
3242
+ /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Xr, {}) }),
3151
3243
  /* @__PURE__ */ i.jsx("span", { className: "button__label", children: e("register") })
3152
3244
  ] }) })
3153
3245
  ] })
3154
3246
  ]
3155
3247
  }
3156
3248
  );
3157
- }, Ki = () => {
3249
+ }, Vi = () => {
3158
3250
  var t, s;
3159
- const e = Ms();
3160
- return ((t = e.data) == null ? void 0 : t.authenticationStatus) === "Authenticated" ? /* @__PURE__ */ i.jsx(Ti, {}) : ((s = e.data) == null ? void 0 : s.authenticationStatus) === "NotAuthenticated" || e.isError ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
3161
- /* @__PURE__ */ i.jsx(Qi, {}),
3162
- /* @__PURE__ */ i.jsx(Hi, {})
3163
- ] }) : /* @__PURE__ */ i.jsx(Ui, {});
3164
- }, Os = () => {
3165
- const { apiUrl: e } = St();
3251
+ const e = Fs();
3252
+ return ((t = e.data) == null ? void 0 : t.authenticationStatus) === "Authenticated" ? /* @__PURE__ */ i.jsx(Hi, {}) : ((s = e.data) == null ? void 0 : s.authenticationStatus) === "NotAuthenticated" || e.isError ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
3253
+ /* @__PURE__ */ i.jsx(qi, {}),
3254
+ /* @__PURE__ */ i.jsx(Wi, {})
3255
+ ] }) : /* @__PURE__ */ i.jsx(Ki, {});
3256
+ }, Ds = () => {
3257
+ const { apiUrl: e } = Pt();
3166
3258
  return `${`${e}/xtra`}/authentication/v1/gdpr`;
3167
- }, Gi = () => {
3168
- const e = Os(), t = new ls();
3169
- return Cr({
3259
+ }, $i = () => {
3260
+ const e = Ds(), t = new ds();
3261
+ return wr({
3170
3262
  mutationFn: async (r) => {
3171
- const a = await fetch(`${e}/tc`, {
3263
+ const n = await fetch(`${e}/tc`, {
3172
3264
  body: JSON.stringify({ acceptedTC: r }),
3173
3265
  credentials: "include",
3174
3266
  headers: { "Content-Type": "application/json" },
3175
3267
  method: "POST",
3176
3268
  mode: "cors"
3177
3269
  });
3178
- if (!a.ok)
3270
+ if (!n.ok)
3179
3271
  throw new Error("Network response was not ok");
3180
- return a;
3272
+ return n;
3181
3273
  },
3182
3274
  onSuccess: async () => {
3183
3275
  await t.invalidateQueries({ queryKey: ["gdpr"] });
3184
3276
  }
3185
3277
  });
3186
- }, qi = () => {
3278
+ }, Zi = () => {
3187
3279
  var l;
3188
- const { i18n: e } = je(), t = Os(), r = ((l = Ms().data) == null ? void 0 : l.authenticationStatus) === "Authenticated";
3189
- return fs({
3280
+ const { i18n: e } = je(), t = Ds(), r = ((l = Fs().data) == null ? void 0 : l.authenticationStatus) === "Authenticated";
3281
+ return gs({
3190
3282
  queryKey: ["gdpr"],
3191
3283
  queryFn: async () => {
3192
3284
  const o = await fetch(`${t}/tc/check`, {
@@ -3200,38 +3292,38 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3200
3292
  },
3201
3293
  enabled: r
3202
3294
  });
3203
- }, Wi = () => {
3204
- var k;
3205
- const { t: e } = je(), { logoutUrl: t } = st(), [s, r] = f.useState(0), [a, l] = f.useState({}), { AccessibleFormMessage: o, formRef: c } = Ts({ submitCount: s, errors: a }), { mutate: v, isError: g } = Gi(), h = qi(), [u, d] = f.useState(!1);
3206
- Us({ element: "xtra-authentication" });
3207
- const m = e("termsAndConditions.error.required"), S = () => {
3208
- d(!1), document.body.style.removeProperty("overflow");
3295
+ }, zi = () => {
3296
+ var P;
3297
+ const { t: e } = je(), { logoutUrl: t } = rt(), [s, r] = f.useState(0), [n, l] = f.useState({}), { AccessibleFormMessage: o, formRef: c } = Ks({ submitCount: s, errors: n }), { mutate: d, isError: m } = $i(), h = Zi(), [u, v] = f.useState(!1);
3298
+ Gs({ element: "xtra-authentication" });
3299
+ const g = e("termsAndConditions.error.required"), S = () => {
3300
+ v(!1), document.body.style.removeProperty("overflow");
3209
3301
  };
3210
3302
  f.useEffect(() => {
3211
3303
  var C;
3212
- (C = h.data) != null && C.length && d(!0);
3213
- }, [(k = h.data) == null ? void 0 : k.length]), f.useEffect(() => {
3304
+ (C = h.data) != null && C.length && v(!0);
3305
+ }, [(P = h.data) == null ? void 0 : P.length]), f.useEffect(() => {
3214
3306
  u && document.body.style.setProperty("overflow", "hidden");
3215
3307
  }, [u]), f.useEffect(() => {
3216
- g && l({ acceptedTC: m });
3217
- }, [m, g]);
3218
- const P = (C) => {
3308
+ m && l({ acceptedTC: g });
3309
+ }, [g, m]);
3310
+ const _ = (C) => {
3219
3311
  C.preventDefault(), r((b) => b + 1);
3220
3312
  const { acceptedTC: j } = C.target;
3221
3313
  if (j instanceof RadioNodeList) {
3222
3314
  const b = Object.values(j);
3223
- b.every((R) => R.checked) ? (l({}), v(b.map((R) => R.value)), S()) : l({ acceptedTC: m });
3315
+ b.every((F) => F.checked) ? (l({}), d(b.map((F) => F.value)), S()) : l({ acceptedTC: g });
3224
3316
  } else
3225
- j != null && j.checked ? (l({}), v([j.value]), S()) : l({ acceptedTC: m });
3317
+ j != null && j.checked ? (l({}), d([j.value]), S()) : l({ acceptedTC: g });
3226
3318
  };
3227
3319
  return u ? /* @__PURE__ */ i.jsxs(G, { defaultOpen: u, isModal: !0, children: [
3228
3320
  o,
3229
3321
  /* @__PURE__ */ i.jsxs(G.Root, { children: [
3230
- /* @__PURE__ */ i.jsx(G.Header, { children: /* @__PURE__ */ i.jsx(G.Title, { icon: /* @__PURE__ */ i.jsx("i", { className: "commerce__icon" }), children: /* @__PURE__ */ i.jsx(Yi, { children: e("termsAndConditions.title") }) }) }),
3231
- /* @__PURE__ */ i.jsx(G.Body, { children: /* @__PURE__ */ i.jsxs(Rs, { ref: c, id: "tc-form", onSubmit: P, children: [
3232
- /* @__PURE__ */ i.jsxs($i, { children: [
3322
+ /* @__PURE__ */ i.jsx(G.Header, { children: /* @__PURE__ */ i.jsx(G.Title, { icon: /* @__PURE__ */ i.jsx("i", { className: "commerce__icon" }), children: /* @__PURE__ */ i.jsx(Ii, { children: e("termsAndConditions.title") }) }) }),
3323
+ /* @__PURE__ */ i.jsx(G.Body, { children: /* @__PURE__ */ i.jsxs(Ts, { ref: c, id: "tc-form", onSubmit: _, children: [
3324
+ /* @__PURE__ */ i.jsxs(Ji, { children: [
3233
3325
  e("termsAndConditions.description"),
3234
- a.acceptedTC && /* @__PURE__ */ i.jsx(zi, { children: m })
3326
+ n.acceptedTC && /* @__PURE__ */ i.jsx(Bi, { children: g })
3235
3327
  ] }),
3236
3328
  h.data.map(({ tcCode: C, title: j, URL: b }) => /* @__PURE__ */ i.jsx(
3237
3329
  we,
@@ -3241,8 +3333,8 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3241
3333
  name: "acceptedTC",
3242
3334
  variant: "primary",
3243
3335
  children: /* @__PURE__ */ i.jsxs(we.Content, { children: [
3244
- /* @__PURE__ */ i.jsx(Vi, { children: j }),
3245
- /* @__PURE__ */ i.jsx(Zi, { href: b, children: e("termsAndConditions.action", { title: j }) })
3336
+ /* @__PURE__ */ i.jsx(Yi, { children: j }),
3337
+ /* @__PURE__ */ i.jsx(Xi, { href: b, children: e("termsAndConditions.action", { title: j }) })
3246
3338
  ] })
3247
3339
  },
3248
3340
  C
@@ -3252,7 +3344,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3252
3344
  /* @__PURE__ */ i.jsx(
3253
3345
  "a",
3254
3346
  {
3255
- className: O("button", "button--secondary", "button--terms-and-conditions"),
3347
+ className: R("button", "button--secondary", "button--terms-and-conditions"),
3256
3348
  href: t,
3257
3349
  children: e("logout")
3258
3350
  }
@@ -3261,15 +3353,15 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3261
3353
  ] })
3262
3354
  ] })
3263
3355
  ] }) : null;
3264
- }, Vi = ({
3356
+ }, Yi = ({
3265
3357
  children: e,
3266
3358
  ...t
3267
- }) => /* @__PURE__ */ i.jsx(we.Label, { className: "form--tc__label", ...t, children: e }), Rs = f.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ i.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
3268
- Rs.displayName = "TermsAndConditionsForm";
3269
- const $i = ({
3359
+ }) => /* @__PURE__ */ i.jsx(we.Label, { className: "form--tc__label", ...t, children: e }), Ts = f.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ i.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
3360
+ Ts.displayName = "TermsAndConditionsForm";
3361
+ const Ji = ({
3270
3362
  children: e,
3271
3363
  ...t
3272
- }) => /* @__PURE__ */ i.jsx("p", { className: "form--tc__description", ...t, children: e }), Zi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx(
3364
+ }) => /* @__PURE__ */ i.jsx("p", { className: "form--tc__description", ...t, children: e }), Xi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx(
3273
3365
  "a",
3274
3366
  {
3275
3367
  className: "form--tc__link",
@@ -3280,10 +3372,27 @@ const $i = ({
3280
3372
  ...t,
3281
3373
  children: e
3282
3374
  }
3283
- ), Yi = ({ children: e }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: e }), zi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), Ji = new ls(), Bi = ({ environment: e, redirectUrl: t, apiUrl: s, position: r, commerceId: a, bouMenuItems: l }) => /* @__PURE__ */ i.jsx(Qs, { environment: e, children: /* @__PURE__ */ i.jsx(Hs, { commerceId: a, children: /* @__PURE__ */ i.jsx(Fi, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ i.jsxs(ar, { client: Ji, children: [
3284
- /* @__PURE__ */ i.jsx(Li, { position: r, bouMenuItems: l, children: /* @__PURE__ */ i.jsx(Ki, {}) }),
3285
- /* @__PURE__ */ i.jsx(Wi, {})
3375
+ ), Ii = ({ children: e }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: e }), Bi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), en = new ds(), rn = ({
3376
+ environment: e,
3377
+ redirectUrl: t,
3378
+ apiUrl: s,
3379
+ authUrl: r,
3380
+ position: n,
3381
+ commerceId: l,
3382
+ bouMenuItems: o,
3383
+ country: c
3384
+ }) => /* @__PURE__ */ i.jsx(qs, { environment: e, children: /* @__PURE__ */ i.jsx(Ws, { commerceId: l, children: /* @__PURE__ */ i.jsx(Ui, { apiUrl: s, authUrl: r, redirectUrl: t, children: /* @__PURE__ */ i.jsxs(cr, { client: en, children: [
3385
+ /* @__PURE__ */ i.jsx(
3386
+ Ti,
3387
+ {
3388
+ position: n,
3389
+ bouMenuItems: o,
3390
+ country: c,
3391
+ children: /* @__PURE__ */ i.jsx(Vi, {})
3392
+ }
3393
+ ),
3394
+ /* @__PURE__ */ i.jsx(zi, {})
3286
3395
  ] }) }) }) });
3287
3396
  export {
3288
- Bi as default
3397
+ rn as default
3289
3398
  };