@wix/bookings 1.0.1772 → 1.0.1773

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.
@@ -20,12 +20,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // context-services.ts
21
21
  var context_services_exports = {};
22
22
  __export(context_services_exports, {
23
- SERVICES_CONTEXT_MISSING_PROVIDER_ERROR: () => $o,
24
- ServicesContextProvider: () => as,
25
- default: () => as,
26
- injectAccessTokenGetter: () => os,
27
- servicesContext: () => Qo,
28
- useServicesContext: () => es
23
+ SERVICES_CONTEXT_MISSING_PROVIDER_ERROR: () => zc,
24
+ ServicesContextProvider: () => Gc,
25
+ default: () => Gc,
26
+ injectAccessTokenGetter: () => Kc,
27
+ servicesContext: () => Rc,
28
+ useServicesContext: () => Bc
29
29
  });
30
30
  module.exports = __toCommonJS(context_services_exports);
31
31
 
@@ -33,12 +33,12 @@ module.exports = __toCommonJS(context_services_exports);
33
33
  var import_react = require("react");
34
34
  var import_services_manager_react = require("@wix/services-manager-react");
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
- var h = {};
37
- function g(e2, t2 = false, n2 = (e3) => e3) {
38
- return () => ({ __type: `event-definition`, type: e2, isDomainEvent: t2, transformations: n2 });
36
+ var g = {};
37
+ function _(e5, t2 = false, n2 = (e6) => e6) {
38
+ return () => ({ __type: `event-definition`, type: e5, isDomainEvent: t2, transformations: n2 });
39
39
  }
40
- var _ = (e2) => {
41
- switch (e2) {
40
+ var v = (e5) => {
41
+ switch (e5) {
42
42
  case `get`:
43
43
  case `GET`:
44
44
  return `GET`;
@@ -61,73 +61,73 @@ var _ = (e2) => {
61
61
  case `OPTIONS`:
62
62
  return `OPTIONS`;
63
63
  default:
64
- throw Error(`Unknown method: ${e2}`);
64
+ throw Error(`Unknown method: ${e5}`);
65
65
  }
66
66
  };
67
- var v = (e2) => (t2) => async (n2) => {
67
+ var y = (e5) => (t2) => async (n2) => {
68
68
  let r2, i2 = (t3) => {
69
- if (r2 = e2(n2)(t3), r2.url === void 0) throw Error(`Url was not successfully created for this request, please reach out to support channels for assistance.`);
69
+ 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.`);
70
70
  let { method: i3, url: a2, params: o2 } = r2;
71
- return { ...r2, method: _(i3), url: a2, data: r2.data, params: o2 };
71
+ return { ...r2, method: v(i3), url: a2, data: r2.data, params: o2 };
72
72
  };
73
73
  try {
74
- let e3 = await t2.request(i2);
74
+ let e6 = await t2.request(i2);
75
75
  if (r2 === void 0) throw Error(`Request options were not created for this request, please reach out to support channels for assistance.`);
76
- let n3 = Array.isArray(r2.transformResponse) ? r2.transformResponse : [r2.transformResponse], a2 = e3.data;
76
+ let n3 = Array.isArray(r2.transformResponse) ? r2.transformResponse : [r2.transformResponse], a2 = e6.data;
77
77
  return n3.forEach((t3) => {
78
- t3 && (a2 = t3(e3.data, e3.headers));
78
+ t3 && (a2 = t3(e6.data, e6.headers));
79
79
  }), a2;
80
- } catch (e3) {
81
- throw typeof e3 == `object` && e3 && `response` in e3 && typeof e3.response == `object` && e3.response !== null && `data` in e3.response ? e3.response.data : e3;
80
+ } catch (e6) {
81
+ throw typeof e6 == `object` && e6 && `response` in e6 && typeof e6.response == `object` && e6.response !== null && `data` in e6.response ? e6.response.data : e6;
82
82
  }
83
83
  };
84
- var y = (e2) => e2.__isAmbassador ? true : !!e2().__isAmbassador;
85
- var b = `__metadata`;
86
- var te = `edge.wixapis.com`;
87
- var x = class extends Error {
84
+ var b = (e5) => e5.__isAmbassador ? true : !!e5().__isAmbassador;
85
+ var x = `__metadata`;
86
+ var S = `edge.wixapis.com`;
87
+ var ee = class extends Error {
88
88
  message;
89
89
  response;
90
- constructor(e2, t2) {
91
- super(e2), this.message = e2, this.response = t2;
90
+ constructor(e5, t2) {
91
+ super(e5), this.message = e5, this.response = t2;
92
92
  }
93
93
  async details() {
94
- let e2 = await this.response.json();
95
- return S(this.response.status, e2?.message, e2?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e2 });
94
+ let e5 = await this.response.json();
95
+ return C(this.response.status, e5?.message, e5?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e5 });
96
96
  }
97
97
  };
98
- var S = (e2, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
99
- var C = (e2) => e2?.method && [`post`, `put`, `patch`].includes(e2.method.toLocaleLowerCase()) && e2.body ? { "Content-Type": `application/json` } : {};
100
- var w = (e2) => e2 && typeof e2 == `object` && !Array.isArray(e2);
101
- var T = (e2) => e2.__type === `host`;
102
- function E(e2, t2) {
103
- return e2.create(t2);
104
- }
105
- var ne = `x-wix-bi-gateway`;
106
- function re(e2, t2, n2) {
107
- return { [ne]: ie({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e2.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e2.methodFqn, entity: e2.entityFqdn }) };
108
- }
109
- function ie(e2) {
110
- return Object.entries(e2).filter(([e3, t2]) => !!t2).map(([e3, t2]) => `${e3}=${t2}`).join(`,`);
111
- }
112
- function D(e2) {
113
- let t2 = globalThis.__wix_context__, n2 = { client: h.client, elevatedClient: h.elevatedClient }, r2;
114
- globalThis.__wix_context__ = void 0, h.client = void 0, h.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
98
+ var C = (e5, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
99
+ var w = (e5) => e5?.method && [`post`, `put`, `patch`].includes(e5.method.toLocaleLowerCase()) && e5.body ? { "Content-Type": `application/json` } : {};
100
+ var T = (e5) => e5 && typeof e5 == `object` && !Array.isArray(e5);
101
+ var E = (e5) => e5.__type === `host`;
102
+ function D(e5, t2) {
103
+ return e5.create(t2);
104
+ }
105
+ var O = `x-wix-bi-gateway`;
106
+ function te(e5, t2, n2) {
107
+ return { [O]: ne({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e5.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e5.methodFqn, entity: e5.entityFqdn }) };
108
+ }
109
+ function ne(e5) {
110
+ return Object.entries(e5).filter(([e6, t2]) => !!t2).map(([e6, t2]) => `${e6}=${t2}`).join(`,`);
111
+ }
112
+ function re(e5) {
113
+ let t2 = globalThis.__wix_context__, n2 = { client: g.client, elevatedClient: g.elevatedClient }, r2;
114
+ globalThis.__wix_context__ = void 0, g.client = void 0, g.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
115
115
  try {
116
- return e2();
116
+ return e5();
117
117
  } finally {
118
- globalThis.__wix_context__ = t2, h.client = n2.client, h.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
118
+ globalThis.__wix_context__ = t2, g.client = n2.client, g.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
119
119
  }
120
120
  }
121
- var ae = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
122
- function O(e2) {
123
- return ue(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
121
+ var ie = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
122
+ function ae(e5) {
123
+ return ue(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
124
124
  }
125
125
  var oe = /([\p{Ll}\d])(\p{Lu})/gu;
126
126
  var se = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
127
127
  var ce = `$1\0$2`;
128
128
  var le = /[^\p{L}\d]+/giu;
129
- function ue(e2) {
130
- let t2 = e2.trim();
129
+ function ue(e5) {
130
+ let t2 = e5.trim();
131
131
  t2 = t2.replace(oe, ce).replace(se, ce), t2 = t2.replace(le, `\0`);
132
132
  let n2 = 0, r2 = t2.length;
133
133
  for (; t2.charAt(n2) === `\0`; ) n2++;
@@ -135,110 +135,110 @@ function ue(e2) {
135
135
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
136
136
  return t2.slice(n2, r2).split(/\0/g);
137
137
  }
138
- var de = (e2) => `validationError` in (e2.response?.data?.details ?? {});
139
- var fe = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
140
- var pe = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
141
- function me(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
142
- if (typeof e2 != `object` || !e2) throw e2;
143
- if (de(e2)) return he(e2, t2, n2);
144
- if (fe(e2)) return _e(e2);
145
- if (pe(e2)) {
146
- let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: O(n3), data: {} }, requestId: e2.requestId };
147
- return ge(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
148
- }
149
- return ve(e2);
150
- }
151
- var he = (e2, t2, n2) => {
152
- let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = ye(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
153
- return ge(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
154
- };
155
- var ge = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
156
- var _e = (e2) => {
157
- let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? O(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
158
- return ge(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
159
- };
160
- var ve = (e2) => ge(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: O(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
161
- var ye = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
162
- let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
163
- return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
164
- let r3 = t2[e3.field];
165
- if (r3) return { ...e3, field: be(r3, i2) };
166
- let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
138
+ var de = (e5) => `validationError` in (e5.response?.data?.details ?? {});
139
+ var fe = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
140
+ var pe = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
141
+ function me(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
142
+ if (typeof e5 != `object` || !e5) throw e5;
143
+ if (de(e5)) return he(e5, t2, n2);
144
+ if (fe(e5)) return _e(e5);
145
+ if (pe(e5)) {
146
+ let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: ae(n3), data: {} }, requestId: e5.requestId };
147
+ return ge(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
148
+ }
149
+ return ve(e5);
150
+ }
151
+ var he = (e5, t2, n2) => {
152
+ let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = ye(t2, a2, n2)?.sort((e6, t3) => e6.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e6, description: t3 }) => `"${e6}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
153
+ return ge(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
154
+ };
155
+ var ge = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
156
+ var _e = (e5) => {
157
+ let t2 = e5.response?.status, n2 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n2, i2 = e5.response?.data?.details?.applicationError?.description ?? n2, a2 = e5.response?.data?.details?.applicationError?.code ?? ae(n2), o2 = e5.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e5.requestId };
158
+ return ge(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
159
+ };
160
+ var ve = (e5) => ge(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: ae(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
161
+ var ye = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
162
+ let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
163
+ return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
164
+ let r3 = t2[e6.field];
165
+ if (r3) return { ...e6, field: be(r3, i2) };
166
+ let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
167
167
  if (s2) {
168
168
  let t3 = a2[s2];
169
- if (t3) return { ...e3, field: e3.field.replace(s2, be(t3, i2)) };
169
+ if (t3) return { ...e6, field: e6.field.replace(s2, be(t3, i2)) };
170
170
  }
171
- return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
171
+ return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
172
172
  });
173
173
  };
174
- var be = (e2, t2) => {
175
- let n2 = xe(e2);
176
- return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
174
+ var be = (e5, t2) => {
175
+ let n2 = xe(e5);
176
+ return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
177
177
  };
178
- var xe = (e2) => {
179
- let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
178
+ var xe = (e5) => {
179
+ let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
180
180
  return t2 && t2.groups && Number(t2.groups.argIndex);
181
181
  };
182
- function Se(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
183
- return D(() => e2({ request: async (e3) => {
184
- let i3 = e3({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
182
+ function Se(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
183
+ return re(() => e5({ request: async (e6) => {
184
+ let i3 = e6({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
185
185
  a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
186
- let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? te : o3}${a3.url}`;
186
+ let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? S : o3}${a3.url}`;
187
187
  a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
188
188
  try {
189
- let e4 = re(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e4 } }, s3 = await n2(u3, o4);
189
+ let e7 = te(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e7 } }, s3 = await n2(u3, o4);
190
190
  if (s3.status !== 200) {
191
- let e5 = null;
191
+ let e8 = null;
192
192
  try {
193
- e5 = await s3.json();
193
+ e8 = await s3.json();
194
194
  } catch {
195
195
  }
196
- let t3 = we(s3.status, e5?.message ?? s3.statusText, e5?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e5 }), n3 = me(t3);
196
+ let t3 = we(s3.status, e8?.message ?? s3.statusText, e8?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e8 }), n3 = me(t3);
197
197
  throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
198
198
  }
199
199
  let l3 = await s3.json();
200
200
  return { data: a3.migrationOptions?.optInTransformResponse && a3.transformResponse ? Array.isArray(a3.transformResponse) ? a3.transformResponse[0](l3) : a3.transformResponse(l3) : l3, headers: s3.headers, status: s3.status, statusText: s3.statusText };
201
- } catch (e4) {
202
- throw e4.message?.includes(`fetch is not defined`) && console.error(`Node.js v18+ is required`), e4;
201
+ } catch (e7) {
202
+ throw e7.message?.includes(`fetch is not defined`) && console.error(`Node.js v18+ is required`), e7;
203
203
  }
204
204
  }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
205
205
  }
206
206
  var Ce = class extends Error {
207
207
  response;
208
208
  requestId;
209
- constructor(e2) {
210
- super(), this.response = e2.response, this.requestId = e2.requestId;
209
+ constructor(e5) {
210
+ super(), this.response = e5.response, this.requestId = e5.requestId;
211
211
  }
212
212
  };
213
- var we = (e2, t2, n2, r2) => new Ce({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2 }, status: e2 }, requestId: r2?.requestId });
213
+ var we = (e5, t2, n2, r2) => new Ce({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2 }, status: e5 }, requestId: r2?.requestId });
214
214
  var Te = `.`;
215
- function Ee(e2, t2, n2) {
216
- if (e2 == null) throw Error(`Cannot set value on null or undefined`);
217
- let r2 = De(t2), i2 = e2;
218
- for (let e3 = 0; e3 < r2.length; e3++) {
219
- let t3 = r2[e3];
220
- if (e3 === r2.length - 1) {
215
+ function Ee(e5, t2, n2) {
216
+ if (e5 == null) throw Error(`Cannot set value on null or undefined`);
217
+ let r2 = De(t2), i2 = e5;
218
+ for (let e6 = 0; e6 < r2.length; e6++) {
219
+ let t3 = r2[e6];
220
+ if (e6 === r2.length - 1) {
221
221
  i2[t3] = n2;
222
222
  break;
223
223
  }
224
- let a2 = r2[e3 + 1];
224
+ let a2 = r2[e6 + 1];
225
225
  (!(t3 in i2) || i2[t3] == null || typeof i2[t3] != `object` || i2[t3] === null) && (i2[t3] = typeof a2 == `number` ? [] : {}), i2 = i2[t3];
226
226
  }
227
- return e2;
227
+ return e5;
228
228
  }
229
- function De(e2) {
230
- return Array.isArray(e2) ? e2 : e2.split(Te).map((e3) => Oe(e3) ? Number(e3) : e3);
229
+ function De(e5) {
230
+ return Array.isArray(e5) ? e5 : e5.split(Te).map((e6) => Oe(e6) ? Number(e6) : e6);
231
231
  }
232
- function Oe(e2) {
233
- return /^\d+$/.test(e2);
232
+ function Oe(e5) {
233
+ return /^\d+$/.test(e5);
234
234
  }
235
- function ke(e2) {
235
+ function ke(e5) {
236
236
  let t2 = {};
237
- for (let [n2, r2] of Object.entries(e2)) Ae(n2) || Ee(t2, De(n2), r2);
237
+ for (let [n2, r2] of Object.entries(e5)) Ae(n2) || Ee(t2, De(n2), r2);
238
238
  return t2;
239
239
  }
240
- function Ae(e2) {
241
- return e2 === `__proto__` || e2 === `constructor` || e2 === `prototype`;
240
+ function Ae(e5) {
241
+ return e5 === `__proto__` || e5 === `constructor` || e5 === `prototype`;
242
242
  }
243
243
  var je = class {
244
244
  BRACKET_PATTERN = /\[(\d+)\]/g;
@@ -253,376 +253,376 @@ var je = class {
253
253
  ESCAPED_LEFT_BRACKET_PLACEHOLDER = `__LB__`;
254
254
  modifiedFields;
255
255
  cleanedModifiedFields;
256
- constructor(e2) {
257
- this.modifiedFields = e2;
256
+ constructor(e5) {
257
+ this.modifiedFields = e5;
258
258
  }
259
- replaceEscapedCharacters(e2) {
260
- return e2.replace(this.ESCAPED_DOT_PATTERN, this.ESCAPED_DOT_PLACEHOLDER).replace(this.ESCAPED_LEFT_BRACKET_PATTERN, this.ESCAPED_LEFT_BRACKET_PLACEHOLDER).replace(this.ESCAPED_RIGHT_BRACKET_PATTERN, this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER);
259
+ replaceEscapedCharacters(e5) {
260
+ return e5.replace(this.ESCAPED_DOT_PATTERN, this.ESCAPED_DOT_PLACEHOLDER).replace(this.ESCAPED_LEFT_BRACKET_PATTERN, this.ESCAPED_LEFT_BRACKET_PLACEHOLDER).replace(this.ESCAPED_RIGHT_BRACKET_PATTERN, this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER);
261
261
  }
262
- restoreEscapedCharacters(e2) {
263
- return e2.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
262
+ restoreEscapedCharacters(e5) {
263
+ return e5.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
264
264
  }
265
265
  unflatten() {
266
- return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e2, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e2)), t2])), ke(this.cleanedModifiedFields);
266
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e5, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e5)), t2])), ke(this.cleanedModifiedFields);
267
267
  }
268
- flatten(e2) {
268
+ flatten(e5) {
269
269
  let t2 = {};
270
270
  for (let n2 of Object.keys(this.cleanedModifiedFields)) {
271
- let r2 = this.splitPath(n2), i2 = this.navigatePath(e2, r2);
271
+ let r2 = this.splitPath(n2), i2 = this.navigatePath(e5, r2);
272
272
  t2 = { ...t2, ...i2 };
273
273
  }
274
- return Object.fromEntries(Object.entries(t2).map(([e3, t3]) => [this.restoreEscapedCharacters(e3), t3]));
274
+ return Object.fromEntries(Object.entries(t2).map(([e6, t3]) => [this.restoreEscapedCharacters(e6), t3]));
275
275
  }
276
- splitPath(e2) {
277
- let t2 = [], n2 = 0, r2 = Array.from(e2.matchAll(this.SPLIT_PATTERN));
278
- for (let i2 of r2) i2.index > n2 && t2.push(e2.substring(n2, i2.index)), i2[1] && t2.push(i2[1]), n2 = i2.index + i2[0].length;
279
- return n2 < e2.length && t2.push(e2.substring(n2)), t2;
276
+ splitPath(e5) {
277
+ let t2 = [], n2 = 0, r2 = Array.from(e5.matchAll(this.SPLIT_PATTERN));
278
+ for (let i2 of r2) i2.index > n2 && t2.push(e5.substring(n2, i2.index)), i2[1] && t2.push(i2[1]), n2 = i2.index + i2[0].length;
279
+ return n2 < e5.length && t2.push(e5.substring(n2)), t2;
280
280
  }
281
- navigatePath(e2, t2) {
282
- let n2 = e2, r2 = [], i2 = (e3) => {
281
+ navigatePath(e5, t2) {
282
+ let n2 = e5, r2 = [], i2 = (e6) => {
283
283
  if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
284
- r2.push(`[${e3}]`), n2 = n2[parseInt(e3, 10)];
285
- }, a2 = (e3, t3) => {
286
- let i3 = e3 in ae ? ae[e3] : void 0;
284
+ r2.push(`[${e6}]`), n2 = n2[parseInt(e6, 10)];
285
+ }, a2 = (e6, t3) => {
286
+ let i3 = e6 in ie ? ie[e6] : void 0;
287
287
  if (i3 && i3 in t3) {
288
288
  r2.push(i3), n2 = t3[i3];
289
289
  return;
290
290
  }
291
- let a3 = Fe(e3);
291
+ let a3 = Fe(e6);
292
292
  if (a3 && a3 in t3) {
293
293
  r2.push(a3), n2 = t3[a3];
294
294
  return;
295
295
  }
296
- throw Error(`Cannot find key '${e3}' or its transformations at path ${this.buildPathString(r2)}`);
297
- }, o2 = (e3, t3) => {
298
- r2.push(e3), n2 = t3[e3];
296
+ throw Error(`Cannot find key '${e6}' or its transformations at path ${this.buildPathString(r2)}`);
297
+ }, o2 = (e6, t3) => {
298
+ r2.push(e6), n2 = t3[e6];
299
299
  };
300
- for (let e3 of t2) {
301
- if (this.NUMERIC_PATTERN.test(e3)) {
302
- i2(e3);
300
+ for (let e6 of t2) {
301
+ if (this.NUMERIC_PATTERN.test(e6)) {
302
+ i2(e6);
303
303
  continue;
304
304
  }
305
- if (typeof n2 != `object` || !n2) throw Error(`Cannot access property '${e3}' on ${typeof n2} at path ${this.buildPathString(r2)}`);
305
+ if (typeof n2 != `object` || !n2) throw Error(`Cannot access property '${e6}' on ${typeof n2} at path ${this.buildPathString(r2)}`);
306
306
  let t3 = n2;
307
- if (e3 in n2) {
308
- o2(e3, t3);
307
+ if (e6 in n2) {
308
+ o2(e6, t3);
309
309
  continue;
310
310
  }
311
- a2(e3, t3);
311
+ a2(e6, t3);
312
312
  }
313
313
  return { [this.buildPathString(r2)]: n2 };
314
314
  }
315
- buildPathString(e2) {
316
- return e2.join(`.`).replace(this.DOT_BEFORE_BRACKET_PATTERN, `[`);
315
+ buildPathString(e5) {
316
+ return e5.join(`.`).replace(this.DOT_BEFORE_BRACKET_PATTERN, `[`);
317
317
  }
318
- bracketToDotNotation(e2) {
319
- return e2.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e2[r2 - 1] === `\\` ? t2 : `.` + n2);
318
+ bracketToDotNotation(e5) {
319
+ return e5.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e5[r2 - 1] === `\\` ? t2 : `.` + n2);
320
320
  }
321
321
  };
322
- function Me(e2, t2) {
323
- let n2 = e2?.modifiedFields;
322
+ function Me(e5, t2) {
323
+ let n2 = e5?.modifiedFields;
324
324
  if (!n2) return null;
325
325
  let r2 = Ne(n2);
326
326
  if (!r2) return null;
327
327
  let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
328
- e2 = { ...e2, modifiedFields: i2 };
329
- let o2 = t2(e2), s2 = o2?.modifiedFields;
328
+ e5 = { ...e5, modifiedFields: i2 };
329
+ let o2 = t2(e5), s2 = o2?.modifiedFields;
330
330
  if (!s2) return null;
331
331
  let c2 = Pe(s2, a2);
332
332
  return c2 === null ? null : (o2.modifiedFields = c2, o2);
333
333
  }
334
- function Ne(e2) {
335
- if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
336
- let t2 = new je(e2);
334
+ function Ne(e5) {
335
+ if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
336
+ let t2 = new je(e5);
337
337
  return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
338
338
  } catch {
339
339
  return null;
340
340
  }
341
341
  return null;
342
342
  }
343
- function Pe(e2, t2) {
344
- if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
345
- return t2.flatten(e2);
343
+ function Pe(e5, t2) {
344
+ if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
345
+ return t2.flatten(e5);
346
346
  } catch {
347
347
  return null;
348
348
  }
349
349
  return null;
350
350
  }
351
- function Fe(e2) {
352
- return e2.replace(/[-_\s]+(.)?/g, (e3, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e3) => e3.toLowerCase());
351
+ function Fe(e5) {
352
+ return e5.replace(/[-_\s]+(.)?/g, (e6, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e6) => e6.toLowerCase());
353
353
  }
354
354
  function Ie() {
355
- return { emit(e2, ...t2) {
356
- for (let n2 = 0, r2 = this.events[e2] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
357
- }, events: {}, on(e2, t2) {
358
- return (this.events[e2] ||= []).push(t2), () => {
359
- this.events[e2] = this.events[e2]?.filter((e3) => t2 !== e3);
355
+ return { emit(e5, ...t2) {
356
+ for (let n2 = 0, r2 = this.events[e5] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
357
+ }, events: {}, on(e5, t2) {
358
+ return (this.events[e5] ||= []).push(t2), () => {
359
+ this.events[e5] = this.events[e5]?.filter((e6) => t2 !== e6);
360
360
  };
361
361
  } };
362
362
  }
363
- var Le = (e2) => e2.__type === `event-definition`;
364
- function Re(e2, t2, n2, r2) {
363
+ var Le = (e5) => e5.__type === `event-definition`;
364
+ function Re(e5, t2, n2, r2) {
365
365
  let i2;
366
- if (e2.isDomainEvent) {
367
- let { deletedEvent: e3, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
368
- i2 = e3 ? e3?.deletedEntity ? { entity: e3?.deletedEntity, metadata: c2 } : { metadata: c2 } : t3 ? { data: t3.body, metadata: c2 } : o3 ? { entity: o3.currentEntity, metadata: c2, ...o3.modifiedFields ? { modifiedFields: o3.modifiedFields } : {} } : { entity: a3?.entity, metadata: c2 };
366
+ if (e5.isDomainEvent) {
367
+ let { deletedEvent: e6, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
368
+ i2 = e6 ? e6?.deletedEntity ? { entity: e6?.deletedEntity, metadata: c2 } : { metadata: c2 } : t3 ? { data: t3.body, metadata: c2 } : o3 ? { entity: o3.currentEntity, metadata: c2, ...o3.modifiedFields ? { modifiedFields: o3.modifiedFields } : {} } : { entity: a3?.entity, metadata: c2 };
369
369
  } else i2 = { data: n2, metadata: r2 };
370
- let a2 = e2.transformations ?? ((e3) => e3), o2 = i2, s2 = i2;
370
+ let a2 = e5.transformations ?? ((e6) => e6), o2 = i2, s2 = i2;
371
371
  if (s2.modifiedFields) {
372
- let e3 = s2.modifiedFields;
373
- if (typeof e3 == `object` && e3 && !Array.isArray(e3)) {
372
+ let e6 = s2.modifiedFields;
373
+ if (typeof e6 == `object` && e6 && !Array.isArray(e6)) {
374
374
  o2 = structuredClone(i2);
375
- let e4 = Me(s2, a2);
376
- if (e4) return t2(e4);
375
+ let e7 = Me(s2, a2);
376
+ if (e7) return t2(e7);
377
377
  }
378
378
  }
379
379
  return t2(a2(o2));
380
380
  }
381
- function ze(e2) {
381
+ function ze(e5) {
382
382
  let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
383
- return { initModule(e3) {
383
+ return { initModule(e6) {
384
384
  return (r2) => {
385
- let i2 = t2.get(e3.type) ?? [];
386
- i2.push({ eventDefinition: e3, handler: r2 }), t2.set(e3.type, i2), n2.emit(`registered`, e3);
385
+ let i2 = t2.get(e6.type) ?? [];
386
+ i2.push({ eventDefinition: e6, handler: r2 }), t2.set(e6.type, i2), n2.emit(`registered`, e6);
387
387
  };
388
- }, client: { ...n2, getRegisteredEvents: () => t2, async process(e3, n3 = { expectedEvents: [] }) {
389
- let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e3), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e4) => ({ type: e4 }))];
390
- if (c2.length > 0 && !c2.some(({ type: e4 }) => e4 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e4) => e4.type).join(`, `)}`);
388
+ }, client: { ...n2, getRegisteredEvents: () => t2, async process(e6, n3 = { expectedEvents: [] }) {
389
+ let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e6), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e7) => ({ type: e7 }))];
390
+ if (c2.length > 0 && !c2.some(({ type: e7 }) => e7 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e7) => e7.type).join(`, `)}`);
391
391
  let l2 = t2.get(r2) ?? [];
392
- return await Promise.all(l2.map(({ eventDefinition: e4, handler: t3 }) => Re(e4, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
393
- }, async processRequest(e3, t3) {
394
- let n3 = await e3.text();
392
+ return await Promise.all(l2.map(({ eventDefinition: e7, handler: t3 }) => Re(e7, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
393
+ }, async processRequest(e6, t3) {
394
+ let n3 = await e6.text();
395
395
  return this.process(n3, t3);
396
396
  }, async parseJWT(t3) {
397
- let n3 = e2();
397
+ let n3 = e5();
398
398
  if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
399
399
  let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3);
400
400
  if (!i2) throw Error(`JWT is not valid`);
401
401
  if (typeof r2.data != `string`) throw Error(`Unexpected type of JWT data: expected string, got ${typeof r2.data}`);
402
402
  let a2 = JSON.parse(r2.data), o2 = a2.eventType, s2 = a2.accountInfo, c2 = a2.instanceId, l2 = a2.identity ? JSON.parse(a2.identity) : void 0;
403
403
  return { instanceId: c2, eventType: o2, payload: JSON.parse(a2.data), identity: l2, accountInfo: s2 };
404
- }, async parseRequest(e3) {
405
- let t3 = await e3.text();
404
+ }, async parseRequest(e6) {
405
+ let t3 = await e6.text();
406
406
  return this.parseJWT(t3);
407
- }, async executeHandlers(e3) {
408
- let n3 = Array.from(t2.keys()).map((e4) => ({ type: e4 }));
409
- if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e3.eventType)) throw Error(`Unexpected event type: ${e3.eventType}. Expected one of: ${n3.map((e4) => e4.type).join(`, `)}`);
410
- let r2 = t2.get(e3.eventType) ?? [];
411
- await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Re(t3, n4, e3.payload, { instanceId: e3.instanceId, identity: e3.identity })));
412
- }, apps: { AppInstalled: g(`AppInstalled`)(), AppRemoved: g(`AppRemoved`)() } } };
413
- }
414
- var Be = (e2) => e2.__type === `service-plugin-definition`;
415
- function Ve(e2) {
407
+ }, async executeHandlers(e6) {
408
+ let n3 = Array.from(t2.keys()).map((e7) => ({ type: e7 }));
409
+ if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e6.eventType)) throw Error(`Unexpected event type: ${e6.eventType}. Expected one of: ${n3.map((e7) => e7.type).join(`, `)}`);
410
+ let r2 = t2.get(e6.eventType) ?? [];
411
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Re(t3, n4, e6.payload, { instanceId: e6.instanceId, identity: e6.identity })));
412
+ }, apps: { AppInstalled: _(`AppInstalled`)(), AppRemoved: _(`AppRemoved`)() } } };
413
+ }
414
+ var Be = (e5) => e5.__type === `service-plugin-definition`;
415
+ function Ve(e5) {
416
416
  let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
417
- return { initModule(e3) {
417
+ return { initModule(e6) {
418
418
  return (r2) => {
419
- let i2 = t2.get(e3.componentType.toLowerCase()) ?? [];
420
- i2.push({ servicePluginDefinition: e3, implementation: r2 }), t2.set(e3.componentType.toLowerCase(), i2), n2.emit(`registered`, e3);
419
+ let i2 = t2.get(e6.componentType.toLowerCase()) ?? [];
420
+ i2.push({ servicePluginDefinition: e6, implementation: r2 }), t2.set(e6.componentType.toLowerCase(), i2), n2.emit(`registered`, e6);
421
421
  };
422
422
  }, client: { ...n2, getRegisteredServicePlugins: () => t2, async parseJWT(t3) {
423
- let n3 = e2();
423
+ let n3 = e5();
424
424
  if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
425
425
  let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3, true);
426
426
  if (!i2) throw Error(`JWT is not valid`);
427
427
  if (typeof r2.data != `object` || r2.data === null || !(`metadata` in r2.data) || typeof r2.data.metadata != `object` || r2.data.metadata === null || !(`appExtensionType` in r2.data.metadata) || typeof r2.data.metadata.appExtensionType != `string`) throw Error(`Unexpected JWT data: expected object with metadata.appExtensionType string`);
428
428
  return r2.data;
429
- }, async process(e3) {
430
- let t3 = await this.parseJWT(e3.body);
431
- return this.executeHandler(t3, e3.url);
432
- }, async parseRequest(e3) {
433
- let t3 = await e3.text();
429
+ }, async process(e6) {
430
+ let t3 = await this.parseJWT(e6.body);
431
+ return this.executeHandler(t3, e6.url);
432
+ }, async parseRequest(e6) {
433
+ let t3 = await e6.text();
434
434
  return this.parseJWT(t3);
435
- }, async processRequest(e3) {
436
- let t3 = await this.parseRequest(e3);
437
- return this.processParsedRequest(t3, e3.url);
438
- }, async processParsedRequest(e3, t3) {
435
+ }, async processRequest(e6) {
436
+ let t3 = await this.parseRequest(e6);
437
+ return this.processParsedRequest(t3, e6.url);
438
+ }, async processParsedRequest(e6, t3) {
439
439
  try {
440
- let n3 = await this.executeHandler(e3, t3);
440
+ let n3 = await this.executeHandler(e6, t3);
441
441
  return Response.json(n3);
442
- } catch (e4) {
443
- if (e4.errorType === `SPI` && e4.applicationCode && e4.httpCode) return Response.json({ applicationError: { code: e4.applicationCode, data: e4.data } }, { status: e4.httpCode });
444
- throw e4;
442
+ } catch (e7) {
443
+ if (e7.errorType === `SPI` && e7.applicationCode && e7.httpCode) return Response.json({ applicationError: { code: e7.applicationCode, data: e7.data } }, { status: e7.httpCode });
444
+ throw e7;
445
445
  }
446
- }, async executeHandler(e3, n3) {
447
- let r2 = e3.metadata.appExtensionType.toLowerCase(), i2 = t2.get(r2) ?? [];
446
+ }, async executeHandler(e6, n3) {
447
+ let r2 = e6.metadata.appExtensionType.toLowerCase(), i2 = t2.get(r2) ?? [];
448
448
  if (i2.length === 0) throw Error(`No service plugin implementations found for component type ${r2}`);
449
449
  if (i2.length > 1) throw Error(`Multiple service plugin implementations found for component type ${r2}. This is currently not supported`);
450
- let { implementation: a2, servicePluginDefinition: o2 } = i2[0], s2 = o2.methods.find((e4) => n3.endsWith(e4.primaryHttpMappingPath));
450
+ let { implementation: a2, servicePluginDefinition: o2 } = i2[0], s2 = o2.methods.find((e7) => n3.endsWith(e7.primaryHttpMappingPath));
451
451
  if (!s2) throw Error(`Unexpect request: request url did not match any method: ` + n3);
452
452
  let c2 = a2[s2.name];
453
453
  if (!c2) throw Error(`Got request for service plugin method ${s2.name} but no implementation was provided. Available methods: ${Object.keys(a2).join(`, `)}`);
454
- return s2.transformations.toREST(await c2(s2.transformations.fromREST(e3)));
454
+ return s2.transformations.toREST(await c2(s2.transformations.fromREST(e6)));
455
455
  } } };
456
456
  }
457
457
  var k = `X-Wix-Consistent`;
458
- function He(e2) {
459
- let t2 = e2.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e3) => Promise.resolve({ headers: {} }) }, r2 = e2.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e2.host), o2 = () => e2.fetch ?? fetch, s2 = async (n3, r3) => {
460
- let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [k]: t2[k] } : {} }, l3 = e2.host?.getErrorHandler?.();
458
+ function He(e5) {
459
+ let t2 = e5.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e6) => Promise.resolve({ headers: {} }) }, r2 = e5.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e5.host), o2 = () => e5.fetch ?? fetch, s2 = async (n3, r3) => {
460
+ let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [k]: t2[k] } : {} }, l3 = e5.host?.getErrorHandler?.();
461
461
  try {
462
462
  if (typeof n3 == `string` || n3 instanceof URL) {
463
- let e3 = await i3(n3, { ...r3, headers: c3 });
464
- l3?.handleError(e3, { requestOptions: { url: n3.toString(), method: r3?.method } });
465
- let a3 = Ue(e3);
466
- return a3 && (t2[k] = a3), e3;
463
+ let e6 = await i3(n3, { ...r3, headers: c3 });
464
+ l3?.handleError(e6, { requestOptions: { url: n3.toString(), method: r3?.method } });
465
+ let a3 = Ue(e6);
466
+ return a3 && (t2[k] = a3), e6;
467
467
  }
468
468
  {
469
- for (let [e4, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e4, t3);
470
- let e3 = await i3(n3, r3);
471
- l3?.handleError(e3, { requestOptions: { url: n3.url, method: r3?.method } });
472
- let a3 = Ue(e3);
473
- return a3 && (t2[k] = a3), e3;
469
+ for (let [e7, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e7, t3);
470
+ let e6 = await i3(n3, r3);
471
+ l3?.handleError(e6, { requestOptions: { url: n3.url, method: r3?.method } });
472
+ let a3 = Ue(e6);
473
+ return a3 && (t2[k] = a3), e6;
474
474
  }
475
- } catch (e3) {
476
- throw l3?.handleError(e3, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e3;
475
+ } catch (e6) {
476
+ throw l3?.handleError(e6, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e6;
477
477
  }
478
478
  }, { client: c2, initModule: l2 } = Ve(i2), { client: u2, initModule: d2 } = ze(i2), f2 = async (n3, r3) => {
479
- let i3 = o2(), s3 = await a2(), c3 = C(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [k]: t2[k] } : {} } }), u3 = Ue(l3);
479
+ let i3 = o2(), s3 = await a2(), c3 = w(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [k]: t2[k] } : {} } }), u3 = Ue(l3);
480
480
  return u3 && (t2[k] = u3), l3;
481
481
  }, p2 = (t3, n3) => {
482
482
  if (Le(t3)) return d2(t3);
483
483
  if (Be(t3)) return l2(t3);
484
- if (T(t3) && e2.host) return E(t3, e2.host);
484
+ if (E(t3) && e5.host) return D(t3, e5.host);
485
485
  if (typeof t3 == `function`) {
486
486
  if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
487
- let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e2.useCDN === void 0 ? i2().shouldUseCDN : e2.useCDN;
488
- return Se(D(() => y(t3)) ? v(t3) : t3, n3 ?? {}, f2, e2.host?.getErrorHandler?.(), (e3, t4) => {
489
- let n4 = new URL(e3, `https://${r3}`);
487
+ let r3 = e5.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e5.useCDN === void 0 ? i2().shouldUseCDN : e5.useCDN;
488
+ return Se(re(() => b(t3)) ? y(t3) : t3, n3 ?? {}, f2, e5.host?.getErrorHandler?.(), (e6, t4) => {
489
+ let n4 = new URL(e6, `https://${r3}`);
490
490
  return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
491
- }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e2.host?.name, o3, e2.validateRequestSchema);
491
+ }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e5.host?.name, o3, e5.validateRequestSchema);
492
492
  }
493
- return w(t3) ? Object.fromEntries(Object.entries(t3).map(([e3, n4]) => [e3, p2(n4, t3[b])])) : t3;
494
- }, m2 = (e3) => {
495
- for (let n3 in e3) t2[n3] = e3[n3];
493
+ return T(t3) ? Object.fromEntries(Object.entries(t3).map(([e6, n4]) => [e6, p2(n4, t3[x])])) : t3;
494
+ }, m2 = (e6) => {
495
+ for (let n3 in e6) t2[n3] = e6[n3];
496
496
  };
497
- return { ...e2.modules ? p2(e2.modules) : {}, get auth() {
497
+ return { ...e5.modules ? p2(e5.modules) : {}, get auth() {
498
498
  let t3 = i2();
499
- return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e2.host), t3;
500
- }, setHeaders: m2, use: p2, enableContext(e3, t3 = { elevated: false }) {
501
- e3 === `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 ? h.elevatedClient = this : h.client = this;
499
+ return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e5.host), t3;
500
+ }, setHeaders: m2, use: p2, enableContext(e6, t3 = { elevated: false }) {
501
+ 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 ? g.elevatedClient = this : g.client = this;
502
502
  }, fetch: (t3, n3) => {
503
- let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
503
+ let r3 = e5.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
504
504
  return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
505
505
  }, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
506
- let i3 = e2?.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 }) });
507
- if (a3.status !== 200) throw new x(`GraphQL request failed with status ${a3.status}`, a3);
506
+ 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 }) });
507
+ if (a3.status !== 200) throw new ee(`GraphQL request failed with status ${a3.status}`, a3);
508
508
  let { data: o3, errors: s3 } = await a3.json();
509
509
  return { data: o3 ?? {}, errors: s3 };
510
510
  }, webhooks: u2, servicePlugins: c2 };
511
511
  }
512
- function Ue(e2) {
513
- return e2.headers?.get(`X-Wix-Consistent`) ?? e2.headers?.get(`x-wix-consistent`);
512
+ function Ue(e5) {
513
+ return e5.headers?.get(`X-Wix-Consistent`) ?? e5.headers?.get(`x-wix-consistent`);
514
514
  }
515
515
  var We = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
516
516
  var Ge = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
517
517
  var Ke = `items`;
518
518
  var qe = `pagingMetadata`;
519
519
  var Je = We;
520
- function Ye(e2, t2) {
521
- return e2?.split(`.`).map((e3) => t2?.[e3] ?? e3).join(`.`);
520
+ function Ye(e5, t2) {
521
+ return e5?.split(`.`).map((e6) => t2?.[e6] ?? e6).join(`.`);
522
522
  }
523
- function Xe(e2, { transformSystemFields: t2 = true } = {}) {
524
- return t2 ? Ye(e2, Je) : e2;
523
+ function Xe(e5, { transformSystemFields: t2 = true } = {}) {
524
+ return t2 ? Ye(e5, Je) : e5;
525
525
  }
526
526
  var Ze = `sort.fieldName`;
527
- function Qe(e2, t2, n2) {
528
- return (e2 === Ze || e2.endsWith(`.${Ze}`)) && typeof t2 == `string` ? Ye(t2, n2) : t2;
527
+ function Qe(e5, t2, n2) {
528
+ return (e5 === Ze || e5.endsWith(`.${Ze}`)) && typeof t2 == `string` ? Ye(t2, n2) : t2;
529
529
  }
530
- function $e(e2, t2, n2) {
531
- let r2 = (e3) => n2.includes(e3), i2 = (e3, n3) => {
532
- if (Array.isArray(e3)) e3.forEach((e4) => {
533
- i2(e4, n3);
530
+ function $e(e5, t2, n2) {
531
+ let r2 = (e6) => n2.includes(e6), i2 = (e6, n3) => {
532
+ if (Array.isArray(e6)) e6.forEach((e7) => {
533
+ i2(e7, n3);
534
534
  });
535
- else if (typeof e3 == `object` && e3) {
536
- let a2 = e3;
537
- Object.keys(a2).forEach((e4) => {
538
- let o2 = n3 === `` ? e4 : `${n3}.${e4}`;
535
+ else if (typeof e6 == `object` && e6) {
536
+ let a2 = e6;
537
+ Object.keys(a2).forEach((e7) => {
538
+ let o2 = n3 === `` ? e7 : `${n3}.${e7}`;
539
539
  if (r2(o2)) return;
540
- let s2 = et(e4, t2);
541
- s2 !== e4 && !(s2 in a2) && (a2[s2] = a2[e4], delete a2[e4]), a2[s2] = Qe(o2, a2[s2], t2), i2(a2[s2], o2);
540
+ let s2 = et(e7, t2);
541
+ s2 !== e7 && !(s2 in a2) && (a2[s2] = a2[e7], delete a2[e7]), a2[s2] = Qe(o2, a2[s2], t2), i2(a2[s2], o2);
542
542
  });
543
543
  }
544
544
  };
545
- return i2(e2, ``), e2;
545
+ return i2(e5, ``), e5;
546
546
  }
547
- function et(e2, t2) {
547
+ function et(e5, t2) {
548
548
  let n2;
549
- return n2 = e2.includes(`.`) ? e2.split(`.`).map((e3) => t2[e3] ?? e3).join(`.`) : t2[e2] ?? e2, n2;
549
+ return n2 = e5.includes(`.`) ? e5.split(`.`).map((e6) => t2[e6] ?? e6).join(`.`) : t2[e5] ?? e5, n2;
550
550
  }
551
- function A(e2, t2 = []) {
552
- return $e(e2, We, t2);
551
+ function A(e5, t2 = []) {
552
+ return $e(e5, We, t2);
553
553
  }
554
- function j(e2, t2 = []) {
555
- return $e(e2, Ge, t2);
554
+ function j(e5, t2 = []) {
555
+ return $e(e5, Ge, t2);
556
556
  }
557
- function M(e2) {
558
- return e2 ? new Date(e2) : void 0;
557
+ function M(e5) {
558
+ return e5 ? new Date(e5) : void 0;
559
559
  }
560
560
  var tt = /* @__PURE__ */ new WeakMap();
561
561
  function nt() {
562
562
  return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
563
563
  }
564
- function rt(e2, t2) {
565
- let n2 = e2.get(t2);
566
- return n2 || (n2 = nt(), e2.set(t2, n2)), n2;
564
+ function rt(e5, t2) {
565
+ let n2 = e5.get(t2);
566
+ return n2 || (n2 = nt(), e5.set(t2, n2)), n2;
567
567
  }
568
- function it(e2, t2) {
569
- return t2 === `*` ? (e2.anyField ??= nt(), e2.anyField) : t2.endsWith(`{}`) ? (e2.mapFields ??= /* @__PURE__ */ new Map(), rt(e2.mapFields, t2.slice(0, -2))) : (e2.fields ??= /* @__PURE__ */ new Map(), rt(e2.fields, t2));
568
+ function it(e5, t2) {
569
+ return t2 === `*` ? (e5.anyField ??= nt(), e5.anyField) : t2.endsWith(`{}`) ? (e5.mapFields ??= /* @__PURE__ */ new Map(), rt(e5.mapFields, t2.slice(0, -2))) : (e5.fields ??= /* @__PURE__ */ new Map(), rt(e5.fields, t2));
570
570
  }
571
- function at(e2) {
571
+ function at(e5) {
572
572
  let t2 = nt();
573
- for (let n2 of e2) {
574
- let e3 = n2.path.split(`.`).reduce(it, t2);
575
- e3.leaves ??= [], e3.leaves.push(n2);
573
+ for (let n2 of e5) {
574
+ let e6 = n2.path.split(`.`).reduce(it, t2);
575
+ e6.leaves ??= [], e6.leaves.push(n2);
576
576
  }
577
577
  return t2;
578
578
  }
579
- function ot(e2) {
580
- let t2 = tt.get(e2);
581
- return t2 || (t2 = at(e2), tt.set(e2, t2)), t2;
579
+ function ot(e5) {
580
+ let t2 = tt.get(e5);
581
+ return t2 || (t2 = at(e5), tt.set(e5, t2)), t2;
582
582
  }
583
- function st(e2) {
584
- return typeof e2 == `object` && !!e2;
583
+ function st(e5) {
584
+ return typeof e5 == `object` && !!e5;
585
585
  }
586
- function ct(e2, { isRepeated: t2, isMap: n2 }, r2) {
587
- return t2 ? Array.isArray(e2) ? e2.map(r2) : e2 : n2 ? st(e2) ? Object.fromEntries(Object.entries(e2).map(([e3, t3]) => [e3, r2(t3)])) : e2 : r2(e2);
586
+ function ct(e5, { isRepeated: t2, isMap: n2 }, r2) {
587
+ return t2 ? Array.isArray(e5) ? e5.map(r2) : e5 : n2 ? st(e5) ? Object.fromEntries(Object.entries(e5).map(([e6, t3]) => [e6, r2(t3)])) : e5 : r2(e5);
588
588
  }
589
- function lt(e2, t2, n2) {
590
- st(e2) && ft(e2, t2, n2);
589
+ function lt(e5, t2, n2) {
590
+ st(e5) && ft(e5, t2, n2);
591
591
  }
592
- function ut(e2, t2, n2) {
592
+ function ut(e5, t2, n2) {
593
593
  for (let [r2, i2] of t2) {
594
- if (!(r2 in e2)) continue;
595
- if (i2.leaves) for (let t4 of i2.leaves) e2[r2] = ct(e2[r2], t4, n2);
596
- let t3 = e2[r2];
597
- Array.isArray(t3) ? t3.forEach((e3) => lt(e3, i2, n2)) : lt(t3, i2, n2);
594
+ if (!(r2 in e5)) continue;
595
+ if (i2.leaves) for (let t4 of i2.leaves) e5[r2] = ct(e5[r2], t4, n2);
596
+ let t3 = e5[r2];
597
+ Array.isArray(t3) ? t3.forEach((e6) => lt(e6, i2, n2)) : lt(t3, i2, n2);
598
598
  }
599
599
  }
600
- function dt(e2, t2, n2) {
600
+ function dt(e5, t2, n2) {
601
601
  for (let [r2, i2] of t2) {
602
- let t3 = e2[r2];
603
- st(t3) && Object.values(t3).forEach((e3) => lt(e3, i2, n2));
602
+ let t3 = e5[r2];
603
+ st(t3) && Object.values(t3).forEach((e6) => lt(e6, i2, n2));
604
604
  }
605
605
  }
606
- function ft(e2, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
607
- t2 && ut(e2, t2, i2), n2 && dt(e2, n2, i2), r2 && Object.values(e2).forEach((e3) => lt(e3, r2, i2));
606
+ function ft(e5, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
607
+ t2 && ut(e5, t2, i2), n2 && dt(e5, n2, i2), r2 && Object.values(e5).forEach((e6) => lt(e6, r2, i2));
608
608
  }
609
- function N(e2, t2) {
610
- if (!st(e2)) return e2;
611
- for (let { paths: n2, transformFn: r2 } of t2) ft(e2, ot(n2), r2);
612
- return e2;
609
+ function N(e5, t2) {
610
+ if (!st(e5)) return e5;
611
+ for (let { paths: n2, transformFn: r2 } of t2) ft(e5, ot(n2), r2);
612
+ return e5;
613
613
  }
614
- function pt(e2) {
615
- return Object.fromEntries(Object.entries(e2).filter(([, e3]) => e3 !== void 0));
614
+ function pt(e5) {
615
+ return Object.fromEntries(Object.entries(e5).filter(([, e6]) => e6 !== void 0));
616
616
  }
617
- function mt(e2) {
618
- return yt(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
617
+ function mt(e5) {
618
+ return yt(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
619
619
  }
620
620
  var ht = /([\p{Ll}\d])(\p{Lu})/gu;
621
621
  var gt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
622
622
  var _t = `$1\0$2`;
623
623
  var vt = /[^\p{L}\d]+/giu;
624
- function yt(e2) {
625
- let t2 = e2.trim();
624
+ function yt(e5) {
625
+ let t2 = e5.trim();
626
626
  t2 = t2.replace(ht, _t).replace(gt, _t), t2 = t2.replace(vt, `\0`);
627
627
  let n2 = 0, r2 = t2.length;
628
628
  for (; t2.charAt(n2) === `\0`; ) n2++;
@@ -630,336 +630,1389 @@ function yt(e2) {
630
630
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
631
631
  return t2.slice(n2, r2).split(/\0/g);
632
632
  }
633
- var bt = (e2) => `validationError` in (e2.response?.data?.details ?? {});
634
- var xt = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
635
- var St = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
636
- function P(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
637
- if (typeof e2 != `object` || !e2) throw e2;
638
- if (bt(e2)) return Ct(e2, t2, n2);
639
- if (xt(e2)) return Tt(e2);
640
- if (St(e2)) {
641
- let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: mt(n3), data: {} }, requestId: e2.requestId };
642
- return wt(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
643
- }
644
- return Et(e2);
645
- }
646
- var Ct = (e2, t2, n2) => {
647
- let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Dt(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
648
- return wt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
649
- };
650
- var wt = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
651
- var Tt = (e2) => {
652
- let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? mt(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
653
- return wt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
654
- };
655
- var Et = (e2) => wt(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: mt(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
656
- var Dt = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
657
- let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
658
- return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
659
- let r3 = t2[e3.field];
660
- if (r3) return { ...e3, field: Ot(r3, i2) };
661
- let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
633
+ var bt = (e5) => `validationError` in (e5.response?.data?.details ?? {});
634
+ var xt = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
635
+ var St = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
636
+ function P(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
637
+ if (typeof e5 != `object` || !e5) throw e5;
638
+ if (bt(e5)) return Ct(e5, t2, n2);
639
+ if (xt(e5)) return Tt(e5);
640
+ if (St(e5)) {
641
+ let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: mt(n3), data: {} }, requestId: e5.requestId };
642
+ return wt(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
643
+ }
644
+ return Et(e5);
645
+ }
646
+ var Ct = (e5, t2, n2) => {
647
+ let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Dt(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 };
648
+ return wt(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
649
+ };
650
+ var wt = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
651
+ var Tt = (e5) => {
652
+ 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 ?? mt(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 };
653
+ return wt(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
654
+ };
655
+ var Et = (e5) => wt(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: mt(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
656
+ var Dt = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
657
+ let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
658
+ return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
659
+ let r3 = t2[e6.field];
660
+ if (r3) return { ...e6, field: Ot(r3, i2) };
661
+ let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
662
662
  if (s2) {
663
663
  let t3 = a2[s2];
664
- if (t3) return { ...e3, field: e3.field.replace(s2, Ot(t3, i2)) };
664
+ if (t3) return { ...e6, field: e6.field.replace(s2, Ot(t3, i2)) };
665
665
  }
666
- return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
666
+ return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
667
667
  });
668
668
  };
669
- var Ot = (e2, t2) => {
670
- let n2 = kt(e2);
671
- return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
669
+ var Ot = (e5, t2) => {
670
+ let n2 = kt(e5);
671
+ return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
672
672
  };
673
- var kt = (e2) => {
674
- let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
673
+ var kt = (e5) => {
674
+ let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
675
675
  return t2 && t2.groups && Number(t2.groups.argIndex);
676
676
  };
677
677
  function At() {
678
- let e2 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
679
- if (e2) return { initWixModules(t3, n3) {
680
- return jt(() => e2(t3, n3));
678
+ let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
679
+ if (e5) return { initWixModules(t3, n3) {
680
+ return jt(() => e5(t3, n3));
681
681
  }, fetchWithAuth() {
682
682
  throw Error(`fetchWithAuth is not available in this context`);
683
683
  }, graphql() {
684
684
  throw Error(`graphql is not available in this context`);
685
685
  } };
686
- let t2 = typeof $wixContext < `u` ? $wixContext.client : h.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : h.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : h.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : h.elevatedClient;
687
- if (t2 || n2) return { initWixModules(e3, r2) {
686
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : g.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : g.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : g.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : g.elevatedClient;
687
+ if (t2 || n2) return { initWixModules(e6, r2) {
688
688
  if (r2) {
689
689
  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`);
690
- return jt(() => n2.use(e3));
690
+ return jt(() => n2.use(e6));
691
691
  }
692
692
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
693
- return jt(() => t2.use(e3));
694
- }, fetchWithAuth: (e3, n3) => {
693
+ return jt(() => t2.use(e6));
694
+ }, fetchWithAuth: (e6, n3) => {
695
695
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
696
- return t2.fetchWithAuth(e3, n3);
696
+ return t2.fetchWithAuth(e6, n3);
697
697
  }, getAuth() {
698
698
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
699
699
  return t2.auth;
700
- }, async graphql(e3, n3, r2) {
700
+ }, async graphql(e6, n3, r2) {
701
701
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
702
- return t2.graphql(e3, n3, r2);
702
+ return t2.graphql(e6, n3, r2);
703
703
  } };
704
704
  }
705
- function jt(e2) {
706
- let t2 = globalThis.__wix_context__, n2 = { client: h.client, elevatedClient: h.elevatedClient }, r2;
707
- globalThis.__wix_context__ = void 0, h.client = void 0, h.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
705
+ function jt(e5) {
706
+ let t2 = globalThis.__wix_context__, n2 = { client: g.client, elevatedClient: g.elevatedClient }, r2;
707
+ globalThis.__wix_context__ = void 0, g.client = void 0, g.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
708
708
  try {
709
- return e2();
709
+ return e5();
710
710
  } finally {
711
- globalThis.__wix_context__ = t2, h.client = n2.client, h.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
711
+ globalThis.__wix_context__ = t2, g.client = n2.client, g.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
712
712
  }
713
713
  }
714
- function Mt(e2, t2) {
714
+ function Mt(e5, t2) {
715
715
  return (...n2) => {
716
716
  let r2 = At();
717
- return r2 ? r2.initWixModules(e2, t2).apply(void 0, n2) : e2.apply(void 0, n2);
717
+ return r2 ? r2.initWixModules(e5, t2).apply(void 0, n2) : e5.apply(void 0, n2);
718
718
  };
719
719
  }
720
- function Nt(e2) {
720
+ function Nt(e5) {
721
721
  let t2 = (...t3) => {
722
722
  let n2 = At();
723
- return n2 ? n2.initWixModules(e2).apply(void 0, t3) : () => ({ slug: e2.type });
723
+ return n2 ? n2.initWixModules(e5).apply(void 0, t3) : () => ({ slug: e5.type });
724
724
  };
725
- return t2.__type = e2.__type, t2.type = e2.type, t2.isDomainEvent = e2.isDomainEvent, t2.transformations = e2.transformations, t2;
725
+ return t2.__type = e5.__type, t2.type = e5.type, t2.isDomainEvent = e5.isDomainEvent, t2.transformations = e5.transformations, t2;
726
726
  }
727
- function Pt(e2, t2 = false) {
728
- return Mt(e2, t2);
727
+ function Pt(e5, t2 = false) {
728
+ return Mt(e5, t2);
729
729
  }
730
- function Ft(e2, t2) {
731
- let n2 = It(e2), r2 = Object.entries(n2).some(([e3, t3]) => e3.includes(`.`) || Array.isArray(t3) && t3.some((e4) => typeof e4 == `object`));
732
- return t2 && r2 ? new URLSearchParams({ ".r": Rt(JSON.stringify(e2)) }) : Object.entries(n2).reduce((e3, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
733
- r3 == null || Array.isArray(n3) && typeof r3 == `object` || e3.append(t3, r3);
734
- }), e3), new URLSearchParams());
730
+ function Ft(e5, t2) {
731
+ let n2 = Lt(e5), r2 = Object.entries(n2).some(([e6, t3]) => e6.includes(`.`) || Array.isArray(t3) && t3.some((e7) => typeof e7 == `object`));
732
+ return t2 && r2 ? new URLSearchParams({ ".r": zt(JSON.stringify(e5)) }) : Object.entries(n2).reduce((e6, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
733
+ r3 == null || Array.isArray(n3) && typeof r3 == `object` || e6.append(t3, r3);
734
+ }), e6), new URLSearchParams());
735
735
  }
736
- function F(e2) {
737
- let t2 = Zt(Yt(e2.host), e2.domainToMappings);
738
- return sn(rn(e2.protoPath, e2.data || {}), t2);
736
+ function It(e5) {
737
+ let t2 = Qt(Xt(e5.host), e5.domainToMappings);
738
+ return cn(an(e5.protoPath, e5.data || {}), t2);
739
739
  }
740
- function It(e2, t2 = ``) {
740
+ function Lt(e5, t2 = ``) {
741
741
  let n2 = {};
742
- return Object.entries(e2).forEach(([e3, r2]) => {
743
- let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Lt(t2, e3);
742
+ return Object.entries(e5).forEach(([e6, r2]) => {
743
+ let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Rt(t2, e6);
744
744
  if (i2) {
745
- let e4 = It(r2, a2);
746
- Object.assign(n2, e4);
745
+ let e7 = Lt(r2, a2);
746
+ Object.assign(n2, e7);
747
747
  } else n2[a2] = r2;
748
748
  }), n2;
749
749
  }
750
- function Lt(e2, t2) {
751
- return `${e2}${e2 ? `.` : ``}${t2}`;
752
- }
753
- var Rt = (e2) => {
754
- let t2 = new TextEncoder().encode(e2);
755
- return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e2, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
756
- };
757
- var zt = [`wix.com`, `editorx.com`];
758
- var Bt = `_`;
759
- var Vt = `*.`;
760
- var Ht = RegExp(`\\.(${zt.join(`|`)})$`);
761
- var Ut = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
762
- var Wt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
763
- var Gt = `dev.wix-code.com`;
764
- var Kt = /{(.*)}/;
765
- var qt = RegExp(`\\.(${Ut.join(`|`)})$`);
766
- var Jt = RegExp(`.*\\.${Gt}$`);
767
- function Yt(e2) {
768
- return Xt(e2).replace(Ht, `._base_domain_`).replace(qt, `._api_base_domain_`).replace(Jt, `*.dev.wix-code.com`);
769
- }
770
- function Xt(e2) {
771
- return Wt[e2] ?? e2;
772
- }
773
- function Zt(e2, t2) {
774
- let n2 = t2[e2];
750
+ function Rt(e5, t2) {
751
+ return `${e5}${e5 ? `.` : ``}${t2}`;
752
+ }
753
+ var zt = (e5) => {
754
+ let t2 = new TextEncoder().encode(e5);
755
+ return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e5, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
756
+ };
757
+ var Bt = [`wix.com`, `editorx.com`];
758
+ var Vt = `_`;
759
+ var Ht = `*.`;
760
+ var Ut = RegExp(`\\.(${Bt.join(`|`)})$`);
761
+ var Wt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
762
+ var Gt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
763
+ var Kt = `dev.wix-code.com`;
764
+ var qt = /{(.*)}/;
765
+ var Jt = RegExp(`\\.(${Wt.join(`|`)})$`);
766
+ var Yt = RegExp(`.*\\.${Kt}$`);
767
+ function Xt(e5) {
768
+ return Zt(e5).replace(Ut, `._base_domain_`).replace(Jt, `._api_base_domain_`).replace(Yt, `*.dev.wix-code.com`);
769
+ }
770
+ function Zt(e5) {
771
+ return Gt[e5] ?? e5;
772
+ }
773
+ function Qt(e5, t2) {
774
+ let n2 = t2[e5];
775
775
  if (n2) return n2;
776
- let r2 = Qt(e2, t2) ?? $t(e2, t2);
776
+ let r2 = $t(e5, t2) ?? en(e5, t2);
777
777
  if (!r2) {
778
- if (tn(e2)) {
779
- let e3 = t2[nn];
780
- if (e3) return e3;
778
+ if (nn(e5)) {
779
+ let e6 = t2[rn];
780
+ if (e6) return e6;
781
781
  }
782
- let n3 = t2[Bt];
782
+ let n3 = t2[Vt];
783
783
  if (n3) return n3;
784
784
  }
785
785
  return r2 ?? [];
786
786
  }
787
- function Qt(e2, t2) {
787
+ function $t(e5, t2) {
788
788
  return Object.entries(t2).find(([t3]) => {
789
- let [, ...n2] = e2.split(`.`);
789
+ let [, ...n2] = e5.split(`.`);
790
790
  return n2.join(`.`) === t3;
791
791
  })?.[1];
792
792
  }
793
- function $t(e2, t2) {
794
- let [n2] = Object.entries(t2).filter(([t3]) => en(e2, t3)).sort(([e3], [t3]) => t3.length - e3.length);
793
+ function en(e5, t2) {
794
+ let [n2] = Object.entries(t2).filter(([t3]) => tn(e5, t3)).sort(([e6], [t3]) => t3.length - e6.length);
795
795
  if (!n2) return;
796
796
  let [, r2] = n2;
797
797
  return r2;
798
798
  }
799
- function en(e2, t2) {
800
- if (!t2.startsWith(Vt)) return false;
799
+ function tn(e5, t2) {
800
+ if (!t2.startsWith(Ht)) return false;
801
801
  let n2 = t2.slice(1);
802
- return e2.length > n2.length && e2.endsWith(n2);
802
+ return e5.length > n2.length && e5.endsWith(n2);
803
803
  }
804
- function tn(e2) {
805
- return !!e2.match(/\._base_domain_$/);
804
+ function nn(e5) {
805
+ return !!e5.match(/\._base_domain_$/);
806
806
  }
807
- var nn = `www._base_domain_`;
808
- function rn(e2, t2) {
809
- return e2.split(`/`).map((e3) => an(e3, t2)).join(`/`);
807
+ var rn = `www._base_domain_`;
808
+ function an(e5, t2) {
809
+ return e5.split(`/`).map((e6) => on(e6, t2)).join(`/`);
810
810
  }
811
- function an(e2, t2) {
812
- let n2 = e2.match(Kt) || [], r2 = n2[1];
813
- return r2 ? on(t2, r2, e2, e2.replace(n2[0], ``)) : e2;
811
+ function on(e5, t2) {
812
+ let n2 = e5.match(qt) || [], r2 = n2[1];
813
+ return r2 ? sn(t2, r2, e5, e5.replace(n2[0], ``)) : e5;
814
814
  }
815
- function on(e2, t2, n2, r2) {
816
- let i2 = e2;
817
- for (let e3 of t2.split(`.`)) {
815
+ function sn(e5, t2, n2, r2) {
816
+ let i2 = e5;
817
+ for (let e6 of t2.split(`.`)) {
818
818
  if (!i2) return n2;
819
- i2 = i2[e3];
819
+ i2 = i2[e6];
820
820
  }
821
821
  return `${i2}${r2}`;
822
822
  }
823
- function sn(e2, t2) {
824
- let n2 = t2?.find((t3) => e2.startsWith(t3.destPath));
825
- return n2 ? n2.srcPath + e2.slice(n2.destPath.length) : e2;
823
+ function cn(e5, t2) {
824
+ let n2 = t2?.find((t3) => e5.startsWith(t3.destPath));
825
+ return n2 ? n2.srcPath + e5.slice(n2.destPath.length) : e5;
826
826
  }
827
- function I(e2) {
828
- return Nt(e2);
827
+ function ln(e5) {
828
+ return Nt(e5);
829
829
  }
830
- function cn(e2) {
831
- return e2 === `NaN` ? NaN : e2 === `Infinity` ? 1 / 0 : e2 === `-Infinity` ? -1 / 0 : e2;
830
+ function un(e5) {
831
+ return e5 === `NaN` ? NaN : e5 === `Infinity` ? 1 / 0 : e5 === `-Infinity` ? -1 / 0 : e5;
832
832
  }
833
- function ln(e2) {
834
- return e2 && pt({ formatted: e2.formattedAddress, location: e2.geocode, addressLine1: e2.addressLine, addressLine2: e2.addressLine2, streetAddress: e2.streetAddress && { name: e2.streetAddress.name, number: e2.streetAddress.number, apt: e2.streetAddress.apt, formattedAddressLine: e2.streetAddress.formattedAddressLine }, hint: e2.hint, city: e2.city, subdivision: e2.subdivision, country: e2.country, postalCode: e2.postalCode, countryFullname: e2.countryFullname, subdivisionFullname: e2.subdivisionFullname });
833
+ function dn(e5) {
834
+ return e5 && pt({ formatted: e5.formattedAddress, location: e5.geocode, addressLine1: e5.addressLine, addressLine2: e5.addressLine2, streetAddress: e5.streetAddress && { name: e5.streetAddress.name, number: e5.streetAddress.number, apt: e5.streetAddress.apt, formattedAddressLine: e5.streetAddress.formattedAddressLine }, hint: e5.hint, city: e5.city, subdivision: e5.subdivision, country: e5.country, postalCode: e5.postalCode, countryFullname: e5.countryFullname, subdivisionFullname: e5.subdivisionFullname });
835
835
  }
836
- var un = `x-wix-linguist`;
837
- var dn = `00000000-0000-0000-0000-000000000000`;
838
- var fn = `false`;
839
- var pn = () => {
840
- let e2 = gn(`language`), t2 = gn(`locale`);
841
- if (e2) return { [un]: [e2, t2 || e2, fn, dn].join(`|`) };
836
+ var fn;
837
+ (function(e5) {
838
+ e5.QUERY_PARAM = `QUERY_PARAM`, e5.SUBDOMAIN = `SUBDOMAIN`, e5.SUBDIRECTORY = `SUBDIRECTORY`;
839
+ })(fn ||= {});
840
+ var pn = { 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` };
841
+ var mn = (e5, t2) => {
842
+ e5.searchParams.set(`lang`, t2);
843
+ };
844
+ var hn = (e5, t2) => {
845
+ let n2 = e5.hostname.split(`.`);
846
+ n2[0] === `www` && (n2 = n2.slice(1)), n2 = [t2, ...n2], e5.hostname = n2.join(`.`);
847
+ };
848
+ var gn = (e5, t2) => {
849
+ e5.pathname = `/${t2}${e5.pathname}`;
850
+ };
851
+ var _n = (e5, t2) => {
852
+ if (!t2.languageCode || !t2?.resolutionMethod) return e5;
853
+ let n2 = new URL(e5);
854
+ return (t2?.resolutionMethod === `QUERY_PARAM` ? mn : t2?.resolutionMethod === `SUBDOMAIN` ? hn : gn)(n2, t2.languageCode), n2.href;
842
855
  };
843
- function mn() {
844
- let e2 = null, t2 = null;
856
+ var vn = (e5, t2) => {
857
+ if (!e5?.length) return e5;
858
+ let n2;
859
+ try {
860
+ n2 = new URL(e5);
861
+ } catch {
862
+ return e5;
863
+ }
864
+ n2.searchParams.delete(`lang`);
865
+ let r2 = n2.pathname.split(`/`)[1]?.toLowerCase();
866
+ if (t2.includes(r2 ?? ``)) {
867
+ let e6 = n2.pathname.split(`/`);
868
+ e6.splice(1, 1), n2.pathname = e6.join(`/`);
869
+ }
870
+ let i2 = n2.hostname.split(`.`)[0]?.toLowerCase();
871
+ if (t2.includes(i2 ?? ``)) {
872
+ let e6 = n2.hostname.split(`.`);
873
+ e6.shift(), n2.hostname = e6.join(`.`);
874
+ }
875
+ return n2.href;
876
+ };
877
+ function yn() {
878
+ let e5 = bn();
879
+ return e5 ? xn(e5) : [];
880
+ }
881
+ function bn() {
882
+ let e5 = typeof globals < `u` ? globals?.$ns?.[`wix-window`]?.multilingual : void 0, t2 = typeof window < `u` ? window?.essentials?.multilingual : void 0;
883
+ return e5 ?? t2 ?? globalThis?.__wix_site_metadata__?.multilingual;
884
+ }
885
+ function xn(e5) {
886
+ try {
887
+ if (e5?.supportedLanguages?.length) {
888
+ let t2 = e5.supportedLanguages, n2 = t2.map((e6) => e6.languageCode).filter(Boolean), r2 = e5.cleanUrl ?? Tn(n2);
889
+ return t2.map((e6) => ({ id: e6.languageCode, displayName: Sn(e6), regionalFormat: [e6.locale?.languageCode, e6.locale?.country].filter(Boolean).join(`-`), url: Cn(e6, r2), primary: e6.isPrimary, resolutionMethod: e6.resolutionMethod }));
890
+ }
891
+ if (e5?.siteLanguages?.length) {
892
+ let t2 = e5.siteLanguages, n2 = Tn(t2.map((e6) => e6.languageCode).filter(Boolean));
893
+ return t2.map((e6) => ({ id: e6.languageCode, displayName: Sn(e6), regionalFormat: e6.locale, url: Cn(e6, n2), primary: e6.isPrimaryLanguage, resolutionMethod: e6.resolutionMethod ? wn(e6.resolutionMethod) : void 0 }));
894
+ }
895
+ } catch (e6) {
896
+ return console.warn(`[Multilingual Manager] listSupportedLanguages failed`, e6), [];
897
+ }
898
+ return console.warn(`[Multilingual Manager] listSupportedLanguages is not available`), [];
899
+ }
900
+ function Sn(e5) {
901
+ let t2 = pn[e5.languageCode];
902
+ if (t2) return t2;
903
+ let n2 = e5.name ?? e5.countryCode;
904
+ if (n2) return n2;
905
+ }
906
+ function Cn(e5, t2) {
907
+ if (e5.url || !t2 || !e5.resolutionMethod) return e5.url;
908
+ if (e5.languageCode) try {
909
+ return _n(t2, { languageCode: e5.languageCode, countryCode: e5.countryCode, resolutionMethod: wn(e5.resolutionMethod), locale: { languageCode: e5.languageCode, country: e5.countryCode } });
910
+ } catch (e6) {
911
+ console.warn(`[Multilingual Manager] buildUrlForLanguage failed`, e6);
912
+ return;
913
+ }
914
+ }
915
+ function wn(e5) {
916
+ switch (e5) {
917
+ case `QUERY_PARAM`:
918
+ case `QueryParam`:
919
+ return fn.QUERY_PARAM;
920
+ case `SUBDOMAIN`:
921
+ case `Subdomain`:
922
+ return fn.SUBDOMAIN;
923
+ case `SUBDIRECTORY`:
924
+ case `Subdirectory`:
925
+ return fn.SUBDIRECTORY;
926
+ default:
927
+ return;
928
+ }
929
+ }
930
+ function Tn(e5) {
931
+ let t2 = typeof window < `u` && window.location?.href ? window.location.href : ``;
932
+ try {
933
+ return vn(t2, e5);
934
+ } catch (e6) {
935
+ return console.warn(`[Multilingual Manager] cleanCurrentUrl failed`, e6), t2;
936
+ }
937
+ }
938
+ var En = `x-wix-linguist`;
939
+ var Dn = `00000000-0000-0000-0000-000000000000`;
940
+ var On = `false`;
941
+ var kn = () => {
942
+ let e5 = Mn(`language`), t2 = Mn(`locale`);
943
+ if (e5) return { [En]: [e5, t2 || e5, On, Dn].join(`|`) };
944
+ };
945
+ function An() {
946
+ let e5 = null, t2 = null;
845
947
  return { promise: new Promise((n2, r2) => {
846
- e2 = n2, t2 = r2;
847
- }), resolve: e2, reject: t2 };
848
- }
849
- var hn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
850
- var gn = (e2) => hn()?.[e2];
851
- var _n = ({ createHost: e2 }) => ({ __type: `host`, create: (e3) => ({}), host: (t2) => {
852
- let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e2(t2), o2 = yn();
853
- return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: gn(`language`), locale: gn(`locale`), get passThroughHeaders() {
854
- return pn();
948
+ e5 = n2, t2 = r2;
949
+ }), resolve: e5, reject: t2 };
950
+ }
951
+ var jn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
952
+ var Mn = (e5) => jn()?.[e5];
953
+ var Nn = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host: (t2) => {
954
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 = Fn();
955
+ return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: Mn(`language`), locale: Mn(`locale`), get passThroughHeaders() {
956
+ return kn();
855
957
  } } };
856
- }, auth: (e3) => {
958
+ }, auth: (e6) => {
857
959
  let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
858
- !e3 && vn() && (e3 = t2?.getAccessTokenFunction?.());
859
- let n2 = false, { resolve: r2, promise: i2 } = mn();
960
+ !e6 && Pn() && (e6 = t2?.getAccessTokenFunction?.());
961
+ let n2 = false, { resolve: r2, promise: i2 } = An();
860
962
  return { getAuthHeaders: async () => {
861
- if (!e3 && n2 && (e3 = await i2), !e3) throw Error(`Failed to resolve auth token`);
862
- return { headers: { Authorization: await e3() } };
863
- }, getAccessTokenInjector: () => (n2 = true, (e4) => {
864
- r2(e4);
963
+ if (!e6 && n2 && (e6 = await i2), !e6) throw Error(`Failed to resolve auth token`);
964
+ return { headers: { Authorization: await e6() } };
965
+ }, getAccessTokenInjector: () => (n2 = true, (e7) => {
966
+ r2(e7);
865
967
  }) };
866
968
  } });
867
- function vn() {
969
+ function Pn() {
868
970
  return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
869
971
  }
870
- function yn() {
871
- let e2 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
872
- if (!e2) return;
873
- let t2 = new URL(e2);
972
+ function Fn() {
973
+ let e5 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
974
+ if (!e5) return;
975
+ let t2 = new URL(e5);
874
976
  return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
875
977
  }
876
- var bn = ({ clientSdk: e2, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
877
- if (!e2) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
878
- return e2.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
978
+ var In = ({ clientSdk: e5, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
979
+ 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`);
980
+ return e5.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
879
981
  }, getAccessToken: () => {
880
982
  throw Error(`Not implemented`);
881
983
  }, observeState: () => ({ disconnect: () => {
882
984
  } }) });
883
- var xn = _n({ createHost: function(e2) {
884
- let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e2?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e2 || {};
985
+ var Ln = Nn({ createHost: function(e5) {
986
+ let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e5?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e5 || {};
885
987
  if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
886
- return { channel: bn({ clientSdk: t2, applicationId: n2 }), close: () => {
988
+ return { channel: In({ clientSdk: t2, applicationId: n2 }), close: () => {
887
989
  } };
888
990
  } });
889
- var Sn = (e2, t2) => {
890
- let n2 = xn.host({ applicationId: e2, componentId: t2 }), r2 = xn.auth();
991
+ var Rn = (e5, t2) => {
992
+ let n2 = Ln.host({ applicationId: e5, componentId: t2 }), r2 = Ln.auth();
891
993
  return He({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
892
994
  };
893
- var Cn = (e2) => Sn(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e2);
894
- function wn() {
895
- let e2 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
896
- if (e2) return { initWixModules(t3, n3) {
897
- return Tn(() => e2(t3, n3));
995
+ var zn = (e5) => Rn(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
996
+ function Bn() {
997
+ let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
998
+ if (e5) return { initWixModules(t3, n3) {
999
+ return Vn(() => e5(t3, n3));
898
1000
  }, fetchWithAuth() {
899
1001
  throw Error(`fetchWithAuth is not available in this context`);
900
1002
  }, graphql() {
901
1003
  throw Error(`graphql is not available in this context`);
902
1004
  } };
903
- let t2 = typeof $wixContext < `u` ? $wixContext.client : h.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : h.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : h.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : h.elevatedClient;
904
- if (t2 || n2) return { initWixModules(e3, r2) {
1005
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : g.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : g.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : g.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : g.elevatedClient;
1006
+ if (t2 || n2) return { initWixModules(e6, r2) {
905
1007
  if (r2) {
906
1008
  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`);
907
- return Tn(() => n2.use(e3));
1009
+ return Vn(() => n2.use(e6));
908
1010
  }
909
1011
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
910
- return Tn(() => t2.use(e3));
911
- }, fetchWithAuth: (e3, n3) => {
1012
+ return Vn(() => t2.use(e6));
1013
+ }, fetchWithAuth: (e6, n3) => {
912
1014
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
913
- return t2.fetchWithAuth(e3, n3);
1015
+ return t2.fetchWithAuth(e6, n3);
914
1016
  }, getAuth() {
915
1017
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
916
1018
  return t2.auth;
917
- }, async graphql(e3, n3, r2) {
1019
+ }, async graphql(e6, n3, r2) {
918
1020
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
919
- return t2.graphql(e3, n3, r2);
1021
+ return t2.graphql(e6, n3, r2);
920
1022
  } };
921
1023
  }
922
- function Tn(e2) {
923
- let t2 = globalThis.__wix_context__, n2 = { client: h.client, elevatedClient: h.elevatedClient }, r2;
924
- globalThis.__wix_context__ = void 0, h.client = void 0, h.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
1024
+ function Vn(e5) {
1025
+ let t2 = globalThis.__wix_context__, n2 = { client: g.client, elevatedClient: g.elevatedClient }, r2;
1026
+ globalThis.__wix_context__ = void 0, g.client = void 0, g.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
925
1027
  try {
926
- return e2();
1028
+ return e5();
927
1029
  } finally {
928
- globalThis.__wix_context__ = t2, h.client = n2.client, h.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
1030
+ globalThis.__wix_context__ = t2, g.client = n2.client, g.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
929
1031
  }
930
1032
  }
931
- function En(e2, t2) {
932
- return { ...e2, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
933
- let r2 = wn();
1033
+ function Hn(e5, t2) {
1034
+ return { ...e5, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
1035
+ let r2 = Bn();
934
1036
  if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
935
- return r2.initWixModules(e2)[t3].apply(void 0, n2);
1037
+ return r2.initWixModules(e5)[t3].apply(void 0, n2);
936
1038
  }])) };
937
1039
  }
938
- function Dn(e2) {
939
- return En({ __type: `host`, create: (t2) => Object.entries(e2).reduce((e3, [n2, r2]) => ({ ...e3, [n2]: r2(t2) }), {}) }, Object.keys(e2));
1040
+ function Un(e5) {
1041
+ return Hn({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
940
1042
  }
941
- var On = function() {
942
- return On = Object.assign || function(e2) {
943
- for (var t2, n2 = 1, r2 = arguments.length; n2 < r2; n2++) for (var i2 in t2 = arguments[n2], t2) Object.prototype.hasOwnProperty.call(t2, i2) && (e2[i2] = t2[i2]);
944
- return e2;
945
- }, On.apply(this, arguments);
1043
+ var F = (e5) => typeof e5 == `string`;
1044
+ var Wn = () => {
1045
+ let e5, t2, n2 = new Promise((n3, r2) => {
1046
+ e5 = n3, t2 = r2;
1047
+ });
1048
+ return n2.resolve = e5, n2.reject = t2, n2;
1049
+ };
1050
+ var Gn = (e5) => e5 == null ? `` : `` + e5;
1051
+ var Kn = (e5, t2, n2) => {
1052
+ e5.forEach((e6) => {
1053
+ t2[e6] && (n2[e6] = t2[e6]);
1054
+ });
1055
+ };
1056
+ var qn = /###/g;
1057
+ var Jn = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(qn, `.`) : e5;
1058
+ var Yn = (e5) => !e5 || F(e5);
1059
+ var Xn = (e5, t2, n2) => {
1060
+ let r2 = F(t2) ? t2.split(`.`) : t2, i2 = 0;
1061
+ for (; i2 < r2.length - 1; ) {
1062
+ if (Yn(e5)) return {};
1063
+ let t3 = Jn(r2[i2]);
1064
+ !e5[t3] && n2 && (e5[t3] = new n2()), e5 = Object.prototype.hasOwnProperty.call(e5, t3) ? e5[t3] : {}, ++i2;
1065
+ }
1066
+ return Yn(e5) ? {} : { obj: e5, k: Jn(r2[i2]) };
1067
+ };
1068
+ var Zn = (e5, t2, n2) => {
1069
+ let { obj: r2, k: i2 } = Xn(e5, t2, Object);
1070
+ if (r2 !== void 0 || t2.length === 1) {
1071
+ r2[i2] = n2;
1072
+ return;
1073
+ }
1074
+ let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = Xn(e5, o2, Object);
1075
+ for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = Xn(e5, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1076
+ s2.obj[`${s2.k}.${a2}`] = n2;
1077
+ };
1078
+ var Qn = (e5, t2, n2, r2) => {
1079
+ let { obj: i2, k: a2 } = Xn(e5, t2, Object);
1080
+ i2[a2] = i2[a2] || [], i2[a2].push(n2);
1081
+ };
1082
+ var $n = (e5, t2) => {
1083
+ let { obj: n2, k: r2 } = Xn(e5, t2);
1084
+ if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
1085
+ };
1086
+ var er = (e5, t2, n2) => {
1087
+ let r2 = $n(e5, n2);
1088
+ return r2 === void 0 ? $n(t2, n2) : r2;
1089
+ };
1090
+ var tr = (e5, t2, n2) => {
1091
+ for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? F(e5[r2]) || e5[r2] instanceof String || F(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : tr(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
1092
+ return e5;
1093
+ };
1094
+ var I = (e5) => e5.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1095
+ var nr = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1096
+ var rr = (e5) => F(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => nr[e6]) : e5;
1097
+ var ir = class {
1098
+ constructor(e5) {
1099
+ this.capacity = e5, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
1100
+ }
1101
+ getRegExp(e5) {
1102
+ let t2 = this.regExpMap.get(e5);
1103
+ if (t2 !== void 0) return t2;
1104
+ let n2 = new RegExp(e5);
1105
+ return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e5, n2), this.regExpQueue.push(e5), n2;
1106
+ }
1107
+ };
1108
+ var ar = [` `, `,`, `?`, `!`, `;`];
1109
+ var or = new ir(20);
1110
+ var sr = (e5, t2, n2) => {
1111
+ t2 ||= ``, n2 ||= ``;
1112
+ let r2 = ar.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1113
+ if (r2.length === 0) return true;
1114
+ let i2 = or.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1115
+ if (!a2) {
1116
+ let t3 = e5.indexOf(n2);
1117
+ t3 > 0 && !i2.test(e5.substring(0, t3)) && (a2 = true);
1118
+ }
1119
+ return a2;
1120
+ };
1121
+ var cr = (e5, t2, n2 = `.`) => {
1122
+ if (!e5) return;
1123
+ if (e5[t2]) return Object.prototype.hasOwnProperty.call(e5, t2) ? e5[t2] : void 0;
1124
+ let r2 = t2.split(n2), i2 = e5;
1125
+ for (let e6 = 0; e6 < r2.length; ) {
1126
+ if (!i2 || typeof i2 != `object`) return;
1127
+ let t3, a2 = ``;
1128
+ for (let o2 = e6; o2 < r2.length; ++o2) if (o2 !== e6 && (a2 += n2), a2 += r2[o2], t3 = i2[a2], t3 !== void 0) {
1129
+ if ([`string`, `number`, `boolean`].indexOf(typeof t3) > -1 && o2 < r2.length - 1) continue;
1130
+ e6 += o2 - e6 + 1;
1131
+ break;
1132
+ }
1133
+ i2 = t3;
1134
+ }
1135
+ return i2;
1136
+ };
1137
+ var lr = (e5) => e5?.replace(/_/g, `-`);
1138
+ var ur = { type: `logger`, log(e5) {
1139
+ this.output(`log`, e5);
1140
+ }, warn(e5) {
1141
+ this.output(`warn`, e5);
1142
+ }, error(e5) {
1143
+ this.output(`error`, e5);
1144
+ }, output(e5, t2) {
1145
+ console?.[e5]?.apply?.(console, t2);
1146
+ } };
1147
+ var L = new class e2 {
1148
+ constructor(e5, t2 = {}) {
1149
+ this.init(e5, t2);
1150
+ }
1151
+ init(e5, t2 = {}) {
1152
+ this.prefix = t2.prefix || `i18next:`, this.logger = e5 || ur, this.options = t2, this.debug = t2.debug;
1153
+ }
1154
+ log(...e5) {
1155
+ return this.forward(e5, `log`, ``, true);
1156
+ }
1157
+ warn(...e5) {
1158
+ return this.forward(e5, `warn`, ``, true);
1159
+ }
1160
+ error(...e5) {
1161
+ return this.forward(e5, `error`, ``);
1162
+ }
1163
+ deprecate(...e5) {
1164
+ return this.forward(e5, `warn`, `WARNING DEPRECATED: `, true);
1165
+ }
1166
+ forward(e5, t2, n2, r2) {
1167
+ return r2 && !this.debug ? null : (F(e5[0]) && (e5[0] = `${n2}${this.prefix} ${e5[0]}`), this.logger[t2](e5));
1168
+ }
1169
+ create(t2) {
1170
+ return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
1171
+ }
1172
+ clone(t2) {
1173
+ return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
1174
+ }
1175
+ }();
1176
+ var dr = class {
1177
+ constructor() {
1178
+ this.observers = {};
1179
+ }
1180
+ on(e5, t2) {
1181
+ return e5.split(` `).forEach((e6) => {
1182
+ this.observers[e6] || (this.observers[e6] = /* @__PURE__ */ new Map());
1183
+ let n2 = this.observers[e6].get(t2) || 0;
1184
+ this.observers[e6].set(t2, n2 + 1);
1185
+ }), this;
1186
+ }
1187
+ off(e5, t2) {
1188
+ if (this.observers[e5]) {
1189
+ if (!t2) {
1190
+ delete this.observers[e5];
1191
+ return;
1192
+ }
1193
+ this.observers[e5].delete(t2);
1194
+ }
1195
+ }
1196
+ emit(e5, ...t2) {
1197
+ this.observers[e5] && Array.from(this.observers[e5].entries()).forEach(([e6, n2]) => {
1198
+ for (let r2 = 0; r2 < n2; r2++) e6(...t2);
1199
+ }), this.observers[`*`] && Array.from(this.observers[`*`].entries()).forEach(([n2, r2]) => {
1200
+ for (let i2 = 0; i2 < r2; i2++) n2.apply(n2, [e5, ...t2]);
1201
+ });
1202
+ }
1203
+ };
1204
+ var fr = class extends dr {
1205
+ constructor(e5, t2 = { ns: [`translation`], defaultNS: `translation` }) {
1206
+ super(), this.data = e5 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
1207
+ }
1208
+ addNamespaces(e5) {
1209
+ this.options.ns.indexOf(e5) < 0 && this.options.ns.push(e5);
1210
+ }
1211
+ removeNamespaces(e5) {
1212
+ let t2 = this.options.ns.indexOf(e5);
1213
+ t2 > -1 && this.options.ns.splice(t2, 1);
1214
+ }
1215
+ getResource(e5, t2, n2, r2 = {}) {
1216
+ let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
1217
+ e5.indexOf(`.`) > -1 ? o2 = e5.split(`.`) : (o2 = [e5, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : F(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
1218
+ let s2 = $n(this.data, o2);
1219
+ return !s2 && !t2 && !n2 && e5.indexOf(`.`) > -1 && (e5 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !F(n2) ? s2 : cr(this.data?.[e5]?.[t2], n2, i2);
1220
+ }
1221
+ addResource(e5, t2, n2, r2, i2 = { silent: false }) {
1222
+ let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e5, t2];
1223
+ n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Zn(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
1224
+ }
1225
+ addResources(e5, t2, n2, r2 = { silent: false }) {
1226
+ for (let r3 in n2) (F(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
1227
+ r2.silent || this.emit(`added`, e5, t2, n2);
1228
+ }
1229
+ addResourceBundle(e5, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
1230
+ let o2 = [e5, t2];
1231
+ e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
1232
+ let s2 = $n(this.data, o2) || {};
1233
+ a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? tr(s2, n2, i2) : s2 = { ...s2, ...n2 }, Zn(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
1234
+ }
1235
+ removeResourceBundle(e5, t2) {
1236
+ this.hasResourceBundle(e5, t2) && delete this.data[e5][t2], this.removeNamespaces(t2), this.emit(`removed`, e5, t2);
1237
+ }
1238
+ hasResourceBundle(e5, t2) {
1239
+ return this.getResource(e5, t2) !== void 0;
1240
+ }
1241
+ getResourceBundle(e5, t2) {
1242
+ return t2 ||= this.options.defaultNS, this.getResource(e5, t2);
1243
+ }
1244
+ getDataByLanguage(e5) {
1245
+ return this.data[e5];
1246
+ }
1247
+ hasLanguageSomeTranslations(e5) {
1248
+ let t2 = this.getDataByLanguage(e5);
1249
+ return !!(t2 && Object.keys(t2) || []).find((e6) => t2[e6] && Object.keys(t2[e6]).length > 0);
1250
+ }
1251
+ toJSON() {
1252
+ return this.data;
1253
+ }
1254
+ };
1255
+ var pr = { processors: {}, addPostProcessor(e5) {
1256
+ this.processors[e5.name] = e5;
1257
+ }, handle(e5, t2, n2, r2, i2) {
1258
+ return e5.forEach((e6) => {
1259
+ t2 = this.processors[e6]?.process(t2, n2, r2, i2) ?? t2;
1260
+ }), t2;
1261
+ } };
1262
+ var mr = Symbol(`i18next/PATH_KEY`);
1263
+ function hr() {
1264
+ let e5 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
1265
+ return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === mr ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1266
+ }
1267
+ function R(e5, t2) {
1268
+ let { [mr]: n2 } = e5(hr()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1269
+ if (n2.length > 1 && i2) {
1270
+ let e6 = t2?.ns, a2 = Array.isArray(e6) ? e6 : null;
1271
+ if (a2 && a2.length > 1 && a2.slice(1).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
1272
+ }
1273
+ return n2.join(r2);
1274
+ }
1275
+ var gr = {};
1276
+ var _r = (e5) => !F(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1277
+ var vr = class e3 extends dr {
1278
+ constructor(e5, t2 = {}) {
1279
+ super(), Kn([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = L.create(`translator`);
1280
+ }
1281
+ changeLanguage(e5) {
1282
+ e5 && (this.language = e5);
1283
+ }
1284
+ exists(e5, t2 = { interpolation: {} }) {
1285
+ let n2 = { ...t2 };
1286
+ if (e5 == null) return false;
1287
+ let r2 = this.resolve(e5, n2);
1288
+ if (r2?.res === void 0) return false;
1289
+ let i2 = _r(r2.res);
1290
+ return !(n2.returnObjects === false && i2);
1291
+ }
1292
+ extractFromKey(e5, t2) {
1293
+ let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
1294
+ n2 === void 0 && (n2 = `:`);
1295
+ 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 && !sr(e5, n2, r2);
1296
+ if (a2 && !o2) {
1297
+ let t3 = e5.match(this.interpolator.nestingRegexp);
1298
+ if (t3 && t3.length > 0) return { key: e5, namespaces: F(i2) ? [i2] : i2 };
1299
+ let a3 = e5.split(n2);
1300
+ (n2 !== r2 || n2 === r2 && this.options.ns.indexOf(a3[0]) > -1) && (i2 = a3.shift()), e5 = a3.join(r2);
1301
+ }
1302
+ return { key: e5, namespaces: F(i2) ? [i2] : i2 };
1303
+ }
1304
+ translate(t2, n2, r2) {
1305
+ let i2 = typeof n2 == `object` ? { ...n2 } : n2;
1306
+ if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
1307
+ typeof t2 == `function` && (t2 = R(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e5) => typeof e5 == `function` ? R(e5, { ...this.options, ...i2 }) : String(e5));
1308
+ let a2 = i2.returnDetails === void 0 ? this.options.returnDetails : i2.returnDetails, o2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, { key: s2, namespaces: c2 } = this.extractFromKey(t2[t2.length - 1], i2), l2 = c2[c2.length - 1], u2 = i2.nsSeparator === void 0 ? this.options.nsSeparator : i2.nsSeparator;
1309
+ u2 === void 0 && (u2 = `:`);
1310
+ let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
1311
+ 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;
1312
+ 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 && !F(i2.count), x2 = e3.hasDefaultValue(i2), S2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, ee2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, C2 = b2 && !i2.ordinal && i2.count === 0, w2 = C2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${S2}`] || i2[`defaultValue${ee2}`] || i2.defaultValue, T2 = m2;
1313
+ y2 && !m2 && x2 && (T2 = w2);
1314
+ let E2 = _r(T2), D2 = Object.prototype.toString.apply(T2);
1315
+ if (y2 && T2 && E2 && _2.indexOf(D2) < 0 && !(F(v2) && Array.isArray(T2))) {
1316
+ if (!i2.returnObjects && !this.options.returnObjects) {
1317
+ this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
1318
+ let e5 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
1319
+ return a2 ? (p2.res = e5, p2.usedParams = this.getUsedParamsDetails(i2), p2) : e5;
1320
+ }
1321
+ if (o2) {
1322
+ let e5 = Array.isArray(T2), t3 = e5 ? [] : {}, n3 = e5 ? g2 : h2;
1323
+ for (let e6 in T2) if (Object.prototype.hasOwnProperty.call(T2, e6)) {
1324
+ let r3 = `${n3}${o2}${e6}`;
1325
+ t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: _r(w2) ? w2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = T2[e6]);
1326
+ }
1327
+ m2 = t3;
1328
+ }
1329
+ } else if (y2 && F(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1330
+ else {
1331
+ let e5 = false, n3 = false;
1332
+ !this.isValidLookup(m2) && x2 && (e5 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
1333
+ let a3 = (i2.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n3 ? void 0 : m2, c3 = x2 && w2 !== m2 && this.options.updateMissing;
1334
+ if (n3 || e5 || c3) {
1335
+ if (this.logger.log(c3 ? `updateKey` : `missingKey`, d2, l2, s2, c3 ? w2 : m2), o2) {
1336
+ let e7 = this.resolve(s2, { ...i2, keySeparator: false });
1337
+ e7 && e7.res && this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`);
1338
+ }
1339
+ let e6 = [], t3 = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i2.lng || this.language);
1340
+ if (this.options.saveMissingTo === `fallback` && t3 && t3[0]) for (let n5 = 0; n5 < t3.length; n5++) e6.push(t3[n5]);
1341
+ else this.options.saveMissingTo === `all` ? e6 = this.languageUtils.toResolveHierarchy(i2.lng || this.language) : e6.push(i2.lng || this.language);
1342
+ let n4 = (e7, t4, n5) => {
1343
+ let r3 = x2 && n5 !== m2 ? n5 : a3;
1344
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(e7, l2, t4, r3, c3, i2) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(e7, l2, t4, r3, c3, i2), this.emit(`missingKey`, e7, l2, t4, m2);
1345
+ };
1346
+ this.options.saveMissing && (this.options.saveMissingPlurals && b2 ? e6.forEach((e7) => {
1347
+ let t4 = this.pluralResolver.getSuffixes(e7, i2);
1348
+ C2 && i2[`defaultValue${this.options.pluralSeparator}zero`] && t4.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t4.push(`${this.options.pluralSeparator}zero`), t4.forEach((t5) => {
1349
+ n4([e7], s2 + t5, i2[`defaultValue${t5}`] || w2);
1350
+ });
1351
+ }) : n4(e6, s2, w2));
1352
+ }
1353
+ m2 = this.extendTranslation(m2, t2, i2, p2, r2), n3 && m2 === s2 && this.options.appendNamespaceToMissingKey && (m2 = `${l2}${u2}${s2}`), (n3 || e5) && this.options.parseMissingKeyHandler && (m2 = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l2}${u2}${s2}` : s2, e5 ? m2 : void 0, i2));
1354
+ }
1355
+ return a2 ? (p2.res = m2, p2.usedParams = this.getUsedParamsDetails(i2), p2) : m2;
1356
+ }
1357
+ extendTranslation(e5, t2, n2, r2, i2) {
1358
+ 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 });
1359
+ else if (!n2.skipInterpolation) {
1360
+ n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
1361
+ let a3 = F(e5) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1362
+ if (a3) {
1363
+ let t3 = e5.match(this.interpolator.nestingRegexp);
1364
+ o3 = t3 && t3.length;
1365
+ }
1366
+ let s2 = n2.replace && !F(n2.replace) ? n2.replace : n2;
1367
+ 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) {
1368
+ let t3 = e5.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
1369
+ o3 < r3 && (n2.nest = false);
1370
+ }
1371
+ !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();
1372
+ }
1373
+ let a2 = n2.postProcess || this.options.postProcess, o2 = F(a2) ? [a2] : a2;
1374
+ return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = pr.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
1375
+ }
1376
+ resolve(e5, t2 = {}) {
1377
+ let n2, r2, i2, a2, o2;
1378
+ return F(e5) && (e5 = [e5]), Array.isArray(e5) && (e5 = e5.map((e6) => typeof e6 == `function` ? R(e6, { ...this.options, ...t2 }) : e6)), e5.forEach((e6) => {
1379
+ if (this.isValidLookup(n2)) return;
1380
+ let s2 = this.extractFromKey(e6, t2), c2 = s2.key;
1381
+ r2 = c2;
1382
+ let l2 = s2.namespaces;
1383
+ this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
1384
+ let u2 = t2.count !== void 0 && !F(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (F(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1385
+ l2.forEach((e7) => {
1386
+ this.isValidLookup(n2) || (o2 = e7, !gr[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (gr[`${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) => {
1387
+ if (this.isValidLookup(n2)) return;
1388
+ a2 = r3;
1389
+ let o3 = [c2];
1390
+ if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(o3, c2, r3, e7, t2);
1391
+ else {
1392
+ let e8;
1393
+ u2 && (e8 = this.pluralResolver.getSuffix(r3, t2.count, t2));
1394
+ let n3 = `${this.options.pluralSeparator}zero`, i3 = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
1395
+ if (u2 && (t2.ordinal && e8.indexOf(i3) === 0 && o3.push(c2 + e8.replace(i3, this.options.pluralSeparator)), o3.push(c2 + e8), d2 && o3.push(c2 + n3)), f2) {
1396
+ let r4 = `${c2}${this.options.contextSeparator || `_`}${t2.context}`;
1397
+ o3.push(r4), u2 && (t2.ordinal && e8.indexOf(i3) === 0 && o3.push(r4 + e8.replace(i3, this.options.pluralSeparator)), o3.push(r4 + e8), d2 && o3.push(r4 + n3));
1398
+ }
1399
+ }
1400
+ let s3;
1401
+ for (; s3 = o3.pop(); ) this.isValidLookup(n2) || (i2 = s3, n2 = this.getResource(r3, e7, s3, t2));
1402
+ }));
1403
+ });
1404
+ }), { res: n2, usedKey: r2, exactUsedKey: i2, usedLng: a2, usedNS: o2 };
1405
+ }
1406
+ isValidLookup(e5) {
1407
+ return e5 !== void 0 && !(!this.options.returnNull && e5 === null) && !(!this.options.returnEmptyString && e5 === ``);
1408
+ }
1409
+ getResource(e5, t2, n2, r2 = {}) {
1410
+ return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e5, t2, n2, r2) : this.resourceStore.getResource(e5, t2, n2, r2);
1411
+ }
1412
+ getUsedParamsDetails(e5 = {}) {
1413
+ let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e5.replace && !F(e5.replace), r2 = n2 ? e5.replace : e5;
1414
+ if (n2 && e5.count !== void 0 && (r2.count = e5.count), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
1415
+ r2 = { ...r2 };
1416
+ for (let e6 of t2) delete r2[e6];
1417
+ }
1418
+ return r2;
1419
+ }
1420
+ static hasDefaultValue(e5) {
1421
+ for (let t2 in e5) if (Object.prototype.hasOwnProperty.call(e5, t2) && t2.substring(0, 12) === `defaultValue` && e5[t2] !== void 0) return true;
1422
+ return false;
1423
+ }
1424
+ };
1425
+ var yr = class {
1426
+ constructor(e5) {
1427
+ this.options = e5, this.supportedLngs = this.options.supportedLngs || false, this.logger = L.create(`languageUtils`);
1428
+ }
1429
+ getScriptPartFromCode(e5) {
1430
+ if (e5 = lr(e5), !e5 || e5.indexOf(`-`) < 0) return null;
1431
+ let t2 = e5.split(`-`);
1432
+ return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
1433
+ }
1434
+ getLanguagePartFromCode(e5) {
1435
+ if (e5 = lr(e5), !e5 || e5.indexOf(`-`) < 0) return e5;
1436
+ let t2 = e5.split(`-`);
1437
+ return this.formatLanguageCode(t2[0]);
1438
+ }
1439
+ formatLanguageCode(e5) {
1440
+ if (F(e5) && e5.indexOf(`-`) > -1) {
1441
+ let t2;
1442
+ try {
1443
+ t2 = Intl.getCanonicalLocales(e5)[0];
1444
+ } catch {
1445
+ }
1446
+ return t2 && this.options.lowerCaseLng && (t2 = t2.toLowerCase()), t2 || (this.options.lowerCaseLng ? e5.toLowerCase() : e5);
1447
+ }
1448
+ return this.options.cleanCode || this.options.lowerCaseLng ? e5.toLowerCase() : e5;
1449
+ }
1450
+ isSupportedCode(e5) {
1451
+ return (this.options.load === `languageOnly` || this.options.nonExplicitSupportedLngs) && (e5 = this.getLanguagePartFromCode(e5)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e5) > -1;
1452
+ }
1453
+ getBestMatchFromCodes(e5) {
1454
+ if (!e5) return null;
1455
+ let t2;
1456
+ return e5.forEach((e6) => {
1457
+ if (t2) return;
1458
+ let n2 = this.formatLanguageCode(e6);
1459
+ (!this.options.supportedLngs || this.isSupportedCode(n2)) && (t2 = n2);
1460
+ }), !t2 && this.options.supportedLngs && e5.forEach((e6) => {
1461
+ if (t2) return;
1462
+ let n2 = this.getScriptPartFromCode(e6);
1463
+ if (this.isSupportedCode(n2)) return t2 = n2;
1464
+ let r2 = this.getLanguagePartFromCode(e6);
1465
+ if (this.isSupportedCode(r2)) return t2 = r2;
1466
+ t2 = this.options.supportedLngs.find((e7) => {
1467
+ if (e7 === r2 || !(e7.indexOf(`-`) < 0 && r2.indexOf(`-`) < 0) && (e7.indexOf(`-`) > 0 && r2.indexOf(`-`) < 0 && e7.substring(0, e7.indexOf(`-`)) === r2 || e7.indexOf(r2) === 0 && r2.length > 1)) return e7;
1468
+ });
1469
+ }), t2 ||= this.getFallbackCodes(this.options.fallbackLng)[0], t2;
1470
+ }
1471
+ getFallbackCodes(e5, t2) {
1472
+ if (!e5) return [];
1473
+ if (typeof e5 == `function` && (e5 = e5(t2)), F(e5) && (e5 = [e5]), Array.isArray(e5)) return e5;
1474
+ if (!t2) return e5.default || [];
1475
+ let n2 = e5[t2];
1476
+ return n2 ||= e5[this.getScriptPartFromCode(t2)], n2 ||= e5[this.formatLanguageCode(t2)], n2 ||= e5[this.getLanguagePartFromCode(t2)], n2 ||= e5.default, n2 || [];
1477
+ }
1478
+ toResolveHierarchy(e5, t2) {
1479
+ let n2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e5), r2 = [], i2 = (e6) => {
1480
+ e6 && (this.isSupportedCode(e6) ? r2.push(e6) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e6}`));
1481
+ };
1482
+ return F(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))) : F(e5) && i2(this.formatLanguageCode(e5)), n2.forEach((e6) => {
1483
+ r2.indexOf(e6) < 0 && i2(this.formatLanguageCode(e6));
1484
+ }), r2;
1485
+ }
1486
+ };
1487
+ var br = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1488
+ var xr = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1489
+ var Sr = class {
1490
+ constructor(e5, t2 = {}) {
1491
+ this.languageUtils = e5, this.options = t2, this.logger = L.create(`pluralResolver`), this.pluralRulesCache = {};
1492
+ }
1493
+ clearCache() {
1494
+ this.pluralRulesCache = {};
1495
+ }
1496
+ getRule(e5, t2 = {}) {
1497
+ let n2 = lr(e5 === `dev` ? `en` : e5), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
1498
+ if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
1499
+ let a2;
1500
+ try {
1501
+ a2 = new Intl.PluralRules(n2, { type: r2 });
1502
+ } catch {
1503
+ if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), xr;
1504
+ if (!e5.match(/-|_/)) return xr;
1505
+ let n3 = this.languageUtils.getLanguagePartFromCode(e5);
1506
+ a2 = this.getRule(n3, t2);
1507
+ }
1508
+ return this.pluralRulesCache[i2] = a2, a2;
1509
+ }
1510
+ needsPlural(e5, t2 = {}) {
1511
+ let n2 = this.getRule(e5, t2);
1512
+ return n2 ||= this.getRule(`dev`, t2), n2?.resolvedOptions().pluralCategories.length > 1;
1513
+ }
1514
+ getPluralFormsOfKey(e5, t2, n2 = {}) {
1515
+ return this.getSuffixes(e5, n2).map((e6) => `${t2}${e6}`);
1516
+ }
1517
+ getSuffixes(e5, t2 = {}) {
1518
+ let n2 = this.getRule(e5, t2);
1519
+ return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => br[e6] - br[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
1520
+ }
1521
+ getSuffix(e5, t2, n2 = {}) {
1522
+ let r2 = this.getRule(e5, n2);
1523
+ 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));
1524
+ }
1525
+ };
1526
+ var Cr = (e5, t2, n2, r2 = `.`, i2 = true) => {
1527
+ let a2 = er(e5, t2, n2);
1528
+ return !a2 && i2 && F(n2) && (a2 = cr(e5, n2, r2), a2 === void 0 && (a2 = cr(t2, n2, r2))), a2;
1529
+ };
1530
+ var wr = (e5) => e5.replace(/\$/g, `$$$$`);
1531
+ var Tr = class {
1532
+ constructor(e5 = {}) {
1533
+ this.logger = L.create(`interpolator`), this.options = e5, this.format = e5?.interpolation?.format || ((e6) => e6), this.init(e5);
1534
+ }
1535
+ init(e5 = {}) {
1536
+ e5.interpolation ||= { escapeValue: true };
1537
+ 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;
1538
+ this.escape = t2 === void 0 ? rr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? I(i2) : a2 || `{{`, this.suffix = o2 ? I(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? I(d2) : f2 || I(`$t(`), this.nestingSuffix = p2 ? I(p2) : m2 || I(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1539
+ }
1540
+ reset() {
1541
+ this.options && this.init(this.options);
1542
+ }
1543
+ resetRegExp() {
1544
+ let e5 = (e6, t2) => e6?.source === t2 ? (e6.lastIndex = 0, e6) : new RegExp(t2, `g`);
1545
+ this.regexp = e5(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e5(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e5(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
1546
+ }
1547
+ interpolate(e5, t2, n2, r2) {
1548
+ let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e6) => {
1549
+ if (e6.indexOf(this.formatSeparator) < 0) {
1550
+ let i4 = Cr(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
1551
+ return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e6 }) : i4;
1552
+ }
1553
+ let i3 = e6.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
1554
+ return this.format(Cr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1555
+ };
1556
+ this.resetRegExp();
1557
+ let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
1558
+ return [{ regex: this.regexpUnescape, safeValue: (e6) => wr(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? wr(this.escape(e6)) : wr(e6) }].forEach((t3) => {
1559
+ for (o2 = 0; i2 = t3.regex.exec(e5); ) {
1560
+ let n3 = i2[1].trim();
1561
+ if (a2 = c2(n3), a2 === void 0) {
1562
+ if (typeof l2 == `function`) {
1563
+ let t4 = l2(e5, i2, r2);
1564
+ a2 = F(t4) ? t4 : ``;
1565
+ } else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
1566
+ else if (u2) {
1567
+ a2 = i2[0];
1568
+ continue;
1569
+ } else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e5}`), a2 = ``;
1570
+ } else !F(a2) && !this.useRawValueToEscape && (a2 = Gn(a2));
1571
+ let s3 = t3.safeValue(a2);
1572
+ 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;
1573
+ }
1574
+ }), e5;
1575
+ }
1576
+ nest(e5, t2, n2 = {}) {
1577
+ let r2, i2, a2, o2 = (e6, t3) => {
1578
+ let n3 = this.nestingOptionsSeparator;
1579
+ if (e6.indexOf(n3) < 0) return e6;
1580
+ let r3 = e6.split(RegExp(`${I(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
1581
+ e6 = r3[0], i3 = this.interpolate(i3, a2);
1582
+ let o3 = i3.match(/'/g), s2 = i3.match(/"/g);
1583
+ ((o3?.length ?? 0) % 2 == 0 && !s2 || (s2?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
1584
+ try {
1585
+ a2 = JSON.parse(i3), t3 && (a2 = { ...t3, ...a2 });
1586
+ } catch (t4) {
1587
+ return this.logger.warn(`failed parsing options string in nesting for key ${e6}`, t4), `${e6}${n3}${i3}`;
1588
+ }
1589
+ return a2.defaultValue && a2.defaultValue.indexOf(this.prefix) > -1 && delete a2.defaultValue, e6;
1590
+ };
1591
+ for (; r2 = this.nestingRegexp.exec(e5); ) {
1592
+ let s2 = [];
1593
+ a2 = { ...n2 }, a2 = a2.replace && !F(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1594
+ let c2 = /{.*}/.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
1595
+ 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 && !F(i2)) return i2;
1596
+ F(i2) || (i2 = Gn(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;
1597
+ }
1598
+ return e5;
1599
+ }
1600
+ };
1601
+ var Er = (e5) => {
1602
+ let t2 = e5.toLowerCase().trim(), n2 = {};
1603
+ if (e5.indexOf(`(`) > -1) {
1604
+ let r2 = e5.split(`(`);
1605
+ t2 = r2[0].toLowerCase().trim();
1606
+ let i2 = r2[1].substring(0, r2[1].length - 1);
1607
+ t2 === `currency` && i2.indexOf(`:`) < 0 ? n2.currency ||= i2.trim() : t2 === `relativetime` && i2.indexOf(`:`) < 0 ? n2.range ||= i2.trim() : i2.split(`;`).forEach((e6) => {
1608
+ if (e6) {
1609
+ let [t3, ...r3] = e6.split(`:`), i3 = r3.join(`:`).trim().replace(/^'+|'+$/g, ``), a2 = t3.trim();
1610
+ n2[a2] || (n2[a2] = i3), i3 === `false` && (n2[a2] = false), i3 === `true` && (n2[a2] = true), isNaN(i3) || (n2[a2] = parseInt(i3, 10));
1611
+ }
1612
+ });
1613
+ }
1614
+ return { formatName: t2, formatOptions: n2 };
1615
+ };
1616
+ var Dr = (e5) => {
1617
+ let t2 = {};
1618
+ return (n2, r2, i2) => {
1619
+ let a2 = i2;
1620
+ i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
1621
+ let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
1622
+ return s2 || (s2 = e5(lr(r2), i2), t2[o2] = s2), s2(n2);
1623
+ };
1624
+ };
1625
+ var Or = (e5) => (t2, n2, r2) => e5(lr(n2), r2)(t2);
1626
+ var kr = class {
1627
+ constructor(e5 = {}) {
1628
+ this.logger = L.create(`formatter`), this.options = e5, this.init(e5);
1629
+ }
1630
+ init(e5, t2 = { interpolation: {} }) {
1631
+ this.formatSeparator = t2.interpolation.formatSeparator || `,`;
1632
+ let n2 = t2.cacheInBuiltFormats ? Dr : Or;
1633
+ this.formats = { number: n2((e6, t3) => {
1634
+ let n3 = new Intl.NumberFormat(e6, { ...t3 });
1635
+ return (e7) => n3.format(e7);
1636
+ }), currency: n2((e6, t3) => {
1637
+ let n3 = new Intl.NumberFormat(e6, { ...t3, style: `currency` });
1638
+ return (e7) => n3.format(e7);
1639
+ }), datetime: n2((e6, t3) => {
1640
+ let n3 = new Intl.DateTimeFormat(e6, { ...t3 });
1641
+ return (e7) => n3.format(e7);
1642
+ }), relativetime: n2((e6, t3) => {
1643
+ let n3 = new Intl.RelativeTimeFormat(e6, { ...t3 });
1644
+ return (e7) => n3.format(e7, t3.range || `day`);
1645
+ }), list: n2((e6, t3) => {
1646
+ let n3 = new Intl.ListFormat(e6, { ...t3 });
1647
+ return (e7) => n3.format(e7);
1648
+ }) };
1649
+ }
1650
+ add(e5, t2) {
1651
+ this.formats[e5.toLowerCase().trim()] = t2;
1652
+ }
1653
+ addCached(e5, t2) {
1654
+ this.formats[e5.toLowerCase().trim()] = Dr(t2);
1655
+ }
1656
+ format(e5, t2, n2, r2 = {}) {
1657
+ let i2 = t2.split(this.formatSeparator);
1658
+ if (i2.length > 1 && i2[0].indexOf(`(`) > 1 && i2[0].indexOf(`)`) < 0 && i2.find((e6) => e6.indexOf(`)`) > -1)) {
1659
+ let e6 = i2.findIndex((e7) => e7.indexOf(`)`) > -1);
1660
+ i2[0] = [i2[0], ...i2.splice(1, e6)].join(this.formatSeparator);
1661
+ }
1662
+ return i2.reduce((e6, t3) => {
1663
+ let { formatName: i3, formatOptions: a2 } = Er(t3);
1664
+ if (this.formats[i3]) {
1665
+ let t4 = e6;
1666
+ try {
1667
+ let o2 = r2?.formatParams?.[r2.interpolationkey] || {}, s2 = o2.locale || o2.lng || r2.locale || r2.lng || n2;
1668
+ t4 = this.formats[i3](e6, s2, { ...a2, ...r2, ...o2 });
1669
+ } catch (e7) {
1670
+ this.logger.warn(e7);
1671
+ }
1672
+ return t4;
1673
+ }
1674
+ return this.logger.warn(`there was no format function for ${i3}`), e6;
1675
+ }, e5);
1676
+ }
1677
+ };
1678
+ var Ar = (e5, t2) => {
1679
+ e5.pending[t2] !== void 0 && (delete e5.pending[t2], e5.pendingCount--);
1680
+ };
1681
+ var jr = class extends dr {
1682
+ constructor(e5, t2, n2, r2 = {}) {
1683
+ super(), this.backend = e5, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = L.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);
1684
+ }
1685
+ queueLoad(e5, t2, n2, r2) {
1686
+ let i2 = {}, a2 = {}, o2 = {}, s2 = {};
1687
+ return e5.forEach((e6) => {
1688
+ let r3 = true;
1689
+ t2.forEach((t3) => {
1690
+ let o3 = `${e6}|${t3}`;
1691
+ !n2.reload && this.store.hasResourceBundle(e6, t3) ? this.state[o3] = 2 : this.state[o3] < 0 || (this.state[o3] === 1 ? a2[o3] === void 0 && (a2[o3] = true) : (this.state[o3] = 1, r3 = false, a2[o3] === void 0 && (a2[o3] = true), i2[o3] === void 0 && (i2[o3] = true), s2[t3] === void 0 && (s2[t3] = true)));
1692
+ }), r3 || (o2[e6] = true);
1693
+ }), (Object.keys(i2).length || Object.keys(a2).length) && this.queue.push({ pending: a2, pendingCount: Object.keys(a2).length, loaded: {}, errors: [], callback: r2 }), { toLoad: Object.keys(i2), pending: Object.keys(a2), toLoadLanguages: Object.keys(o2), toLoadNamespaces: Object.keys(s2) };
1694
+ }
1695
+ loaded(e5, t2, n2) {
1696
+ let r2 = e5.split(`|`), i2 = r2[0], a2 = r2[1];
1697
+ 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);
1698
+ let o2 = {};
1699
+ this.queue.forEach((n3) => {
1700
+ Qn(n3.loaded, [i2], a2), Ar(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
1701
+ o2[e6] || (o2[e6] = {});
1702
+ let t3 = n3.loaded[e6];
1703
+ t3.length && t3.forEach((t4) => {
1704
+ o2[e6][t4] === void 0 && (o2[e6][t4] = true);
1705
+ });
1706
+ }), n3.done = true, n3.errors.length ? n3.callback(n3.errors) : n3.callback());
1707
+ }), this.emit(`loaded`, o2), this.queue = this.queue.filter((e6) => !e6.done);
1708
+ }
1709
+ read(e5, t2, n2, r2 = 0, i2 = this.retryTimeout, a2) {
1710
+ if (!e5.length) return a2(null, {});
1711
+ if (this.readingCalls >= this.maxParallelReads) {
1712
+ this.waitingReads.push({ lng: e5, ns: t2, fcName: n2, tried: r2, wait: i2, callback: a2 });
1713
+ return;
1714
+ }
1715
+ this.readingCalls++;
1716
+ let o2 = (o3, s3) => {
1717
+ if (this.readingCalls--, this.waitingReads.length > 0) {
1718
+ let e6 = this.waitingReads.shift();
1719
+ this.read(e6.lng, e6.ns, e6.fcName, e6.tried, e6.wait, e6.callback);
1720
+ }
1721
+ if (o3 && s3 && r2 < this.maxRetries) {
1722
+ setTimeout(() => {
1723
+ this.read.call(this, e5, t2, n2, r2 + 1, i2 * 2, a2);
1724
+ }, i2);
1725
+ return;
1726
+ }
1727
+ a2(o3, s3);
1728
+ }, s2 = this.backend[n2].bind(this.backend);
1729
+ if (s2.length === 2) {
1730
+ try {
1731
+ let n3 = s2(e5, t2);
1732
+ n3 && typeof n3.then == `function` ? n3.then((e6) => o2(null, e6)).catch(o2) : o2(null, n3);
1733
+ } catch (e6) {
1734
+ o2(e6);
1735
+ }
1736
+ return;
1737
+ }
1738
+ return s2(e5, t2, o2);
1739
+ }
1740
+ prepareLoading(e5, t2, n2 = {}, r2) {
1741
+ if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
1742
+ F(e5) && (e5 = this.languageUtils.toResolveHierarchy(e5)), F(t2) && (t2 = [t2]);
1743
+ let i2 = this.queueLoad(e5, t2, n2, r2);
1744
+ if (!i2.toLoad.length) return i2.pending.length || r2(), null;
1745
+ i2.toLoad.forEach((e6) => {
1746
+ this.loadOne(e6);
1747
+ });
1748
+ }
1749
+ load(e5, t2, n2) {
1750
+ this.prepareLoading(e5, t2, {}, n2);
1751
+ }
1752
+ reload(e5, t2, n2) {
1753
+ this.prepareLoading(e5, t2, { reload: true }, n2);
1754
+ }
1755
+ loadOne(e5, t2 = ``) {
1756
+ let n2 = e5.split(`|`), r2 = n2[0], i2 = n2[1];
1757
+ this.read(r2, i2, `read`, void 0, void 0, (n3, a2) => {
1758
+ n3 && this.logger.warn(`${t2}loading namespace ${i2} for language ${r2} failed`, n3), !n3 && a2 && this.logger.log(`${t2}loaded namespace ${i2} for language ${r2}`, a2), this.loaded(e5, n3, a2);
1759
+ });
1760
+ }
1761
+ saveMissing(e5, t2, n2, r2, i2, a2 = {}, o2 = () => {
1762
+ }) {
1763
+ if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t2)) {
1764
+ this.logger.warn(`did not save key "${n2}" as the namespace "${t2}" 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!!!`);
1765
+ return;
1766
+ }
1767
+ if (n2 != null && n2 !== ``) {
1768
+ if (this.backend?.create) {
1769
+ let s2 = { ...a2, isUpdate: i2 }, c2 = this.backend.create.bind(this.backend);
1770
+ if (c2.length < 6) try {
1771
+ let i3;
1772
+ i3 = c2.length === 5 ? c2(e5, t2, n2, r2, s2) : c2(e5, t2, n2, r2), i3 && typeof i3.then == `function` ? i3.then((e6) => o2(null, e6)).catch(o2) : o2(null, i3);
1773
+ } catch (e6) {
1774
+ o2(e6);
1775
+ }
1776
+ else c2(e5, t2, n2, r2, o2, s2);
1777
+ }
1778
+ e5 && e5[0] && this.store.addResource(e5[0], t2, n2, r2);
1779
+ }
1780
+ }
1781
+ };
1782
+ var Mr = () => ({ 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) => {
1783
+ let t2 = {};
1784
+ if (typeof e5[1] == `object` && (t2 = e5[1]), F(e5[1]) && (t2.defaultValue = e5[1]), F(e5[2]) && (t2.tDescription = e5[2]), typeof e5[2] == `object` || typeof e5[3] == `object`) {
1785
+ let n2 = e5[3] || e5[2];
1786
+ Object.keys(n2).forEach((e6) => {
1787
+ t2[e6] = n2[e6];
1788
+ });
1789
+ }
1790
+ return t2;
1791
+ }, interpolation: { escapeValue: true, format: (e5) => e5, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
1792
+ var Nr = (e5) => (F(e5.ns) && (e5.ns = [e5.ns]), F(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), F(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);
1793
+ var Pr = () => {
946
1794
  };
947
- function kn(e2) {
948
- var t2 = typeof Symbol == `function` && Symbol.iterator, n2 = t2 && e2[t2], r2 = 0;
949
- if (n2) return n2.call(e2);
950
- if (e2 && typeof e2.length == `number`) return { next: function() {
951
- return e2 && r2 >= e2.length && (e2 = void 0), { value: e2 && e2[r2++], done: !e2 };
1795
+ var Fr = (e5) => {
1796
+ Object.getOwnPropertyNames(Object.getPrototypeOf(e5)).forEach((t2) => {
1797
+ typeof e5[t2] == `function` && (e5[t2] = e5[t2].bind(e5));
1798
+ });
1799
+ };
1800
+ var Ir = `__i18next_supportNoticeShown`;
1801
+ var Lr = () => !!(typeof globalThis < `u` && globalThis[Ir] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
1802
+ var Rr = () => {
1803
+ typeof globalThis < `u` && (globalThis[Ir] = true);
1804
+ };
1805
+ var zr = (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));
1806
+ var z = class e4 extends dr {
1807
+ constructor(e5 = {}, t2) {
1808
+ if (super(), this.options = Nr(e5), this.services = {}, this.logger = L, this.modules = { external: [] }, Fr(this), t2 && !this.isInitialized && !e5.isClone) {
1809
+ if (!this.options.initAsync) return this.init(e5, t2), this;
1810
+ setTimeout(() => {
1811
+ this.init(e5, t2);
1812
+ }, 0);
1813
+ }
1814
+ }
1815
+ init(e5 = {}, t2) {
1816
+ this.isInitializing = true, typeof e5 == `function` && (t2 = e5, e5 = {}), e5.defaultNS == null && e5.ns && (F(e5.ns) ? e5.defaultNS = e5.ns : e5.ns.indexOf(`translation`) < 0 && (e5.defaultNS = e5.ns[0]));
1817
+ let n2 = Mr();
1818
+ this.options = { ...n2, ...this.options, ...Nr(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 && !zr(this) && !Lr() && (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}`), Rr());
1819
+ let r2 = (e6) => e6 ? typeof e6 == `function` ? new e6() : e6 : null;
1820
+ if (!this.options.isClone) {
1821
+ this.modules.logger ? L.init(r2(this.modules.logger), this.options) : L.init(null, this.options);
1822
+ let e6;
1823
+ e6 = this.modules.formatter ? this.modules.formatter : kr;
1824
+ let t3 = new yr(this.options);
1825
+ this.store = new fr(this.options.resources, this.options);
1826
+ let i3 = this.services;
1827
+ i3.logger = L, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new Sr(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 Tr(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new jr(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
1828
+ this.emit(e7, ...t4);
1829
+ }), 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 vr(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
1830
+ this.emit(e7, ...t4);
1831
+ }), this.modules.external.forEach((e7) => {
1832
+ e7.init && e7.init(this);
1833
+ });
1834
+ }
1835
+ if (this.format = this.options.interpolation.format, t2 ||= Pr, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1836
+ let e6 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1837
+ e6.length > 0 && e6[0] !== `dev` && (this.options.lng = e6[0]);
1838
+ }
1839
+ !this.services.languageDetector && !this.options.lng && this.logger.warn(`init: no languageDetector is used and no lng is defined`), [`getResource`, `hasResourceBundle`, `getResourceBundle`, `getDataByLanguage`].forEach((e6) => {
1840
+ this[e6] = (...t3) => this.store[e6](...t3);
1841
+ }), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e6) => {
1842
+ this[e6] = (...t3) => (this.store[e6](...t3), this);
1843
+ });
1844
+ let i2 = Wn(), a2 = () => {
1845
+ let e6 = (e7, n3) => {
1846
+ 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);
1847
+ };
1848
+ if (this.languages && !this.isInitialized) return e6(null, this.t.bind(this));
1849
+ this.changeLanguage(this.options.lng, e6);
1850
+ };
1851
+ return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
1852
+ }
1853
+ loadResources(e5, t2 = Pr) {
1854
+ let n2 = t2, r2 = F(e5) ? e5 : this.language;
1855
+ if (typeof e5 == `function` && (n2 = e5), !this.options.resources || this.options.partialBundledLanguages) {
1856
+ if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
1857
+ let e6 = [], t3 = (t4) => {
1858
+ t4 && t4 !== `cimode` && this.services.languageUtils.toResolveHierarchy(t4).forEach((t5) => {
1859
+ t5 !== `cimode` && e6.indexOf(t5) < 0 && e6.push(t5);
1860
+ });
1861
+ };
1862
+ r2 ? t3(r2) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e7) => t3(e7)), this.options.preload?.forEach?.((e7) => t3(e7)), this.services.backendConnector.load(e6, this.options.ns, (e7) => {
1863
+ !e7 && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n2(e7);
1864
+ });
1865
+ } else n2(null);
1866
+ }
1867
+ reloadResources(e5, t2, n2) {
1868
+ let r2 = Wn();
1869
+ 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 ||= Pr, this.services.backendConnector.reload(e5, t2, (e6) => {
1870
+ r2.resolve(), n2(e6);
1871
+ }), r2;
1872
+ }
1873
+ use(e5) {
1874
+ if (!e5) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
1875
+ if (!e5.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
1876
+ 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` && pr.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
1877
+ }
1878
+ setResolvedLanguage(e5) {
1879
+ if (e5 && this.languages && !([`cimode`, `dev`].indexOf(e5) > -1)) {
1880
+ for (let e6 = 0; e6 < this.languages.length; e6++) {
1881
+ let t2 = this.languages[e6];
1882
+ if (!([`cimode`, `dev`].indexOf(t2) > -1) && this.store.hasLanguageSomeTranslations(t2)) {
1883
+ this.resolvedLanguage = t2;
1884
+ break;
1885
+ }
1886
+ }
1887
+ !this.resolvedLanguage && this.languages.indexOf(e5) < 0 && this.store.hasLanguageSomeTranslations(e5) && (this.resolvedLanguage = e5, this.languages.unshift(e5));
1888
+ }
1889
+ }
1890
+ changeLanguage(e5, t2) {
1891
+ this.isLanguageChangingTo = e5;
1892
+ let n2 = Wn();
1893
+ this.emit(`languageChanging`, e5);
1894
+ let r2 = (e6) => {
1895
+ this.language = e6, this.languages = this.services.languageUtils.toResolveHierarchy(e6), this.resolvedLanguage = void 0, this.setResolvedLanguage(e6);
1896
+ }, i2 = (i3, a3) => {
1897
+ 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));
1898
+ }, a2 = (t3) => {
1899
+ !e5 && !t3 && this.services.languageDetector && (t3 = []);
1900
+ let n3 = F(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(F(t3) ? [t3] : t3);
1901
+ a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e6) => {
1902
+ i2(e6, a3);
1903
+ });
1904
+ };
1905
+ return !e5 && this.services.languageDetector && !this.services.languageDetector.async ? a2(this.services.languageDetector.detect()) : !e5 && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a2) : this.services.languageDetector.detect(a2) : a2(e5), n2;
1906
+ }
1907
+ getFixedT(e5, t2, n2) {
1908
+ let r2 = (e6, t3, ...i2) => {
1909
+ let a2;
1910
+ a2 = typeof t3 == `object` ? { ...t3 } : this.options.overloadTranslationOptionHandler([e6, t3].concat(i2)), a2.lng = a2.lng || r2.lng, a2.lngs = a2.lngs || r2.lngs, a2.ns = a2.ns || r2.ns, a2.keyPrefix !== `` && (a2.keyPrefix = a2.keyPrefix || n2 || r2.keyPrefix);
1911
+ let o2 = { ...this.options, ...a2 };
1912
+ typeof a2.keyPrefix == `function` && (a2.keyPrefix = R(a2.keyPrefix, o2));
1913
+ let s2 = this.options.keySeparator || `.`, c2;
1914
+ return a2.keyPrefix && Array.isArray(e6) ? c2 = e6.map((e7) => (typeof e7 == `function` && (e7 = R(e7, o2)), `${a2.keyPrefix}${s2}${e7}`)) : (typeof e6 == `function` && (e6 = R(e6, o2)), c2 = a2.keyPrefix ? `${a2.keyPrefix}${s2}${e6}` : e6), this.t(c2, a2);
1915
+ };
1916
+ return F(e5) ? r2.lng = e5 : r2.lngs = e5, r2.ns = t2, r2.keyPrefix = n2, r2;
1917
+ }
1918
+ t(...e5) {
1919
+ return this.translator?.translate(...e5);
1920
+ }
1921
+ exists(...e5) {
1922
+ return this.translator?.exists(...e5);
1923
+ }
1924
+ setDefaultNamespace(e5) {
1925
+ this.options.defaultNS = e5;
1926
+ }
1927
+ hasLoadedNamespace(e5, t2 = {}) {
1928
+ if (!this.isInitialized) return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`, this.languages), false;
1929
+ if (!this.languages || !this.languages.length) return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`, this.languages), false;
1930
+ let n2 = t2.lng || this.resolvedLanguage || this.languages[0], r2 = this.options ? this.options.fallbackLng : false, i2 = this.languages[this.languages.length - 1];
1931
+ if (n2.toLowerCase() === `cimode`) return true;
1932
+ let a2 = (e6, t3) => {
1933
+ let n3 = this.services.backendConnector.state[`${e6}|${t3}`];
1934
+ return n3 === -1 || n3 === 0 || n3 === 2;
1935
+ };
1936
+ if (t2.precheck) {
1937
+ let e6 = t2.precheck(this, a2);
1938
+ if (e6 !== void 0) return e6;
1939
+ }
1940
+ return !!(this.hasResourceBundle(n2, e5) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a2(n2, e5) && (!r2 || a2(i2, e5)));
1941
+ }
1942
+ loadNamespaces(e5, t2) {
1943
+ let n2 = Wn();
1944
+ return this.options.ns ? (F(e5) && (e5 = [e5]), e5.forEach((e6) => {
1945
+ this.options.ns.indexOf(e6) < 0 && this.options.ns.push(e6);
1946
+ }), this.loadResources((e6) => {
1947
+ n2.resolve(), t2 && t2(e6);
1948
+ }), n2) : (t2 && t2(), Promise.resolve());
1949
+ }
1950
+ loadLanguages(e5, t2) {
1951
+ let n2 = Wn();
1952
+ F(e5) && (e5 = [e5]);
1953
+ let r2 = this.options.preload || [], i2 = e5.filter((e6) => r2.indexOf(e6) < 0 && this.services.languageUtils.isSupportedCode(e6));
1954
+ return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e6) => {
1955
+ n2.resolve(), t2 && t2(e6);
1956
+ }), n2) : (t2 && t2(), Promise.resolve());
1957
+ }
1958
+ dir(e5) {
1959
+ if (e5 ||= this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language), !e5) return `rtl`;
1960
+ try {
1961
+ let t3 = new Intl.Locale(e5);
1962
+ if (t3 && t3.getTextInfo) {
1963
+ let e6 = t3.getTextInfo();
1964
+ if (e6 && e6.direction) return e6.direction;
1965
+ }
1966
+ } catch {
1967
+ }
1968
+ 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 yr(Mr());
1969
+ return e5.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.indexOf(n2.getLanguagePartFromCode(e5)) > -1 || e5.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
1970
+ }
1971
+ static createInstance(t2 = {}, n2) {
1972
+ let r2 = new e4(t2, n2);
1973
+ return r2.createInstance = e4.createInstance, r2;
1974
+ }
1975
+ cloneInstance(t2 = {}, n2 = Pr) {
1976
+ let r2 = t2.forkResourceStore;
1977
+ r2 && delete t2.forkResourceStore;
1978
+ let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
1979
+ if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e5) => {
1980
+ a2[e5] = this[e5];
1981
+ }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new fr(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) {
1982
+ let e5 = { ...Mr().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
1983
+ a2.services.interpolator = new Tr(n3);
1984
+ }
1985
+ return a2.translator = new vr(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
1986
+ a2.emit(e5, ...t3);
1987
+ }), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
1988
+ }
1989
+ toJSON() {
1990
+ return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
1991
+ }
1992
+ }.createInstance();
1993
+ z.createInstance, z.dir, z.init, z.loadResources, z.reloadResources, z.use, z.changeLanguage, z.getFixedT, z.t, z.exists, z.setDefaultNamespace, z.hasLoadedNamespace, z.loadNamespaces, z.loadLanguages;
1994
+ var Br = function() {
1995
+ return Br = Object.assign || function(e5) {
1996
+ for (var t2, n2 = 1, r2 = arguments.length; n2 < r2; n2++) for (var i2 in t2 = arguments[n2], t2) Object.prototype.hasOwnProperty.call(t2, i2) && (e5[i2] = t2[i2]);
1997
+ return e5;
1998
+ }, Br.apply(this, arguments);
1999
+ };
2000
+ function Vr(e5) {
2001
+ var t2 = typeof Symbol == `function` && Symbol.iterator, n2 = t2 && e5[t2], r2 = 0;
2002
+ if (n2) return n2.call(e5);
2003
+ if (e5 && typeof e5.length == `number`) return { next: function() {
2004
+ return e5 && r2 >= e5.length && (e5 = void 0), { value: e5 && e5[r2++], done: !e5 };
952
2005
  } };
953
2006
  throw TypeError(t2 ? `Object is not iterable.` : `Symbol.iterator is not defined.`);
954
2007
  }
955
- function L(e2, t2) {
956
- var n2 = typeof Symbol == `function` && e2[Symbol.iterator];
957
- if (!n2) return e2;
958
- var r2 = n2.call(e2), i2, a2 = [], o2;
2008
+ function B(e5, t2) {
2009
+ var n2 = typeof Symbol == `function` && e5[Symbol.iterator];
2010
+ if (!n2) return e5;
2011
+ var r2 = n2.call(e5), i2, a2 = [], o2;
959
2012
  try {
960
2013
  for (; (t2 === void 0 || t2-- > 0) && !(i2 = r2.next()).done; ) a2.push(i2.value);
961
- } catch (e3) {
962
- o2 = { error: e3 };
2014
+ } catch (e6) {
2015
+ o2 = { error: e6 };
963
2016
  } finally {
964
2017
  try {
965
2018
  i2 && !i2.done && (n2 = r2.return) && n2.call(r2);
@@ -969,17 +2022,85 @@ function L(e2, t2) {
969
2022
  }
970
2023
  return a2;
971
2024
  }
972
- function R(e2, t2, n2) {
2025
+ function Hr(e5, t2, n2) {
973
2026
  if (n2 || arguments.length === 2) for (var r2 = 0, i2 = t2.length, a2; r2 < i2; r2++) (a2 || !(r2 in t2)) && (a2 ||= Array.prototype.slice.call(t2, 0, r2), a2[r2] = t2[r2]);
974
- return e2.concat(a2 || Array.prototype.slice.call(t2));
2027
+ return e5.concat(a2 || Array.prototype.slice.call(t2));
2028
+ }
2029
+ var Ur = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
2030
+ var Wr = { "&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;": `/` };
2031
+ var Gr = (e5) => Wr[e5];
2032
+ var Kr = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(Ur, Gr), transDefaultProps: void 0 };
2033
+ var qr = (e5 = {}) => {
2034
+ Kr = { ...Kr, ...e5 };
2035
+ };
2036
+ var Jr = { type: `3rdParty`, init(e5) {
2037
+ qr(e5.options.react);
2038
+ } };
2039
+ var Yr = /* @__PURE__ */ new Map();
2040
+ var Xr = 500;
2041
+ var Zr;
2042
+ function Qr() {
2043
+ if (Zr === void 0) try {
2044
+ Zr = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
2045
+ } catch {
2046
+ Zr = false;
2047
+ }
2048
+ return Zr;
2049
+ }
2050
+ var $r = 15;
2051
+ function ei(e5) {
2052
+ if (!(typeof e5 != `string` || Qr()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > $r) 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.`);
2053
+ }
2054
+ function ti(e5, t2, n2) {
2055
+ 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(`&`)}`;
2056
+ }
2057
+ function ni(e5, t2, n2) {
2058
+ let r2 = ti(e5, t2, n2), i2 = Yr.get(r2);
2059
+ return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), Yr.size >= Xr && Yr.clear(), Yr.set(r2, i2)), i2;
2060
+ }
2061
+ function ri(e5, { value: t2, currency: n2 }, r2 = {}) {
2062
+ return ei(t2), ni(e5, n2, r2).format(t2);
975
2063
  }
976
- var An = class {
977
- constructor(e2) {
978
- this.message = e2, this.captureException = () => {
2064
+ function ii(e5, { value: t2, currency: n2 }, r2 = {}) {
2065
+ return ei(t2), ni(e5, n2, r2).formatToParts(t2);
2066
+ }
2067
+ function ai(e5) {
2068
+ return yn().find((e6) => e6.primary)?.id ?? e5;
2069
+ }
2070
+ function oi(e5, t2) {
2071
+ let { locale: n2, ...r2 } = t2 ?? {}, i2 = n2 ?? e5.essentials?.locale;
2072
+ 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.`);
2073
+ return { locale: i2, formatOptions: r2 };
2074
+ }
2075
+ var si = Un({ getLanguage: (e5) => () => {
2076
+ let t2 = e5.essentials?.language;
2077
+ 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.`);
2078
+ return t2;
2079
+ }, getLocale: (e5) => () => {
2080
+ let t2 = e5.essentials?.locale;
2081
+ 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.`);
2082
+ return t2;
2083
+ }, formatCurrency: (e5) => (t2, n2) => {
2084
+ let { locale: r2, formatOptions: i2 } = oi(e5, n2);
2085
+ return ri(r2, t2, i2);
2086
+ }, formatCurrencyToParts: (e5) => (t2, n2) => {
2087
+ let { locale: r2, formatOptions: i2 } = oi(e5, n2);
2088
+ return ii(r2, t2, i2);
2089
+ }, getTranslationFunction: (e5) => () => {
2090
+ let t2 = e5.translations?.();
2091
+ if (!t2) throw Error(`Host translation resources are not available.`);
2092
+ let n2 = z.createInstance(), r2 = ai(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
2093
+ return n2.use(Jr).init(i2, (e6) => {
2094
+ if (e6) throw e6;
2095
+ }), n2.t.bind(n2);
2096
+ } });
2097
+ var ci = class {
2098
+ constructor(e5) {
2099
+ this.message = e5, this.captureException = () => {
979
2100
  console.error(this.message);
980
2101
  }, this.captureMessage = () => {
981
2102
  console.error(this.message);
982
- }, this.startSpan = (e3, t2) => (console.error(this.message), t2(void 0)), this.startSpanManual = () => (console.error(this.message), { end: () => {
2103
+ }, this.startSpan = (e6, t2) => (console.error(this.message), t2(void 0)), this.startSpanManual = () => (console.error(this.message), { end: () => {
983
2104
  }, fail: () => {
984
2105
  } }), this.endSpanManual = () => {
985
2106
  console.error(this.message);
@@ -988,366 +2109,366 @@ var An = class {
988
2109
  };
989
2110
  }
990
2111
  };
991
- var jn = (e2) => new An(e2);
992
- var Mn = Dn({ getMonitoringClient: (e2) => () => e2.getMonitoringClient ? e2.getMonitoringClient() : jn(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
993
- var z = { 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` };
994
- function Nn(e2) {
2112
+ var li = (e5) => new ci(e5);
2113
+ var ui = Un({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : li(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
2114
+ var V = { 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` };
2115
+ function di(e5) {
995
2116
  try {
996
- let t2 = Mn.getMonitoringClient?.();
997
- return t2 && typeof t2[e2] == `function` ? t2 : null;
2117
+ let t2 = ui.getMonitoringClient?.();
2118
+ return t2 && typeof t2[e5] == `function` ? t2 : null;
998
2119
  } catch {
999
2120
  return null;
1000
2121
  }
1001
2122
  }
1002
- function B(e2, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
1003
- let a2 = Nn(`captureException`);
2123
+ function H(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2124
+ let a2 = di(`captureException`);
1004
2125
  if (!a2) return;
1005
- let o2 = e2 instanceof Error ? e2 : Error(String(e2));
2126
+ let o2 = e5 instanceof Error ? e5 : Error(String(e5));
1006
2127
  a2.captureException(o2, { level: r2, tags: { feature: t2, action: n2 }, ...i2 ? { contexts: i2 } : {} });
1007
2128
  }
1008
- function Pn(e2, { feature: t2, tags: n2 }, r2) {
1009
- let i2 = Nn(`startSpanManual`);
2129
+ function fi(e5, { feature: t2, tags: n2 }, r2) {
2130
+ let i2 = di(`startSpanManual`);
1010
2131
  if (!i2) return r2;
1011
- let a2 = i2.startSpanManual({ name: e2, tags: { feature: t2, ...n2 } });
1012
- return r2.then(() => a2.end(), (e3) => a2.fail(e3)), r2;
2132
+ let a2 = i2.startSpanManual({ name: e5, tags: { feature: t2, ...n2 } });
2133
+ return r2.then(() => a2.end(), (e6) => a2.fail(e6)), r2;
1013
2134
  }
1014
- var Fn = class extends import_react.Component {
2135
+ var pi = class extends import_react.Component {
1015
2136
  state = { hasError: false };
1016
2137
  static getDerivedStateFromError() {
1017
2138
  return { hasError: true };
1018
2139
  }
1019
- componentDidCatch(e2, t2) {
1020
- B(e2, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2140
+ componentDidCatch(e5, t2) {
2141
+ H(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
1021
2142
  }
1022
2143
  render() {
1023
2144
  return this.state.hasError ? this.props.fallback : this.props.children;
1024
2145
  }
1025
2146
  };
1026
- function In(e2) {
1027
- let t2 = e2;
1028
- if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e3) => {
1029
- t2.__state = { status: `fulfilled`, value: e3 };
1030
- }, (e3) => {
1031
- t2.__state = { status: `rejected`, reason: e3 };
2147
+ function mi(e5) {
2148
+ let t2 = e5;
2149
+ if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
2150
+ t2.__state = { status: `fulfilled`, value: e6 };
2151
+ }, (e6) => {
2152
+ t2.__state = { status: `rejected`, reason: e6 };
1032
2153
  })), t2.__state.status === `fulfilled`) return t2.__state.value;
1033
2154
  throw t2.__state.status === `rejected` ? t2.__state.reason : t2;
1034
2155
  }
1035
- function Ln(e2) {
1036
- let t2 = Promise.resolve(e2);
1037
- return t2.__state = { status: `fulfilled`, value: e2 }, t2;
2156
+ function hi(e5) {
2157
+ let t2 = Promise.resolve(e5);
2158
+ return t2.__state = { status: `fulfilled`, value: e5 }, t2;
1038
2159
  }
1039
- var Rn = /* @__PURE__ */ new WeakMap();
1040
- function zn(e2, t2, n2) {
1041
- let r2 = Rn.get(e2);
1042
- r2 || (r2 = /* @__PURE__ */ new WeakMap(), Rn.set(e2, r2));
2160
+ var gi = /* @__PURE__ */ new WeakMap();
2161
+ function _i(e5, t2, n2) {
2162
+ let r2 = gi.get(e5);
2163
+ r2 || (r2 = /* @__PURE__ */ new WeakMap(), gi.set(e5, r2));
1043
2164
  let i2 = r2.get(t2);
1044
2165
  i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
1045
2166
  let a2 = i2.get(n2);
1046
2167
  if (!a2) {
1047
- let r3 = e2;
1048
- a2 = r3.__state?.status === `fulfilled` ? Ln(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? Ln(n2(r3.__state.reason)) : e2.then(t2, n2), i2.set(n2, a2);
2168
+ let r3 = e5;
2169
+ a2 = r3.__state?.status === `fulfilled` ? hi(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? hi(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
1049
2170
  }
1050
2171
  return a2;
1051
2172
  }
1052
- function V(e2) {
1053
- return e2;
1054
- }
1055
- var Bn = V(`@wix/site-service-url`);
1056
- var Vn = `appSectionParams`;
1057
- function Hn(e2) {
1058
- let t2 = e2.searchParams.get(Vn);
1059
- if (t2 === null) return e2;
1060
- let n2 = new URL(e2);
1061
- n2.searchParams.delete(Vn);
1062
- for (let [e3, r2] of Object.entries(Un(t2))) typeof r2 == `string` && !n2.searchParams.has(e3) && n2.searchParams.set(e3, r2);
2173
+ function U(e5) {
2174
+ return e5;
2175
+ }
2176
+ var vi = U(`@wix/site-service-url`);
2177
+ var yi = `appSectionParams`;
2178
+ function bi(e5) {
2179
+ let t2 = e5.searchParams.get(yi);
2180
+ if (t2 === null) return e5;
2181
+ let n2 = new URL(e5);
2182
+ n2.searchParams.delete(yi);
2183
+ for (let [e6, r2] of Object.entries(xi(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
1063
2184
  return n2;
1064
2185
  }
1065
- function Un(e2) {
2186
+ function xi(e5) {
1066
2187
  try {
1067
- let t2 = JSON.parse(e2);
2188
+ let t2 = JSON.parse(e5);
1068
2189
  return t2 && typeof t2 == `object` && !Array.isArray(t2) ? t2 : {};
1069
2190
  } catch {
1070
2191
  return {};
1071
2192
  }
1072
2193
  }
1073
- var Wn = `bookings-uou:url-change`;
1074
- var Gn = (e2) => {
1075
- let t2 = new URL(e2);
2194
+ var Si = `bookings-uou:url-change`;
2195
+ var Ci = (e5) => {
2196
+ let t2 = new URL(e5);
1076
2197
  return t2.searchParams.sort(), t2.href;
1077
2198
  };
1078
- function Kn(e2, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2199
+ function wi(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
1079
2200
  let r2 = globalThis.window;
1080
2201
  if (!r2?.history) return;
1081
2202
  let i2 = new URL(r2.location.href);
1082
- if (Gn(i2) === Gn(e2)) return;
2203
+ if (Ci(i2) === Ci(e5)) return;
1083
2204
  let a2 = { scrollY: r2.scrollY };
1084
- if (n2) r2.history.replaceState(a2, ``, e2.href);
2205
+ if (n2) r2.history.replaceState(a2, ``, e5.href);
1085
2206
  else {
1086
2207
  r2.history.replaceState(a2, ``, i2.href);
1087
2208
  try {
1088
- r2.history.pushState(t2 ? a2 : null, ``, e2.href);
2209
+ r2.history.pushState(t2 ? a2 : null, ``, e5.href);
1089
2210
  } catch {
1090
2211
  return;
1091
2212
  }
1092
2213
  }
1093
- r2.dispatchEvent(new Event(Wn));
2214
+ r2.dispatchEvent(new Event(Si));
1094
2215
  }
1095
- function qn(e2) {
2216
+ function Ti(e5) {
1096
2217
  let t2 = globalThis.window;
1097
- return t2 ? (t2.addEventListener(Wn, e2), t2.addEventListener(`popstate`, e2), () => {
1098
- t2.removeEventListener(Wn, e2), t2.removeEventListener(`popstate`, e2);
2218
+ return t2 ? (t2.addEventListener(Si, e5), t2.addEventListener(`popstate`, e5), () => {
2219
+ t2.removeEventListener(Si, e5), t2.removeEventListener(`popstate`, e5);
1099
2220
  }) : () => {
1100
2221
  };
1101
2222
  }
1102
- var Jn = (e2) => {
2223
+ var Ei = (e5) => {
1103
2224
  try {
1104
- return decodeURIComponent(e2);
2225
+ return decodeURIComponent(e5);
1105
2226
  } catch {
1106
- return e2;
2227
+ return e5;
1107
2228
  }
1108
2229
  };
1109
- function Yn(e2, t2) {
2230
+ function Di(e5, t2) {
1110
2231
  let n2 = t2 ? new URL(t2).pathname : `/`;
1111
- return `./${Jn(new URL(e2).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
1112
- }
1113
- function Xn() {
1114
- let e2 = (0, import_services_manager_react.useService)(Bn), t2 = (0, import_react.useCallback)(() => e2.currentUrl, [e2]), n2 = (0, import_react.useSyncExternalStore)(qn, t2, t2), r2 = (0, import_react.useMemo)(() => Hn(new URL(n2)), [n2]), a2 = e2.siteUrl.replace(/\/$/, ``);
1115
- return { pathname: r2.pathname, search: r2.search, searchParams: r2.searchParams, href: r2.href, getParsedUrl: () => Hn(new URL(e2.currentUrl)), getRelativeUrl: () => Yn(e2.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: Kn };
1116
- }
1117
- var Zn = V(`@wix/site-service-editor-context`);
1118
- var Qn = V(`@wix/site-service-pages`);
1119
- var $n = V(`@wix/site-service-router`);
1120
- var er = V(`@wix/site-service-renderer-configuration`);
1121
- var tr = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
1122
- var nr = `shopping_cart`;
1123
- var rr = `thank_you_page`;
1124
- var H = function(e2) {
1125
- return e2.BOOK_ONLINE = `bookingsBookOnline`, e2.SERVICE_PAGE = `bookingsServicePage`, e2.CALENDAR_PAGE = `bookingsCalendar`, e2.FORM_PAGE = `bookingsForm`, e2;
2232
+ return `./${Ei(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2233
+ }
2234
+ function Oi() {
2235
+ let e5 = (0, import_services_manager_react.useService)(vi), t2 = (0, import_react.useCallback)(() => e5.currentUrl, [e5]), n2 = (0, import_react.useSyncExternalStore)(Ti, t2, t2), r2 = (0, import_react.useMemo)(() => bi(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2236
+ return { pathname: r2.pathname, search: r2.search, searchParams: r2.searchParams, href: r2.href, getParsedUrl: () => bi(new URL(e5.currentUrl)), getRelativeUrl: () => Di(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: wi };
2237
+ }
2238
+ var ki = U(`@wix/site-service-editor-context`);
2239
+ var Ai = U(`@wix/site-service-pages`);
2240
+ var ji = U(`@wix/site-service-router`);
2241
+ var Mi = U(`@wix/site-service-renderer-configuration`);
2242
+ var Ni = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
2243
+ var Pi = `shopping_cart`;
2244
+ var Fi = `thank_you_page`;
2245
+ var W = function(e5) {
2246
+ return e5.BOOK_ONLINE = `bookingsBookOnline`, e5.SERVICE_PAGE = `bookingsServicePage`, e5.CALENDAR_PAGE = `bookingsCalendar`, e5.FORM_PAGE = `bookingsForm`, e5;
1126
2247
  }({});
1127
- var ir = `{{(.*?)}}`;
1128
- var ar = `[{{}}]`;
1129
- var or = `([^/]+)`;
1130
- var U;
1131
- (function(e2) {
1132
- e2.product_page = `product_page`, e2.blog = `blog`, e2.post = `post`, e2.forum = `forum`, e2.group = `group`, e2.bookings = `Booking Service Page`, e2.challenges = `challenge_page`;
1133
- })(U ||= {});
1134
- var W;
1135
- (function(e2) {
1136
- e2.PRODUCT_PAGE = `wix.stores.sub_pages.product`, e2.BLOG_POST = `wix.blog.sub_pages.post`, e2.BLOG_POST_EDIT = `wix.blog.sub_pages.post.edit`, e2.BLOG_POST_PREVIEW = `wix.blog.sub_pages.post.preview`, e2.BLOG_CATEGORY = `wix.blog.sub_pages.category`, e2.FORUM_CATEGORY = `wix.forum.sub_pages.category`, e2.FORUM_CATEGORY_PAGINATION = `wix.forum.sub_pages.category.pagination`, e2.FORUM_CATEGORY_CREATE_POST = `wix.forum.sub_pages.category.create-post`, e2.FORUM_CATEGORY_CREATE_QUESTION = `wix.forum.sub_pages.category.create-question`, e2.FORUM_POST = `wix.forum.sub_pages.post`, e2.FORUM_POST_EDIT = `wix.forum.sub_pages.post.edit`, e2.FORUM_POST_PAGINATION = `wix.forum.sub_pages.post.pagination`, e2.FORUM_POST_DEEP_LINK_DATA = `wix.forum.sub_pages.post.deep-link-data`, e2.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA = `wix.forum.sub_pages.post.pagination-and-deep-link-data`, e2.GROUP = `wix.groups.sub_pages.group`, e2.GROUP_POST = `wix.groups.sub_pages.post`, e2.BOOKINGS_SERVICE = `wix.bookings.sub_pages.service_page`, e2.CHALLENGES_PAGE = `wix.online_programs.sub_pages.online_program`;
1137
- })(W ||= {});
1138
- var sr = {};
1139
- var cr = (sr[W.PRODUCT_PAGE] = { variables: [`slug`], required: [`slug`] }, sr);
1140
- var G = `{{main-mapping}}`;
1141
- var lr = {};
1142
- var ur;
1143
- var dr = (lr[W.BLOG_POST] = { variables: [`slug`], required: [`slug`], subMappings: (ur = {}, ur[W.BLOG_POST_EDIT] = { defaultMapping: `${G}/edit` }, ur[W.BLOG_POST_PREVIEW] = { required: [`instance`], defaultMapping: `${G}/preview/{{instance}}` }, ur) }, lr);
1144
- var fr = {};
1145
- var pr = (fr[W.BLOG_CATEGORY] = { variables: [`slug`], required: [`slug`], defaultPrefix: `categories` }, fr);
1146
- var mr = {};
2248
+ var Ii = `{{(.*?)}}`;
2249
+ var Li = `[{{}}]`;
2250
+ var Ri = `([^/]+)`;
2251
+ var G;
2252
+ (function(e5) {
2253
+ e5.product_page = `product_page`, e5.blog = `blog`, e5.post = `post`, e5.forum = `forum`, e5.group = `group`, e5.bookings = `Booking Service Page`, e5.challenges = `challenge_page`;
2254
+ })(G ||= {});
1147
2255
  var K;
1148
- var q;
1149
- var hr = (mr[W.FORUM_POST] = { variables: [`categorySlug`, `postSlug`], required: [`categorySlug`, `postSlug`], subMappings: (K = {}, K[W.FORUM_POST_EDIT] = { defaultMapping: `${G}/edit` }, K[W.FORUM_POST_PAGINATION] = { required: [`page`], defaultMapping: `${G}/p-{{page}}` }, K[W.FORUM_POST_DEEP_LINK_DATA] = { required: [`deepLinkData`], defaultMapping: `${G}/dl-{{deepLinkData}}` }, K[W.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA] = { required: [`page`, `deepLinkData`], defaultMapping: `${G}/p-{{page}}/dl-{{deepLinkData}}` }, K) }, mr[W.FORUM_CATEGORY] = { variables: [`slug`], required: [`slug`], subMappings: (q = {}, q[W.FORUM_CATEGORY_CREATE_POST] = { defaultMapping: `${G}/create-post` }, q[W.FORUM_CATEGORY_CREATE_QUESTION] = { defaultMapping: `${G}/create-question` }, q[W.FORUM_CATEGORY_PAGINATION] = { required: [`page`], defaultMapping: `${G}/p-{{page}}` }, q) }, mr);
1150
- var gr = {};
1151
- var _r = (gr[W.GROUP] = { variables: [`groupId`, `tabName`], required: [`groupId`, `tabName`] }, gr[W.GROUP_POST] = { variables: [`groupId`, `tabName`, `postId`], required: [`groupId`, `tabName`, `postId`] }, gr);
1152
- var vr = {};
1153
- var yr = (vr[W.BOOKINGS_SERVICE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `service-page` }, vr);
1154
- var br = {};
1155
- var xr = (br[W.CHALLENGES_PAGE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `challenge-page` }, br);
1156
- var J = {};
1157
- var Sr = (J[U.product_page] = cr, J[U.post] = dr, J[U.blog] = pr, J[U.forum] = hr, J[U.group] = _r, J[U.bookings] = yr, J[U.challenges] = xr, J);
1158
- var Cr = function(e2) {
1159
- return Object.values(wr()).some(function(t2) {
1160
- return !!t2?.subMappings?.[e2];
2256
+ (function(e5) {
2257
+ e5.PRODUCT_PAGE = `wix.stores.sub_pages.product`, e5.BLOG_POST = `wix.blog.sub_pages.post`, e5.BLOG_POST_EDIT = `wix.blog.sub_pages.post.edit`, e5.BLOG_POST_PREVIEW = `wix.blog.sub_pages.post.preview`, e5.BLOG_CATEGORY = `wix.blog.sub_pages.category`, e5.FORUM_CATEGORY = `wix.forum.sub_pages.category`, e5.FORUM_CATEGORY_PAGINATION = `wix.forum.sub_pages.category.pagination`, e5.FORUM_CATEGORY_CREATE_POST = `wix.forum.sub_pages.category.create-post`, e5.FORUM_CATEGORY_CREATE_QUESTION = `wix.forum.sub_pages.category.create-question`, e5.FORUM_POST = `wix.forum.sub_pages.post`, e5.FORUM_POST_EDIT = `wix.forum.sub_pages.post.edit`, e5.FORUM_POST_PAGINATION = `wix.forum.sub_pages.post.pagination`, e5.FORUM_POST_DEEP_LINK_DATA = `wix.forum.sub_pages.post.deep-link-data`, e5.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA = `wix.forum.sub_pages.post.pagination-and-deep-link-data`, e5.GROUP = `wix.groups.sub_pages.group`, e5.GROUP_POST = `wix.groups.sub_pages.post`, e5.BOOKINGS_SERVICE = `wix.bookings.sub_pages.service_page`, e5.CHALLENGES_PAGE = `wix.online_programs.sub_pages.online_program`;
2258
+ })(K ||= {});
2259
+ var zi = {};
2260
+ var Bi = (zi[K.PRODUCT_PAGE] = { variables: [`slug`], required: [`slug`] }, zi);
2261
+ var q = `{{main-mapping}}`;
2262
+ var Vi = {};
2263
+ var Hi;
2264
+ var Ui = (Vi[K.BLOG_POST] = { variables: [`slug`], required: [`slug`], subMappings: (Hi = {}, Hi[K.BLOG_POST_EDIT] = { defaultMapping: `${q}/edit` }, Hi[K.BLOG_POST_PREVIEW] = { required: [`instance`], defaultMapping: `${q}/preview/{{instance}}` }, Hi) }, Vi);
2265
+ var Wi = {};
2266
+ var Gi = (Wi[K.BLOG_CATEGORY] = { variables: [`slug`], required: [`slug`], defaultPrefix: `categories` }, Wi);
2267
+ var Ki = {};
2268
+ var J;
2269
+ var qi;
2270
+ var Ji = (Ki[K.FORUM_POST] = { variables: [`categorySlug`, `postSlug`], required: [`categorySlug`, `postSlug`], subMappings: (J = {}, J[K.FORUM_POST_EDIT] = { defaultMapping: `${q}/edit` }, J[K.FORUM_POST_PAGINATION] = { required: [`page`], defaultMapping: `${q}/p-{{page}}` }, J[K.FORUM_POST_DEEP_LINK_DATA] = { required: [`deepLinkData`], defaultMapping: `${q}/dl-{{deepLinkData}}` }, J[K.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA] = { required: [`page`, `deepLinkData`], defaultMapping: `${q}/p-{{page}}/dl-{{deepLinkData}}` }, J) }, Ki[K.FORUM_CATEGORY] = { variables: [`slug`], required: [`slug`], subMappings: (qi = {}, qi[K.FORUM_CATEGORY_CREATE_POST] = { defaultMapping: `${q}/create-post` }, qi[K.FORUM_CATEGORY_CREATE_QUESTION] = { defaultMapping: `${q}/create-question` }, qi[K.FORUM_CATEGORY_PAGINATION] = { required: [`page`], defaultMapping: `${q}/p-{{page}}` }, qi) }, Ki);
2271
+ var Yi = {};
2272
+ var Xi = (Yi[K.GROUP] = { variables: [`groupId`, `tabName`], required: [`groupId`, `tabName`] }, Yi[K.GROUP_POST] = { variables: [`groupId`, `tabName`, `postId`], required: [`groupId`, `tabName`, `postId`] }, Yi);
2273
+ var Zi = {};
2274
+ var Qi = (Zi[K.BOOKINGS_SERVICE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `service-page` }, Zi);
2275
+ var $i = {};
2276
+ var ea = ($i[K.CHALLENGES_PAGE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `challenge-page` }, $i);
2277
+ var Y = {};
2278
+ var ta = (Y[G.product_page] = Bi, Y[G.post] = Ui, Y[G.blog] = Gi, Y[G.forum] = Ji, Y[G.group] = Xi, Y[G.bookings] = Qi, Y[G.challenges] = ea, Y);
2279
+ var na = function(e5) {
2280
+ return Object.values(ra()).some(function(t2) {
2281
+ return !!t2?.subMappings?.[e5];
1161
2282
  });
1162
2283
  };
1163
- var wr = function() {
1164
- return Object.values(Sr).reduce(function(e2, t2) {
1165
- return On(On({}, e2), t2);
2284
+ var ra = function() {
2285
+ return Object.values(ta).reduce(function(e5, t2) {
2286
+ return Br(Br({}, e5), t2);
1166
2287
  }, {}) || {};
1167
2288
  };
1168
- var Tr = function(e2) {
1169
- var t2 = wr()[e2];
1170
- return !t2 && Cr(e2) && console.warn(`You cannot get variables schema for subMappings key (${e2}).`), t2;
2289
+ var ia = function(e5) {
2290
+ var t2 = ra()[e5];
2291
+ return !t2 && na(e5) && console.warn(`You cannot get variables schema for subMappings key (${e5}).`), t2;
1171
2292
  };
1172
- var Er = function(e2) {
1173
- return Object.entries(Sr).filter(function(t2) {
1174
- var n2 = L(t2, 2)[1];
1175
- return Object.keys(n2).includes(e2);
1176
- }).map(function(e3) {
1177
- return L(e3, 1)[0];
2293
+ var aa = function(e5) {
2294
+ return Object.entries(ta).filter(function(t2) {
2295
+ var n2 = B(t2, 2)[1];
2296
+ return Object.keys(n2).includes(e5);
2297
+ }).map(function(e6) {
2298
+ return B(e6, 1)[0];
1178
2299
  })[0];
1179
2300
  };
1180
- var Dr = function(e2) {
1181
- return Object.entries(wr()).find(function(t2) {
1182
- var n2 = L(t2, 2);
1183
- return n2[0], !!n2[1]?.subMappings?.[e2];
2301
+ var oa = function(e5) {
2302
+ return Object.entries(ra()).find(function(t2) {
2303
+ var n2 = B(t2, 2);
2304
+ return n2[0], !!n2[1]?.subMappings?.[e5];
1184
2305
  });
1185
2306
  };
1186
- var Or = function(e2) {
2307
+ var sa = function(e5) {
1187
2308
  var t2 = [];
1188
- if (Cr(e2)) {
1189
- var n2 = L(Dr(e2), 2);
2309
+ if (na(e5)) {
2310
+ var n2 = B(oa(e5), 2);
1190
2311
  n2[0];
1191
2312
  var r2 = n2[1];
1192
- t2.push.apply(t2, R(R([], L(r2?.required || []), false), L(r2?.subMappings?.[e2]?.required || []), false));
1193
- } else t2.push.apply(t2, R([], L(Tr(e2)?.required || []), false));
2313
+ t2.push.apply(t2, Hr(Hr([], B(r2?.required || []), false), B(r2?.subMappings?.[e5]?.required || []), false));
2314
+ } else t2.push.apply(t2, Hr([], B(ia(e5)?.required || []), false));
1194
2315
  return t2;
1195
2316
  };
1196
- var kr = function(e2, t2) {
2317
+ var ca = function(e5, t2) {
1197
2318
  var n2;
1198
- return t2 === void 0 && (t2 = ``), (n2 = e2?.main)?.find?.call(n2, function(e3) {
1199
- return e3.key === t2;
2319
+ return t2 === void 0 && (t2 = ``), (n2 = e5?.main)?.find?.call(n2, function(e6) {
2320
+ return e6.key === t2;
1200
2321
  });
1201
2322
  };
1202
- var Ar = function(e2, t2) {
1203
- return Error(`Url Mappings Error - [${e2}]: ${t2}`);
2323
+ var la = function(e5, t2) {
2324
+ return Error(`Url Mappings Error - [${e5}]: ${t2}`);
1204
2325
  };
1205
- var jr = Object.values(W);
1206
- var Mr = Ar(`key`, `must be one of: ${jr.toString()}`);
1207
- var Nr = function(e2) {
1208
- if (typeof e2 != `string` || !jr.includes(e2)) return Mr;
2326
+ var ua = Object.values(K);
2327
+ var da = la(`key`, `must be one of: ${ua.toString()}`);
2328
+ var fa = function(e5) {
2329
+ if (typeof e5 != `string` || !ua.includes(e5)) return da;
1209
2330
  };
1210
- var Pr = Ar(`itemData`, `must be on object with string as value, for example: { "slug": "shoes" }`);
1211
- var Fr = function(e2) {
1212
- if (typeof e2 != `object` || !e2 || !Object.values(e2).every(function(e3) {
1213
- return typeof e3 == `string`;
1214
- }) || Array.isArray(e2)) return Pr;
2331
+ var pa = la(`itemData`, `must be on object with string as value, for example: { "slug": "shoes" }`);
2332
+ var ma = function(e5) {
2333
+ if (typeof e5 != `object` || !e5 || !Object.values(e5).every(function(e6) {
2334
+ return typeof e6 == `string`;
2335
+ }) || Array.isArray(e5)) return pa;
1215
2336
  };
1216
- var Ir = Ar(`itemData`, `must have required variables, for example: { "slug": "shoes" }`);
1217
- var Lr = function(e2, t2) {
2337
+ var ha = la(`itemData`, `must have required variables, for example: { "slug": "shoes" }`);
2338
+ var ga = function(e5, t2) {
1218
2339
  try {
1219
- var n2 = Or(e2);
1220
- if (!n2.every(function(e3) {
1221
- return !!t2[e3];
2340
+ var n2 = sa(e5);
2341
+ if (!n2.every(function(e6) {
2342
+ return !!t2[e6];
1222
2343
  }) || !n2.length) throw Error();
1223
2344
  } catch {
1224
- return Ir;
2345
+ return ha;
1225
2346
  }
1226
2347
  };
1227
- var Rr = function(e2) {
1228
- var t2 = e2.key, n2 = e2.itemData;
1229
- return [Nr(t2), Fr(n2), Lr(t2, n2)].find(Boolean);
2348
+ var _a = function(e5) {
2349
+ var t2 = e5.key, n2 = e5.itemData;
2350
+ return [fa(t2), ma(n2), ga(t2, n2)].find(Boolean);
1230
2351
  };
1231
- var zr = function(e2) {
2352
+ var va = function(e5) {
1232
2353
  return function(t2) {
1233
- var n2 = new RegExp(ar, `g`), r2 = t2.replace(n2, ``);
1234
- return e2?.[r2];
2354
+ var n2 = new RegExp(Li, `g`), r2 = t2.replace(n2, ``);
2355
+ return e5?.[r2];
1235
2356
  };
1236
2357
  };
1237
- var Br = function(e2, t2, n2, r2) {
1238
- e2 === void 0 && (e2 = { main: [] }), r2 === void 0 && (r2 = {});
1239
- var i2 = Rr({ key: t2, itemData: n2 });
2358
+ var ya = function(e5, t2, n2, r2) {
2359
+ e5 === void 0 && (e5 = { main: [] }), r2 === void 0 && (r2 = {});
2360
+ var i2 = _a({ key: t2, itemData: n2 });
1240
2361
  if (i2) throw i2;
1241
- var a2 = (kr(e2, t2) || {}).mapping, o2 = (r2 || {}).baseUrl;
2362
+ var a2 = (ca(e5, t2) || {}).mapping, o2 = (r2 || {}).baseUrl;
1242
2363
  if (o2 ??= ``, o2 = o2.endsWith(`/`) ? o2?.slice(0, -1) : o2, a2 && typeof a2 == `string`) {
1243
- var s2 = new RegExp(ir, `g`), c2 = a2.replace(s2, zr(n2));
2364
+ var s2 = new RegExp(Ii, `g`), c2 = a2.replace(s2, va(n2));
1244
2365
  return o2.concat(`/${c2}`);
1245
2366
  }
1246
2367
  };
1247
- var Vr = /[.*+?^$()|]/g;
1248
- var Hr = function(e2) {
1249
- var t2 = e2.replace(Vr, `\\$&`).replace(new RegExp(ir, `g`), or);
2368
+ var ba = /[.*+?^$()|]/g;
2369
+ var xa = function(e5) {
2370
+ var t2 = e5.replace(ba, `\\$&`).replace(new RegExp(Ii, `g`), Ri);
1250
2371
  return RegExp(`^${t2}$`);
1251
2372
  };
1252
- var Ur = function(e2, t2) {
1253
- return e2 === void 0 && (e2 = []), e2.find(function(e3) {
1254
- return Hr(e3).test(t2);
2373
+ var Sa = function(e5, t2) {
2374
+ return e5 === void 0 && (e5 = []), e5.find(function(e6) {
2375
+ return xa(e6).test(t2);
1255
2376
  });
1256
2377
  };
1257
- Ar(`url`, `Url must be a string`);
1258
- var Wr = function(e2) {
2378
+ la(`url`, `Url must be a string`);
2379
+ var Ca = function(e5) {
1259
2380
  return [` `, ` `, `
1260
2381
  `].every(function(t2) {
1261
- return !e2?.includes?.call(e2, t2);
2382
+ return !e5?.includes?.call(e5, t2);
1262
2383
  });
1263
2384
  };
1264
- var Gr = function(e2) {
1265
- return e2?.length <= ri.MAX_URL_MAPPING_LENGTH;
2385
+ var wa = function(e5) {
2386
+ return e5?.length <= Ia.MAX_URL_MAPPING_LENGTH;
1266
2387
  };
1267
- var Kr = function(e2) {
1268
- return e2?.split(`/`).every(Boolean);
2388
+ var Ta = function(e5) {
2389
+ return e5?.split(`/`).every(Boolean);
1269
2390
  };
1270
- var qr = function(e2, t2) {
2391
+ var Ea = function(e5, t2) {
1271
2392
  var n2 = t2.urlMappingKey;
1272
- return Or(n2)?.every(function(t3) {
1273
- return e2?.includes(`{{${t3}}}`);
2393
+ return sa(n2)?.every(function(t3) {
2394
+ return e5?.includes(`{{${t3}}}`);
1274
2395
  });
1275
2396
  };
1276
- var Jr = function(e2) {
1277
- return (e2.match(new RegExp(ir, `g`))?.length || 0) <= 1;
2397
+ var Da = function(e5) {
2398
+ return (e5.match(new RegExp(Ii, `g`))?.length || 0) <= 1;
1278
2399
  };
1279
- var Yr = function(e2) {
1280
- return e2?.split(`/`).every(Jr);
2400
+ var Oa = function(e5) {
2401
+ return e5?.split(`/`).every(Da);
1281
2402
  };
1282
- var Xr = function(e2) {
1283
- return [e2.publishedPrefix, e2.savedPrefix].filter(Boolean);
2403
+ var ka = function(e5) {
2404
+ return [e5.publishedPrefix, e5.savedPrefix].filter(Boolean);
1284
2405
  };
1285
- var Zr = function(e2, t2) {
2406
+ var Aa = function(e5, t2) {
1286
2407
  return t2 === void 0 && (t2 = []), function(n2, r2) {
1287
2408
  var i2 = n2.split(`/`), a2 = n2 === r2;
1288
2409
  if (i2.length < 1 || a2) return true;
1289
- var o2 = L(r2.split(`/`), 1)[0], s2 = L(i2, 1)[0];
1290
- return t2.includes(s2) ? true : e2.every(function(e3) {
1291
- return e3 === o2 || e3 !== s2;
2410
+ var o2 = B(r2.split(`/`), 1)[0], s2 = B(i2, 1)[0];
2411
+ return t2.includes(s2) ? true : e5.every(function(e6) {
2412
+ return e6 === o2 || e6 !== s2;
1292
2413
  });
1293
2414
  };
1294
2415
  };
1295
- var Qr = function(e2, t2) {
2416
+ var ja = function(e5, t2) {
1296
2417
  var n2 = t2.pathPrefixes;
1297
- return Zr(Object.values(n2).map(function(e3) {
1298
- return e3.publishedPrefix;
1299
- }).filter(Boolean), Xr(t2.pathPrefix))(e2, t2.defaultMapping.defaultPublished);
2418
+ return Aa(Object.values(n2).map(function(e6) {
2419
+ return e6.publishedPrefix;
2420
+ }).filter(Boolean), ka(t2.pathPrefix))(e5, t2.defaultMapping.defaultPublished);
1300
2421
  };
1301
- var $r = function(e2, t2) {
2422
+ var Ma = function(e5, t2) {
1302
2423
  var n2 = t2.urlMappingKey, r2 = t2.urlMappings;
1303
- return !Ur(r2.main?.filter(function(e3) {
1304
- return n2 !== e3.key;
1305
- }).map(function(e3) {
1306
- return e3.mapping;
1307
- }), e2);
1308
- };
1309
- var ei = function(e2) {
1310
- e2 = e2.replace(new RegExp(ir, `ig`), ``);
1311
- var t2 = new RegExp(/[^\]_.~!*'();:@&=+$,<>\\#^%?`"]/, `g`), n2 = !/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c[\ude32-\ude3a]|[\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g.test(e2), r2 = !e2.replace(t2, ``);
2424
+ return !Sa(r2.main?.filter(function(e6) {
2425
+ return n2 !== e6.key;
2426
+ }).map(function(e6) {
2427
+ return e6.mapping;
2428
+ }), e5);
2429
+ };
2430
+ var Na = function(e5) {
2431
+ e5 = e5.replace(new RegExp(Ii, `ig`), ``);
2432
+ var t2 = new RegExp(/[^\]_.~!*'();:@&=+$,<>\\#^%?`"]/, `g`), n2 = !/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c[\ude32-\ude3a]|[\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g.test(e5), r2 = !e5.replace(t2, ``);
1312
2433
  return n2 && r2;
1313
2434
  };
1314
- var ti = function(e2) {
1315
- var t2 = L(e2, 1)[0], n2 = e2.slice(-1);
2435
+ var Pa = function(e5) {
2436
+ var t2 = B(e5, 1)[0], n2 = e5.slice(-1);
1316
2437
  return t2 !== `/` && n2 !== `/`;
1317
2438
  };
1318
- var ni = function(e2, t2) {
2439
+ var Fa = function(e5, t2) {
1319
2440
  var n2 = t2.pathPrefixes;
1320
- return Zr(Object.values(n2).map(function(e3) {
1321
- return e3.savedPrefix;
1322
- }).filter(Boolean), Xr(t2.pathPrefix))(e2, t2.defaultMapping.defaultSaved);
1323
- };
1324
- var Y;
1325
- (function(e2) {
1326
- e2.MAX_LENGTH_ERROR = `MAX_LENGTH_ERROR`, e2.NO_SPACES_ERROR = `NO_SPACES_ERROR`, e2.NO_EMPTY_SEGMENT_ERROR = `NO_EMPTY_SEGMENT_ERROR`, e2.CONTAIN_MAIN_VARIABLE_ERROR = `CONTAIN_MAIN_VARIABLE_ERROR`, e2.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR = `ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR`, e2.ONLY_UNIQUE_PUBLISHED_URL_ERROR = `ONLY_UNIQUE_PUBLISHED_URL_ERROR`, e2.ONLY_UNIQUE_SAVED_URL_ERROR = `ONLY_UNIQUE_SAVED_URL_ERROR`, e2.ONLY_UNIQUE_MAPPING_ERROR = `ONLY_UNIQUE_MAPPING_ERROR`, e2.NO_INVALID_CHARACTERS_ERROR = `NO_INVALID_CHARACTERS_ERROR`, e2.NO_STARTING_OR_ENDING_SLASH_ERROR = `NO_STARTING_OR_ENDING_SLASH_ERROR`;
1327
- })(Y ||= {});
1328
- var ri = function() {
1329
- function e2(e3) {
1330
- var t2 = e3.urlMappingKey, n2 = e3.pathPrefixes, r2 = e3.urlMappings, i2 = this;
2441
+ return Aa(Object.values(n2).map(function(e6) {
2442
+ return e6.savedPrefix;
2443
+ }).filter(Boolean), ka(t2.pathPrefix))(e5, t2.defaultMapping.defaultSaved);
2444
+ };
2445
+ var X;
2446
+ (function(e5) {
2447
+ e5.MAX_LENGTH_ERROR = `MAX_LENGTH_ERROR`, e5.NO_SPACES_ERROR = `NO_SPACES_ERROR`, e5.NO_EMPTY_SEGMENT_ERROR = `NO_EMPTY_SEGMENT_ERROR`, e5.CONTAIN_MAIN_VARIABLE_ERROR = `CONTAIN_MAIN_VARIABLE_ERROR`, e5.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR = `ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR`, e5.ONLY_UNIQUE_PUBLISHED_URL_ERROR = `ONLY_UNIQUE_PUBLISHED_URL_ERROR`, e5.ONLY_UNIQUE_SAVED_URL_ERROR = `ONLY_UNIQUE_SAVED_URL_ERROR`, e5.ONLY_UNIQUE_MAPPING_ERROR = `ONLY_UNIQUE_MAPPING_ERROR`, e5.NO_INVALID_CHARACTERS_ERROR = `NO_INVALID_CHARACTERS_ERROR`, e5.NO_STARTING_OR_ENDING_SLASH_ERROR = `NO_STARTING_OR_ENDING_SLASH_ERROR`;
2448
+ })(X ||= {});
2449
+ var Ia = function() {
2450
+ function e5(e6) {
2451
+ var t2 = e6.urlMappingKey, n2 = e6.pathPrefixes, r2 = e6.urlMappings, i2 = this;
1331
2452
  this.initValidators = function() {
1332
- i2.validators = [[Gr, Y.MAX_LENGTH_ERROR], [Wr, Y.NO_SPACES_ERROR], [ti, Y.NO_STARTING_OR_ENDING_SLASH_ERROR], [Kr, Y.NO_EMPTY_SEGMENT_ERROR], [ei, Y.NO_INVALID_CHARACTERS_ERROR], [qr, Y.CONTAIN_MAIN_VARIABLE_ERROR], [Yr, Y.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR], [Qr, Y.ONLY_UNIQUE_PUBLISHED_URL_ERROR], [ni, Y.ONLY_UNIQUE_SAVED_URL_ERROR], [$r, Y.ONLY_UNIQUE_MAPPING_ERROR]];
1333
- }, this.urlMappings = r2, this.pathPrefixes = n2, this.urlMappingKey = t2, this.pathPrefix = this.getPathPrefix(), this.defaultMapping = ii(t2, this.pathPrefix), this.initValidators();
1334
- }
1335
- return e2.prototype.getPathPrefix = function() {
1336
- var t2 = Er(this.urlMappingKey);
1337
- if (!t2) throw Cr(this.urlMappingKey) ? Error(`Url Mapper Validator Error: Validator does not support sub mapping, please use the main url mapping key`) : Error(`Url Mapper Validator Error: Url mapping key is not supported (${this.urlMappingKey})`);
1338
- return this.pathPrefixes[t2] || e2.FALLBACK_PATH_PREFIX;
1339
- }, Object.defineProperty(e2.prototype, "validatorProps", { get: function() {
1340
- var e3 = this;
1341
- return { urlMappingKey: e3.urlMappingKey, urlMappings: e3.urlMappings, pathPrefix: e3.pathPrefix, pathPrefixes: e3.pathPrefixes, defaultMapping: e3.defaultMapping };
1342
- }, enumerable: false, configurable: true }), e2.prototype.validate = function(e3) {
2453
+ i2.validators = [[wa, X.MAX_LENGTH_ERROR], [Ca, X.NO_SPACES_ERROR], [Pa, X.NO_STARTING_OR_ENDING_SLASH_ERROR], [Ta, X.NO_EMPTY_SEGMENT_ERROR], [Na, X.NO_INVALID_CHARACTERS_ERROR], [Ea, X.CONTAIN_MAIN_VARIABLE_ERROR], [Oa, X.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR], [ja, X.ONLY_UNIQUE_PUBLISHED_URL_ERROR], [Fa, X.ONLY_UNIQUE_SAVED_URL_ERROR], [Ma, X.ONLY_UNIQUE_MAPPING_ERROR]];
2454
+ }, this.urlMappings = r2, this.pathPrefixes = n2, this.urlMappingKey = t2, this.pathPrefix = this.getPathPrefix(), this.defaultMapping = La(t2, this.pathPrefix), this.initValidators();
2455
+ }
2456
+ return e5.prototype.getPathPrefix = function() {
2457
+ var t2 = aa(this.urlMappingKey);
2458
+ if (!t2) throw na(this.urlMappingKey) ? Error(`Url Mapper Validator Error: Validator does not support sub mapping, please use the main url mapping key`) : Error(`Url Mapper Validator Error: Url mapping key is not supported (${this.urlMappingKey})`);
2459
+ return this.pathPrefixes[t2] || e5.FALLBACK_PATH_PREFIX;
2460
+ }, Object.defineProperty(e5.prototype, "validatorProps", { get: function() {
2461
+ var e6 = this;
2462
+ return { urlMappingKey: e6.urlMappingKey, urlMappings: e6.urlMappings, pathPrefix: e6.pathPrefix, pathPrefixes: e6.pathPrefixes, defaultMapping: e6.defaultMapping };
2463
+ }, enumerable: false, configurable: true }), e5.prototype.validate = function(e6) {
1343
2464
  var t2, n2;
1344
2465
  try {
1345
- for (var r2 = kn(this.validators), i2 = r2.next(); !i2.done; i2 = r2.next()) {
1346
- var a2 = L(i2.value, 2), o2 = a2[0], s2 = a2[1], c2 = !!o2(e3, this.validatorProps);
2466
+ for (var r2 = Vr(this.validators), i2 = r2.next(); !i2.done; i2 = r2.next()) {
2467
+ var a2 = B(i2.value, 2), o2 = a2[0], s2 = a2[1], c2 = !!o2(e6, this.validatorProps);
1347
2468
  if (!c2) return { isValid: c2, error: s2 };
1348
2469
  }
1349
- } catch (e4) {
1350
- t2 = { error: e4 };
2470
+ } catch (e7) {
2471
+ t2 = { error: e7 };
1351
2472
  } finally {
1352
2473
  try {
1353
2474
  i2 && !i2.done && (n2 = r2.return) && n2.call(r2);
@@ -1356,50 +2477,50 @@ var ri = function() {
1356
2477
  }
1357
2478
  }
1358
2479
  return { isValid: true };
1359
- }, e2.errorArray = Object.values(Y), e2.MAX_URL_MAPPING_LENGTH = 1e3, e2.FALLBACK_PATH_PREFIX = `unknown`, e2;
2480
+ }, e5.errorArray = Object.values(X), e5.MAX_URL_MAPPING_LENGTH = 1e3, e5.FALLBACK_PATH_PREFIX = `unknown`, e5;
1360
2481
  }();
1361
- var ii = function(e2, t2) {
1362
- var n2 = wr()[e2] || { required: [`slug`] }, r2 = n2.required, i2 = n2.defaultPrefix, a2 = {};
1363
- return t2 && typeof t2 == `object` ? (a2.savedPrefix = t2.savedPrefix ?? ``, a2.publishedPrefix = t2.publishedPrefix ?? ``) : (a2.savedPrefix = ri.FALLBACK_PATH_PREFIX, a2.publishedPrefix = ri.FALLBACK_PATH_PREFIX), { defaultSaved: R([a2.savedPrefix, i2], L(r2?.map(function(e3) {
1364
- return `{{${e3}}}`;
1365
- })), false).filter(Boolean).join(`/`), defaultPublished: R([a2.publishedPrefix, i2], L(r2?.map(function(e3) {
1366
- return `{{${e3}}}`;
2482
+ var La = function(e5, t2) {
2483
+ var n2 = ra()[e5] || { required: [`slug`] }, r2 = n2.required, i2 = n2.defaultPrefix, a2 = {};
2484
+ return t2 && typeof t2 == `object` ? (a2.savedPrefix = t2.savedPrefix ?? ``, a2.publishedPrefix = t2.publishedPrefix ?? ``) : (a2.savedPrefix = Ia.FALLBACK_PATH_PREFIX, a2.publishedPrefix = Ia.FALLBACK_PATH_PREFIX), { defaultSaved: Hr([a2.savedPrefix, i2], B(r2?.map(function(e6) {
2485
+ return `{{${e6}}}`;
2486
+ })), false).filter(Boolean).join(`/`), defaultPublished: Hr([a2.publishedPrefix, i2], B(r2?.map(function(e6) {
2487
+ return `{{${e6}}}`;
1367
2488
  })), false).filter(Boolean).join(`/`) };
1368
2489
  };
1369
- function ai(e2, t2) {
1370
- return t2 ? Br(e2, W.BOOKINGS_SERVICE, { slug: t2 }, { baseUrl: `` }) : void 0;
2490
+ function Ra(e5, t2) {
2491
+ return t2 ? ya(e5, K.BOOKINGS_SERVICE, { slug: t2 }, { baseUrl: `` }) : void 0;
1371
2492
  }
1372
- function oi(e2) {
1373
- if (!e2) return;
2493
+ function za(e5) {
2494
+ if (!e5) return;
1374
2495
  let t2 = ``;
1375
- return (e2.filename || e2.altText) && (t2 = `/${encodeURIComponent(e2.filename || e2.altText)}`), e2.id ? `wix:image://v1/${e2.id}${t2}#originWidth=${e2.width}&originHeight=${e2.height}` : e2.url;
2496
+ 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;
1376
2497
  }
1377
- function si(e2) {
1378
- return Object.keys(e2).length === 1 && `$and` in e2 && Array.isArray(e2.$and);
2498
+ function Ba(e5) {
2499
+ return Object.keys(e5).length === 1 && `$and` in e5 && Array.isArray(e5.$and);
1379
2500
  }
1380
- function ci(e2) {
1381
- return Object.keys(e2).length === 1 && `$or` in e2 && Array.isArray(e2.$or);
2501
+ function Va(e5) {
2502
+ return Object.keys(e5).length === 1 && `$or` in e5 && Array.isArray(e5.$or);
1382
2503
  }
1383
- function li(e2) {
1384
- return Object.keys(e2).length === 1 && `$not` in e2 && typeof e2.$not == `object`;
2504
+ function Ha(e5) {
2505
+ return Object.keys(e5).length === 1 && `$not` in e5 && typeof e5.$not == `object`;
1385
2506
  }
1386
- function X(e2, t2) {
1387
- return e2 === void 0 || Object.keys(e2).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e2 : { $and: [...si(e2) ? e2.$and : [e2], ...si(t2) ? t2.$and : [t2]] };
2507
+ function Z(e5, t2) {
2508
+ return e5 === void 0 || Object.keys(e5).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e5 : { $and: [...Ba(e5) ? e5.$and : [e5], ...Ba(t2) ? t2.$and : [t2]] };
1388
2509
  }
1389
- function ui(e2, t2) {
1390
- return e2 === void 0 || Object.keys(e2).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e2 : { $or: [...ci(e2) ? e2.$or : [e2], ...ci(t2) ? t2.$or : [t2]] };
2510
+ function Ua(e5, t2) {
2511
+ return e5 === void 0 || Object.keys(e5).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e5 : { $or: [...Va(e5) ? e5.$or : [e5], ...Va(t2) ? t2.$or : [t2]] };
1391
2512
  }
1392
- function di(e2) {
1393
- if (e2 !== void 0 && Object.keys(e2).length !== 0) return li(e2) ? e2.$not : { $not: e2 };
2513
+ function Wa(e5) {
2514
+ if (e5 !== void 0 && Object.keys(e5).length !== 0) return Ha(e5) ? e5.$not : { $not: e5 };
1394
2515
  }
1395
- var fi = class {
2516
+ var Ga = class {
1396
2517
  _items;
1397
2518
  _fetchNextPage;
1398
2519
  _fetchPrevPage;
1399
2520
  _originQuery;
1400
2521
  _limit;
1401
- constructor({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }) {
1402
- this._items = e2, this._fetchNextPage = n2, this._fetchPrevPage = r2, this._originQuery = t2, this._limit = i2;
2522
+ constructor({ items: e5, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }) {
2523
+ this._items = e5, this._fetchNextPage = n2, this._fetchPrevPage = r2, this._originQuery = t2, this._limit = i2;
1403
2524
  }
1404
2525
  get items() {
1405
2526
  return this._items;
@@ -1422,12 +2543,12 @@ var fi = class {
1422
2543
  return await this._fetchPrevPage();
1423
2544
  }
1424
2545
  };
1425
- var pi = class extends fi {
2546
+ var Ka = class extends Ga {
1426
2547
  _nextCursor;
1427
2548
  _prevCursor;
1428
2549
  cursors;
1429
- constructor({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2, nextCursor: a2, prevCursor: o2 }) {
1430
- super({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }), this._nextCursor = a2, this._prevCursor = o2, this.cursors = { next: a2, prev: o2 };
2550
+ constructor({ items: e5, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2, nextCursor: a2, prevCursor: o2 }) {
2551
+ super({ items: e5, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }), this._nextCursor = a2, this._prevCursor = o2, this.cursors = { next: a2, prev: o2 };
1431
2552
  }
1432
2553
  hasNext() {
1433
2554
  return !!this._nextCursor;
@@ -1436,12 +2557,12 @@ var pi = class extends fi {
1436
2557
  return !!this._prevCursor;
1437
2558
  }
1438
2559
  };
1439
- var mi = class extends fi {
2560
+ var qa = class extends Ga {
1440
2561
  _totalCount;
1441
2562
  _offset;
1442
2563
  _tooManyToCount;
1443
- constructor({ items: e2, fetchNextPage: t2, fetchPrevPage: n2, offset: r2, originQuery: i2, limit: a2, totalCount: o2, tooManyToCount: s2 }) {
1444
- super({ items: e2, fetchNextPage: t2, fetchPrevPage: n2, originQuery: i2, limit: a2 }), this._totalCount = o2, this._offset = r2, this._tooManyToCount = s2;
2564
+ constructor({ items: e5, fetchNextPage: t2, fetchPrevPage: n2, offset: r2, originQuery: i2, limit: a2, totalCount: o2, tooManyToCount: s2 }) {
2565
+ super({ items: e5, fetchNextPage: t2, fetchPrevPage: n2, originQuery: i2, limit: a2 }), this._totalCount = o2, this._offset = r2, this._tooManyToCount = s2;
1445
2566
  }
1446
2567
  get currentPage() {
1447
2568
  return this._limit === 0 ? void 0 : Math.floor(this._offset / this._limit);
@@ -1459,730 +2580,751 @@ var mi = class extends fi {
1459
2580
  return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
1460
2581
  }
1461
2582
  };
1462
- function hi(e2) {
2583
+ function Ja(e5) {
1463
2584
  let t2 = (n2) => ({ query: n2, async find() {
1464
2585
  try {
1465
- let r2 = e2.requestTransformer(e2.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e2.func(r2), { [Ke]: a2, [qe]: o2 } = e2.responseTransformer(i2);
1466
- if (e2.pagingMethod === `OFFSET`) {
1467
- let e3 = n2;
1468
- return new mi({ items: a2 ?? [], fetchNextPage: () => t2({ ...e3, paging: { offset: e3.paging.offset + e3.paging.limit, limit: e3.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e3.paging.offset - e3.paging.limit, 0), limit: e3.paging.limit } }).find(), offset: e3.paging.offset, limit: e3.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
2586
+ let r2 = e5.requestTransformer(e5.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e5.func(r2), { [Ke]: a2, [qe]: o2 } = e5.responseTransformer(i2);
2587
+ if (e5.pagingMethod === `OFFSET`) {
2588
+ let e6 = n2;
2589
+ return new qa({ items: a2 ?? [], fetchNextPage: () => t2({ ...e6, paging: { offset: e6.paging.offset + e6.paging.limit, limit: e6.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e6.paging.offset - e6.paging.limit, 0), limit: e6.paging.limit } }).find(), offset: e6.paging.offset, limit: e6.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
1469
2590
  }
1470
2591
  let s2 = n2.cursorPaging;
1471
- return new pi({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
2592
+ return new Ka({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
1472
2593
  } catch (t3) {
1473
- throw e2.errorTransformer(t3);
2594
+ throw e5.errorTransformer(t3);
1474
2595
  }
1475
- }, skipTo(e3) {
1476
- return t2({ ...n2, cursorPaging: { cursor: e3, limit: n2.cursorPaging.limit } });
2596
+ }, skipTo(e6) {
2597
+ return t2({ ...n2, cursorPaging: { cursor: e6, limit: n2.cursorPaging.limit } });
1477
2598
  }, eq(r2, i2) {
1478
- let a2 = i2 === void 0 ? null : i2, o2 = { [Z(e2.transformationPaths, r2)]: a2 };
1479
- return t2({ ...n2, filter: X(n2.filter, o2) });
2599
+ let a2 = i2 === void 0 ? null : i2, o2 = { [Q(e5.transformationPaths, r2)]: a2 };
2600
+ return t2({ ...n2, filter: Z(n2.filter, o2) });
1480
2601
  }, ne(r2, i2) {
1481
- let a2 = i2 === void 0 ? null : i2, o2 = { [Z(e2.transformationPaths, r2)]: { $ne: a2 } };
1482
- return t2({ ...n2, filter: X(n2.filter, o2) });
2602
+ let a2 = i2 === void 0 ? null : i2, o2 = { [Q(e5.transformationPaths, r2)]: { $ne: a2 } };
2603
+ return t2({ ...n2, filter: Z(n2.filter, o2) });
1483
2604
  }, ge(r2, i2) {
1484
- let a2 = { [Z(e2.transformationPaths, r2)]: { $gte: i2 } };
1485
- return t2({ ...n2, filter: X(n2.filter, a2) });
2605
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $gte: i2 } };
2606
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1486
2607
  }, gt(r2, i2) {
1487
- let a2 = { [Z(e2.transformationPaths, r2)]: { $gt: i2 } };
1488
- return t2({ ...n2, filter: X(n2.filter, a2) });
2608
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $gt: i2 } };
2609
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1489
2610
  }, le(r2, i2) {
1490
- let a2 = { [Z(e2.transformationPaths, r2)]: { $lte: i2 } };
1491
- return t2({ ...n2, filter: X(n2.filter, a2) });
2611
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $lte: i2 } };
2612
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1492
2613
  }, lt(r2, i2) {
1493
- let a2 = { [Z(e2.transformationPaths, r2)]: { $lt: i2 } };
1494
- return t2({ ...n2, filter: X(n2.filter, a2) });
1495
- }, isNotEmpty(e3) {
1496
- return this.ne(e3, null);
1497
- }, isEmpty(e3) {
1498
- return this.eq(e3, null);
2614
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $lt: i2 } };
2615
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
2616
+ }, isNotEmpty(e6) {
2617
+ return this.ne(e6, null);
2618
+ }, isEmpty(e6) {
2619
+ return this.eq(e6, null);
1499
2620
  }, startsWith(r2, i2) {
1500
- let a2 = { [Z(e2.transformationPaths, r2)]: { $startsWith: i2 } };
1501
- return t2({ ...n2, filter: X(n2.filter, a2) });
2621
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $startsWith: i2 } };
2622
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1502
2623
  }, endsWith(r2, i2) {
1503
- let a2 = { [Z(e2.transformationPaths, r2)]: { $endsWith: i2 } };
1504
- return t2({ ...n2, filter: X(n2.filter, a2) });
2624
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $endsWith: i2 } };
2625
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1505
2626
  }, contains(r2, i2) {
1506
- let a2 = { [Z(e2.transformationPaths, r2)]: { $contains: i2 } };
1507
- return t2({ ...n2, filter: X(n2.filter, a2) });
2627
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $contains: i2 } };
2628
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1508
2629
  }, hasSome(r2, ...i2) {
1509
- let a2 = { [Z(e2.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
1510
- return t2({ ...n2, filter: X(n2.filter, a2) });
2630
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
2631
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1511
2632
  }, hasAll(r2, ...i2) {
1512
- let a2 = { [Z(e2.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
1513
- return t2({ ...n2, filter: X(n2.filter, a2) });
1514
- }, between(e3, t3, n3) {
1515
- return this.ge(e3, t3).lt(e3, n3);
2633
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
2634
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
2635
+ }, between(e6, t3, n3) {
2636
+ return this.ge(e6, t3).lt(e6, n3);
1516
2637
  }, in(r2, i2) {
1517
- let a2 = { [Z(e2.transformationPaths, r2)]: { $in: i2 } };
1518
- return t2({ ...n2, filter: X(n2.filter, a2) });
2638
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $in: i2 } };
2639
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
1519
2640
  }, exists(r2, i2 = true) {
1520
- let a2 = { [Z(e2.transformationPaths, r2)]: { $exists: i2 } };
1521
- return t2({ ...n2, filter: X(n2.filter, a2) });
1522
- }, or(e3) {
1523
- return t2({ ...n2, filter: ui(n2.filter, e3.query.filter) });
1524
- }, and(e3) {
1525
- return t2({ ...n2, filter: X(n2.filter, e3.query.filter) });
1526
- }, not(e3) {
1527
- return t2({ ...n2, filter: di(e3.query.filter) });
2641
+ let a2 = { [Q(e5.transformationPaths, r2)]: { $exists: i2 } };
2642
+ return t2({ ...n2, filter: Z(n2.filter, a2) });
2643
+ }, or(e6) {
2644
+ return t2({ ...n2, filter: Ua(n2.filter, e6.query.filter) });
2645
+ }, and(e6) {
2646
+ return t2({ ...n2, filter: Z(n2.filter, e6.query.filter) });
2647
+ }, not(e6) {
2648
+ return t2({ ...n2, filter: Wa(e6.query.filter) });
1528
2649
  }, ascending(...r2) {
1529
- return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: Z(e2.transformationPaths, t3), order: `ASC` }))] });
2650
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: Q(e5.transformationPaths, t3), order: `ASC` }))] });
1530
2651
  }, descending(...r2) {
1531
- return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: Z(e2.transformationPaths, t3), order: `DESC` }))] });
1532
- }, skip(e3) {
1533
- return t2({ ...n2, paging: { offset: e3, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
2652
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: Q(e5.transformationPaths, t3), order: `DESC` }))] });
2653
+ }, skip(e6) {
2654
+ return t2({ ...n2, paging: { offset: e6, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
1534
2655
  }, limit(r2) {
1535
- if (e2.pagingMethod === `CURSOR`) {
1536
- let e3 = n2;
1537
- return t2({ ...n2, cursorPaging: { limit: r2, cursor: `cursor` in e3.cursorPaging ? e3.cursorPaging.cursor : void 0 } });
2656
+ if (e5.pagingMethod === `CURSOR`) {
2657
+ let e6 = n2;
2658
+ return t2({ ...n2, cursorPaging: { limit: r2, cursor: `cursor` in e6.cursorPaging ? e6.cursorPaging.cursor : void 0 } });
1538
2659
  }
1539
2660
  let i2 = n2;
1540
2661
  return t2({ ...n2, paging: { limit: r2, offset: `offset` in i2.paging ? i2.paging.offset : 0 } });
1541
2662
  } });
1542
- return t2({ filter: {}, ...e2.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
2663
+ return t2({ filter: {}, ...e5.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
1543
2664
  }
1544
- function Z(e2, t2) {
1545
- let n2 = Object.entries(e2).find(([e3]) => e3 === t2 || t2.startsWith(`${e3}.`))?.[0];
1546
- return n2 ? t2.replace(n2, e2[n2]) : Ye(t2, { ...e2, ...Je });
2665
+ function Q(e5, t2) {
2666
+ let n2 = Object.entries(e5).find(([e6]) => e6 === t2 || t2.startsWith(`${e6}.`))?.[0];
2667
+ return n2 ? t2.replace(n2, e5[n2]) : Ye(t2, { ...e5, ...Je });
1547
2668
  }
1548
- function gi(e2, t2, n2 = {}) {
1549
- let r2 = (r3, i3) => gi(e2, t2, { ...n2, [r3]: i3 }), i2 = () => Object.keys(n2).length === 0 ? {} : { [Xe(e2, t2)]: n2 };
2669
+ function Ya(e5, t2, n2 = {}) {
2670
+ let r2 = (r3, i3) => Ya(e5, t2, { ...n2, [r3]: i3 }), i2 = () => Object.keys(n2).length === 0 ? {} : { [Xe(e5, t2)]: n2 };
1550
2671
  return { get filter() {
1551
2672
  return i2();
1552
- }, eq: (e3) => r2(`$eq`, e3), ne: (e3) => r2(`$ne`, e3), gt: (e3) => r2(`$gt`, e3), gte: (e3) => r2(`$gte`, e3), lt: (e3) => r2(`$lt`, e3), lte: (e3) => r2(`$lte`, e3), startsWith: (e3) => r2(`$startsWith`, e3), endsWith: (e3) => r2(`$endsWith`, e3), contains: (e3) => r2(`$contains`, e3), in: (e3) => r2(`$in`, e3), nin: (e3) => r2(`$nin`, e3), hasSome: (e3) => r2(`$hasSome`, e3), hasAll: (e3) => r2(`$hasAll`, e3), exists: (e3 = true) => r2(`$exists`, e3), isEmpty: (e3 = true) => r2(`$isEmpty`, e3), isNotEmpty: () => r2(`$ne`, null) };
2673
+ }, eq: (e6) => r2(`$eq`, e6), ne: (e6) => r2(`$ne`, e6), gt: (e6) => r2(`$gt`, e6), gte: (e6) => r2(`$gte`, e6), lt: (e6) => r2(`$lt`, e6), lte: (e6) => r2(`$lte`, e6), startsWith: (e6) => r2(`$startsWith`, e6), endsWith: (e6) => r2(`$endsWith`, e6), contains: (e6) => r2(`$contains`, e6), in: (e6) => r2(`$in`, e6), nin: (e6) => r2(`$nin`, e6), hasSome: (e6) => r2(`$hasSome`, e6), hasAll: (e6) => r2(`$hasAll`, e6), exists: (e6 = true) => r2(`$exists`, e6), isEmpty: (e6 = true) => r2(`$isEmpty`, e6), isNotEmpty: () => r2(`$ne`, null) };
1553
2674
  }
1554
- function _i(e2) {
1555
- return Object.assign((t2) => gi(t2, e2), { and: (...e3) => ({ filter: { $and: e3.map((e4) => e4.filter) } }), or: (...e3) => ({ filter: { $or: e3.map((e4) => e4.filter) } }), not: (e3) => ({ filter: { $not: e3.filter } }) });
2675
+ function Xa(e5) {
2676
+ return Object.assign((t2) => Ya(t2, e5), { and: (...e6) => ({ filter: { $and: e6.map((e7) => e7.filter) } }), or: (...e6) => ({ filter: { $or: e6.map((e7) => e7.filter) } }), not: (e6) => ({ filter: { $not: e6.filter } }) });
1556
2677
  }
1557
- function vi(e2) {
1558
- return (t2) => ({ asc: () => ({ sort: { fieldName: Xe(t2, e2), order: `ASC` } }), desc: () => ({ sort: { fieldName: Xe(t2, e2), order: `DESC` } }) });
2678
+ function Za(e5) {
2679
+ return (t2) => ({ asc: () => ({ sort: { fieldName: Xe(t2, e5), order: `ASC` } }), desc: () => ({ sort: { fieldName: Xe(t2, e5), order: `DESC` } }) });
1559
2680
  }
1560
- function yi(e2) {
2681
+ function Qa(e5) {
1561
2682
  return () => {
1562
- let t2 = {}, n2 = { withFilter(e3) {
1563
- return t2 = { ...t2, filter: e3.filter }, n2;
2683
+ let t2 = {}, n2 = { withFilter(e6) {
2684
+ return t2 = { ...t2, filter: e6.filter }, n2;
1564
2685
  }, withFields(...r2) {
1565
- return t2 = { ...t2, fields: r2.map((t3) => Xe(t3, e2)) }, n2;
1566
- }, withSorting(...e3) {
1567
- return t2 = { ...t2, sort: e3.map((e4) => e4.sort) }, n2;
1568
- }, withPaging(e3) {
1569
- return t2 = { ...t2, paging: e3 }, n2;
2686
+ return t2 = { ...t2, fields: r2.map((t3) => Xe(t3, e5)) }, n2;
2687
+ }, withSorting(...e6) {
2688
+ return t2 = { ...t2, sort: e6.map((e7) => e7.sort) }, n2;
2689
+ }, withPaging(e6) {
2690
+ return t2 = { ...t2, paging: e6 }, n2;
1570
2691
  }, build() {
1571
2692
  return t2;
1572
2693
  } };
1573
2694
  return n2;
1574
2695
  };
1575
2696
  }
1576
- function bi(e2) {
1577
- return { QueryBuilder: yi(e2), Filter: _i(e2), Sort: vi(e2) };
2697
+ function $a(e5) {
2698
+ return { QueryBuilder: Qa(e5), Filter: Xa(e5), Sort: Za(e5) };
1578
2699
  }
1579
- var xi = `filter`;
1580
- var Si = `sort`;
1581
- var Ci = `cursorPaging`;
1582
- var wi = `paging`;
1583
- var Ti = [xi, Si, Ci];
1584
- var Ei = [xi, Si, wi];
1585
- function Di(e2, t2) {
1586
- return !e2 || typeof e2 != `object` ? false : t2.some((t3) => e2.hasOwnProperty(t3));
2700
+ var eo = `filter`;
2701
+ var to = `sort`;
2702
+ var no = `cursorPaging`;
2703
+ var ro = `paging`;
2704
+ var io = [eo, to, no];
2705
+ var ao = [eo, to, ro];
2706
+ function oo(e5, t2) {
2707
+ return !e5 || typeof e5 != `object` ? false : t2.some((t3) => e5.hasOwnProperty(t3));
1587
2708
  }
1588
- function Oi(e2) {
1589
- return Di(e2, Ti);
2709
+ function so(e5) {
2710
+ return oo(e5, io);
1590
2711
  }
1591
- function ki(e2) {
1592
- return Di(e2, Ei);
2712
+ function co(e5) {
2713
+ return oo(e5, ao);
1593
2714
  }
1594
- function Ai(e2) {
1595
- let { hasOptionsParameter: t2 } = e2;
2715
+ function lo(e5) {
2716
+ let { hasOptionsParameter: t2 } = e5;
1596
2717
  return function(...n2) {
1597
- return t2 ? Mi(n2, e2) : ji(n2, e2);
2718
+ return t2 ? fo(n2, e5) : uo(n2, e5);
1598
2719
  };
1599
2720
  }
1600
- function ji(e2, t2) {
1601
- return e2.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e2[0]);
2721
+ function uo(e5, t2) {
2722
+ return e5.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e5[0]);
1602
2723
  }
1603
- function Mi(e2, t2) {
1604
- switch (e2.length) {
2724
+ function fo(e5, t2) {
2725
+ switch (e5.length) {
1605
2726
  case 0:
1606
2727
  return t2.builderQueryFunction();
1607
2728
  case 1:
1608
- return Oi(e2[0]) || ki(e2[0]) ? t2.typedQueryFunction(e2[0]) : t2.builderQueryFunction(e2[0]);
2729
+ return so(e5[0]) || co(e5[0]) ? t2.typedQueryFunction(e5[0]) : t2.builderQueryFunction(e5[0]);
1609
2730
  default:
1610
- return t2.typedQueryFunction(e2[0], e2[1]);
2731
+ return t2.typedQueryFunction(e5[0], e5[1]);
1611
2732
  }
1612
2733
  }
1613
- function Ni(e2) {
1614
- return F(Object.assign(e2, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], _: [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }], "*.dev.wix-code.com": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "editor._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/bookings/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }], "bo._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "wixbo.ai": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "wix-bo.com": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "www._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/service-options-and-variants` }] } }));
2734
+ function po(e5) {
2735
+ return It(Object.assign(e5, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], _: [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }], "*.dev.wix-code.com": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "editor._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/bookings/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }], "bo._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "wixbo.ai": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "wix-bo.com": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "www._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/service-options-and-variants` }] } }));
1615
2736
  }
1616
- var Pi = `@wix/auto_sdk_bookings_service-options-and-variants`;
1617
- function Fi(e2) {
2737
+ var mo = `@wix/auto_sdk_bookings_service-options-and-variants`;
2738
+ function ho(e5) {
1618
2739
  function t2({ host: t3 }) {
1619
- return { entityFqdn: `wix.bookings.catalog.v1.service_options_and_variants`, method: `POST`, methodFqn: `wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.QueryServiceOptionsAndVariants`, packageName: Pi, migrationOptions: { optInTransformResponse: true }, url: Ni({ protoPath: `/v1/serviceOptionsAndVariants/query`, data: e2, host: t3 }), data: e2 };
2740
+ return { entityFqdn: `wix.bookings.catalog.v1.service_options_and_variants`, method: `POST`, methodFqn: `wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.QueryServiceOptionsAndVariants`, packageName: mo, migrationOptions: { optInTransformResponse: true }, url: po({ protoPath: `/v1/serviceOptionsAndVariants/query`, data: e5, host: t3 }), data: e5 };
1620
2741
  }
1621
2742
  return t2;
1622
2743
  }
1623
- function Ii() {
1624
- let { httpClient: e2, sideEffects: t2 } = arguments[0];
1625
- return hi({ func: async (n2) => {
1626
- let r2 = Fi(n2);
2744
+ function go() {
2745
+ let { httpClient: e5, sideEffects: t2 } = arguments[0];
2746
+ return Ja({ func: async (n2) => {
2747
+ let r2 = ho(n2);
1627
2748
  t2?.onSiteCall?.();
1628
2749
  try {
1629
- let n3 = await e2.request(r2);
2750
+ let n3 = await e5.request(r2);
1630
2751
  return t2?.onSuccess?.(n3), n3;
1631
- } catch (e3) {
1632
- throw t2?.onError?.(e3), e3;
2752
+ } catch (e6) {
2753
+ throw t2?.onError?.(e6), e6;
1633
2754
  }
1634
- }, requestTransformer: (e3) => {
1635
- let t3 = [e3, {}];
2755
+ }, requestTransformer: (e6) => {
2756
+ let t3 = [e6, {}];
1636
2757
  return A({ ...t3?.[1], query: t3?.[0] });
1637
- }, responseTransformer: ({ data: e3 }) => {
1638
- let t3 = j(N(e3, []));
2758
+ }, responseTransformer: ({ data: e6 }) => {
2759
+ let t3 = j(N(e6, []));
1639
2760
  return { items: t3?.serviceOptionsAndVariantsList, pagingMetadata: t3?.pagingMetadata };
1640
- }, errorTransformer: (e3) => {
1641
- throw P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
2761
+ }, errorTransformer: (e6) => {
2762
+ throw P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1642
2763
  }, pagingMethod: `CURSOR`, transformationPaths: {} });
1643
2764
  }
1644
- async function Li(e2) {
1645
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Fi(A({ query: e2 }));
2765
+ async function _o(e5) {
2766
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ho(A({ query: e5 }));
1646
2767
  n2?.onSiteCall?.();
1647
2768
  try {
1648
- let e3 = await t2.request(r2);
1649
- return n2?.onSuccess?.(e3), j(e3.data);
1650
- } catch (e3) {
1651
- let t3 = P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
1652
- throw n2?.onError?.(e3), t3;
2769
+ let e6 = await t2.request(r2);
2770
+ return n2?.onSuccess?.(e6), j(e6.data);
2771
+ } catch (e6) {
2772
+ let t3 = P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
2773
+ throw n2?.onError?.(e6), t3;
1653
2774
  }
1654
2775
  }
1655
- function Ri(e2) {
1656
- return () => Ii({ httpClient: e2 });
2776
+ function vo(e5) {
2777
+ return () => go({ httpClient: e5 });
1657
2778
  }
1658
- function zi(e2) {
1659
- return (t2) => Li(t2, { httpClient: e2 });
2779
+ function yo(e5) {
2780
+ return (t2) => _o(t2, { httpClient: e5 });
1660
2781
  }
1661
- function Bi(e2) {
1662
- let t2 = Ai({ builderQueryFunction: () => Ri(e2)(), typedQueryFunction: (t3) => zi(e2)(t3), hasOptionsParameter: false });
1663
- function n2(e3) {
2782
+ function bo(e5) {
2783
+ let t2 = lo({ builderQueryFunction: () => vo(e5)(), typedQueryFunction: (t3) => yo(e5)(t3), hasOptionsParameter: false });
2784
+ function n2(e6) {
1664
2785
  return t2(...arguments);
1665
2786
  }
1666
2787
  return n2;
1667
2788
  }
1668
- var Vi = Pt(Bi);
1669
- function Hi(e2) {
1670
- if (e2) return e2.url;
2789
+ var xo = Pt(bo);
2790
+ function So(e5) {
2791
+ if (e5) return e5.url;
1671
2792
  }
1672
- var Ui = [{ path: `services.createdDate` }, { path: `services.updatedDate` }, { path: `services.media.items.image.urlExpirationDate` }, { path: `services.media.mainMedia.image.urlExpirationDate` }, { path: `services.media.coverMedia.image.urlExpirationDate` }, { path: `services.payment.subscription.recurringStartDate` }, { path: `services.bookingPolicy.createdDate` }, { path: `services.bookingPolicy.updatedDate` }, { path: `services.schedule.firstSessionStart` }, { path: `services.schedule.lastSessionEnd` }, { path: `services.staffMembers.mainMedia.image.urlExpirationDate` }, { path: `services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate` }, { path: `services.supportedSlugs.createdDate` }, { path: `services.mainSlug.createdDate` }];
1673
- var Wi = [{ path: `services.locations.business.address.geocode.latitude` }, { path: `services.locations.business.address.geocode.longitude` }, { path: `services.locations.custom.address.geocode.latitude` }, { path: `services.locations.custom.address.geocode.longitude` }, { path: `services.locations.calculatedAddress.geocode.latitude` }, { path: `services.locations.calculatedAddress.geocode.longitude` }];
1674
- function Gi(e2) {
1675
- return F(Object.assign(e2, { 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: `` }] } }));
2793
+ var Co = [{ path: `services.createdDate` }, { path: `services.updatedDate` }, { path: `services.media.items.image.urlExpirationDate` }, { path: `services.media.mainMedia.image.urlExpirationDate` }, { path: `services.media.coverMedia.image.urlExpirationDate` }, { path: `services.payment.subscription.recurringStartDate` }, { path: `services.bookingPolicy.createdDate` }, { path: `services.bookingPolicy.updatedDate` }, { path: `services.schedule.firstSessionStart` }, { path: `services.schedule.lastSessionEnd` }, { path: `services.staffMembers.mainMedia.image.urlExpirationDate` }, { path: `services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate` }, { path: `services.supportedSlugs.createdDate` }, { path: `services.mainSlug.createdDate` }];
2794
+ var wo = [{ path: `services.locations.business.address.geocode.latitude` }, { path: `services.locations.business.address.geocode.longitude` }, { path: `services.locations.custom.address.geocode.latitude` }, { path: `services.locations.custom.address.geocode.longitude` }, { path: `services.locations.calculatedAddress.geocode.latitude` }, { path: `services.locations.calculatedAddress.geocode.longitude` }];
2795
+ function To(e5) {
2796
+ return It(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: `` }] } }));
1676
2797
  }
1677
- var Ki = `@wix/auto_sdk_bookings_services`;
1678
- function qi(e2) {
2798
+ var Eo = `@wix/auto_sdk_bookings_services`;
2799
+ function Do(e5) {
1679
2800
  function t2({ host: t3 }) {
1680
- return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryServices`, packageName: Ki, migrationOptions: { optInTransformResponse: true }, url: Gi({ protoPath: `/v2/services/query`, data: e2, host: t3 }), data: e2, transformResponse: (e3) => N(e3, [{ transformFn: M, paths: Ui }, { transformFn: cn, paths: Wi }]) };
2801
+ return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryServices`, packageName: Eo, migrationOptions: { optInTransformResponse: true }, url: To({ protoPath: `/v2/services/query`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => N(e6, [{ transformFn: M, paths: Co }, { transformFn: un, paths: wo }]) };
1681
2802
  }
1682
2803
  return t2;
1683
2804
  }
1684
- var Ji = [{ path: `services.media.items.image` }, { path: `services.media.mainMedia.image` }, { path: `services.media.coverMedia.image` }, { path: `services.staffMembers.mainMedia.image` }, { path: `services.staffMemberDetails.staffMembers.mainMedia.image` }];
1685
- var Yi = [{ path: `services.locations.calculatedAddress` }, { path: `services.locations.business.address` }, { path: `services.locations.custom.address` }];
1686
- var Xi = [{ path: `services.urls.servicePage` }, { path: `services.urls.bookingPage` }, { path: `services.urls.calendarPage` }];
1687
- var Zi = ((e2) => (e2.APPOINTMENT = `APPOINTMENT`, e2.CLASS = `CLASS`, e2.COURSE = `COURSE`, e2))(Zi || {});
1688
- var Qi = ((e2) => (e2.FIXED = `FIXED`, e2.CUSTOM = `CUSTOM`, e2.VARIED = `VARIED`, e2.NO_FEE = `NO_FEE`, e2.SUBSCRIPTION = `SUBSCRIPTION`, e2))(Qi || {});
1689
- var $i = ((e2) => (e2.CUSTOM = `CUSTOM`, e2.BUSINESS = `BUSINESS`, e2.CUSTOMER = `CUSTOMER`, e2))($i || {});
1690
- function ea(e2) {
2805
+ var Oo = [{ path: `services.media.items.image` }, { path: `services.media.mainMedia.image` }, { path: `services.media.coverMedia.image` }, { path: `services.staffMembers.mainMedia.image` }, { path: `services.staffMemberDetails.staffMembers.mainMedia.image` }];
2806
+ var ko = [{ path: `services.locations.calculatedAddress` }, { path: `services.locations.business.address` }, { path: `services.locations.custom.address` }];
2807
+ var Ao = [{ path: `services.urls.servicePage` }, { path: `services.urls.bookingPage` }, { path: `services.urls.calendarPage` }];
2808
+ var jo = ((e5) => (e5.APPOINTMENT = `APPOINTMENT`, e5.CLASS = `CLASS`, e5.COURSE = `COURSE`, e5))(jo || {});
2809
+ var Mo = ((e5) => (e5.FIXED = `FIXED`, e5.CUSTOM = `CUSTOM`, e5.VARIED = `VARIED`, e5.NO_FEE = `NO_FEE`, e5.SUBSCRIPTION = `SUBSCRIPTION`, e5))(Mo || {});
2810
+ var No = ((e5) => (e5.CUSTOM = `CUSTOM`, e5.BUSINESS = `BUSINESS`, e5.CUSTOMER = `CUSTOMER`, e5))(No || {});
2811
+ function Po(e5) {
1691
2812
  let { httpClient: t2, sideEffects: n2 } = arguments[1];
1692
- return hi({ func: async (r2) => {
1693
- let i2 = qi({ ...r2, ...e2 ?? {} });
2813
+ return Ja({ func: async (r2) => {
2814
+ let i2 = Do({ ...r2, ...e5 ?? {} });
1694
2815
  n2?.onSiteCall?.();
1695
2816
  try {
1696
- let e3 = await t2.request(i2);
1697
- return n2?.onSuccess?.(e3), e3;
1698
- } catch (e3) {
1699
- throw n2?.onError?.(e3), e3;
2817
+ let e6 = await t2.request(i2);
2818
+ return n2?.onSuccess?.(e6), e6;
2819
+ } catch (e6) {
2820
+ throw n2?.onError?.(e6), e6;
1700
2821
  }
1701
2822
  }, requestTransformer: (t3) => {
1702
- let n3 = [t3, e2];
2823
+ let n3 = [t3, e5];
1703
2824
  return A({ ...n3?.[1], query: n3?.[0] });
1704
- }, responseTransformer: ({ data: e3 }) => {
1705
- let t3 = j(N(e3, [{ transformFn: oi, paths: Ji }, { transformFn: ln, paths: Yi }, { transformFn: Hi, paths: Xi }]));
2825
+ }, responseTransformer: ({ data: e6 }) => {
2826
+ let t3 = j(N(e6, [{ transformFn: za, paths: Oo }, { transformFn: dn, paths: ko }, { transformFn: So, paths: Ao }]));
1706
2827
  return { items: t3?.services, pagingMetadata: t3?.pagingMetadata };
1707
- }, errorTransformer: (e3) => {
1708
- throw P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
2828
+ }, errorTransformer: (e6) => {
2829
+ throw P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1709
2830
  }, pagingMethod: `OFFSET`, transformationPaths: {} });
1710
2831
  }
1711
- async function ta(e2, t2) {
1712
- let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = qi(A({ query: e2, ...t2 }));
2832
+ async function Fo(e5, t2) {
2833
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Do(A({ query: e5, ...t2 }));
1713
2834
  r2?.onSiteCall?.();
1714
2835
  try {
1715
- let e3 = await n2.request(i2);
1716
- return r2?.onSuccess?.(e3), j(N(e3.data, [{ transformFn: oi, paths: Ji }, { transformFn: ln, paths: Yi }, { transformFn: Hi, paths: Xi }]));
1717
- } catch (e3) {
1718
- let t3 = P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
1719
- throw r2?.onError?.(e3), t3;
2836
+ let e6 = await n2.request(i2);
2837
+ return r2?.onSuccess?.(e6), j(N(e6.data, [{ transformFn: za, paths: Oo }, { transformFn: dn, paths: ko }, { transformFn: So, paths: Ao }]));
2838
+ } catch (e6) {
2839
+ let t3 = P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
2840
+ throw r2?.onError?.(e6), t3;
1720
2841
  }
1721
2842
  }
1722
- function na(e2) {
1723
- return (t2) => ea(t2, { httpClient: e2 });
2843
+ function Io(e5) {
2844
+ return (t2) => Po(t2, { httpClient: e5 });
1724
2845
  }
1725
- function ra(e2) {
1726
- return (t2, n2) => ta(t2, n2, { httpClient: e2 });
2846
+ function Lo(e5) {
2847
+ return (t2, n2) => Fo(t2, n2, { httpClient: e5 });
1727
2848
  }
1728
- function ia(e2) {
1729
- let t2 = Ai({ builderQueryFunction: (t3) => na(e2)(t3), typedQueryFunction: (t3, n3) => ra(e2)(t3, n3), hasOptionsParameter: true });
1730
- function n2(e3, n3) {
2849
+ function Ro(e5) {
2850
+ let t2 = lo({ builderQueryFunction: (t3) => Io(e5)(t3), typedQueryFunction: (t3, n3) => Lo(e5)(t3, n3), hasOptionsParameter: true });
2851
+ function n2(e6, n3) {
1731
2852
  return t2(...arguments);
1732
2853
  }
1733
2854
  return n2;
1734
2855
  }
1735
- var aa = Pt(ia);
1736
- var oa = [{ path: `bookingsSettings.createdDate` }, { path: `bookingsSettings.updatedDate` }];
1737
- var sa = [{ path: `bookingsSettings.siteProperties.address.coordinates.latitude` }, { path: `bookingsSettings.siteProperties.address.coordinates.longitude` }];
1738
- function ca(e2) {
1739
- return F(Object.assign(e2, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "dev._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], _: [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "api._api_base_domain_": [{ srcPath: `/bookings-settings`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "editor.wixapps.net": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }] } }));
2856
+ var zo = Pt(Ro);
2857
+ var Bo = [{ path: `bookingsSettings.createdDate` }, { path: `bookingsSettings.updatedDate` }];
2858
+ var Vo = [{ path: `bookingsSettings.siteProperties.address.coordinates.latitude` }, { path: `bookingsSettings.siteProperties.address.coordinates.longitude` }];
2859
+ function Ho(e5) {
2860
+ return It(Object.assign(e5, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "dev._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], _: [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "api._api_base_domain_": [{ srcPath: `/bookings-settings`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "editor.wixapps.net": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }] } }));
1740
2861
  }
1741
- var la = `@wix/auto_sdk_bookings_bookings-settings`;
1742
- function ua(e2) {
2862
+ var Uo = `@wix/auto_sdk_bookings_bookings-settings`;
2863
+ function Wo(e5) {
1743
2864
  function t2({ host: t3 }) {
1744
- return { entityFqdn: `wix.bookings.v2.bookings_settings`, method: `GET`, methodFqn: `wix.bookings.settings.v2.BookingsSettingsService.GetBookingsSettings`, packageName: la, migrationOptions: { optInTransformResponse: true }, url: ca({ protoPath: `/v2/settings`, data: e2, host: t3 }), params: Ft(e2), transformResponse: (e3) => N(e3, [{ transformFn: M, paths: oa }, { transformFn: cn, paths: sa }]), fallback: [{ method: `GET`, url: ca({ protoPath: `/v2/settings`, data: e2, host: t3 }), params: Ft(e2) }] };
2865
+ return { entityFqdn: `wix.bookings.v2.bookings_settings`, method: `GET`, methodFqn: `wix.bookings.settings.v2.BookingsSettingsService.GetBookingsSettings`, packageName: Uo, migrationOptions: { optInTransformResponse: true }, url: Ho({ protoPath: `/v2/settings`, data: e5, host: t3 }), params: Ft(e5), transformResponse: (e6) => N(e6, [{ transformFn: M, paths: Bo }, { transformFn: un, paths: Vo }]), fallback: [{ method: `GET`, url: Ho({ protoPath: `/v2/settings`, data: e5, host: t3 }), params: Ft(e5) }] };
1745
2866
  }
1746
2867
  return t2;
1747
2868
  }
1748
- var da = ((e2) => (e2.BUSINESS_TIME_ZONE = `BUSINESS_TIME_ZONE`, e2.CUSTOMER_TIME_ZONE = `CUSTOMER_TIME_ZONE`, e2))(da || {});
1749
- async function fa() {
1750
- let { httpClient: e2, sideEffects: t2 } = arguments[0], n2 = ua(A({}));
2869
+ var Go = ((e5) => (e5.BUSINESS_TIME_ZONE = `BUSINESS_TIME_ZONE`, e5.CUSTOMER_TIME_ZONE = `CUSTOMER_TIME_ZONE`, e5))(Go || {});
2870
+ async function Ko() {
2871
+ let { httpClient: e5, sideEffects: t2 } = arguments[0], n2 = Wo(A({}));
1751
2872
  t2?.onSiteCall?.();
1752
2873
  try {
1753
- let r2 = await e2.request(n2);
2874
+ let r2 = await e5.request(n2);
1754
2875
  return t2?.onSuccess?.(r2), j(r2.data)?.bookingsSettings;
1755
- } catch (e3) {
1756
- let n3 = P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: {}, singleArgumentUnchanged: false }, []);
1757
- throw t2?.onError?.(e3), n3;
2876
+ } catch (e6) {
2877
+ let n3 = P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: {}, singleArgumentUnchanged: false }, []);
2878
+ throw t2?.onError?.(e6), n3;
1758
2879
  }
1759
2880
  }
1760
- function pa(e2) {
1761
- return () => fa({ httpClient: e2 });
2881
+ function qo(e5) {
2882
+ return () => Ko({ httpClient: e5 });
1762
2883
  }
1763
- var ma = Pt(pa);
1764
- var ha = (e2) => e2 === Zi.APPOINTMENT;
1765
- var ga = (e2) => e2.payment?.rateType === Qi.VARIED;
1766
- var _a = [`STAFF_MEMBER_DETAILS`, `STAFF_WORKING_HOURS_LOCATIONS`, `DISCOUNT_INFO_DETAILS`];
1767
- function va() {
1768
- return aa({ conditionalFields: _a }).eq(`appId`, tr).eq(`hidden`, false);
2884
+ var Jo = Pt(qo);
2885
+ var Yo = (e5) => e5 === jo.APPOINTMENT;
2886
+ var Xo = (e5) => e5.payment?.rateType === Mo.VARIED;
2887
+ var Zo = [`STAFF_MEMBER_DETAILS`, `STAFF_WORKING_HOURS_LOCATIONS`, `DISCOUNT_INFO_DETAILS`];
2888
+ function Qo() {
2889
+ return zo({ conditionalFields: Zo }).eq(`appId`, Ni).eq(`hidden`, false);
1769
2890
  }
1770
- async function ya({ limit: e2, offset: t2, categoryId: n2, locationId: r2, serviceIds: i2, categoryIds: a2 }) {
2891
+ async function $o({ limit: e5, offset: t2, categoryId: n2, locationId: r2, serviceIds: i2, categoryIds: a2 }) {
1771
2892
  if (n2 && a2?.length && !a2.includes(n2)) return { services: [], hasMore: false, totalPages: 1 };
1772
- let o2 = va().limit(e2).skip(t2);
1773
- i2?.length && (o2 = o2.in(`_id`, i2)), n2 ? o2 = o2.eq(`category.id`, n2) : a2?.length && (o2 = o2.in(`category.id`, a2)), r2 === `OTHER_LOCATIONS` ? o2 = o2.hasSome(`locations.type`, [$i.CUSTOM, $i.CUSTOMER]) : r2 && (o2 = o2.eq(`locations.business.id`, r2));
2893
+ let o2 = Qo().limit(e5).skip(t2);
2894
+ i2?.length && (o2 = o2.in(`_id`, i2)), n2 ? o2 = o2.eq(`category.id`, n2) : a2?.length && (o2 = o2.in(`category.id`, a2)), r2 === `OTHER_LOCATIONS` ? o2 = o2.hasSome(`locations.type`, [No.CUSTOM, No.CUSTOMER]) : r2 && (o2 = o2.eq(`locations.business.id`, r2));
1774
2895
  let s2 = await o2.find();
1775
2896
  return { services: s2.items ?? [], hasMore: s2.hasNext(), totalPages: s2.totalPages ?? 1 };
1776
2897
  }
1777
- var Q = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
1778
- function ba(e2, t2) {
1779
- let n2 = e2(t2);
2898
+ var es = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
2899
+ function ts(e5, t2) {
2900
+ let n2 = e5(t2);
1780
2901
  return n2 ? n2.replace(/\/$/, ``) || `/` : null;
1781
2902
  }
1782
- function xa(e2, t2, n2) {
1783
- let r2 = e2(t2);
2903
+ function ns(e5, t2, n2) {
2904
+ let r2 = e5(t2);
1784
2905
  return !r2 || !n2 ? null : `${r2.replace(/\/$/, ``)}/${n2}`;
1785
2906
  }
1786
- function Sa(e2, t2) {
1787
- switch (e2) {
2907
+ function rs(e5, t2) {
2908
+ switch (e5) {
1788
2909
  case `servicePage`:
1789
- return (t2.slug ? t2.buildCustomServiceUrl(t2.slug) : void 0) ?? xa(t2.appSectionUrl, H.SERVICE_PAGE, t2.slug);
2910
+ return (t2.slug ? t2.buildCustomServiceUrl(t2.slug) : void 0) ?? ns(t2.appSectionUrl, W.SERVICE_PAGE, t2.slug);
1790
2911
  case `bookingCalendar`:
1791
- return t2.isMultiService ? ba(t2.appSectionUrl, H.CALENDAR_PAGE) : xa(t2.appSectionUrl, H.CALENDAR_PAGE, t2.slug);
2912
+ return t2.isMultiService ? ts(t2.appSectionUrl, W.CALENDAR_PAGE) : ns(t2.appSectionUrl, W.CALENDAR_PAGE, t2.slug);
1792
2913
  case `bookingForm`:
1793
- return t2.serviceId ? xa(t2.appSectionUrl, H.FORM_PAGE, t2.slug) : null;
2914
+ return t2.serviceId ? ns(t2.appSectionUrl, W.FORM_PAGE, t2.slug) : null;
1794
2915
  default:
1795
2916
  return null;
1796
2917
  }
1797
2918
  }
1798
- var Ca = (e2) => e2.target === `_blank`;
1799
- var wa = (e2, t2) => t2 === `/` ? e2 : new URL(`.${t2}`, `${e2}/`).href;
1800
- var Ta = (e2, t2, n2) => n2 ? `.${t2}` : Ea(e2, t2);
1801
- var Ea = (e2, t2) => e2 ? wa(e2, t2) : t2;
1802
- var Da = () => {
1803
- let { previewMode: e2 } = (0, import_services_manager_react.useService)(Zn), t2 = (0, import_services_manager_react.useService)(Bn), n2 = t2.siteUrl.replace(/\/$/, ``), { navigateTo: r2 } = (0, import_services_manager_react.useService)($n), a2 = (0, import_services_manager_react.useService)(er), o2 = (0, import_services_manager_react.useGetService)(), s2 = (0, import_react.useCallback)(async (t3) => {
1804
- let i2 = Ta(n2, t3, e2);
2919
+ var is = (e5) => e5.target === `_blank`;
2920
+ var as = (e5, t2) => t2 === `/` ? e5 : new URL(`.${t2}`, `${e5}/`).href;
2921
+ var os = (e5, t2, n2) => n2 ? `.${t2}` : ss(e5, t2);
2922
+ var ss = (e5, t2) => e5 ? as(e5, t2) : t2;
2923
+ var cs = () => {
2924
+ let { previewMode: e5 } = (0, import_services_manager_react.useService)(ki), t2 = (0, import_services_manager_react.useService)(vi), n2 = t2.siteUrl.replace(/\/$/, ``), { navigateTo: r2 } = (0, import_services_manager_react.useService)(ji), a2 = (0, import_services_manager_react.useService)(Mi), o2 = (0, import_services_manager_react.useGetService)(), s2 = (0, import_react.useCallback)(async (t3) => {
2925
+ let i2 = os(n2, t3, e5);
1805
2926
  await r2({ href: i2 });
1806
- }, [e2, n2, r2]), c2 = (0, import_react.useCallback)(async (e3) => {
1807
- await r2(Ca(e3) ? { href: e3.href, type: `ExternalLink`, target: `_blank` } : { href: e3.href });
1808
- }, [r2]), l2 = (0, import_react.useCallback)((e3) => Ea(n2, e3), [n2]), u2 = (0, import_react.useCallback)((e3) => t2.appSectionRelativeUrl(tr, e3), [t2]), d2 = (0, import_react.useCallback)((e3) => ai(a2.urlMappings, e3), [a2]), m2 = (0, import_react.useCallback)((e3, t3) => Sa(e3, { ...t3, appSectionUrl: u2, buildCustomServiceUrl: d2 }), [u2, d2]), ee2 = (0, import_react.useCallback)((e3, t3) => {
1809
- let r3 = m2(e3, t3);
1810
- return r3 && n2 ? wa(n2, r3) : null;
1811
- }, [m2, n2]), h2 = (0, import_react.useCallback)((e3, t3) => {
1812
- let n3 = m2(e3, t3);
2927
+ }, [e5, n2, r2]), c2 = (0, import_react.useCallback)(async (e6) => {
2928
+ await r2(is(e6) ? { href: e6.href, type: `ExternalLink`, target: `_blank` } : { href: e6.href });
2929
+ }, [r2]), l2 = (0, import_react.useCallback)((e6) => ss(n2, e6), [n2]), u2 = (0, import_react.useCallback)((e6) => t2.appSectionRelativeUrl(Ni, e6), [t2]), d2 = (0, import_react.useCallback)((e6) => Ra(a2.urlMappings, e6), [a2]), m2 = (0, import_react.useCallback)((e6, t3) => rs(e6, { ...t3, appSectionUrl: u2, buildCustomServiceUrl: d2 }), [u2, d2]), h2 = (0, import_react.useCallback)((e6, t3) => {
2930
+ let r3 = m2(e6, t3);
2931
+ return r3 && n2 ? as(n2, r3) : null;
2932
+ }, [m2, n2]), g2 = (0, import_react.useCallback)((e6, t3) => {
2933
+ let n3 = m2(e6, t3);
1813
2934
  n3 && s2(n3);
1814
- }, [m2, s2]), g2 = (0, import_react.useCallback)(() => u2(H.FORM_PAGE) || void 0, [u2]), _2 = (0, import_react.useCallback)((e3) => Object.values(o2(Qn).pages).some((t3) => t3.appPageId === e3 && (!t3.appDefinitionId || t3.appDefinitionId === `1380b703-ce81-ff05-f115-39571d94dfcd`)) && t2.appSectionRelativeUrl(`1380b703-ce81-ff05-f115-39571d94dfcd`, e3) || void 0, [t2, o2]);
1815
- return { navigate: s2, navigateToHref: c2, resolvePath: m2, toHref: l2, resolveAbsoluteUrl: ee2, navigateTo: h2, getBookingFormPath: g2, getCartPagePath: (0, import_react.useCallback)(() => _2(nr), [_2]), getThankYouPagePath: (0, import_react.useCallback)((e3) => {
1816
- let t3 = _2(rr);
1817
- return t3 ? `${t3}/${e3}?origin=bookings` : void 0;
1818
- }, [_2]) };
1819
- };
1820
- var Oa = V(`@wix/site-service-warmup-data`);
1821
- function ka() {
2935
+ }, [m2, s2]), _2 = (0, import_react.useCallback)(() => u2(W.FORM_PAGE) || void 0, [u2]), v2 = (0, import_react.useCallback)((e6) => Object.values(o2(Ai).pages).some((t3) => t3.appPageId === e6 && (!t3.appDefinitionId || t3.appDefinitionId === `1380b703-ce81-ff05-f115-39571d94dfcd`)) && t2.appSectionRelativeUrl(`1380b703-ce81-ff05-f115-39571d94dfcd`, e6) || void 0, [t2, o2]);
2936
+ return { navigate: s2, navigateToHref: c2, resolvePath: m2, toHref: l2, resolveAbsoluteUrl: h2, navigateTo: g2, getBookingFormPath: _2, getCartPagePath: (0, import_react.useCallback)(() => v2(Pi), [v2]), getThankYouPagePath: (0, import_react.useCallback)((e6) => {
2937
+ let t3 = v2(Fi);
2938
+ return t3 ? `${t3}/${e6}?origin=bookings` : void 0;
2939
+ }, [v2]) };
2940
+ };
2941
+ var ls = U(`@wix/site-service-warmup-data`);
2942
+ function us() {
1822
2943
  try {
1823
2944
  return (0, import_services_manager_react.useGetService)();
1824
2945
  } catch {
1825
2946
  return null;
1826
2947
  }
1827
2948
  }
1828
- function Aa(e2) {
2949
+ function ds(e5) {
1829
2950
  try {
1830
- return e2 ? e2(Oa) : null;
2951
+ return e5 ? e5(ls) : null;
1831
2952
  } catch {
1832
2953
  return null;
1833
2954
  }
1834
2955
  }
1835
- function ja() {
1836
- let e2 = Aa(ka()), t2 = typeof window > `u`;
1837
- return { scope: e2 ?? void 0, get: async (n2) => {
1838
- if (t2 || !e2) return null;
2956
+ function fs() {
2957
+ let e5 = ds(us()), t2 = typeof window > `u`;
2958
+ return { scope: e5 ?? void 0, get: async (n2) => {
2959
+ if (t2 || !e5) return null;
1839
2960
  try {
1840
- return await e2.get(n2);
1841
- } catch (e3) {
1842
- return B(e3, { feature: z.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2961
+ return await e5.get(n2);
2962
+ } catch (e6) {
2963
+ return H(e6, { feature: V.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
1843
2964
  }
1844
2965
  }, set: (n2, r2) => {
1845
- if (t2 && e2) try {
1846
- e2.set(n2, r2);
2966
+ if (t2 && e5) try {
2967
+ e5.set(n2, r2);
1847
2968
  } catch {
1848
2969
  }
1849
2970
  } };
1850
2971
  }
1851
- var Ma = `bookings-uou`;
1852
- function Na(e2, t2, n2, r2, i2 = [], a2 = []) {
1853
- let o2 = i2.length ? `:ids-${encodeURIComponent(JSON.stringify([...i2].sort()))}` : ``, s2 = a2.length ? `:cats-${encodeURIComponent(JSON.stringify([...a2].sort()))}` : ``;
1854
- return `${Ma}:services:${e2 ?? `all`}:${t2 ?? `all`}:page-${n2}:limit-${r2}${o2}${s2}`;
2972
+ var ps = U(`@wix/site-service-locale`);
2973
+ var ms = U;
2974
+ var hs = ms(`@wix/viewer-service-multilingual`);
2975
+ function gs() {
2976
+ try {
2977
+ return si.getLanguage() ?? `en`;
2978
+ } catch {
2979
+ return `en`;
2980
+ }
1855
2981
  }
1856
- function Pa(e2, t2) {
1857
- return `${Ma}:services-variants:ids-${encodeURIComponent(JSON.stringify([...e2].sort()))}:refresh-${t2}`;
2982
+ function _s(e5) {
2983
+ try {
2984
+ return (0, import_services_manager_react.useService)(e5);
2985
+ } catch {
2986
+ return null;
2987
+ }
2988
+ }
2989
+ function vs() {
2990
+ let e5 = _s(ps), t2 = _s(hs);
2991
+ return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || gs();
2992
+ }
2993
+ var ys = `bookings-uou`;
2994
+ function bs(e5, t2, n2, r2, i2, a2 = [], o2 = []) {
2995
+ let s2 = a2.length ? `:ids-${encodeURIComponent(JSON.stringify([...a2].sort()))}` : ``, c2 = o2.length ? `:cats-${encodeURIComponent(JSON.stringify([...o2].sort()))}` : ``;
2996
+ return `${ys}:${e5}:services:${t2 ?? `all`}:${n2 ?? `all`}:page-${r2}:limit-${i2}${s2}${c2}`;
1858
2997
  }
1859
- function Fa() {
1860
- return `${Ma}:bookings-settings`;
2998
+ function xs(e5, t2, n2) {
2999
+ return `${ys}:${e5}:services-variants:ids-${encodeURIComponent(JSON.stringify([...t2].sort()))}:refresh-${n2}`;
1861
3000
  }
1862
- var Ia = 5e3;
1863
- var La = 100;
1864
- var Ra = `wix-warmup-data`;
1865
- var za = null;
1866
- function Ba(e2) {
3001
+ function Ss() {
3002
+ return `${ys}:bookings-settings`;
3003
+ }
3004
+ var Cs = 5e3;
3005
+ var ws = 100;
3006
+ var Ts = `wix-warmup-data`;
3007
+ var Es = null;
3008
+ function Ds(e5) {
1867
3009
  if (typeof document < `u`) try {
1868
- let t2 = document.getElementById(Ra)?.textContent;
1869
- return t2 ? (za?.text !== t2 && (za = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), za.data[e2] ?? void 0) : void 0;
3010
+ let t2 = document.getElementById(Ts)?.textContent;
3011
+ return t2 ? (Es?.text !== t2 && (Es = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Es.data[e5] ?? void 0) : void 0;
1870
3012
  } catch {
1871
3013
  return;
1872
3014
  }
1873
3015
  }
1874
- var Va = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
1875
- var Ha = Va();
1876
- var Ua = /* @__PURE__ */ new WeakMap();
1877
- var Wa = /* @__PURE__ */ new WeakMap();
1878
- function Ga(e2) {
1879
- if (!e2) return Ha;
1880
- let t2 = Ua.get(e2);
1881
- return t2 || (t2 = Va(), Ua.set(e2, t2)), t2;
3016
+ var Os = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
3017
+ var ks = Os();
3018
+ var As = /* @__PURE__ */ new WeakMap();
3019
+ var js = /* @__PURE__ */ new WeakMap();
3020
+ function Ms(e5) {
3021
+ if (!e5) return ks;
3022
+ let t2 = As.get(e5);
3023
+ return t2 || (t2 = Os(), As.set(e5, t2)), t2;
1882
3024
  }
1883
- function Ka({ key: e2, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
1884
- if (e2 === null) return n2();
3025
+ function Ns({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
3026
+ if (e5 === null) return n2();
1885
3027
  if (typeof window > `u`) {
1886
- let r3 = () => n2().then((n3) => (t2.set(e2, n3), n3)), { scope: i3 } = t2;
3028
+ let r3 = () => n2().then((n3) => (t2.set(e5, n3), n3)), { scope: i3 } = t2;
1887
3029
  if (!i3) return r3();
1888
- let a3 = Wa.get(i3);
1889
- a3 || (a3 = /* @__PURE__ */ new Map(), Wa.set(i3, a3));
1890
- let o3 = a3.get(e2);
3030
+ let a3 = js.get(i3);
3031
+ a3 || (a3 = /* @__PURE__ */ new Map(), js.set(i3, a3));
3032
+ let o3 = a3.get(e5);
1891
3033
  if (o3) return o3;
1892
3034
  let s3 = r3();
1893
- return a3.set(e2, s3), s3.catch(() => a3.delete(e2)), s3;
3035
+ return a3.set(e5, s3), s3.catch(() => a3.delete(e5)), s3;
1894
3036
  }
1895
- let i2 = Ga(t2.scope), a2 = Date.now();
1896
- for (let [e3, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e3);
1897
- let o2 = i2.promises.get(e2);
3037
+ let i2 = Ms(t2.scope), a2 = Date.now();
3038
+ for (let [e6, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e6);
3039
+ let o2 = i2.promises.get(e5);
1898
3040
  if (o2 && !r2) return o2.promise;
1899
- r2 && i2.invalidatedWarmup.add(e2);
1900
- let s2 = !i2.invalidatedWarmup.has(e2);
3041
+ r2 && i2.invalidatedWarmup.add(e5);
3042
+ let s2 = !i2.invalidatedWarmup.has(e5);
1901
3043
  if (s2) {
1902
- let t3 = Ba(e2);
3044
+ let t3 = Ds(e5);
1903
3045
  if (t3 !== void 0) {
1904
- let n3 = Ln(t3);
1905
- return i2.promises.set(e2, { promise: n3, expiresAt: a2 + Ia }), n3;
3046
+ let n3 = hi(t3);
3047
+ return i2.promises.set(e5, { promise: n3, expiresAt: a2 + Cs }), n3;
1906
3048
  }
1907
3049
  }
1908
3050
  let c2 = (async () => {
1909
3051
  if (s2) {
1910
- let n3 = await t2.get(e2);
3052
+ let n3 = await t2.get(e5);
1911
3053
  if (n3 != null) return n3;
1912
3054
  }
1913
3055
  return n2();
1914
3056
  })();
1915
- i2.promises.size >= La && i2.promises.delete(i2.promises.keys().next().value);
3057
+ i2.promises.size >= ws && i2.promises.delete(i2.promises.keys().next().value);
1916
3058
  let l2 = { promise: c2, expiresAt: 1 / 0 };
1917
- return i2.promises.set(e2, l2), c2.then(() => {
1918
- l2.expiresAt = Date.now() + Ia;
3059
+ return i2.promises.set(e5, l2), c2.then(() => {
3060
+ l2.expiresAt = Date.now() + Cs;
1919
3061
  }, () => {
1920
- i2.promises.get(e2) === l2 && i2.promises.delete(e2);
3062
+ i2.promises.get(e5) === l2 && i2.promises.delete(e5);
1921
3063
  }), c2;
1922
3064
  }
1923
- var qa = 100;
1924
- async function Ja(e2) {
1925
- if (e2.length === 0) return {};
3065
+ var Ps = 100;
3066
+ async function Fs(e5) {
3067
+ if (e5.length === 0) return {};
1926
3068
  let t2 = [];
1927
- for (let n3 = 0; n3 < e2.length; n3 += qa) t2.push(e2.slice(n3, n3 + qa));
1928
- let n2 = await Promise.all(t2.map((e3) => Vi().in(`serviceId`, e3).limit(qa).find())), r2 = {};
1929
- for (let e3 of n2.flatMap((e4) => e4.items ?? [])) e3.serviceId && (r2[e3.serviceId] = e3);
3069
+ for (let n3 = 0; n3 < e5.length; n3 += Ps) t2.push(e5.slice(n3, n3 + Ps));
3070
+ let n2 = await Promise.all(t2.map((e6) => xo().in(`serviceId`, e6).limit(Ps).find())), r2 = {};
3071
+ for (let e6 of n2.flatMap((e7) => e7.items ?? [])) e6.serviceId && (r2[e6.serviceId] = e6);
1930
3072
  return r2;
1931
3073
  }
1932
- var Ya = V(`@wix/site-service-rendering-context`);
1933
- var Xa = () => {
1934
- let { SSR: e2 } = (0, import_services_manager_react.useService)(Ya);
1935
- return { isSSR: () => e2 };
3074
+ var Is = U(`@wix/site-service-rendering-context`);
3075
+ var Ls = () => {
3076
+ let { SSR: e5 } = (0, import_services_manager_react.useService)(Is);
3077
+ return { isSSR: () => e5 };
1936
3078
  };
1937
- var Za = V(`@wix/site-service-business-logger`);
1938
- function Qa(e2) {
1939
- return { evid: 1222, src: 16, endpoint: ``, params: e2 };
1940
- }
1941
- function $a(e2) {
1942
- return { evid: 32, src: 16, endpoint: ``, params: e2 };
1943
- }
1944
- var eo = { 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` };
1945
- var to = H.BOOK_ONLINE;
1946
- var no = `new_bookings_server`;
1947
- var ro = `load more`;
1948
- var io = (e2) => {
1949
- let { reportBi: t2 } = (0, import_services_manager_react.useService)(Za);
3079
+ var Rs = ms(`@wix/site-service-business-logger`);
3080
+ function zs(e5) {
3081
+ return { evid: 1222, src: 16, endpoint: ``, params: e5 };
3082
+ }
3083
+ function Bs(e5) {
3084
+ return { evid: 32, src: 16, endpoint: ``, params: e5 };
3085
+ }
3086
+ var Vs = { 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` };
3087
+ var Hs = W.BOOK_ONLINE;
3088
+ var Us = `new_bookings_server`;
3089
+ var Ws = `load more`;
3090
+ var Gs = (e5) => {
3091
+ let { reportBi: t2 } = (0, import_services_manager_react.useService)(Rs);
1950
3092
  return (0, import_react.useCallback)((n2) => {
1951
- t2({ widget_name: e2, bookingsPlatform: no, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
1952
- }, [t2, e2]);
3093
+ t2({ widget_name: e5, bookingsPlatform: Us, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
3094
+ }, [t2, e5]);
1953
3095
  };
1954
- function ao(e2) {
1955
- return { evid: 540, src: 16, endpoint: `wixboost-ugc`, params: e2 };
3096
+ function Ks(e5) {
3097
+ return { evid: 540, src: 16, endpoint: `wixboost-ugc`, params: e5 };
1956
3098
  }
1957
- var oo = V(`seo/seo-service`);
1958
- function so() {
1959
- let e2 = (0, import_services_manager_react.useGetService)();
3099
+ var qs = U(`seo/seo-service`);
3100
+ function Js() {
3101
+ let e5 = (0, import_services_manager_react.useGetService)();
1960
3102
  try {
1961
- return e2(oo);
3103
+ return e5(qs);
1962
3104
  } catch {
1963
3105
  return null;
1964
3106
  }
1965
3107
  }
1966
- function co() {
1967
- let e2 = so();
1968
- return { resolved: !!e2, send: (t2) => {
1969
- if (!e2) return Promise.resolve(`unavailable`);
1970
- let n2 = (e3) => B(e3, { feature: z.seo, action: `send-seo-entity`, level: `warning`, contexts: { seo: { itemType: t2.itemType } } });
3108
+ function Ys() {
3109
+ let e5 = Js();
3110
+ return { resolved: !!e5, send: (t2) => {
3111
+ if (!e5) return Promise.resolve(`unavailable`);
3112
+ let n2 = (e6) => H(e6, { feature: V.seo, action: `send-seo-entity`, level: `warning`, contexts: { seo: { itemType: t2.itemType } } });
1971
3113
  try {
1972
- return e2.setSeoEntity(t2).then(() => `sent`).catch((e3) => (n2(e3), `failed`));
1973
- } catch (e3) {
1974
- return n2(e3), Promise.resolve(`failed`);
3114
+ return e5.setSeoEntity(t2).then(() => `sent`).catch((e6) => (n2(e6), `failed`));
3115
+ } catch (e6) {
3116
+ return n2(e6), Promise.resolve(`failed`);
1975
3117
  }
1976
3118
  } };
1977
3119
  }
1978
- var lo = `SERVICES_COMPONENT`;
1979
- var uo = `PAGINATED_COMPONENT`;
1980
- function fo(e2, t2, n2) {
1981
- return { itemType: lo, itemData: { services: e2.map((e3) => ({ ...e3, urls: { servicePage: { url: t2(e3) ?? `` } } })), pagination: n2 } };
3120
+ var Xs = `SERVICES_COMPONENT`;
3121
+ var Zs = `PAGINATED_COMPONENT`;
3122
+ function Qs(e5, t2, n2) {
3123
+ return { itemType: Xs, itemData: { services: e5.map((e6) => ({ ...e6, urls: { servicePage: { url: t2(e6) ?? `` } } })), pagination: n2 } };
1982
3124
  }
1983
- function po(e2) {
1984
- return { itemType: uo, itemData: { pagination: e2 } };
3125
+ function $s(e5) {
3126
+ return { itemType: Zs, itemData: { pagination: e5 } };
1985
3127
  }
1986
- var mo = /* @__PURE__ */ new WeakSet();
1987
- function ho({ servicesPromise: e2, currentPage: t2, pageQueryParam: n2 }) {
1988
- let { services: r2, totalPages: i2 } = In(e2), { resolveAbsoluteUrl: a2 } = Da(), { send: o2 } = co();
3128
+ var ec = /* @__PURE__ */ new WeakSet();
3129
+ function tc({ servicesPromise: e5, currentPage: t2, pageQueryParam: n2 }) {
3130
+ let { services: r2, totalPages: i2 } = mi(e5), { resolveAbsoluteUrl: a2 } = cs(), { send: o2 } = Ys();
1989
3131
  return (0, import_react.useState)(() => {
1990
- if (mo.has(e2)) return true;
1991
- mo.add(e2);
3132
+ if (ec.has(e5)) return true;
3133
+ ec.add(e5);
1992
3134
  let s2 = { currentPage: t2, totalPages: i2, queryParam: n2 };
1993
- return o2(fo(r2, (e3) => a2(`servicePage`, { slug: e3.mainSlug?.name ?? null, serviceId: e3._id ?? null }), s2)), i2 > 1 && o2(po(s2)), true;
3135
+ return o2(Qs(r2, (e6) => a2(`servicePage`, { slug: e6.mainSlug?.name ?? null, serviceId: e6._id ?? null }), s2)), i2 > 1 && o2($s(s2)), true;
1994
3136
  }), null;
1995
3137
  }
1996
- function go(e2) {
1997
- return F(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/events-3`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }, { srcPath: `/_api/calendar/v3/ro/events`, destPath: `/v3/events` }], "www.wixapis.com": [{ srcPath: `/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], _: [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "*.dev.wix-code.com": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "editor._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "blocks._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "create.editorx": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }] } }));
3138
+ function nc(e5) {
3139
+ return It(Object.assign(e5, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/events-3`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }, { srcPath: `/_api/calendar/v3/ro/events`, destPath: `/v3/events` }], "www.wixapis.com": [{ srcPath: `/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], _: [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "*.dev.wix-code.com": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "editor._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "blocks._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "create.editorx": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }] } }));
1998
3140
  }
1999
- var _o = `@wix/auto_sdk_calendar_events`;
2000
- function vo(e2) {
3141
+ var rc = `@wix/auto_sdk_calendar_events`;
3142
+ function ic(e5) {
2001
3143
  function t2({ host: t3 }) {
2002
- return { entityFqdn: `wix.calendar.v3.event`, method: `POST`, methodFqn: `wix.calendar.events.v3.EventsService.QueryEvents`, packageName: _o, migrationOptions: { optInTransformResponse: true }, url: go({ protoPath: `/v3/events/query`, data: e2, host: t3 }), data: e2, transformResponse: (e3) => N(e3, [{ transformFn: M, paths: [{ path: `events.createdDate` }, { path: `events.updatedDate` }, { path: `events.start.utcDate` }, { path: `events.end.utcDate` }, { path: `events.adjustedStart.utcDate` }, { path: `events.adjustedEnd.utcDate` }, { path: `events.recurrenceRule.until.utcDate` }, { path: `events.recurrenceRule.adjustedUntil.utcDate` }] }]) };
3144
+ return { entityFqdn: `wix.calendar.v3.event`, method: `POST`, methodFqn: `wix.calendar.events.v3.EventsService.QueryEvents`, packageName: rc, migrationOptions: { optInTransformResponse: true }, url: nc({ protoPath: `/v3/events/query`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => N(e6, [{ transformFn: M, paths: [{ path: `events.createdDate` }, { path: `events.updatedDate` }, { path: `events.start.utcDate` }, { path: `events.end.utcDate` }, { path: `events.adjustedStart.utcDate` }, { path: `events.adjustedEnd.utcDate` }, { path: `events.recurrenceRule.until.utcDate` }, { path: `events.recurrenceRule.adjustedUntil.utcDate` }] }]) };
2003
3145
  }
2004
3146
  return t2;
2005
3147
  }
2006
- function yo(e2) {
3148
+ function ac(e5) {
2007
3149
  let { httpClient: t2, sideEffects: n2 } = arguments[1];
2008
- return hi({ func: async (r2) => {
2009
- let i2 = vo({ ...r2, ...e2 ?? {} });
3150
+ return Ja({ func: async (r2) => {
3151
+ let i2 = ic({ ...r2, ...e5 ?? {} });
2010
3152
  n2?.onSiteCall?.();
2011
3153
  try {
2012
- let e3 = await t2.request(i2);
2013
- return n2?.onSuccess?.(e3), e3;
2014
- } catch (e3) {
2015
- throw n2?.onError?.(e3), e3;
3154
+ let e6 = await t2.request(i2);
3155
+ return n2?.onSuccess?.(e6), e6;
3156
+ } catch (e6) {
3157
+ throw n2?.onError?.(e6), e6;
2016
3158
  }
2017
3159
  }, requestTransformer: (t3) => {
2018
- let n3 = [t3, e2];
3160
+ let n3 = [t3, e5];
2019
3161
  return A({ ...n3?.[1], query: n3?.[0] });
2020
- }, responseTransformer: ({ data: e3 }) => {
2021
- let t3 = j(N(e3, []));
3162
+ }, responseTransformer: ({ data: e6 }) => {
3163
+ let t3 = j(N(e6, []));
2022
3164
  return { items: t3?.events, pagingMetadata: t3?.pagingMetadata };
2023
- }, errorTransformer: (e3) => {
2024
- throw P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
3165
+ }, errorTransformer: (e6) => {
3166
+ throw P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
2025
3167
  }, pagingMethod: `CURSOR`, transformationPaths: {} });
2026
3168
  }
2027
- async function bo(e2, t2) {
2028
- let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = vo(A({ query: e2, ...t2 }));
3169
+ async function oc(e5, t2) {
3170
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = ic(A({ query: e5, ...t2 }));
2029
3171
  r2?.onSiteCall?.();
2030
3172
  try {
2031
- let e3 = await n2.request(i2);
2032
- return r2?.onSuccess?.(e3), j(e3.data);
2033
- } catch (e3) {
2034
- let t3 = P(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
2035
- throw r2?.onError?.(e3), t3;
2036
- }
2037
- }
2038
- ({ ...bi() });
2039
- function xo(e2) {
2040
- return (t2) => yo(t2, { httpClient: e2 });
2041
- }
2042
- function So(e2) {
2043
- return (t2, n2) => bo(t2, n2, { httpClient: e2 });
2044
- }
2045
- var Co = g(`wix.calendar.v3.event_cancelled`, true, (e2) => j(N(e2, [{ transformFn: M, paths: [{ path: `data.event.createdDate` }, { path: `data.event.updatedDate` }, { path: `data.event.start.utcDate` }, { path: `data.event.end.utcDate` }, { path: `data.event.adjustedStart.utcDate` }, { path: `data.event.adjustedEnd.utcDate` }, { path: `data.event.recurrenceRule.until.utcDate` }, { path: `data.event.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
2046
- var wo = g(`wix.calendar.v3.event_created`, true, (e2) => j(N(e2, [{ transformFn: M, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
2047
- var To = g(`wix.calendar.v3.event_recurring_split`, true, (e2) => j(N(e2, [{ transformFn: M, paths: [{ path: `data.updatedRecurringEventEndingBeforeSplit.createdDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.updatedDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.start.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.end.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedStart.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedEnd.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.until.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.createdDate` }, { path: `data.newRecurringEventStartingFromSplit.updatedDate` }, { path: `data.newRecurringEventStartingFromSplit.start.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.end.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedStart.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedEnd.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.until.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
2048
- var Eo = g(`wix.calendar.v3.event_updated`, true, (e2) => j(N(e2, [{ transformFn: M, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }, { path: `modifiedFields.start.utcDate` }, { path: `modifiedFields.end.utcDate` }, { path: `modifiedFields.adjustedStart.utcDate` }, { path: `modifiedFields.adjustedEnd.utcDate` }, { path: `modifiedFields.recurrenceRule.until.utcDate` }, { path: `modifiedFields.recurrenceRule.adjustedUntil.utcDate` }] }])))();
2049
- function Do(e2) {
2050
- let t2 = Ai({ builderQueryFunction: (t3) => xo(e2)(t3), typedQueryFunction: (t3, n3) => So(e2)(t3, n3), hasOptionsParameter: true });
2051
- function n2(e3, n3) {
3173
+ let e6 = await n2.request(i2);
3174
+ return r2?.onSuccess?.(e6), j(e6.data);
3175
+ } catch (e6) {
3176
+ let t3 = P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
3177
+ throw r2?.onError?.(e6), t3;
3178
+ }
3179
+ }
3180
+ ({ ...$a() });
3181
+ function sc(e5) {
3182
+ return (t2) => ac(t2, { httpClient: e5 });
3183
+ }
3184
+ function cc(e5) {
3185
+ return (t2, n2) => oc(t2, n2, { httpClient: e5 });
3186
+ }
3187
+ var lc = _(`wix.calendar.v3.event_cancelled`, true, (e5) => j(N(e5, [{ transformFn: M, paths: [{ path: `data.event.createdDate` }, { path: `data.event.updatedDate` }, { path: `data.event.start.utcDate` }, { path: `data.event.end.utcDate` }, { path: `data.event.adjustedStart.utcDate` }, { path: `data.event.adjustedEnd.utcDate` }, { path: `data.event.recurrenceRule.until.utcDate` }, { path: `data.event.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
3188
+ var uc = _(`wix.calendar.v3.event_created`, true, (e5) => j(N(e5, [{ transformFn: M, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
3189
+ var dc = _(`wix.calendar.v3.event_recurring_split`, true, (e5) => j(N(e5, [{ transformFn: M, paths: [{ path: `data.updatedRecurringEventEndingBeforeSplit.createdDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.updatedDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.start.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.end.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedStart.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedEnd.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.until.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.createdDate` }, { path: `data.newRecurringEventStartingFromSplit.updatedDate` }, { path: `data.newRecurringEventStartingFromSplit.start.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.end.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedStart.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedEnd.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.until.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
3190
+ var fc = _(`wix.calendar.v3.event_updated`, true, (e5) => j(N(e5, [{ transformFn: M, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }, { path: `modifiedFields.start.utcDate` }, { path: `modifiedFields.end.utcDate` }, { path: `modifiedFields.adjustedStart.utcDate` }, { path: `modifiedFields.adjustedEnd.utcDate` }, { path: `modifiedFields.recurrenceRule.until.utcDate` }, { path: `modifiedFields.recurrenceRule.adjustedUntil.utcDate` }] }])))();
3191
+ function pc(e5) {
3192
+ let t2 = lo({ builderQueryFunction: (t3) => sc(e5)(t3), typedQueryFunction: (t3, n3) => cc(e5)(t3, n3), hasOptionsParameter: true });
3193
+ function n2(e6, n3) {
2052
3194
  return t2(...arguments);
2053
3195
  }
2054
3196
  return n2;
2055
3197
  }
2056
- var Oo = Pt(Do);
2057
- I(Co), I(wo), I(To), I(Eo);
2058
- var ko = (e2) => {
2059
- let t2 = (e3) => e3 < 10 ? `0${e3}` : `${e3}`;
2060
- return `${e2.getFullYear()}-${t2(e2.getMonth() + 1)}-${t2(e2.getDate())}`;
3198
+ var mc = Pt(pc);
3199
+ ln(lc), ln(uc), ln(dc), ln(fc);
3200
+ var hc = (e5) => {
3201
+ let t2 = (e6) => e6 < 10 ? `0${e6}` : `${e6}`;
3202
+ return `${e5.getFullYear()}-${t2(e5.getMonth() + 1)}-${t2(e5.getDate())}`;
2061
3203
  };
2062
- var Ao = (e2) => `${ko(e2)}T00:00:00`;
2063
- var jo = 1e3;
2064
- async function Mo(e2, t2) {
3204
+ var gc = (e5) => `${hc(e5)}T00:00:00`;
3205
+ var _c = 1e3;
3206
+ async function vc(e5, t2) {
2065
3207
  let n2 = [], r2;
2066
3208
  do {
2067
- let i2 = await Oo({ filter: e2, cursorPaging: { limit: jo, ...r2 ? { cursor: r2 } : {} } }, t2);
3209
+ let i2 = await mc({ filter: e5, cursorPaging: { limit: _c, ...r2 ? { cursor: r2 } : {} } }, t2);
2068
3210
  n2.push(...i2.events ?? []), r2 = i2.pagingMetadata?.hasNext ? i2.pagingMetadata.cursors?.next ?? void 0 : void 0;
2069
3211
  } while (r2);
2070
3212
  return n2;
2071
3213
  }
2072
- async function No(e2, t2) {
2073
- return e2.length === 0 ? [] : Mo({ appId: tr, scheduleId: { $in: e2 } }, { recurrenceType: [`MASTER`, `NONE`], fromLocalDate: Ao(/* @__PURE__ */ new Date()), ...t2 ? { timeZone: t2 } : {} });
3214
+ async function yc(e5, t2) {
3215
+ return e5.length === 0 ? [] : vc({ appId: Ni, scheduleId: { $in: e5 } }, { recurrenceType: [`MASTER`, `NONE`], fromLocalDate: gc(/* @__PURE__ */ new Date()), ...t2 ? { timeZone: t2 } : {} });
2074
3216
  }
2075
- function Po(e2) {
3217
+ function bc(e5) {
2076
3218
  let t2 = {};
2077
- for (let n2 of e2) n2.scheduleId && (t2[n2.scheduleId] ??= []).push(n2);
3219
+ for (let n2 of e5) n2.scheduleId && (t2[n2.scheduleId] ??= []).push(n2);
2078
3220
  return t2;
2079
3221
  }
2080
- var Fo = { displayTimeZonePolicy: { basedOn: da.BUSINESS_TIME_ZONE, customerCanChange: false }, multiServiceAppointmentsEnabled: false };
2081
- async function Io() {
3222
+ var xc = { displayTimeZonePolicy: { basedOn: Go.BUSINESS_TIME_ZONE, customerCanChange: false }, multiServiceAppointmentsEnabled: false };
3223
+ async function Sc() {
2082
3224
  try {
2083
- let e2 = await ma();
2084
- return { displayTimeZonePolicy: { basedOn: e2.displayTimeZone?.basedOn ?? da.BUSINESS_TIME_ZONE, customerCanChange: e2.displayTimeZone?.customerCanChange ?? false }, multiServiceAppointmentsEnabled: e2.multiServiceAppointments?.enabled ?? false };
2085
- } catch (e2) {
2086
- return B(e2, { feature: z.bookingsSettings, action: `fetch-bookings-settings`, level: `warning` }), Fo;
3225
+ let e5 = await Jo();
3226
+ return { displayTimeZonePolicy: { basedOn: e5.displayTimeZone?.basedOn ?? Go.BUSINESS_TIME_ZONE, customerCanChange: e5.displayTimeZone?.customerCanChange ?? false }, multiServiceAppointmentsEnabled: e5.multiServiceAppointments?.enabled ?? false };
3227
+ } catch (e5) {
3228
+ return H(e5, { feature: V.bookingsSettings, action: `fetch-bookings-settings`, level: `warning` }), xc;
2087
3229
  }
2088
3230
  }
2089
3231
  (0, import_react.createContext)(null);
2090
- function Lo(e2) {
2091
- return e2.basedOn === da.CUSTOMER_TIME_ZONE ? Intl.DateTimeFormat().resolvedOptions().timeZone : void 0;
3232
+ function Cc(e5) {
3233
+ return e5.basedOn === Go.CUSTOMER_TIME_ZONE ? Intl.DateTimeFormat().resolvedOptions().timeZone : void 0;
2092
3234
  }
2093
- function Ro({ categoryId: e2, locationId: t2, serviceItems: n2, isLoading: r2, hasError: i2, children: a2 }) {
2094
- let o2 = { serviceItems: n2, bookingsSettings: null, hasMore: false, isLoading: r2, hasError: i2, categoryId: e2, locationId: t2, loadMore: async () => {
3235
+ function wc({ categoryId: e5, locationId: t2, serviceItems: n2, isLoading: r2, hasError: i2, children: a2 }) {
3236
+ let o2 = { serviceItems: n2, bookingsSettings: null, hasMore: false, isLoading: r2, hasError: i2, categoryId: e5, locationId: t2, loadMore: async () => {
2095
3237
  } };
2096
- return (0, import_jsx_runtime.jsx)(Qo.Provider, { value: o2, children: a2 });
2097
- }
2098
- function zo({ categoryId: e2, locationId: t2, children: n2 }) {
2099
- return (0, import_jsx_runtime.jsx)(Ro, { categoryId: e2, locationId: t2, serviceItems: [], isLoading: true, hasError: false, children: n2 });
2100
- }
2101
- function Bo({ categoryId: e2, locationId: t2, children: n2 }) {
2102
- return (0, import_jsx_runtime.jsx)(Ro, { categoryId: e2, locationId: t2, serviceItems: [], isLoading: false, hasError: true, children: n2 });
2103
- }
2104
- function Vo(e2) {
2105
- let t2 = e2?.$in ?? (e2?.$eq == null ? [] : [e2.$eq]);
2106
- return [...new Set(t2.filter((e3) => typeof e3 == `string` && e3 !== ``))].sort().join(`,`);
2107
- }
2108
- function $(e2) {
2109
- return e2 ? e2.split(`,`) : null;
2110
- }
2111
- var Ho = 20;
2112
- var Uo = 100;
2113
- var Wo = [];
2114
- var Go = [];
2115
- var Ko = {};
2116
- var qo = {};
2117
- function Jo(e2, t2) {
2118
- return Object.keys(t2).length === 0 ? e2 : { ...e2, ...t2 };
2119
- }
2120
- function Yo(e2, t2, n2, r2) {
2121
- let i2 = [...new Set(e2.filter((e3) => !ha(e3.type)).map((e3) => e3.schedule?._id).filter((e3) => !!e3))], a2 = e2.filter(ga).map((e3) => e3._id).filter((e3) => !!e3);
2122
- return Promise.all([i2.length === 0 ? Ko : No(i2, t2).then(Po).catch(() => Ko), a2.length === 0 ? qo : Ka({ key: Pa(a2, n2), warmupData: r2, fetchData: () => Ja(a2) }).catch((e3) => (B(e3, { feature: z.services, action: `fetch-service-variants`, level: `warning` }), null))]);
2123
- }
2124
- var Xo = { services: [], hasMore: false, totalPages: 1, hasError: true };
2125
- function Zo(e2) {
2126
- let t2 = Math.floor(Number(e2));
2127
- return !e2 || !Number.isSafeInteger(t2) || t2 < 1 ? 1 : t2;
2128
- }
2129
- var Qo = (0, import_react.createContext)(null);
2130
- var $o = `useServicesContext must be used within ServicesContextProvider`;
2131
- function es() {
2132
- let e2 = (0, import_react.useContext)(Qo);
2133
- if (!e2) throw Error($o);
2134
- return e2;
2135
- }
2136
- function ts(e2, t2) {
2137
- return { firstPage: e2, services: e2.services, hasMore: e2.hasMore, isLoadingMore: false, cursor: { offset: (t2.paginationIndex - 1) * t2.safeLimit + e2.services.length, hasMore: e2.hasMore, pending: null, dropped: false } };
2138
- }
2139
- function ns({ query: e2, isQueryPending: t2, settingsPromise: n2, categoryId: a2, locationId: o2, children: d2 }) {
2140
- let { firstPagePromise: f2, safeLimit: p2, serviceIdsKey: ee2, categoryIdsKey: h2, refreshSignal: g2 } = e2, _2 = In(f2), v2 = In(n2), [y2, b2] = (0, import_react.useState)(() => ts(_2, e2)), [te2, x2] = (0, import_react.useState)({}), [S2, C2] = (0, import_react.useState)({});
2141
- y2.firstPage !== _2 && (b2(ts(_2, e2)), x2({}), C2({}));
2142
- let { cursor: w2 } = y2;
2143
- (0, import_react.useEffect)(() => (w2.dropped = false, () => {
2144
- w2.dropped = true;
2145
- }), [w2]);
2146
- let T2 = Lo(v2.displayTimeZonePolicy), E2 = io(eo.SERVICES), { getParsedUrl: ne2 } = Xn(), re2 = (0, import_react.useRef)(null), ie2 = ja(), D2 = (0, import_react.useRef)(ie2);
2147
- D2.current = ie2, (0, import_react.useEffect)(() => {
2148
- re2.current !== _2 && (re2.current = _2, E2($a({ referralInfo: ne2().searchParams.get(Q.referral) ?? void 0 })), E2(ao({ numOfServices: _2.services.length })));
2149
- }, [E2, ne2, _2]), (0, import_react.useEffect)(() => {
2150
- let e3 = false;
2151
- return Yo(_2.services, T2, g2, D2.current).then(([t3, n3]) => {
2152
- e3 || (0, import_react.startTransition)(() => {
2153
- x2((e4) => Jo(e4, t3)), n3 && C2((e4) => Jo(e4, n3));
3238
+ return (0, import_jsx_runtime.jsx)(Rc.Provider, { value: o2, children: a2 });
3239
+ }
3240
+ function Tc({ categoryId: e5, locationId: t2, children: n2 }) {
3241
+ return (0, import_jsx_runtime.jsx)(wc, { categoryId: e5, locationId: t2, serviceItems: [], isLoading: true, hasError: false, children: n2 });
3242
+ }
3243
+ function Ec({ categoryId: e5, locationId: t2, children: n2 }) {
3244
+ return (0, import_jsx_runtime.jsx)(wc, { categoryId: e5, locationId: t2, serviceItems: [], isLoading: false, hasError: true, children: n2 });
3245
+ }
3246
+ function Dc(e5) {
3247
+ let t2 = e5?.$in ?? (e5?.$eq == null ? [] : [e5.$eq]);
3248
+ return [...new Set(t2.filter((e6) => typeof e6 == `string` && e6 !== ``))].sort().join(`,`);
3249
+ }
3250
+ function $(e5) {
3251
+ return e5 ? e5.split(`,`) : null;
3252
+ }
3253
+ var Oc = 20;
3254
+ var kc = 100;
3255
+ var Ac = [];
3256
+ var jc = [];
3257
+ var Mc = {};
3258
+ var Nc = {};
3259
+ function Pc(e5, t2) {
3260
+ return Object.keys(t2).length === 0 ? e5 : { ...e5, ...t2 };
3261
+ }
3262
+ function Fc(e5, t2, n2, r2, i2) {
3263
+ let a2 = [...new Set(e5.filter((e6) => !Yo(e6.type)).map((e6) => e6.schedule?._id).filter((e6) => !!e6))], o2 = e5.filter(Xo).map((e6) => e6._id).filter((e6) => !!e6);
3264
+ return Promise.all([a2.length === 0 ? Mc : yc(a2, t2).then(bc).catch(() => Mc), o2.length === 0 ? Nc : Ns({ key: xs(r2, o2, n2), warmupData: i2, fetchData: () => Fs(o2) }).catch((e6) => (H(e6, { feature: V.services, action: `fetch-service-variants`, level: `warning` }), null))]);
3265
+ }
3266
+ var Ic = { services: [], hasMore: false, totalPages: 1, hasError: true };
3267
+ function Lc(e5) {
3268
+ let t2 = Math.floor(Number(e5));
3269
+ return !e5 || !Number.isSafeInteger(t2) || t2 < 1 ? 1 : t2;
3270
+ }
3271
+ var Rc = (0, import_react.createContext)(null);
3272
+ var zc = `useServicesContext must be used within ServicesContextProvider`;
3273
+ function Bc() {
3274
+ let e5 = (0, import_react.useContext)(Rc);
3275
+ if (!e5) throw Error(zc);
3276
+ return e5;
3277
+ }
3278
+ function Vc(e5, t2) {
3279
+ return { firstPage: e5, services: e5.services, hasMore: e5.hasMore, isLoadingMore: false, cursor: { offset: (t2.paginationIndex - 1) * t2.safeLimit + e5.services.length, hasMore: e5.hasMore, pending: null, dropped: false } };
3280
+ }
3281
+ function Hc({ query: e5, isQueryPending: t2, settingsPromise: n2, categoryId: a2, locationId: o2, children: d2 }) {
3282
+ let { firstPagePromise: f2, safeLimit: p2, serviceIdsKey: h2, categoryIdsKey: g2, refreshSignal: _2, language: v2 } = e5, y2 = mi(f2), b2 = mi(n2), [x2, S2] = (0, import_react.useState)(() => Vc(y2, e5)), [ee2, C2] = (0, import_react.useState)({}), [w2, T2] = (0, import_react.useState)({});
3283
+ x2.firstPage !== y2 && (S2(Vc(y2, e5)), C2({}), T2({}));
3284
+ let { cursor: E2 } = x2;
3285
+ (0, import_react.useEffect)(() => (E2.dropped = false, () => {
3286
+ E2.dropped = true;
3287
+ }), [E2]);
3288
+ let D2 = Cc(b2.displayTimeZonePolicy), O2 = Gs(Vs.SERVICES), { getParsedUrl: te2 } = Oi(), ne2 = (0, import_react.useRef)(null), re2 = fs(), ie2 = (0, import_react.useRef)(re2);
3289
+ ie2.current = re2, (0, import_react.useEffect)(() => {
3290
+ ne2.current !== y2 && (ne2.current = y2, O2(Bs({ referralInfo: te2().searchParams.get(es.referral) ?? void 0 })), O2(Ks({ numOfServices: y2.services.length })));
3291
+ }, [O2, te2, y2]), (0, import_react.useEffect)(() => {
3292
+ let e6 = false;
3293
+ return Fc(y2.services, D2, _2, v2, ie2.current).then(([t3, n3]) => {
3294
+ e6 || (0, import_react.startTransition)(() => {
3295
+ C2((e7) => Pc(e7, t3)), n3 && T2((e7) => Pc(e7, n3));
2154
3296
  });
2155
3297
  }), () => {
2156
- e3 = true;
3298
+ e6 = true;
2157
3299
  };
2158
- }, [_2.services, T2, g2]);
3300
+ }, [y2.services, D2, _2, v2]);
2159
3301
  let ae2 = (0, import_react.useCallback)(async () => {
2160
- if (E2(Qa({ pageName: to, buttonName: ro })), w2.pending) return w2.pending;
2161
- if (!w2.hasMore) return;
2162
- let t3 = (e3) => b2((t4) => t4.cursor === w2 ? e3(t4) : t4);
2163
- return t3((e3) => ({ ...e3, isLoadingMore: true })), w2.pending = ya({ limit: p2, offset: w2.offset, categoryId: e2.categoryId, locationId: e2.locationId, serviceIds: $(ee2), categoryIds: $(h2) }).then((e3) => {
2164
- w2.dropped || (w2.hasMore = e3.hasMore, w2.offset += e3.services.length, t3((t4) => ({ ...t4, services: [...t4.services, ...e3.services], hasMore: e3.hasMore })), Yo(e3.services, T2, g2, D2.current).then(([e4, t4]) => {
2165
- w2.dropped || (0, import_react.startTransition)(() => {
2166
- x2((t5) => Jo(t5, e4)), t4 && C2((e5) => Jo(e5, t4));
3302
+ if (O2(zs({ pageName: Hs, buttonName: Ws })), E2.pending) return E2.pending;
3303
+ if (!E2.hasMore) return;
3304
+ let t3 = (e6) => S2((t4) => t4.cursor === E2 ? e6(t4) : t4);
3305
+ return t3((e6) => ({ ...e6, isLoadingMore: true })), E2.pending = $o({ limit: p2, offset: E2.offset, categoryId: e5.categoryId, locationId: e5.locationId, serviceIds: $(h2), categoryIds: $(g2) }).then((e6) => {
3306
+ E2.dropped || (E2.hasMore = e6.hasMore, E2.offset += e6.services.length, t3((t4) => ({ ...t4, services: [...t4.services, ...e6.services], hasMore: e6.hasMore })), Fc(e6.services, D2, _2, v2, ie2.current).then(([e7, t4]) => {
3307
+ E2.dropped || (0, import_react.startTransition)(() => {
3308
+ C2((t5) => Pc(t5, e7)), t4 && T2((e8) => Pc(e8, t4));
2167
3309
  });
2168
3310
  }));
2169
3311
  }).catch(() => {
2170
3312
  }).finally(() => {
2171
- w2.pending = null, t3((e3) => ({ ...e3, isLoadingMore: false }));
2172
- }), w2.pending;
2173
- }, [w2, p2, e2.categoryId, e2.locationId, ee2, h2, E2, T2, g2]), { resolvePath: O2, toHref: oe2 } = Da(), se2 = (0, import_react.useMemo)(() => y2.services.map((e3) => {
2174
- let t3 = O2(`servicePage`, { slug: e3.mainSlug?.name ?? null, serviceId: e3._id ?? null });
2175
- return { serviceId: e3._id ?? null, refreshSignal: g2, service: e3, masterEvents: te2[e3.schedule?._id ?? ``] ?? Wo, serviceOptionsAndVariants: S2[e3._id ?? ``] ?? null, bookingsSettings: v2, servicePageLink: t3 ? { href: oe2(t3), target: `_self` } : null };
2176
- }), [O2, oe2, y2.services, g2, te2, S2, v2]), ce2 = (0, import_react.useMemo)(() => ({ serviceItems: t2 ? Go : se2, bookingsSettings: v2, hasMore: !t2 && y2.hasMore, isLoading: t2 || y2.isLoadingMore, hasError: !t2 && _2.hasError, categoryId: a2, locationId: o2, loadMore: ae2 }), [t2, se2, v2, y2.hasMore, y2.isLoadingMore, _2.hasError, a2, o2, ae2]);
2177
- return (0, import_jsx_runtime.jsx)(Qo.Provider, { value: ce2, children: d2 });
2178
- }
2179
- var rs = (e2) => ({ ...e2, hasError: false });
2180
- var is = () => ({ ...Xo });
2181
- function as({ categoryData: e2, limit: n2 = Ho, servicesPicker: r2, categoriesPicker: i2, refreshSignal: a2 = 0, children: s2 }) {
2182
- let l2 = Math.min(n2 ?? Ho, Uo), { searchParams: d2 } = Xn(), f2 = e2?.categoryId, p2 = !!f2, h2 = f2 || d2.get(Q.category), g2 = d2.get(Q.location), _2 = p2 ? 1 : Zo(d2.get(Q.page)), v2 = Vo(r2?.serviceId), y2 = Vo(i2?.categoryId), b2 = ja(), { isSSR: te2 } = Xa(), [x2] = (0, import_react.useState)(() => te2()), S2 = (0, import_react.useMemo)(() => ({ firstPagePromise: zn(Ka({ key: Na(h2, g2, _2, l2, $(v2) ?? [], $(y2) ?? []), refresh: a2 !== 0, warmupData: b2, fetchData: () => Pn(`services-context-load`, { feature: z.services }, ya({ limit: l2, offset: (_2 - 1) * l2, categoryId: h2, locationId: g2, serviceIds: $(v2), categoryIds: $(y2) })) }), rs, is), safeLimit: l2, paginationIndex: _2, categoryId: h2, locationId: g2, serviceIdsKey: v2, categoryIdsKey: y2, refreshSignal: a2 }), [l2, h2, g2, _2, a2, v2, y2]), [C2] = (0, import_react.useState)(() => Ka({ key: Fa(), warmupData: b2, fetchData: Io })), w2 = (0, import_react.useDeferredValue)(S2);
2183
- return (0, import_jsx_runtime.jsx)(Fn, { fallback: (0, import_jsx_runtime.jsx)(Bo, { categoryId: h2, locationId: g2, children: s2 }), feature: z.services, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(zo, { categoryId: h2, locationId: g2, children: s2 }), children: [x2 && !p2 && (0, import_jsx_runtime.jsx)(ho, { servicesPromise: S2.firstPagePromise, currentPage: _2, pageQueryParam: Q.page }), (0, import_jsx_runtime.jsx)(ns, { query: w2, isQueryPending: w2 !== S2, settingsPromise: C2, categoryId: h2, locationId: g2, children: s2 })] }) });
2184
- }
2185
- var os = Cn(`117fa14c-cf9c-47f5-b2cb-7797094612ce`);
3313
+ E2.pending = null, t3((e6) => ({ ...e6, isLoadingMore: false }));
3314
+ }), E2.pending;
3315
+ }, [E2, p2, e5.categoryId, e5.locationId, h2, g2, O2, D2, _2, v2]), { resolvePath: oe2, toHref: se2 } = cs(), ce2 = (0, import_react.useMemo)(() => x2.services.map((e6) => {
3316
+ let t3 = oe2(`servicePage`, { slug: e6.mainSlug?.name ?? null, serviceId: e6._id ?? null });
3317
+ return { serviceId: e6._id ?? null, refreshSignal: _2, service: e6, masterEvents: ee2[e6.schedule?._id ?? ``] ?? Ac, serviceOptionsAndVariants: w2[e6._id ?? ``] ?? null, bookingsSettings: b2, servicePageLink: t3 ? { href: se2(t3), target: `_self` } : null };
3318
+ }), [oe2, se2, x2.services, _2, ee2, w2, b2]), le2 = (0, import_react.useMemo)(() => ({ serviceItems: t2 ? jc : ce2, bookingsSettings: b2, hasMore: !t2 && x2.hasMore, isLoading: t2 || x2.isLoadingMore, hasError: !t2 && y2.hasError, categoryId: a2, locationId: o2, loadMore: ae2 }), [t2, ce2, b2, x2.hasMore, x2.isLoadingMore, y2.hasError, a2, o2, ae2]);
3319
+ return (0, import_jsx_runtime.jsx)(Rc.Provider, { value: le2, children: d2 });
3320
+ }
3321
+ var Uc = (e5) => ({ ...e5, hasError: false });
3322
+ var Wc = () => ({ ...Ic });
3323
+ function Gc({ categoryData: e5, limit: n2 = Oc, servicesPicker: r2, categoriesPicker: i2, refreshSignal: a2 = 0, children: s2 }) {
3324
+ let l2 = Math.min(n2 ?? Oc, kc), { searchParams: d2 } = Oi(), f2 = e5?.categoryId, p2 = !!f2, g2 = f2 || d2.get(es.category), _2 = d2.get(es.location), v2 = p2 ? 1 : Lc(d2.get(es.page)), y2 = Dc(r2?.serviceId), b2 = Dc(i2?.categoryId), x2 = fs(), S2 = vs(), { isSSR: ee2 } = Ls(), [C2] = (0, import_react.useState)(() => ee2()), w2 = (0, import_react.useMemo)(() => ({ firstPagePromise: _i(Ns({ key: bs(S2, g2, _2, v2, l2, $(y2) ?? [], $(b2) ?? []), refresh: a2 !== 0, warmupData: x2, fetchData: () => fi(`services-context-load`, { feature: V.services }, $o({ limit: l2, offset: (v2 - 1) * l2, categoryId: g2, locationId: _2, serviceIds: $(y2), categoryIds: $(b2) })) }), Uc, Wc), safeLimit: l2, paginationIndex: v2, categoryId: g2, locationId: _2, serviceIdsKey: y2, categoryIdsKey: b2, refreshSignal: a2, language: S2 }), [l2, g2, _2, v2, a2, y2, b2, S2]), [T2] = (0, import_react.useState)(() => Ns({ key: Ss(), warmupData: x2, fetchData: Sc })), E2 = (0, import_react.useDeferredValue)(w2);
3325
+ return (0, import_jsx_runtime.jsx)(pi, { fallback: (0, import_jsx_runtime.jsx)(Ec, { categoryId: g2, locationId: _2, children: s2 }), feature: V.services, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Tc, { categoryId: g2, locationId: _2, children: s2 }), children: [C2 && !p2 && (0, import_jsx_runtime.jsx)(tc, { servicesPromise: w2.firstPagePromise, currentPage: v2, pageQueryParam: es.page }), (0, import_jsx_runtime.jsx)(Hc, { query: E2, isQueryPending: E2 !== w2, settingsPromise: T2, categoryId: g2, locationId: _2, children: s2 })] }) });
3326
+ }
3327
+ var Kc = zn(`117fa14c-cf9c-47f5-b2cb-7797094612ce`);
2186
3328
  // Annotate the CommonJS export names for ESM import in node:
2187
3329
  0 && (module.exports = {
2188
3330
  SERVICES_CONTEXT_MISSING_PROVIDER_ERROR,