@wix/bookings 1.0.1786 → 1.0.1787

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.
Files changed (51) hide show
  1. package/build/cjs/context-booking-checkout.d.ts +22 -6
  2. package/build/cjs/context-booking-checkout.js +2296 -2253
  3. package/build/cjs/context-booking-checkout.js.map +1 -1
  4. package/build/cjs/context-categories.js +285 -275
  5. package/build/cjs/context-categories.js.map +1 -1
  6. package/build/cjs/context-locations.js +465 -455
  7. package/build/cjs/context-locations.js.map +1 -1
  8. package/build/cjs/context-service-addons.js +964 -917
  9. package/build/cjs/context-service-addons.js.map +1 -1
  10. package/build/cjs/context-service.d.ts +14 -5
  11. package/build/cjs/context-service.js +3514 -3337
  12. package/build/cjs/context-service.js.map +1 -1
  13. package/build/cjs/context-services.js +878 -832
  14. package/build/cjs/context-services.js.map +1 -1
  15. package/build/cjs/context-time-slots.d.ts +10 -0
  16. package/build/cjs/context-time-slots.js +1202 -1159
  17. package/build/cjs/context-time-slots.js.map +1 -1
  18. package/build/es/context-booking-checkout.d.mts +22 -6
  19. package/build/es/context-booking-checkout.mjs +2304 -2261
  20. package/build/es/context-booking-checkout.mjs.map +1 -1
  21. package/build/es/context-categories.mjs +285 -275
  22. package/build/es/context-categories.mjs.map +1 -1
  23. package/build/es/context-locations.mjs +465 -455
  24. package/build/es/context-locations.mjs.map +1 -1
  25. package/build/es/context-service-addons.mjs +971 -924
  26. package/build/es/context-service-addons.mjs.map +1 -1
  27. package/build/es/context-service.d.mts +14 -5
  28. package/build/es/context-service.mjs +3383 -3206
  29. package/build/es/context-service.mjs.map +1 -1
  30. package/build/es/context-services.mjs +878 -832
  31. package/build/es/context-services.mjs.map +1 -1
  32. package/build/es/context-time-slots.d.mts +10 -0
  33. package/build/es/context-time-slots.mjs +1222 -1179
  34. package/build/es/context-time-slots.mjs.map +1 -1
  35. package/build/internal/cjs/context-booking-checkout.d.ts +22 -6
  36. package/build/internal/cjs/context-service.d.ts +14 -5
  37. package/build/internal/cjs/context-time-slots.d.ts +10 -0
  38. package/build/internal/es/context-booking-checkout.d.mts +22 -6
  39. package/build/internal/es/context-service.d.mts +14 -5
  40. package/build/internal/es/context-time-slots.d.mts +10 -0
  41. package/context-runtime/context-booking-checkout/runtime.d.ts +22 -6
  42. package/context-runtime/context-booking-checkout/runtime.js +3 -3
  43. package/context-runtime/context-categories/runtime.js +2 -2
  44. package/context-runtime/context-locations/runtime.js +2 -2
  45. package/context-runtime/context-service/runtime.d.ts +14 -5
  46. package/context-runtime/context-service/runtime.js +3 -3
  47. package/context-runtime/context-service-addons/runtime.js +2 -2
  48. package/context-runtime/context-services/runtime.js +3 -3
  49. package/context-runtime/context-time-slots/runtime.d.ts +10 -0
  50. package/context-runtime/context-time-slots/runtime.js +3 -3
  51. package/package.json +2 -2
@@ -20,12 +20,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // context-locations.ts
21
21
  var context_locations_exports = {};
22
22
  __export(context_locations_exports, {
23
- LOCATIONS_CONTEXT_MISSING_PROVIDER_ERROR: () => Ji,
24
- LocationsContextProvider: () => ea,
25
- default: () => ea,
26
- injectAccessTokenGetter: () => ta,
23
+ LOCATIONS_CONTEXT_MISSING_PROVIDER_ERROR: () => Zi,
24
+ LocationsContextProvider: () => ra,
25
+ default: () => ra,
26
+ injectAccessTokenGetter: () => ia,
27
27
  locationsContext: () => $,
28
- useLocationsContext: () => Yi
28
+ useLocationsContext: () => Qi
29
29
  });
30
30
  module.exports = __toCommonJS(context_locations_exports);
31
31
 
@@ -119,67 +119,67 @@ function ie(e5) {
119
119
  }
120
120
  }
121
121
  var ae = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
