@wix/bookings 1.0.1786 → 1.0.1788

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 +3 -3
@@ -1,13 +1,13 @@
1
1
  // context-runtime/context-service-addons/runtime.js
2
- import { Component as e, Suspense as t, createContext as n, useCallback as r, useContext as i, useEffect as a, useMemo as o, useRef as s, useSyncExternalStore as c } from "react";
3
- import { useServiceContext as l } from "@wix/bookings/context/service";
4
- import { useGetService as u, useService as d } from "@wix/services-manager-react";
5
- import { jsx as f } from "react/jsx-runtime";
6
- var p = {};
7
- function m(e5, t2 = false, n2 = (e6) => e6) {
2
+ import { Component as e, Suspense as t, createContext as n, useCallback as r, useContext as i, useDeferredValue as a, useEffect as o, useMemo as s, useRef as c, useSyncExternalStore as l } from "react";
3
+ import { useServiceContext as u } from "@wix/bookings/context/service";
4
+ import { useGetService as d, useService as f } from "@wix/services-manager-react";
5
+ import { jsx as p } from "react/jsx-runtime";
6
+ var m = {};
7
+ function h(e5, t2 = false, n2 = (e6) => e6) {
8
8
  return () => ({ __type: `event-definition`, type: e5, isDomainEvent: t2, transformations: n2 });
9
9
  }
10
- var h = (e5) => {
10
+ var g = (e5) => {
11
11
  switch (e5) {
12
12
  case `get`:
13
13
  case `GET`:
@@ -34,11 +34,11 @@ var h = (e5) => {
34
34
  throw Error(`Unknown method: ${e5}`);
35
35
  }
36
36
  };
37
- var g = (e5) => (t2) => async (n2) => {
37
+ var _ = (e5) => (t2) => async (n2) => {
38
38
  let r2, i2 = (t3) => {
39
39
  if (r2 = e5(n2)(t3), r2.url === void 0) throw Error(`Url was not successfully created for this request, please reach out to support channels for assistance.`);
40
40
  let { method: i3, url: a2, params: o2 } = r2;
41
- return { ...r2, method: h(i3), url: a2, data: r2.data, params: o2 };
41
+ return { ...r2, method: g(i3), url: a2, data: r2.data, params: o2 };
42
42
  };
43
43
  try {
44
44
  let e6 = await t2.request(i2);
@@ -51,10 +51,10 @@ var g = (e5) => (t2) => async (n2) => {
51
51
  throw typeof e6 == `object` && e6 && `response` in e6 && typeof e6.response == `object` && e6.response !== null && `data` in e6.response ? e6.response.data : e6;
52
52
  }
53
53
  };
54
- var _ = (e5) => e5.__isAmbassador ? true : !!e5().__isAmbassador;
55
- var v = `__metadata`;
56
- var y = `edge.wixapis.com`;
57
- var b = class extends Error {
54
+ var v = (e5) => e5.__isAmbassador ? true : !!e5().__isAmbassador;
55
+ var y = `__metadata`;
56
+ var b = `edge.wixapis.com`;
57
+ var x = class extends Error {
58
58
  message;
59
59
  response;
60
60
  constructor(e5, t2) {
@@ -62,108 +62,108 @@ var b = class extends Error {
62
62
  }
63
63
  async details() {
64
64
  let e5 = await this.response.json();
65
- return x(this.response.status, e5?.message, e5?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e5 });
65
+ return ee(this.response.status, e5?.message, e5?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e5 });
66
66
  }
67
67
  };
68
- var x = (e5, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
69
- var ee = (e5) => e5?.method && [`post`, `put`, `patch`].includes(e5.method.toLocaleLowerCase()) && e5.body ? { "Content-Type": `application/json` } : {};
70
- var te = (e5) => e5 && typeof e5 == `object` && !Array.isArray(e5);
71
- var ne = (e5) => e5.__type === `host`;
72
- function S(e5, t2) {
68
+ var ee = (e5, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
69
+ var te = (e5) => e5?.method && [`post`, `put`, `patch`].includes(e5.method.toLocaleLowerCase()) && e5.body ? { "Content-Type": `application/json` } : {};
70
+ var ne = (e5) => e5 && typeof e5 == `object` && !Array.isArray(e5);
71
+ var S = (e5) => e5.__type === `host`;
72
+ function C(e5, t2) {
73
73
  return e5.create(t2);
74
74
  }
75
- var C = `x-wix-bi-gateway`;
76
- function re(e5, t2, n2) {
77
- return { [C]: ie({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e5.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e5.methodFqn, entity: e5.entityFqdn }) };
75
+ var re = `x-wix-bi-gateway`;
76
+ function ie(e5, t2, n2) {
77
+ return { [re]: ae({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e5.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e5.methodFqn, entity: e5.entityFqdn }) };
78
78
  }
79
- function ie(e5) {
79
+ function ae(e5) {
80
80
  return Object.entries(e5).filter(([e6, t2]) => !!t2).map(([e6, t2]) => `${e6}=${t2}`).join(`,`);
81
81
  }
82
- function ae(e5) {
83
- let t2 = globalThis.__wix_context__, n2 = { client: p.client, elevatedClient: p.elevatedClient }, r2;
84
- 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);
82
+ function oe(e5) {
83
+ let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
84
+ globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
85
85
  try {
86
86
  return e5();
87
87
  } finally {
88
- globalThis.__wix_context__ = t2, p.client = n2.client, p.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
88
+ globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
89
89
  }
90
90
  }
91
- var oe = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
92
- function se(e5) {
93
- return fe(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
91
+ var se = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
92
+ function ce(e5) {
93
+ return pe(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
94
94
  }
95
- var ce = /([\p{Ll}\d])(\p{Lu})/gu;
96
- var le = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
97
- var ue = `$1\0$2`;
98
- var de = /[^\p{L}\d]+/giu;
99
- function fe(e5) {
95
+ var le = /([\p{Ll}\d])(\p{Lu})/gu;
96
+ var ue = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
97
+ var de = `$1\0$2`;
98
+ var fe = /[^\p{L}\d]+/giu;
99
+ function pe(e5) {
100
100
  let t2 = e5.trim();
101
- t2 = t2.replace(ce, ue).replace(le, ue), t2 = t2.replace(de, `\0`);
101
+ t2 = t2.replace(le, de).replace(ue, de), t2 = t2.replace(fe, `\0`);
102
102
  let n2 = 0, r2 = t2.length;
103
103
  for (; t2.charAt(n2) === `\0`; ) n2++;
104
104
  if (n2 === r2) return [];
105
105
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
106
106
  return t2.slice(n2, r2).split(/\0/g);
107
107
  }
108
- var pe = (e5) => `validationError` in (e5.response?.data?.details ?? {});
109
- var me = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
110
- var he = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
111
- function ge(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
108
+ var me = (e5) => `validationError` in (e5.response?.data?.details ?? {});
109
+ var he = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
110
+ var ge = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
111
+ function _e(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
112
112
  if (typeof e5 != `object` || !e5) throw e5;
113
- if (pe(e5)) return _e(e5, t2, n2);
114
- if (me(e5)) return ve(e5);
115
- if (he(e5)) {
116
- let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: se(n3), data: {} }, requestId: e5.requestId };
113
+ if (me(e5)) return ve(e5, t2, n2);
114
+ if (he(e5)) return ye(e5);
115
+ if (ge(e5)) {
116
+ let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: ce(n3), data: {} }, requestId: e5.requestId };
117
117
  return w(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
118
118
  }
119
- return ye(e5);
119
+ return be(e5);
120
120
  }
121
- var _e = (e5, t2, n2) => {
122
- let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = be(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 };
121
+ var ve = (e5, t2, n2) => {
122
+ let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = xe(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 };
123
123
  return w(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
124
124
  };
125
125
  var w = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
126
- var ve = (e5) => {
127
- 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 ?? se(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 };
126
+ var ye = (e5) => {
127
+ 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 ?? ce(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 };
128
128
  return w(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
129
129
  };
130
- var ye = (e5) => w(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: se(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
131
- var be = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
130
+ var be = (e5) => w(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: ce(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
131
+ var xe = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
132
132
  let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
133
133
  return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
134
134
  let r3 = t2[e6.field];
135
- if (r3) return { ...e6, field: xe(r3, i2) };
135
+ if (r3) return { ...e6, field: Se(r3, i2) };
136
136
  let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
137
137
  if (s2) {
138
138
  let t3 = a2[s2];
139
- if (t3) return { ...e6, field: e6.field.replace(s2, xe(t3, i2)) };
139
+ if (t3) return { ...e6, field: e6.field.replace(s2, Se(t3, i2)) };
140
140
  }
141
141
  return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
142
142
  });
143
143
  };
144
- var xe = (e5, t2) => {
145
- let n2 = Se(e5);
144
+ var Se = (e5, t2) => {
145
+ let n2 = Ce(e5);
146
146
  return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
147
147
  };
148
- var Se = (e5) => {
148
+ var Ce = (e5) => {
149
149
  let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
150
150
  return t2 && t2.groups && Number(t2.groups.argIndex);
151
151
  };
152
- function Ce(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
153
- return ae(() => e5({ request: async (e6) => {
152
+ function we(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
153
+ return oe(() => e5({ request: async (e6) => {
154
154
  let i3 = e6({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
155
155
  a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
156
- let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? y : o3}${a3.url}`;
156
+ let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? b : o3}${a3.url}`;
157
157
  a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
158
158
  try {
159
- let e7 = re(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e7 } }, s3 = await n2(u3, o4);
159
+ let e7 = ie(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e7 } }, s3 = await n2(u3, o4);
160
160
  if (s3.status !== 200) {
161
161
  let e8 = null;
162
162
  try {
163
163
  e8 = await s3.json();
164
164
  } catch {
165
165
  }
166
- let t3 = Te(s3.status, e8?.message ?? s3.statusText, e8?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e8 }), n3 = ge(t3);
166
+ let t3 = Ee(s3.status, e8?.message ?? s3.statusText, e8?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e8 }), n3 = _e(t3);
167
167
  throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
168
168
  }
169
169
  let l3 = await s3.json();
@@ -173,18 +173,18 @@ function Ce(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
173
173
  }
174
174
  }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
175
175
  }
176
- var we = class extends Error {
176
+ var Te = class extends Error {
177
177
  response;
178
178
  requestId;
179
179
  constructor(e5) {
180
180
  super(), this.response = e5.response, this.requestId = e5.requestId;
181
181
  }
182
182
  };
183
- var Te = (e5, t2, n2, r2) => new we({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2 }, status: e5 }, requestId: r2?.requestId });
184
- var Ee = `.`;
185
- function De(e5, t2, n2) {
183
+ var Ee = (e5, t2, n2, r2) => new Te({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2 }, status: e5 }, requestId: r2?.requestId });
184
+ var De = `.`;
185
+ function Oe(e5, t2, n2) {
186
186
  if (e5 == null) throw Error(`Cannot set value on null or undefined`);
187
- let r2 = Oe(t2), i2 = e5;
187
+ let r2 = ke(t2), i2 = e5;
188
188
  for (let e6 = 0; e6 < r2.length; e6++) {
189
189
  let t3 = r2[e6];
190
190
  if (e6 === r2.length - 1) {
@@ -196,21 +196,21 @@ function De(e5, t2, n2) {
196
196
  }
197
197
  return e5;
198
198
  }
199
- function Oe(e5) {
200
- return Array.isArray(e5) ? e5 : e5.split(Ee).map((e6) => ke(e6) ? Number(e6) : e6);
201
- }
202
199
  function ke(e5) {
203
- return /^\d+$/.test(e5);
200
+ return Array.isArray(e5) ? e5 : e5.split(De).map((e6) => Ae(e6) ? Number(e6) : e6);
204
201
  }
205
202
  function Ae(e5) {
203
+ return /^\d+$/.test(e5);
204
+ }
205
+ function je(e5) {
206
206
  let t2 = {};
207
- for (let [n2, r2] of Object.entries(e5)) je(n2) || De(t2, Oe(n2), r2);
207
+ for (let [n2, r2] of Object.entries(e5)) Me(n2) || Oe(t2, ke(n2), r2);
208
208
  return t2;
209
209
  }
210
- function je(e5) {
210
+ function Me(e5) {
211
211
  return e5 === `__proto__` || e5 === `constructor` || e5 === `prototype`;
212
212
  }
213
- var Me = class {
213
+ var Ne = class {
214
214
  BRACKET_PATTERN = /\[(\d+)\]/g;
215
215
  NUMERIC_PATTERN = /^\d+$/;
216
216
  ESCAPED_DOT_PATTERN = /\\\./g;
@@ -233,7 +233,7 @@ var Me = class {
233
233
  return e5.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
234
234
  }
235
235
  unflatten() {
236
- return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e5, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e5)), t2])), Ae(this.cleanedModifiedFields);
236
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e5, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e5)), t2])), je(this.cleanedModifiedFields);
237
237
  }
238
238
  flatten(e5) {
239
239
  let t2 = {};
@@ -253,12 +253,12 @@ var Me = class {
253
253
  if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
254
254
  r2.push(`[${e6}]`), n2 = n2[parseInt(e6, 10)];
255
255
  }, a2 = (e6, t3) => {
256
- let i3 = e6 in oe ? oe[e6] : void 0;
256
+ let i3 = e6 in se ? se[e6] : void 0;
257
257
  if (i3 && i3 in t3) {
258
258
  r2.push(i3), n2 = t3[i3];
259
259
  return;
260
260
  }
261
- let a3 = Ie(e6);
261
+ let a3 = Le(e6);
262
262
  if (a3 && a3 in t3) {
263
263
  r2.push(a3), n2 = t3[a3];
264
264
  return;
@@ -289,28 +289,28 @@ var Me = class {
289
289
  return e5.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e5[r2 - 1] === `\\` ? t2 : `.` + n2);
290
290
  }
291
291
  };
292
- function Ne(e5, t2) {
292
+ function Pe(e5, t2) {
293
293
  let n2 = e5?.modifiedFields;
294
294
  if (!n2) return null;
295
- let r2 = Pe(n2);
295
+ let r2 = Fe(n2);
296
296
  if (!r2) return null;
297
297
  let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
298
298
  e5 = { ...e5, modifiedFields: i2 };
299
299
  let o2 = t2(e5), s2 = o2?.modifiedFields;
300
300
  if (!s2) return null;
301
- let c2 = Fe(s2, a2);
301
+ let c2 = Ie(s2, a2);
302
302
  return c2 === null ? null : (o2.modifiedFields = c2, o2);
303
303
  }
304
- function Pe(e5) {
304
+ function Fe(e5) {
305
305
  if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
306
- let t2 = new Me(e5);
306
+ let t2 = new Ne(e5);
307
307
  return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
308
308
  } catch {
309
309
  return null;
310
310
  }
311
311
  return null;
312
312
  }
313
- function Fe(e5, t2) {
313
+ function Ie(e5, t2) {
314
314
  if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
315
315
  return t2.flatten(e5);
316
316
  } catch {
@@ -318,10 +318,10 @@ function Fe(e5, t2) {
318
318
  }
319
319
  return null;
320
320
  }
321
- function Ie(e5) {
321
+ function Le(e5) {
322
322
  return e5.replace(/[-_\s]+(.)?/g, (e6, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e6) => e6.toLowerCase());
323
323
  }
324
- function Le() {
324
+ function Re() {
325
325
  return { emit(e5, ...t2) {
326
326
  for (let n2 = 0, r2 = this.events[e5] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
327
327
  }, events: {}, on(e5, t2) {
@@ -330,8 +330,8 @@ function Le() {
330
330
  };
331
331
  } };
332
332
  }
333
- var Re = (e5) => e5.__type === `event-definition`;
334
- function ze(e5, t2, n2, r2) {
333
+ var ze = (e5) => e5.__type === `event-definition`;
334
+ function Be(e5, t2, n2, r2) {
335
335
  let i2;
336
336
  if (e5.isDomainEvent) {
337
337
  let { deletedEvent: e6, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
@@ -342,14 +342,14 @@ function ze(e5, t2, n2, r2) {
342
342
  let e6 = s2.modifiedFields;
343
343
  if (typeof e6 == `object` && e6 && !Array.isArray(e6)) {
344
344
  o2 = structuredClone(i2);
345
- let e7 = Ne(s2, a2);
345
+ let e7 = Pe(s2, a2);
346
346
  if (e7) return t2(e7);
347
347
  }
348
348
  }
349
349
  return t2(a2(o2));
350
350
  }
351
- function Be(e5) {
352
- let t2 = /* @__PURE__ */ new Map(), n2 = Le();
351
+ function Ve(e5) {
352
+ let t2 = /* @__PURE__ */ new Map(), n2 = Re();
353
353
  return { initModule(e6) {
354
354
  return (r2) => {
355
355
  let i2 = t2.get(e6.type) ?? [];
@@ -359,7 +359,7 @@ function Be(e5) {
359
359
  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 }))];
360
360
  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(`, `)}`);
361
361
  let l2 = t2.get(r2) ?? [];
362
- return await Promise.all(l2.map(({ eventDefinition: e7, handler: t3 }) => ze(e7, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
362
+ return await Promise.all(l2.map(({ eventDefinition: e7, handler: t3 }) => Be(e7, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
363
363
  }, async processRequest(e6, t3) {
364
364
  let n3 = await e6.text();
365
365
  return this.process(n3, t3);
@@ -378,12 +378,12 @@ function Be(e5) {
378
378
  let n3 = Array.from(t2.keys()).map((e7) => ({ type: e7 }));
379
379
  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(`, `)}`);
380
380
  let r2 = t2.get(e6.eventType) ?? [];
381
- await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => ze(t3, n4, e6.payload, { instanceId: e6.instanceId, identity: e6.identity })));
382
- }, apps: { AppInstalled: m(`AppInstalled`)(), AppRemoved: m(`AppRemoved`)() } } };
381
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Be(t3, n4, e6.payload, { instanceId: e6.instanceId, identity: e6.identity })));
382
+ }, apps: { AppInstalled: h(`AppInstalled`)(), AppRemoved: h(`AppRemoved`)() } } };
383
383
  }
384
- var Ve = (e5) => e5.__type === `service-plugin-definition`;
385
- function He(e5) {
386
- let t2 = /* @__PURE__ */ new Map(), n2 = Le();
384
+ var He = (e5) => e5.__type === `service-plugin-definition`;
385
+ function Ue(e5) {
386
+ let t2 = /* @__PURE__ */ new Map(), n2 = Re();
387
387
  return { initModule(e6) {
388
388
  return (r2) => {
389
389
  let i2 = t2.get(e6.componentType.toLowerCase()) ?? [];
@@ -425,83 +425,83 @@ function He(e5) {
425
425
  } } };
426
426
  }
427
427
  var T = `X-Wix-Consistent`;
428
- function Ue(e5) {
428
+ function We(e5) {
429
429
  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) => {
430
430
  let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [T]: t2[T] } : {} }, l3 = e5.host?.getErrorHandler?.();
431
431
  try {
432
432
  if (typeof n3 == `string` || n3 instanceof URL) {
433
433
  let e6 = await i3(n3, { ...r3, headers: c3 });
434
434
  l3?.handleError(e6, { requestOptions: { url: n3.toString(), method: r3?.method } });
435
- let a3 = We(e6);
435
+ let a3 = Ge(e6);
436
436
  return a3 && (t2[T] = a3), e6;
437
437
  }
438
438
  {
439
439
  for (let [e7, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e7, t3);
440
440
  let e6 = await i3(n3, r3);
441
441
  l3?.handleError(e6, { requestOptions: { url: n3.url, method: r3?.method } });
442
- let a3 = We(e6);
442
+ let a3 = Ge(e6);
443
443
  return a3 && (t2[T] = a3), e6;
444
444
  }
445
445
  } catch (e6) {
446
446
  throw l3?.handleError(e6, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e6;
447
447
  }
448
- }, { client: c2, initModule: l2 } = He(i2), { client: u2, initModule: d2 } = Be(i2), f2 = async (n3, r3) => {
449
- 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`] ? { [T]: t2[T] } : {} } }), u3 = We(l3);
448
+ }, { client: c2, initModule: l2 } = Ue(i2), { client: u2, initModule: d2 } = Ve(i2), f2 = async (n3, r3) => {
449
+ let i3 = o2(), s3 = await a2(), c3 = te(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [T]: t2[T] } : {} } }), u3 = Ge(l3);
450
450
  return u3 && (t2[T] = u3), l3;
451
- }, m2 = (t3, n3) => {
452
- if (Re(t3)) return d2(t3);
453
- if (Ve(t3)) return l2(t3);
454
- if (ne(t3) && e5.host) return S(t3, e5.host);
451
+ }, p2 = (t3, n3) => {
452
+ if (ze(t3)) return d2(t3);
453
+ if (He(t3)) return l2(t3);
454
+ if (S(t3) && e5.host) return C(t3, e5.host);
455
455
  if (typeof t3 == `function`) {
456
456
  if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
457
457
  let r3 = e5.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e5.useCDN === void 0 ? i2().shouldUseCDN : e5.useCDN;
458
- return Ce(ae(() => _(t3)) ? g(t3) : t3, n3 ?? {}, f2, e5.host?.getErrorHandler?.(), (e6, t4) => {
458
+ return we(oe(() => v(t3)) ? _(t3) : t3, n3 ?? {}, f2, e5.host?.getErrorHandler?.(), (e6, t4) => {
459
459
  let n4 = new URL(e6, `https://${r3}`);
460
460
  return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
461
461
  }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e5.host?.name, o3, e5.validateRequestSchema);
462
462
  }
463
- return te(t3) ? Object.fromEntries(Object.entries(t3).map(([e6, n4]) => [e6, m2(n4, t3[v])])) : t3;
463
+ return ne(t3) ? Object.fromEntries(Object.entries(t3).map(([e6, n4]) => [e6, p2(n4, t3[y])])) : t3;
464
464
  }, h2 = (e6) => {
465
465
  for (let n3 in e6) t2[n3] = e6[n3];
466
466
  };
467
- return { ...e5.modules ? m2(e5.modules) : {}, get auth() {
467
+ return { ...e5.modules ? p2(e5.modules) : {}, get auth() {
468
468
  let t3 = i2();
469
469
  return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e5.host), t3;
470
- }, setHeaders: h2, use: m2, enableContext(e6, t3 = { elevated: false }) {
471
- e6 === `global` ? globalThis.__wix_context__ == null ? t3.elevated ? globalThis.__wix_context__ = { elevatedClient: this } : globalThis.__wix_context__ = { client: this } : t3.elevated ? globalThis.__wix_context__.elevatedClient = this : globalThis.__wix_context__.client = this : t3.elevated ? p.elevatedClient = this : p.client = this;
470
+ }, setHeaders: h2, use: p2, enableContext(e6, t3 = { elevated: false }) {
471
+ e6 === `global` ? globalThis.__wix_context__ == null ? t3.elevated ? globalThis.__wix_context__ = { elevatedClient: this } : globalThis.__wix_context__ = { client: this } : t3.elevated ? globalThis.__wix_context__.elevatedClient = this : globalThis.__wix_context__.client = this : t3.elevated ? m.elevatedClient = this : m.client = this;
472
472
  }, fetch: (t3, n3) => {
473
473
  let r3 = e5.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
474
474
  return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
475
475
  }, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
476
476
  let i3 = e5?.host?.apiBaseUrl ?? `www.wixapis.com`, a3 = await f2(`https://${i3}/graphql/${r3.apiVersion}`, { method: `POST`, headers: { "Content-Type": `application/json` }, body: JSON.stringify({ query: t3, variables: n3 }) });
477
- if (a3.status !== 200) throw new b(`GraphQL request failed with status ${a3.status}`, a3);
477
+ if (a3.status !== 200) throw new x(`GraphQL request failed with status ${a3.status}`, a3);
478
478
  let { data: o3, errors: s3 } = await a3.json();
479
479
  return { data: o3 ?? {}, errors: s3 };
480
480
  }, webhooks: u2, servicePlugins: c2 };
481
481
  }
482
- function We(e5) {
482
+ function Ge(e5) {
483
483
  return e5.headers?.get(`X-Wix-Consistent`) ?? e5.headers?.get(`x-wix-consistent`);
484
484
  }
485
- var Ge = 1920;
486
485
  var Ke = 1920;
487
- var qe = 1e3;
486
+ var qe = 1920;
488
487
  var Je = 1e3;
488
+ var Ye = 1e3;
489
489
  var E = { SCALE_TO_FILL: `fill`, SCALE_TO_FIT: `fit`, STRETCH: `stretch`, ORIGINAL_SIZE: `original_size`, TILE: `tile`, TILE_HORIZONTAL: `tile_horizontal`, TILE_VERTICAL: `tile_vertical`, FIT_AND_TILE: `fit_and_tile`, LEGACY_STRIP_TILE: `legacy_strip_tile`, LEGACY_STRIP_TILE_HORIZONTAL: `legacy_strip_tile_horizontal`, LEGACY_STRIP_TILE_VERTICAL: `legacy_strip_tile_vertical`, LEGACY_STRIP_SCALE_TO_FILL: `legacy_strip_fill`, LEGACY_STRIP_SCALE_TO_FIT: `legacy_strip_fit`, LEGACY_STRIP_FIT_AND_TILE: `legacy_strip_fit_and_tile`, LEGACY_STRIP_ORIGINAL_SIZE: `legacy_strip_original_size`, LEGACY_ORIGINAL_SIZE: `actual_size`, LEGACY_FIT_WIDTH: `fitWidth`, LEGACY_FIT_HEIGHT: `fitHeight`, LEGACY_FULL: `full`, LEGACY_BG_FIT_AND_TILE: `legacy_tile`, LEGACY_BG_FIT_AND_TILE_HORIZONTAL: `legacy_tile_horizontal`, LEGACY_BG_FIT_AND_TILE_VERTICAL: `legacy_tile_vertical`, LEGACY_BG_NORMAL: `legacy_normal` };
490
490
  var D = { FIT: `fit`, FILL: `fill`, FILL_FOCAL: `fill_focal`, CROP: `crop`, LEGACY_CROP: `legacy_crop`, LEGACY_FILL: `legacy_fill` };
491
491
  var O = { CENTER: `center`, TOP: `top`, TOP_LEFT: `top_left`, TOP_RIGHT: `top_right`, BOTTOM: `bottom`, BOTTOM_LEFT: `bottom_left`, BOTTOM_RIGHT: `bottom_right`, LEFT: `left`, RIGHT: `right` };
492
- var Ye = { [O.CENTER]: { x: 0.5, y: 0.5 }, [O.TOP_LEFT]: { x: 0, y: 0 }, [O.TOP_RIGHT]: { x: 1, y: 0 }, [O.TOP]: { x: 0.5, y: 0 }, [O.BOTTOM_LEFT]: { x: 0, y: 1 }, [O.BOTTOM_RIGHT]: { x: 1, y: 1 }, [O.BOTTOM]: { x: 0.5, y: 1 }, [O.RIGHT]: { x: 1, y: 0.5 }, [O.LEFT]: { x: 0, y: 0.5 } };
493
- var Xe = { center: `c`, top: `t`, top_left: `tl`, top_right: `tr`, bottom: `b`, bottom_left: `bl`, bottom_right: `br`, left: `l`, right: `r` };
494
- var Ze = { BG: `bg`, IMG: `img`, SVG: `svg` };
495
- var Qe = { AUTO: `auto`, CLASSIC: `classic`, SUPER: `super` };
496
- var $e = { classic: 1, super: 2 };
497
- var et = { radius: `0.66`, amount: `1.00`, threshold: `0.01` };
498
- var tt = 25e6;
499
- var nt = [1.5, 2, 4];
492
+ var Xe = { [O.CENTER]: { x: 0.5, y: 0.5 }, [O.TOP_LEFT]: { x: 0, y: 0 }, [O.TOP_RIGHT]: { x: 1, y: 0 }, [O.TOP]: { x: 0.5, y: 0 }, [O.BOTTOM_LEFT]: { x: 0, y: 1 }, [O.BOTTOM_RIGHT]: { x: 1, y: 1 }, [O.BOTTOM]: { x: 0.5, y: 1 }, [O.RIGHT]: { x: 1, y: 0.5 }, [O.LEFT]: { x: 0, y: 0.5 } };
493
+ var Ze = { center: `c`, top: `t`, top_left: `tl`, top_right: `tr`, bottom: `b`, bottom_left: `bl`, bottom_right: `br`, left: `l`, right: `r` };
494
+ var Qe = { BG: `bg`, IMG: `img`, SVG: `svg` };
495
+ var $e = { AUTO: `auto`, CLASSIC: `classic`, SUPER: `super` };
496
+ var et = { classic: 1, super: 2 };
497
+ var tt = { radius: `0.66`, amount: `1.00`, threshold: `0.01` };
498
+ var nt = 25e6;
499
+ var rt = [1.5, 2, 4];
500
500
  var k = { HIGH: { size: 196e4, quality: 90, maxUpscale: 1 }, MEDIUM: { size: 36e4, quality: 85, maxUpscale: 1 }, LOW: { size: 16e4, quality: 80, maxUpscale: 1.2 }, TINY: { size: 0, quality: 80, maxUpscale: 1.4 } };
501
501
  var A = { HIGH: `HIGH`, MEDIUM: `MEDIUM`, LOW: `LOW`, TINY: `TINY` };
502
502
  var j = { CONTRAST: `contrast`, BRIGHTNESS: `brightness`, SATURATION: `saturation`, HUE: `hue`, BLUR: `blur` };
503
503
  var M = { JPG: `jpg`, JPEG: `jpeg`, JPE: `jpe`, PNG: `png`, WEBP: `webp`, WIX_ICO_MP: `wix_ico_mp`, WIX_MP: `wix_mp`, GIF: `gif`, SVG: `svg`, AVIF: `avif`, UNRECOGNIZED: `unrecognized` };
504
- var rt = { AVIF: `AVIF`, PAVIF: `PAVIF` };
504
+ var it = { AVIF: `AVIF`, PAVIF: `PAVIF` };
505
505
  M.JPG, M.JPEG, M.JPE, M.PNG, M.GIF, M.WEBP;
506
506
  function N(e5, ...t2) {
507
507
  return function(...n2) {
@@ -512,131 +512,131 @@ function N(e5, ...t2) {
512
512
  }), i2.join(``);
513
513
  };
514
514
  }
515
- function P(e5) {
515
+ function at(e5) {
516
516
  return e5[e5.length - 1];
517
517
  }
518
- var it = [M.PNG, M.JPEG, M.JPG, M.JPE, M.WIX_ICO_MP, M.WIX_MP, M.WEBP, M.AVIF];
519
- var at = [M.JPEG, M.JPG, M.JPE];
520
- function ot(e5) {
521
- return it.includes(L(e5));
518
+ var ot = [M.PNG, M.JPEG, M.JPG, M.JPE, M.WIX_ICO_MP, M.WIX_MP, M.WEBP, M.AVIF];
519
+ var st = [M.JPEG, M.JPG, M.JPE];
520
+ function ct(e5) {
521
+ return ot.includes(I(e5));
522
522
  }
523
- function st(e5, t2, n2) {
524
- return n2 && t2 && !ht(t2.id) && Object.values(E).includes(e5);
523
+ function lt(e5, t2, n2) {
524
+ return n2 && t2 && !_t(t2.id) && Object.values(E).includes(e5);
525
525
  }
526
- function ct(e5, t2, n2) {
527
- return !(F(e5) || I(e5)) || !t2 || n2;
526
+ function ut(e5, t2, n2) {
527
+ return !(P(e5) || F(e5)) || !t2 || n2;
528
528
  }
529
- function lt(e5, t2, n2) {
530
- return pt(e5) ? !!(t2 || n2) : false;
529
+ function dt(e5, t2, n2) {
530
+ return ht(e5) ? !!(t2 || n2) : false;
531
531
  }
532
- function ut(e5, t2, n2, r2) {
533
- if (mt(e5) || !ct(e5, t2, n2)) return false;
534
- let i2 = ot(e5), a2 = lt(e5, n2, r2);
532
+ function ft(e5, t2, n2, r2) {
533
+ if (gt(e5) || !ut(e5, t2, n2)) return false;
534
+ let i2 = ct(e5), a2 = dt(e5, n2, r2);
535
535
  return i2 || a2;
536
536
  }
537
- function dt(e5) {
538
- return at.includes(L(e5));
537
+ function pt(e5) {
538
+ return st.includes(I(e5));
539
539
  }
540
- function ft(e5) {
541
- return L(e5) === M.PNG;
540
+ function mt(e5) {
541
+ return I(e5) === M.PNG;
542
542
  }
543
- function F(e5) {
544
- return L(e5) === M.WEBP;
543
+ function P(e5) {
544
+ return I(e5) === M.WEBP;
545
545
  }
546
- function pt(e5) {
547
- return L(e5) === M.GIF;
546
+ function ht(e5) {
547
+ return I(e5) === M.GIF;
548
548
  }
549
- function I(e5) {
550
- return L(e5) === M.AVIF;
549
+ function F(e5) {
550
+ return I(e5) === M.AVIF;
551
551
  }
552
- function mt(e5) {
552
+ function gt(e5) {
553
553
  return /(^https?)|(^data)|(^\/\/)/.test(e5);
554
554
  }
555
- function ht(e5) {
555
+ function _t(e5) {
556
556
  return !e5 || !e5.trim() || e5.toLowerCase() === `none`;
557
557
  }
558
- function gt(e5) {
558
+ function vt(e5) {
559
559
  return e5?.isSEOBot ?? false;
560
560
  }
561
- var _t = [`/`, `\\`, `?`, `<`, `>`, `|`, `\u201C`, `:`, `"`].map(encodeURIComponent);
562
- var vt = [`\\.`, `\\*`];
563
- var yt = `_`;
564
- function bt(e5, t2) {
565
- let n2 = /\/(.*?)$/, r2 = /\.([^.]*)$/, i2 = RegExp(`(${_t.concat(vt).join(`|`)})`, `g`);
561
+ var yt = [`/`, `\\`, `?`, `<`, `>`, `|`, `\u201C`, `:`, `"`].map(encodeURIComponent);
562
+ var bt = [`\\.`, `\\*`];
563
+ var xt = `_`;
564
+ function St(e5, t2) {
565
+ let n2 = /\/(.*?)$/, r2 = /\.([^.]*)$/, i2 = RegExp(`(${yt.concat(bt).join(`|`)})`, `g`);
566
566
  if (t2 && t2.length) {
567
567
  let e6 = t2, n3 = t2.match(r2);
568
- return n3 && it.includes(n3[1]) && (e6 = t2.replace(r2, ``)), encodeURIComponent(e6).replace(i2, yt);
568
+ return n3 && ot.includes(n3[1]) && (e6 = t2.replace(r2, ``)), encodeURIComponent(e6).replace(i2, xt);
569
569
  }
570
570
  let a2 = e5.match(n2);
571
571
  return (a2 ? a2[1] : e5).replace(r2, ``);
572
572
  }
573
- function xt(e5) {
574
- return dt(e5) ? M.JPG : ft(e5) ? M.PNG : F(e5) ? M.WEBP : pt(e5) ? M.GIF : I(e5) ? M.AVIF : M.UNRECOGNIZED;
573
+ function Ct(e5) {
574
+ return pt(e5) ? M.JPG : mt(e5) ? M.PNG : P(e5) ? M.WEBP : ht(e5) ? M.GIF : F(e5) ? M.AVIF : M.UNRECOGNIZED;
575
575
  }
576
- function L(e5) {
576
+ function I(e5) {
577
577
  return (/[.]([^.]+)$/.exec(e5) && /[.]([^.]+)$/.exec(e5)[1] || ``).toLowerCase();
578
578
  }
579
- function St(e5, t2, n2, r2) {
579
+ function wt(e5, t2, n2, r2) {
580
580
  return Math.min(n2 / e5, r2 / t2);
581
581
  }
582
- function Ct(e5, t2, n2, r2) {
582
+ function Tt(e5, t2, n2, r2) {
583
583
  return Math.max(n2 / e5, r2 / t2);
584
584
  }
585
- function wt(e5, t2, n2, r2, i2) {
585
+ function Et(e5, t2, n2, r2, i2) {
586
586
  let a2;
587
- return a2 = i2 === D.FILL ? Ct(e5, t2, n2, r2) : i2 === D.FIT ? St(e5, t2, n2, r2) : 1, a2;
587
+ return a2 = i2 === D.FILL ? Tt(e5, t2, n2, r2) : i2 === D.FIT ? wt(e5, t2, n2, r2) : 1, a2;
588
588
  }
589
- function Tt(e5, t2, n2, r2, i2) {
589
+ function Dt(e5, t2, n2, r2, i2) {
590
590
  let a2, o2 = n2, s2 = r2;
591
- if (a2 = wt(e5, t2, n2, r2, i2), i2 === D.FIT && (o2 = e5 * a2, s2 = t2 * a2), o2 && s2 && o2 * s2 > 25e6) {
592
- let n3 = Math.sqrt(tt / (o2 * s2));
593
- o2 *= n3, s2 *= n3, a2 = wt(e5, t2, o2, s2, i2);
591
+ if (a2 = Et(e5, t2, n2, r2, i2), i2 === D.FIT && (o2 = e5 * a2, s2 = t2 * a2), o2 && s2 && o2 * s2 > 25e6) {
592
+ let n3 = Math.sqrt(nt / (o2 * s2));
593
+ o2 *= n3, s2 *= n3, a2 = Et(e5, t2, o2, s2, i2);
594
594
  }
595
595
  return { scaleFactor: a2, width: o2, height: s2 };
596
596
  }
597
- function Et(e5, t2, n2, r2, i2, a2) {
597
+ function Ot(e5, t2, n2, r2, i2, a2) {
598
598
  e5 ||= r2.width, t2 ||= r2.height;
599
- let { scaleFactor: o2, width: s2, height: c2 } = Tt(e5, t2, r2.width * i2, r2.height * i2, n2);
600
- return Rt(e5, t2, s2, c2, a2, o2, n2);
599
+ let { scaleFactor: o2, width: s2, height: c2 } = Dt(e5, t2, r2.width * i2, r2.height * i2, n2);
600
+ return Bt(e5, t2, s2, c2, a2, o2, n2);
601
601
  }
602
- function Dt(e5 = O.CENTER) {
603
- return Ye[e5];
602
+ function kt(e5 = O.CENTER) {
603
+ return Xe[e5];
604
604
  }
605
- function Ot(e5, t2, n2, r2) {
606
- let i2 = Mt(n2) || Dt(r2);
605
+ function At(e5, t2, n2, r2) {
606
+ let i2 = Pt(n2) || kt(r2);
607
607
  return { x: Math.max(0, Math.min(e5.width - t2.width, i2.x * e5.width - t2.width / 2)), y: Math.max(0, Math.min(e5.height - t2.height, i2.y * e5.height - t2.height / 2)), width: Math.min(e5.width, t2.width), height: Math.min(e5.height, t2.height) };
608
608
  }
609
- function kt(e5, t2) {
609
+ function jt(e5, t2) {
610
610
  let n2 = Math.max(0, Math.min(e5.width, t2.x + t2.width) - Math.max(0, t2.x)), r2 = Math.max(0, Math.min(e5.height, t2.y + t2.height) - Math.max(0, t2.y));
611
611
  return n2 && r2 && (e5.width !== n2 || e5.height !== r2) ? { x: Math.max(0, t2.x), y: Math.max(0, t2.y), width: n2, height: r2 } : null;
612
612
  }
613
- function At(e5) {
613
+ function Mt(e5) {
614
614
  return Math.min(e5.pixelAspectRatio || 1, 2);
615
615
  }
616
- function jt(e5) {
617
- return e5.alignment && Xe[e5.alignment] || Xe[O.CENTER];
616
+ function Nt(e5) {
617
+ return e5.alignment && Ze[e5.alignment] || Ze[O.CENTER];
618
618
  }
619
- function Mt(e5) {
619
+ function Pt(e5) {
620
620
  let t2;
621
- return e5 && typeof e5.x == `number` && !isNaN(e5.x) && typeof e5.y == `number` && !isNaN(e5.y) && (t2 = { x: R(Math.max(0, Math.min(100, e5.x)) / 100, 2), y: R(Math.max(0, Math.min(100, e5.y)) / 100, 2) }), t2;
621
+ return e5 && typeof e5.x == `number` && !isNaN(e5.x) && typeof e5.y == `number` && !isNaN(e5.y) && (t2 = { x: L(Math.max(0, Math.min(100, e5.x)) / 100, 2), y: L(Math.max(0, Math.min(100, e5.y)) / 100, 2) }), t2;
622
622
  }
623
- function Nt(e5, t2) {
624
- return k[zt(e5, t2)].quality;
623
+ function Ft(e5, t2) {
624
+ return k[Vt(e5, t2)].quality;
625
625
  }
626
- function Pt(e5, t2) {
627
- return { optimizedScaleFactor: k[zt(e5, t2)].maxUpscale, upscaleMethodValue: $e.classic, forceUSM: false };
626
+ function It(e5, t2) {
627
+ return { optimizedScaleFactor: k[Vt(e5, t2)].maxUpscale, upscaleMethodValue: et.classic, forceUSM: false };
628
628
  }
629
- function Ft(e5, t2) {
630
- return { optimizedScaleFactor: k[zt(e5, t2)].maxUpscale, upscaleMethodValue: $e.classic, forceUSM: false };
629
+ function Lt(e5, t2) {
630
+ return { optimizedScaleFactor: k[Vt(e5, t2)].maxUpscale, upscaleMethodValue: et.classic, forceUSM: false };
631
631
  }
632
- function It(e5) {
633
- return { optimizedScaleFactor: P(nt), upscaleMethodValue: $e.super, forceUSM: !(nt.includes(e5) || e5 > P(nt)) };
632
+ function Rt(e5) {
633
+ return { optimizedScaleFactor: at(rt), upscaleMethodValue: et.super, forceUSM: !(rt.includes(e5) || e5 > at(rt)) };
634
634
  }
635
- function Lt(e5, t2, n2, r2) {
636
- return r2 === `auto` ? Ft(e5, t2) : r2 === `super` ? It(n2) : Pt(e5, t2);
635
+ function zt(e5, t2, n2, r2) {
636
+ return r2 === `auto` ? Lt(e5, t2) : r2 === `super` ? Rt(n2) : It(e5, t2);
637
637
  }
638
- function Rt(e5, t2, n2, r2, i2, a2, o2) {
639
- let { optimizedScaleFactor: s2, upscaleMethodValue: c2, forceUSM: l2 } = Lt(e5, t2, a2, i2), u2 = n2, d2 = r2;
638
+ function Bt(e5, t2, n2, r2, i2, a2, o2) {
639
+ let { optimizedScaleFactor: s2, upscaleMethodValue: c2, forceUSM: l2 } = zt(e5, t2, a2, i2), u2 = n2, d2 = r2;
640
640
  if (a2 <= s2) return { width: u2, height: d2, scaleFactor: a2, upscaleMethodValue: c2, forceUSM: l2, cssUpscaleNeeded: false };
641
641
  switch (o2) {
642
642
  case D.FILL:
@@ -647,41 +647,41 @@ function Rt(e5, t2, n2, r2, i2, a2, o2) {
647
647
  }
648
648
  return { width: u2, height: d2, scaleFactor: s2, upscaleMethodValue: c2, forceUSM: l2, cssUpscaleNeeded: true };
649
649
  }
650
- function zt(e5, t2) {
650
+ function Vt(e5, t2) {
651
651
  let n2 = e5 * t2;
652
652
  return n2 > k[A.HIGH].size ? A.HIGH : n2 > k[A.MEDIUM].size ? A.MEDIUM : n2 > k[A.LOW].size ? A.LOW : A.TINY;
653
653
  }
654
- function R(e5, t2) {
654
+ function L(e5, t2) {
655
655
  let n2 = 10 ** (t2 || 0);
656
656
  return (e5 * n2 / n2).toFixed(t2);
657
657
  }
658
- function Bt(e5) {
659
- return !e5 || !e5.upscaleMethod ? Qe.AUTO : Qe[e5.upscaleMethod.toUpperCase()] || Qe.AUTO;
658
+ function Ht(e5) {
659
+ return !e5 || !e5.upscaleMethod ? $e.AUTO : $e[e5.upscaleMethod.toUpperCase()] || $e.AUTO;
660
660
  }
661
- function Vt(e5, t2) {
662
- let n2 = F(e5) || I(e5);
663
- return L(e5) === M.GIF || n2 && t2;
661
+ function Ut(e5, t2) {
662
+ let n2 = P(e5) || F(e5);
663
+ return I(e5) === M.GIF || n2 && t2;
664
664
  }
665
- var Ht = { isMobile: false };
666
- var Ut = function(e5) {
667
- return Ht[e5];
665
+ var Wt = { isMobile: false };
666
+ var Gt = function(e5) {
667
+ return Wt[e5];
668
668
  };
669
- var Wt = function(e5, t2) {
670
- Ht[e5] = t2;
669
+ var Kt = function(e5, t2) {
670
+ Wt[e5] = t2;
671
671
  };
672
- function Gt() {
672
+ function qt() {
673
673
  if (typeof window < `u` && typeof navigator < `u`) {
674
674
  let e5 = window.matchMedia && window.matchMedia(`(max-width: 767px)`).matches, t2 = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
675
- Wt(`isMobile`, e5 && t2);
675
+ Kt(`isMobile`, e5 && t2);
676
676
  }
677
677
  }
678
678
  O.CENTER, O.TOP, O.TOP_LEFT, O.TOP_RIGHT, O.BOTTOM, O.BOTTOM_LEFT, O.BOTTOM_RIGHT, O.LEFT, O.RIGHT;
679
- function Kt() {
680
- return Ut(`isMobile`);
679
+ function Jt() {
680
+ return Gt(`isMobile`);
681
681
  }
682
- function qt(e5, t2, n2) {
682
+ function Yt(e5, t2, n2) {
683
683
  let r2;
684
- switch (t2.crop && (r2 = kt(t2, t2.crop), r2 && (e5.src.width = r2.width, e5.src.height = r2.height, e5.src.isCropped = true, e5.parts.push(Zt(r2)))), e5.fittingType) {
684
+ switch (t2.crop && (r2 = jt(t2, t2.crop), r2 && (e5.src.width = r2.width, e5.src.height = r2.height, e5.src.isCropped = true, e5.parts.push($t(r2)))), e5.fittingType) {
685
685
  case E.SCALE_TO_FIT:
686
686
  case E.LEGACY_FIT_WIDTH:
687
687
  case E.LEGACY_FIT_HEIGHT:
@@ -691,285 +691,285 @@ function qt(e5, t2, n2) {
691
691
  case E.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:
692
692
  case E.LEGACY_BG_FIT_AND_TILE_VERTICAL:
693
693
  case E.LEGACY_BG_NORMAL:
694
- e5.parts.push(Jt(e5, n2));
694
+ e5.parts.push(Xt(e5, n2));
695
695
  break;
696
696
  case E.SCALE_TO_FILL:
697
- e5.parts.push(Yt(e5, n2));
697
+ e5.parts.push(Zt(e5, n2));
698
698
  break;
699
699
  case E.STRETCH:
700
- e5.parts.push(Xt(e5, n2));
700
+ e5.parts.push(Qt(e5, n2));
701
701
  break;
702
702
  case E.TILE_HORIZONTAL:
703
703
  case E.TILE_VERTICAL:
704
704
  case E.TILE:
705
705
  case E.LEGACY_ORIGINAL_SIZE:
706
706
  case E.ORIGINAL_SIZE:
707
- r2 = Ot(e5.src, n2, e5.focalPoint, n2.alignment), e5.src.isCropped ? (Object.assign(e5.parts[0], r2), e5.src.width = r2.width, e5.src.height = r2.height) : e5.parts.push(Zt(r2));
707
+ r2 = At(e5.src, n2, e5.focalPoint, n2.alignment), e5.src.isCropped ? (Object.assign(e5.parts[0], r2), e5.src.width = r2.width, e5.src.height = r2.height) : e5.parts.push($t(r2));
708
708
  break;
709
709
  case E.LEGACY_STRIP_TILE_HORIZONTAL:
710
710
  case E.LEGACY_STRIP_TILE_VERTICAL:
711
711
  case E.LEGACY_STRIP_TILE:
712
712
  case E.LEGACY_STRIP_ORIGINAL_SIZE:
713
- e5.parts.push(en(n2));
713
+ e5.parts.push(nn(n2));
714
714
  break;
715
715
  case E.LEGACY_STRIP_SCALE_TO_FIT:
716
716
  case E.LEGACY_STRIP_FIT_AND_TILE:
717
- e5.parts.push(Qt(n2));
717
+ e5.parts.push(en(n2));
718
718
  break;
719
719
  case E.LEGACY_STRIP_SCALE_TO_FILL:
720
- e5.parts.push($t(n2));
720
+ e5.parts.push(tn(n2));
721
721
  }
722
722
  }
723
- function Jt(e5, t2) {
724
- let n2 = Et(e5.src.width, e5.src.height, D.FIT, t2, e5.devicePixelRatio, e5.upscaleMethod);
725
- return { transformType: !e5.src.width || !e5.src.height ? D.FIT : D.FILL, width: Math.round(n2.width), height: Math.round(n2.height), alignment: Xe.center, upscale: n2.scaleFactor > 1, forceUSM: n2.forceUSM, scaleFactor: n2.scaleFactor, cssUpscaleNeeded: n2.cssUpscaleNeeded, upscaleMethodValue: n2.upscaleMethodValue };
726
- }
727
- function Yt(e5, t2) {
728
- let n2 = Et(e5.src.width, e5.src.height, D.FILL, t2, e5.devicePixelRatio, e5.upscaleMethod), r2 = Mt(e5.focalPoint);
729
- return { transformType: r2 ? D.FILL_FOCAL : D.FILL, width: Math.round(n2.width), height: Math.round(n2.height), alignment: jt(t2), focalPointX: r2 && r2.x, focalPointY: r2 && r2.y, upscale: n2.scaleFactor > 1, forceUSM: n2.forceUSM, scaleFactor: n2.scaleFactor, cssUpscaleNeeded: n2.cssUpscaleNeeded, upscaleMethodValue: n2.upscaleMethodValue };
730
- }
731
723
  function Xt(e5, t2) {
732
- let n2 = wt(e5.src.width, e5.src.height, t2.width, t2.height, D.FILL), r2 = { ...t2 };
733
- return r2.width = e5.src.width * n2, r2.height = e5.src.height * n2, Jt(e5, r2);
724
+ let n2 = Ot(e5.src.width, e5.src.height, D.FIT, t2, e5.devicePixelRatio, e5.upscaleMethod);
725
+ return { transformType: !e5.src.width || !e5.src.height ? D.FIT : D.FILL, width: Math.round(n2.width), height: Math.round(n2.height), alignment: Ze.center, upscale: n2.scaleFactor > 1, forceUSM: n2.forceUSM, scaleFactor: n2.scaleFactor, cssUpscaleNeeded: n2.cssUpscaleNeeded, upscaleMethodValue: n2.upscaleMethodValue };
734
726
  }
735
- function Zt(e5) {
736
- return { transformType: D.CROP, x: Math.round(e5.x), y: Math.round(e5.y), width: Math.round(e5.width), height: Math.round(e5.height), upscale: false, forceUSM: false, scaleFactor: 1, cssUpscaleNeeded: false };
727
+ function Zt(e5, t2) {
728
+ let n2 = Ot(e5.src.width, e5.src.height, D.FILL, t2, e5.devicePixelRatio, e5.upscaleMethod), r2 = Pt(e5.focalPoint);
729
+ return { transformType: r2 ? D.FILL_FOCAL : D.FILL, width: Math.round(n2.width), height: Math.round(n2.height), alignment: Nt(t2), focalPointX: r2 && r2.x, focalPointY: r2 && r2.y, upscale: n2.scaleFactor > 1, forceUSM: n2.forceUSM, scaleFactor: n2.scaleFactor, cssUpscaleNeeded: n2.cssUpscaleNeeded, upscaleMethodValue: n2.upscaleMethodValue };
737
730
  }
738
- function Qt(e5) {
739
- return { transformType: D.FIT, width: Math.round(e5.width), height: Math.round(e5.height), upscale: false, forceUSM: true, scaleFactor: 1, cssUpscaleNeeded: false };
731
+ function Qt(e5, t2) {
732
+ let n2 = Et(e5.src.width, e5.src.height, t2.width, t2.height, D.FILL), r2 = { ...t2 };
733
+ return r2.width = e5.src.width * n2, r2.height = e5.src.height * n2, Xt(e5, r2);
740
734
  }
741
735
  function $t(e5) {
742
- return { transformType: D.LEGACY_FILL, width: Math.round(e5.width), height: Math.round(e5.height), alignment: jt(e5), upscale: false, forceUSM: true, scaleFactor: 1, cssUpscaleNeeded: false };
736
+ return { transformType: D.CROP, x: Math.round(e5.x), y: Math.round(e5.y), width: Math.round(e5.width), height: Math.round(e5.height), upscale: false, forceUSM: false, scaleFactor: 1, cssUpscaleNeeded: false };
743
737
  }
744
738
  function en(e5) {
745
- return { transformType: D.LEGACY_CROP, width: Math.round(e5.width), height: Math.round(e5.height), alignment: jt(e5), upscale: false, forceUSM: false, scaleFactor: 1, cssUpscaleNeeded: false };
739
+ return { transformType: D.FIT, width: Math.round(e5.width), height: Math.round(e5.height), upscale: false, forceUSM: true, scaleFactor: 1, cssUpscaleNeeded: false };
746
740
  }
747
- function tn(e5, t2) {
748
- t2 ||= {}, e5.quality = an(e5, t2), e5.progressive = rn(t2), e5.watermark = nn(t2), e5.autoEncode = t2.autoEncode ?? true, e5.encoding = t2?.encoding, e5.unsharpMask = sn(e5, t2), e5.filters = on(t2);
741
+ function tn(e5) {
742
+ return { transformType: D.LEGACY_FILL, width: Math.round(e5.width), height: Math.round(e5.height), alignment: Nt(e5), upscale: false, forceUSM: true, scaleFactor: 1, cssUpscaleNeeded: false };
749
743
  }
750
744
  function nn(e5) {
745
+ return { transformType: D.LEGACY_CROP, width: Math.round(e5.width), height: Math.round(e5.height), alignment: Nt(e5), upscale: false, forceUSM: false, scaleFactor: 1, cssUpscaleNeeded: false };
746
+ }
747
+ function rn(e5, t2) {
748
+ t2 ||= {}, e5.quality = sn(e5, t2), e5.progressive = on(t2), e5.watermark = an(t2), e5.autoEncode = t2.autoEncode ?? true, e5.encoding = t2?.encoding, e5.unsharpMask = ln(e5, t2), e5.filters = cn(t2);
749
+ }
750
+ function an(e5) {
751
751
  return e5.watermark;
752
752
  }
753
- function rn(e5) {
753
+ function on(e5) {
754
754
  return e5.progressive !== false;
755
755
  }
756
- function an(e5, t2) {
756
+ function sn(e5, t2) {
757
757
  let n2 = e5.fileType === M.PNG, r2 = e5.fileType === M.JPG, i2 = e5.fileType === M.WEBP, a2 = e5.fileType === M.AVIF;
758
758
  if (r2 || n2 || i2 || a2) {
759
- let r3 = P(e5.parts), i3 = Nt(r3.width, r3.height), a3 = t2.quality && t2.quality >= 5 && t2.quality <= 90 ? t2.quality : i3;
759
+ let r3 = at(e5.parts), i3 = Ft(r3.width, r3.height), a3 = t2.quality && t2.quality >= 5 && t2.quality <= 90 ? t2.quality : i3;
760
760
  return a3 = n2 ? a3 + 5 : a3, a3;
761
761
  }
762
762
  return 0;
763
763
  }
764
- function on(e5) {
764
+ function cn(e5) {
765
765
  let t2 = e5.filters || {}, n2 = {};
766
- return z(t2[j.CONTRAST], -100, 100) && (n2[j.CONTRAST] = t2[j.CONTRAST]), z(t2[j.BRIGHTNESS], -100, 100) && (n2[j.BRIGHTNESS] = t2[j.BRIGHTNESS]), z(t2[j.SATURATION], -100, 100) && (n2[j.SATURATION] = t2[j.SATURATION]), z(t2[j.HUE], -180, 180) && (n2[j.HUE] = t2[j.HUE]), z(t2[j.BLUR], 0, 100) && (n2[j.BLUR] = t2[j.BLUR]), n2;
766
+ return R(t2[j.CONTRAST], -100, 100) && (n2[j.CONTRAST] = t2[j.CONTRAST]), R(t2[j.BRIGHTNESS], -100, 100) && (n2[j.BRIGHTNESS] = t2[j.BRIGHTNESS]), R(t2[j.SATURATION], -100, 100) && (n2[j.SATURATION] = t2[j.SATURATION]), R(t2[j.HUE], -180, 180) && (n2[j.HUE] = t2[j.HUE]), R(t2[j.BLUR], 0, 100) && (n2[j.BLUR] = t2[j.BLUR]), n2;
767
767
  }
768
- function z(e5, t2, n2) {
768
+ function R(e5, t2, n2) {
769
769
  return typeof e5 == `number` && !isNaN(e5) && e5 !== 0 && e5 >= t2 && e5 <= n2;
770
770
  }
771
- function sn(e5, t2) {
772
- if (ln(t2.unsharpMask)) return { radius: R(t2.unsharpMask?.radius, 2), amount: R(t2.unsharpMask?.amount, 2), threshold: R(t2.unsharpMask?.threshold, 2) };
773
- if (!un(t2.unsharpMask) && cn(e5)) return et;
771
+ function ln(e5, t2) {
772
+ if (dn(t2.unsharpMask)) return { radius: L(t2.unsharpMask?.radius, 2), amount: L(t2.unsharpMask?.amount, 2), threshold: L(t2.unsharpMask?.threshold, 2) };
773
+ if (!fn(t2.unsharpMask) && un(e5)) return tt;
774
774
  }
775
- function cn(e5) {
776
- let t2 = P(e5.parts);
775
+ function un(e5) {
776
+ let t2 = at(e5.parts);
777
777
  return !(t2.scaleFactor >= 1) || t2.forceUSM || t2.transformType === D.FIT;
778
778
  }
779
- function ln(e5) {
779
+ function dn(e5) {
780
780
  e5 ||= {};
781
781
  let t2 = typeof e5.radius == `number` && !isNaN(e5.radius) && e5.radius >= 0.1 && e5.radius <= 500, n2 = typeof e5.amount == `number` && !isNaN(e5.amount) && e5.amount >= 0 && e5.amount <= 10, r2 = typeof e5.threshold == `number` && !isNaN(e5.threshold) && e5.threshold >= 0 && e5.threshold <= 255;
782
782
  return t2 && n2 && r2;
783
783
  }
784
- function un(e5) {
784
+ function fn(e5) {
785
785
  return e5 ||= {}, typeof e5.radius == `number` && !isNaN(e5.radius) && e5.radius === 0 && typeof e5.amount == `number` && !isNaN(e5.amount) && e5.amount === 0 && typeof e5.threshold == `number` && !isNaN(e5.threshold) && e5.threshold === 0;
786
786
  }
787
- function dn(e5, t2, n2, r2) {
788
- let i2 = gt(r2), a2 = xt(t2.id), o2 = bt(t2.id, t2.name), s2 = i2 ? 1 : At(n2), c2 = L(t2.id), l2 = c2, u2 = ut(t2.id, r2?.hasAnimation, r2?.allowAnimatedTransform, r2?.allowFullGIFTransformation), d2 = { fileName: o2, fileExtension: c2, fileType: a2, fittingType: e5, preferredExtension: l2, src: { id: t2.id, width: t2.width, height: t2.height, isCropped: false, isAnimated: Vt(t2.id, r2?.hasAnimation) }, focalPoint: { x: t2.focalPoint && t2.focalPoint.x, y: t2.focalPoint && t2.focalPoint.y }, parts: [], devicePixelRatio: s2, quality: 0, upscaleMethod: Bt(r2), progressive: true, watermark: ``, unsharpMask: {}, filters: {}, transformed: u2, allowFullGIFTransformation: r2?.allowFullGIFTransformation, isPlaceholderFlow: r2?.isPlaceholderFlow };
789
- return u2 && (qt(d2, t2, n2), tn(d2, r2)), d2;
787
+ function pn(e5, t2, n2, r2) {
788
+ let i2 = vt(r2), a2 = Ct(t2.id), o2 = St(t2.id, t2.name), s2 = i2 ? 1 : Mt(n2), c2 = I(t2.id), l2 = c2, u2 = ft(t2.id, r2?.hasAnimation, r2?.allowAnimatedTransform, r2?.allowFullGIFTransformation), d2 = { fileName: o2, fileExtension: c2, fileType: a2, fittingType: e5, preferredExtension: l2, src: { id: t2.id, width: t2.width, height: t2.height, isCropped: false, isAnimated: Ut(t2.id, r2?.hasAnimation) }, focalPoint: { x: t2.focalPoint && t2.focalPoint.x, y: t2.focalPoint && t2.focalPoint.y }, parts: [], devicePixelRatio: s2, quality: 0, upscaleMethod: Ht(r2), progressive: true, watermark: ``, unsharpMask: {}, filters: {}, transformed: u2, allowFullGIFTransformation: r2?.allowFullGIFTransformation, isPlaceholderFlow: r2?.isPlaceholderFlow };
789
+ return u2 && (Yt(d2, t2, n2), rn(d2, r2)), d2;
790
790
  }
791
- function fn(e5, t2, n2) {
792
- let r2 = { ...n2 }, i2 = Kt();
791
+ function mn(e5, t2, n2) {
792
+ let r2 = { ...n2 }, i2 = Jt();
793
793
  switch (e5) {
794
794
  case E.LEGACY_BG_FIT_AND_TILE:
795
795
  case E.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:
796
796
  case E.LEGACY_BG_FIT_AND_TILE_VERTICAL:
797
797
  case E.LEGACY_BG_NORMAL:
798
- let e6 = i2 ? qe : Ge, n3 = i2 ? Je : Ke;
798
+ let e6 = i2 ? Je : Ke, n3 = i2 ? Ye : qe;
799
799
  r2.width = Math.min(e6, t2.width), r2.height = Math.min(n3, Math.round(r2.width / (t2.width / t2.height))), r2.pixelAspectRatio = 1;
800
800
  }
801
801
  return r2;
802
802
  }
803
- var pn = N`fit/w_${`width`},h_${`height`}`;
804
- var mn = N`fill/w_${`width`},h_${`height`},al_${`alignment`}`;
805
- var hn = N`fill/w_${`width`},h_${`height`},fp_${`focalPointX`}_${`focalPointY`}`;
806
- var gn = N`crop/x_${`x`},y_${`y`},w_${`width`},h_${`height`}`;
807
- var _n = N`crop/w_${`width`},h_${`height`},al_${`alignment`}`;
808
- var vn = N`fill/w_${`width`},h_${`height`},al_${`alignment`}`;
809
- var yn = N`,lg_${`upscaleMethodValue`}`;
810
- var bn = N`,q_${`quality`}`;
811
- var xn = N`,quality_auto`;
812
- var Sn = N`,usm_${`radius`}_${`amount`}_${`threshold`}`;
813
- var Cn = N`,bl`;
814
- var wn = N`,wm_${`watermark`}`;
815
- var Tn = { [j.CONTRAST]: N`,con_${`contrast`}`, [j.BRIGHTNESS]: N`,br_${`brightness`}`, [j.SATURATION]: N`,sat_${`saturation`}`, [j.HUE]: N`,hue_${`hue`}`, [j.BLUR]: N`,blur_${`blur`}` };
816
- var En = N`,enc_auto`;
817
- var Dn = N`,enc_avif`;
818
- var On = N`,enc_pavif`;
819
- var kn = N`,pstr`;
820
- var An = N`,anm_all`;
821
- function jn(e5) {
803
+ var hn = N`fit/w_${`width`},h_${`height`}`;
804
+ var gn = N`fill/w_${`width`},h_${`height`},al_${`alignment`}`;
805
+ var _n = N`fill/w_${`width`},h_${`height`},fp_${`focalPointX`}_${`focalPointY`}`;
806
+ var vn = N`crop/x_${`x`},y_${`y`},w_${`width`},h_${`height`}`;
807
+ var yn = N`crop/w_${`width`},h_${`height`},al_${`alignment`}`;
808
+ var bn = N`fill/w_${`width`},h_${`height`},al_${`alignment`}`;
809
+ var z = N`,lg_${`upscaleMethodValue`}`;
810
+ var xn = N`,q_${`quality`}`;
811
+ var Sn = N`,quality_auto`;
812
+ var Cn = N`,usm_${`radius`}_${`amount`}_${`threshold`}`;
813
+ var wn = N`,bl`;
814
+ var Tn = N`,wm_${`watermark`}`;
815
+ var En = { [j.CONTRAST]: N`,con_${`contrast`}`, [j.BRIGHTNESS]: N`,br_${`brightness`}`, [j.SATURATION]: N`,sat_${`saturation`}`, [j.HUE]: N`,hue_${`hue`}`, [j.BLUR]: N`,blur_${`blur`}` };
816
+ var Dn = N`,enc_auto`;
817
+ var On = N`,enc_avif`;
818
+ var kn = N`,enc_pavif`;
819
+ var An = N`,pstr`;
820
+ var jn = N`,anm_all`;
821
+ function Mn(e5) {
822
822
  if (e5.parts.some(({ width: e6, height: t3 }) => !Number.isFinite(e6) || e6 <= 0 || !Number.isFinite(t3) || t3 <= 0)) return e5.src.id;
823
823
  let t2 = [];
824
824
  e5.parts.forEach((e6) => {
825
825
  switch (e6.transformType) {
826
826
  case D.CROP:
827
- t2.push(gn(e6));
827
+ t2.push(vn(e6));
828
828
  break;
829
829
  case D.LEGACY_CROP:
830
- t2.push(_n(e6));
830
+ t2.push(yn(e6));
831
831
  break;
832
832
  case D.LEGACY_FILL:
833
- let n3 = vn(e6);
834
- e6.upscale && (n3 += yn(e6)), t2.push(n3);
833
+ let n3 = bn(e6);
834
+ e6.upscale && (n3 += z(e6)), t2.push(n3);
835
835
  break;
836
836
  case D.FIT:
837
- let r2 = pn(e6);
838
- e6.upscale && (r2 += yn(e6)), t2.push(r2);
837
+ let r2 = hn(e6);
838
+ e6.upscale && (r2 += z(e6)), t2.push(r2);
839
839
  break;
840
840
  case D.FILL:
841
- let i2 = mn(e6);
842
- e6.upscale && (i2 += yn(e6)), t2.push(i2);
841
+ let i2 = gn(e6);
842
+ e6.upscale && (i2 += z(e6)), t2.push(i2);
843
843
  break;
844
844
  case D.FILL_FOCAL:
845
- let a2 = hn(e6);
846
- e6.upscale && (a2 += yn(e6)), t2.push(a2);
845
+ let a2 = _n(e6);
846
+ e6.upscale && (a2 += z(e6)), t2.push(a2);
847
847
  }
848
848
  });
849
849
  let n2 = t2.join(`/`);
850
- if (e5.quality && (n2 += bn(e5)), e5.unsharpMask && (n2 += Sn(e5.unsharpMask)), e5.progressive || (n2 += Cn(e5)), e5.watermark && (n2 += wn(e5)), e5.filters && (n2 += Object.keys(e5.filters).map((t3) => Tn[t3](e5.filters)).join(``)), e5.fileType !== M.GIF && (e5.encoding === rt.AVIF ? (n2 += Dn(e5), n2 += xn(e5)) : e5.encoding === rt.PAVIF ? (n2 += On(e5), n2 += xn(e5)) : e5.autoEncode && (n2 += En(e5))), e5.src?.isAnimated && e5.transformed) {
851
- let t3 = pt(e5.src.id), r2 = e5.isPlaceholderFlow === true, i2 = e5.allowFullGIFTransformation === true;
852
- r2 ? n2 += kn(e5) : t3 && i2 && (n2 += An(e5));
850
+ if (e5.quality && (n2 += xn(e5)), e5.unsharpMask && (n2 += Cn(e5.unsharpMask)), e5.progressive || (n2 += wn(e5)), e5.watermark && (n2 += Tn(e5)), e5.filters && (n2 += Object.keys(e5.filters).map((t3) => En[t3](e5.filters)).join(``)), e5.fileType !== M.GIF && (e5.encoding === it.AVIF ? (n2 += On(e5), n2 += Sn(e5)) : e5.encoding === it.PAVIF ? (n2 += kn(e5), n2 += Sn(e5)) : e5.autoEncode && (n2 += Dn(e5))), e5.src?.isAnimated && e5.transformed) {
851
+ let t3 = ht(e5.src.id), r2 = e5.isPlaceholderFlow === true, i2 = e5.allowFullGIFTransformation === true;
852
+ r2 ? n2 += An(e5) : t3 && i2 && (n2 += jn(e5));
853
853
  }
854
854
  return `${e5.src.id}/v1/${n2}/${e5.fileName}.${e5.preferredExtension}`;
855
855
  }
856
- function Mn(e5, t2, n2, r2 = {}, i2) {
857
- if (ut(t2.id, r2?.hasAnimation, r2?.allowAnimatedTransform, r2?.allowFullGIFTransformation)) {
858
- if ((F(t2.id) || I(t2.id)) && !r2.allowWebpAvifTransforms) {
856
+ function Nn(e5, t2, n2, r2 = {}, i2) {
857
+ if (ft(t2.id, r2?.hasAnimation, r2?.allowAnimatedTransform, r2?.allowFullGIFTransformation)) {
858
+ if ((P(t2.id) || F(t2.id)) && !r2.allowWebpAvifTransforms) {
859
859
  let { alignment: a2, ...o2 } = n2;
860
- t2.focalPoint = { x: void 0, y: void 0 }, delete t2?.crop, i2 = dn(e5, t2, o2, r2);
861
- } else i2 ||= dn(e5, t2, n2, r2);
862
- return jn(i2);
860
+ t2.focalPoint = { x: void 0, y: void 0 }, delete t2?.crop, i2 = pn(e5, t2, o2, r2);
861
+ } else i2 ||= pn(e5, t2, n2, r2);
862
+ return Mn(i2);
863
863
  }
864
864
  return t2.id;
865
865
  }
866
- var Nn = { [O.CENTER]: `50% 50%`, [O.TOP_LEFT]: `0% 0%`, [O.TOP_RIGHT]: `100% 0%`, [O.TOP]: `50% 0%`, [O.BOTTOM_LEFT]: `0% 100%`, [O.BOTTOM_RIGHT]: `100% 100%`, [O.BOTTOM]: `50% 100%`, [O.RIGHT]: `100% 50%`, [O.LEFT]: `0% 50%` };
867
- Object.entries(Nn).reduce((e5, [t2, n2]) => (e5[n2] = t2, e5), {}), E.TILE, E.TILE_HORIZONTAL, E.TILE_VERTICAL, E.LEGACY_BG_FIT_AND_TILE, E.LEGACY_BG_FIT_AND_TILE_HORIZONTAL, E.LEGACY_BG_FIT_AND_TILE_VERTICAL, E.LEGACY_ORIGINAL_SIZE, E.ORIGINAL_SIZE, E.LEGACY_BG_NORMAL;
868
- function Pn(e5, t2, n2, r2) {
869
- if (st(e5, t2, n2)) {
870
- let i2 = fn(e5, t2, n2), a2 = dn(e5, t2, i2, r2);
871
- return { uri: Mn(e5, t2, i2, r2 || {}, a2) };
866
+ var Pn = { [O.CENTER]: `50% 50%`, [O.TOP_LEFT]: `0% 0%`, [O.TOP_RIGHT]: `100% 0%`, [O.TOP]: `50% 0%`, [O.BOTTOM_LEFT]: `0% 100%`, [O.BOTTOM_RIGHT]: `100% 100%`, [O.BOTTOM]: `50% 100%`, [O.RIGHT]: `100% 50%`, [O.LEFT]: `0% 50%` };
867
+ Object.entries(Pn).reduce((e5, [t2, n2]) => (e5[n2] = t2, e5), {}), E.TILE, E.TILE_HORIZONTAL, E.TILE_VERTICAL, E.LEGACY_BG_FIT_AND_TILE, E.LEGACY_BG_FIT_AND_TILE_HORIZONTAL, E.LEGACY_BG_FIT_AND_TILE_VERTICAL, E.LEGACY_ORIGINAL_SIZE, E.ORIGINAL_SIZE, E.LEGACY_BG_NORMAL;
868
+ function Fn(e5, t2, n2, r2) {
869
+ if (lt(e5, t2, n2)) {
870
+ let i2 = mn(e5, t2, n2), a2 = pn(e5, t2, i2, r2);
871
+ return { uri: Nn(e5, t2, i2, r2 || {}, a2) };
872
872
  }
873
873
  return { uri: `` };
874
874
  }
875
- var Fn = `https://static.wixstatic.com/`;
876
- var In = `https://static.wixstatic.com/media/`;
877
- var Ln = /^media\//i;
878
- var Rn = typeof window < `u` ? window.devicePixelRatio : 1;
879
- var zn = (e5) => Ln.test(e5) ? `${Fn}${e5}` : `${In}${e5}`;
880
- var Bn = (e5, t2) => {
875
+ var In = `https://static.wixstatic.com/`;
876
+ var Ln = `https://static.wixstatic.com/media/`;
877
+ var Rn = /^media\//i;
878
+ var zn = typeof window < `u` ? window.devicePixelRatio : 1;
879
+ var Bn = (e5) => Rn.test(e5) ? `${In}${e5}` : `${Ln}${e5}`;
880
+ var Vn = (e5, t2) => {
881
881
  let n2 = t2 && t2.baseHostURL;
882
- return n2 ? `${n2}${e5}` : zn(e5);
882
+ return n2 ? `${n2}${e5}` : Bn(e5);
883
883
  };
884
- function Vn(e5, t2, n2, r2, i2, a2) {
885
- return Bn(Pn(E.SCALE_TO_FIT, { id: e5, width: t2, height: n2, name: a2 && a2.name }, { width: r2, height: i2, htmlTag: Ze.IMG, alignment: O.CENTER, pixelAspectRatio: a2?.devicePixelRatio ?? Rn }, a2).uri, a2);
886
- }
887
884
  function Hn(e5, t2, n2, r2, i2, a2) {
888
- return Bn(Pn(E.SCALE_TO_FILL, { id: e5, width: t2, height: n2, name: a2 && a2.name, focalPoint: { x: a2 && a2.focalPoint && a2.focalPoint.x, y: a2 && a2.focalPoint && a2.focalPoint.y } }, { width: r2, height: i2, htmlTag: Ze.IMG, alignment: O.CENTER, pixelAspectRatio: a2?.devicePixelRatio ?? Rn }, a2).uri, a2);
889
- }
890
- function Un(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2) {
891
- return Bn(Pn(E.SCALE_TO_FILL, { id: e5, width: t2, height: n2, name: l2 && l2.name, crop: { x: r2, y: i2, width: a2, height: o2 } }, { width: s2, height: c2, htmlTag: Ze.IMG, alignment: O.CENTER, pixelAspectRatio: l2?.devicePixelRatio ?? Rn }, l2).uri, l2);
892
- }
893
- Gt(), Gt();
894
- var Wn = { getScaleToFitImageURL: Vn, getScaleToFillImageURL: Hn, getCropImageURL: Un };
895
- var Gn = `wix:`;
896
- var Kn = `image`;
897
- var qn = `video`;
898
- var Jn = `audio`;
899
- var Yn = `document`;
900
- var Xn = `https://static.wixstatic.com/media/`;
901
- var Zn = `https://static.wixstatic.com/shapes/`;
902
- var Qn = `https://video.wixstatic.com/video/`;
903
- var $n = `https://static.wixstatic.com/mp3/`;
904
- var er = `https://d945e594-8657-47e2-9cd9-e9033c3d8da0.usrfiles.com/`;
905
- function tr(e5, t2, n2, r2) {
906
- let i2 = ir(e5);
907
- return Wn.getScaleToFillImageURL(i2.id, i2.height, i2.width, t2, n2, r2);
908
- }
885
+ return Vn(Fn(E.SCALE_TO_FIT, { id: e5, width: t2, height: n2, name: a2 && a2.name }, { width: r2, height: i2, htmlTag: Qe.IMG, alignment: O.CENTER, pixelAspectRatio: a2?.devicePixelRatio ?? zn }, a2).uri, a2);
886
+ }
887
+ function Un(e5, t2, n2, r2, i2, a2) {
888
+ return Vn(Fn(E.SCALE_TO_FILL, { id: e5, width: t2, height: n2, name: a2 && a2.name, focalPoint: { x: a2 && a2.focalPoint && a2.focalPoint.x, y: a2 && a2.focalPoint && a2.focalPoint.y } }, { width: r2, height: i2, htmlTag: Qe.IMG, alignment: O.CENTER, pixelAspectRatio: a2?.devicePixelRatio ?? zn }, a2).uri, a2);
889
+ }
890
+ function Wn(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2) {
891
+ return Vn(Fn(E.SCALE_TO_FILL, { id: e5, width: t2, height: n2, name: l2 && l2.name, crop: { x: r2, y: i2, width: a2, height: o2 } }, { width: s2, height: c2, htmlTag: Qe.IMG, alignment: O.CENTER, pixelAspectRatio: l2?.devicePixelRatio ?? zn }, l2).uri, l2);
892
+ }
893
+ qt(), qt();
894
+ var Gn = { getScaleToFitImageURL: Hn, getScaleToFillImageURL: Un, getCropImageURL: Wn };
895
+ var Kn = `wix:`;
896
+ var qn = `image`;
897
+ var Jn = `video`;
898
+ var Yn = `audio`;
899
+ var Xn = `document`;
900
+ var Zn = `https://static.wixstatic.com/media/`;
901
+ var Qn = `https://static.wixstatic.com/shapes/`;
902
+ var $n = `https://video.wixstatic.com/video/`;
903
+ var er = `https://static.wixstatic.com/mp3/`;
904
+ var tr = `https://d945e594-8657-47e2-9cd9-e9033c3d8da0.usrfiles.com/`;
909
905
  function nr(e5, t2, n2, r2) {
910
- let i2 = ir(e5);
911
- return Wn.getScaleToFitImageURL(i2.id, i2.height, i2.width, t2, n2, r2);
906
+ let i2 = ar(e5);
907
+ return Gn.getScaleToFillImageURL(i2.id, i2.height, i2.width, t2, n2, r2);
912
908
  }
913
- function rr(e5, t2, n2, r2, i2, a2, o2, s2) {
914
- let c2 = ir(e5);
915
- return Wn.getCropImageURL(c2.id, c2.height, c2.width, t2, n2, r2, i2, a2, o2, s2);
909
+ function rr(e5, t2, n2, r2) {
910
+ let i2 = ar(e5);
911
+ return Gn.getScaleToFitImageURL(i2.id, i2.height, i2.width, t2, n2, r2);
916
912
  }
917
- function ir(e5) {
918
- return or(e5, Xn);
913
+ function ir(e5, t2, n2, r2, i2, a2, o2, s2) {
914
+ let c2 = ar(e5);
915
+ return Gn.getCropImageURL(c2.id, c2.height, c2.width, t2, n2, r2, i2, a2, o2, s2);
919
916
  }
920
917
  function ar(e5) {
921
- return or(e5, Zn);
918
+ return sr(e5, Zn);
922
919
  }
923
- function or(e5, t2 = Xn) {
920
+ function or(e5) {
921
+ return sr(e5, Qn);
922
+ }
923
+ function sr(e5, t2 = Zn) {
924
924
  let n2, r2, i2, a2;
925
925
  if (e5.startsWith(t2)) n2 = e5.split(t2).pop().split(`/`)[0], a2 = e5.split(`/w_`).pop().split(`,`)[0], i2 = e5.split(`,h_`).pop().split(`,`)[0];
926
926
  else {
927
- let t3 = dr(e5, Kn), { hash: o3, pathname: s3 } = new URL(t3), c2 = new URLSearchParams(o3.replace(`#`, ``));
928
- i2 = c2.get(`originHeight`), a2 = c2.get(`originWidth`), [n2, r2] = s3.replace(`${Kn}://v1/`, ``).split(`/`);
927
+ let t3 = fr(e5, qn), { hash: o3, pathname: s3 } = new URL(t3), c2 = new URLSearchParams(o3.replace(`#`, ``));
928
+ i2 = c2.get(`originHeight`), a2 = c2.get(`originWidth`), [n2, r2] = s3.replace(`${qn}://v1/`, ``).split(`/`);
929
929
  }
930
- let o2 = ur(r2), s2 = { id: n2, url: `${t2}${n2}`, height: Number(i2), width: Number(a2) };
930
+ let o2 = dr(r2), s2 = { id: n2, url: `${t2}${n2}`, height: Number(i2), width: Number(a2) };
931
931
  return o2 ? { ...s2, altText: o2, filename: o2 } : s2;
932
932
  }
933
- function sr(e5, t2) {
933
+ function cr(e5, t2) {
934
934
  let n2, r2, i2, a2, o2 = ``;
935
- if (e5.startsWith(Qn)) n2 = e5.split(Qn).pop().split(`/`)[0], r2 = `${n2}.jpg`, i2 = `50`, a2 = `50`;
935
+ if (e5.startsWith($n)) n2 = e5.split($n).pop().split(`/`)[0], r2 = `${n2}.jpg`, i2 = `50`, a2 = `50`;
936
936
  else {
937
- let t3 = dr(e5, qn), { pathname: s3, hash: c2 } = new URL(t3), l2 = new URLSearchParams(c2.replace(`#`, ``)), [u2, d2] = s3.replace(`${qn}://v1/`, ``).split(`/`);
938
- n2 = u2, r2 = l2.get(`posterUri`) || `${n2}.jpg`, i2 = l2.get(`posterWidth`) || `50`, a2 = l2.get(`posterHeight`) || `50`, o2 = ur(d2);
937
+ let t3 = fr(e5, Jn), { pathname: s3, hash: c2 } = new URL(t3), l2 = new URLSearchParams(c2.replace(`#`, ``)), [u2, d2] = s3.replace(`${Jn}://v1/`, ``).split(`/`);
938
+ n2 = u2, r2 = l2.get(`posterUri`) || `${n2}.jpg`, i2 = l2.get(`posterWidth`) || `50`, a2 = l2.get(`posterHeight`) || `50`, o2 = dr(d2);
939
939
  }
940
- let s2 = { id: n2, url: `${Qn}${n2}/${t2 ? `${t2}/mp4/file.mp4` : `file`}`, thumbnail: `${Gn}${Kn}://v1/${r2}#originWidth=${i2}&originHeight=${a2}` };
940
+ let s2 = { id: n2, url: `${$n}${n2}/${t2 ? `${t2}/mp4/file.mp4` : `file`}`, thumbnail: `${Kn}${qn}://v1/${r2}#originWidth=${i2}&originHeight=${a2}` };
941
941
  return o2 ? { ...s2, filename: o2 } : s2;
942
942
  }
943
- function cr(e5) {
944
- let t2 = dr(e5, Jn), { pathname: n2, hash: r2 } = new URL(t2), [i2, a2] = n2.replace(`${Jn}://v1/`, ``).split(`/`), o2 = ur(a2), s2 = new URLSearchParams(r2.replace(`#`, ``)), c2 = { id: i2, duration: Number(s2.get(`duration`) || ``), url: `${$n}${i2}` };
943
+ function lr(e5) {
944
+ let t2 = fr(e5, Yn), { pathname: n2, hash: r2 } = new URL(t2), [i2, a2] = n2.replace(`${Yn}://v1/`, ``).split(`/`), o2 = dr(a2), s2 = new URLSearchParams(r2.replace(`#`, ``)), c2 = { id: i2, duration: Number(s2.get(`duration`) || ``), url: `${er}${i2}` };
945
945
  return o2 ? { ...c2, filename: o2 } : c2;
946
946
  }
947
- function lr(e5) {
948
- let t2 = dr(e5, Yn), { pathname: n2 } = new URL(t2), r2 = n2.replace(`${Yn}://v1/`, ``).split(`/`), i2 = r2[0] === `ugd` || r2[0] === `archives` ? r2.shift() : `ugd`, [a2, o2] = r2, s2 = ur(o2), c2 = { id: a2, url: `${er}${i2}/${a2}` };
947
+ function ur(e5) {
948
+ let t2 = fr(e5, Xn), { pathname: n2 } = new URL(t2), r2 = n2.replace(`${Xn}://v1/`, ``).split(`/`), i2 = r2[0] === `ugd` || r2[0] === `archives` ? r2.shift() : `ugd`, [a2, o2] = r2, s2 = dr(o2), c2 = { id: a2, url: `${tr}${i2}/${a2}` };
949
949
  return s2 ? { ...c2, filename: s2 } : c2;
950
950
  }
951
- function ur(e5) {
951
+ function dr(e5) {
952
952
  return e5 && decodeURIComponent(e5);
953
953
  }
954
- function dr(e5, t2) {
954
+ function fr(e5, t2) {
955
955
  let { protocol: n2 } = new URL(e5);
956
- return n2 === `${t2}:` ? `${Gn}${e5}` : e5;
956
+ return n2 === `${t2}:` ? `${Kn}${e5}` : e5;
957
957
  }
958
- var fr;
958
+ var pr;
959
959
  (function(e5) {
960
960
  e5.MOBILE = `360p`, e5.LOW = `480p`, e5.MID = `720p`, e5.HIGH = `1080p`;
961
- })(fr ||= {});
962
- var pr = { getCroppedImageUrl: rr, getScaledToFillImageUrl: tr, getScaledToFitImageUrl: nr, getImageUrl: ir, getVideoUrl: sr, getAudioUrl: cr, getDocumentUrl: lr, getShapeUrl: ar };
963
- var mr = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
964
- var hr = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
965
- function gr(e5, t2) {
961
+ })(pr ||= {});
962
+ var mr = { getCroppedImageUrl: ir, getScaledToFillImageUrl: nr, getScaledToFitImageUrl: rr, getImageUrl: ar, getVideoUrl: cr, getAudioUrl: lr, getDocumentUrl: ur, getShapeUrl: or };
963
+ var hr = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
964
+ var gr = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
965
+ function _r(e5, t2) {
966
966
  return e5?.split(`.`).map((e6) => t2?.[e6] ?? e6).join(`.`);
967
967
  }
968
- var _r = `sort.fieldName`;
969
- function vr(e5, t2, n2) {
970
- return (e5 === _r || e5.endsWith(`.${_r}`)) && typeof t2 == `string` ? gr(t2, n2) : t2;
971
- }
968
+ var vr = `sort.fieldName`;
972
969
  function yr(e5, t2, n2) {
970
+ return (e5 === vr || e5.endsWith(`.${vr}`)) && typeof t2 == `string` ? _r(t2, n2) : t2;
971
+ }
972
+ function br(e5, t2, n2) {
973
973
  let r2 = (e6) => n2.includes(e6), i2 = (e6, n3) => {
974
974
  if (Array.isArray(e6)) e6.forEach((e7) => {
975
975
  i2(e7, n3);
@@ -979,157 +979,157 @@ function yr(e5, t2, n2) {
979
979
  Object.keys(a2).forEach((e7) => {
980
980
  let o2 = n3 === `` ? e7 : `${n3}.${e7}`;
981
981
  if (r2(o2)) return;
982
- let s2 = br(e7, t2);
983
- s2 !== e7 && !(s2 in a2) && (a2[s2] = a2[e7], delete a2[e7]), a2[s2] = vr(o2, a2[s2], t2), i2(a2[s2], o2);
982
+ let s2 = xr(e7, t2);
983
+ s2 !== e7 && !(s2 in a2) && (a2[s2] = a2[e7], delete a2[e7]), a2[s2] = yr(o2, a2[s2], t2), i2(a2[s2], o2);
984
984
  });
985
985
  }
986
986
  };
987
987
  return i2(e5, ``), e5;
988
988
  }
989
- function br(e5, t2) {
989
+ function xr(e5, t2) {
990
990
  let n2;
991
991
  return n2 = e5.includes(`.`) ? e5.split(`.`).map((e6) => t2[e6] ?? e6).join(`.`) : t2[e5] ?? e5, n2;
992
992
  }
993
- function xr(e5, t2 = []) {
994
- return yr(e5, mr, t2);
995
- }
996
993
  function Sr(e5, t2 = []) {
997
- return yr(e5, hr, t2);
994
+ return br(e5, hr, t2);
998
995
  }
999
- function Cr(e5) {
996
+ function Cr(e5, t2 = []) {
997
+ return br(e5, gr, t2);
998
+ }
999
+ function wr(e5) {
1000
1000
  return e5 ? new Date(e5) : void 0;
1001
1001
  }
1002
- var wr = /* @__PURE__ */ new WeakMap();
1003
- function Tr() {
1002
+ var Tr = /* @__PURE__ */ new WeakMap();
1003
+ function Er() {
1004
1004
  return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
1005
1005
  }
1006
- function Er(e5, t2) {
1006
+ function Dr(e5, t2) {
1007
1007
  let n2 = e5.get(t2);
1008
- return n2 || (n2 = Tr(), e5.set(t2, n2)), n2;
1008
+ return n2 || (n2 = Er(), e5.set(t2, n2)), n2;
1009
1009
  }
1010
- function Dr(e5, t2) {
1011
- return t2 === `*` ? (e5.anyField ??= Tr(), e5.anyField) : t2.endsWith(`{}`) ? (e5.mapFields ??= /* @__PURE__ */ new Map(), Er(e5.mapFields, t2.slice(0, -2))) : (e5.fields ??= /* @__PURE__ */ new Map(), Er(e5.fields, t2));
1010
+ function Or(e5, t2) {
1011
+ return t2 === `*` ? (e5.anyField ??= Er(), e5.anyField) : t2.endsWith(`{}`) ? (e5.mapFields ??= /* @__PURE__ */ new Map(), Dr(e5.mapFields, t2.slice(0, -2))) : (e5.fields ??= /* @__PURE__ */ new Map(), Dr(e5.fields, t2));
1012
1012
  }
1013
- function Or(e5) {
1014
- let t2 = Tr();
1013
+ function kr(e5) {
1014
+ let t2 = Er();
1015
1015
  for (let n2 of e5) {
1016
- let e6 = n2.path.split(`.`).reduce(Dr, t2);
1016
+ let e6 = n2.path.split(`.`).reduce(Or, t2);
1017
1017
  e6.leaves ??= [], e6.leaves.push(n2);
1018
1018
  }
1019
1019
  return t2;
1020
1020
  }
1021
- function kr(e5) {
1022
- let t2 = wr.get(e5);
1023
- return t2 || (t2 = Or(e5), wr.set(e5, t2)), t2;
1024
- }
1025
1021
  function Ar(e5) {
1026
- return typeof e5 == `object` && !!e5;
1022
+ let t2 = Tr.get(e5);
1023
+ return t2 || (t2 = kr(e5), Tr.set(e5, t2)), t2;
1027
1024
  }
1028
- function jr(e5, { isRepeated: t2, isMap: n2 }, r2) {
1029
- return t2 ? Array.isArray(e5) ? e5.map(r2) : e5 : n2 ? Ar(e5) ? Object.fromEntries(Object.entries(e5).map(([e6, t3]) => [e6, r2(t3)])) : e5 : r2(e5);
1025
+ function jr(e5) {
1026
+ return typeof e5 == `object` && !!e5;
1030
1027
  }
1031
- function Mr(e5, t2, n2) {
1032
- Ar(e5) && Fr(e5, t2, n2);
1028
+ function Mr(e5, { isRepeated: t2, isMap: n2 }, r2) {
1029
+ return t2 ? Array.isArray(e5) ? e5.map(r2) : e5 : n2 ? jr(e5) ? Object.fromEntries(Object.entries(e5).map(([e6, t3]) => [e6, r2(t3)])) : e5 : r2(e5);
1033
1030
  }
1034
1031
  function Nr(e5, t2, n2) {
1032
+ jr(e5) && Ir(e5, t2, n2);
1033
+ }
1034
+ function Pr(e5, t2, n2) {
1035
1035
  for (let [r2, i2] of t2) {
1036
1036
  if (!(r2 in e5)) continue;
1037
- if (i2.leaves) for (let t4 of i2.leaves) e5[r2] = jr(e5[r2], t4, n2);
1037
+ if (i2.leaves) for (let t4 of i2.leaves) e5[r2] = Mr(e5[r2], t4, n2);
1038
1038
  let t3 = e5[r2];
1039
- Array.isArray(t3) ? t3.forEach((e6) => Mr(e6, i2, n2)) : Mr(t3, i2, n2);
1039
+ Array.isArray(t3) ? t3.forEach((e6) => Nr(e6, i2, n2)) : Nr(t3, i2, n2);
1040
1040
  }
1041
1041
  }
1042
- function Pr(e5, t2, n2) {
1042
+ function Fr(e5, t2, n2) {
1043
1043
  for (let [r2, i2] of t2) {
1044
1044
  let t3 = e5[r2];
1045
- Ar(t3) && Object.values(t3).forEach((e6) => Mr(e6, i2, n2));
1045
+ jr(t3) && Object.values(t3).forEach((e6) => Nr(e6, i2, n2));
1046
1046
  }
1047
1047
  }
1048
- function Fr(e5, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
1049
- t2 && Nr(e5, t2, i2), n2 && Pr(e5, n2, i2), r2 && Object.values(e5).forEach((e6) => Mr(e6, r2, i2));
1048
+ function Ir(e5, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
1049
+ t2 && Pr(e5, t2, i2), n2 && Fr(e5, n2, i2), r2 && Object.values(e5).forEach((e6) => Nr(e6, r2, i2));
1050
1050
  }
1051
- function Ir(e5, t2) {
1052
- if (!Ar(e5)) return e5;
1053
- for (let { paths: n2, transformFn: r2 } of t2) Fr(e5, kr(n2), r2);
1051
+ function Lr(e5, t2) {
1052
+ if (!jr(e5)) return e5;
1053
+ for (let { paths: n2, transformFn: r2 } of t2) Ir(e5, Ar(n2), r2);
1054
1054
  return e5;
1055
1055
  }
1056
- function Lr(e5) {
1057
- return Hr(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
1056
+ function Rr(e5) {
1057
+ return Ur(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
1058
1058
  }
1059
- var Rr = /([\p{Ll}\d])(\p{Lu})/gu;
1060
- var zr = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
1061
- var Br = `$1\0$2`;
1062
- var Vr = /[^\p{L}\d]+/giu;
1063
- function Hr(e5) {
1059
+ var zr = /([\p{Ll}\d])(\p{Lu})/gu;
1060
+ var Br = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
1061
+ var Vr = `$1\0$2`;
1062
+ var Hr = /[^\p{L}\d]+/giu;
1063
+ function Ur(e5) {
1064
1064
  let t2 = e5.trim();
1065
- t2 = t2.replace(Rr, Br).replace(zr, Br), t2 = t2.replace(Vr, `\0`);
1065
+ t2 = t2.replace(zr, Vr).replace(Br, Vr), t2 = t2.replace(Hr, `\0`);
1066
1066
  let n2 = 0, r2 = t2.length;
1067
1067
  for (; t2.charAt(n2) === `\0`; ) n2++;
1068
1068
  if (n2 === r2) return [];
1069
1069
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
1070
1070
  return t2.slice(n2, r2).split(/\0/g);
1071
1071
  }
1072
- var Ur = (e5) => `validationError` in (e5.response?.data?.details ?? {});
1073
- var Wr = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
1074
- var Gr = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
1075
- function Kr(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
1072
+ var Wr = (e5) => `validationError` in (e5.response?.data?.details ?? {});
1073
+ var Gr = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
1074
+ var Kr = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
1075
+ function qr(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
1076
1076
  if (typeof e5 != `object` || !e5) throw e5;
1077
- if (Ur(e5)) return qr(e5, t2, n2);
1078
- if (Wr(e5)) return Yr(e5);
1079
- if (Gr(e5)) {
1080
- let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: Lr(n3), data: {} }, requestId: e5.requestId };
1081
- return Jr(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
1077
+ if (Wr(e5)) return Jr(e5, t2, n2);
1078
+ if (Gr(e5)) return Xr(e5);
1079
+ if (Kr(e5)) {
1080
+ let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: Rr(n3), data: {} }, requestId: e5.requestId };
1081
+ return Yr(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
1082
1082
  }
1083
- return Xr(e5);
1083
+ return Zr(e5);
1084
1084
  }
1085
- var qr = (e5, t2, n2) => {
1086
- let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Zr(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 };
1087
- return Jr(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
1085
+ var Jr = (e5, t2, n2) => {
1086
+ let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Qr(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 };
1087
+ return Yr(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
1088
1088
  };
1089
- var Jr = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
1090
- var Yr = (e5) => {
1091
- 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 ?? Lr(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 };
1092
- return Jr(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
1089
+ var Yr = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
1090
+ var Xr = (e5) => {
1091
+ 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 ?? Rr(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 };
1092
+ return Yr(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
1093
1093
  };
1094
- var Xr = (e5) => Jr(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: Lr(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
1095
- var Zr = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
1094
+ var Zr = (e5) => Yr(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: Rr(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
1095
+ var Qr = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
1096
1096
  let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
1097
1097
  return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
1098
1098
  let r3 = t2[e6.field];
1099
- if (r3) return { ...e6, field: Qr(r3, i2) };
1099
+ if (r3) return { ...e6, field: $r(r3, i2) };
1100
1100
  let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
1101
1101
  if (s2) {
1102
1102
  let t3 = a2[s2];
1103
- if (t3) return { ...e6, field: e6.field.replace(s2, Qr(t3, i2)) };
1103
+ if (t3) return { ...e6, field: e6.field.replace(s2, $r(t3, i2)) };
1104
1104
  }
1105
1105
  return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
1106
1106
  });
1107
1107
  };
1108
- var Qr = (e5, t2) => {
1109
- let n2 = $r(e5);
1108
+ var $r = (e5, t2) => {
1109
+ let n2 = ei(e5);
1110
1110
  return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
1111
1111
  };
1112
- var $r = (e5) => {
1112
+ var ei = (e5) => {
1113
1113
  let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
1114
1114
  return t2 && t2.groups && Number(t2.groups.argIndex);
1115
1115
  };
1116
- function ei() {
1116
+ function ti() {
1117
1117
  let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
1118
1118
  if (e5) return { initWixModules(t3, n3) {
1119
- return ti(() => e5(t3, n3));
1119
+ return ni(() => e5(t3, n3));
1120
1120
  }, fetchWithAuth() {
1121
1121
  throw Error(`fetchWithAuth is not available in this context`);
1122
1122
  }, graphql() {
1123
1123
  throw Error(`graphql is not available in this context`);
1124
1124
  } };
1125
- let t2 = typeof $wixContext < `u` ? $wixContext.client : p.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : p.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : p.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : p.elevatedClient;
1125
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : m.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : m.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : m.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : m.elevatedClient;
1126
1126
  if (t2 || n2) return { initWixModules(e6, r2) {
1127
1127
  if (r2) {
1128
1128
  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`);
1129
- return ti(() => n2.use(e6));
1129
+ return ni(() => n2.use(e6));
1130
1130
  }
1131
1131
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1132
- return ti(() => t2.use(e6));
1132
+ return ni(() => t2.use(e6));
1133
1133
  }, fetchWithAuth: (e6, n3) => {
1134
1134
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1135
1135
  return t2.fetchWithAuth(e6, n3);
@@ -1141,87 +1141,87 @@ function ei() {
1141
1141
  return t2.graphql(e6, n3, r2);
1142
1142
  } };
1143
1143
  }
1144
- function ti(e5) {
1145
- let t2 = globalThis.__wix_context__, n2 = { client: p.client, elevatedClient: p.elevatedClient }, r2;
1146
- 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);
1144
+ function ni(e5) {
1145
+ let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
1146
+ globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
1147
1147
  try {
1148
1148
  return e5();
1149
1149
  } finally {
1150
- globalThis.__wix_context__ = t2, p.client = n2.client, p.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
1150
+ globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
1151
1151
  }
1152
1152
  }
1153
- function ni(e5, t2) {
1153
+ function ri(e5, t2) {
1154
1154
  return (...n2) => {
1155
- let r2 = ei();
1155
+ let r2 = ti();
1156
1156
  return r2 ? r2.initWixModules(e5, t2).apply(void 0, n2) : e5.apply(void 0, n2);
1157
1157
  };
1158
1158
  }
1159
- function ri(e5, t2 = false) {
1160
- return ni(e5, t2);
1161
- }
1162
- function ii(e5) {
1163
- let t2 = _i(hi(e5.host), e5.domainToMappings);
1164
- return Ei(Ci(e5.protoPath, e5.data || {}), t2);
1165
- }
1166
- var ai = [`wix.com`, `editorx.com`];
1167
- var oi = `_`;
1168
- var si = `*.`;
1169
- var ci = RegExp(`\\.(${ai.join(`|`)})$`);
1170
- var li = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
1171
- var ui = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
1172
- var di = `dev.wix-code.com`;
1173
- var fi = /{(.*)}/;
1174
- var pi = RegExp(`\\.(${li.join(`|`)})$`);
1175
- var mi = RegExp(`.*\\.${di}$`);
1176
- function hi(e5) {
1177
- return gi(e5).replace(ci, `._base_domain_`).replace(pi, `._api_base_domain_`).replace(mi, `*.dev.wix-code.com`);
1178
- }
1159
+ function ii(e5, t2 = false) {
1160
+ return ri(e5, t2);
1161
+ }
1162
+ function ai(e5) {
1163
+ let t2 = vi(gi(e5.host), e5.domainToMappings);
1164
+ return Di(wi(e5.protoPath, e5.data || {}), t2);
1165
+ }
1166
+ var oi = [`wix.com`, `editorx.com`];
1167
+ var si = `_`;
1168
+ var ci = `*.`;
1169
+ var li = RegExp(`\\.(${oi.join(`|`)})$`);
1170
+ var ui = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
1171
+ var di = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
1172
+ var fi = `dev.wix-code.com`;
1173
+ var pi = /{(.*)}/;
1174
+ var mi = RegExp(`\\.(${ui.join(`|`)})$`);
1175
+ var hi = RegExp(`.*\\.${fi}$`);
1179
1176
  function gi(e5) {
1180
- return ui[e5] ?? e5;
1177
+ return _i(e5).replace(li, `._base_domain_`).replace(mi, `._api_base_domain_`).replace(hi, `*.dev.wix-code.com`);
1178
+ }
1179
+ function _i(e5) {
1180
+ return di[e5] ?? e5;
1181
1181
  }
1182
- function _i(e5, t2) {
1182
+ function vi(e5, t2) {
1183
1183
  let n2 = t2[e5];
1184
1184
  if (n2) return n2;
1185
- let r2 = vi(e5, t2) ?? yi(e5, t2);
1185
+ let r2 = yi(e5, t2) ?? bi(e5, t2);
1186
1186
  if (!r2) {
1187
- if (xi(e5)) {
1188
- let e6 = t2[Si];
1187
+ if (Si(e5)) {
1188
+ let e6 = t2[Ci];
1189
1189
  if (e6) return e6;
1190
1190
  }
1191
- let n3 = t2[oi];
1191
+ let n3 = t2[si];
1192
1192
  if (n3) return n3;
1193
1193
  }
1194
1194
  return r2 ?? [];
1195
1195
  }
1196
- function vi(e5, t2) {
1196
+ function yi(e5, t2) {
1197
1197
  return Object.entries(t2).find(([t3]) => {
1198
1198
  let [, ...n2] = e5.split(`.`);
1199
1199
  return n2.join(`.`) === t3;
1200
1200
  })?.[1];
1201
1201
  }
1202
- function yi(e5, t2) {
1203
- let [n2] = Object.entries(t2).filter(([t3]) => bi(e5, t3)).sort(([e6], [t3]) => t3.length - e6.length);
1202
+ function bi(e5, t2) {
1203
+ let [n2] = Object.entries(t2).filter(([t3]) => xi(e5, t3)).sort(([e6], [t3]) => t3.length - e6.length);
1204
1204
  if (!n2) return;
1205
1205
  let [, r2] = n2;
1206
1206
  return r2;
1207
1207
  }
1208
- function bi(e5, t2) {
1209
- if (!t2.startsWith(si)) return false;
1208
+ function xi(e5, t2) {
1209
+ if (!t2.startsWith(ci)) return false;
1210
1210
  let n2 = t2.slice(1);
1211
1211
  return e5.length > n2.length && e5.endsWith(n2);
1212
1212
  }
1213
- function xi(e5) {
1213
+ function Si(e5) {
1214
1214
  return !!e5.match(/\._base_domain_$/);
1215
1215
  }
1216
- var Si = `www._base_domain_`;
1217
- function Ci(e5, t2) {
1218
- return e5.split(`/`).map((e6) => wi(e6, t2)).join(`/`);
1219
- }
1216
+ var Ci = `www._base_domain_`;
1220
1217
  function wi(e5, t2) {
1221
- let n2 = e5.match(fi) || [], r2 = n2[1];
1222
- return r2 ? Ti(t2, r2, e5, e5.replace(n2[0], ``)) : e5;
1218
+ return e5.split(`/`).map((e6) => Ti(e6, t2)).join(`/`);
1219
+ }
1220
+ function Ti(e5, t2) {
1221
+ let n2 = e5.match(pi) || [], r2 = n2[1];
1222
+ return r2 ? Ei(t2, r2, e5, e5.replace(n2[0], ``)) : e5;
1223
1223
  }
1224
- function Ti(e5, t2, n2, r2) {
1224
+ function Ei(e5, t2, n2, r2) {
1225
1225
  let i2 = e5;
1226
1226
  for (let e6 of t2.split(`.`)) {
1227
1227
  if (!i2) return n2;
@@ -1229,31 +1229,31 @@ function Ti(e5, t2, n2, r2) {
1229
1229
  }
1230
1230
  return `${i2}${r2}`;
1231
1231
  }
1232
- function Ei(e5, t2) {
1232
+ function Di(e5, t2) {
1233
1233
  let n2 = t2?.find((t3) => e5.startsWith(t3.destPath));
1234
1234
  return n2 ? n2.srcPath + e5.slice(n2.destPath.length) : e5;
1235
1235
  }
1236
- var B;
1236
+ var Oi;
1237
1237
  (function(e5) {
1238
1238
  e5.QUERY_PARAM = `QUERY_PARAM`, e5.SUBDOMAIN = `SUBDOMAIN`, e5.SUBDIRECTORY = `SUBDIRECTORY`;
1239
- })(B ||= {});
1240
- var Di = { cs: `\u010Ce\u0161tina`, da: `Dansk`, de: `Deutsch`, en: `English`, es: `Espa\xF1ol`, fr: `Fran\xE7ais`, hi: `\u0939\u093F\u0928\u094D\u0926\u0940`, id: `Bahasa Indonesia`, it: `Italiano`, ja: `\u65E5\u672C\u8A9E`, ko: `\uD55C\uAD6D\uC5B4`, nl: `Nederlands`, no: `Norsk`, pl: `Polski`, pt: `Portugu\xEAs`, ru: `\u0420\u0443\u0441\u0441\u043A\u0438\u0439`, sv: `Svenska`, th: `\u0E44\u0E17\u0E22`, tr: `T\xFCrk\xE7e`, uk: `\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430`, vi: `Ti\u1EBFng Vi\u1EC7t`, zh: `\u7E41\u9AD4\u4E2D\u6587`, sq: `Shqip`, am: `\u12A0\u121B\u122D\u129B`, ar: `\u0627\u0644\u0639\u0631\u0628\u064A\u0629`, hy: `\u0540\u0561\u0575\u0565\u0580\u0565\u0576`, az: `Az\u0259rbaycan dili`, eu: `Euskara`, be: `\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F`, bn: `\u09AC\u09BE\u0982\u09B2\u09BE`, bs: `Bosanski`, bg: `\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438`, ca: `Catal\xE0`, ny: `ChiChe\u0175a`, co: `Corsu`, hr: `Hrvatski`, et: `Eesti`, fj: `Vosa Vakaviti`, fi: `Suomi`, ga: `Gaeilge`, gl: `Galego`, ka: `\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8`, el: `\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC`, gu: `\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0`, ht: `Krey\xF2l Ayisyen`, ha: `Hausa`, he: `\u05E2\u05D1\u05E8\u05D9\u05EA`, hu: `Magyar`, is: `\xCDslenska`, ig: `Igbo`, kn: `\u0C95\u0CA8\u0CCD\u0CA8\u0CA1`, kk: `\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456`, km: `\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A`, ku: `Kurd\xEE`, ky: `\u041A\u044B\u0440\u0433\u044B\u0437\u0447\u0430`, lb: `L\xEBtzebuergesch`, lo: `\u0EA5\u0EB2\u0EA7`, la: `Latina`, lv: `Latvie\u0161u`, lt: `Lietuvi\u0173`, mk: `\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438`, mg: `Malagasy`, ms: `Bahasa Melayu`, ml: `\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02`, mt: `Malti`, mn: `\u041C\u043E\u043D\u0433\u043E\u043B`, ne: `\u0928\u0947\u092A\u093E\u0932\u0940`, ps: `\u067E\u069A\u062A\u0648`, fa: `\u0641\u0627\u0631\u0633\u06CC`, ro: `Rom\xE2n\u0103`, sm: `Gagana Samoa`, sr: `\u0421\u0440\u043F\u0441\u043A\u0438`, sn: `Shona`, sd: `\u0633\u0646\u068C\u064A`, si: `\u0DC3\u0DD2\u0D82\u0DC4\u0DBD`, sk: `Sloven\u010Dina`, sl: `Sloven\u0161\u010Dina`, so: `Soomaaliga`, su: `Basa Sunda`, sw: `Kiswahili`, tl: `Filipino`, tg: `\u0422\u043E\u04B7\u0438\u043A\u04E3`, ta: `\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD`, te: `\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41`, tk: `T\xFCrkmen`, ur: `\u0627\u0631\u062F\u0648`, uz: `O'zbek`, cy: `Cymraeg`, xh: `isiXhosa`, yi: `\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9`, yo: `Yor\xF9b\xE1`, zu: `isiZulu`, kl: `Kalaallisut`, fo: `F\xF8royskt`, ln: `Ling\xE1la`, mi: `M\u0101ori`, mr: `\u092E\u0930\u093E\u0920\u0940`, my: `\u1019\u103C\u1014\u103A\u1019\u102C`, se: `S\xE1megiella`, ug: `\u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u06D5`, qu: `Runa Simi`, aa: `Afar`, ab: `\u0410\u04A7\u0441\u0443\u0430`, ae: `Avestan`, ak: `Akan`, an: `Aragon\xE9s`, as: `\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE`, av: `\u0410\u0432\u0430\u0440`, ay: `Aymar aru`, ba: `\u0411\u0430\u0448\u04A1\u043E\u0440\u0442\u0441\u0430`, bh: `\u092D\u094B\u091C\u092A\u0941\u0930\u0940`, bi: `Bislama`, bm: `Bamanankan`, bo: `\u0F56\u0F7C\u0F51\u0F0B\u0F66\u0F90\u0F51\u0F0B`, br: `Brezhoneg`, ce: `\u041D\u043E\u0445\u0447\u0438\u0439\u043D`, ch: `Chamoru`, cr: `\u14C0\u1426\u1403\u152D\u140D\u140F\u1423`, cu: `\u0426\u0440\u044C\u043A\u044A\u0432\u044C\u043D\u043E\u0441\u043B\u043E\u0432\u0463\u043D\u044C\u0441\u043A\u044A`, cv: `\u0427\u04D1\u0432\u0430\u0448\u043B\u0430`, dv: `\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0784\u07A6\u0790\u07B0`, dz: `\u0F62\u0FAB\u0F7C\u0F44\u0F0B\u0F41`, ee: `E\u028Begbe`, eo: `Esperanto`, ff: `Fulah`, fy: `Frysk`, gd: `G\xE0idhlig`, gn: `Ava\xF1e'\u1EBD`, gv: `Gaelg`, ho: `Hiri Motu`, hz: `Otjiherero`, ia: `Interlingua`, ie: `Interlingue`, ii: `\uA188\uA320\uA259`, ik: `I\xF1upiaq`, io: `Ido`, iu: `\u1403\u14C4\u1483\u144E\u1450\u1466`, jv: `Basa Jawa`, ki: `Gikuyu`, kr: `Kanuri`, ks: `\u06A9\u0672\u0634\u064F\u0631`, kw: `Kernewek`, lg: `Luganda`, li: `Limburgs`, lu: `Tshiluba`, mh: `Kajin M\u0327aje\u013C`, na: `Dorerin Naoero`, nb: `Norsk Bokm\xE5l`, nd: `isiNdebele`, ng: `Oshiwambo`, nn: `Norsk Nynorsk`, nr: `isiNdebele (South)`, nv: `Din\xE9 Bizaad`, oc: `Occitan`, oj: `Anishinaabemowin`, om: `Afaan Oromoo`, or: `\u0B13\u0B21\u0B3C\u0B3F\u0B06`, os: `\u0418\u0440\u043E\u043D`, pa: `\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40`, pi: `\u{11005}\u{1102F}\u{11022}`, rm: `Rumantsch`, rn: `Ikirundi`, rw: `Kinyarwanda`, sa: `\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D`, sc: `Sardu`, sg: `S\xE4ng\xF6`, ss: `SiSwati`, st: `Sesotho`, ti: `\u1275\u130D\u122D\u129B`, tn: `Setswana`, to: `Faka Tonga`, ts: `Xitsonga`, tt: `\u0422\u0430\u0442\u0430\u0440\u0447\u0430`, tw: `Twi`, ty: `Reo Tahiti`, ve: `Tshiven\u1E13a`, vo: `Volap\xFCk`, wa: `Walon`, wo: `Wolof`, za: `Sa\u026F cue\u014B\u0185` };
1241
- var Oi = (e5, t2) => {
1239
+ })(Oi ||= {});
1240
+ var ki = { cs: `\u010Ce\u0161tina`, da: `Dansk`, de: `Deutsch`, en: `English`, es: `Espa\xF1ol`, fr: `Fran\xE7ais`, hi: `\u0939\u093F\u0928\u094D\u0926\u0940`, id: `Bahasa Indonesia`, it: `Italiano`, ja: `\u65E5\u672C\u8A9E`, ko: `\uD55C\uAD6D\uC5B4`, nl: `Nederlands`, no: `Norsk`, pl: `Polski`, pt: `Portugu\xEAs`, ru: `\u0420\u0443\u0441\u0441\u043A\u0438\u0439`, sv: `Svenska`, th: `\u0E44\u0E17\u0E22`, tr: `T\xFCrk\xE7e`, uk: `\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430`, vi: `Ti\u1EBFng Vi\u1EC7t`, zh: `\u7E41\u9AD4\u4E2D\u6587`, sq: `Shqip`, am: `\u12A0\u121B\u122D\u129B`, ar: `\u0627\u0644\u0639\u0631\u0628\u064A\u0629`, hy: `\u0540\u0561\u0575\u0565\u0580\u0565\u0576`, az: `Az\u0259rbaycan dili`, eu: `Euskara`, be: `\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F`, bn: `\u09AC\u09BE\u0982\u09B2\u09BE`, bs: `Bosanski`, bg: `\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438`, ca: `Catal\xE0`, ny: `ChiChe\u0175a`, co: `Corsu`, hr: `Hrvatski`, et: `Eesti`, fj: `Vosa Vakaviti`, fi: `Suomi`, ga: `Gaeilge`, gl: `Galego`, ka: `\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8`, el: `\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC`, gu: `\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0`, ht: `Krey\xF2l Ayisyen`, ha: `Hausa`, he: `\u05E2\u05D1\u05E8\u05D9\u05EA`, hu: `Magyar`, is: `\xCDslenska`, ig: `Igbo`, kn: `\u0C95\u0CA8\u0CCD\u0CA8\u0CA1`, kk: `\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456`, km: `\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A`, ku: `Kurd\xEE`, ky: `\u041A\u044B\u0440\u0433\u044B\u0437\u0447\u0430`, lb: `L\xEBtzebuergesch`, lo: `\u0EA5\u0EB2\u0EA7`, la: `Latina`, lv: `Latvie\u0161u`, lt: `Lietuvi\u0173`, mk: `\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438`, mg: `Malagasy`, ms: `Bahasa Melayu`, ml: `\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02`, mt: `Malti`, mn: `\u041C\u043E\u043D\u0433\u043E\u043B`, ne: `\u0928\u0947\u092A\u093E\u0932\u0940`, ps: `\u067E\u069A\u062A\u0648`, fa: `\u0641\u0627\u0631\u0633\u06CC`, ro: `Rom\xE2n\u0103`, sm: `Gagana Samoa`, sr: `\u0421\u0440\u043F\u0441\u043A\u0438`, sn: `Shona`, sd: `\u0633\u0646\u068C\u064A`, si: `\u0DC3\u0DD2\u0D82\u0DC4\u0DBD`, sk: `Sloven\u010Dina`, sl: `Sloven\u0161\u010Dina`, so: `Soomaaliga`, su: `Basa Sunda`, sw: `Kiswahili`, tl: `Filipino`, tg: `\u0422\u043E\u04B7\u0438\u043A\u04E3`, ta: `\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD`, te: `\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41`, tk: `T\xFCrkmen`, ur: `\u0627\u0631\u062F\u0648`, uz: `O'zbek`, cy: `Cymraeg`, xh: `isiXhosa`, yi: `\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9`, yo: `Yor\xF9b\xE1`, zu: `isiZulu`, kl: `Kalaallisut`, fo: `F\xF8royskt`, ln: `Ling\xE1la`, mi: `M\u0101ori`, mr: `\u092E\u0930\u093E\u0920\u0940`, my: `\u1019\u103C\u1014\u103A\u1019\u102C`, se: `S\xE1megiella`, ug: `\u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u06D5`, qu: `Runa Simi`, aa: `Afar`, ab: `\u0410\u04A7\u0441\u0443\u0430`, ae: `Avestan`, ak: `Akan`, an: `Aragon\xE9s`, as: `\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE`, av: `\u0410\u0432\u0430\u0440`, ay: `Aymar aru`, ba: `\u0411\u0430\u0448\u04A1\u043E\u0440\u0442\u0441\u0430`, bh: `\u092D\u094B\u091C\u092A\u0941\u0930\u0940`, bi: `Bislama`, bm: `Bamanankan`, bo: `\u0F56\u0F7C\u0F51\u0F0B\u0F66\u0F90\u0F51\u0F0B`, br: `Brezhoneg`, ce: `\u041D\u043E\u0445\u0447\u0438\u0439\u043D`, ch: `Chamoru`, cr: `\u14C0\u1426\u1403\u152D\u140D\u140F\u1423`, cu: `\u0426\u0440\u044C\u043A\u044A\u0432\u044C\u043D\u043E\u0441\u043B\u043E\u0432\u0463\u043D\u044C\u0441\u043A\u044A`, cv: `\u0427\u04D1\u0432\u0430\u0448\u043B\u0430`, dv: `\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0784\u07A6\u0790\u07B0`, dz: `\u0F62\u0FAB\u0F7C\u0F44\u0F0B\u0F41`, ee: `E\u028Begbe`, eo: `Esperanto`, ff: `Fulah`, fy: `Frysk`, gd: `G\xE0idhlig`, gn: `Ava\xF1e'\u1EBD`, gv: `Gaelg`, ho: `Hiri Motu`, hz: `Otjiherero`, ia: `Interlingua`, ie: `Interlingue`, ii: `\uA188\uA320\uA259`, ik: `I\xF1upiaq`, io: `Ido`, iu: `\u1403\u14C4\u1483\u144E\u1450\u1466`, jv: `Basa Jawa`, ki: `Gikuyu`, kr: `Kanuri`, ks: `\u06A9\u0672\u0634\u064F\u0631`, kw: `Kernewek`, lg: `Luganda`, li: `Limburgs`, lu: `Tshiluba`, mh: `Kajin M\u0327aje\u013C`, na: `Dorerin Naoero`, nb: `Norsk Bokm\xE5l`, nd: `isiNdebele`, ng: `Oshiwambo`, nn: `Norsk Nynorsk`, nr: `isiNdebele (South)`, nv: `Din\xE9 Bizaad`, oc: `Occitan`, oj: `Anishinaabemowin`, om: `Afaan Oromoo`, or: `\u0B13\u0B21\u0B3C\u0B3F\u0B06`, os: `\u0418\u0440\u043E\u043D`, pa: `\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40`, pi: `\u{11005}\u{1102F}\u{11022}`, rm: `Rumantsch`, rn: `Ikirundi`, rw: `Kinyarwanda`, sa: `\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D`, sc: `Sardu`, sg: `S\xE4ng\xF6`, ss: `SiSwati`, st: `Sesotho`, ti: `\u1275\u130D\u122D\u129B`, tn: `Setswana`, to: `Faka Tonga`, ts: `Xitsonga`, tt: `\u0422\u0430\u0442\u0430\u0440\u0447\u0430`, tw: `Twi`, ty: `Reo Tahiti`, ve: `Tshiven\u1E13a`, vo: `Volap\xFCk`, wa: `Walon`, wo: `Wolof`, za: `Sa\u026F cue\u014B\u0185` };
1241
+ var Ai = (e5, t2) => {
1242
1242
  e5.searchParams.set(`lang`, t2);
1243
1243
  };
1244
- var ki = (e5, t2) => {
1244
+ var ji = (e5, t2) => {
1245
1245
  let n2 = e5.hostname.split(`.`);
1246
1246
  n2[0] === `www` && (n2 = n2.slice(1)), n2 = [t2, ...n2], e5.hostname = n2.join(`.`);
1247
1247
  };
1248
- var Ai = (e5, t2) => {
1248
+ var Mi = (e5, t2) => {
1249
1249
  e5.pathname = `/${t2}${e5.pathname}`;
1250
1250
  };
1251
- var ji = (e5, t2) => {
1251
+ var Ni = (e5, t2) => {
1252
1252
  if (!t2.languageCode || !t2?.resolutionMethod) return e5;
1253
1253
  let n2 = new URL(e5);
1254
- return (t2?.resolutionMethod === `QUERY_PARAM` ? Oi : t2?.resolutionMethod === `SUBDOMAIN` ? ki : Ai)(n2, t2.languageCode), n2.href;
1254
+ return (t2?.resolutionMethod === `QUERY_PARAM` ? Ai : t2?.resolutionMethod === `SUBDOMAIN` ? ji : Mi)(n2, t2.languageCode), n2.href;
1255
1255
  };
1256
- var Mi = (e5, t2) => {
1256
+ var Pi = (e5, t2) => {
1257
1257
  if (!e5?.length) return e5;
1258
1258
  let n2;
1259
1259
  try {
@@ -1274,91 +1274,97 @@ var Mi = (e5, t2) => {
1274
1274
  }
1275
1275
  return n2.href;
1276
1276
  };
1277
- function Ni() {
1278
- let e5 = Pi();
1279
- return e5 ? Fi(e5) : [];
1277
+ function Fi() {
1278
+ let e5 = Ii();
1279
+ return e5 ? Li(e5) : [];
1280
1280
  }
1281
- function Pi() {
1281
+ function Ii() {
1282
1282
  let e5 = typeof globals < `u` ? globals?.$ns?.[`wix-window`]?.multilingual : void 0, t2 = typeof window < `u` ? window?.essentials?.multilingual : void 0;
1283
1283
  return e5 ?? t2 ?? globalThis?.__wix_site_metadata__?.multilingual;
1284
1284
  }
1285
- function Fi(e5) {
1285
+ function Li(e5) {
1286
1286
  try {
1287
1287
  if (e5?.supportedLanguages?.length) {
1288
- let t2 = e5.supportedLanguages, n2 = t2.map((e6) => e6.languageCode).filter(Boolean), r2 = e5.cleanUrl ?? zi(n2);
1289
- return t2.map((e6) => ({ id: e6.languageCode, displayName: Ii(e6), regionalFormat: [e6.locale?.languageCode, e6.locale?.country].filter(Boolean).join(`-`), url: Li(e6, r2), primary: e6.isPrimary, resolutionMethod: e6.resolutionMethod }));
1288
+ let t2 = e5.supportedLanguages, n2 = t2.map((e6) => e6.languageCode).filter(Boolean), r2 = e5.cleanUrl ?? Vi(n2);
1289
+ return t2.map((e6) => ({ id: e6.languageCode, displayName: Ri(e6), regionalFormat: [e6.locale?.languageCode, e6.locale?.country].filter(Boolean).join(`-`), url: zi(e6, r2), primary: e6.isPrimary, resolutionMethod: e6.resolutionMethod }));
1290
1290
  }
1291
1291
  if (e5?.siteLanguages?.length) {
1292
- let t2 = e5.siteLanguages, n2 = zi(t2.map((e6) => e6.languageCode).filter(Boolean));
1293
- return t2.map((e6) => ({ id: e6.languageCode, displayName: Ii(e6), regionalFormat: e6.locale, url: Li(e6, n2), primary: e6.isPrimaryLanguage, resolutionMethod: e6.resolutionMethod ? Ri(e6.resolutionMethod) : void 0 }));
1292
+ let t2 = e5.siteLanguages, n2 = Vi(t2.map((e6) => e6.languageCode).filter(Boolean));
1293
+ return t2.map((e6) => ({ id: e6.languageCode, displayName: Ri(e6), regionalFormat: e6.locale, url: zi(e6, n2), primary: e6.isPrimaryLanguage, resolutionMethod: e6.resolutionMethod ? Bi(e6.resolutionMethod) : void 0 }));
1294
1294
  }
1295
1295
  } catch (e6) {
1296
1296
  return console.warn(`[Multilingual Manager] listSupportedLanguages failed`, e6), [];
1297
1297
  }
1298
1298
  return console.warn(`[Multilingual Manager] listSupportedLanguages is not available`), [];
1299
1299
  }
1300
- function Ii(e5) {
1301
- let t2 = Di[e5.languageCode];
1300
+ function Ri(e5) {
1301
+ let t2 = ki[e5.languageCode];
1302
1302
  if (t2) return t2;
1303
1303
  let n2 = e5.name ?? e5.countryCode;
1304
1304
  if (n2) return n2;
1305
1305
  }
1306
- function Li(e5, t2) {
1306
+ function zi(e5, t2) {
1307
1307
  if (e5.url || !t2 || !e5.resolutionMethod) return e5.url;
1308
1308
  if (e5.languageCode) try {
1309
- return ji(t2, { languageCode: e5.languageCode, countryCode: e5.countryCode, resolutionMethod: Ri(e5.resolutionMethod), locale: { languageCode: e5.languageCode, country: e5.countryCode } });
1309
+ return Ni(t2, { languageCode: e5.languageCode, countryCode: e5.countryCode, resolutionMethod: Bi(e5.resolutionMethod), locale: { languageCode: e5.languageCode, country: e5.countryCode } });
1310
1310
  } catch (e6) {
1311
1311
  console.warn(`[Multilingual Manager] buildUrlForLanguage failed`, e6);
1312
1312
  return;
1313
1313
  }
1314
1314
  }
1315
- function Ri(e5) {
1315
+ function Bi(e5) {
1316
1316
  switch (e5) {
1317
1317
  case `QUERY_PARAM`:
1318
1318
  case `QueryParam`:
1319
- return B.QUERY_PARAM;
1319
+ return Oi.QUERY_PARAM;
1320
1320
  case `SUBDOMAIN`:
1321
1321
  case `Subdomain`:
1322
- return B.SUBDOMAIN;
1322
+ return Oi.SUBDOMAIN;
1323
1323
  case `SUBDIRECTORY`:
1324
1324
  case `Subdirectory`:
1325
- return B.SUBDIRECTORY;
1325
+ return Oi.SUBDIRECTORY;
1326
1326
  default:
1327
1327
  return;
1328
1328
  }
1329
1329
  }
1330
- function zi(e5) {
1330
+ function Vi(e5) {
1331
1331
  let t2 = typeof window < `u` && window.location?.href ? window.location.href : ``;
1332
1332
  try {
1333
- return Mi(t2, e5);
1333
+ return Pi(t2, e5);
1334
1334
  } catch (e6) {
1335
1335
  return console.warn(`[Multilingual Manager] cleanCurrentUrl failed`, e6), t2;
1336
1336
  }
1337
1337
  }
1338
- var Bi = `x-wix-linguist`;
1339
- var Vi = `00000000-0000-0000-0000-000000000000`;
1340
- var Hi = `false`;
1338
+ var Hi = `x-wix-currency`;
1341
1339
  var Ui = () => {
1342
- let e5 = V(`language`), t2 = V(`locale`);
1343
- if (e5) return { [Bi]: [e5, t2 || e5, Hi, Vi].join(`|`) };
1340
+ let e5 = B(`currency`);
1341
+ if (e5) return { [Hi]: e5 };
1344
1342
  };
1345
- function Wi() {
1343
+ var Wi = `x-wix-linguist`;
1344
+ var Gi = `00000000-0000-0000-0000-000000000000`;
1345
+ var Ki = `false`;
1346
+ var qi = () => {
1347
+ let e5 = B(`language`), t2 = B(`locale`);
1348
+ if (e5) return { [Wi]: [e5, t2 || e5, Ki, Gi].join(`|`) };
1349
+ };
1350
+ function Ji() {
1346
1351
  let e5 = null, t2 = null;
1347
1352
  return { promise: new Promise((n2, r2) => {
1348
1353
  e5 = n2, t2 = r2;
1349
1354
  }), resolve: e5, reject: t2 };
1350
1355
  }
1351
- var Gi = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
1352
- var V = (e5) => Gi()?.[e5];
1353
- var Ki = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host: (t2) => {
1354
- let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 = Ji();
1355
- return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: V(`language`), locale: V(`locale`), get passThroughHeaders() {
1356
- return Ui();
1356
+ var Yi = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
1357
+ var B = (e5) => Yi()?.[e5];
1358
+ var Xi = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host: (t2) => {
1359
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 = Qi();
1360
+ return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: B(`language`), locale: B(`locale`), get passThroughHeaders() {
1361
+ let e6 = { ...qi(), ...Ui() };
1362
+ return Object.keys(e6).length > 0 ? e6 : void 0;
1357
1363
  } } };
1358
1364
  }, auth: (e6) => {
1359
1365
  let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
1360
- !e6 && qi() && (e6 = t2?.getAccessTokenFunction?.());
1361
- let n2 = false, { resolve: r2, promise: i2 } = Wi();
1366
+ !e6 && Zi() && (e6 = t2?.getAccessTokenFunction?.());
1367
+ let n2 = false, { resolve: r2, promise: i2 } = Ji();
1362
1368
  return { getAuthHeaders: async () => {
1363
1369
  if (!e6 && n2 && (e6 = await i2), !e6) throw Error(`Failed to resolve auth token`);
1364
1370
  return { headers: { Authorization: await e6() } };
@@ -1366,102 +1372,102 @@ var Ki = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host:
1366
1372
  r2(e7);
1367
1373
  }) };
1368
1374
  } });
1369
- function qi() {
1375
+ function Zi() {
1370
1376
  return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
1371
1377
  }
1372
- function Ji() {
1378
+ function Qi() {
1373
1379
  let e5 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
1374
1380
  if (!e5) return;
1375
1381
  let t2 = new URL(e5);
1376
1382
  return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
1377
1383
  }
1378
- var Yi = ({ clientSdk: e5, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
1384
+ var $i = ({ clientSdk: e5, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
1379
1385
  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`);
1380
1386
  return e5.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
1381
1387
  }, getAccessToken: () => {
1382
1388
  throw Error(`Not implemented`);
1383
1389
  }, observeState: () => ({ disconnect: () => {
1384
1390
  } }) });
1385
- var Xi = Ki({ createHost: function(e5) {
1391
+ var ea = Xi({ createHost: function(e5) {
1386
1392
  let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e5?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e5 || {};
1387
1393
  if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
1388
- return { channel: Yi({ clientSdk: t2, applicationId: n2 }), close: () => {
1394
+ return { channel: $i({ clientSdk: t2, applicationId: n2 }), close: () => {
1389
1395
  } };
1390
1396
  } });
1391
- var Zi = (e5, t2) => {
1392
- let n2 = Xi.host({ applicationId: e5, componentId: t2 }), r2 = Xi.auth();
1393
- return Ue({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
1397
+ var ta = (e5, t2) => {
1398
+ let n2 = ea.host({ applicationId: e5, componentId: t2 }), r2 = ea.auth();
1399
+ return We({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
1394
1400
  };
1395
- var Qi = (e5) => Zi(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
1396
- function H(e5, t2) {
1401
+ var na = (e5) => ta(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
1402
+ function V(e5, t2) {
1397
1403
  for (let n2 of e5) {
1398
1404
  let e6 = n2.addOns.find((e7) => e7.addOnId === t2);
1399
1405
  if (e6) return { group: n2, addOn: e6 };
1400
1406
  }
1401
1407
  return null;
1402
1408
  }
1403
- function $i(e5, t2) {
1404
- return H(e5, t2)?.addOn ?? null;
1409
+ function ra(e5, t2) {
1410
+ return V(e5, t2)?.addOn ?? null;
1405
1411
  }
1406
- function U(e5, t2) {
1407
- return t2.filter((t3) => H(e5, t3.id) !== null);
1412
+ function H(e5, t2) {
1413
+ return t2.filter((t3) => V(e5, t3.id) !== null);
1408
1414
  }
1409
- function ea(e5, t2, n2) {
1410
- return n2.filter((n3) => H(e5, n3.id)?.group === t2).length;
1415
+ function ia(e5, t2, n2) {
1416
+ return n2.filter((n3) => V(e5, n3.id)?.group === t2).length;
1411
1417
  }
1412
- function ta(e5, t2) {
1418
+ function aa(e5, t2) {
1413
1419
  return !e5.maxNumberOfAddOns || t2 < e5.maxNumberOfAddOns;
1414
1420
  }
1415
- function na(e5, t2) {
1421
+ function oa(e5, t2) {
1416
1422
  return e5.map((n2) => {
1417
- let r2 = ea(e5, n2, t2);
1423
+ let r2 = ia(e5, n2, t2);
1418
1424
  return { ...n2, addOns: n2.addOns.map((e6) => {
1419
1425
  let n3 = t2.find((t3) => t3.id === e6.addOnId)?.quantity ?? 0;
1420
1426
  return { ...e6, isSelected: n3 > 0, selectedQuantity: n3 };
1421
- }), selectedCount: r2, canSelectMore: ta(n2, r2) };
1427
+ }), selectedCount: r2, canSelectMore: aa(n2, r2) };
1422
1428
  });
1423
1429
  }
1424
- function ra(e5, t2, n2) {
1425
- let r2 = H(e5, n2);
1426
- return r2 ? t2.some((e6) => e6.id === n2) ? true : ta(r2.group, ea(e5, r2.group, t2)) : false;
1430
+ function sa(e5, t2, n2) {
1431
+ let r2 = V(e5, n2);
1432
+ return r2 ? t2.some((e6) => e6.id === n2) ? true : aa(r2.group, ia(e5, r2.group, t2)) : false;
1427
1433
  }
1428
- function ia(e5, t2) {
1434
+ function ca(e5, t2) {
1429
1435
  let n2 = e5.maxQuantity ?? 1;
1430
1436
  return Number.isFinite(t2) ? Math.min(Math.max(Math.trunc(t2), 0), n2) : 0;
1431
1437
  }
1432
- var aa = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
1433
- function W(e5) {
1438
+ var la = { category: `category`, location: `location`, page: `page`, blob: `bookingSelection`, legacyBlob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
1439
+ function U(e5) {
1434
1440
  return e5.addOns ?? [];
1435
1441
  }
1436
- function oa(e5, t2) {
1442
+ function ua(e5, t2) {
1437
1443
  let n2 = { ...e5 };
1438
1444
  return t2.length ? n2.addOns = t2 : delete n2.addOns, n2;
1439
1445
  }
1440
- function sa(e5, t2) {
1441
- let n2 = W(e5);
1442
- return oa(e5, n2.some((e6) => e6.id === t2) ? n2.filter((e6) => e6.id !== t2) : [...n2, { id: t2, quantity: 1 }]);
1446
+ function da(e5, t2) {
1447
+ let n2 = U(e5);
1448
+ return ua(e5, n2.some((e6) => e6.id === t2) ? n2.filter((e6) => e6.id !== t2) : [...n2, { id: t2, quantity: 1 }]);
1443
1449
  }
1444
- function ca(e5, t2, n2) {
1445
- let r2 = W(e5);
1446
- return n2 <= 0 ? oa(e5, r2.filter((e6) => e6.id !== t2)) : oa(e5, r2.some((e6) => e6.id === t2) ? r2.map((e6) => e6.id === t2 ? { ...e6, quantity: n2 } : e6) : [...r2, { id: t2, quantity: n2 }]);
1450
+ function fa(e5, t2, n2) {
1451
+ let r2 = U(e5);
1452
+ return n2 <= 0 ? ua(e5, r2.filter((e6) => e6.id !== t2)) : ua(e5, r2.some((e6) => e6.id === t2) ? r2.map((e6) => e6.id === t2 ? { ...e6, quantity: n2 } : e6) : [...r2, { id: t2, quantity: n2 }]);
1447
1453
  }
1448
- function la() {
1454
+ function pa() {
1449
1455
  let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
1450
1456
  if (e5) return { initWixModules(t3, n3) {
1451
- return ua(() => e5(t3, n3));
1457
+ return ma(() => e5(t3, n3));
1452
1458
  }, fetchWithAuth() {
1453
1459
  throw Error(`fetchWithAuth is not available in this context`);
1454
1460
  }, graphql() {
1455
1461
  throw Error(`graphql is not available in this context`);
1456
1462
  } };
1457
- let t2 = typeof $wixContext < `u` ? $wixContext.client : p.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : p.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : p.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : p.elevatedClient;
1463
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : m.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : m.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : m.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : m.elevatedClient;
1458
1464
  if (t2 || n2) return { initWixModules(e6, r2) {
1459
1465
  if (r2) {
1460
1466
  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`);
1461
- return ua(() => n2.use(e6));
1467
+ return ma(() => n2.use(e6));
1462
1468
  }
1463
1469
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1464
- return ua(() => t2.use(e6));
1470
+ return ma(() => t2.use(e6));
1465
1471
  }, fetchWithAuth: (e6, n3) => {
1466
1472
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1467
1473
  return t2.fetchWithAuth(e6, n3);
@@ -1473,80 +1479,80 @@ function la() {
1473
1479
  return t2.graphql(e6, n3, r2);
1474
1480
  } };
1475
1481
  }
1476
- function ua(e5) {
1477
- let t2 = globalThis.__wix_context__, n2 = { client: p.client, elevatedClient: p.elevatedClient }, r2;
1478
- 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);
1482
+ function ma(e5) {
1483
+ let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
1484
+ globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
1479
1485
  try {
1480
1486
  return e5();
1481
1487
  } finally {
1482
- globalThis.__wix_context__ = t2, p.client = n2.client, p.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
1488
+ globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
1483
1489
  }
1484
1490
  }
1485
- function da(e5, t2) {
1491
+ function ha(e5, t2) {
1486
1492
  return { ...e5, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
1487
- let r2 = la();
1493
+ let r2 = pa();
1488
1494
  if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1489
1495
  return r2.initWixModules(e5)[t3].apply(void 0, n2);
1490
1496
  }])) };
1491
1497
  }
1492
- function fa(e5) {
1493
- return da({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
1498
+ function ga(e5) {
1499
+ return ha({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
1494
1500
  }
1495
- var G = (e5) => typeof e5 == `string`;
1496
- var K = () => {
1501
+ var W = (e5) => typeof e5 == `string`;
1502
+ var G = () => {
1497
1503
  let e5, t2, n2 = new Promise((n3, r2) => {
1498
1504
  e5 = n3, t2 = r2;
1499
1505
  });
1500
1506
  return n2.resolve = e5, n2.reject = t2, n2;
1501
1507
  };
1502
- var pa = (e5) => e5 == null ? `` : `` + e5;
1503
- var ma = (e5, t2, n2) => {
1508
+ var _a = (e5) => e5 == null ? `` : `` + e5;
1509
+ var va = (e5, t2, n2) => {
1504
1510
  e5.forEach((e6) => {
1505
1511
  t2[e6] && (n2[e6] = t2[e6]);
1506
1512
  });
1507
1513
  };
1508
- var ha = /###/g;
1509
- var ga = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(ha, `.`) : e5;
1510
- var _a = (e5) => !e5 || G(e5);
1511
- var q = (e5, t2, n2) => {
1512
- let r2 = G(t2) ? t2.split(`.`) : t2, i2 = 0;
1514
+ var ya = /###/g;
1515
+ var ba = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(ya, `.`) : e5;
1516
+ var xa = (e5) => !e5 || W(e5);
1517
+ var K = (e5, t2, n2) => {
1518
+ let r2 = W(t2) ? t2.split(`.`) : t2, i2 = 0;
1513
1519
  for (; i2 < r2.length - 1; ) {
1514
- if (_a(e5)) return {};
1515
- let t3 = ga(r2[i2]);
1520
+ if (xa(e5)) return {};
1521
+ let t3 = ba(r2[i2]);
1516
1522
  !e5[t3] && n2 && (e5[t3] = new n2()), e5 = Object.prototype.hasOwnProperty.call(e5, t3) ? e5[t3] : {}, ++i2;
1517
1523
  }
1518
- return _a(e5) ? {} : { obj: e5, k: ga(r2[i2]) };
1524
+ return xa(e5) ? {} : { obj: e5, k: ba(r2[i2]) };
1519
1525
  };
1520
- var va = (e5, t2, n2) => {
1521
- let { obj: r2, k: i2 } = q(e5, t2, Object);
1526
+ var Sa = (e5, t2, n2) => {
1527
+ let { obj: r2, k: i2 } = K(e5, t2, Object);
1522
1528
  if (r2 !== void 0 || t2.length === 1) {
1523
1529
  r2[i2] = n2;
1524
1530
  return;
1525
1531
  }
1526
- let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = q(e5, o2, Object);
1527
- for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = q(e5, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1532
+ let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = K(e5, o2, Object);
1533
+ for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = K(e5, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1528
1534
  s2.obj[`${s2.k}.${a2}`] = n2;
1529
1535
  };
1530
- var ya = (e5, t2, n2, r2) => {
1531
- let { obj: i2, k: a2 } = q(e5, t2, Object);
1536
+ var Ca = (e5, t2, n2, r2) => {
1537
+ let { obj: i2, k: a2 } = K(e5, t2, Object);
1532
1538
  i2[a2] = i2[a2] || [], i2[a2].push(n2);
1533
1539
  };
1534
- var ba = (e5, t2) => {
1535
- let { obj: n2, k: r2 } = q(e5, t2);
1540
+ var q = (e5, t2) => {
1541
+ let { obj: n2, k: r2 } = K(e5, t2);
1536
1542
  if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
1537
1543
  };
1538
- var xa = (e5, t2, n2) => {
1539
- let r2 = ba(e5, n2);
1540
- return r2 === void 0 ? ba(t2, n2) : r2;
1544
+ var wa = (e5, t2, n2) => {
1545
+ let r2 = q(e5, n2);
1546
+ return r2 === void 0 ? q(t2, n2) : r2;
1541
1547
  };
1542
- var Sa = (e5, t2, n2) => {
1543
- for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? G(e5[r2]) || e5[r2] instanceof String || G(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : Sa(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
1548
+ var Ta = (e5, t2, n2) => {
1549
+ for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? W(e5[r2]) || e5[r2] instanceof String || W(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : Ta(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
1544
1550
  return e5;
1545
1551
  };
1546
1552
  var J = (e5) => e5.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1547
- var Ca = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1548
- var wa = (e5) => G(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => Ca[e6]) : e5;
1549
- var Ta = class {
1553
+ var Ea = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1554
+ var Da = (e5) => W(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => Ea[e6]) : e5;
1555
+ var Oa = class {
1550
1556
  constructor(e5) {
1551
1557
  this.capacity = e5, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
1552
1558
  }
@@ -1557,20 +1563,20 @@ var Ta = class {
1557
1563
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e5, n2), this.regExpQueue.push(e5), n2;
1558
1564
  }
1559
1565
  };
1560
- var Ea = [` `, `,`, `?`, `!`, `;`];
1561
- var Da = new Ta(20);
1562
- var Oa = (e5, t2, n2) => {
1566
+ var ka = [` `, `,`, `?`, `!`, `;`];
1567
+ var Aa = new Oa(20);
1568
+ var ja = (e5, t2, n2) => {
1563
1569
  t2 ||= ``, n2 ||= ``;
1564
- let r2 = Ea.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1570
+ let r2 = ka.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1565
1571
  if (r2.length === 0) return true;
1566
- let i2 = Da.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1572
+ let i2 = Aa.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1567
1573
  if (!a2) {
1568
1574
  let t3 = e5.indexOf(n2);
1569
1575
  t3 > 0 && !i2.test(e5.substring(0, t3)) && (a2 = true);
1570
1576
  }
1571
1577
  return a2;
1572
1578
  };
1573
- var ka = (e5, t2, n2 = `.`) => {
1579
+ var Ma = (e5, t2, n2 = `.`) => {
1574
1580
  if (!e5) return;
1575
1581
  if (e5[t2]) return Object.prototype.hasOwnProperty.call(e5, t2) ? e5[t2] : void 0;
1576
1582
  let r2 = t2.split(n2), i2 = e5;
@@ -1587,7 +1593,7 @@ var ka = (e5, t2, n2 = `.`) => {
1587
1593
  return i2;
1588
1594
  };
1589
1595
  var Y = (e5) => e5?.replace(/_/g, `-`);
1590
- var Aa = { type: `logger`, log(e5) {
1596
+ var Na = { type: `logger`, log(e5) {
1591
1597
  this.output(`log`, e5);
1592
1598
  }, warn(e5) {
1593
1599
  this.output(`warn`, e5);
@@ -1601,7 +1607,7 @@ var X = new class e2 {
1601
1607
  this.init(e5, t2);
1602
1608
  }
1603
1609
  init(e5, t2 = {}) {
1604
- this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Aa, this.options = t2, this.debug = t2.debug;
1610
+ this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Na, this.options = t2, this.debug = t2.debug;
1605
1611
  }
1606
1612
  log(...e5) {
1607
1613
  return this.forward(e5, `log`, ``, true);
@@ -1616,7 +1622,7 @@ var X = new class e2 {
1616
1622
  return this.forward(e5, `warn`, `WARNING DEPRECATED: `, true);
1617
1623
  }
1618
1624
  forward(e5, t2, n2, r2) {
1619
- return r2 && !this.debug ? null : (G(e5[0]) && (e5[0] = `${n2}${this.prefix} ${e5[0]}`), this.logger[t2](e5));
1625
+ return r2 && !this.debug ? null : (W(e5[0]) && (e5[0] = `${n2}${this.prefix} ${e5[0]}`), this.logger[t2](e5));
1620
1626
  }
1621
1627
  create(t2) {
1622
1628
  return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
@@ -1625,7 +1631,7 @@ var X = new class e2 {
1625
1631
  return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
1626
1632
  }
1627
1633
  }();
1628
- var ja = class {
1634
+ var Pa = class {
1629
1635
  constructor() {
1630
1636
  this.observers = {};
1631
1637
  }
@@ -1653,7 +1659,7 @@ var ja = class {
1653
1659
  });
1654
1660
  }
1655
1661
  };
1656
- var Ma = class extends ja {
1662
+ var Fa = class extends Pa {
1657
1663
  constructor(e5, t2 = { ns: [`translation`], defaultNS: `translation` }) {
1658
1664
  super(), this.data = e5 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
1659
1665
  }
@@ -1666,23 +1672,23 @@ var Ma = class extends ja {
1666
1672
  }
1667
1673
  getResource(e5, t2, n2, r2 = {}) {
1668
1674
  let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
1669
- e5.indexOf(`.`) > -1 ? o2 = e5.split(`.`) : (o2 = [e5, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : G(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
1670
- let s2 = ba(this.data, o2);
1671
- return !s2 && !t2 && !n2 && e5.indexOf(`.`) > -1 && (e5 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !G(n2) ? s2 : ka(this.data?.[e5]?.[t2], n2, i2);
1675
+ e5.indexOf(`.`) > -1 ? o2 = e5.split(`.`) : (o2 = [e5, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : W(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
1676
+ let s2 = q(this.data, o2);
1677
+ return !s2 && !t2 && !n2 && e5.indexOf(`.`) > -1 && (e5 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !W(n2) ? s2 : Ma(this.data?.[e5]?.[t2], n2, i2);
1672
1678
  }
1673
1679
  addResource(e5, t2, n2, r2, i2 = { silent: false }) {
1674
1680
  let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e5, t2];
1675
- n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), va(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
1681
+ n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Sa(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
1676
1682
  }
1677
1683
  addResources(e5, t2, n2, r2 = { silent: false }) {
1678
- for (let r3 in n2) (G(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
1684
+ for (let r3 in n2) (W(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
1679
1685
  r2.silent || this.emit(`added`, e5, t2, n2);
1680
1686
  }
1681
1687
  addResourceBundle(e5, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
1682
1688
  let o2 = [e5, t2];
1683
1689
  e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
1684
- let s2 = ba(this.data, o2) || {};
1685
- a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Sa(s2, n2, i2) : s2 = { ...s2, ...n2 }, va(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
1690
+ let s2 = q(this.data, o2) || {};
1691
+ a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Ta(s2, n2, i2) : s2 = { ...s2, ...n2 }, Sa(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
1686
1692
  }
1687
1693
  removeResourceBundle(e5, t2) {
1688
1694
  this.hasResourceBundle(e5, t2) && delete this.data[e5][t2], this.removeNamespaces(t2), this.emit(`removed`, e5, t2);
@@ -1704,31 +1710,31 @@ var Ma = class extends ja {
1704
1710
  return this.data;
1705
1711
  }
1706
1712
  };
1707
- var Na = { processors: {}, addPostProcessor(e5) {
1713
+ var Ia = { processors: {}, addPostProcessor(e5) {
1708
1714
  this.processors[e5.name] = e5;
1709
1715
  }, handle(e5, t2, n2, r2, i2) {
1710
1716
  return e5.forEach((e6) => {
1711
1717
  t2 = this.processors[e6]?.process(t2, n2, r2, i2) ?? t2;
1712
1718
  }), t2;
1713
1719
  } };
1714
- var Pa = Symbol(`i18next/PATH_KEY`);
1715
- function Fa() {
1720
+ var La = Symbol(`i18next/PATH_KEY`);
1721
+ function Ra() {
1716
1722
  let e5 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
1717
- return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Pa ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1723
+ return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === La ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1718
1724
  }
1719
1725
  function Z(e5, t2) {
1720
- let { [Pa]: n2 } = e5(Fa()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1726
+ let { [La]: n2 } = e5(Ra()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1721
1727
  if (n2.length > 1 && i2) {
1722
1728
  let e6 = t2?.ns, a2 = Array.isArray(e6) ? e6 : null;
1723
1729
  if (a2 && a2.length > 1 && a2.slice(1).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
1724
1730
  }
1725
1731
  return n2.join(r2);
1726
1732
  }
1727
- var Ia = {};
1728
- var La = (e5) => !G(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1729
- var Ra = class e3 extends ja {
1733
+ var za = {};
1734
+ var Ba = (e5) => !W(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1735
+ var Va = class e3 extends Pa {
1730
1736
  constructor(e5, t2 = {}) {
1731
- super(), ma([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = X.create(`translator`);
1737
+ super(), va([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = X.create(`translator`);
1732
1738
  }
1733
1739
  changeLanguage(e5) {
1734
1740
  e5 && (this.language = e5);
@@ -1738,20 +1744,20 @@ var Ra = class e3 extends ja {
1738
1744
  if (e5 == null) return false;
1739
1745
  let r2 = this.resolve(e5, n2);
1740
1746
  if (r2?.res === void 0) return false;
1741
- let i2 = La(r2.res);
1747
+ let i2 = Ba(r2.res);
1742
1748
  return !(n2.returnObjects === false && i2);
1743
1749
  }
1744
1750
  extractFromKey(e5, t2) {
1745
1751
  let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
1746
1752
  n2 === void 0 && (n2 = `:`);
1747
- 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 && !Oa(e5, n2, r2);
1753
+ 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 && !ja(e5, n2, r2);
1748
1754
  if (a2 && !o2) {
1749
1755
  let t3 = e5.match(this.interpolator.nestingRegexp);
1750
- if (t3 && t3.length > 0) return { key: e5, namespaces: G(i2) ? [i2] : i2 };
1756
+ if (t3 && t3.length > 0) return { key: e5, namespaces: W(i2) ? [i2] : i2 };
1751
1757
  let a3 = e5.split(n2);
1752
1758
  (n2 !== r2 || n2 === r2 && this.options.ns.indexOf(a3[0]) > -1) && (i2 = a3.shift()), e5 = a3.join(r2);
1753
1759
  }
1754
- return { key: e5, namespaces: G(i2) ? [i2] : i2 };
1760
+ return { key: e5, namespaces: W(i2) ? [i2] : i2 };
1755
1761
  }
1756
1762
  translate(t2, n2, r2) {
1757
1763
  let i2 = typeof n2 == `object` ? { ...n2 } : n2;
@@ -1761,10 +1767,10 @@ var Ra = class e3 extends ja {
1761
1767
  u2 === void 0 && (u2 = `:`);
1762
1768
  let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
1763
1769
  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;
1764
- 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 && !G(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 }) : ``, ne2 = b2 && !i2.ordinal && i2.count === 0, S2 = ne2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${ee2}`] || i2[`defaultValue${te2}`] || i2.defaultValue, C2 = m2;
1770
+ 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 && !W(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 }) : ``, ne2 = b2 && !i2.ordinal && i2.count === 0, S2 = ne2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${ee2}`] || i2[`defaultValue${te2}`] || i2.defaultValue, C2 = m2;
1765
1771
  y2 && !m2 && x2 && (C2 = S2);
1766
- let re2 = La(C2), ie2 = Object.prototype.toString.apply(C2);
1767
- if (y2 && C2 && re2 && _2.indexOf(ie2) < 0 && !(G(v2) && Array.isArray(C2))) {
1772
+ let re2 = Ba(C2), ie2 = Object.prototype.toString.apply(C2);
1773
+ if (y2 && C2 && re2 && _2.indexOf(ie2) < 0 && !(W(v2) && Array.isArray(C2))) {
1768
1774
  if (!i2.returnObjects && !this.options.returnObjects) {
1769
1775
  this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
1770
1776
  let e5 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, C2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
@@ -1774,11 +1780,11 @@ var Ra = class e3 extends ja {
1774
1780
  let e5 = Array.isArray(C2), t3 = e5 ? [] : {}, n3 = e5 ? g2 : h2;
1775
1781
  for (let e6 in C2) if (Object.prototype.hasOwnProperty.call(C2, e6)) {
1776
1782
  let r3 = `${n3}${o2}${e6}`;
1777
- t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: La(S2) ? S2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = C2[e6]);
1783
+ t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Ba(S2) ? S2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = C2[e6]);
1778
1784
  }
1779
1785
  m2 = t3;
1780
1786
  }
1781
- } else if (y2 && G(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1787
+ } else if (y2 && W(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1782
1788
  else {
1783
1789
  let e5 = false, n3 = false;
1784
1790
  !this.isValidLookup(m2) && x2 && (e5 = true, m2 = S2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
@@ -1810,32 +1816,32 @@ var Ra = class e3 extends ja {
1810
1816
  if (this.i18nFormat?.parse) e5 = this.i18nFormat.parse(e5, { ...this.options.interpolation.defaultVariables, ...n2 }, n2.lng || this.language || r2.usedLng, r2.usedNS, r2.usedKey, { resolved: r2 });
1811
1817
  else if (!n2.skipInterpolation) {
1812
1818
  n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
1813
- let a3 = G(e5) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1819
+ let a3 = W(e5) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1814
1820
  if (a3) {
1815
1821
  let t3 = e5.match(this.interpolator.nestingRegexp);
1816
1822
  o3 = t3 && t3.length;
1817
1823
  }
1818
- let s2 = n2.replace && !G(n2.replace) ? n2.replace : n2;
1824
+ let s2 = n2.replace && !W(n2.replace) ? n2.replace : n2;
1819
1825
  if (this.options.interpolation.defaultVariables && (s2 = { ...this.options.interpolation.defaultVariables, ...s2 }), e5 = this.interpolator.interpolate(e5, s2, n2.lng || this.language || r2.usedLng, n2), a3) {
1820
1826
  let t3 = e5.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
1821
1827
  o3 < r3 && (n2.nest = false);
1822
1828
  }
1823
1829
  !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();
1824
1830
  }
1825
- let a2 = n2.postProcess || this.options.postProcess, o2 = G(a2) ? [a2] : a2;
1826
- return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = Na.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
1831
+ let a2 = n2.postProcess || this.options.postProcess, o2 = W(a2) ? [a2] : a2;
1832
+ return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = Ia.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
1827
1833
  }
1828
1834
  resolve(e5, t2 = {}) {
1829
1835
  let n2, r2, i2, a2, o2;
1830
- return G(e5) && (e5 = [e5]), Array.isArray(e5) && (e5 = e5.map((e6) => typeof e6 == `function` ? Z(e6, { ...this.options, ...t2 }) : e6)), e5.forEach((e6) => {
1836
+ return W(e5) && (e5 = [e5]), Array.isArray(e5) && (e5 = e5.map((e6) => typeof e6 == `function` ? Z(e6, { ...this.options, ...t2 }) : e6)), e5.forEach((e6) => {
1831
1837
  if (this.isValidLookup(n2)) return;
1832
1838
  let s2 = this.extractFromKey(e6, t2), c2 = s2.key;
1833
1839
  r2 = c2;
1834
1840
  let l2 = s2.namespaces;
1835
1841
  this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
1836
- let u2 = t2.count !== void 0 && !G(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (G(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1842
+ let u2 = t2.count !== void 0 && !W(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (W(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1837
1843
  l2.forEach((e7) => {
1838
- this.isValidLookup(n2) || (o2 = e7, !Ia[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (Ia[`${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) => {
1844
+ this.isValidLookup(n2) || (o2 = e7, !za[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (za[`${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) => {
1839
1845
  if (this.isValidLookup(n2)) return;
1840
1846
  a2 = r3;
1841
1847
  let o3 = [c2];
@@ -1862,7 +1868,7 @@ var Ra = class e3 extends ja {
1862
1868
  return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e5, t2, n2, r2) : this.resourceStore.getResource(e5, t2, n2, r2);
1863
1869
  }
1864
1870
  getUsedParamsDetails(e5 = {}) {
1865
- let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e5.replace && !G(e5.replace), r2 = n2 ? e5.replace : e5;
1871
+ let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e5.replace && !W(e5.replace), r2 = n2 ? e5.replace : e5;
1866
1872
  if (n2 && e5.count !== void 0 && (r2.count = e5.count), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
1867
1873
  r2 = { ...r2 };
1868
1874
  for (let e6 of t2) delete r2[e6];
@@ -1874,7 +1880,7 @@ var Ra = class e3 extends ja {
1874
1880
  return false;
1875
1881
  }
1876
1882
  };
1877
- var za = class {
1883
+ var Ha = class {
1878
1884
  constructor(e5) {
1879
1885
  this.options = e5, this.supportedLngs = this.options.supportedLngs || false, this.logger = X.create(`languageUtils`);
1880
1886
  }
@@ -1889,7 +1895,7 @@ var za = class {
1889
1895
  return this.formatLanguageCode(t2[0]);
1890
1896
  }
1891
1897
  formatLanguageCode(e5) {
1892
- if (G(e5) && e5.indexOf(`-`) > -1) {
1898
+ if (W(e5) && e5.indexOf(`-`) > -1) {
1893
1899
  let t2;
1894
1900
  try {
1895
1901
  t2 = Intl.getCanonicalLocales(e5)[0];
@@ -1922,7 +1928,7 @@ var za = class {
1922
1928
  }
1923
1929
  getFallbackCodes(e5, t2) {
1924
1930
  if (!e5) return [];
1925
- if (typeof e5 == `function` && (e5 = e5(t2)), G(e5) && (e5 = [e5]), Array.isArray(e5)) return e5;
1931
+ if (typeof e5 == `function` && (e5 = e5(t2)), W(e5) && (e5 = [e5]), Array.isArray(e5)) return e5;
1926
1932
  if (!t2) return e5.default || [];
1927
1933
  let n2 = e5[t2];
1928
1934
  return n2 ||= e5[this.getScriptPartFromCode(t2)], n2 ||= e5[this.formatLanguageCode(t2)], n2 ||= e5[this.getLanguagePartFromCode(t2)], n2 ||= e5.default, n2 || [];
@@ -1931,14 +1937,14 @@ var za = class {
1931
1937
  let n2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e5), r2 = [], i2 = (e6) => {
1932
1938
  e6 && (this.isSupportedCode(e6) ? r2.push(e6) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e6}`));
1933
1939
  };
1934
- return G(e5) && (e5.indexOf(`-`) > -1 || e5.indexOf(`_`) > -1) ? (this.options.load !== `languageOnly` && i2(this.formatLanguageCode(e5)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && i2(this.getScriptPartFromCode(e5)), this.options.load !== `currentOnly` && i2(this.getLanguagePartFromCode(e5))) : G(e5) && i2(this.formatLanguageCode(e5)), n2.forEach((e6) => {
1940
+ return W(e5) && (e5.indexOf(`-`) > -1 || e5.indexOf(`_`) > -1) ? (this.options.load !== `languageOnly` && i2(this.formatLanguageCode(e5)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && i2(this.getScriptPartFromCode(e5)), this.options.load !== `currentOnly` && i2(this.getLanguagePartFromCode(e5))) : W(e5) && i2(this.formatLanguageCode(e5)), n2.forEach((e6) => {
1935
1941
  r2.indexOf(e6) < 0 && i2(this.formatLanguageCode(e6));
1936
1942
  }), r2;
1937
1943
  }
1938
1944
  };
1939
- var Ba = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1940
- var Va = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1941
- var Ha = class {
1945
+ var Ua = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1946
+ var Wa = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1947
+ var Ga = class {
1942
1948
  constructor(e5, t2 = {}) {
1943
1949
  this.languageUtils = e5, this.options = t2, this.logger = X.create(`pluralResolver`), this.pluralRulesCache = {};
1944
1950
  }
@@ -1952,8 +1958,8 @@ var Ha = class {
1952
1958
  try {
1953
1959
  a2 = new Intl.PluralRules(n2, { type: r2 });
1954
1960
  } catch {
1955
- if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), Va;
1956
- if (!e5.match(/-|_/)) return Va;
1961
+ if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), Wa;
1962
+ if (!e5.match(/-|_/)) return Wa;
1957
1963
  let n3 = this.languageUtils.getLanguagePartFromCode(e5);
1958
1964
  a2 = this.getRule(n3, t2);
1959
1965
  }
@@ -1968,26 +1974,26 @@ var Ha = class {
1968
1974
  }
1969
1975
  getSuffixes(e5, t2 = {}) {
1970
1976
  let n2 = this.getRule(e5, t2);
1971
- return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => Ba[e6] - Ba[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
1977
+ return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => Ua[e6] - Ua[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
1972
1978
  }
1973
1979
  getSuffix(e5, t2, n2 = {}) {
1974
1980
  let r2 = this.getRule(e5, n2);
1975
1981
  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));
1976
1982
  }
1977
1983
  };
1978
- var Ua = (e5, t2, n2, r2 = `.`, i2 = true) => {
1979
- let a2 = xa(e5, t2, n2);
1980
- return !a2 && i2 && G(n2) && (a2 = ka(e5, n2, r2), a2 === void 0 && (a2 = ka(t2, n2, r2))), a2;
1984
+ var Ka = (e5, t2, n2, r2 = `.`, i2 = true) => {
1985
+ let a2 = wa(e5, t2, n2);
1986
+ return !a2 && i2 && W(n2) && (a2 = Ma(e5, n2, r2), a2 === void 0 && (a2 = Ma(t2, n2, r2))), a2;
1981
1987
  };
1982
- var Wa = (e5) => e5.replace(/\$/g, `$$$$`);
1983
- var Ga = class {
1988
+ var qa = (e5) => e5.replace(/\$/g, `$$$$`);
1989
+ var Ja = class {
1984
1990
  constructor(e5 = {}) {
1985
1991
  this.logger = X.create(`interpolator`), this.options = e5, this.format = e5?.interpolation?.format || ((e6) => e6), this.init(e5);
1986
1992
  }
1987
1993
  init(e5 = {}) {
1988
1994
  e5.interpolation ||= { escapeValue: true };
1989
1995
  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;
1990
- this.escape = t2 === void 0 ? wa : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? J(i2) : a2 || `{{`, this.suffix = o2 ? J(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? J(d2) : f2 || J(`$t(`), this.nestingSuffix = p2 ? J(p2) : m2 || J(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1996
+ this.escape = t2 === void 0 ? Da : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? J(i2) : a2 || `{{`, this.suffix = o2 ? J(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? J(d2) : f2 || J(`$t(`), this.nestingSuffix = p2 ? J(p2) : m2 || J(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1991
1997
  }
1992
1998
  reset() {
1993
1999
  this.options && this.init(this.options);
@@ -1999,27 +2005,27 @@ var Ga = class {
1999
2005
  interpolate(e5, t2, n2, r2) {
2000
2006
  let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e6) => {
2001
2007
  if (e6.indexOf(this.formatSeparator) < 0) {
2002
- let i4 = Ua(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
2008
+ let i4 = Ka(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
2003
2009
  return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e6 }) : i4;
2004
2010
  }
2005
2011
  let i3 = e6.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
2006
- return this.format(Ua(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
2012
+ return this.format(Ka(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
2007
2013
  };
2008
2014
  this.resetRegExp();
2009
2015
  let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
2010
- return [{ regex: this.regexpUnescape, safeValue: (e6) => Wa(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? Wa(this.escape(e6)) : Wa(e6) }].forEach((t3) => {
2016
+ return [{ regex: this.regexpUnescape, safeValue: (e6) => qa(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? qa(this.escape(e6)) : qa(e6) }].forEach((t3) => {
2011
2017
  for (o2 = 0; i2 = t3.regex.exec(e5); ) {
2012
2018
  let n3 = i2[1].trim();
2013
2019
  if (a2 = c2(n3), a2 === void 0) {
2014
2020
  if (typeof l2 == `function`) {
2015
2021
  let t4 = l2(e5, i2, r2);
2016
- a2 = G(t4) ? t4 : ``;
2022
+ a2 = W(t4) ? t4 : ``;
2017
2023
  } else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
2018
2024
  else if (u2) {
2019
2025
  a2 = i2[0];
2020
2026
  continue;
2021
2027
  } else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e5}`), a2 = ``;
2022
- } else !G(a2) && !this.useRawValueToEscape && (a2 = pa(a2));
2028
+ } else !W(a2) && !this.useRawValueToEscape && (a2 = _a(a2));
2023
2029
  let s3 = t3.safeValue(a2);
2024
2030
  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;
2025
2031
  }
@@ -2042,15 +2048,15 @@ var Ga = class {
2042
2048
  };
2043
2049
  for (; r2 = this.nestingRegexp.exec(e5); ) {
2044
2050
  let s2 = [];
2045
- a2 = { ...n2 }, a2 = a2.replace && !G(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
2051
+ a2 = { ...n2 }, a2 = a2.replace && !W(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
2046
2052
  let c2 = /{.*}/.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
2047
- 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 && !G(i2)) return i2;
2048
- G(i2) || (i2 = pa(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;
2053
+ 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 && !W(i2)) return i2;
2054
+ W(i2) || (i2 = _a(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;
2049
2055
  }
2050
2056
  return e5;
2051
2057
  }
2052
2058
  };
2053
- var Ka = (e5) => {
2059
+ var Ya = (e5) => {
2054
2060
  let t2 = e5.toLowerCase().trim(), n2 = {};
2055
2061
  if (e5.indexOf(`(`) > -1) {
2056
2062
  let r2 = e5.split(`(`);
@@ -2065,7 +2071,7 @@ var Ka = (e5) => {
2065
2071
  }
2066
2072
  return { formatName: t2, formatOptions: n2 };
2067
2073
  };
2068
- var qa = (e5) => {
2074
+ var Xa = (e5) => {
2069
2075
  let t2 = {};
2070
2076
  return (n2, r2, i2) => {
2071
2077
  let a2 = i2;
@@ -2074,14 +2080,14 @@ var qa = (e5) => {
2074
2080
  return s2 || (s2 = e5(Y(r2), i2), t2[o2] = s2), s2(n2);
2075
2081
  };
2076
2082
  };
2077
- var Ja = (e5) => (t2, n2, r2) => e5(Y(n2), r2)(t2);
2078
- var Ya = class {
2083
+ var Za = (e5) => (t2, n2, r2) => e5(Y(n2), r2)(t2);
2084
+ var Qa = class {
2079
2085
  constructor(e5 = {}) {
2080
2086
  this.logger = X.create(`formatter`), this.options = e5, this.init(e5);
2081
2087
  }
2082
2088
  init(e5, t2 = { interpolation: {} }) {
2083
2089
  this.formatSeparator = t2.interpolation.formatSeparator || `,`;
2084
- let n2 = t2.cacheInBuiltFormats ? qa : Ja;
2090
+ let n2 = t2.cacheInBuiltFormats ? Xa : Za;
2085
2091
  this.formats = { number: n2((e6, t3) => {
2086
2092
  let n3 = new Intl.NumberFormat(e6, { ...t3 });
2087
2093
  return (e7) => n3.format(e7);
@@ -2103,7 +2109,7 @@ var Ya = class {
2103
2109
  this.formats[e5.toLowerCase().trim()] = t2;
2104
2110
  }
2105
2111
  addCached(e5, t2) {
2106
- this.formats[e5.toLowerCase().trim()] = qa(t2);
2112
+ this.formats[e5.toLowerCase().trim()] = Xa(t2);
2107
2113
  }
2108
2114
  format(e5, t2, n2, r2 = {}) {
2109
2115
  let i2 = t2.split(this.formatSeparator);
@@ -2112,7 +2118,7 @@ var Ya = class {
2112
2118
  i2[0] = [i2[0], ...i2.splice(1, e6)].join(this.formatSeparator);
2113
2119
  }
2114
2120
  return i2.reduce((e6, t3) => {
2115
- let { formatName: i3, formatOptions: a2 } = Ka(t3);
2121
+ let { formatName: i3, formatOptions: a2 } = Ya(t3);
2116
2122
  if (this.formats[i3]) {
2117
2123
  let t4 = e6;
2118
2124
  try {
@@ -2127,10 +2133,10 @@ var Ya = class {
2127
2133
  }, e5);
2128
2134
  }
2129
2135
  };
2130
- var Xa = (e5, t2) => {
2136
+ var $a = (e5, t2) => {
2131
2137
  e5.pending[t2] !== void 0 && (delete e5.pending[t2], e5.pendingCount--);
2132
2138
  };
2133
- var Za = class extends ja {
2139
+ var eo = class extends Pa {
2134
2140
  constructor(e5, t2, n2, r2 = {}) {
2135
2141
  super(), this.backend = e5, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = X.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);
2136
2142
  }
@@ -2149,7 +2155,7 @@ var Za = class extends ja {
2149
2155
  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);
2150
2156
  let o2 = {};
2151
2157
  this.queue.forEach((n3) => {
2152
- ya(n3.loaded, [i2], a2), Xa(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
2158
+ Ca(n3.loaded, [i2], a2), $a(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
2153
2159
  o2[e6] || (o2[e6] = {});
2154
2160
  let t3 = n3.loaded[e6];
2155
2161
  t3.length && t3.forEach((t4) => {
@@ -2191,7 +2197,7 @@ var Za = class extends ja {
2191
2197
  }
2192
2198
  prepareLoading(e5, t2, n2 = {}, r2) {
2193
2199
  if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
2194
- G(e5) && (e5 = this.languageUtils.toResolveHierarchy(e5)), G(t2) && (t2 = [t2]);
2200
+ W(e5) && (e5 = this.languageUtils.toResolveHierarchy(e5)), W(t2) && (t2 = [t2]);
2195
2201
  let i2 = this.queueLoad(e5, t2, n2, r2);
2196
2202
  if (!i2.toLoad.length) return i2.pending.length || r2(), null;
2197
2203
  i2.toLoad.forEach((e6) => {
@@ -2231,9 +2237,9 @@ var Za = class extends ja {
2231
2237
  }
2232
2238
  }
2233
2239
  };
2234
- var Qa = () => ({ 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) => {
2240
+ var to = () => ({ 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) => {
2235
2241
  let t2 = {};
2236
- if (typeof e5[1] == `object` && (t2 = e5[1]), G(e5[1]) && (t2.defaultValue = e5[1]), G(e5[2]) && (t2.tDescription = e5[2]), typeof e5[2] == `object` || typeof e5[3] == `object`) {
2242
+ if (typeof e5[1] == `object` && (t2 = e5[1]), W(e5[1]) && (t2.defaultValue = e5[1]), W(e5[2]) && (t2.tDescription = e5[2]), typeof e5[2] == `object` || typeof e5[3] == `object`) {
2237
2243
  let n2 = e5[3] || e5[2];
2238
2244
  Object.keys(n2).forEach((e6) => {
2239
2245
  t2[e6] = n2[e6];
@@ -2241,23 +2247,23 @@ var Qa = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
2241
2247
  }
2242
2248
  return t2;
2243
2249
  }, interpolation: { escapeValue: true, format: (e5) => e5, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
2244
- var $a = (e5) => (G(e5.ns) && (e5.ns = [e5.ns]), G(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), G(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);
2245
- var eo = () => {
2250
+ var no = (e5) => (W(e5.ns) && (e5.ns = [e5.ns]), W(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), W(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);
2251
+ var ro = () => {
2246
2252
  };
2247
- var to = (e5) => {
2253
+ var io = (e5) => {
2248
2254
  Object.getOwnPropertyNames(Object.getPrototypeOf(e5)).forEach((t2) => {
2249
2255
  typeof e5[t2] == `function` && (e5[t2] = e5[t2].bind(e5));
2250
2256
  });
2251
2257
  };
2252
- var no = `__i18next_supportNoticeShown`;
2253
- var ro = () => !!(typeof globalThis < `u` && globalThis[no] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
2254
- var io = () => {
2255
- typeof globalThis < `u` && (globalThis[no] = true);
2258
+ var ao = `__i18next_supportNoticeShown`;
2259
+ var oo = () => !!(typeof globalThis < `u` && globalThis[ao] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
2260
+ var so = () => {
2261
+ typeof globalThis < `u` && (globalThis[ao] = true);
2256
2262
  };
2257
- var ao = (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));
2258
- var Q = class e4 extends ja {
2263
+ var co = (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));
2264
+ var Q = class e4 extends Pa {
2259
2265
  constructor(e5 = {}, t2) {
2260
- if (super(), this.options = $a(e5), this.services = {}, this.logger = X, this.modules = { external: [] }, to(this), t2 && !this.isInitialized && !e5.isClone) {
2266
+ if (super(), this.options = no(e5), this.services = {}, this.logger = X, this.modules = { external: [] }, io(this), t2 && !this.isInitialized && !e5.isClone) {
2261
2267
  if (!this.options.initAsync) return this.init(e5, t2), this;
2262
2268
  setTimeout(() => {
2263
2269
  this.init(e5, t2);
@@ -2265,26 +2271,26 @@ var Q = class e4 extends ja {
2265
2271
  }
2266
2272
  }
2267
2273
  init(e5 = {}, t2) {
2268
- this.isInitializing = true, typeof e5 == `function` && (t2 = e5, e5 = {}), e5.defaultNS == null && e5.ns && (G(e5.ns) ? e5.defaultNS = e5.ns : e5.ns.indexOf(`translation`) < 0 && (e5.defaultNS = e5.ns[0]));
2269
- let n2 = Qa();
2270
- this.options = { ...n2, ...this.options, ...$a(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 && !ao(this) && !ro() && (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}`), io());
2274
+ this.isInitializing = true, typeof e5 == `function` && (t2 = e5, e5 = {}), e5.defaultNS == null && e5.ns && (W(e5.ns) ? e5.defaultNS = e5.ns : e5.ns.indexOf(`translation`) < 0 && (e5.defaultNS = e5.ns[0]));
2275
+ let n2 = to();
2276
+ this.options = { ...n2, ...this.options, ...no(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 && !co(this) && !oo() && (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}`), so());
2271
2277
  let r2 = (e6) => e6 ? typeof e6 == `function` ? new e6() : e6 : null;
2272
2278
  if (!this.options.isClone) {
2273
2279
  this.modules.logger ? X.init(r2(this.modules.logger), this.options) : X.init(null, this.options);
2274
2280
  let e6;
2275
- e6 = this.modules.formatter ? this.modules.formatter : Ya;
2276
- let t3 = new za(this.options);
2277
- this.store = new Ma(this.options.resources, this.options);
2281
+ e6 = this.modules.formatter ? this.modules.formatter : Qa;
2282
+ let t3 = new Ha(this.options);
2283
+ this.store = new Fa(this.options.resources, this.options);
2278
2284
  let i3 = this.services;
2279
- i3.logger = X, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new Ha(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 Ga(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new Za(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
2285
+ i3.logger = X, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new Ga(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 Ja(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new eo(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
2280
2286
  this.emit(e7, ...t4);
2281
- }), 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 Ra(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
2287
+ }), 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 Va(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
2282
2288
  this.emit(e7, ...t4);
2283
2289
  }), this.modules.external.forEach((e7) => {
2284
2290
  e7.init && e7.init(this);
2285
2291
  });
2286
2292
  }
2287
- if (this.format = this.options.interpolation.format, t2 ||= eo, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2293
+ if (this.format = this.options.interpolation.format, t2 ||= ro, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2288
2294
  let e6 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
2289
2295
  e6.length > 0 && e6[0] !== `dev` && (this.options.lng = e6[0]);
2290
2296
  }
@@ -2293,7 +2299,7 @@ var Q = class e4 extends ja {
2293
2299
  }), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e6) => {
2294
2300
  this[e6] = (...t3) => (this.store[e6](...t3), this);
2295
2301
  });
2296
- let i2 = K(), a2 = () => {
2302
+ let i2 = G(), a2 = () => {
2297
2303
  let e6 = (e7, n3) => {
2298
2304
  this.isInitializing = false, this.isInitialized && !this.initializedStoreOnce && this.logger.warn(`init: i18next is already initialized. You should call init just once!`), this.isInitialized = true, this.options.isClone || this.logger.log(`initialized`, this.options), this.emit(`initialized`, this.options), i2.resolve(n3), t2(e7, n3);
2299
2305
  };
@@ -2302,8 +2308,8 @@ var Q = class e4 extends ja {
2302
2308
  };
2303
2309
  return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
2304
2310
  }
2305
- loadResources(e5, t2 = eo) {
2306
- let n2 = t2, r2 = G(e5) ? e5 : this.language;
2311
+ loadResources(e5, t2 = ro) {
2312
+ let n2 = t2, r2 = W(e5) ? e5 : this.language;
2307
2313
  if (typeof e5 == `function` && (n2 = e5), !this.options.resources || this.options.partialBundledLanguages) {
2308
2314
  if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
2309
2315
  let e6 = [], t3 = (t4) => {
@@ -2317,15 +2323,15 @@ var Q = class e4 extends ja {
2317
2323
  } else n2(null);
2318
2324
  }
2319
2325
  reloadResources(e5, t2, n2) {
2320
- let r2 = K();
2321
- return typeof e5 == `function` && (n2 = e5, e5 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e5 ||= this.languages, t2 ||= this.options.ns, n2 ||= eo, this.services.backendConnector.reload(e5, t2, (e6) => {
2326
+ let r2 = G();
2327
+ return typeof e5 == `function` && (n2 = e5, e5 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e5 ||= this.languages, t2 ||= this.options.ns, n2 ||= ro, this.services.backendConnector.reload(e5, t2, (e6) => {
2322
2328
  r2.resolve(), n2(e6);
2323
2329
  }), r2;
2324
2330
  }
2325
2331
  use(e5) {
2326
2332
  if (!e5) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
2327
2333
  if (!e5.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
2328
- 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` && Na.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
2334
+ 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` && Ia.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
2329
2335
  }
2330
2336
  setResolvedLanguage(e5) {
2331
2337
  if (e5 && this.languages && !([`cimode`, `dev`].indexOf(e5) > -1)) {
@@ -2341,7 +2347,7 @@ var Q = class e4 extends ja {
2341
2347
  }
2342
2348
  changeLanguage(e5, t2) {
2343
2349
  this.isLanguageChangingTo = e5;
2344
- let n2 = K();
2350
+ let n2 = G();
2345
2351
  this.emit(`languageChanging`, e5);
2346
2352
  let r2 = (e6) => {
2347
2353
  this.language = e6, this.languages = this.services.languageUtils.toResolveHierarchy(e6), this.resolvedLanguage = void 0, this.setResolvedLanguage(e6);
@@ -2349,7 +2355,7 @@ var Q = class e4 extends ja {
2349
2355
  a3 ? this.isLanguageChangingTo === e5 && (r2(a3), this.translator.changeLanguage(a3), this.isLanguageChangingTo = void 0, this.emit(`languageChanged`, a3), this.logger.log(`languageChanged`, a3)) : this.isLanguageChangingTo = void 0, n2.resolve((...e6) => this.t(...e6)), t2 && t2(i3, (...e6) => this.t(...e6));
2350
2356
  }, a2 = (t3) => {
2351
2357
  !e5 && !t3 && this.services.languageDetector && (t3 = []);
2352
- let n3 = G(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(G(t3) ? [t3] : t3);
2358
+ let n3 = W(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(W(t3) ? [t3] : t3);
2353
2359
  a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e6) => {
2354
2360
  i2(e6, a3);
2355
2361
  });
@@ -2365,7 +2371,7 @@ var Q = class e4 extends ja {
2365
2371
  let s2 = this.options.keySeparator || `.`, c2;
2366
2372
  return a2.keyPrefix && Array.isArray(e6) ? c2 = e6.map((e7) => (typeof e7 == `function` && (e7 = Z(e7, o2)), `${a2.keyPrefix}${s2}${e7}`)) : (typeof e6 == `function` && (e6 = Z(e6, o2)), c2 = a2.keyPrefix ? `${a2.keyPrefix}${s2}${e6}` : e6), this.t(c2, a2);
2367
2373
  };
2368
- return G(e5) ? r2.lng = e5 : r2.lngs = e5, r2.ns = t2, r2.keyPrefix = n2, r2;
2374
+ return W(e5) ? r2.lng = e5 : r2.lngs = e5, r2.ns = t2, r2.keyPrefix = n2, r2;
2369
2375
  }
2370
2376
  t(...e5) {
2371
2377
  return this.translator?.translate(...e5);
@@ -2392,16 +2398,16 @@ var Q = class e4 extends ja {
2392
2398
  return !!(this.hasResourceBundle(n2, e5) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a2(n2, e5) && (!r2 || a2(i2, e5)));
2393
2399
  }
2394
2400
  loadNamespaces(e5, t2) {
2395
- let n2 = K();
2396
- return this.options.ns ? (G(e5) && (e5 = [e5]), e5.forEach((e6) => {
2401
+ let n2 = G();
2402
+ return this.options.ns ? (W(e5) && (e5 = [e5]), e5.forEach((e6) => {
2397
2403
  this.options.ns.indexOf(e6) < 0 && this.options.ns.push(e6);
2398
2404
  }), this.loadResources((e6) => {
2399
2405
  n2.resolve(), t2 && t2(e6);
2400
2406
  }), n2) : (t2 && t2(), Promise.resolve());
2401
2407
  }
2402
2408
  loadLanguages(e5, t2) {
2403
- let n2 = K();
2404
- G(e5) && (e5 = [e5]);
2409
+ let n2 = G();
2410
+ W(e5) && (e5 = [e5]);
2405
2411
  let r2 = this.options.preload || [], i2 = e5.filter((e6) => r2.indexOf(e6) < 0 && this.services.languageUtils.isSupportedCode(e6));
2406
2412
  return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e6) => {
2407
2413
  n2.resolve(), t2 && t2(e6);
@@ -2417,24 +2423,24 @@ var Q = class e4 extends ja {
2417
2423
  }
2418
2424
  } catch {
2419
2425
  }
2420
- 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 za(Qa());
2426
+ 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 Ha(to());
2421
2427
  return e5.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.indexOf(n2.getLanguagePartFromCode(e5)) > -1 || e5.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
2422
2428
  }
2423
2429
  static createInstance(t2 = {}, n2) {
2424
2430
  let r2 = new e4(t2, n2);
2425
2431
  return r2.createInstance = e4.createInstance, r2;
2426
2432
  }
2427
- cloneInstance(t2 = {}, n2 = eo) {
2433
+ cloneInstance(t2 = {}, n2 = ro) {
2428
2434
  let r2 = t2.forkResourceStore;
2429
2435
  r2 && delete t2.forkResourceStore;
2430
2436
  let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
2431
2437
  if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e5) => {
2432
2438
  a2[e5] = this[e5];
2433
- }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Ma(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) {
2434
- let e5 = { ...Qa().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
2435
- a2.services.interpolator = new Ga(n3);
2439
+ }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Fa(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) {
2440
+ let e5 = { ...to().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
2441
+ a2.services.interpolator = new Ja(n3);
2436
2442
  }
2437
- return a2.translator = new Ra(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
2443
+ return a2.translator = new Va(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
2438
2444
  a2.emit(e5, ...t3);
2439
2445
  }), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
2440
2446
  }
@@ -2443,53 +2449,53 @@ var Q = class e4 extends ja {
2443
2449
  }
2444
2450
  }.createInstance();
2445
2451
  Q.createInstance, Q.dir, Q.init, Q.loadResources, Q.reloadResources, Q.use, Q.changeLanguage, Q.getFixedT, Q.t, Q.exists, Q.setDefaultNamespace, Q.hasLoadedNamespace, Q.loadNamespaces, Q.loadLanguages;
2446
- var oo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
2447
- var so = { "&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;": `/` };
2448
- var co = (e5) => so[e5];
2449
- var lo = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(oo, co), transDefaultProps: void 0 };
2450
- var uo = (e5 = {}) => {
2451
- lo = { ...lo, ...e5 };
2452
+ var lo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
2453
+ var uo = { "&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;": `/` };
2454
+ var fo = (e5) => uo[e5];
2455
+ var po = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(lo, fo), transDefaultProps: void 0 };
2456
+ var mo = (e5 = {}) => {
2457
+ po = { ...po, ...e5 };
2452
2458
  };
2453
- var fo = { type: `3rdParty`, init(e5) {
2454
- uo(e5.options.react);
2459
+ var ho = { type: `3rdParty`, init(e5) {
2460
+ mo(e5.options.react);
2455
2461
  } };
2456
- var po = /* @__PURE__ */ new Map();
2457
- var mo = 500;
2458
- var $;
2459
- function ho() {
2460
- if ($ === void 0) try {
2461
- $ = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
2462
+ var go = /* @__PURE__ */ new Map();
2463
+ var _o = 500;
2464
+ var vo;
2465
+ function yo() {
2466
+ if (vo === void 0) try {
2467
+ vo = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
2462
2468
  } catch {
2463
- $ = false;
2469
+ vo = false;
2464
2470
  }
2465
- return $;
2471
+ return vo;
2466
2472
  }
2467
- var go = 15;
2468
- function _o(e5) {
2469
- if (!(typeof e5 != `string` || ho()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > go) 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.`);
2473
+ var bo = 15;
2474
+ function xo(e5) {
2475
+ if (!(typeof e5 != `string` || yo()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > bo) 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.`);
2470
2476
  }
2471
- function vo(e5, t2, n2) {
2477
+ function So(e5, t2, n2) {
2472
2478
  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(`&`)}`;
2473
2479
  }
2474
- function yo(e5, t2, n2) {
2475
- let r2 = vo(e5, t2, n2), i2 = po.get(r2);
2476
- return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), po.size >= mo && po.clear(), po.set(r2, i2)), i2;
2480
+ function Co(e5, t2, n2) {
2481
+ let r2 = So(e5, t2, n2), i2 = go.get(r2);
2482
+ return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), go.size >= _o && go.clear(), go.set(r2, i2)), i2;
2477
2483
  }
2478
- function bo(e5, { value: t2, currency: n2 }, r2 = {}) {
2479
- return _o(t2), yo(e5, n2, r2).format(t2);
2484
+ function wo(e5, { value: t2, currency: n2 }, r2 = {}) {
2485
+ return xo(t2), Co(e5, n2, r2).format(t2);
2480
2486
  }
2481
- function xo(e5, { value: t2, currency: n2 }, r2 = {}) {
2482
- return _o(t2), yo(e5, n2, r2).formatToParts(t2);
2487
+ function To(e5, { value: t2, currency: n2 }, r2 = {}) {
2488
+ return xo(t2), Co(e5, n2, r2).formatToParts(t2);
2483
2489
  }
2484
- function So(e5) {
2485
- return Ni().find((e6) => e6.primary)?.id ?? e5;
2490
+ function Eo(e5) {
2491
+ return Fi().find((e6) => e6.primary)?.id ?? e5;
2486
2492
  }
2487
- function Co(e5, t2) {
2493
+ function Do(e5, t2) {
2488
2494
  let { locale: n2, ...r2 } = t2 ?? {}, i2 = n2 ?? e5.essentials?.locale;
2489
2495
  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.`);
2490
2496
  return { locale: i2, formatOptions: r2 };
2491
2497
  }
2492
- var wo = fa({ getLanguage: (e5) => () => {
2498
+ var Oo = ga({ getLanguage: (e5) => () => {
2493
2499
  let t2 = e5.essentials?.language;
2494
2500
  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.`);
2495
2501
  return t2;
@@ -2498,20 +2504,20 @@ var wo = fa({ getLanguage: (e5) => () => {
2498
2504
  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.`);
2499
2505
  return t2;
2500
2506
  }, formatCurrency: (e5) => (t2, n2) => {
2501
- let { locale: r2, formatOptions: i2 } = Co(e5, n2);
2502
- return bo(r2, t2, i2);
2507
+ let { locale: r2, formatOptions: i2 } = Do(e5, n2);
2508
+ return wo(r2, t2, i2);
2503
2509
  }, formatCurrencyToParts: (e5) => (t2, n2) => {
2504
- let { locale: r2, formatOptions: i2 } = Co(e5, n2);
2505
- return xo(r2, t2, i2);
2510
+ let { locale: r2, formatOptions: i2 } = Do(e5, n2);
2511
+ return To(r2, t2, i2);
2506
2512
  }, getTranslationFunction: (e5) => () => {
2507
2513
  let t2 = e5.translations?.();
2508
2514
  if (!t2) throw Error(`Host translation resources are not available.`);
2509
- let n2 = Q.createInstance(), r2 = So(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
2510
- return n2.use(fo).init(i2, (e6) => {
2515
+ let n2 = Q.createInstance(), r2 = Eo(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
2516
+ return n2.use(ho).init(i2, (e6) => {
2511
2517
  if (e6) throw e6;
2512
2518
  }), n2.t.bind(n2);
2513
2519
  } });
2514
- var To = class {
2520
+ var ko = class {
2515
2521
  constructor(e5) {
2516
2522
  this.message = e5, this.captureException = () => {
2517
2523
  console.error(this.message);
@@ -2526,93 +2532,97 @@ var To = class {
2526
2532
  };
2527
2533
  }
2528
2534
  };
2529
- var Eo = (e5) => new To(e5);
2530
- var Do = fa({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : Eo(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
2531
- var Oo = { 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` };
2532
- function ko(e5) {
2535
+ var Ao = (e5) => new ko(e5);
2536
+ var jo = ga({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : Ao(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
2537
+ var Mo = { 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` };
2538
+ function No(e5) {
2533
2539
  try {
2534
- let t2 = Do.getMonitoringClient?.();
2540
+ let t2 = jo.getMonitoringClient?.();
2535
2541
  return t2 && typeof t2[e5] == `function` ? t2 : null;
2536
2542
  } catch {
2537
2543
  return null;
2538
2544
  }
2539
2545
  }
2540
- function Ao(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2541
- let a2 = ko(`captureException`);
2546
+ function Po(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2547
+ let a2 = No(`captureException`);
2542
2548
  if (!a2) return;
2543
2549
  let o2 = e5 instanceof Error ? e5 : Error(String(e5));
2544
2550
  a2.captureException(o2, { level: r2, tags: { feature: t2, action: n2 }, ...i2 ? { contexts: i2 } : {} });
2545
2551
  }
2546
- function jo(e5, { feature: t2, tags: n2 }, r2) {
2547
- let i2 = ko(`startSpanManual`);
2552
+ function Fo(e5, { feature: t2, tags: n2 }, r2) {
2553
+ let i2 = No(`startSpanManual`);
2548
2554
  if (!i2) return r2;
2549
2555
  let a2 = i2.startSpanManual({ name: e5, tags: { feature: t2, ...n2 } });
2550
2556
  return r2.then(() => a2.end(), (e6) => a2.fail(e6)), r2;
2551
2557
  }
2552
- var Mo = class extends e {
2558
+ var Io = class extends e {
2553
2559
  state = { hasError: false };
2554
2560
  static getDerivedStateFromError() {
2555
2561
  return { hasError: true };
2556
2562
  }
2557
2563
  componentDidCatch(e5, t2) {
2558
- Ao(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2564
+ Po(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2559
2565
  }
2560
2566
  render() {
2561
2567
  return this.state.hasError ? this.props.fallback : this.props.children;
2562
2568
  }
2563
2569
  };
2564
- function No(e5) {
2570
+ function Lo(e5) {
2565
2571
  let t2 = e5;
2566
- if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
2572
+ return t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
2567
2573
  t2.__state = { status: `fulfilled`, value: e6 };
2568
2574
  }, (e6) => {
2569
2575
  t2.__state = { status: `rejected`, reason: e6 };
2570
- })), t2.__state.status === `fulfilled`) return t2.__state.value;
2571
- throw t2.__state.status === `rejected` ? t2.__state.reason : t2;
2576
+ })), t2.__state;
2577
+ }
2578
+ function Ro(e5) {
2579
+ let t2 = Lo(e5);
2580
+ if (t2.status === `fulfilled`) return t2.value;
2581
+ throw t2.status === `rejected` ? t2.reason : e5;
2572
2582
  }
2573
- function Po(e5) {
2583
+ function zo(e5) {
2574
2584
  let t2 = Promise.resolve(e5);
2575
2585
  return t2.__state = { status: `fulfilled`, value: e5 }, t2;
2576
2586
  }
2577
- var Fo = /* @__PURE__ */ new WeakMap();
2578
- function Io(e5, t2, n2) {
2579
- let r2 = Fo.get(e5);
2580
- r2 || (r2 = /* @__PURE__ */ new WeakMap(), Fo.set(e5, r2));
2587
+ var Bo = /* @__PURE__ */ new WeakMap();
2588
+ function Vo(e5, t2, n2) {
2589
+ let r2 = Bo.get(e5);
2590
+ r2 || (r2 = /* @__PURE__ */ new WeakMap(), Bo.set(e5, r2));
2581
2591
  let i2 = r2.get(t2);
2582
2592
  i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
2583
2593
  let a2 = i2.get(n2);
2584
2594
  if (!a2) {
2585
2595
  let r3 = e5;
2586
- a2 = r3.__state?.status === `fulfilled` ? Po(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? Po(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
2596
+ a2 = r3.__state?.status === `fulfilled` ? zo(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? zo(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
2587
2597
  }
2588
2598
  return a2;
2589
2599
  }
2590
- function Lo(e5) {
2600
+ function $(e5) {
2591
2601
  return e5;
2592
2602
  }
2593
- var Ro = Lo(`@wix/site-service-warmup-data`);
2594
- function zo() {
2603
+ var Ho = $(`@wix/site-service-warmup-data`);
2604
+ function Uo() {
2595
2605
  try {
2596
- return u();
2606
+ return d();
2597
2607
  } catch {
2598
2608
  return null;
2599
2609
  }
2600
2610
  }
2601
- function Bo(e5) {
2611
+ function Wo(e5) {
2602
2612
  try {
2603
- return e5 ? e5(Ro) : null;
2613
+ return e5 ? e5(Ho) : null;
2604
2614
  } catch {
2605
2615
  return null;
2606
2616
  }
2607
2617
  }
2608
- function Vo() {
2609
- let e5 = Bo(zo()), t2 = typeof window > `u`;
2618
+ function Go() {
2619
+ let e5 = Wo(Uo()), t2 = typeof window > `u`;
2610
2620
  return { scope: e5 ?? void 0, get: async (n2) => {
2611
2621
  if (t2 || !e5) return null;
2612
2622
  try {
2613
2623
  return await e5.get(n2);
2614
2624
  } catch (e6) {
2615
- return Ao(e6, { feature: Oo.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2625
+ return Po(e6, { feature: Mo.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2616
2626
  }
2617
2627
  }, set: (n2, r2) => {
2618
2628
  if (t2 && e5) try {
@@ -2621,75 +2631,109 @@ function Vo() {
2621
2631
  }
2622
2632
  } };
2623
2633
  }
2624
- var Ho = Lo(`@wix/site-service-locale`);
2625
- var Uo = Lo;
2626
- var Wo = Uo(`@wix/viewer-service-multilingual`);
2627
- function Go() {
2634
+ var Ko = $(`@wix/site-service-locale`);
2635
+ var qo = $;
2636
+ var Jo = qo(`@wix/viewer-service-multilingual`);
2637
+ function Yo() {
2628
2638
  try {
2629
- return wo.getLanguage() ?? `en`;
2639
+ return Oo.getLanguage() ?? `en`;
2630
2640
  } catch {
2631
2641
  return `en`;
2632
2642
  }
2633
2643
  }
2634
- function Ko(e5) {
2644
+ function Xo(e5) {
2635
2645
  try {
2636
- return d(e5);
2646
+ return f(e5);
2637
2647
  } catch {
2638
2648
  return null;
2639
2649
  }
2640
2650
  }
2641
- function qo() {
2642
- let e5 = Ko(Ho), t2 = Ko(Wo);
2643
- return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || Go();
2651
+ function Zo() {
2652
+ let e5 = Xo(Ko), t2 = Xo(Jo);
2653
+ return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || Yo();
2654
+ }
2655
+ var Qo = $(`@wix/site-service-renderer-configuration`);
2656
+ function $o() {
2657
+ return f(Qo).currency;
2658
+ }
2659
+ function es() {
2660
+ return globalThis.commonConfig?.currency;
2661
+ }
2662
+ function ts(e5) {
2663
+ let t2 = globalThis.window;
2664
+ if (!t2) return () => {
2665
+ };
2666
+ let n2 = t2.navigation, r2 = true, i2 = () => queueMicrotask(() => {
2667
+ r2 && e5();
2668
+ });
2669
+ return n2?.addEventListener(`currententrychange`, i2), t2.addEventListener(`popstate`, e5), () => {
2670
+ r2 = false, n2?.removeEventListener(`currententrychange`, i2), t2.removeEventListener(`popstate`, e5);
2671
+ };
2672
+ }
2673
+ var ns = /^[A-Z]{3}$/;
2674
+ function rs(e5) {
2675
+ return ns.test(e5) ? typeof Intl.supportedValuesOf != `function` || Intl.supportedValuesOf(`currency`).includes(e5) : false;
2644
2676
  }
2645
- var Jo = [];
2646
- var Yo = [];
2647
- var Xo = `useServiceAddOnsContext must be used within ServiceAddOnsContextProvider`;
2648
- function Zo({ isLoading: e5, hasError: t2, children: n2 }) {
2649
- let r2 = { addOnGroups: Jo, selected: Yo, isLoading: e5, hasError: t2, toggleAddOn: () => {
2677
+ function is(e5) {
2678
+ let t2 = e5?.toUpperCase();
2679
+ return t2 && rs(t2) ? t2 : null;
2680
+ }
2681
+ function as(e5, t2) {
2682
+ let n2 = is(e5);
2683
+ return n2 && n2 !== is(t2) ? n2 : null;
2684
+ }
2685
+ function os() {
2686
+ let e5 = l(ts, es, es), t2 = $o();
2687
+ return a(as(e5, t2));
2688
+ }
2689
+ var ss = [];
2690
+ var cs = [];
2691
+ var ls = `useServiceAddOnsContext must be used within ServiceAddOnsContextProvider`;
2692
+ function us({ isLoading: e5, hasError: t2, children: n2 }) {
2693
+ let r2 = { addOnGroups: ss, selected: cs, isLoading: e5, hasError: t2, toggleAddOn: () => {
2650
2694
  }, setAddOnQuantity: () => {
2651
2695
  } };
2652
- return f(Xs.Provider, { value: r2, children: n2 });
2696
+ return p(uc.Provider, { value: r2, children: n2 });
2653
2697
  }
2654
- function Qo({ children: e5 }) {
2655
- return f(Zo, { isLoading: true, hasError: false, children: e5 });
2698
+ function ds({ children: e5 }) {
2699
+ return p(us, { isLoading: true, hasError: false, children: e5 });
2656
2700
  }
2657
- function $o({ children: e5 }) {
2658
- return f(Zo, { isLoading: false, hasError: true, children: e5 });
2701
+ function fs({ children: e5 }) {
2702
+ return p(us, { isLoading: false, hasError: true, children: e5 });
2659
2703
  }
2660
- function es(e5) {
2704
+ function ps(e5) {
2661
2705
  if (!e5) return;
2662
2706
  let t2 = ``;
2663
2707
  return (e5.filename || e5.altText) && (t2 = `/${encodeURIComponent(e5.filename || e5.altText)}`), e5.id ? `wix:image://v1/${e5.id}${t2}#originWidth=${e5.width}&originHeight=${e5.height}` : e5.url;
2664
2708
  }
2665
- var ts = [{ path: `addOnGroupsDetails.addOns.mainMedia.image.urlExpirationDate` }];
2666
- function ns(e5) {
2667
- return ii(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: `` }] } }));
2709
+ var ms = [{ path: `addOnGroupsDetails.addOns.mainMedia.image.urlExpirationDate` }];
2710
+ function hs(e5) {
2711
+ return ai(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: `` }] } }));
2668
2712
  }
2669
- var rs = `@wix/auto_sdk_bookings_services`;
2670
- function is(e5) {
2713
+ var gs = `@wix/auto_sdk_bookings_services`;
2714
+ function _s(e5) {
2671
2715
  function t2({ host: t3 }) {
2672
- return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.AddOnGroupsService.ListAddOnGroupsByServiceId`, packageName: rs, migrationOptions: { optInTransformResponse: true }, url: ns({ protoPath: `/v2/services/add-on-groups/list-add-on-groups-by-service-id`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => Ir(e6, [{ transformFn: Cr, paths: ts }]) };
2716
+ return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.AddOnGroupsService.ListAddOnGroupsByServiceId`, packageName: gs, migrationOptions: { optInTransformResponse: true }, url: hs({ protoPath: `/v2/services/add-on-groups/list-add-on-groups-by-service-id`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => Lr(e6, [{ transformFn: wr, paths: ms }]) };
2673
2717
  }
2674
2718
  return t2;
2675
2719
  }
2676
- var as = [{ path: `addOnGroupsDetails.addOns.mainMedia.image` }];
2677
- async function os(e5, t2) {
2678
- let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = is(xr({ serviceId: e5, groupIds: t2?.groupIds }));
2720
+ var vs = [{ path: `addOnGroupsDetails.addOns.mainMedia.image` }];
2721
+ async function ys(e5, t2) {
2722
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = _s(Sr({ serviceId: e5, groupIds: t2?.groupIds }));
2679
2723
  r2?.onSiteCall?.();
2680
2724
  try {
2681
2725
  let e6 = await n2.request(i2);
2682
- return r2?.onSuccess?.(e6), Sr(Ir(e6.data, [{ transformFn: es, paths: as }]));
2726
+ return r2?.onSuccess?.(e6), Cr(Lr(e6.data, [{ transformFn: ps, paths: vs }]));
2683
2727
  } catch (e6) {
2684
- let t3 = Kr(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { serviceId: `$[0]`, groupIds: `$[1].groupIds` }, singleArgumentUnchanged: false }, [`serviceId`, `options`]);
2728
+ let t3 = qr(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { serviceId: `$[0]`, groupIds: `$[1].groupIds` }, singleArgumentUnchanged: false }, [`serviceId`, `options`]);
2685
2729
  throw r2?.onError?.(e6), t3;
2686
2730
  }
2687
2731
  }
2688
- function ss(e5) {
2689
- return (t2, n2) => os(t2, n2, { httpClient: e5 });
2732
+ function bs(e5) {
2733
+ return (t2, n2) => ys(t2, n2, { httpClient: e5 });
2690
2734
  }
2691
- var cs = ri(ss);
2692
- function ls(e5, t2) {
2735
+ var xs = ii(bs);
2736
+ function Ss(e5, t2) {
2693
2737
  let n2 = e5?.value, r2 = e5?.currency;
2694
2738
  if (n2 == null || !r2) return null;
2695
2739
  let i2 = Number(n2);
@@ -2697,73 +2741,76 @@ function ls(e5, t2) {
2697
2741
  let a2 = i2 % 1 == 0 ? 0 : 2;
2698
2742
  return new Intl.NumberFormat(t2, { style: `currency`, currency: r2, currencyDisplay: `symbol`, maximumFractionDigits: a2, minimumFractionDigits: a2 }).format(i2).replace(/\p{Zs}/gu, `\xA0`);
2699
2743
  }
2700
- async function us(e5) {
2701
- return (await cs(e5)).addOnGroupsDetails ?? [];
2744
+ async function Cs(e5) {
2745
+ return (await xs(e5)).addOnGroupsDetails ?? [];
2702
2746
  }
2703
- function ds(e5) {
2747
+ function ws(e5) {
2704
2748
  if (!e5) return null;
2705
2749
  try {
2706
- let { id: t2, url: n2, width: r2, height: i2 } = pr.getImageUrl(e5);
2750
+ let { id: t2, url: n2, width: r2, height: i2 } = mr.getImageUrl(e5);
2707
2751
  return t2 && n2 ? { uri: t2, url: n2, width: r2, height: i2 } : null;
2708
2752
  } catch {
2709
2753
  return null;
2710
2754
  }
2711
2755
  }
2712
- function fs(e5, t2) {
2756
+ function Ts(e5, t2) {
2713
2757
  let n2 = e5.price?.value == null ? null : Number(e5.price.value);
2714
- return { addOnId: e5.addOnId ?? null, addOnName: e5.nameTranslated ?? e5.name ?? null, addOnPrice: ls(e5.price, t2), addOnPriceValue: n2 != null && Number.isFinite(n2) ? n2 : null, addOnCurrency: e5.price?.currency ?? null, durationInMinutes: e5.durationInMinutes ?? null, maxQuantity: e5.maxQuantity ?? null, addOnImage: ds(e5.mainMedia?.image), isSelected: false, selectedQuantity: 0 };
2758
+ return { addOnId: e5.addOnId ?? null, addOnName: e5.nameTranslated ?? e5.name ?? null, addOnPrice: Ss(e5.price, t2), addOnPriceValue: n2 != null && Number.isFinite(n2) ? n2 : null, addOnCurrency: e5.price?.currency ?? null, durationInMinutes: e5.durationInMinutes ?? null, maxQuantity: e5.maxQuantity ?? null, addOnImage: ws(e5.mainMedia?.image), isSelected: false, selectedQuantity: 0 };
2715
2759
  }
2716
- function ps(e5, t2) {
2717
- return e5.map((e6) => ({ groupId: e6.groupId ?? null, groupName: e6.groupNameTranslated ?? e6.groupName ?? null, prompt: e6.promptTranslated ?? e6.prompt ?? null, maxNumberOfAddOns: e6.maxNumberOfAddOns ?? null, addOns: (e6.addOns ?? []).map((e7) => fs(e7, t2)), selectedCount: 0, canSelectMore: true }));
2760
+ function Es(e5, t2) {
2761
+ return e5.map((e6) => ({ groupId: e6.groupId ?? null, groupName: e6.groupNameTranslated ?? e6.groupName ?? null, prompt: e6.promptTranslated ?? e6.prompt ?? null, maxNumberOfAddOns: e6.maxNumberOfAddOns ?? null, addOns: (e6.addOns ?? []).map((e7) => Ts(e7, t2)), selectedCount: 0, canSelectMore: true }));
2718
2762
  }
2719
- var ms = `bookings-uou`;
2720
- function hs(e5, t2, n2) {
2721
- return `${ms}:${e5}:addons:${t2}:${n2}`;
2763
+ var Ds = `bookings-uou`;
2764
+ function Os(e5) {
2765
+ return e5 ? `:currency-${e5}` : ``;
2722
2766
  }
2723
- var gs = 5e3;
2724
- var _s = 100;
2725
- var vs = `wix-warmup-data`;
2726
- var ys = null;
2727
- function bs(e5) {
2767
+ function ks(e5, t2, n2, r2) {
2768
+ return `${Ds}:${e5}:addons:${n2}:${r2}${Os(t2)}`;
2769
+ }
2770
+ var As = 5e3;
2771
+ var js = 100;
2772
+ var Ms = `wix-warmup-data`;
2773
+ var Ns = null;
2774
+ function Ps(e5) {
2728
2775
  if (typeof document < `u`) try {
2729
- let t2 = document.getElementById(vs)?.textContent;
2730
- return t2 ? (ys?.text !== t2 && (ys = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), ys.data[e5] ?? void 0) : void 0;
2776
+ let t2 = document.getElementById(Ms)?.textContent;
2777
+ return t2 ? (Ns?.text !== t2 && (Ns = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Ns.data[e5] ?? void 0) : void 0;
2731
2778
  } catch {
2732
2779
  return;
2733
2780
  }
2734
2781
  }
2735
- var xs = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2736
- var Ss = xs();
2737
- var Cs = /* @__PURE__ */ new WeakMap();
2738
- var ws = /* @__PURE__ */ new WeakMap();
2739
- function Ts(e5) {
2740
- if (!e5) return Ss;
2741
- let t2 = Cs.get(e5);
2742
- return t2 || (t2 = xs(), Cs.set(e5, t2)), t2;
2782
+ var Fs = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2783
+ var Is = Fs();
2784
+ var Ls = /* @__PURE__ */ new WeakMap();
2785
+ var Rs = /* @__PURE__ */ new WeakMap();
2786
+ function zs(e5) {
2787
+ if (!e5) return Is;
2788
+ let t2 = Ls.get(e5);
2789
+ return t2 || (t2 = Fs(), Ls.set(e5, t2)), t2;
2743
2790
  }
2744
- function Es({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2791
+ function Bs({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2745
2792
  if (e5 === null) return n2();
2746
2793
  if (typeof window > `u`) {
2747
2794
  let r3 = () => n2().then((n3) => (t2.set(e5, n3), n3)), { scope: i3 } = t2;
2748
2795
  if (!i3) return r3();
2749
- let a3 = ws.get(i3);
2750
- a3 || (a3 = /* @__PURE__ */ new Map(), ws.set(i3, a3));
2796
+ let a3 = Rs.get(i3);
2797
+ a3 || (a3 = /* @__PURE__ */ new Map(), Rs.set(i3, a3));
2751
2798
  let o3 = a3.get(e5);
2752
2799
  if (o3) return o3;
2753
2800
  let s3 = r3();
2754
2801
  return a3.set(e5, s3), s3.catch(() => a3.delete(e5)), s3;
2755
2802
  }
2756
- let i2 = Ts(t2.scope), a2 = Date.now();
2803
+ let i2 = zs(t2.scope), a2 = Date.now();
2757
2804
  for (let [e6, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e6);
2758
2805
  let o2 = i2.promises.get(e5);
2759
2806
  if (o2 && !r2) return o2.promise;
2760
2807
  r2 && i2.invalidatedWarmup.add(e5);
2761
2808
  let s2 = !i2.invalidatedWarmup.has(e5);
2762
2809
  if (s2) {
2763
- let t3 = bs(e5);
2810
+ let t3 = Ps(e5);
2764
2811
  if (t3 !== void 0) {
2765
- let n3 = Po(t3);
2766
- return i2.promises.set(e5, { promise: n3, expiresAt: a2 + gs }), n3;
2812
+ let n3 = zo(t3);
2813
+ return i2.promises.set(e5, { promise: n3, expiresAt: a2 + As }), n3;
2767
2814
  }
2768
2815
  }
2769
2816
  let c2 = (async () => {
@@ -2773,37 +2820,37 @@ function Es({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2773
2820
  }
2774
2821
  return n2();
2775
2822
  })();
2776
- i2.promises.size >= _s && i2.promises.delete(i2.promises.keys().next().value);
2823
+ i2.promises.size >= js && i2.promises.delete(i2.promises.keys().next().value);
2777
2824
  let l2 = { promise: c2, expiresAt: 1 / 0 };
2778
2825
  return i2.promises.set(e5, l2), c2.then(() => {
2779
- l2.expiresAt = Date.now() + gs;
2826
+ l2.expiresAt = Date.now() + As;
2780
2827
  }, () => {
2781
2828
  i2.promises.get(e5) === l2 && i2.promises.delete(e5);
2782
2829
  }), c2;
2783
2830
  }
2784
- function Ds(e5, t2) {
2785
- return jo(`service-addons-context-load`, { feature: Oo.serviceAddOns, tags: { serviceId: e5 } }, us(e5)).then((e6) => ps(e6, t2), (t3) => {
2786
- throw Ao(t3, { feature: Oo.serviceAddOns, action: `fetch-add-on-groups`, level: `warning`, contexts: { service: { serviceId: e5 } } }), t3;
2831
+ function Vs(e5, t2) {
2832
+ return Fo(`service-addons-context-load`, { feature: Mo.serviceAddOns, tags: { serviceId: e5 } }, Cs(e5)).then((e6) => Es(e6, t2), (t3) => {
2833
+ throw Po(t3, { feature: Mo.serviceAddOns, action: `fetch-add-on-groups`, level: `warning`, contexts: { service: { serviceId: e5 } } }), t3;
2787
2834
  });
2788
2835
  }
2789
- function Os({ serviceId: e5, locale: t2, language: n2, warmupData: r2 }) {
2790
- return Es({ key: hs(n2, e5, t2), warmupData: r2, fetchData: () => Ds(e5, t2) });
2836
+ function Hs({ serviceId: e5, locale: t2, language: n2, currency: r2, warmupData: i2 }) {
2837
+ return Bs({ key: ks(n2, r2, e5, t2), warmupData: i2, fetchData: () => Vs(e5, t2) });
2791
2838
  }
2792
- var ks = Uo(`@wix/site-service-business-logger`);
2793
- function As(e5) {
2839
+ var Us = qo(`@wix/site-service-business-logger`);
2840
+ function Ws(e5) {
2794
2841
  return { evid: 32, src: 16, endpoint: ``, params: e5 };
2795
2842
  }
2796
- var js = Lo(`@wix/site-service-url`);
2797
- var Ms = `appSectionParams`;
2798
- function Ns(e5) {
2799
- let t2 = e5.searchParams.get(Ms);
2843
+ var Gs = $(`@wix/site-service-url`);
2844
+ var Ks = `appSectionParams`;
2845
+ function qs(e5) {
2846
+ let t2 = e5.searchParams.get(Ks);
2800
2847
  if (t2 === null) return e5;
2801
2848
  let n2 = new URL(e5);
2802
- n2.searchParams.delete(Ms);
2803
- for (let [e6, r2] of Object.entries(Ps(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
2849
+ n2.searchParams.delete(Ks);
2850
+ for (let [e6, r2] of Object.entries(Js(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
2804
2851
  return n2;
2805
2852
  }
2806
- function Ps(e5) {
2853
+ function Js(e5) {
2807
2854
  try {
2808
2855
  let t2 = JSON.parse(e5);
2809
2856
  return t2 && typeof t2 == `object` && !Array.isArray(t2) ? t2 : {};
@@ -2811,16 +2858,16 @@ function Ps(e5) {
2811
2858
  return {};
2812
2859
  }
2813
2860
  }
2814
- var Fs = `bookings-uou:url-change`;
2815
- var Is = (e5) => {
2861
+ var Ys = `bookings-uou:url-change`;
2862
+ var Xs = (e5) => {
2816
2863
  let t2 = new URL(e5);
2817
2864
  return t2.searchParams.sort(), t2.href;
2818
2865
  };
2819
- function Ls(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2866
+ function Zs(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2820
2867
  let r2 = globalThis.window;
2821
2868
  if (!r2?.history) return;
2822
2869
  let i2 = new URL(r2.location.href);
2823
- if (Is(i2) === Is(e5)) return;
2870
+ if (Xs(i2) === Xs(e5)) return;
2824
2871
  let a2 = { scrollY: r2.scrollY };
2825
2872
  if (n2) r2.history.replaceState(a2, ``, e5.href);
2826
2873
  else {
@@ -2831,89 +2878,89 @@ function Ls(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2831
2878
  return;
2832
2879
  }
2833
2880
  }
2834
- r2.dispatchEvent(new Event(Fs));
2881
+ r2.dispatchEvent(new Event(Ys));
2835
2882
  }
2836
- function Rs(e5) {
2883
+ function Qs(e5) {
2837
2884
  let t2 = globalThis.window;
2838
- return t2 ? (t2.addEventListener(Fs, e5), t2.addEventListener(`popstate`, e5), () => {
2839
- t2.removeEventListener(Fs, e5), t2.removeEventListener(`popstate`, e5);
2885
+ return t2 ? (t2.addEventListener(Ys, e5), t2.addEventListener(`popstate`, e5), () => {
2886
+ t2.removeEventListener(Ys, e5), t2.removeEventListener(`popstate`, e5);
2840
2887
  }) : () => {
2841
2888
  };
2842
2889
  }
2843
- var zs = (e5) => {
2890
+ var $s = (e5) => {
2844
2891
  try {
2845
2892
  return decodeURIComponent(e5);
2846
2893
  } catch {
2847
2894
  return e5;
2848
2895
  }
2849
2896
  };
2850
- function Bs(e5, t2) {
2897
+ function ec(e5, t2) {
2851
2898
  let n2 = t2 ? new URL(t2).pathname : `/`;
2852
- return `./${zs(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2899
+ return `./${$s(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2853
2900
  }
2854
- function Vs() {
2855
- let e5 = d(js), t2 = r(() => e5.currentUrl, [e5]), n2 = c(Rs, t2, t2), i2 = o(() => Ns(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2856
- return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => Ns(new URL(e5.currentUrl)), getRelativeUrl: () => Bs(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: Ls };
2901
+ function tc() {
2902
+ let e5 = f(Gs), t2 = r(() => e5.currentUrl, [e5]), n2 = l(Qs, t2, t2), i2 = s(() => qs(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2903
+ return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => qs(new URL(e5.currentUrl)), getRelativeUrl: () => ec(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: Zs };
2857
2904
  }
2858
- var Hs = function(e5) {
2905
+ var nc = function(e5) {
2859
2906
  return e5.BOOK_ONLINE = `bookingsBookOnline`, e5.SERVICE_PAGE = `bookingsServicePage`, e5.CALENDAR_PAGE = `bookingsCalendar`, e5.FORM_PAGE = `bookingsForm`, e5;
2860
2907
  }({});
2861
- var Us = { 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` };
2862
- Hs.BOOK_ONLINE;
2863
- var Ws = `new_bookings_server`;
2864
- var Gs = (e5) => {
2865
- let { reportBi: t2 } = d(ks);
2908
+ var rc = { 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` };
2909
+ nc.BOOK_ONLINE;
2910
+ var ic = `new_bookings_server`;
2911
+ var ac = (e5) => {
2912
+ let { reportBi: t2 } = f(Us);
2866
2913
  return r((n2) => {
2867
- t2({ widget_name: e5, bookingsPlatform: Ws, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
2914
+ t2({ widget_name: e5, bookingsPlatform: ic, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
2868
2915
  }, [t2, e5]);
2869
2916
  };
2870
- var Ks = (e5, t2 = true) => {
2871
- let n2 = Gs(e5), { getParsedUrl: r2 } = Vs(), i2 = s(false);
2872
- a(() => {
2873
- t2 && !i2.current && (i2.current = true, n2(As({ referralInfo: r2().searchParams.get(aa.referral) ?? void 0 })));
2917
+ var oc = (e5, t2 = true) => {
2918
+ let n2 = ac(e5), { getParsedUrl: r2 } = tc(), i2 = c(false);
2919
+ o(() => {
2920
+ t2 && !i2.current && (i2.current = true, n2(Ws({ referralInfo: r2().searchParams.get(la.referral) ?? void 0 })));
2874
2921
  }, [t2, n2, r2]);
2875
2922
  };
2876
- var qs = Po({ addOnGroups: Jo, hasError: false });
2877
- var Js = (e5) => ({ addOnGroups: e5, hasError: false });
2878
- var Ys = () => ({ addOnGroups: Jo, hasError: true });
2879
- var Xs = n(null);
2880
- function Zs() {
2881
- let e5 = i(Xs);
2882
- if (!e5) throw Error(Xo);
2923
+ var sc = zo({ addOnGroups: ss, hasError: false });
2924
+ var cc = (e5) => ({ addOnGroups: e5, hasError: false });
2925
+ var lc = () => ({ addOnGroups: ss, hasError: true });
2926
+ var uc = n(null);
2927
+ function dc() {
2928
+ let e5 = i(uc);
2929
+ if (!e5) throw Error(ls);
2883
2930
  return e5;
2884
2931
  }
2885
- function Qs({ addOnsPromise: e5, isLoading: t2, pickedAddOns: n2, forwardToggleAddOn: i2, forwardSetAddOnQuantity: a2, children: c2 }) {
2886
- let { addOnGroups: l2, hasError: u2 } = No(e5), d2 = o(() => U(l2, n2), [l2, n2]), p2 = o(() => na(l2, d2), [l2, d2]), m2 = s({ source: n2, picks: n2 });
2932
+ function fc({ addOnsPromise: e5, isLoading: t2, pickedAddOns: n2, forwardToggleAddOn: i2, forwardSetAddOnQuantity: a2, children: o2 }) {
2933
+ let { addOnGroups: l2, hasError: u2 } = Ro(e5), d2 = s(() => H(l2, n2), [l2, n2]), f2 = s(() => oa(l2, d2), [l2, d2]), m2 = c({ source: n2, picks: n2 });
2887
2934
  m2.current.source !== n2 && (m2.current = { source: n2, picks: n2 });
2888
2935
  let h2 = (e6) => {
2889
2936
  let t3 = m2.current;
2890
- t3.picks = W(e6({ serviceId: ``, addOns: t3.picks }));
2937
+ t3.picks = U(e6({ serviceId: ``, addOns: t3.picks }));
2891
2938
  }, g2 = r(() => {
2892
- let e6 = m2.current, t3 = U(l2, e6.picks);
2939
+ let e6 = m2.current, t3 = H(l2, e6.picks);
2893
2940
  return e6.picks.filter((e7) => !t3.includes(e7)).forEach((e7) => a2(e7.id, 0)), e6.picks = t3, t3;
2894
2941
  }, [l2, a2]), _2 = r((e6) => {
2895
- let n3 = U(l2, m2.current.picks);
2896
- !t2 && ra(l2, n3, e6) && (g2(), i2(e6), h2((t3) => sa(t3, e6)));
2942
+ let n3 = H(l2, m2.current.picks);
2943
+ !t2 && sa(l2, n3, e6) && (g2(), i2(e6), h2((t3) => da(t3, e6)));
2897
2944
  }, [t2, l2, g2, i2]), v2 = r((e6, n3) => {
2898
- let r2 = t2 ? null : $i(l2, e6);
2945
+ let r2 = t2 ? null : ra(l2, e6);
2899
2946
  if (!r2) return;
2900
- let i3 = U(l2, m2.current.picks), o2 = i3.find((t3) => t3.id === e6)?.quantity ?? 0, s2 = ia(r2, n3);
2901
- s2 === o2 || o2 === 0 && !ra(l2, i3, e6) || (g2(), a2(e6, s2), h2((t3) => ca(t3, e6, s2)));
2902
- }, [t2, l2, g2, a2]), y2 = o(() => ({ addOnGroups: p2, selected: d2, isLoading: t2, hasError: u2, toggleAddOn: _2, setAddOnQuantity: v2 }), [p2, d2, t2, u2, _2, v2]);
2903
- return f(Xs.Provider, { value: y2, children: c2 });
2904
- }
2905
- function $s({ children: e5 }) {
2906
- let { service: n2, serviceId: r2, hasAddOns: i2, locale: a2, isLoading: s2, bookingsSettingsLoading: c2, selection: u2, toggleAddOn: d2, setAddOnQuantity: p2 } = l();
2907
- Ks(Us.SERVICE_ADD_ONS, !s2 && !c2);
2908
- let m2 = o(() => W(u2), [u2]), h2 = Vo(), g2 = qo(), _2 = n2 && i2 && r2 ? r2 : null, v2 = o(() => _2 ? Io(Os({ serviceId: _2, locale: a2, language: g2, warmupData: h2 }), Js, Ys) : qs, [_2, a2, g2]), y2 = !_2 && !!s2;
2909
- return f(Mo, { fallback: f($o, { children: e5 }), feature: Oo.serviceAddOns, children: f(t, { fallback: f(Qo, { children: e5 }), children: f(Qs, { addOnsPromise: v2, isLoading: y2, pickedAddOns: m2, forwardToggleAddOn: d2, forwardSetAddOnQuantity: p2, children: e5 }) }) });
2910
- }
2911
- var ec = Qi(`bcc1b809-bde5-4d7d-a7bb-89831fe5ccb8`);
2947
+ let i3 = H(l2, m2.current.picks), o3 = i3.find((t3) => t3.id === e6)?.quantity ?? 0, s2 = ca(r2, n3);
2948
+ s2 === o3 || o3 === 0 && !sa(l2, i3, e6) || (g2(), a2(e6, s2), h2((t3) => fa(t3, e6, s2)));
2949
+ }, [t2, l2, g2, a2]), y2 = s(() => ({ addOnGroups: f2, selected: d2, isLoading: t2, hasError: u2, toggleAddOn: _2, setAddOnQuantity: v2 }), [f2, d2, t2, u2, _2, v2]);
2950
+ return p(uc.Provider, { value: y2, children: o2 });
2951
+ }
2952
+ function pc({ children: e5 }) {
2953
+ let { service: n2, serviceId: r2, hasAddOns: i2, locale: a2, isLoading: o2, bookingsSettingsLoading: c2, selection: l2, toggleAddOn: d2, setAddOnQuantity: f2 } = u();
2954
+ oc(rc.SERVICE_ADD_ONS, !o2 && !c2);
2955
+ let m2 = s(() => U(l2), [l2]), h2 = Go(), g2 = Zo(), _2 = os(), v2 = n2 && i2 && r2 ? r2 : null, y2 = s(() => v2 ? Vo(Hs({ serviceId: v2, locale: a2, language: g2, currency: _2, warmupData: h2 }), cc, lc) : sc, [v2, a2, g2, _2]), b2 = !v2 && !!o2;
2956
+ return p(Io, { fallback: p(fs, { children: e5 }), feature: Mo.serviceAddOns, children: p(t, { fallback: p(ds, { children: e5 }), children: p(fc, { addOnsPromise: y2, isLoading: b2, pickedAddOns: m2, forwardToggleAddOn: d2, forwardSetAddOnQuantity: f2, children: e5 }) }) });
2957
+ }
2958
+ var mc = na(`bcc1b809-bde5-4d7d-a7bb-89831fe5ccb8`);
2912
2959
  export {
2913
- $s as ServiceAddOnsContextProvider,
2914
- $s as default,
2915
- ec as injectAccessTokenGetter,
2916
- Xs as serviceAddOnsContext,
2917
- Zs as useServiceAddOnsContext
2960
+ pc as ServiceAddOnsContextProvider,
2961
+ pc as default,
2962
+ mc as injectAccessTokenGetter,
2963
+ uc as serviceAddOnsContext,
2964
+ dc as useServiceAddOnsContext
2918
2965
  };
2919
2966
  //# sourceMappingURL=context-service-addons.mjs.map