122
- function oe(e5) {
123
- return de(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
124
- }
125
- var se = /([\p{Ll}\d])(\p{Lu})/gu;
126
- var ce = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
127
- var le = `$1\0$2`;
128
- var ue = /[^\p{L}\d]+/giu;
129
- function de(e5) {
122
+ function T(e5) {
123
+ return ue(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
124
+ }
125
+ var oe = /([\p{Ll}\d])(\p{Lu})/gu;
126
+ var se = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
127
+ var ce = `$1\0$2`;
128
+ var le = /[^\p{L}\d]+/giu;
129
+ function ue(e5) {
130
130
  let t2 = e5.trim();
131
- t2 = t2.replace(se, le).replace(ce, le), t2 = t2.replace(ue, `\0`);
131
+ t2 = t2.replace(oe, ce).replace(se, ce), t2 = t2.replace(le, `\0`);
132
132
  let n2 = 0, r2 = t2.length;
133
133
  for (; t2.charAt(n2) === `\0`; ) n2++;
134
134
  if (n2 === r2) return [];
135
135
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
136
136
  return t2.slice(n2, r2).split(/\0/g);
137
137
  }
138
- var fe = (e5) => `validationError` in (e5.response?.data?.details ?? {});
139
- var pe = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
140
- var me = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
141
- function he(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
138
+ var de = (e5) => `validationError` in (e5.response?.data?.details ?? {});
139
+ var fe = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
140
+ var pe = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
141
+ function me(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
142
142
  if (typeof e5 != `object` || !e5) throw e5;
143
- if (fe(e5)) return ge(e5, t2, n2);
144
- if (pe(e5)) return _e(e5);
145
- if (me(e5)) {
146
- let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: oe(n3), data: {} }, requestId: e5.requestId };
147
- return T(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
143
+ if (de(e5)) return he(e5, t2, n2);
144
+ if (fe(e5)) return ge(e5);
145
+ if (pe(e5)) {
146
+ let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: T(n3), data: {} }, requestId: e5.requestId };
147
+ return E(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
148
148
  }
149
- return ve(e5);
149
+ return _e(e5);
150
150
  }
151
- var ge = (e5, t2, n2) => {
152
- let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = ye(t2, a2, n2)?.sort((e6, t3) => e6.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e6, description: t3 }) => `"${e6}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
153
- return T(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
151
+ var he = (e5, t2, n2) => {
152
+ let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = ve(t2, a2, n2)?.sort((e6, t3) => e6.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e6, description: t3 }) => `"${e6}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
153
+ return E(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
154
154
  };
155
- var T = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
156
- var _e = (e5) => {
157
- let t2 = e5.response?.status, n2 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n2, i2 = e5.response?.data?.details?.applicationError?.description ?? n2, a2 = e5.response?.data?.details?.applicationError?.code ?? oe(n2), o2 = e5.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e5.requestId };
158
- return T(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
155
+ var E = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
156
+ var ge = (e5) => {
157
+ let t2 = e5.response?.status, n2 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n2, i2 = e5.response?.data?.details?.applicationError?.description ?? n2, a2 = e5.response?.data?.details?.applicationError?.code ?? T(n2), o2 = e5.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e5.requestId };
158
+ return E(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
159
159
  };
160
- var ve = (e5) => T(e5, { message: e5.requestId ? `System error occurred, request-id: ${e5.requestId}` : `System error occurred: ${JSON.stringify(e5)}`, extraProperties: { requestId: e5.requestId, status: e5.response?.status, code: oe(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
161
- var ye = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
160
+ var _e = (e5) => E(e5, { message: e5.requestId ? `System error occurred, request-id: ${e5.requestId}` : `System error occurred: ${JSON.stringify(e5)}`, extraProperties: { requestId: e5.requestId, status: e5.response?.status, code: T(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
161
+ var ve = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
162
162
  let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
163
163
  return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
164
164
  let r3 = t2[e6.field];
165
- if (r3) return { ...e6, field: be(r3, i2) };
165
+ if (r3) return { ...e6, field: ye(r3, i2) };
166
166
  let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
167
167
  if (s2) {
168
168
  let t3 = a2[s2];
169
- if (t3) return { ...e6, field: e6.field.replace(s2, be(t3, i2)) };
169
+ if (t3) return { ...e6, field: e6.field.replace(s2, ye(t3, i2)) };
170
170
  }
171
171
  return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
172
172
  });
173
173
  };
174
- var be = (e5, t2) => {
175
- let n2 = xe(e5);
174
+ var ye = (e5, t2) => {
175
+ let n2 = be(e5);
176
176
  return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
177
177
  };
178
- var xe = (e5) => {
178
+ var be = (e5) => {
179
179
  let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
180
180
  return t2 && t2.groups && Number(t2.groups.argIndex);
181
181
  };
182
- function Se(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
182
+ function xe(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
183
183
  return ie(() => e5({ request: async (e6) => {
184
184
  let i3 = e6({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
185
185
  a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
@@ -193,7 +193,7 @@ function Se(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
193
193
  e8 = await s3.json();
194
194
  } catch {
195
195
  }
196
- let t3 = we(s3.status, e8?.message ?? s3.statusText, e8?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e8 }), n3 = he(t3);
196
+ let t3 = Ce(s3.status, e8?.message ?? s3.statusText, e8?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e8 }), n3 = me(t3);
197
197
  throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
198
198
  }
199
199
  let l3 = await s3.json();
@@ -203,18 +203,18 @@ function Se(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
203
203
  }
204
204
  }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
205
205
  }
206
- var Ce = class extends Error {
206
+ var Se = class extends Error {
207
207
  response;
208
208
  requestId;
209
209
  constructor(e5) {
210
210
  super(), this.response = e5.response, this.requestId = e5.requestId;
211
211
  }
212
212
  };
213
- var we = (e5, t2, n2, r2) => new Ce({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2 }, status: e5 }, requestId: r2?.requestId });
214
- var Te = `.`;
215
- function Ee(e5, t2, n2) {
213
+ var Ce = (e5, t2, n2, r2) => new Se({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2 }, status: e5 }, requestId: r2?.requestId });
214
+ var we = `.`;
215
+ function Te(e5, t2, n2) {
216
216
  if (e5 == null) throw Error(`Cannot set value on null or undefined`);
217
- let r2 = De(t2), i2 = e5;
217
+ let r2 = Ee(t2), i2 = e5;
218
218
  for (let e6 = 0; e6 < r2.length; e6++) {
219
219
  let t3 = r2[e6];
220
220
  if (e6 === r2.length - 1) {
@@ -226,21 +226,21 @@ function Ee(e5, t2, n2) {
226
226
  }
227
227
  return e5;
228
228
  }
229
- function De(e5) {
230
- return Array.isArray(e5) ? e5 : e5.split(Te).map((e6) => Oe(e6) ? Number(e6) : e6);
229
+ function Ee(e5) {
230
+ return Array.isArray(e5) ? e5 : e5.split(we).map((e6) => De(e6) ? Number(e6) : e6);
231
231
  }
232
- function Oe(e5) {
232
+ function De(e5) {
233
233
  return /^\d+$/.test(e5);
234
234
  }
235
- function ke(e5) {
235
+ function Oe(e5) {
236
236
  let t2 = {};
237
- for (let [n2, r2] of Object.entries(e5)) Ae(n2) || Ee(t2, De(n2), r2);
237
+ for (let [n2, r2] of Object.entries(e5)) ke(n2) || Te(t2, Ee(n2), r2);
238
238
  return t2;
239
239
  }
240
- function Ae(e5) {
240
+ function ke(e5) {
241
241
  return e5 === `__proto__` || e5 === `constructor` || e5 === `prototype`;
242
242
  }
243
- var je = class {
243
+ var Ae = class {
244
244
  BRACKET_PATTERN = /\[(\d+)\]/g;
245
245
  NUMERIC_PATTERN = /^\d+$/;
246
246
  ESCAPED_DOT_PATTERN = /\\\./g;
@@ -263,7 +263,7 @@ var je = class {
263
263
  return e5.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
264
264
  }
265
265
  unflatten() {
266
- return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e5, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e5)), t2])), ke(this.cleanedModifiedFields);
266
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e5, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e5)), t2])), Oe(this.cleanedModifiedFields);
267
267
  }
268
268
  flatten(e5) {
269
269
  let t2 = {};
@@ -288,7 +288,7 @@ var je = class {
288
288
  r2.push(i3), n2 = t3[i3];
289
289
  return;
290
290
  }
291
- let a3 = Fe(e6);
291
+ let a3 = Pe(e6);
292
292
  if (a3 && a3 in t3) {
293
293
  r2.push(a3), n2 = t3[a3];
294
294
  return;
@@ -319,28 +319,28 @@ var je = class {
319
319
  return e5.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e5[r2 - 1] === `\\` ? t2 : `.` + n2);
320
320
  }
321
321
  };
322
- function Me(e5, t2) {
322
+ function je(e5, t2) {
323
323
  let n2 = e5?.modifiedFields;
324
324
  if (!n2) return null;
325
- let r2 = Ne(n2);
325
+ let r2 = Me(n2);
326
326
  if (!r2) return null;
327
327
  let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
328
328
  e5 = { ...e5, modifiedFields: i2 };
329
329
  let o2 = t2(e5), s2 = o2?.modifiedFields;
330
330
  if (!s2) return null;
331
- let c2 = Pe(s2, a2);
331
+ let c2 = Ne(s2, a2);
332
332
  return c2 === null ? null : (o2.modifiedFields = c2, o2);
333
333
  }
334
- function Ne(e5) {
334
+ function Me(e5) {
335
335
  if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
336
- let t2 = new je(e5);
336
+ let t2 = new Ae(e5);
337
337
  return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
338
338
  } catch {
339
339
  return null;
340
340
  }
341
341
  return null;
342
342
  }
343
- function Pe(e5, t2) {
343
+ function Ne(e5, t2) {
344
344
  if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
345
345
  return t2.flatten(e5);
346
346
  } catch {
@@ -348,10 +348,10 @@ function Pe(e5, t2) {
348
348
  }
349
349
  return null;
350
350
  }
351
- function Fe(e5) {
351
+ function Pe(e5) {
352
352
  return e5.replace(/[-_\s]+(.)?/g, (e6, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e6) => e6.toLowerCase());
353
353
  }
354
- function Ie() {
354
+ function Fe() {
355
355
  return { emit(e5, ...t2) {
356
356
  for (let n2 = 0, r2 = this.events[e5] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
357
357
  }, events: {}, on(e5, t2) {
@@ -360,8 +360,8 @@ function Ie() {
360
360
  };
361
361
  } };
362
362
  }
363
- var Le = (e5) => e5.__type === `event-definition`;
364
- function Re(e5, t2, n2, r2) {
363
+ var Ie = (e5) => e5.__type === `event-definition`;
364
+ function Le(e5, t2, n2, r2) {
365
365
  let i2;
366
366
  if (e5.isDomainEvent) {
367
367
  let { deletedEvent: e6, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
@@ -372,14 +372,14 @@ function Re(e5, t2, n2, r2) {
372
372
  let e6 = s2.modifiedFields;
373
373
  if (typeof e6 == `object` && e6 && !Array.isArray(e6)) {
374
374
  o2 = structuredClone(i2);
375
- let e7 = Me(s2, a2);
375
+ let e7 = je(s2, a2);
376
376
  if (e7) return t2(e7);
377
377
  }
378
378
  }
379
379
  return t2(a2(o2));
380
380
  }
381
- function ze(e5) {
382
- let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
381
+ function Re(e5) {
382
+ let t2 = /* @__PURE__ */ new Map(), n2 = Fe();
383
383
  return { initModule(e6) {
384
384
  return (r2) => {
385
385
  let i2 = t2.get(e6.type) ?? [];
@@ -389,7 +389,7 @@ function ze(e5) {
389
389
  let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e6), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e7) => ({ type: e7 }))];
390
390
  if (c2.length > 0 && !c2.some(({ type: e7 }) => e7 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e7) => e7.type).join(`, `)}`);
391
391
  let l2 = t2.get(r2) ?? [];
392
- return await Promise.all(l2.map(({ eventDefinition: e7, handler: t3 }) => Re(e7, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
392
+ return await Promise.all(l2.map(({ eventDefinition: e7, handler: t3 }) => Le(e7, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
393
393
  }, async processRequest(e6, t3) {
394
394
  let n3 = await e6.text();
395
395
  return this.process(n3, t3);
@@ -408,12 +408,12 @@ function ze(e5) {
408
408
  let n3 = Array.from(t2.keys()).map((e7) => ({ type: e7 }));
409
409
  if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e6.eventType)) throw Error(`Unexpected event type: ${e6.eventType}. Expected one of: ${n3.map((e7) => e7.type).join(`, `)}`);
410
410
  let r2 = t2.get(e6.eventType) ?? [];
411
- await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Re(t3, n4, e6.payload, { instanceId: e6.instanceId, identity: e6.identity })));
411
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Le(t3, n4, e6.payload, { instanceId: e6.instanceId, identity: e6.identity })));
412
412
  }, apps: { AppInstalled: m(`AppInstalled`)(), AppRemoved: m(`AppRemoved`)() } } };
413
413
  }
414
- var Be = (e5) => e5.__type === `service-plugin-definition`;
415
- function Ve(e5) {
416
- let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
414
+ var ze = (e5) => e5.__type === `service-plugin-definition`;
415
+ function Be(e5) {
416
+ let t2 = /* @__PURE__ */ new Map(), n2 = Fe();
417
417
  return { initModule(e6) {
418
418
  return (r2) => {
419
419
  let i2 = t2.get(e6.componentType.toLowerCase()) ?? [];
@@ -454,38 +454,38 @@ function Ve(e5) {
454
454
  return s2.transformations.toREST(await c2(s2.transformations.fromREST(e6)));
455
455
  } } };
456
456
  }
457
- var E = `X-Wix-Consistent`;
458
- function He(e5) {
457
+ var D = `X-Wix-Consistent`;
458
+ function Ve(e5) {
459
459
  let t2 = e5.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e6) => Promise.resolve({ headers: {} }) }, r2 = e5.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e5.host), o2 = () => e5.fetch ?? fetch, s2 = async (n3, r3) => {
460
- let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [E]: t2[E] } : {} }, l3 = e5.host?.getErrorHandler?.();
460
+ let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [D]: t2[D] } : {} }, l3 = e5.host?.getErrorHandler?.();
461
461
  try {
462
462
  if (typeof n3 == `string` || n3 instanceof URL) {
463
463
  let e6 = await i3(n3, { ...r3, headers: c3 });
464
464
  l3?.handleError(e6, { requestOptions: { url: n3.toString(), method: r3?.method } });
465
- let a3 = D(e6);
466
- return a3 && (t2[E] = a3), e6;
465
+ let a3 = O(e6);
466
+ return a3 && (t2[D] = a3), e6;
467
467
  }
468
468
  {
469
469
  for (let [e7, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e7, t3);
470
470
  let e6 = await i3(n3, r3);
471
471
  l3?.handleError(e6, { requestOptions: { url: n3.url, method: r3?.method } });
472
- let a3 = D(e6);
473
- return a3 && (t2[E] = a3), e6;
472
+ let a3 = O(e6);
473
+ return a3 && (t2[D] = a3), e6;
474
474
  }
475
475
  } catch (e6) {
476
476
  throw l3?.handleError(e6, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e6;
477
477
  }
478
- }, { client: c2, initModule: l2 } = Ve(i2), { client: u2, initModule: d2 } = ze(i2), f2 = async (n3, r3) => {
479
- let i3 = o2(), s3 = await a2(), c3 = ee(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [E]: t2[E] } : {} } }), u3 = D(l3);
480
- return u3 && (t2[E] = u3), l3;
478
+ }, { client: c2, initModule: l2 } = Be(i2), { client: u2, initModule: d2 } = Re(i2), f2 = async (n3, r3) => {
479
+ let i3 = o2(), s3 = await a2(), c3 = ee(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [D]: t2[D] } : {} } }), u3 = O(l3);
480
+ return u3 && (t2[D] = u3), l3;
481
481
  }, m2 = (t3, n3) => {
482
- if (Le(t3)) return d2(t3);
483
- if (Be(t3)) return l2(t3);
482
+ if (Ie(t3)) return d2(t3);
483
+ if (ze(t3)) return l2(t3);
484
484
  if (S(t3) && e5.host) return C(t3, e5.host);
485
485
  if (typeof t3 == `function`) {
486
486
  if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
487
487
  let r3 = e5.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e5.useCDN === void 0 ? i2().shouldUseCDN : e5.useCDN;
488
- return Se(ie(() => _(t3)) ? g(t3) : t3, n3 ?? {}, f2, e5.host?.getErrorHandler?.(), (e6, t4) => {
488
+ return xe(ie(() => _(t3)) ? g(t3) : t3, n3 ?? {}, f2, e5.host?.getErrorHandler?.(), (e6, t4) => {
489
489
  let n4 = new URL(e6, `https://${r3}`);
490
490
  return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
491
491
  }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e5.host?.name, o3, e5.validateRequestSchema);
@@ -509,19 +509,19 @@ function He(e5) {
509
509
  return { data: o3 ?? {}, errors: s3 };
510
510
  }, webhooks: u2, servicePlugins: c2 };
511
511
  }
512
- function D(e5) {
512
+ function O(e5) {
513
513
  return e5.headers?.get(`X-Wix-Consistent`) ?? e5.headers?.get(`x-wix-consistent`);
514
514
  }
515
- var Ue = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
516
- var We = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
517
- function Ge(e5, t2) {
515
+ var He = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
516
+ var Ue = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
517
+ function We(e5, t2) {
518
518
  return e5?.split(`.`).map((e6) => t2?.[e6] ?? e6).join(`.`);
519
519
  }
520
- var Ke = `sort.fieldName`;
521
- function qe(e5, t2, n2) {
522
- return (e5 === Ke || e5.endsWith(`.${Ke}`)) && typeof t2 == `string` ? Ge(t2, n2) : t2;
520
+ var Ge = `sort.fieldName`;
521
+ function Ke(e5, t2, n2) {
522
+ return (e5 === Ge || e5.endsWith(`.${Ge}`)) && typeof t2 == `string` ? We(t2, n2) : t2;
523
523
  }
524
- function Je(e5, t2, n2) {
524
+ function qe(e5, t2, n2) {
525
525
  let r2 = (e6) => n2.includes(e6), i2 = (e6, n3) => {
526
526
  if (Array.isArray(e6)) e6.forEach((e7) => {
527
527
  i2(e7, n3);
@@ -531,144 +531,144 @@ function Je(e5, t2, n2) {
531
531
  Object.keys(a2).forEach((e7) => {
532
532
  let o2 = n3 === `` ? e7 : `${n3}.${e7}`;
533
533
  if (r2(o2)) return;
534
- let s2 = Ye(e7, t2);
535
- s2 !== e7 && !(s2 in a2) && (a2[s2] = a2[e7], delete a2[e7]), a2[s2] = qe(o2, a2[s2], t2), i2(a2[s2], o2);
534
+ let s2 = Je(e7, t2);
535
+ s2 !== e7 && !(s2 in a2) && (a2[s2] = a2[e7], delete a2[e7]), a2[s2] = Ke(o2, a2[s2], t2), i2(a2[s2], o2);
536
536
  });
537
537
  }
538
538
  };
539
539
  return i2(e5, ``), e5;
540
540
  }
541
- function Ye(e5, t2) {
541
+ function Je(e5, t2) {
542
542
  let n2;
543
543
  return n2 = e5.includes(`.`) ? e5.split(`.`).map((e6) => t2[e6] ?? e6).join(`.`) : t2[e5] ?? e5, n2;
544
544
  }
545
- function Xe(e5, t2 = []) {
546
- return Je(e5, Ue, t2);
545
+ function Ye(e5, t2 = []) {
546
+ return qe(e5, He, t2);
547
547
  }
548
- function Ze(e5, t2 = []) {
549
- return Je(e5, We, t2);
548
+ function Xe(e5, t2 = []) {
549
+ return qe(e5, Ue, t2);
550
550
  }
551
- var Qe = /* @__PURE__ */ new WeakMap();
552
- function O() {
551
+ var Ze = /* @__PURE__ */ new WeakMap();
552
+ function k() {
553
553
  return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
554
554
  }
555
- function $e(e5, t2) {
555
+ function Qe(e5, t2) {
556
556
  let n2 = e5.get(t2);
557
- return n2 || (n2 = O(), e5.set(t2, n2)), n2;
557
+ return n2 || (n2 = k(), e5.set(t2, n2)), n2;
558
558
  }
559
- function et(e5, t2) {
560
- return t2 === `*` ? (e5.anyField ??= O(), e5.anyField) : t2.endsWith(`{}`) ? (e5.mapFields ??= /* @__PURE__ */ new Map(), $e(e5.mapFields, t2.slice(0, -2))) : (e5.fields ??= /* @__PURE__ */ new Map(), $e(e5.fields, t2));
559
+ function $e(e5, t2) {
560
+ return t2 === `*` ? (e5.anyField ??= k(), e5.anyField) : t2.endsWith(`{}`) ? (e5.mapFields ??= /* @__PURE__ */ new Map(), Qe(e5.mapFields, t2.slice(0, -2))) : (e5.fields ??= /* @__PURE__ */ new Map(), Qe(e5.fields, t2));
561
561
  }
562
- function tt(e5) {
563
- let t2 = O();
562
+ function et(e5) {
563
+ let t2 = k();
564
564
  for (let n2 of e5) {
565
- let e6 = n2.path.split(`.`).reduce(et, t2);
565
+ let e6 = n2.path.split(`.`).reduce($e, t2);
566
566
  e6.leaves ??= [], e6.leaves.push(n2);
567
567
  }
568
568
  return t2;
569
569
  }
570
- function nt(e5) {
571
- let t2 = Qe.get(e5);
572
- return t2 || (t2 = tt(e5), Qe.set(e5, t2)), t2;
570
+ function tt(e5) {
571
+ let t2 = Ze.get(e5);
572
+ return t2 || (t2 = et(e5), Ze.set(e5, t2)), t2;
573
573
  }
574
- function k(e5) {
574
+ function A(e5) {
575
575
  return typeof e5 == `object` && !!e5;
576
576
  }
577
- function rt(e5, { isRepeated: t2, isMap: n2 }, r2) {
578
- return t2 ? Array.isArray(e5) ? e5.map(r2) : e5 : n2 ? k(e5) ? Object.fromEntries(Object.entries(e5).map(([e6, t3]) => [e6, r2(t3)])) : e5 : r2(e5);
577
+ function nt(e5, { isRepeated: t2, isMap: n2 }, r2) {
578
+ return t2 ? Array.isArray(e5) ? e5.map(r2) : e5 : n2 ? A(e5) ? Object.fromEntries(Object.entries(e5).map(([e6, t3]) => [e6, r2(t3)])) : e5 : r2(e5);
579
579
  }
580
- function A(e5, t2, n2) {
581
- k(e5) && ot(e5, t2, n2);
580
+ function j(e5, t2, n2) {
581
+ A(e5) && at(e5, t2, n2);
582
582
  }
583
- function it(e5, t2, n2) {
583
+ function rt(e5, t2, n2) {
584
584
  for (let [r2, i2] of t2) {
585
585
  if (!(r2 in e5)) continue;
586
- if (i2.leaves) for (let t4 of i2.leaves) e5[r2] = rt(e5[r2], t4, n2);
586
+ if (i2.leaves) for (let t4 of i2.leaves) e5[r2] = nt(e5[r2], t4, n2);
587
587
  let t3 = e5[r2];
588
- Array.isArray(t3) ? t3.forEach((e6) => A(e6, i2, n2)) : A(t3, i2, n2);
588
+ Array.isArray(t3) ? t3.forEach((e6) => j(e6, i2, n2)) : j(t3, i2, n2);
589
589
  }
590
590
  }
591
- function at(e5, t2, n2) {
591
+ function it(e5, t2, n2) {
592
592
  for (let [r2, i2] of t2) {
593
593
  let t3 = e5[r2];
594
- k(t3) && Object.values(t3).forEach((e6) => A(e6, i2, n2));
594
+ A(t3) && Object.values(t3).forEach((e6) => j(e6, i2, n2));
595
595
  }
596
596
  }
597
- function ot(e5, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
598
- t2 && it(e5, t2, i2), n2 && at(e5, n2, i2), r2 && Object.values(e5).forEach((e6) => A(e6, r2, i2));
597
+ function at(e5, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
598
+ t2 && rt(e5, t2, i2), n2 && it(e5, n2, i2), r2 && Object.values(e5).forEach((e6) => j(e6, r2, i2));
599
599
  }
600
- function st(e5, t2) {
601
- if (!k(e5)) return e5;
602
- for (let { paths: n2, transformFn: r2 } of t2) ot(e5, nt(n2), r2);
600
+ function ot(e5, t2) {
601
+ if (!A(e5)) return e5;
602
+ for (let { paths: n2, transformFn: r2 } of t2) at(e5, tt(n2), r2);
603
603
  return e5;
604
604
  }
605
- function ct(e5) {
605
+ function st(e5) {
606
606
  return Object.fromEntries(Object.entries(e5).filter(([, e6]) => e6 !== void 0));
607
607
  }
608
- function j(e5) {
609
- return pt(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
608
+ function M(e5) {
609
+ return ft(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
610
610
  }
611
- var lt = /([\p{Ll}\d])(\p{Lu})/gu;
612
- var ut = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
613
- var dt = `$1\0$2`;
614
- var ft = /[^\p{L}\d]+/giu;
615
- function pt(e5) {
611
+ var ct = /([\p{Ll}\d])(\p{Lu})/gu;
612
+ var lt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
613
+ var ut = `$1\0$2`;
614
+ var dt = /[^\p{L}\d]+/giu;
615
+ function ft(e5) {
616
616
  let t2 = e5.trim();
617
- t2 = t2.replace(lt, dt).replace(ut, dt), t2 = t2.replace(ft, `\0`);
617
+ t2 = t2.replace(ct, ut).replace(lt, ut), t2 = t2.replace(dt, `\0`);
618
618
  let n2 = 0, r2 = t2.length;
619
619
  for (; t2.charAt(n2) === `\0`; ) n2++;
620
620
  if (n2 === r2) return [];
621
621
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
622
622
  return t2.slice(n2, r2).split(/\0/g);
623
623
  }
624
- var mt = (e5) => `validationError` in (e5.response?.data?.details ?? {});
625
- var ht = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
626
- var gt = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
627
- function _t(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
624
+ var pt = (e5) => `validationError` in (e5.response?.data?.details ?? {});
625
+ var mt = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
626
+ var ht = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
627
+ function gt(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
628
628
  if (typeof e5 != `object` || !e5) throw e5;
629
- if (mt(e5)) return vt(e5, t2, n2);
630
- if (ht(e5)) return yt(e5);
631
- if (gt(e5)) {
632
- let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: j(n3), data: {} }, requestId: e5.requestId };
633
- return M(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
629
+ if (pt(e5)) return _t(e5, t2, n2);
630
+ if (mt(e5)) return vt(e5);
631
+ if (ht(e5)) {
632
+ let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: M(n3), data: {} }, requestId: e5.requestId };
633
+ return N(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
634
634
  }
635
- return bt(e5);
635
+ return yt(e5);
636
636
  }
637
- var vt = (e5, t2, n2) => {
638
- let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = xt(t2, a2, n2)?.sort((e6, t3) => e6.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e6, description: t3 }) => `"${e6}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
639
- return M(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
637
+ var _t = (e5, t2, n2) => {
638
+ let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = bt(t2, a2, n2)?.sort((e6, t3) => e6.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e6, description: t3 }) => `"${e6}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
639
+ return N(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
640
640
  };
641
- var M = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
642
- var yt = (e5) => {
643
- let t2 = e5.response?.status, n2 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n2, i2 = e5.response?.data?.details?.applicationError?.description ?? n2, a2 = e5.response?.data?.details?.applicationError?.code ?? j(n2), o2 = e5.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e5.requestId };
644
- return M(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
641
+ var N = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
642
+ var vt = (e5) => {
643
+ let t2 = e5.response?.status, n2 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n2, i2 = e5.response?.data?.details?.applicationError?.description ?? n2, a2 = e5.response?.data?.details?.applicationError?.code ?? M(n2), o2 = e5.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e5.requestId };
644
+ return N(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
645
645
  };
646
- var bt = (e5) => M(e5, { message: e5.requestId ? `System error occurred, request-id: ${e5.requestId}` : `System error occurred: ${JSON.stringify(e5)}`, extraProperties: { requestId: e5.requestId, status: e5.response?.status, code: j(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
647
- var xt = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
646
+ var yt = (e5) => N(e5, { message: e5.requestId ? `System error occurred, request-id: ${e5.requestId}` : `System error occurred: ${JSON.stringify(e5)}`, extraProperties: { requestId: e5.requestId, status: e5.response?.status, code: M(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
647
+ var bt = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
648
648
  let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
649
649
  return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
650
650
  let r3 = t2[e6.field];
651
- if (r3) return { ...e6, field: St(r3, i2) };
651
+ if (r3) return { ...e6, field: xt(r3, i2) };
652
652
  let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
653
653
  if (s2) {
654
654
  let t3 = a2[s2];
655
- if (t3) return { ...e6, field: e6.field.replace(s2, St(t3, i2)) };
655
+ if (t3) return { ...e6, field: e6.field.replace(s2, xt(t3, i2)) };
656
656
  }
657
657
  return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
658
658
  });
659
659
  };
660
- var St = (e5, t2) => {
661
- let n2 = Ct(e5);
660
+ var xt = (e5, t2) => {
661
+ let n2 = St(e5);
662
662
  return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
663
663
  };
664
- var Ct = (e5) => {
664
+ var St = (e5) => {
665
665
  let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
666
666
  return t2 && t2.groups && Number(t2.groups.argIndex);
667
667
  };
668
- function wt() {
668
+ function Ct() {
669
669
  let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
670
670
  if (e5) return { initWixModules(t3, n3) {
671
- return N(() => e5(t3, n3));
671
+ return wt(() => e5(t3, n3));
672
672
  }, fetchWithAuth() {
673
673
  throw Error(`fetchWithAuth is not available in this context`);
674
674
  }, graphql() {
@@ -678,10 +678,10 @@ function wt() {
678
678
  if (t2 || n2) return { initWixModules(e6, r2) {
679
679
  if (r2) {
680
680
  if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
681
- return N(() => n2.use(e6));
681
+ return wt(() => n2.use(e6));
682
682
  }
683
683
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
684
- return N(() => t2.use(e6));
684
+ return wt(() => t2.use(e6));
685
685
  }, fetchWithAuth: (e6, n3) => {
686
686
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
687
687
  return t2.fetchWithAuth(e6, n3);
@@ -693,7 +693,7 @@ function wt() {
693
693
  return t2.graphql(e6, n3, r2);
694
694
  } };
695
695
  }
696
- function N(e5) {
696
+ function wt(e5) {
697
697
  let t2 = globalThis.__wix_context__, n2 = { client: p.client, elevatedClient: p.elevatedClient }, r2;
698
698
  globalThis.__wix_context__ = void 0, p.client = void 0, p.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
699
699
  try {
@@ -704,7 +704,7 @@ function N(e5) {
704
704
  }
705
705
  function Tt(e5, t2) {
706
706
  return (...n2) => {
707
- let r2 = wt();
707
+ let r2 = Ct();
708
708
  return r2 ? r2.initWixModules(e5, t2).apply(void 0, n2) : e5.apply(void 0, n2);
709
709
  };
710
710
  }
@@ -789,7 +789,7 @@ function Xt(e5) {
789
789
  return e5 === `NaN` ? NaN : e5 === `Infinity` ? 1 / 0 : e5 === `-Infinity` ? -1 / 0 : e5;
790
790
  }
791
791
  function Zt(e5) {
792
- return e5 && ct({ formatted: e5.formattedAddress, location: e5.geocode, addressLine1: e5.addressLine, addressLine2: e5.addressLine2, streetAddress: e5.streetAddress && { name: e5.streetAddress.name, number: e5.streetAddress.number, apt: e5.streetAddress.apt, formattedAddressLine: e5.streetAddress.formattedAddressLine }, hint: e5.hint, city: e5.city, subdivision: e5.subdivision, country: e5.country, postalCode: e5.postalCode, countryFullname: e5.countryFullname, subdivisionFullname: e5.subdivisionFullname });
792
+ return e5 && st({ formatted: e5.formattedAddress, location: e5.geocode, addressLine1: e5.addressLine, addressLine2: e5.addressLine2, streetAddress: e5.streetAddress && { name: e5.streetAddress.name, number: e5.streetAddress.number, apt: e5.streetAddress.apt, formattedAddressLine: e5.streetAddress.formattedAddressLine }, hint: e5.hint, city: e5.city, subdivision: e5.subdivision, country: e5.country, postalCode: e5.postalCode, countryFullname: e5.countryFullname, subdivisionFullname: e5.subdivisionFullname });
793
793
  }
794
794
  var P;
795
795
  (function(e5) {
@@ -893,30 +893,36 @@ function dn(e5) {
893
893
  return console.warn(`[Multilingual Manager] cleanCurrentUrl failed`, e6), t2;
894
894
  }
895
895
  }
896
- var fn = `x-wix-linguist`;
897
- var pn = `00000000-0000-0000-0000-000000000000`;
898
- var mn = `false`;
899
- var hn = () => {
896
+ var fn = `x-wix-currency`;
897
+ var pn = () => {
898
+ let e5 = F(`currency`);
899
+ if (e5) return { [fn]: e5 };
900
+ };
901
+ var mn = `x-wix-linguist`;
902
+ var hn = `00000000-0000-0000-0000-000000000000`;
903
+ var gn = `false`;
904
+ var _n = () => {
900
905
  let e5 = F(`language`), t2 = F(`locale`);
901
- if (e5) return { [fn]: [e5, t2 || e5, mn, pn].join(`|`) };
906
+ if (e5) return { [mn]: [e5, t2 || e5, gn, hn].join(`|`) };
902
907
  };
903
- function gn() {
908
+ function vn() {
904
909
  let e5 = null, t2 = null;
905
910
  return { promise: new Promise((n2, r2) => {
906
911
  e5 = n2, t2 = r2;
907
912
  }), resolve: e5, reject: t2 };
908
913
  }
909
- var _n = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
910
- var F = (e5) => _n()?.[e5];
911
- var vn = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host: (t2) => {
912
- let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 = bn();
914
+ var yn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
915
+ var F = (e5) => yn()?.[e5];
916
+ var bn = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host: (t2) => {
917
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 = Sn();
913
918
  return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: F(`language`), locale: F(`locale`), get passThroughHeaders() {
914
- return hn();
919
+ let e6 = { ..._n(), ...pn() };
920
+ return Object.keys(e6).length > 0 ? e6 : void 0;
915
921
  } } };
916
922
  }, auth: (e6) => {
917
923
  let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
918
- !e6 && yn() && (e6 = t2?.getAccessTokenFunction?.());
919
- let n2 = false, { resolve: r2, promise: i2 } = gn();
924
+ !e6 && xn() && (e6 = t2?.getAccessTokenFunction?.());
925
+ let n2 = false, { resolve: r2, promise: i2 } = vn();
920
926
  return { getAuthHeaders: async () => {
921
927
  if (!e6 && n2 && (e6 = await i2), !e6) throw Error(`Failed to resolve auth token`);
922
928
  return { headers: { Authorization: await e6() } };
@@ -924,34 +930,34 @@ var vn = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host:
924
930
  r2(e7);
925
931
  }) };
926
932
  } });
927
- function yn() {
933
+ function xn() {
928
934
  return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
929
935
  }
930
- function bn() {
936
+ function Sn() {
931
937
  let e5 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
932
938
  if (!e5) return;
933
939
  let t2 = new URL(e5);
934
940
  return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
935
941
  }
936
- var xn = ({ clientSdk: e5, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
942
+ var Cn = ({ clientSdk: e5, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
937
943
  if (!e5) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
938
944
  return e5.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
939
945
  }, getAccessToken: () => {
940
946
  throw Error(`Not implemented`);
941
947
  }, observeState: () => ({ disconnect: () => {
942
948
  } }) });
943
- var Sn = vn({ createHost: function(e5) {
949
+ var wn = bn({ createHost: function(e5) {
944
950
  let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e5?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e5 || {};
945
951
  if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
946
- return { channel: xn({ clientSdk: t2, applicationId: n2 }), close: () => {
952
+ return { channel: Cn({ clientSdk: t2, applicationId: n2 }), close: () => {
947
953
  } };
948
954
  } });
949
- var Cn = (e5, t2) => {
950
- let n2 = Sn.host({ applicationId: e5, componentId: t2 }), r2 = Sn.auth();
951
- return He({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
955
+ var Tn = (e5, t2) => {
956
+ let n2 = wn.host({ applicationId: e5, componentId: t2 }), r2 = wn.auth();
957
+ return Ve({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
952
958
  };
953
- var wn = (e5) => Cn(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
954
- function Tn() {
959
+ var En = (e5) => Tn(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
960
+ function Dn() {
955
961
  let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
956
962
  if (e5) return { initWixModules(t3, n3) {
957
963
  return I(() => e5(t3, n3));
@@ -988,15 +994,15 @@ function I(e5) {
988
994
  globalThis.__wix_context__ = t2, p.client = n2.client, p.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
989
995
  }
990
996
  }
991
- function En(e5, t2) {
997
+ function On(e5, t2) {
992
998
  return { ...e5, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
993
- let r2 = Tn();
999
+ let r2 = Dn();
994
1000
  if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
995
1001
  return r2.initWixModules(e5)[t3].apply(void 0, n2);
996
1002
  }])) };
997
1003
  }
998
- function Dn(e5) {
999
- return En({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
1004
+ function kn(e5) {
1005
+ return On({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
1000
1006
  }
1001
1007
  var L = (e5) => typeof e5 == `string`;
1002
1008
  var R = () => {
@@ -1005,25 +1011,25 @@ var R = () => {
1005
1011
  });
1006
1012
  return n2.resolve = e5, n2.reject = t2, n2;
1007
1013
  };
1008
- var On = (e5) => e5 == null ? `` : `` + e5;
1009
- var kn = (e5, t2, n2) => {
1014
+ var An = (e5) => e5 == null ? `` : `` + e5;
1015
+ var jn = (e5, t2, n2) => {
1010
1016
  e5.forEach((e6) => {
1011
1017
  t2[e6] && (n2[e6] = t2[e6]);
1012
1018
  });
1013
1019
  };
1014
- var An = /###/g;
1015
- var jn = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(An, `.`) : e5;
1016
- var Mn = (e5) => !e5 || L(e5);
1020
+ var Mn = /###/g;
1021
+ var Nn = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(Mn, `.`) : e5;
1022
+ var Pn = (e5) => !e5 || L(e5);
1017
1023
  var z = (e5, t2, n2) => {
1018
1024
  let r2 = L(t2) ? t2.split(`.`) : t2, i2 = 0;
1019
1025
  for (; i2 < r2.length - 1; ) {
1020
- if (Mn(e5)) return {};
1021
- let t3 = jn(r2[i2]);
1026
+ if (Pn(e5)) return {};
1027
+ let t3 = Nn(r2[i2]);
1022
1028
  !e5[t3] && n2 && (e5[t3] = new n2()), e5 = Object.prototype.hasOwnProperty.call(e5, t3) ? e5[t3] : {}, ++i2;
1023
1029
  }
1024
- return Mn(e5) ? {} : { obj: e5, k: jn(r2[i2]) };
1030
+ return Pn(e5) ? {} : { obj: e5, k: Nn(r2[i2]) };
1025
1031
  };
1026
- var Nn = (e5, t2, n2) => {
1032
+ var Fn = (e5, t2, n2) => {
1027
1033
  let { obj: r2, k: i2 } = z(e5, t2, Object);
1028
1034
  if (r2 !== void 0 || t2.length === 1) {
1029
1035
  r2[i2] = n2;
@@ -1033,7 +1039,7 @@ var Nn = (e5, t2, n2) => {
1033
1039
  for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = z(e5, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1034
1040
  s2.obj[`${s2.k}.${a2}`] = n2;
1035
1041
  };
1036
- var Pn = (e5, t2, n2, r2) => {
1042
+ var In = (e5, t2, n2, r2) => {
1037
1043
  let { obj: i2, k: a2 } = z(e5, t2, Object);
1038
1044
  i2[a2] = i2[a2] || [], i2[a2].push(n2);
1039
1045
  };
@@ -1041,18 +1047,18 @@ var B = (e5, t2) => {
1041
1047
  let { obj: n2, k: r2 } = z(e5, t2);
1042
1048
  if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
1043
1049
  };
1044
- var Fn = (e5, t2, n2) => {
1050
+ var Ln = (e5, t2, n2) => {
1045
1051
  let r2 = B(e5, n2);
1046
1052
  return r2 === void 0 ? B(t2, n2) : r2;
1047
1053
  };
1048
- var In = (e5, t2, n2) => {
1049
- for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? L(e5[r2]) || e5[r2] instanceof String || L(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : In(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
1054
+ var Rn = (e5, t2, n2) => {
1055
+ for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? L(e5[r2]) || e5[r2] instanceof String || L(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : Rn(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
1050
1056
  return e5;
1051
1057
  };
1052
1058
  var V = (e5) => e5.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1053
- var Ln = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1054
- var Rn = (e5) => L(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => Ln[e6]) : e5;
1055
- var zn = class {
1059
+ var zn = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1060
+ var Bn = (e5) => L(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => zn[e6]) : e5;
1061
+ var Vn = class {
1056
1062
  constructor(e5) {
1057
1063
  this.capacity = e5, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
1058
1064
  }
@@ -1063,13 +1069,13 @@ var zn = class {
1063
1069
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e5, n2), this.regExpQueue.push(e5), n2;
1064
1070
  }
1065
1071
  };
1066
- var Bn = [` `, `,`, `?`, `!`, `;`];
1067
- var Vn = new zn(20);
1068
- var Hn = (e5, t2, n2) => {
1072
+ var Hn = [` `, `,`, `?`, `!`, `;`];
1073
+ var Un = new Vn(20);
1074
+ var Wn = (e5, t2, n2) => {
1069
1075
  t2 ||= ``, n2 ||= ``;
1070
- let r2 = Bn.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1076
+ let r2 = Hn.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1071
1077
  if (r2.length === 0) return true;
1072
- let i2 = Vn.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1078
+ let i2 = Un.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1073
1079
  if (!a2) {
1074
1080
  let t3 = e5.indexOf(n2);
1075
1081
  t3 > 0 && !i2.test(e5.substring(0, t3)) && (a2 = true);
@@ -1093,7 +1099,7 @@ var H = (e5, t2, n2 = `.`) => {
1093
1099
  return i2;
1094
1100
  };
1095
1101
  var U = (e5) => e5?.replace(/_/g, `-`);
1096
- var Un = { type: `logger`, log(e5) {
1102
+ var Gn = { type: `logger`, log(e5) {
1097
1103
  this.output(`log`, e5);
1098
1104
  }, warn(e5) {
1099
1105
  this.output(`warn`, e5);
@@ -1107,7 +1113,7 @@ var W = new class e2 {
1107
1113
  this.init(e5, t2);
1108
1114
  }
1109
1115
  init(e5, t2 = {}) {
1110
- this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Un, this.options = t2, this.debug = t2.debug;
1116
+ this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Gn, this.options = t2, this.debug = t2.debug;
1111
1117
  }
1112
1118
  log(...e5) {
1113
1119
  return this.forward(e5, `log`, ``, true);
@@ -1159,7 +1165,7 @@ var G = class {
1159
1165
  });
1160
1166
  }
1161
1167
  };
1162
- var Wn = class extends G {
1168
+ var Kn = class extends G {
1163
1169
  constructor(e5, t2 = { ns: [`translation`], defaultNS: `translation` }) {
1164
1170
  super(), this.data = e5 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
1165
1171
  }
@@ -1178,7 +1184,7 @@ var Wn = class extends G {
1178
1184
  }
1179
1185
  addResource(e5, t2, n2, r2, i2 = { silent: false }) {
1180
1186
  let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e5, t2];
1181
- n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Nn(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
1187
+ n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Fn(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
1182
1188
  }
1183
1189
  addResources(e5, t2, n2, r2 = { silent: false }) {
1184
1190
  for (let r3 in n2) (L(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
@@ -1188,7 +1194,7 @@ var Wn = class extends G {
1188
1194
  let o2 = [e5, t2];
1189
1195
  e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
1190
1196
  let s2 = B(this.data, o2) || {};
1191
- a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? In(s2, n2, i2) : s2 = { ...s2, ...n2 }, Nn(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
1197
+ a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Rn(s2, n2, i2) : s2 = { ...s2, ...n2 }, Fn(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
1192
1198
  }
1193
1199
  removeResourceBundle(e5, t2) {
1194
1200
  this.hasResourceBundle(e5, t2) && delete this.data[e5][t2], this.removeNamespaces(t2), this.emit(`removed`, e5, t2);
@@ -1210,31 +1216,31 @@ var Wn = class extends G {
1210
1216
  return this.data;
1211
1217
  }
1212
1218
  };
1213
- var Gn = { processors: {}, addPostProcessor(e5) {
1219
+ var qn = { processors: {}, addPostProcessor(e5) {
1214
1220
  this.processors[e5.name] = e5;
1215
1221
  }, handle(e5, t2, n2, r2, i2) {
1216
1222
  return e5.forEach((e6) => {
1217
1223
  t2 = this.processors[e6]?.process(t2, n2, r2, i2) ?? t2;
1218
1224
  }), t2;
1219
1225
  } };
1220
- var Kn = Symbol(`i18next/PATH_KEY`);
1221
- function qn() {
1226
+ var Jn = Symbol(`i18next/PATH_KEY`);
1227
+ function Yn() {
1222
1228
  let e5 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
1223
- return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Kn ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1229
+ return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Jn ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1224
1230
  }
1225
1231
  function K(e5, t2) {
1226
- let { [Kn]: n2 } = e5(qn()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1232
+ let { [Jn]: n2 } = e5(Yn()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1227
1233
  if (n2.length > 1 && i2) {
1228
1234
  let e6 = t2?.ns, a2 = Array.isArray(e6) ? e6 : null;
1229
1235
  if (a2 && a2.length > 1 && a2.slice(1).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
1230
1236
  }
1231
1237
  return n2.join(r2);
1232
1238
  }
1233
- var Jn = {};
1234
- var Yn = (e5) => !L(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1235
- var Xn = class e3 extends G {
1239
+ var Xn = {};
1240
+ var Zn = (e5) => !L(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1241
+ var Qn = class e3 extends G {
1236
1242
  constructor(e5, t2 = {}) {
1237
- super(), kn([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = W.create(`translator`);
1243
+ super(), jn([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = W.create(`translator`);
1238
1244
  }
1239
1245
  changeLanguage(e5) {
1240
1246
  e5 && (this.language = e5);
@@ -1244,13 +1250,13 @@ var Xn = class e3 extends G {
1244
1250
  if (e5 == null) return false;
1245
1251
  let r2 = this.resolve(e5, n2);
1246
1252
  if (r2?.res === void 0) return false;
1247
- let i2 = Yn(r2.res);
1253
+ let i2 = Zn(r2.res);
1248
1254
  return !(n2.returnObjects === false && i2);
1249
1255
  }
1250
1256
  extractFromKey(e5, t2) {
1251
1257
  let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
1252
1258
  n2 === void 0 && (n2 = `:`);
1253
- let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e5.indexOf(n2) > -1, o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !Hn(e5, n2, r2);
1259
+ let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e5.indexOf(n2) > -1, o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !Wn(e5, n2, r2);
1254
1260
  if (a2 && !o2) {
1255
1261
  let t3 = e5.match(this.interpolator.nestingRegexp);
1256
1262
  if (t3 && t3.length > 0) return { key: e5, namespaces: L(i2) ? [i2] : i2 };
@@ -1269,7 +1275,7 @@ var Xn = class e3 extends G {
1269
1275
  if (d2?.toLowerCase() === `cimode`) return f2 ? a2 ? { res: `${l2}${u2}${s2}`, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : `${l2}${u2}${s2}` : a2 ? { res: s2, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : s2;
1270
1276
  let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !L(i2.count), x2 = e3.hasDefaultValue(i2), ee2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, te2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, S2 = b2 && !i2.ordinal && i2.count === 0, C2 = S2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${ee2}`] || i2[`defaultValue${te2}`] || i2.defaultValue, w2 = m2;
1271
1277
  y2 && !m2 && x2 && (w2 = C2);
1272
- let ne2 = Yn(w2), re2 = Object.prototype.toString.apply(w2);
1278
+ let ne2 = Zn(w2), re2 = Object.prototype.toString.apply(w2);
1273
1279
  if (y2 && w2 && ne2 && _2.indexOf(re2) < 0 && !(L(v2) && Array.isArray(w2))) {
1274
1280
  if (!i2.returnObjects && !this.options.returnObjects) {
1275
1281
  this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
@@ -1280,7 +1286,7 @@ var Xn = class e3 extends G {
1280
1286
  let e5 = Array.isArray(w2), t3 = e5 ? [] : {}, n3 = e5 ? g2 : h2;
1281
1287
  for (let e6 in w2) if (Object.prototype.hasOwnProperty.call(w2, e6)) {
1282
1288
  let r3 = `${n3}${o2}${e6}`;
1283
- t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Yn(C2) ? C2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = w2[e6]);
1289
+ t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Zn(C2) ? C2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = w2[e6]);
1284
1290
  }
1285
1291
  m2 = t3;
1286
1292
  }
@@ -1329,7 +1335,7 @@ var Xn = class e3 extends G {
1329
1335
  !n2.lng && r2 && r2.res && (n2.lng = this.language || r2.usedLng), n2.nest !== false && (e5 = this.interpolator.nest(e5, (...e6) => i2?.[0] === e6[0] && !n2.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e6[0]} in key: ${t2[0]}`), null) : this.translate(...e6, t2), n2)), n2.interpolation && this.interpolator.reset();
1330
1336
  }
1331
1337
  let a2 = n2.postProcess || this.options.postProcess, o2 = L(a2) ? [a2] : a2;
1332
- return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = Gn.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
1338
+ return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = qn.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
1333
1339
  }
1334
1340
  resolve(e5, t2 = {}) {
1335
1341
  let n2, r2, i2, a2, o2;
@@ -1341,7 +1347,7 @@ var Xn = class e3 extends G {
1341
1347
  this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
1342
1348
  let u2 = t2.count !== void 0 && !L(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (L(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1343
1349
  l2.forEach((e7) => {
1344
- this.isValidLookup(n2) || (o2 = e7, !Jn[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (Jn[`${p2[0]}-${e7}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)), p2.forEach((r3) => {
1350
+ this.isValidLookup(n2) || (o2 = e7, !Xn[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (Xn[`${p2[0]}-${e7}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)), p2.forEach((r3) => {
1345
1351
  if (this.isValidLookup(n2)) return;
1346
1352
  a2 = r3;
1347
1353
  let o3 = [c2];
@@ -1380,7 +1386,7 @@ var Xn = class e3 extends G {
1380
1386
  return false;
1381
1387
  }
1382
1388
  };
1383
- var Zn = class {
1389
+ var $n = class {
1384
1390
  constructor(e5) {
1385
1391
  this.options = e5, this.supportedLngs = this.options.supportedLngs || false, this.logger = W.create(`languageUtils`);
1386
1392
  }
@@ -1442,9 +1448,9 @@ var Zn = class {
1442
1448
  }), r2;
1443
1449
  }
1444
1450
  };
1445
- var Qn = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1446
- var $n = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1447
- var er = class {
1451
+ var er = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1452
+ var tr = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1453
+ var nr = class {
1448
1454
  constructor(e5, t2 = {}) {
1449
1455
  this.languageUtils = e5, this.options = t2, this.logger = W.create(`pluralResolver`), this.pluralRulesCache = {};
1450
1456
  }
@@ -1458,8 +1464,8 @@ var er = class {
1458
1464
  try {
1459
1465
  a2 = new Intl.PluralRules(n2, { type: r2 });
1460
1466
  } catch {
1461
- if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), $n;
1462
- if (!e5.match(/-|_/)) return $n;
1467
+ if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), tr;
1468
+ if (!e5.match(/-|_/)) return tr;
1463
1469
  let n3 = this.languageUtils.getLanguagePartFromCode(e5);
1464
1470
  a2 = this.getRule(n3, t2);
1465
1471
  }
@@ -1474,26 +1480,26 @@ var er = class {
1474
1480
  }
1475
1481
  getSuffixes(e5, t2 = {}) {
1476
1482
  let n2 = this.getRule(e5, t2);
1477
- return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => Qn[e6] - Qn[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
1483
+ return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => er[e6] - er[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
1478
1484
  }
1479
1485
  getSuffix(e5, t2, n2 = {}) {
1480
1486
  let r2 = this.getRule(e5, n2);
1481
1487
  return r2 ? `${this.options.prepend}${n2.ordinal ? `ordinal${this.options.prepend}` : ``}${r2.select(t2)}` : (this.logger.warn(`no plural rule found for: ${e5}`), this.getSuffix(`dev`, t2, n2));
1482
1488
  }
1483
1489
  };
1484
- var tr = (e5, t2, n2, r2 = `.`, i2 = true) => {
1485
- let a2 = Fn(e5, t2, n2);
1490
+ var rr = (e5, t2, n2, r2 = `.`, i2 = true) => {
1491
+ let a2 = Ln(e5, t2, n2);
1486
1492
  return !a2 && i2 && L(n2) && (a2 = H(e5, n2, r2), a2 === void 0 && (a2 = H(t2, n2, r2))), a2;
1487
1493
  };
1488
- var nr = (e5) => e5.replace(/\$/g, `$$$$`);
1489
- var rr = class {
1494
+ var ir = (e5) => e5.replace(/\$/g, `$$$$`);
1495
+ var ar = class {
1490
1496
  constructor(e5 = {}) {
1491
1497
  this.logger = W.create(`interpolator`), this.options = e5, this.format = e5?.interpolation?.format || ((e6) => e6), this.init(e5);
1492
1498
  }
1493
1499
  init(e5 = {}) {
1494
1500
  e5.interpolation ||= { escapeValue: true };
1495
1501
  let { escape: t2, escapeValue: n2, useRawValueToEscape: r2, prefix: i2, prefixEscaped: a2, suffix: o2, suffixEscaped: s2, formatSeparator: c2, unescapeSuffix: l2, unescapePrefix: u2, nestingPrefix: d2, nestingPrefixEscaped: f2, nestingSuffix: p2, nestingSuffixEscaped: m2, nestingOptionsSeparator: h2, maxReplaces: g2, alwaysFormat: _2 } = e5.interpolation;
1496
- this.escape = t2 === void 0 ? Rn : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? V(i2) : a2 || `{{`, this.suffix = o2 ? V(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? V(d2) : f2 || V(`$t(`), this.nestingSuffix = p2 ? V(p2) : m2 || V(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1502
+ this.escape = t2 === void 0 ? Bn : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? V(i2) : a2 || `{{`, this.suffix = o2 ? V(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? V(d2) : f2 || V(`$t(`), this.nestingSuffix = p2 ? V(p2) : m2 || V(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1497
1503
  }
1498
1504
  reset() {
1499
1505
  this.options && this.init(this.options);
@@ -1505,15 +1511,15 @@ var rr = class {
1505
1511
  interpolate(e5, t2, n2, r2) {
1506
1512
  let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e6) => {
1507
1513
  if (e6.indexOf(this.formatSeparator) < 0) {
1508
- let i4 = tr(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
1514
+ let i4 = rr(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
1509
1515
  return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e6 }) : i4;
1510
1516
  }
1511
1517
  let i3 = e6.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
1512
- return this.format(tr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1518
+ return this.format(rr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1513
1519
  };
1514
1520
  this.resetRegExp();
1515
1521
  let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
1516
- return [{ regex: this.regexpUnescape, safeValue: (e6) => nr(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? nr(this.escape(e6)) : nr(e6) }].forEach((t3) => {
1522
+ return [{ regex: this.regexpUnescape, safeValue: (e6) => ir(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? ir(this.escape(e6)) : ir(e6) }].forEach((t3) => {
1517
1523
  for (o2 = 0; i2 = t3.regex.exec(e5); ) {
1518
1524
  let n3 = i2[1].trim();
1519
1525
  if (a2 = c2(n3), a2 === void 0) {
@@ -1525,7 +1531,7 @@ var rr = class {
1525
1531
  a2 = i2[0];
1526
1532
  continue;
1527
1533
  } else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e5}`), a2 = ``;
1528
- } else !L(a2) && !this.useRawValueToEscape && (a2 = On(a2));
1534
+ } else !L(a2) && !this.useRawValueToEscape && (a2 = An(a2));
1529
1535
  let s3 = t3.safeValue(a2);
1530
1536
  if (e5 = e5.replace(i2[0], s3), u2 ? (t3.regex.lastIndex += a2.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
1531
1537
  }
@@ -1551,12 +1557,12 @@ var rr = class {
1551
1557
  a2 = { ...n2 }, a2 = a2.replace && !L(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1552
1558
  let c2 = /{.*}/.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
1553
1559
  if (c2 !== -1 && (s2 = r2[1].slice(c2).split(this.formatSeparator).map((e6) => e6.trim()).filter(Boolean), r2[1] = r2[1].slice(0, c2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e5 && !L(i2)) return i2;
1554
- L(i2) || (i2 = On(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e5}`), ``), s2.length && (i2 = s2.reduce((e6, t3) => this.format(e6, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), e5 = e5.replace(r2[0], i2), this.regexp.lastIndex = 0;
1560
+ L(i2) || (i2 = An(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e5}`), ``), s2.length && (i2 = s2.reduce((e6, t3) => this.format(e6, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), e5 = e5.replace(r2[0], i2), this.regexp.lastIndex = 0;
1555
1561
  }
1556
1562
  return e5;
1557
1563
  }
1558
1564
  };
1559
- var ir = (e5) => {
1565
+ var or = (e5) => {
1560
1566
  let t2 = e5.toLowerCase().trim(), n2 = {};
1561
1567
  if (e5.indexOf(`(`) > -1) {
1562
1568
  let r2 = e5.split(`(`);
@@ -1571,7 +1577,7 @@ var ir = (e5) => {
1571
1577
  }
1572
1578
  return { formatName: t2, formatOptions: n2 };
1573
1579
  };
1574
- var ar = (e5) => {
1580
+ var sr = (e5) => {
1575
1581
  let t2 = {};
1576
1582
  return (n2, r2, i2) => {
1577
1583
  let a2 = i2;
@@ -1580,14 +1586,14 @@ var ar = (e5) => {
1580
1586
  return s2 || (s2 = e5(U(r2), i2), t2[o2] = s2), s2(n2);
1581
1587
  };
1582
1588
  };
1583
- var or = (e5) => (t2, n2, r2) => e5(U(n2), r2)(t2);
1584
- var sr = class {
1589
+ var cr = (e5) => (t2, n2, r2) => e5(U(n2), r2)(t2);
1590
+ var lr = class {
1585
1591
  constructor(e5 = {}) {
1586
1592
  this.logger = W.create(`formatter`), this.options = e5, this.init(e5);
1587
1593
  }
1588
1594
  init(e5, t2 = { interpolation: {} }) {
1589
1595
  this.formatSeparator = t2.interpolation.formatSeparator || `,`;
1590
- let n2 = t2.cacheInBuiltFormats ? ar : or;
1596
+ let n2 = t2.cacheInBuiltFormats ? sr : cr;
1591
1597
  this.formats = { number: n2((e6, t3) => {
1592
1598
  let n3 = new Intl.NumberFormat(e6, { ...t3 });
1593
1599
  return (e7) => n3.format(e7);
@@ -1609,7 +1615,7 @@ var sr = class {
1609
1615
  this.formats[e5.toLowerCase().trim()] = t2;
1610
1616
  }
1611
1617
  addCached(e5, t2) {
1612
- this.formats[e5.toLowerCase().trim()] = ar(t2);
1618
+ this.formats[e5.toLowerCase().trim()] = sr(t2);
1613
1619
  }
1614
1620
  format(e5, t2, n2, r2 = {}) {
1615
1621
  let i2 = t2.split(this.formatSeparator);
@@ -1618,7 +1624,7 @@ var sr = class {
1618
1624
  i2[0] = [i2[0], ...i2.splice(1, e6)].join(this.formatSeparator);
1619
1625
  }
1620
1626
  return i2.reduce((e6, t3) => {
1621
- let { formatName: i3, formatOptions: a2 } = ir(t3);
1627
+ let { formatName: i3, formatOptions: a2 } = or(t3);
1622
1628
  if (this.formats[i3]) {
1623
1629
  let t4 = e6;
1624
1630
  try {
@@ -1633,10 +1639,10 @@ var sr = class {
1633
1639
  }, e5);
1634
1640
  }
1635
1641
  };
1636
- var cr = (e5, t2) => {
1642
+ var ur = (e5, t2) => {
1637
1643
  e5.pending[t2] !== void 0 && (delete e5.pending[t2], e5.pendingCount--);
1638
1644
  };
1639
- var lr = class extends G {
1645
+ var dr = class extends G {
1640
1646
  constructor(e5, t2, n2, r2 = {}) {
1641
1647
  super(), this.backend = e5, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = W.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
1642
1648
  }
@@ -1655,7 +1661,7 @@ var lr = class extends G {
1655
1661
  t2 && this.emit(`failedLoading`, i2, a2, t2), !t2 && n2 && this.store.addResourceBundle(i2, a2, n2, void 0, void 0, { skipCopy: true }), this.state[e5] = t2 ? -1 : 2, t2 && n2 && (this.state[e5] = 0);
1656
1662
  let o2 = {};
1657
1663
  this.queue.forEach((n3) => {
1658
- Pn(n3.loaded, [i2], a2), cr(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
1664
+ In(n3.loaded, [i2], a2), ur(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
1659
1665
  o2[e6] || (o2[e6] = {});
1660
1666
  let t3 = n3.loaded[e6];
1661
1667
  t3.length && t3.forEach((t4) => {
@@ -1737,7 +1743,7 @@ var lr = class extends G {
1737
1743
  }
1738
1744
  }
1739
1745
  };
1740
- var ur = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, simplifyPluralSuffix: true, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e5) => {
1746
+ var fr = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, simplifyPluralSuffix: true, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e5) => {
1741
1747
  let t2 = {};
1742
1748
  if (typeof e5[1] == `object` && (t2 = e5[1]), L(e5[1]) && (t2.defaultValue = e5[1]), L(e5[2]) && (t2.tDescription = e5[2]), typeof e5[2] == `object` || typeof e5[3] == `object`) {
1743
1749
  let n2 = e5[3] || e5[2];
@@ -1747,23 +1753,23 @@ var ur = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
1747
1753
  }
1748
1754
  return t2;
1749
1755
  }, interpolation: { escapeValue: true, format: (e5) => e5, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
1750
- var dr = (e5) => (L(e5.ns) && (e5.ns = [e5.ns]), L(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), L(e5.fallbackNS) && (e5.fallbackNS = [e5.fallbackNS]), e5.supportedLngs?.indexOf?.(`cimode`) < 0 && (e5.supportedLngs = e5.supportedLngs.concat([`cimode`])), typeof e5.initImmediate == `boolean` && (e5.initAsync = e5.initImmediate), e5);
1756
+ var pr = (e5) => (L(e5.ns) && (e5.ns = [e5.ns]), L(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), L(e5.fallbackNS) && (e5.fallbackNS = [e5.fallbackNS]), e5.supportedLngs?.indexOf?.(`cimode`) < 0 && (e5.supportedLngs = e5.supportedLngs.concat([`cimode`])), typeof e5.initImmediate == `boolean` && (e5.initAsync = e5.initImmediate), e5);
1751
1757
  var q = () => {
1752
1758
  };
1753
- var fr = (e5) => {
1759
+ var mr = (e5) => {
1754
1760
  Object.getOwnPropertyNames(Object.getPrototypeOf(e5)).forEach((t2) => {
1755
1761
  typeof e5[t2] == `function` && (e5[t2] = e5[t2].bind(e5));
1756
1762
  });
1757
1763
  };
1758
- var pr = `__i18next_supportNoticeShown`;
1759
- var mr = () => !!(typeof globalThis < `u` && globalThis[pr] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
1760
- var hr = () => {
1761
- typeof globalThis < `u` && (globalThis[pr] = true);
1764
+ var hr = `__i18next_supportNoticeShown`;
1765
+ var gr = () => !!(typeof globalThis < `u` && globalThis[hr] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
1766
+ var _r = () => {
1767
+ typeof globalThis < `u` && (globalThis[hr] = true);
1762
1768
  };
1763
- var gr = (e5) => !!(e5?.modules?.backend?.name?.indexOf(`Locize`) > 0 || e5?.modules?.backend?.constructor?.name?.indexOf(`Locize`) > 0 || e5?.options?.backend?.backends && e5.options.backend.backends.some((e6) => e6?.name?.indexOf(`Locize`) > 0 || e6?.constructor?.name?.indexOf(`Locize`) > 0) || e5?.options?.backend?.projectId || e5?.options?.backend?.backendOptions && e5.options.backend.backendOptions.some((e6) => e6?.projectId));
1769
+ var vr = (e5) => !!(e5?.modules?.backend?.name?.indexOf(`Locize`) > 0 || e5?.modules?.backend?.constructor?.name?.indexOf(`Locize`) > 0 || e5?.options?.backend?.backends && e5.options.backend.backends.some((e6) => e6?.name?.indexOf(`Locize`) > 0 || e6?.constructor?.name?.indexOf(`Locize`) > 0) || e5?.options?.backend?.projectId || e5?.options?.backend?.backendOptions && e5.options.backend.backendOptions.some((e6) => e6?.projectId));
1764
1770
  var J = class e4 extends G {
1765
1771
  constructor(e5 = {}, t2) {
1766
- if (super(), this.options = dr(e5), this.services = {}, this.logger = W, this.modules = { external: [] }, fr(this), t2 && !this.isInitialized && !e5.isClone) {
1772
+ if (super(), this.options = pr(e5), this.services = {}, this.logger = W, this.modules = { external: [] }, mr(this), t2 && !this.isInitialized && !e5.isClone) {
1767
1773
  if (!this.options.initAsync) return this.init(e5, t2), this;
1768
1774
  setTimeout(() => {
1769
1775
  this.init(e5, t2);
@@ -1772,19 +1778,19 @@ var J = class e4 extends G {
1772
1778
  }
1773
1779
  init(e5 = {}, t2) {
1774
1780
  this.isInitializing = true, typeof e5 == `function` && (t2 = e5, e5 = {}), e5.defaultNS == null && e5.ns && (L(e5.ns) ? e5.defaultNS = e5.ns : e5.ns.indexOf(`translation`) < 0 && (e5.defaultNS = e5.ns[0]));
1775
- let n2 = ur();
1776
- this.options = { ...n2, ...this.options, ...dr(e5) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e5.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e5.keySeparator), e5.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e5.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler), this.options.showSupportNotice !== false && !gr(this) && !mr() && (typeof console < `u` && console.info !== void 0 && console.info(`\u{1F310} i18next is made possible by our own product, Locize \u2014 consider powering your project with managed localization (AI, CDN, integrations): https://locize.com \u{1F499}`), hr());
1781
+ let n2 = fr();
1782
+ this.options = { ...n2, ...this.options, ...pr(e5) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e5.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e5.keySeparator), e5.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e5.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler), this.options.showSupportNotice !== false && !vr(this) && !gr() && (typeof console < `u` && console.info !== void 0 && console.info(`\u{1F310} i18next is made possible by our own product, Locize \u2014 consider powering your project with managed localization (AI, CDN, integrations): https://locize.com \u{1F499}`), _r());
1777
1783
  let r2 = (e6) => e6 ? typeof e6 == `function` ? new e6() : e6 : null;
1778
1784
  if (!this.options.isClone) {
1779
1785
  this.modules.logger ? W.init(r2(this.modules.logger), this.options) : W.init(null, this.options);
1780
1786
  let e6;
1781
- e6 = this.modules.formatter ? this.modules.formatter : sr;
1782
- let t3 = new Zn(this.options);
1783
- this.store = new Wn(this.options.resources, this.options);
1787
+ e6 = this.modules.formatter ? this.modules.formatter : lr;
1788
+ let t3 = new $n(this.options);
1789
+ this.store = new Kn(this.options.resources, this.options);
1784
1790
  let i3 = this.services;
1785
- i3.logger = W, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new er(t3, { prepend: this.options.pluralSeparator, simplifyPluralSuffix: this.options.simplifyPluralSuffix }), this.options.interpolation.format && this.options.interpolation.format !== n2.interpolation.format && this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`), e6 && (!this.options.interpolation.format || this.options.interpolation.format === n2.interpolation.format) && (i3.formatter = r2(e6), i3.formatter.init && i3.formatter.init(i3, this.options), this.options.interpolation.format = i3.formatter.format.bind(i3.formatter)), i3.interpolator = new rr(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new lr(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
1791
+ i3.logger = W, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new nr(t3, { prepend: this.options.pluralSeparator, simplifyPluralSuffix: this.options.simplifyPluralSuffix }), this.options.interpolation.format && this.options.interpolation.format !== n2.interpolation.format && this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`), e6 && (!this.options.interpolation.format || this.options.interpolation.format === n2.interpolation.format) && (i3.formatter = r2(e6), i3.formatter.init && i3.formatter.init(i3, this.options), this.options.interpolation.format = i3.formatter.format.bind(i3.formatter)), i3.interpolator = new ar(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new dr(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
1786
1792
  this.emit(e7, ...t4);
1787
- }), this.modules.languageDetector && (i3.languageDetector = r2(this.modules.languageDetector), i3.languageDetector.init && i3.languageDetector.init(i3, this.options.detection, this.options)), this.modules.i18nFormat && (i3.i18nFormat = r2(this.modules.i18nFormat), i3.i18nFormat.init && i3.i18nFormat.init(this)), this.translator = new Xn(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
1793
+ }), this.modules.languageDetector && (i3.languageDetector = r2(this.modules.languageDetector), i3.languageDetector.init && i3.languageDetector.init(i3, this.options.detection, this.options)), this.modules.i18nFormat && (i3.i18nFormat = r2(this.modules.i18nFormat), i3.i18nFormat.init && i3.i18nFormat.init(this)), this.translator = new Qn(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
1788
1794
  this.emit(e7, ...t4);
1789
1795
  }), this.modules.external.forEach((e7) => {
1790
1796
  e7.init && e7.init(this);
@@ -1831,7 +1837,7 @@ var J = class e4 extends G {
1831
1837
  use(e5) {
1832
1838
  if (!e5) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
1833
1839
  if (!e5.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
1834
- return e5.type === `backend` && (this.modules.backend = e5), (e5.type === `logger` || e5.log && e5.warn && e5.error) && (this.modules.logger = e5), e5.type === `languageDetector` && (this.modules.languageDetector = e5), e5.type === `i18nFormat` && (this.modules.i18nFormat = e5), e5.type === `postProcessor` && Gn.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
1840
+ return e5.type === `backend` && (this.modules.backend = e5), (e5.type === `logger` || e5.log && e5.warn && e5.error) && (this.modules.logger = e5), e5.type === `languageDetector` && (this.modules.languageDetector = e5), e5.type === `i18nFormat` && (this.modules.i18nFormat = e5), e5.type === `postProcessor` && qn.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
1835
1841
  }
1836
1842
  setResolvedLanguage(e5) {
1837
1843
  if (e5 && this.languages && !([`cimode`, `dev`].indexOf(e5) > -1)) {
@@ -1923,7 +1929,7 @@ var J = class e4 extends G {
1923
1929
  }
1924
1930
  } catch {
1925
1931
  }
1926
- let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new Zn(ur());
1932
+ let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new $n(fr());
1927
1933
  return e5.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.indexOf(n2.getLanguagePartFromCode(e5)) > -1 || e5.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
1928
1934
  }
1929
1935
  static createInstance(t2 = {}, n2) {
@@ -1936,11 +1942,11 @@ var J = class e4 extends G {
1936
1942
  let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
1937
1943
  if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e5) => {
1938
1944
  a2[e5] = this[e5];
1939
- }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Wn(Object.keys(this.store.data).reduce((e5, t3) => (e5[t3] = { ...this.store.data[t3] }, e5[t3] = Object.keys(e5[t3]).reduce((n3, r3) => (n3[r3] = { ...e5[t3][r3] }, n3), e5[t3]), e5), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
1940
- let e5 = { ...ur().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
1941
- a2.services.interpolator = new rr(n3);
1945
+ }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Kn(Object.keys(this.store.data).reduce((e5, t3) => (e5[t3] = { ...this.store.data[t3] }, e5[t3] = Object.keys(e5[t3]).reduce((n3, r3) => (n3[r3] = { ...e5[t3][r3] }, n3), e5[t3]), e5), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
1946
+ let e5 = { ...fr().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
1947
+ a2.services.interpolator = new ar(n3);
1942
1948
  }
1943
- return a2.translator = new Xn(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
1949
+ return a2.translator = new Qn(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
1944
1950
  a2.emit(e5, ...t3);
1945
1951
  }), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
1946
1952
  }
@@ -1949,20 +1955,20 @@ var J = class e4 extends G {
1949
1955
  }
1950
1956
  }.createInstance();
1951
1957
  J.createInstance, J.dir, J.init, J.loadResources, J.reloadResources, J.use, J.changeLanguage, J.getFixedT, J.t, J.exists, J.setDefaultNamespace, J.hasLoadedNamespace, J.loadNamespaces, J.loadLanguages;
1952
- var _r = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
1953
- var vr = { "&amp;": `&`, "&#38;": `&`, "&lt;": `<`, "&#60;": `<`, "&gt;": `>`, "&#62;": `>`, "&apos;": `'`, "&#39;": `'`, "&quot;": `"`, "&#34;": `"`, "&nbsp;": ` `, "&#160;": ` `, "&copy;": `\xA9`, "&#169;": `\xA9`, "&reg;": `\xAE`, "&#174;": `\xAE`, "&hellip;": `\u2026`, "&#8230;": `\u2026`, "&#x2F;": `/`, "&#47;": `/` };
1954
- var yr = (e5) => vr[e5];
1955
- var br = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(_r, yr), transDefaultProps: void 0 };
1956
- var xr = (e5 = {}) => {
1957
- br = { ...br, ...e5 };
1958
+ var yr = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
1959
+ var br = { "&amp;": `&`, "&#38;": `&`, "&lt;": `<`, "&#60;": `<`, "&gt;": `>`, "&#62;": `>`, "&apos;": `'`, "&#39;": `'`, "&quot;": `"`, "&#34;": `"`, "&nbsp;": ` `, "&#160;": ` `, "&copy;": `\xA9`, "&#169;": `\xA9`, "&reg;": `\xAE`, "&#174;": `\xAE`, "&hellip;": `\u2026`, "&#8230;": `\u2026`, "&#x2F;": `/`, "&#47;": `/` };
1960
+ var xr = (e5) => br[e5];
1961
+ var Sr = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(yr, xr), transDefaultProps: void 0 };
1962
+ var Cr = (e5 = {}) => {
1963
+ Sr = { ...Sr, ...e5 };
1958
1964
  };
1959
- var Sr = { type: `3rdParty`, init(e5) {
1960
- xr(e5.options.react);
1965
+ var wr = { type: `3rdParty`, init(e5) {
1966
+ Cr(e5.options.react);
1961
1967
  } };
1962
1968
  var Y = /* @__PURE__ */ new Map();
1963
- var Cr = 500;
1969
+ var Tr = 500;
1964
1970
  var X;
1965
- function wr() {
1971
+ function Er() {
1966
1972
  if (X === void 0) try {
1967
1973
  X = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
1968
1974
  } catch {
@@ -1970,32 +1976,32 @@ function wr() {
1970
1976
  }
1971
1977
  return X;
1972
1978
  }
1973
- var Tr = 15;
1974
- function Er(e5) {
1975
- if (!(typeof e5 != `string` || wr()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > Tr) throw Error(`Cannot format the amount '${e5}' exactly: this runtime's Intl implementation predates ES2023 string support and would lose precision. Use a runtime with ES2023 Intl support (for example Node 20+), or pass a value within 15 significant digits.`);
1979
+ var Dr = 15;
1980
+ function Or(e5) {
1981
+ if (!(typeof e5 != `string` || Er()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > Dr) throw Error(`Cannot format the amount '${e5}' exactly: this runtime's Intl implementation predates ES2023 string support and would lose precision. Use a runtime with ES2023 Intl support (for example Node 20+), or pass a value within 15 significant digits.`);
1976
1982
  }
1977
- function Dr(e5, t2, n2) {
1983
+ function kr(e5, t2, n2) {
1978
1984
  return `${e5}|${t2}|${Object.entries(n2).filter(([, e6]) => e6 !== void 0).sort(([e6], [t3]) => e6 < t3 ? -1 : 1).map(([e6, t3]) => `${e6}=${String(t3)}`).join(`&`)}`;
1979
1985
  }
1980
- function Or(e5, t2, n2) {
1981
- let r2 = Dr(e5, t2, n2), i2 = Y.get(r2);
1982
- return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), Y.size >= Cr && Y.clear(), Y.set(r2, i2)), i2;
1986
+ function Ar(e5, t2, n2) {
1987
+ let r2 = kr(e5, t2, n2), i2 = Y.get(r2);
1988
+ return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), Y.size >= Tr && Y.clear(), Y.set(r2, i2)), i2;
1983
1989
  }
1984
- function kr(e5, { value: t2, currency: n2 }, r2 = {}) {
1985
- return Er(t2), Or(e5, n2, r2).format(t2);
1990
+ function jr(e5, { value: t2, currency: n2 }, r2 = {}) {
1991
+ return Or(t2), Ar(e5, n2, r2).format(t2);
1986
1992
  }
1987
- function Ar(e5, { value: t2, currency: n2 }, r2 = {}) {
1988
- return Er(t2), Or(e5, n2, r2).formatToParts(t2);
1993
+ function Mr(e5, { value: t2, currency: n2 }, r2 = {}) {
1994
+ return Or(t2), Ar(e5, n2, r2).formatToParts(t2);
1989
1995
  }
1990
- function jr(e5) {
1996
+ function Nr(e5) {
1991
1997
  return an().find((e6) => e6.primary)?.id ?? e5;
1992
1998
  }
1993
- function Mr(e5, t2) {
1999
+ function Pr(e5, t2) {
1994
2000
  let { locale: n2, ...r2 } = t2 ?? {}, i2 = n2 ?? e5.essentials?.locale;
1995
2001
  if (!i2) throw Error(`Host locale is not available on the current host. Make sure to use an updated version of the host initialization package.`);
1996
2002
  return { locale: i2, formatOptions: r2 };
1997
2003
  }
1998
- var Nr = Dn({ getLanguage: (e5) => () => {
2004
+ var Fr = kn({ getLanguage: (e5) => () => {
1999
2005
  let t2 = e5.essentials?.language;
2000
2006
  if (!t2) throw Error(`Host language is not available on the current host. Make sure to use an updated version of the host initialization package.`);
2001
2007
  return t2;
@@ -2004,20 +2010,20 @@ var Nr = Dn({ getLanguage: (e5) => () => {
2004
2010
  if (!t2) throw Error(`Host locale is not available on the current host. Make sure to use an updated version of the host initialization package.`);
2005
2011
  return t2;
2006
2012
  }, formatCurrency: (e5) => (t2, n2) => {
2007
- let { locale: r2, formatOptions: i2 } = Mr(e5, n2);
2008
- return kr(r2, t2, i2);
2013
+ let { locale: r2, formatOptions: i2 } = Pr(e5, n2);
2014
+ return jr(r2, t2, i2);
2009
2015
  }, formatCurrencyToParts: (e5) => (t2, n2) => {
2010
- let { locale: r2, formatOptions: i2 } = Mr(e5, n2);
2011
- return Ar(r2, t2, i2);
2016
+ let { locale: r2, formatOptions: i2 } = Pr(e5, n2);
2017
+ return Mr(r2, t2, i2);
2012
2018
  }, getTranslationFunction: (e5) => () => {
2013
2019
  let t2 = e5.translations?.();
2014
2020
  if (!t2) throw Error(`Host translation resources are not available.`);
2015
- let n2 = J.createInstance(), r2 = jr(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
2016
- return n2.use(Sr).init(i2, (e6) => {
2021
+ let n2 = J.createInstance(), r2 = Nr(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
2022
+ return n2.use(wr).init(i2, (e6) => {
2017
2023
  if (e6) throw e6;
2018
2024
  }), n2.t.bind(n2);
2019
2025
  } });
2020
- var Pr = class {
2026
+ var Ir = class {
2021
2027
  constructor(e5) {
2022
2028
  this.message = e5, this.captureException = () => {
2023
2029
  console.error(this.message);
@@ -2032,81 +2038,85 @@ var Pr = class {
2032
2038
  };
2033
2039
  }
2034
2040
  };
2035
- var Fr = (e5) => new Pr(e5);
2036
- var Ir = Dn({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : Fr(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
2037
- var Lr = { service: `service`, services: `services`, categories: `categories`, locations: `locations`, sessions: `sessions`, timeSlots: `time-slots`, serviceAddOns: `service-addons`, bookingsSettings: `bookings-settings`, serviceCta: `service-cta`, preferences: `preferences`, bookingSummary: `booking-summary`, bookingCheckout: `booking-checkout`, formValues: `form-values`, paymentOptions: `payment-options`, seo: `seo`, warmup: `warmup`, reschedule: `reschedule` };
2038
- function Rr(e5) {
2041
+ var Lr = (e5) => new Ir(e5);
2042
+ var Rr = kn({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : Lr(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
2043
+ var zr = { service: `service`, services: `services`, categories: `categories`, locations: `locations`, sessions: `sessions`, timeSlots: `time-slots`, serviceAddOns: `service-addons`, bookingsSettings: `bookings-settings`, serviceCta: `service-cta`, preferences: `preferences`, bookingSummary: `booking-summary`, bookingCheckout: `booking-checkout`, formValues: `form-values`, paymentOptions: `payment-options`, seo: `seo`, warmup: `warmup`, reschedule: `reschedule` };
2044
+ function Br(e5) {
2039
2045
  try {
2040
- let t2 = Ir.getMonitoringClient?.();
2046
+ let t2 = Rr.getMonitoringClient?.();
2041
2047
  return t2 && typeof t2[e5] == `function` ? t2 : null;
2042
2048
  } catch {
2043
2049
  return null;
2044
2050
  }
2045
2051
  }
2046
- function zr(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2047
- let a2 = Rr(`captureException`);
2052
+ function Vr(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2053
+ let a2 = Br(`captureException`);
2048
2054
  if (!a2) return;
2049
2055
  let o2 = e5 instanceof Error ? e5 : Error(String(e5));
2050
2056
  a2.captureException(o2, { level: r2, tags: { feature: t2, action: n2 }, ...i2 ? { contexts: i2 } : {} });
2051
2057
  }
2052
- function Br(e5, { feature: t2, tags: n2 }, r2) {
2053
- let i2 = Rr(`startSpanManual`);
2058
+ function Hr(e5, { feature: t2, tags: n2 }, r2) {
2059
+ let i2 = Br(`startSpanManual`);
2054
2060
  if (!i2) return r2;
2055
2061
  let a2 = i2.startSpanManual({ name: e5, tags: { feature: t2, ...n2 } });
2056
2062
  return r2.then(() => a2.end(), (e6) => a2.fail(e6)), r2;
2057
2063
  }
2058
- var Vr = class extends import_react.Component {
2064
+ var Ur = class extends import_react.Component {
2059
2065
  state = { hasError: false };
2060
2066
  static getDerivedStateFromError() {
2061
2067
  return { hasError: true };
2062
2068
  }
2063
2069
  componentDidCatch(e5, t2) {
2064
- zr(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2070
+ Vr(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2065
2071
  }
2066
2072
  render() {
2067
2073
  return this.state.hasError ? this.props.fallback : this.props.children;
2068
2074
  }
2069
2075
  };
2070
- function Hr(e5) {
2076
+ function Wr(e5) {
2071
2077
  let t2 = e5;
2072
- if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
2078
+ return t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
2073
2079
  t2.__state = { status: `fulfilled`, value: e6 };
2074
2080
  }, (e6) => {
2075
2081
  t2.__state = { status: `rejected`, reason: e6 };
2076
- })), t2.__state.status === `fulfilled`) return t2.__state.value;
2077
- throw t2.__state.status === `rejected` ? t2.__state.reason : t2;
2082
+ })), t2.__state;
2078
2083
  }
2079
- function Ur(e5) {
2084
+ function Gr(e5) {
2085
+ let t2 = Wr(e5);
2086
+ if (t2.status === `fulfilled`) return t2.value;
2087
+ throw t2.status === `rejected` ? t2.reason : e5;
2088
+ }
2089
+ function Kr(e5) {
2080
2090
  let t2 = Promise.resolve(e5);
2081
2091
  return t2.__state = { status: `fulfilled`, value: e5 }, t2;
2082
2092
  }
2083
- var Wr = /* @__PURE__ */ new WeakMap();
2084
- function Gr(e5, t2, n2) {
2085
- let r2 = Wr.get(e5);
2086
- r2 || (r2 = /* @__PURE__ */ new WeakMap(), Wr.set(e5, r2));
2093
+ var qr = /* @__PURE__ */ new WeakMap();
2094
+ function Jr(e5, t2, n2) {
2095
+ let r2 = qr.get(e5);
2096
+ r2 || (r2 = /* @__PURE__ */ new WeakMap(), qr.set(e5, r2));
2087
2097
  let i2 = r2.get(t2);
2088
2098
  i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
2089
2099
  let a2 = i2.get(n2);
2090
2100
  if (!a2) {
2091
2101
  let r3 = e5;
2092
- a2 = r3.__state?.status === `fulfilled` ? Ur(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? Ur(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
2102
+ a2 = r3.__state?.status === `fulfilled` ? Kr(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? Kr(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
2093
2103
  }
2094
2104
  return a2;
2095
2105
  }
2096
2106
  function Z(e5) {
2097
2107
  return e5;
2098
2108
  }
2099
- var Kr = Z(`@wix/site-service-url`);
2100
- var qr = `appSectionParams`;
2101
- function Jr(e5) {
2102
- let t2 = e5.searchParams.get(qr);
2109
+ var Yr = Z(`@wix/site-service-url`);
2110
+ var Xr = `appSectionParams`;
2111
+ function Zr(e5) {
2112
+ let t2 = e5.searchParams.get(Xr);
2103
2113
  if (t2 === null) return e5;
2104
2114
  let n2 = new URL(e5);
2105
- n2.searchParams.delete(qr);
2106
- for (let [e6, r2] of Object.entries(Yr(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
2115
+ n2.searchParams.delete(Xr);
2116
+ for (let [e6, r2] of Object.entries(Qr(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
2107
2117
  return n2;
2108
2118
  }
2109
- function Yr(e5) {
2119
+ function Qr(e5) {
2110
2120
  try {
2111
2121
  let t2 = JSON.parse(e5);
2112
2122
  return t2 && typeof t2 == `object` && !Array.isArray(t2) ? t2 : {};
@@ -2114,16 +2124,16 @@ function Yr(e5) {
2114
2124
  return {};
2115
2125
  }
2116
2126
  }
2117
- var Xr = `bookings-uou:url-change`;
2118
- var Zr = (e5) => {
2127
+ var $r = `bookings-uou:url-change`;
2128
+ var ei = (e5) => {
2119
2129
  let t2 = new URL(e5);
2120
2130
  return t2.searchParams.sort(), t2.href;
2121
2131
  };
2122
- function Qr(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2132
+ function ti(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2123
2133
  let r2 = globalThis.window;
2124
2134
  if (!r2?.history) return;
2125
2135
  let i2 = new URL(r2.location.href);
2126
- if (Zr(i2) === Zr(e5)) return;
2136
+ if (ei(i2) === ei(e5)) return;
2127
2137
  let a2 = { scrollY: r2.scrollY };
2128
2138
  if (n2) r2.history.replaceState(a2, ``, e5.href);
2129
2139
  else {
@@ -2134,54 +2144,54 @@ function Qr(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2134
2144
  return;
2135
2145
  }
2136
2146
  }
2137
- r2.dispatchEvent(new Event(Xr));
2147
+ r2.dispatchEvent(new Event($r));
2138
2148
  }
2139
- function $r(e5) {
2149
+ function ni(e5) {
2140
2150
  let t2 = globalThis.window;
2141
- return t2 ? (t2.addEventListener(Xr, e5), t2.addEventListener(`popstate`, e5), () => {
2142
- t2.removeEventListener(Xr, e5), t2.removeEventListener(`popstate`, e5);
2151
+ return t2 ? (t2.addEventListener($r, e5), t2.addEventListener(`popstate`, e5), () => {
2152
+ t2.removeEventListener($r, e5), t2.removeEventListener(`popstate`, e5);
2143
2153
  }) : () => {
2144
2154
  };
2145
2155
  }
2146
- var ei = (e5) => {
2156
+ var ri = (e5) => {
2147
2157
  try {
2148
2158
  return decodeURIComponent(e5);
2149
2159
  } catch {
2150
2160
  return e5;
2151
2161
  }
2152
2162
  };
2153
- function ti(e5, t2) {
2163
+ function ii(e5, t2) {
2154
2164
  let n2 = t2 ? new URL(t2).pathname : `/`;
2155
- return `./${ei(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2165
+ return `./${ri(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2156
2166
  }
2157
- function ni() {
2158
- let e5 = (0, import_services_manager_react.useService)(Kr), t2 = (0, import_react.useCallback)(() => e5.currentUrl, [e5]), n2 = (0, import_react.useSyncExternalStore)($r, t2, t2), i2 = (0, import_react.useMemo)(() => Jr(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2159
- return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => Jr(new URL(e5.currentUrl)), getRelativeUrl: () => ti(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: Qr };
2167
+ function ai() {
2168
+ let e5 = (0, import_services_manager_react.useService)(Yr), t2 = (0, import_react.useCallback)(() => e5.currentUrl, [e5]), n2 = (0, import_react.useSyncExternalStore)(ni, t2, t2), i2 = (0, import_react.useMemo)(() => Zr(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2169
+ return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => Zr(new URL(e5.currentUrl)), getRelativeUrl: () => ii(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: ti };
2160
2170
  }
2161
- var Q = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
2162
- var ri = Z(`@wix/site-service-warmup-data`);
2163
- function ii() {
2171
+ var Q = { category: `category`, location: `location`, page: `page`, blob: `bookingSelection`, legacyBlob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
2172
+ var oi = Z(`@wix/site-service-warmup-data`);
2173
+ function si() {
2164
2174
  try {
2165
2175
  return (0, import_services_manager_react.useGetService)();
2166
2176
  } catch {
2167
2177
  return null;
2168
2178
  }
2169
2179
  }
2170
- function ai(e5) {
2180
+ function ci(e5) {
2171
2181
  try {
2172
- return e5 ? e5(ri) : null;
2182
+ return e5 ? e5(oi) : null;
2173
2183
  } catch {
2174
2184
  return null;
2175
2185
  }
2176
2186
  }
2177
- function oi() {
2178
- let e5 = ai(ii()), t2 = typeof window > `u`;
2187
+ function li() {
2188
+ let e5 = ci(si()), t2 = typeof window > `u`;
2179
2189
  return { scope: e5 ?? void 0, get: async (n2) => {
2180
2190
  if (t2 || !e5) return null;
2181
2191
  try {
2182
2192
  return await e5.get(n2);
2183
2193
  } catch (e6) {
2184
- return zr(e6, { feature: Lr.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2194
+ return Vr(e6, { feature: zr.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2185
2195
  }
2186
2196
  }, set: (n2, r2) => {
2187
2197
  if (t2 && e5) try {
@@ -2190,75 +2200,75 @@ function oi() {
2190
2200
  }
2191
2201
  } };
2192
2202
  }
2193
- var si = Z(`@wix/site-service-locale`);
2194
- var ci = Z;
2195
- var li = ci(`@wix/viewer-service-multilingual`);
2196
- function ui() {
2203
+ var ui = Z(`@wix/site-service-locale`);
2204
+ var di = Z;
2205
+ var fi = di(`@wix/viewer-service-multilingual`);
2206
+ function pi() {
2197
2207
  try {
2198
- return Nr.getLanguage() ?? `en`;
2208
+ return Fr.getLanguage() ?? `en`;
2199
2209
  } catch {
2200
2210
  return `en`;
2201
2211
  }
2202
2212
  }
2203
- function di(e5) {
2213
+ function mi(e5) {
2204
2214
  try {
2205
2215
  return (0, import_services_manager_react.useService)(e5);
2206
2216
  } catch {
2207
2217
  return null;
2208
2218
  }
2209
2219
  }
2210
- function fi() {
2211
- let e5 = di(si), t2 = di(li);
2212
- return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || ui();
2220
+ function hi() {
2221
+ let e5 = mi(ui), t2 = mi(fi);
2222
+ return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || pi();
2213
2223
  }
2214
- var pi = `bookings-uou`;
2215
- function mi(e5) {
2216
- return `${pi}:${e5}:locations:all`;
2224
+ var gi = `bookings-uou`;
2225
+ function _i(e5) {
2226
+ return `${gi}:${e5}:locations:all`;
2217
2227
  }
2218
- var hi = 5e3;
2219
- var gi = 100;
2220
- var _i = `wix-warmup-data`;
2221
- var vi = null;
2222
- function yi(e5) {
2228
+ var vi = 5e3;
2229
+ var yi = 100;
2230
+ var bi = `wix-warmup-data`;
2231
+ var xi = null;
2232
+ function Si(e5) {
2223
2233
  if (typeof document < `u`) try {
2224
- let t2 = document.getElementById(_i)?.textContent;
2225
- return t2 ? (vi?.text !== t2 && (vi = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), vi.data[e5] ?? void 0) : void 0;
2234
+ let t2 = document.getElementById(bi)?.textContent;
2235
+ return t2 ? (xi?.text !== t2 && (xi = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), xi.data[e5] ?? void 0) : void 0;
2226
2236
  } catch {
2227
2237
  return;
2228
2238
  }
2229
2239
  }
2230
- var bi = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2231
- var xi = bi();
2232
- var Si = /* @__PURE__ */ new WeakMap();
2233
- var Ci = /* @__PURE__ */ new WeakMap();
2234
- function wi(e5) {
2235
- if (!e5) return xi;
2236
- let t2 = Si.get(e5);
2237
- return t2 || (t2 = bi(), Si.set(e5, t2)), t2;
2240
+ var Ci = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2241
+ var wi = Ci();
2242
+ var Ti = /* @__PURE__ */ new WeakMap();
2243
+ var Ei = /* @__PURE__ */ new WeakMap();
2244
+ function Di(e5) {
2245
+ if (!e5) return wi;
2246
+ let t2 = Ti.get(e5);
2247
+ return t2 || (t2 = Ci(), Ti.set(e5, t2)), t2;
2238
2248
  }
2239
- function Ti({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2249
+ function Oi({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2240
2250
  if (e5 === null) return n2();
2241
2251
  if (typeof window > `u`) {
2242
2252
  let r3 = () => n2().then((n3) => (t2.set(e5, n3), n3)), { scope: i3 } = t2;
2243
2253
  if (!i3) return r3();
2244
- let a3 = Ci.get(i3);
2245
- a3 || (a3 = /* @__PURE__ */ new Map(), Ci.set(i3, a3));
2254
+ let a3 = Ei.get(i3);
2255
+ a3 || (a3 = /* @__PURE__ */ new Map(), Ei.set(i3, a3));
2246
2256
  let o3 = a3.get(e5);
2247
2257
  if (o3) return o3;
2248
2258
  let s3 = r3();
2249
2259
  return a3.set(e5, s3), s3.catch(() => a3.delete(e5)), s3;
2250
2260
  }
2251
- let i2 = wi(t2.scope), a2 = Date.now();
2261
+ let i2 = Di(t2.scope), a2 = Date.now();
2252
2262
  for (let [e6, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e6);
2253
2263
  let o2 = i2.promises.get(e5);
2254
2264
  if (o2 && !r2) return o2.promise;
2255
2265
  r2 && i2.invalidatedWarmup.add(e5);
2256
2266
  let s2 = !i2.invalidatedWarmup.has(e5);
2257
2267
  if (s2) {
2258
- let t3 = yi(e5);
2268
+ let t3 = Si(e5);
2259
2269
  if (t3 !== void 0) {
2260
- let n3 = Ur(t3);
2261
- return i2.promises.set(e5, { promise: n3, expiresAt: a2 + hi }), n3;
2270
+ let n3 = Kr(t3);
2271
+ return i2.promises.set(e5, { promise: n3, expiresAt: a2 + vi }), n3;
2262
2272
  }
2263
2273
  }
2264
2274
  let c2 = (async () => {
@@ -2268,117 +2278,117 @@ function Ti({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2268
2278
  }
2269
2279
  return n2();
2270
2280
  })();
2271
- i2.promises.size >= gi && i2.promises.delete(i2.promises.keys().next().value);
2281
+ i2.promises.size >= yi && i2.promises.delete(i2.promises.keys().next().value);
2272
2282
  let l2 = { promise: c2, expiresAt: 1 / 0 };
2273
2283
  return i2.promises.set(e5, l2), c2.then(() => {
2274
- l2.expiresAt = Date.now() + hi;
2284
+ l2.expiresAt = Date.now() + vi;
2275
2285
  }, () => {
2276
2286
  i2.promises.get(e5) === l2 && i2.promises.delete(e5);
2277
2287
  }), c2;
2278
2288
  }
2279
- var Ei = [{ path: `businessLocations.locations.business.address.geocode.latitude` }, { path: `businessLocations.locations.business.address.geocode.longitude` }, { path: `businessLocations.locations.custom.address.geocode.latitude` }, { path: `businessLocations.locations.custom.address.geocode.longitude` }, { path: `businessLocations.locations.calculatedAddress.geocode.latitude` }, { path: `businessLocations.locations.calculatedAddress.geocode.longitude` }];
2280
- function Di(e5) {
2289
+ var ki = [{ path: `businessLocations.locations.business.address.geocode.latitude` }, { path: `businessLocations.locations.business.address.geocode.longitude` }, { path: `businessLocations.locations.custom.address.geocode.latitude` }, { path: `businessLocations.locations.custom.address.geocode.longitude` }, { path: `businessLocations.locations.calculatedAddress.geocode.latitude` }, { path: `businessLocations.locations.calculatedAddress.geocode.longitude` }];
2290
+ function Ai(e5) {
2281
2291
  return Dt(Object.assign(e5, { domainToMappings: { "*.dev.wix-code.com": [{ srcPath: `/_api/services-2`, destPath: `` }, { srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "www.wixapis.com": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }, { srcPath: `/bookings/services/v2/bulk/services`, destPath: `/v2/bulk/services` }], "manage._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], "editor._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], "blocks._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], "create.editorx": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], _: [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "www._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "bo._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "wixbo.ai": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "wix-bo.com": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "editor.wixapps.net": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "api._api_base_domain_": [{ srcPath: `/services-2`, destPath: `` }] } }));
2282
2292
  }
2283
- var Oi = `@wix/auto_sdk_bookings_services`;
2284
- function ki(e5) {
2293
+ var ji = `@wix/auto_sdk_bookings_services`;
2294
+ function Mi(e5) {
2285
2295
  function t2({ host: t3 }) {
2286
- return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryLocations`, packageName: Oi, migrationOptions: { optInTransformResponse: true }, url: Di({ protoPath: `/v2/services/locations/query`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => st(e6, [{ transformFn: Xt, paths: Ei }]) };
2296
+ return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryLocations`, packageName: ji, migrationOptions: { optInTransformResponse: true }, url: Ai({ protoPath: `/v2/services/locations/query`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => ot(e6, [{ transformFn: Xt, paths: ki }]) };
2287
2297
  }
2288
2298
  return t2;
2289
2299
  }
2290
- var Ai = [{ path: `businessLocations.locations.calculatedAddress` }, { path: `businessLocations.locations.business.address` }, { path: `businessLocations.locations.custom.address` }];
2291
- async function ji(e5) {
2292
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ki(Xe({ filter: e5?.filter }));
2300
+ var Ni = [{ path: `businessLocations.locations.calculatedAddress` }, { path: `businessLocations.locations.business.address` }, { path: `businessLocations.locations.custom.address` }];
2301
+ async function Pi(e5) {
2302
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Mi(Ye({ filter: e5?.filter }));
2293
2303
  n2?.onSiteCall?.();
2294
2304
  try {
2295
2305
  let e6 = await t2.request(r2);
2296
- return n2?.onSuccess?.(e6), Ze(st(e6.data, [{ transformFn: Zt, paths: Ai }]));
2306
+ return n2?.onSuccess?.(e6), Xe(ot(e6.data, [{ transformFn: Zt, paths: Ni }]));
2297
2307
  } catch (e6) {
2298
- let t3 = _t(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { filter: `$[0].filter` }, singleArgumentUnchanged: false }, [`options`]);
2308
+ let t3 = gt(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { filter: `$[0].filter` }, singleArgumentUnchanged: false }, [`options`]);
2299
2309
  throw n2?.onError?.(e6), t3;
2300
2310
  }
2301
2311
  }
2302
- function Mi(e5) {
2303
- return (t2) => ji(t2, { httpClient: e5 });
2312
+ function Fi(e5) {
2313
+ return (t2) => Pi(t2, { httpClient: e5 });
2304
2314
  }
2305
- var Ni = Et(Mi);
2306
- var Pi = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
2307
- var Fi = function(e5) {
2315
+ var Ii = Et(Fi);
2316
+ var Li = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
2317
+ var Ri = function(e5) {
2308
2318
  return e5.BOOK_ONLINE = `bookingsBookOnline`, e5.SERVICE_PAGE = `bookingsServicePage`, e5.CALENDAR_PAGE = `bookingsCalendar`, e5.FORM_PAGE = `bookingsForm`, e5;
2309
2319
  }({});
2310
- function Ii(e5) {
2320
+ function zi(e5) {
2311
2321
  return e5.business?._id ?? null;
2312
2322
  }
2313
- function Li(e5) {
2323
+ function Bi(e5) {
2314
2324
  return e5.business?.name ?? null;
2315
2325
  }
2316
- async function Ri() {
2317
- let e5 = await Ni({ filter: { services: { appId: Pi, hidden: false } } });
2318
- return { locations: [...e5.businessLocations?.locations ?? []].sort((e6, t2) => (Li(e6) ?? ``).localeCompare(Li(t2) ?? ``)), hasOtherLocations: !!(e5.customLocations?.exists || e5.customerLocations?.exists) };
2326
+ async function Vi() {
2327
+ let e5 = await Ii({ filter: { services: { appId: Li, hidden: false } } });
2328
+ return { locations: [...e5.businessLocations?.locations ?? []].sort((e6, t2) => (Bi(e6) ?? ``).localeCompare(Bi(t2) ?? ``)), hasOtherLocations: !!(e5.customLocations?.exists || e5.customerLocations?.exists) };
2319
2329
  }
2320
- function zi({ isLoading: e5, hasError: t2, refetch: n2, children: r2 }) {
2321
- let { searchParams: i2 } = ni(), a2 = { locationItems: [], selectedLocationId: i2.get(Q.location), hasOtherLocations: false, hasMultipleLocations: false, isLoading: e5, hasError: t2, refetch: n2, selectLocation: () => {
2330
+ function Hi({ isLoading: e5, hasError: t2, refetch: n2, children: r2 }) {
2331
+ let { searchParams: i2 } = ai(), a2 = { locationItems: [], selectedLocationId: i2.get(Q.location), hasOtherLocations: false, hasMultipleLocations: false, isLoading: e5, hasError: t2, refetch: n2, selectLocation: () => {
2322
2332
  } };
2323
2333
  return (0, import_jsx_runtime.jsx)($.Provider, { value: a2, children: r2 });
2324
2334
  }
2325
- function Bi({ refetch: e5, children: t2 }) {
2326
- return (0, import_jsx_runtime.jsx)(zi, { isLoading: true, hasError: false, refetch: e5, children: t2 });
2335
+ function Ui({ refetch: e5, children: t2 }) {
2336
+ return (0, import_jsx_runtime.jsx)(Hi, { isLoading: true, hasError: false, refetch: e5, children: t2 });
2327
2337
  }
2328
- function Vi({ refetch: e5, children: t2 }) {
2329
- return (0, import_jsx_runtime.jsx)(zi, { isLoading: false, hasError: true, refetch: e5, children: t2 });
2338
+ function Wi({ refetch: e5, children: t2 }) {
2339
+ return (0, import_jsx_runtime.jsx)(Hi, { isLoading: false, hasError: true, refetch: e5, children: t2 });
2330
2340
  }
2331
- var Hi = ci(`@wix/site-service-business-logger`);
2332
- function Ui(e5) {
2341
+ var Gi = di(`@wix/site-service-business-logger`);
2342
+ function Ki(e5) {
2333
2343
  return { evid: 32, src: 16, endpoint: ``, params: e5 };
2334
2344
  }
2335
- var Wi = { SERVICES: `services_context`, SERVICE: `service_context`, TIME_SLOTS: `time_slots_context`, BOOKING_CHECKOUT: `booking_checkout_context`, CATEGORIES: `categories_context`, LOCATIONS: `locations_context`, SERVICE_ADD_ONS: `service_addons_context`, PREFERENCES: `preferences_context` };
2336
- Fi.BOOK_ONLINE;
2337
- var Gi = `new_bookings_server`;
2338
- var Ki = (e5) => {
2339
- let { reportBi: t2 } = (0, import_services_manager_react.useService)(Hi);
2345
+ var qi = { SERVICES: `services_context`, SERVICE: `service_context`, TIME_SLOTS: `time_slots_context`, BOOKING_CHECKOUT: `booking_checkout_context`, CATEGORIES: `categories_context`, LOCATIONS: `locations_context`, SERVICE_ADD_ONS: `service_addons_context`, PREFERENCES: `preferences_context` };
2346
+ Ri.BOOK_ONLINE;
2347
+ var Ji = `new_bookings_server`;
2348
+ var Yi = (e5) => {
2349
+ let { reportBi: t2 } = (0, import_services_manager_react.useService)(Gi);
2340
2350
  return (0, import_react.useCallback)((n2) => {
2341
- t2({ widget_name: e5, bookingsPlatform: Gi, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
2351
+ t2({ widget_name: e5, bookingsPlatform: Ji, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
2342
2352
  }, [t2, e5]);
2343
2353
  };
2344
- var qi = (e5, t2 = true) => {
2345
- let n2 = Ki(e5), { getParsedUrl: r2 } = ni(), i2 = (0, import_react.useRef)(false);
2354
+ var Xi = (e5, t2 = true) => {
2355
+ let n2 = Yi(e5), { getParsedUrl: r2 } = ai(), i2 = (0, import_react.useRef)(false);
2346
2356
  (0, import_react.useEffect)(() => {
2347
- t2 && !i2.current && (i2.current = true, n2(Ui({ referralInfo: r2().searchParams.get(Q.referral) ?? void 0 })));
2357
+ t2 && !i2.current && (i2.current = true, n2(Ki({ referralInfo: r2().searchParams.get(Q.referral) ?? void 0 })));
2348
2358
  }, [t2, n2, r2]);
2349
2359
  };
2350
2360
  var $ = (0, import_react.createContext)(null);
2351
- var Ji = `useLocationsContext must be used within LocationsContextProvider`;
2352
- function Yi() {
2361
+ var Zi = `useLocationsContext must be used within LocationsContextProvider`;
2362
+ function Qi() {
2353
2363
  let e5 = (0, import_react.useContext)($);
2354
- if (!e5) throw Error(Ji);
2364
+ if (!e5) throw Error(Zi);
2355
2365
  return e5;
2356
2366
  }
2357
- function Xi(e5, t2) {
2358
- let n2 = Ii(e5);
2359
- return { locationId: n2, locationName: Li(e5), isSelected: n2 != null && n2 === t2 };
2367
+ function $i(e5, t2) {
2368
+ let n2 = zi(e5);
2369
+ return { locationId: n2, locationName: Bi(e5), isSelected: n2 != null && n2 === t2 };
2360
2370
  }
2361
- var Zi = (e5) => ({ ...e5, hasError: false });
2362
- var Qi = () => ({ locations: [], hasOtherLocations: false, hasError: true });
2363
- function $i({ locationsPromise: e5, refetch: t2, children: n2 }) {
2364
- let { locations: i2, hasOtherLocations: s2, hasError: c2 } = Hr(e5), { pathname: l2, searchParams: u2, pushUrl: d2, getExternalBaseUrl: p2 } = ni(), m2 = u2.get(Q.location), h2 = (0, import_react.useCallback)((e6, t3) => {
2371
+ var ea = (e5) => ({ ...e5, hasError: false });
2372
+ var ta = () => ({ locations: [], hasOtherLocations: false, hasError: true });
2373
+ function na({ locationsPromise: e5, refetch: t2, children: n2 }) {
2374
+ let { locations: i2, hasOtherLocations: s2, hasError: c2 } = Gr(e5), { pathname: l2, searchParams: u2, pushUrl: d2, getExternalBaseUrl: p2 } = ai(), m2 = u2.get(Q.location), h2 = (0, import_react.useCallback)((e6, t3) => {
2365
2375
  let n3 = new URLSearchParams(u2);
2366
2376
  e6 ? n3.set(Q.location, e6) : n3.delete(Q.location), n3.delete(Q.page);
2367
2377
  let r2 = n3.toString(), i3 = r2 ? `${l2}?${r2}` : l2;
2368
2378
  d2(new URL(i3, `${p2()}/`), { disableScrollToTop: true, skipHistory: t3 });
2369
- }, [l2, u2, d2, p2]), g2 = (0, import_react.useCallback)((e6) => h2(e6, false), [h2]), _2 = m2 != null && !c2 && !(m2 === `OTHER_LOCATIONS` && s2) && !i2.some((e6) => Ii(e6) === m2);
2379
+ }, [l2, u2, d2, p2]), g2 = (0, import_react.useCallback)((e6) => h2(e6, false), [h2]), _2 = m2 != null && !c2 && !(m2 === `OTHER_LOCATIONS` && s2) && !i2.some((e6) => zi(e6) === m2);
2370
2380
  (0, import_react.useEffect)(() => {
2371
2381
  _2 && h2(null, true);
2372
2382
  }, [_2, h2]);
2373
- let v2 = i2.filter((e6) => Ii(e6)).length + +!!s2, y2 = (0, import_react.useMemo)(() => ({ locationItems: i2.map((e6) => Xi(e6, m2)), selectedLocationId: m2, hasOtherLocations: s2, hasMultipleLocations: v2 > 1, isLoading: false, hasError: c2, refetch: t2, selectLocation: g2 }), [i2, m2, s2, c2, v2, t2, g2]);
2383
+ let v2 = i2.filter((e6) => zi(e6)).length + +!!s2, y2 = (0, import_react.useMemo)(() => ({ locationItems: i2.map((e6) => $i(e6, m2)), selectedLocationId: m2, hasOtherLocations: s2, hasMultipleLocations: v2 > 1, isLoading: false, hasError: c2, refetch: t2, selectLocation: g2 }), [i2, m2, s2, c2, v2, t2, g2]);
2374
2384
  return (0, import_jsx_runtime.jsx)($.Provider, { value: y2, children: n2 });
2375
2385
  }
2376
- function ea({ children: e5 }) {
2377
- qi(Wi.LOCATIONS);
2378
- let n2 = oi(), i2 = fi(), [a2, s2] = (0, import_react.useState)(0), l2 = (0, import_react.useMemo)(() => Gr(Ti({ key: mi(i2), refresh: a2 !== 0, warmupData: n2, fetchData: () => Br(`locations-context-load`, { feature: Lr.locations }, Ri()) }), Zi, Qi), [a2, i2]), u2 = (0, import_react.useCallback)(() => s2((e6) => e6 + 1), []);
2379
- return (0, import_jsx_runtime.jsx)(Vr, { fallback: (0, import_jsx_runtime.jsx)(Vi, { refetch: u2, children: e5 }), feature: Lr.locations, children: (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Bi, { refetch: u2, children: e5 }), children: (0, import_jsx_runtime.jsx)($i, { locationsPromise: l2, refetch: u2, children: e5 }) }) });
2386
+ function ra({ children: e5 }) {
2387
+ Xi(qi.LOCATIONS);
2388
+ let n2 = li(), i2 = hi(), [a2, s2] = (0, import_react.useState)(0), l2 = (0, import_react.useMemo)(() => Jr(Oi({ key: _i(i2), refresh: a2 !== 0, warmupData: n2, fetchData: () => Hr(`locations-context-load`, { feature: zr.locations }, Vi()) }), ea, ta), [a2, i2]), u2 = (0, import_react.useCallback)(() => s2((e6) => e6 + 1), []);
2389
+ return (0, import_jsx_runtime.jsx)(Ur, { fallback: (0, import_jsx_runtime.jsx)(Wi, { refetch: u2, children: e5 }), feature: zr.locations, children: (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Ui, { refetch: u2, children: e5 }), children: (0, import_jsx_runtime.jsx)(na, { locationsPromise: l2, refetch: u2, children: e5 }) }) });
2380
2390
  }
2381
- var ta = wn(`c151d9f7-1582-407c-bb59-59030f244b47`);
2391
+ var ia = En(`c151d9f7-1582-407c-bb59-59030f244b47`);
2382
2392
  // Annotate the CommonJS export names for ESM import in node:
2383
2393
  0 && (module.exports = {
2384
2394
  LOCATIONS_CONTEXT_MISSING_PROVIDER_ERROR,