@wix/bookings 1.0.1755 → 1.0.1757

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/_sdk-exports/context-booking-checkout/runtime.d.ts +42 -1
  2. package/_sdk-exports/context-booking-checkout/runtime.js +3 -2
  3. package/_sdk-exports/context-categories/runtime.d.ts +1 -1
  4. package/_sdk-exports/context-categories/runtime.js +2 -1
  5. package/_sdk-exports/context-locations/runtime.d.ts +1 -1
  6. package/_sdk-exports/context-locations/runtime.js +2 -1
  7. package/_sdk-exports/context-service/runtime.d.ts +42 -1
  8. package/_sdk-exports/context-service/runtime.js +3 -2
  9. package/_sdk-exports/context-service-addons/runtime.d.ts +1 -1
  10. package/_sdk-exports/context-service-addons/runtime.js +2 -1
  11. package/_sdk-exports/context-services/runtime.d.ts +42 -1
  12. package/_sdk-exports/context-services/runtime.js +3 -2
  13. package/_sdk-exports/context-time-slots/runtime.d.ts +22 -9
  14. package/_sdk-exports/context-time-slots/runtime.js +3 -2
  15. package/build/cjs/context-booking-checkout.d.ts +42 -1
  16. package/build/cjs/context-booking-checkout.js +1346 -1344
  17. package/build/cjs/context-booking-checkout.js.map +1 -1
  18. package/build/cjs/context-categories.d.ts +1 -1
  19. package/build/cjs/context-categories.js +116 -114
  20. package/build/cjs/context-categories.js.map +1 -1
  21. package/build/cjs/context-locations.d.ts +1 -1
  22. package/build/cjs/context-locations.js +126 -124
  23. package/build/cjs/context-locations.js.map +1 -1
  24. package/build/cjs/context-service-addons.d.ts +1 -1
  25. package/build/cjs/context-service-addons.js +323 -321
  26. package/build/cjs/context-service-addons.js.map +1 -1
  27. package/build/cjs/context-service.d.ts +42 -1
  28. package/build/cjs/context-service.js +1517 -1515
  29. package/build/cjs/context-service.js.map +1 -1
  30. package/build/cjs/context-services.d.ts +42 -1
  31. package/build/cjs/context-services.js +460 -458
  32. package/build/cjs/context-services.js.map +1 -1
  33. package/build/cjs/context-time-slots.d.ts +22 -9
  34. package/build/cjs/context-time-slots.js +1033 -1000
  35. package/build/cjs/context-time-slots.js.map +1 -1
  36. package/build/es/context-booking-checkout.d.mts +42 -1
  37. package/build/es/context-booking-checkout.mjs +1346 -1344
  38. package/build/es/context-booking-checkout.mjs.map +1 -1
  39. package/build/es/context-categories.d.mts +1 -1
  40. package/build/es/context-categories.mjs +116 -114
  41. package/build/es/context-categories.mjs.map +1 -1
  42. package/build/es/context-locations.d.mts +1 -1
  43. package/build/es/context-locations.mjs +126 -124
  44. package/build/es/context-locations.mjs.map +1 -1
  45. package/build/es/context-service-addons.d.mts +1 -1
  46. package/build/es/context-service-addons.mjs +323 -321
  47. package/build/es/context-service-addons.mjs.map +1 -1
  48. package/build/es/context-service.d.mts +42 -1
  49. package/build/es/context-service.mjs +1517 -1515
  50. package/build/es/context-service.mjs.map +1 -1
  51. package/build/es/context-services.d.mts +42 -1
  52. package/build/es/context-services.mjs +460 -458
  53. package/build/es/context-services.mjs.map +1 -1
  54. package/build/es/context-time-slots.d.mts +22 -9
  55. package/build/es/context-time-slots.mjs +1033 -1000
  56. package/build/es/context-time-slots.mjs.map +1 -1
  57. package/build/internal/cjs/context-booking-checkout.d.ts +42 -1
  58. package/build/internal/cjs/context-categories.d.ts +1 -1
  59. package/build/internal/cjs/context-locations.d.ts +1 -1
  60. package/build/internal/cjs/context-service-addons.d.ts +1 -1
  61. package/build/internal/cjs/context-service.d.ts +42 -1
  62. package/build/internal/cjs/context-services.d.ts +42 -1
  63. package/build/internal/cjs/context-time-slots.d.ts +22 -9
  64. package/build/internal/es/context-booking-checkout.d.mts +42 -1
  65. package/build/internal/es/context-categories.d.mts +1 -1
  66. package/build/internal/es/context-locations.d.mts +1 -1
  67. package/build/internal/es/context-service-addons.d.mts +1 -1
  68. package/build/internal/es/context-service.d.mts +42 -1
  69. package/build/internal/es/context-services.d.mts +42 -1
  70. package/build/internal/es/context-time-slots.d.mts +22 -9
  71. package/package.json +2 -2
@@ -106,50 +106,50 @@ function M(e2) {
106
106
  return t2.slice(n2, r2).split(/\0/g);
107
107
  }
108
108
  var ae = (e2) => `validationError` in (e2.response?.data?.details ?? {});
109
- var N = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
110
- var oe = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
111
- function P(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
109
+ var oe = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
110
+ var se = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
111
+ function N(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
112
112
  if (typeof e2 != `object` || !e2) throw e2;
113
- if (ae(e2)) return se(e2, t2, n2);
114
- if (N(e2)) return le(e2);
115
- if (oe(e2)) {
113
+ if (ae(e2)) return ce(e2, t2, n2);
114
+ if (oe(e2)) return ue(e2);
115
+ if (se(e2)) {
116
116
  let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: A(n3), data: {} }, requestId: e2.requestId };
117
- return ce(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
117
+ return le(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
118
118
  }
119
- return ue(e2);
119
+ return de(e2);
120
120
  }
121
- var se = (e2, t2, n2) => {
122
- let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = de(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 };
123
- return ce(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
121
+ var ce = (e2, t2, n2) => {
122
+ let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = fe(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 };
123
+ return le(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
124
124
  };
125
- var ce = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
126
- var le = (e2) => {
125
+ var le = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
126
+ var ue = (e2) => {
127
127
  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 ?? A(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 };
128
- return ce(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
128
+ return le(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
129
129
  };
130
- var ue = (e2) => ce(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: A(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
131
- var de = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
130
+ var de = (e2) => le(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: A(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
131
+ var fe = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
132
132
  let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
133
133
  return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
134
134
  let r3 = t2[e3.field];
135
- if (r3) return { ...e3, field: fe(r3, i2) };
135
+ if (r3) return { ...e3, field: pe(r3, i2) };
136
136
  let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
137
137
  if (s2) {
138
138
  let t3 = a2[s2];
139
- if (t3) return { ...e3, field: e3.field.replace(s2, fe(t3, i2)) };
139
+ if (t3) return { ...e3, field: e3.field.replace(s2, pe(t3, i2)) };
140
140
  }
141
141
  return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
142
142
  });
143
143
  };
144
- var fe = (e2, t2) => {
145
- let n2 = F(e2);
144
+ var pe = (e2, t2) => {
145
+ let n2 = P(e2);
146
146
  return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
147
147
  };
148
- var F = (e2) => {
148
+ var P = (e2) => {
149
149
  let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
150
150
  return t2 && t2.groups && Number(t2.groups.argIndex);
151
151
  };
152
- function pe(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
152
+ function me(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
153
153
  return te(() => e2({ request: async (e3) => {
154
154
  let i3 = e3({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
155
155
  a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
@@ -163,7 +163,7 @@ function pe(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
163
163
  e5 = await s3.json();
164
164
  } catch {
165
165
  }
166
- let t3 = he(s3.status, e5?.message ?? s3.statusText, e5?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e5 }), n3 = P(t3);
166
+ let t3 = F(s3.status, e5?.message ?? s3.statusText, e5?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e5 }), n3 = N(t3);
167
167
  throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
168
168
  }
169
169
  let l3 = await s3.json();
@@ -173,14 +173,14 @@ function pe(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
173
173
  }
174
174
  }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
175
175
  }
176
- var me = class extends Error {
176
+ var he = class extends Error {
177
177
  response;
178
178
  requestId;
179
179
  constructor(e2) {
180
180
  super(), this.response = e2.response, this.requestId = e2.requestId;
181
181
  }
182
182
  };
183
- var he = (e2, t2, n2, r2) => new me({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2 }, status: e2 }, requestId: r2?.requestId });
183
+ var F = (e2, t2, n2, r2) => new he({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2 }, status: e2 }, requestId: r2?.requestId });
184
184
  var I = `.`;
185
185
  function ge(e2, t2, n2) {
186
186
  if (e2 == null) throw Error(`Cannot set value on null or undefined`);
@@ -455,7 +455,7 @@ function Ne(e2) {
455
455
  if (typeof t3 == `function`) {
456
456
  if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
457
457
  let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e2.useCDN === void 0 ? i2().shouldUseCDN : e2.useCDN;
458
- return pe(te(() => v(t3)) ? _(t3) : t3, n3 ?? {}, f2, e2.host?.getErrorHandler?.(), (e3, t4) => {
458
+ return me(te(() => v(t3)) ? _(t3) : t3, n3 ?? {}, f2, e2.host?.getErrorHandler?.(), (e3, t4) => {
459
459
  let n4 = new URL(e3, `https://${r3}`);
460
460
  return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
461
461
  }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e2.host?.name, o3, e2.validateRequestSchema);
@@ -573,75 +573,75 @@ function $e(e2, t2, n2) {
573
573
  function et(e2, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
574
574
  t2 && Qe(e2, t2, i2), n2 && $e(e2, n2, i2), r2 && Object.values(e2).forEach((e3) => Ze(e3, r2, i2));
575
575
  }
576
- function tt(e2, t2) {
576
+ function B(e2, t2) {
577
577
  if (!Ye(e2)) return e2;
578
578
  for (let { paths: n2, transformFn: r2 } of t2) et(e2, z(n2), r2);
579
579
  return e2;
580
580
  }
581
- function nt(e2) {
582
- return st(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
581
+ function tt(e2) {
582
+ return ot(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
583
583
  }
584
- var rt = /([\p{Ll}\d])(\p{Lu})/gu;
585
- var it = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
586
- var at = `$1\0$2`;
587
- var ot = /[^\p{L}\d]+/giu;
588
- function st(e2) {
584
+ var nt = /([\p{Ll}\d])(\p{Lu})/gu;
585
+ var rt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
586
+ var it = `$1\0$2`;
587
+ var at = /[^\p{L}\d]+/giu;
588
+ function ot(e2) {
589
589
  let t2 = e2.trim();
590
- t2 = t2.replace(rt, at).replace(it, at), t2 = t2.replace(ot, `\0`);
590
+ t2 = t2.replace(nt, it).replace(rt, it), t2 = t2.replace(at, `\0`);
591
591
  let n2 = 0, r2 = t2.length;
592
592
  for (; t2.charAt(n2) === `\0`; ) n2++;
593
593
  if (n2 === r2) return [];
594
594
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
595
595
  return t2.slice(n2, r2).split(/\0/g);
596
596
  }
597
- var ct = (e2) => `validationError` in (e2.response?.data?.details ?? {});
598
- var lt = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
599
- var ut = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
600
- function dt(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
597
+ var st = (e2) => `validationError` in (e2.response?.data?.details ?? {});
598
+ var V = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
599
+ var ct = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
600
+ function lt(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
601
601
  if (typeof e2 != `object` || !e2) throw e2;
602
- if (ct(e2)) return ft(e2, t2, n2);
603
- if (lt(e2)) return mt(e2);
604
- if (ut(e2)) {
605
- let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: nt(n3), data: {} }, requestId: e2.requestId };
606
- return pt(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
602
+ if (st(e2)) return ut(e2, t2, n2);
603
+ if (V(e2)) return ft(e2);
604
+ if (ct(e2)) {
605
+ let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: tt(n3), data: {} }, requestId: e2.requestId };
606
+ return dt(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
607
607
  }
608
- return B(e2);
608
+ return pt(e2);
609
609
  }
610
- var ft = (e2, t2, n2) => {
611
- let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = ht(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 };
612
- return pt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
610
+ var ut = (e2, t2, n2) => {
611
+ let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = mt(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 };
612
+ return dt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
613
613
  };
614
- var pt = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
615
- var mt = (e2) => {
616
- 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 ?? nt(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 };
617
- return pt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
614
+ var dt = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
615
+ var ft = (e2) => {
616
+ 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 ?? tt(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 };
617
+ return dt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
618
618
  };
619
- var B = (e2) => pt(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: nt(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
620
- var ht = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
619
+ var pt = (e2) => dt(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: tt(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
620
+ var mt = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
621
621
  let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
622
622
  return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
623
623
  let r3 = t2[e3.field];
624
- if (r3) return { ...e3, field: gt(r3, i2) };
624
+ if (r3) return { ...e3, field: ht(r3, i2) };
625
625
  let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
626
626
  if (s2) {
627
627
  let t3 = a2[s2];
628
- if (t3) return { ...e3, field: e3.field.replace(s2, gt(t3, i2)) };
628
+ if (t3) return { ...e3, field: e3.field.replace(s2, ht(t3, i2)) };
629
629
  }
630
630
  return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
631
631
  });
632
632
  };
633
- var gt = (e2, t2) => {
634
- let n2 = _t(e2);
633
+ var ht = (e2, t2) => {
634
+ let n2 = gt(e2);
635
635
  return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
636
636
  };
637
- var _t = (e2) => {
637
+ var gt = (e2) => {
638
638
  let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
639
639
  return t2 && t2.groups && Number(t2.groups.argIndex);
640
640
  };
641
- function vt() {
641
+ function _t() {
642
642
  let e2 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
643
643
  if (e2) return { initWixModules(t3, n3) {
644
- return yt(() => e2(t3, n3));
644
+ return vt(() => e2(t3, n3));
645
645
  }, fetchWithAuth() {
646
646
  throw Error(`fetchWithAuth is not available in this context`);
647
647
  }, graphql() {
@@ -651,10 +651,10 @@ function vt() {
651
651
  if (t2 || n2) return { initWixModules(e3, r2) {
652
652
  if (r2) {
653
653
  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`);
654
- return yt(() => n2.use(e3));
654
+ return vt(() => n2.use(e3));
655
655
  }
656
656
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
657
- return yt(() => t2.use(e3));
657
+ return vt(() => t2.use(e3));
658
658
  }, fetchWithAuth: (e3, n3) => {
659
659
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
660
660
  return t2.fetchWithAuth(e3, n3);
@@ -666,7 +666,7 @@ function vt() {
666
666
  return t2.graphql(e3, n3, r2);
667
667
  } };
668
668
  }
669
- function yt(e2) {
669
+ function vt(e2) {
670
670
  let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
671
671
  globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
672
672
  try {
@@ -675,59 +675,59 @@ function yt(e2) {
675
675
  globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
676
676
  }
677
677
  }
678
- function bt(e2, t2) {
678
+ function yt(e2, t2) {
679
679
  return (...n2) => {
680
- let r2 = vt();
680
+ let r2 = _t();
681
681
  return r2 ? r2.initWixModules(e2, t2).apply(void 0, n2) : e2.apply(void 0, n2);
682
682
  };
683
683
  }
684
- function V(e2, t2 = false) {
685
- return bt(e2, t2);
684
+ function bt(e2, t2 = false) {
685
+ return yt(e2, t2);
686
686
  }
687
687
  function xt(e2, t2) {
688
- let n2 = Ct(e2), r2 = Object.entries(n2).some(([e3, t3]) => e3.includes(`.`) || Array.isArray(t3) && t3.some((e4) => typeof e4 == `object`));
689
- return t2 && r2 ? new URLSearchParams({ ".r": Tt(JSON.stringify(e2)) }) : Object.entries(n2).reduce((e3, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
688
+ let n2 = St(e2), r2 = Object.entries(n2).some(([e3, t3]) => e3.includes(`.`) || Array.isArray(t3) && t3.some((e4) => typeof e4 == `object`));
689
+ return t2 && r2 ? new URLSearchParams({ ".r": wt(JSON.stringify(e2)) }) : Object.entries(n2).reduce((e3, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
690
690
  r3 == null || Array.isArray(n3) && typeof r3 == `object` || e3.append(t3, r3);
691
691
  }), e3), new URLSearchParams());
692
692
  }
693
- function St(e2) {
694
- let t2 = H(It(e2.host), e2.domainToMappings);
695
- return Kt(Ut(e2.protoPath, e2.data || {}), t2);
693
+ function H(e2) {
694
+ let t2 = Lt(Ft(e2.host), e2.domainToMappings);
695
+ return U(Ut(e2.protoPath, e2.data || {}), t2);
696
696
  }
697
- function Ct(e2, t2 = ``) {
697
+ function St(e2, t2 = ``) {
698
698
  let n2 = {};
699
699
  return Object.entries(e2).forEach(([e3, r2]) => {
700
- let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = wt(t2, e3);
700
+ let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Ct(t2, e3);
701
701
  if (i2) {
702
- let e4 = Ct(r2, a2);
702
+ let e4 = St(r2, a2);
703
703
  Object.assign(n2, e4);
704
704
  } else n2[a2] = r2;
705
705
  }), n2;
706
706
  }
707
- function wt(e2, t2) {
707
+ function Ct(e2, t2) {
708
708
  return `${e2}${e2 ? `.` : ``}${t2}`;
709
709
  }
710
- var Tt = (e2) => {
710
+ var wt = (e2) => {
711
711
  let t2 = new TextEncoder().encode(e2);
712
712
  return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e2, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
713
713
  };
714
- var Et = [`wix.com`, `editorx.com`];
715
- var Dt = `_`;
716
- var Ot = `*.`;
717
- var kt = RegExp(`\\.(${Et.join(`|`)})$`);
718
- var At = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
719
- var jt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
720
- var Mt = `dev.wix-code.com`;
721
- var Nt = /{(.*)}/;
722
- var Pt = RegExp(`\\.(${At.join(`|`)})$`);
723
- var Ft = RegExp(`.*\\.${Mt}$`);
724
- function It(e2) {
725
- return Lt(e2).replace(kt, `._base_domain_`).replace(Pt, `._api_base_domain_`).replace(Ft, `*.dev.wix-code.com`);
714
+ var Tt = [`wix.com`, `editorx.com`];
715
+ var Et = `_`;
716
+ var Dt = `*.`;
717
+ var Ot = RegExp(`\\.(${Tt.join(`|`)})$`);
718
+ var kt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
719
+ var At = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
720
+ var jt = `dev.wix-code.com`;
721
+ var Mt = /{(.*)}/;
722
+ var Nt = RegExp(`\\.(${kt.join(`|`)})$`);
723
+ var Pt = RegExp(`.*\\.${jt}$`);
724
+ function Ft(e2) {
725
+ return It(e2).replace(Ot, `._base_domain_`).replace(Nt, `._api_base_domain_`).replace(Pt, `*.dev.wix-code.com`);
726
726
  }
727
- function Lt(e2) {
728
- return jt[e2] ?? e2;
727
+ function It(e2) {
728
+ return At[e2] ?? e2;
729
729
  }
730
- function H(e2, t2) {
730
+ function Lt(e2, t2) {
731
731
  let n2 = t2[e2];
732
732
  if (n2) return n2;
733
733
  let r2 = Rt(e2, t2) ?? zt(e2, t2);
@@ -736,7 +736,7 @@ function H(e2, t2) {
736
736
  let e3 = t2[Ht];
737
737
  if (e3) return e3;
738
738
  }
739
- let n3 = t2[Dt];
739
+ let n3 = t2[Et];
740
740
  if (n3) return n3;
741
741
  }
742
742
  return r2 ?? [];
@@ -754,7 +754,7 @@ function zt(e2, t2) {
754
754
  return r2;
755
755
  }
756
756
  function Bt(e2, t2) {
757
- if (!t2.startsWith(Ot)) return false;
757
+ if (!t2.startsWith(Dt)) return false;
758
758
  let n2 = t2.slice(1);
759
759
  return e2.length > n2.length && e2.endsWith(n2);
760
760
  }
@@ -766,7 +766,7 @@ function Ut(e2, t2) {
766
766
  return e2.split(`/`).map((e3) => Wt(e3, t2)).join(`/`);
767
767
  }
768
768
  function Wt(e2, t2) {
769
- let n2 = e2.match(Nt) || [], r2 = n2[1];
769
+ let n2 = e2.match(Mt) || [], r2 = n2[1];
770
770
  return r2 ? Gt(t2, r2, e2, e2.replace(n2[0], ``)) : e2;
771
771
  }
772
772
  function Gt(e2, t2, n2, r2) {
@@ -777,19 +777,19 @@ function Gt(e2, t2, n2, r2) {
777
777
  }
778
778
  return `${i2}${r2}`;
779
779
  }
780
- function Kt(e2, t2) {
780
+ function U(e2, t2) {
781
781
  let n2 = t2?.find((t3) => e2.startsWith(t3.destPath));
782
782
  return n2 ? n2.srcPath + e2.slice(n2.destPath.length) : e2;
783
783
  }
784
- function qt(e2) {
784
+ function Kt(e2) {
785
785
  return e2 === `NaN` ? NaN : e2 === `Infinity` ? 1 / 0 : e2 === `-Infinity` ? -1 / 0 : e2;
786
786
  }
787
- var Jt = `x-wix-linguist`;
788
- var Yt = `00000000-0000-0000-0000-000000000000`;
789
- var Xt = `false`;
790
- var U = () => {
791
- let e2 = Qt(`language`), t2 = Qt(`locale`);
792
- if (e2) return { [Jt]: [e2, t2 || e2, Xt, Yt].join(`|`) };
787
+ var qt = `x-wix-linguist`;
788
+ var Jt = `00000000-0000-0000-0000-000000000000`;
789
+ var Yt = `false`;
790
+ var Xt = () => {
791
+ let e2 = $t(`language`), t2 = $t(`locale`);
792
+ if (e2) return { [qt]: [e2, t2 || e2, Yt, Jt].join(`|`) };
793
793
  };
794
794
  function Zt() {
795
795
  let e2 = null, t2 = null;
@@ -797,15 +797,16 @@ function Zt() {
797
797
  e2 = n2, t2 = r2;
798
798
  }), resolve: e2, reject: t2 };
799
799
  }
800
- var Qt = (e2) => typeof window < `u` ? window.commonConfig?.[e2] : void 0;
801
- var $t = ({ createHost: e2 }) => ({ __type: `host`, create: (e3) => ({}), host: (t2) => {
802
- let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e2(t2), o2 = tn();
803
- return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: Qt(`language`), locale: Qt(`locale`), get passThroughHeaders() {
804
- return U();
800
+ var Qt = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
801
+ var $t = (e2) => Qt()?.[e2];
802
+ var en = ({ createHost: e2 }) => ({ __type: `host`, create: (e3) => ({}), host: (t2) => {
803
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e2(t2), o2 = nn();
804
+ return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: $t(`language`), locale: $t(`locale`), get passThroughHeaders() {
805
+ return Xt();
805
806
  } } };
806
807
  }, auth: (e3) => {
807
808
  let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
808
- !e3 && en() && (e3 = t2?.getAccessTokenFunction?.());
809
+ !e3 && tn() && (e3 = t2?.getAccessTokenFunction?.());
809
810
  let n2 = false, { resolve: r2, promise: i2 } = Zt();
810
811
  return { getAuthHeaders: async () => {
811
812
  if (!e3 && n2 && (e3 = await i2), !e3) throw Error(`Failed to resolve auth token`);
@@ -814,476 +815,477 @@ var $t = ({ createHost: e2 }) => ({ __type: `host`, create: (e3) => ({}), host:
814
815
  r2(e4);
815
816
  }) };
816
817
  } });
817
- function en() {
818
+ function tn() {
818
819
  return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
819
820
  }
820
- function tn() {
821
+ function nn() {
821
822
  let e2 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
822
823
  if (!e2) return;
823
824
  let t2 = new URL(e2);
824
825
  return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
825
826
  }
826
- var nn = ({ clientSdk: e2, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
827
+ var rn = ({ clientSdk: e2, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
827
828
  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`);
828
829
  return e2.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
829
830
  }, getAccessToken: () => {
830
831
  throw Error(`Not implemented`);
831
832
  }, observeState: () => ({ disconnect: () => {
832
833
  } }) });
833
- var rn = $t({ createHost: function(e2) {
834
+ var an = en({ createHost: function(e2) {
834
835
  let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e2?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e2 || {};
835
836
  if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
836
- return { channel: nn({ clientSdk: t2, applicationId: n2 }), close: () => {
837
+ return { channel: rn({ clientSdk: t2, applicationId: n2 }), close: () => {
837
838
  } };
838
839
  } });
839
- var an = ((e2, t2) => {
840
- let n2 = rn.host({ applicationId: e2, componentId: t2 }), r2 = rn.auth();
840
+ var W = (e2, t2) => {
841
+ let n2 = an.host({ applicationId: e2, componentId: t2 }), r2 = an.auth();
841
842
  return Ne({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
842
- })(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`);
843
- var on = [`ANY_FEMALE`, `ANY_MALE`];
844
- var sn = `3.7.8`;
845
- var cn = sn;
846
- var ln = typeof Buffer == `function`;
847
- var un = typeof TextDecoder == `function` ? new TextDecoder() : void 0;
848
- var dn = typeof TextEncoder == `function` ? new TextEncoder() : void 0;
849
- var fn = Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`);
850
- var pn = ((e2) => {
843
+ };
844
+ var on = (e2) => W(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e2);
845
+ var sn = [`ANY_FEMALE`, `ANY_MALE`];
846
+ var cn = `3.7.8`;
847
+ var ln = cn;
848
+ var un = typeof Buffer == `function`;
849
+ var dn = typeof TextDecoder == `function` ? new TextDecoder() : void 0;
850
+ var fn = typeof TextEncoder == `function` ? new TextEncoder() : void 0;
851
+ var pn = Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`);
852
+ var mn = ((e2) => {
851
853
  let t2 = {};
852
854
  return e2.forEach((e3, n2) => t2[e3] = n2), t2;
853
- })(fn);
854
- var mn = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
855
- var W = String.fromCharCode.bind(String);
856
- var hn = typeof Uint8Array.from == `function` ? Uint8Array.from.bind(Uint8Array) : (e2) => new Uint8Array(Array.prototype.slice.call(e2, 0));
857
- var gn = (e2) => e2.replace(/=/g, ``).replace(/[+\/]/g, (e3) => e3 == `+` ? `-` : `_`);
858
- var _n = (e2) => e2.replace(/[^A-Za-z0-9\+\/]/g, ``);
859
- var vn = (e2) => {
855
+ })(pn);
856
+ var hn = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
857
+ var G = String.fromCharCode.bind(String);
858
+ var gn = typeof Uint8Array.from == `function` ? Uint8Array.from.bind(Uint8Array) : (e2) => new Uint8Array(Array.prototype.slice.call(e2, 0));
859
+ var _n = (e2) => e2.replace(/=/g, ``).replace(/[+\/]/g, (e3) => e3 == `+` ? `-` : `_`);
860
+ var vn = (e2) => e2.replace(/[^A-Za-z0-9\+\/]/g, ``);
861
+ var yn = (e2) => {
860
862
  let t2, n2, r2, i2, a2 = ``, o2 = e2.length % 3;
861
863
  for (let o3 = 0; o3 < e2.length; ) {
862
864
  if ((n2 = e2.charCodeAt(o3++)) > 255 || (r2 = e2.charCodeAt(o3++)) > 255 || (i2 = e2.charCodeAt(o3++)) > 255) throw TypeError(`invalid character found`);
863
- t2 = n2 << 16 | r2 << 8 | i2, a2 += fn[t2 >> 18 & 63] + fn[t2 >> 12 & 63] + fn[t2 >> 6 & 63] + fn[t2 & 63];
865
+ t2 = n2 << 16 | r2 << 8 | i2, a2 += pn[t2 >> 18 & 63] + pn[t2 >> 12 & 63] + pn[t2 >> 6 & 63] + pn[t2 & 63];
864
866
  }
865
867
  return o2 ? a2.slice(0, o2 - 3) + `===`.substring(o2) : a2;
866
868
  };
867
- var yn = typeof btoa == `function` ? (e2) => btoa(e2) : ln ? (e2) => Buffer.from(e2, `binary`).toString(`base64`) : vn;
868
- var bn = ln ? (e2) => Buffer.from(e2).toString(`base64`) : (e2) => {
869
+ var bn = typeof btoa == `function` ? (e2) => btoa(e2) : un ? (e2) => Buffer.from(e2, `binary`).toString(`base64`) : yn;
870
+ var xn = un ? (e2) => Buffer.from(e2).toString(`base64`) : (e2) => {
869
871
  let t2 = 4096, n2 = [];
870
- for (let r2 = 0, i2 = e2.length; r2 < i2; r2 += t2) n2.push(W.apply(null, e2.subarray(r2, r2 + t2)));
871
- return yn(n2.join(``));
872
+ for (let r2 = 0, i2 = e2.length; r2 < i2; r2 += t2) n2.push(G.apply(null, e2.subarray(r2, r2 + t2)));
873
+ return bn(n2.join(``));
872
874
  };
873
- var xn = (e2, t2 = false) => t2 ? gn(bn(e2)) : bn(e2);
874
- var Sn = (e2) => {
875
+ var Sn = (e2, t2 = false) => t2 ? _n(xn(e2)) : xn(e2);
876
+ var Cn = (e2) => {
875
877
  if (e2.length < 2) {
876
878
  var t2 = e2.charCodeAt(0);
877
- return t2 < 128 ? e2 : t2 < 2048 ? W(192 | t2 >>> 6) + W(128 | t2 & 63) : W(224 | t2 >>> 12 & 15) + W(128 | t2 >>> 6 & 63) + W(128 | t2 & 63);
879
+ return t2 < 128 ? e2 : t2 < 2048 ? G(192 | t2 >>> 6) + G(128 | t2 & 63) : G(224 | t2 >>> 12 & 15) + G(128 | t2 >>> 6 & 63) + G(128 | t2 & 63);
878
880
  }
879
881
  var t2 = 65536 + (e2.charCodeAt(0) - 55296) * 1024 + (e2.charCodeAt(1) - 56320);
880
- return W(240 | t2 >>> 18 & 7) + W(128 | t2 >>> 12 & 63) + W(128 | t2 >>> 6 & 63) + W(128 | t2 & 63);
881
- };
882
- var Cn = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
883
- var G = (e2) => e2.replace(Cn, Sn);
884
- var wn = ln ? (e2) => Buffer.from(e2, `utf8`).toString(`base64`) : dn ? (e2) => bn(dn.encode(e2)) : (e2) => yn(G(e2));
885
- var Tn = (e2, t2 = false) => t2 ? gn(wn(e2)) : wn(e2);
886
- var En = (e2) => Tn(e2, true);
887
- var Dn = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
888
- var On = (e2) => {
882
+ return G(240 | t2 >>> 18 & 7) + G(128 | t2 >>> 12 & 63) + G(128 | t2 >>> 6 & 63) + G(128 | t2 & 63);
883
+ };
884
+ var wn = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
885
+ var Tn = (e2) => e2.replace(wn, Cn);
886
+ var En = un ? (e2) => Buffer.from(e2, `utf8`).toString(`base64`) : fn ? (e2) => xn(fn.encode(e2)) : (e2) => bn(Tn(e2));
887
+ var Dn = (e2, t2 = false) => t2 ? _n(En(e2)) : En(e2);
888
+ var On = (e2) => Dn(e2, true);
889
+ var kn = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
890
+ var An = (e2) => {
889
891
  switch (e2.length) {
890
892
  case 4:
891
893
  var t2 = ((7 & e2.charCodeAt(0)) << 18 | (63 & e2.charCodeAt(1)) << 12 | (63 & e2.charCodeAt(2)) << 6 | 63 & e2.charCodeAt(3)) - 65536;
892
- return W((t2 >>> 10) + 55296) + W((t2 & 1023) + 56320);
894
+ return G((t2 >>> 10) + 55296) + G((t2 & 1023) + 56320);
893
895
  case 3:
894
- return W((15 & e2.charCodeAt(0)) << 12 | (63 & e2.charCodeAt(1)) << 6 | 63 & e2.charCodeAt(2));
896
+ return G((15 & e2.charCodeAt(0)) << 12 | (63 & e2.charCodeAt(1)) << 6 | 63 & e2.charCodeAt(2));
895
897
  default:
896
- return W((31 & e2.charCodeAt(0)) << 6 | 63 & e2.charCodeAt(1));
898
+ return G((31 & e2.charCodeAt(0)) << 6 | 63 & e2.charCodeAt(1));
897
899
  }
898
900
  };
899
- var kn = (e2) => e2.replace(Dn, On);
900
- var An = (e2) => {
901
- if (e2 = e2.replace(/\s+/g, ``), !mn.test(e2)) throw TypeError(`malformed base64.`);
901
+ var jn = (e2) => e2.replace(kn, An);
902
+ var K = (e2) => {
903
+ if (e2 = e2.replace(/\s+/g, ``), !hn.test(e2)) throw TypeError(`malformed base64.`);
902
904
  e2 += `==`.slice(2 - (e2.length & 3));
903
905
  let t2, n2, r2, i2 = [];
904
- for (let a2 = 0; a2 < e2.length; ) t2 = pn[e2.charAt(a2++)] << 18 | pn[e2.charAt(a2++)] << 12 | (n2 = pn[e2.charAt(a2++)]) << 6 | (r2 = pn[e2.charAt(a2++)]), n2 === 64 ? i2.push(W(t2 >> 16 & 255)) : r2 === 64 ? i2.push(W(t2 >> 16 & 255, t2 >> 8 & 255)) : i2.push(W(t2 >> 16 & 255, t2 >> 8 & 255, t2 & 255));
906
+ for (let a2 = 0; a2 < e2.length; ) t2 = mn[e2.charAt(a2++)] << 18 | mn[e2.charAt(a2++)] << 12 | (n2 = mn[e2.charAt(a2++)]) << 6 | (r2 = mn[e2.charAt(a2++)]), n2 === 64 ? i2.push(G(t2 >> 16 & 255)) : r2 === 64 ? i2.push(G(t2 >> 16 & 255, t2 >> 8 & 255)) : i2.push(G(t2 >> 16 & 255, t2 >> 8 & 255, t2 & 255));
905
907
  return i2.join(``);
906
908
  };
907
- var jn = typeof atob == `function` ? (e2) => atob(_n(e2)) : ln ? (e2) => Buffer.from(e2, `base64`).toString(`binary`) : An;
908
- var Mn = ln ? (e2) => hn(Buffer.from(e2, `base64`)) : (e2) => hn(jn(e2).split(``).map((e3) => e3.charCodeAt(0)));
909
- var Nn = (e2) => Mn(Fn(e2));
910
- var Pn = ln ? (e2) => Buffer.from(e2, `base64`).toString(`utf8`) : un ? (e2) => un.decode(Mn(e2)) : (e2) => kn(jn(e2));
911
- var Fn = (e2) => _n(e2.replace(/[-_]/g, (e3) => e3 == `-` ? `+` : `/`));
912
- var In = (e2) => Pn(Fn(e2));
913
- var Ln = (e2) => {
909
+ var Mn = typeof atob == `function` ? (e2) => atob(vn(e2)) : un ? (e2) => Buffer.from(e2, `base64`).toString(`binary`) : K;
910
+ var Nn = un ? (e2) => gn(Buffer.from(e2, `base64`)) : (e2) => gn(Mn(e2).split(``).map((e3) => e3.charCodeAt(0)));
911
+ var Pn = (e2) => Nn(In(e2));
912
+ var Fn = un ? (e2) => Buffer.from(e2, `base64`).toString(`utf8`) : dn ? (e2) => dn.decode(Nn(e2)) : (e2) => jn(Mn(e2));
913
+ var In = (e2) => vn(e2.replace(/[-_]/g, (e3) => e3 == `-` ? `+` : `/`));
914
+ var Ln = (e2) => Fn(In(e2));
915
+ var Rn = (e2) => {
914
916
  if (typeof e2 != `string`) return false;
915
917
  let t2 = e2.replace(/\s+/g, ``).replace(/={0,2}$/, ``);
916
918
  return !/[^\s0-9a-zA-Z\+/]/.test(t2) || !/[^\s0-9a-zA-Z\-_]/.test(t2);
917
919
  };
918
- var Rn = (e2) => ({ value: e2, enumerable: false, writable: true, configurable: true });
919
- var zn = function() {
920
- let e2 = (e3, t2) => Object.defineProperty(String.prototype, e3, Rn(t2));
920
+ var zn = (e2) => ({ value: e2, enumerable: false, writable: true, configurable: true });
921
+ var Bn = function() {
922
+ let e2 = (e3, t2) => Object.defineProperty(String.prototype, e3, zn(t2));
921
923
  e2(`fromBase64`, function() {
922
- return In(this);
924
+ return Ln(this);
923
925
  }), e2(`toBase64`, function(e3) {
924
- return Tn(this, e3);
926
+ return Dn(this, e3);
925
927
  }), e2(`toBase64URI`, function() {
926
- return Tn(this, true);
928
+ return Dn(this, true);
927
929
  }), e2(`toBase64URL`, function() {
928
- return Tn(this, true);
930
+ return Dn(this, true);
929
931
  }), e2(`toUint8Array`, function() {
930
- return Nn(this);
932
+ return Pn(this);
931
933
  });
932
934
  };
933
- var Bn = function() {
934
- let e2 = (e3, t2) => Object.defineProperty(Uint8Array.prototype, e3, Rn(t2));
935
+ var Vn = function() {
936
+ let e2 = (e3, t2) => Object.defineProperty(Uint8Array.prototype, e3, zn(t2));
935
937
  e2(`toBase64`, function(e3) {
936
- return xn(this, e3);
938
+ return Sn(this, e3);
937
939
  }), e2(`toBase64URI`, function() {
938
- return xn(this, true);
940
+ return Sn(this, true);
939
941
  }), e2(`toBase64URL`, function() {
940
- return xn(this, true);
942
+ return Sn(this, true);
941
943
  });
942
944
  };
943
- var Vn = { version: sn, VERSION: cn, atob: jn, atobPolyfill: An, btoa: yn, btoaPolyfill: vn, fromBase64: In, toBase64: Tn, encode: Tn, encodeURI: En, encodeURL: En, utob: G, btou: kn, decode: In, isValid: Ln, fromUint8Array: xn, toUint8Array: Nn, extendString: zn, extendUint8Array: Bn, extendBuiltins: () => {
944
- zn(), Bn();
945
+ var Hn = { version: cn, VERSION: ln, atob: Mn, atobPolyfill: K, btoa: bn, btoaPolyfill: yn, fromBase64: Ln, toBase64: Dn, encode: Dn, encodeURI: On, encodeURL: On, utob: Tn, btou: jn, decode: Ln, isValid: Rn, fromUint8Array: Sn, toUint8Array: Pn, extendString: Bn, extendUint8Array: Vn, extendBuiltins: () => {
946
+ Bn(), Vn();
945
947
  } };
946
- var K = Uint8Array;
947
- var Hn = Uint16Array;
948
- var Un = Int32Array;
949
- var Wn = new K([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]);
950
- var Gn = new K([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]);
951
- var Kn = new K([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
952
- var qn = function(e2, t2) {
953
- for (var n2 = new Hn(31), r2 = 0; r2 < 31; ++r2) n2[r2] = t2 += 1 << e2[r2 - 1];
954
- for (var i2 = new Un(n2[30]), r2 = 1; r2 < 30; ++r2) for (var a2 = n2[r2]; a2 < n2[r2 + 1]; ++a2) i2[a2] = a2 - n2[r2] << 5 | r2;
948
+ var q = Uint8Array;
949
+ var Un = Uint16Array;
950
+ var Wn = Int32Array;
951
+ var Gn = new q([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]);
952
+ var Kn = new q([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]);
953
+ var qn = new q([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
954
+ var Jn = function(e2, t2) {
955
+ for (var n2 = new Un(31), r2 = 0; r2 < 31; ++r2) n2[r2] = t2 += 1 << e2[r2 - 1];
956
+ for (var i2 = new Wn(n2[30]), r2 = 1; r2 < 30; ++r2) for (var a2 = n2[r2]; a2 < n2[r2 + 1]; ++a2) i2[a2] = a2 - n2[r2] << 5 | r2;
955
957
  return { b: n2, r: i2 };
956
958
  };
957
- var Jn = qn(Wn, 2);
958
- var Yn = Jn.b;
959
- var Xn = Jn.r;
960
- Yn[28] = 258, Xn[258] = 28;
961
- var Zn = qn(Gn, 0);
962
- var Qn = Zn.b;
963
- Zn.r;
964
- for ($n = new Hn(32768), q = 0; q < 32768; ++q) {
965
- er = (q & 43690) >> 1 | (q & 21845) << 1;
966
- er = (er & 52428) >> 2 | (er & 13107) << 2, er = (er & 61680) >> 4 | (er & 3855) << 4, $n[q] = ((er & 65280) >> 8 | (er & 255) << 8) >> 1;
959
+ var Yn = Jn(Gn, 2);
960
+ var Xn = Yn.b;
961
+ var Zn = Yn.r;
962
+ Xn[28] = 258, Zn[258] = 28;
963
+ var Qn = Jn(Kn, 0);
964
+ var $n = Qn.b;
965
+ Qn.r;
966
+ for (er = new Un(32768), J = 0; J < 32768; ++J) {
967
+ tr = (J & 43690) >> 1 | (J & 21845) << 1;
968
+ tr = (tr & 52428) >> 2 | (tr & 13107) << 2, tr = (tr & 61680) >> 4 | (tr & 3855) << 4, er[J] = ((tr & 65280) >> 8 | (tr & 255) << 8) >> 1;
967
969
  }
970
+ var tr;
968
971
  var er;
969
- var $n;
970
- var q;
971
- for (tr = function(e2, t2, n2) {
972
- for (var r2 = e2.length, i2 = 0, a2 = new Hn(t2); i2 < r2; ++i2) e2[i2] && ++a2[e2[i2] - 1];
973
- var o2 = new Hn(t2);
972
+ var J;
973
+ for (nr = function(e2, t2, n2) {
974
+ for (var r2 = e2.length, i2 = 0, a2 = new Un(t2); i2 < r2; ++i2) e2[i2] && ++a2[e2[i2] - 1];
975
+ var o2 = new Un(t2);
974
976
  for (i2 = 1; i2 < t2; ++i2) o2[i2] = o2[i2 - 1] + a2[i2 - 1] << 1;
975
977
  var s2;
976
978
  if (n2) {
977
- s2 = new Hn(1 << t2);
979
+ s2 = new Un(1 << t2);
978
980
  var c2 = 15 - t2;
979
- for (i2 = 0; i2 < r2; ++i2) if (e2[i2]) for (var l2 = i2 << 4 | e2[i2], u2 = t2 - e2[i2], d2 = o2[e2[i2] - 1]++ << u2, f2 = d2 | (1 << u2) - 1; d2 <= f2; ++d2) s2[$n[d2] >> c2] = l2;
980
- } else for (s2 = new Hn(r2), i2 = 0; i2 < r2; ++i2) e2[i2] && (s2[i2] = $n[o2[e2[i2] - 1]++] >> 15 - e2[i2]);
981
+ for (i2 = 0; i2 < r2; ++i2) if (e2[i2]) for (var l2 = i2 << 4 | e2[i2], u2 = t2 - e2[i2], d2 = o2[e2[i2] - 1]++ << u2, f2 = d2 | (1 << u2) - 1; d2 <= f2; ++d2) s2[er[d2] >> c2] = l2;
982
+ } else for (s2 = new Un(r2), i2 = 0; i2 < r2; ++i2) e2[i2] && (s2[i2] = er[o2[e2[i2] - 1]++] >> 15 - e2[i2]);
981
983
  return s2;
982
- }, nr = new K(288), q = 0; q < 144; ++q) nr[q] = 8;
983
- var tr;
984
+ }, rr = new q(288), J = 0; J < 144; ++J) rr[J] = 8;
984
985
  var nr;
985
- var q;
986
- for (q = 144; q < 256; ++q) nr[q] = 9;
987
- var q;
988
- for (q = 256; q < 280; ++q) nr[q] = 7;
989
- var q;
990
- for (q = 280; q < 288; ++q) nr[q] = 8;
991
- var q;
992
- for (rr = new K(32), q = 0; q < 32; ++q) rr[q] = 5;
993
986
  var rr;
994
- var q;
995
- var ir = tr(nr, 9, 1);
996
- var ar = tr(rr, 5, 1);
997
- var or = function(e2) {
987
+ var J;
988
+ for (J = 144; J < 256; ++J) rr[J] = 9;
989
+ var J;
990
+ for (J = 256; J < 280; ++J) rr[J] = 7;
991
+ var J;
992
+ for (J = 280; J < 288; ++J) rr[J] = 8;
993
+ var J;
994
+ for (ir = new q(32), J = 0; J < 32; ++J) ir[J] = 5;
995
+ var ir;
996
+ var J;
997
+ var ar = nr(rr, 9, 1);
998
+ var or = nr(ir, 5, 1);
999
+ var sr = function(e2) {
998
1000
  for (var t2 = e2[0], n2 = 1; n2 < e2.length; ++n2) e2[n2] > t2 && (t2 = e2[n2]);
999
1001
  return t2;
1000
1002
  };
1001
- var J = function(e2, t2, n2) {
1003
+ var cr = function(e2, t2, n2) {
1002
1004
  var r2 = t2 / 8 | 0;
1003
1005
  return (e2[r2] | e2[r2 + 1] << 8) >> (t2 & 7) & n2;
1004
1006
  };
1005
- var sr = function(e2, t2) {
1007
+ var lr = function(e2, t2) {
1006
1008
  var n2 = t2 / 8 | 0;
1007
1009
  return (e2[n2] | e2[n2 + 1] << 8 | e2[n2 + 2] << 16) >> (t2 & 7);
1008
1010
  };
1009
- var cr = function(e2) {
1011
+ var ur = function(e2) {
1010
1012
  return (e2 + 7) / 8 | 0;
1011
1013
  };
1012
- var lr = function(e2, t2, n2) {
1013
- return (t2 == null || t2 < 0) && (t2 = 0), (n2 == null || n2 > e2.length) && (n2 = e2.length), new K(e2.subarray(t2, n2));
1014
+ var dr = function(e2, t2, n2) {
1015
+ return (t2 == null || t2 < 0) && (t2 = 0), (n2 == null || n2 > e2.length) && (n2 = e2.length), new q(e2.subarray(t2, n2));
1014
1016
  };
1015
- var ur = [`unexpected EOF`, `invalid block type`, `invalid length/literal`, `invalid distance`, `stream finished`, `no stream handler`, , `no callback`, `invalid UTF-8 data`, `extra field too long`, `date not in range 1980-2099`, `filename too long`, `stream finishing`, `invalid zip data`];
1016
- var Y = function(e2, t2, n2) {
1017
- var r2 = Error(t2 || ur[e2]);
1018
- if (r2.code = e2, Error.captureStackTrace && Error.captureStackTrace(r2, Y), !n2) throw r2;
1017
+ var fr = [`unexpected EOF`, `invalid block type`, `invalid length/literal`, `invalid distance`, `stream finished`, `no stream handler`, , `no callback`, `invalid UTF-8 data`, `extra field too long`, `date not in range 1980-2099`, `filename too long`, `stream finishing`, `invalid zip data`];
1018
+ var pr = function(e2, t2, n2) {
1019
+ var r2 = Error(t2 || fr[e2]);
1020
+ if (r2.code = e2, Error.captureStackTrace && Error.captureStackTrace(r2, pr), !n2) throw r2;
1019
1021
  return r2;
1020
1022
  };
1021
- var dr = function(e2, t2, n2, r2) {
1023
+ var mr = function(e2, t2, n2, r2) {
1022
1024
  var i2 = e2.length, a2 = r2 ? r2.length : 0;
1023
- if (!i2 || t2.f && !t2.l) return n2 || new K(0);
1025
+ if (!i2 || t2.f && !t2.l) return n2 || new q(0);
1024
1026
  var o2 = !n2, s2 = o2 || t2.i != 2, c2 = t2.i;
1025
- o2 && (n2 = new K(i2 * 3));
1027
+ o2 && (n2 = new q(i2 * 3));
1026
1028
  var l2 = function(e3) {
1027
1029
  var t3 = n2.length;
1028
1030
  if (e3 > t3) {
1029
- var r3 = new K(Math.max(t3 * 2, e3));
1031
+ var r3 = new q(Math.max(t3 * 2, e3));
1030
1032
  r3.set(n2), n2 = r3;
1031
1033
  }
1032
1034
  }, u2 = t2.f || 0, d2 = t2.p || 0, f2 = t2.b || 0, p2 = t2.l, m2 = t2.d, h2 = t2.m, g2 = t2.n, _2 = i2 * 8;
1033
1035
  do {
1034
1036
  if (!p2) {
1035
- u2 = J(e2, d2, 1);
1036
- var v2 = J(e2, d2 + 1, 3);
1037
+ u2 = cr(e2, d2, 1);
1038
+ var v2 = cr(e2, d2 + 1, 3);
1037
1039
  if (d2 += 3, !v2) {
1038
- var y2 = cr(d2) + 4, b2 = e2[y2 - 4] | e2[y2 - 3] << 8, x2 = y2 + b2;
1040
+ var y2 = ur(d2) + 4, b2 = e2[y2 - 4] | e2[y2 - 3] << 8, x2 = y2 + b2;
1039
1041
  if (x2 > i2) {
1040
- c2 && Y(0);
1042
+ c2 && pr(0);
1041
1043
  break;
1042
1044
  }
1043
1045
  s2 && l2(f2 + b2), n2.set(e2.subarray(y2, x2), f2), t2.b = f2 += b2, t2.p = d2 = x2 * 8, t2.f = u2;
1044
1046
  continue;
1045
1047
  }
1046
- if (v2 == 1) p2 = ir, m2 = ar, h2 = 9, g2 = 5;
1048
+ if (v2 == 1) p2 = ar, m2 = or, h2 = 9, g2 = 5;
1047
1049
  else if (v2 == 2) {
1048
- var S2 = J(e2, d2, 31) + 257, C2 = J(e2, d2 + 10, 15) + 4, w2 = S2 + J(e2, d2 + 5, 31) + 1;
1050
+ var S2 = cr(e2, d2, 31) + 257, C2 = cr(e2, d2 + 10, 15) + 4, w2 = S2 + cr(e2, d2 + 5, 31) + 1;
1049
1051
  d2 += 14;
1050
- for (var T2 = new K(w2), ee2 = new K(19), E2 = 0; E2 < C2; ++E2) ee2[Kn[E2]] = J(e2, d2 + E2 * 3, 7);
1052
+ for (var T2 = new q(w2), ee2 = new q(19), E2 = 0; E2 < C2; ++E2) ee2[qn[E2]] = cr(e2, d2 + E2 * 3, 7);
1051
1053
  d2 += C2 * 3;
1052
- for (var D2 = or(ee2), O2 = (1 << D2) - 1, te2 = tr(ee2, D2, 1), E2 = 0; E2 < w2; ) {
1053
- var k2 = te2[J(e2, d2, O2)];
1054
+ for (var D2 = sr(ee2), O2 = (1 << D2) - 1, te2 = nr(ee2, D2, 1), E2 = 0; E2 < w2; ) {
1055
+ var k2 = te2[cr(e2, d2, O2)];
1054
1056
  d2 += k2 & 15;
1055
1057
  var y2 = k2 >> 4;
1056
1058
  if (y2 < 16) T2[E2++] = y2;
1057
1059
  else {
1058
1060
  var A2 = 0, ne2 = 0;
1059
- for (y2 == 16 ? (ne2 = 3 + J(e2, d2, 3), d2 += 2, A2 = T2[E2 - 1]) : y2 == 17 ? (ne2 = 3 + J(e2, d2, 7), d2 += 3) : y2 == 18 && (ne2 = 11 + J(e2, d2, 127), d2 += 7); ne2--; ) T2[E2++] = A2;
1061
+ for (y2 == 16 ? (ne2 = 3 + cr(e2, d2, 3), d2 += 2, A2 = T2[E2 - 1]) : y2 == 17 ? (ne2 = 3 + cr(e2, d2, 7), d2 += 3) : y2 == 18 && (ne2 = 11 + cr(e2, d2, 127), d2 += 7); ne2--; ) T2[E2++] = A2;
1060
1062
  }
1061
1063
  }
1062
1064
  var re2 = T2.subarray(0, S2), j2 = T2.subarray(S2);
1063
- h2 = or(re2), g2 = or(j2), p2 = tr(re2, h2, 1), m2 = tr(j2, g2, 1);
1064
- } else Y(1);
1065
+ h2 = sr(re2), g2 = sr(j2), p2 = nr(re2, h2, 1), m2 = nr(j2, g2, 1);
1066
+ } else pr(1);
1065
1067
  if (d2 > _2) {
1066
- c2 && Y(0);
1068
+ c2 && pr(0);
1067
1069
  break;
1068
1070
  }
1069
1071
  }
1070
1072
  s2 && l2(f2 + 131072);
1071
1073
  for (var ie2 = (1 << h2) - 1, M2 = (1 << g2) - 1, ae2 = d2; ; ae2 = d2) {
1072
- var A2 = p2[sr(e2, d2) & ie2], N2 = A2 >> 4;
1074
+ var A2 = p2[lr(e2, d2) & ie2], oe2 = A2 >> 4;
1073
1075
  if (d2 += A2 & 15, d2 > _2) {
1074
- c2 && Y(0);
1076
+ c2 && pr(0);
1075
1077
  break;
1076
1078
  }
1077
- if (A2 || Y(2), N2 < 256) n2[f2++] = N2;
1078
- else if (N2 == 256) {
1079
+ if (A2 || pr(2), oe2 < 256) n2[f2++] = oe2;
1080
+ else if (oe2 == 256) {
1079
1081
  ae2 = d2, p2 = null;
1080
1082
  break;
1081
1083
  } else {
1082
- var oe2 = N2 - 254;
1083
- if (N2 > 264) {
1084
- var E2 = N2 - 257, P2 = Wn[E2];
1085
- oe2 = J(e2, d2, (1 << P2) - 1) + Yn[E2], d2 += P2;
1084
+ var se2 = oe2 - 254;
1085
+ if (oe2 > 264) {
1086
+ var E2 = oe2 - 257, N2 = Gn[E2];
1087
+ se2 = cr(e2, d2, (1 << N2) - 1) + Xn[E2], d2 += N2;
1086
1088
  }
1087
- var se2 = m2[sr(e2, d2) & M2], ce2 = se2 >> 4;
1088
- se2 || Y(3), d2 += se2 & 15;
1089
- var j2 = Qn[ce2];
1090
- if (ce2 > 3) {
1091
- var P2 = Gn[ce2];
1092
- j2 += sr(e2, d2) & (1 << P2) - 1, d2 += P2;
1089
+ var ce2 = m2[lr(e2, d2) & M2], le2 = ce2 >> 4;
1090
+ ce2 || pr(3), d2 += ce2 & 15;
1091
+ var j2 = $n[le2];
1092
+ if (le2 > 3) {
1093
+ var N2 = Kn[le2];
1094
+ j2 += lr(e2, d2) & (1 << N2) - 1, d2 += N2;
1093
1095
  }
1094
1096
  if (d2 > _2) {
1095
- c2 && Y(0);
1097
+ c2 && pr(0);
1096
1098
  break;
1097
1099
  }
1098
1100
  s2 && l2(f2 + 131072);
1099
- var le2 = f2 + oe2;
1101
+ var ue2 = f2 + se2;
1100
1102
  if (f2 < j2) {
1101
- var ue2 = a2 - j2, de2 = Math.min(j2, le2);
1102
- for (ue2 + f2 < 0 && Y(3); f2 < de2; ++f2) n2[f2] = r2[ue2 + f2];
1103
+ var de2 = a2 - j2, fe2 = Math.min(j2, ue2);
1104
+ for (de2 + f2 < 0 && pr(3); f2 < fe2; ++f2) n2[f2] = r2[de2 + f2];
1103
1105
  }
1104
- for (; f2 < le2; ++f2) n2[f2] = n2[f2 - j2];
1106
+ for (; f2 < ue2; ++f2) n2[f2] = n2[f2 - j2];
1105
1107
  }
1106
1108
  }
1107
1109
  t2.l = p2, t2.p = ae2, t2.b = f2, t2.f = u2, p2 && (u2 = 1, t2.m = h2, t2.d = m2, t2.n = g2);
1108
1110
  } while (!u2);
1109
- return f2 != n2.length && o2 ? lr(n2, 0, f2) : n2.subarray(0, f2);
1111
+ return f2 != n2.length && o2 ? dr(n2, 0, f2) : n2.subarray(0, f2);
1110
1112
  };
1111
- var fr = new K(0);
1112
- var pr = function(e2) {
1113
- (e2[0] != 31 || e2[1] != 139 || e2[2] != 8) && Y(6, `invalid gzip data`);
1113
+ var hr = new q(0);
1114
+ var gr = function(e2) {
1115
+ (e2[0] != 31 || e2[1] != 139 || e2[2] != 8) && pr(6, `invalid gzip data`);
1114
1116
  var t2 = e2[3], n2 = 10;
1115
1117
  t2 & 4 && (n2 += (e2[10] | e2[11] << 8) + 2);
1116
1118
  for (var r2 = (t2 >> 3 & 1) + (t2 >> 4 & 1); r2 > 0; r2 -= !e2[n2++]) ;
1117
1119
  return n2 + (t2 & 2);
1118
1120
  };
1119
- var mr = function(e2) {
1121
+ var _r = function(e2) {
1120
1122
  var t2 = e2.length;
1121
1123
  return (e2[t2 - 4] | e2[t2 - 3] << 8 | e2[t2 - 2] << 16 | e2[t2 - 1] << 24) >>> 0;
1122
1124
  };
1123
- function hr(e2, t2) {
1124
- var n2 = pr(e2);
1125
- return n2 + 8 > e2.length && Y(6, `invalid gzip data`), dr(e2.subarray(n2, -8), { i: 2 }, t2 && t2.out || new K(mr(e2)), t2 && t2.dictionary);
1125
+ function vr(e2, t2) {
1126
+ var n2 = gr(e2);
1127
+ return n2 + 8 > e2.length && pr(6, `invalid gzip data`), mr(e2.subarray(n2, -8), { i: 2 }, t2 && t2.out || new q(_r(e2)), t2 && t2.dictionary);
1126
1128
  }
1127
- var gr = typeof TextDecoder < `u` && new TextDecoder();
1129
+ var yr = typeof TextDecoder < `u` && new TextDecoder();
1128
1130
  try {
1129
- gr.decode(fr, { stream: true });
1131
+ yr.decode(hr, { stream: true });
1130
1132
  } catch {
1131
1133
  }
1132
- var _r = /* @__PURE__ */ new Set([`APPOINTMENT`, `CLASS`, `COURSE`]);
1133
- var vr = new Set(on);
1134
- function X(e2) {
1134
+ var br = /* @__PURE__ */ new Set([`APPOINTMENT`, `CLASS`, `COURSE`]);
1135
+ var xr = new Set(sn);
1136
+ function Y(e2) {
1135
1137
  return typeof e2 == `string` ? e2 : void 0;
1136
1138
  }
1137
- function yr(e2) {
1139
+ function Sr(e2) {
1138
1140
  return typeof e2 == `number` && Number.isFinite(e2) ? e2 : void 0;
1139
1141
  }
1140
- function br(e2) {
1142
+ function Cr(e2) {
1141
1143
  return typeof e2 == `boolean` ? e2 : void 0;
1142
1144
  }
1143
- function xr(e2) {
1145
+ function wr(e2) {
1144
1146
  if (Array.isArray(e2)) return e2.filter((e3) => typeof e3 == `string`);
1145
1147
  }
1146
- function Sr(e2) {
1148
+ function Tr(e2) {
1147
1149
  return typeof e2 == `object` && !!e2;
1148
1150
  }
1149
- function Cr(e2) {
1150
- if (!Sr(e2)) return null;
1151
- let t2 = X(e2.t);
1151
+ function Er(e2) {
1152
+ if (!Tr(e2)) return null;
1153
+ let t2 = Y(e2.t);
1152
1154
  if (t2 === void 0) return null;
1153
- let n2 = { type: t2, ids: xr(e2.d) ?? [] }, r2 = br(e2.n);
1155
+ let n2 = { type: t2, ids: wr(e2.d) ?? [] }, r2 = Cr(e2.n);
1154
1156
  return r2 !== void 0 && (n2.anyResource = r2), n2;
1155
1157
  }
1156
- function wr(e2) {
1157
- if (!Sr(e2)) return null;
1158
- let t2 = yr(e2.p), n2 = xr(e2.h);
1158
+ function Dr(e2) {
1159
+ if (!Tr(e2)) return null;
1160
+ let t2 = Sr(e2.p), n2 = wr(e2.h);
1159
1161
  if (t2 === void 0 && n2 === void 0) return null;
1160
1162
  let r2 = {};
1161
1163
  return t2 !== void 0 && (r2.numberOfParticipants = t2), n2 !== void 0 && (r2.choices = n2), r2;
1162
1164
  }
1163
- function Tr(e2) {
1164
- if (!Sr(e2)) return null;
1165
- let t2 = X(e2.i), n2 = yr(e2.q);
1165
+ function Or(e2) {
1166
+ if (!Tr(e2)) return null;
1167
+ let t2 = Y(e2.i), n2 = Sr(e2.q);
1166
1168
  return t2 === void 0 || n2 === void 0 ? null : { id: t2, quantity: n2 };
1167
1169
  }
1168
- function Er(e2, t2) {
1170
+ function kr(e2, t2) {
1169
1171
  if (!Array.isArray(e2)) return;
1170
1172
  let n2 = e2.map(t2).filter((e3) => e3 !== null);
1171
1173
  return n2.length ? n2 : void 0;
1172
1174
  }
1173
- function Dr(e2) {
1174
- if (!Sr(e2)) return null;
1175
- let t2 = X(e2.i);
1175
+ function Ar(e2) {
1176
+ if (!Tr(e2)) return null;
1177
+ let t2 = Y(e2.i);
1176
1178
  if (t2 === void 0) return null;
1177
- let n2 = { serviceId: t2 }, r2 = X(e2.g);
1179
+ let n2 = { serviceId: t2 }, r2 = Y(e2.g);
1178
1180
  r2 !== void 0 && (n2.slug = r2);
1179
1181
  let i2 = function(e3) {
1180
- let t3 = X(e3);
1181
- if (t3 !== void 0 && _r.has(t3)) return t3;
1182
+ let t3 = Y(e3);
1183
+ if (t3 !== void 0 && br.has(t3)) return t3;
1182
1184
  }(e2.y);
1183
1185
  i2 !== void 0 && (n2.serviceType = i2);
1184
- let a2 = X(e2.t0);
1186
+ let a2 = Y(e2.t0);
1185
1187
  a2 !== void 0 && (n2.slotStart = a2);
1186
- let o2 = X(e2.t1);
1188
+ let o2 = Y(e2.t1);
1187
1189
  o2 !== void 0 && (n2.slotEnd = o2);
1188
- let s2 = X(e2.e);
1190
+ let s2 = Y(e2.e);
1189
1191
  s2 !== void 0 && (n2.eventId = s2);
1190
- let c2 = X(e2.c);
1192
+ let c2 = Y(e2.c);
1191
1193
  c2 !== void 0 && (n2.scheduleId = c2);
1192
- let l2 = X(e2.k);
1194
+ let l2 = Y(e2.k);
1193
1195
  l2 !== void 0 && (n2.sessionId = l2);
1194
- let u2 = X(e2.l);
1196
+ let u2 = Y(e2.l);
1195
1197
  u2 !== void 0 && (n2.locationId = u2);
1196
- let d2 = X(e2.lt);
1198
+ let d2 = Y(e2.lt);
1197
1199
  d2 !== `BUSINESS` && d2 !== `CUSTOM` && d2 !== `CUSTOMER` || (n2.locationType = d2);
1198
- let f2 = Er(e2.r, Cr);
1200
+ let f2 = kr(e2.r, Er);
1199
1201
  f2 && (n2.resources = f2);
1200
- let p2 = Er(e2.x, wr);
1202
+ let p2 = kr(e2.x, Dr);
1201
1203
  p2 && (n2.selectedVariants = p2);
1202
- let m2 = Er(e2.a, Tr);
1204
+ let m2 = kr(e2.a, Or);
1203
1205
  m2 && (n2.addOns = m2);
1204
- let h2 = X(e2.dc);
1206
+ let h2 = Y(e2.dc);
1205
1207
  h2 && (n2.durationChoiceId = h2);
1206
- let g2 = yr(e2.dm);
1208
+ let g2 = Sr(e2.dm);
1207
1209
  g2 !== void 0 && Number.isInteger(g2) && g2 > 0 && (n2.durationInMinutes = g2);
1208
- let _2 = X(e2.rg);
1209
- return _2 !== void 0 && vr.has(_2) && (n2.requestedGender = _2), n2;
1210
+ let _2 = Y(e2.rg);
1211
+ return _2 !== void 0 && xr.has(_2) && (n2.requestedGender = _2), n2;
1210
1212
  }
1211
- function Or(e2) {
1212
- if (!Sr(e2)) return null;
1213
- let t2 = X(e2.m);
1213
+ function jr(e2) {
1214
+ if (!Tr(e2)) return null;
1215
+ let t2 = Y(e2.m);
1214
1216
  if (t2 !== `single` && t2 !== `multi` || !Array.isArray(e2.s)) return null;
1215
- let n2 = { mode: t2, services: e2.s.map(Dr).filter((e3) => e3 !== null) }, r2 = X(e2.z);
1216
- return r2 !== void 0 && (n2.timezone = r2), true === br(e2.cp) && (n2.wantsPromoCode = true), n2;
1217
+ let n2 = { mode: t2, services: e2.s.map(Ar).filter((e3) => e3 !== null) }, r2 = Y(e2.z);
1218
+ return r2 !== void 0 && (n2.timezone = r2), true === Cr(e2.cp) && (n2.wantsPromoCode = true), n2;
1217
1219
  }
1218
1220
  new TextEncoder();
1219
- var kr = new TextDecoder();
1220
- function Ar(e2) {
1221
+ var Mr = new TextDecoder();
1222
+ function Nr(e2) {
1221
1223
  if (!e2 || e2.length < 2) return null;
1222
1224
  try {
1223
- let t2 = e2[0], n2 = Vn.toUint8Array(e2.slice(1)), r2;
1225
+ let t2 = e2[0], n2 = Hn.toUint8Array(e2.slice(1)), r2;
1224
1226
  if (t2 === `1`) r2 = n2;
1225
1227
  else {
1226
1228
  if (t2 !== `2`) return null;
1227
- r2 = hr(n2);
1229
+ r2 = vr(n2);
1228
1230
  }
1229
- return Or(JSON.parse(kr.decode(r2)));
1231
+ return jr(JSON.parse(Mr.decode(r2)));
1230
1232
  } catch {
1231
1233
  return null;
1232
1234
  }
1233
1235
  }
1234
- function jr(e2) {
1236
+ function Pr(e2) {
1235
1237
  return e2;
1236
1238
  }
1237
- var Mr = jr(`@wix/site-service-editor-context`);
1238
- var Nr = jr(`@wix/site-service-pages`);
1239
- var Pr = jr(`@wix/site-service-router`);
1240
- var Fr = jr(`@wix/site-service-url`);
1241
- var Ir = jr(`@wix/site-service-renderer-configuration`);
1242
- var Lr = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
1243
- var Rr = `shopping_cart`;
1244
- var zr = `thank_you_page`;
1245
- var Br = `1cd44cf8-756f-41c3-bd90-3e2ffcaf1155`;
1246
- var Vr = function(e2) {
1239
+ var Fr = Pr(`@wix/site-service-editor-context`);
1240
+ var Ir = Pr(`@wix/site-service-pages`);
1241
+ var Lr = Pr(`@wix/site-service-router`);
1242
+ var Rr = Pr(`@wix/site-service-url`);
1243
+ var zr = Pr(`@wix/site-service-renderer-configuration`);
1244
+ var Br = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
1245
+ var Vr = `shopping_cart`;
1246
+ var Hr = `thank_you_page`;
1247
+ var Ur = `1cd44cf8-756f-41c3-bd90-3e2ffcaf1155`;
1248
+ var Wr = function(e2) {
1247
1249
  return e2.BOOK_ONLINE = `bookingsBookOnline`, e2.SERVICE_PAGE = `bookingsServicePage`, e2.CALENDAR_PAGE = `bookingsCalendar`, e2.FORM_PAGE = `bookingsForm`, e2;
1248
1250
  }({});
1249
- var Hr = `{{(.*?)}}`;
1250
- var Ur = `[{{}}]`;
1251
- var Wr = `([^/]+)`;
1252
- var Gr;
1251
+ var Gr = `{{(.*?)}}`;
1252
+ var Kr = `[{{}}]`;
1253
+ var qr = `([^/]+)`;
1254
+ var Jr;
1253
1255
  (function(e2) {
1254
1256
  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`;
1255
- })(Gr ||= {});
1256
- var Z;
1257
+ })(Jr ||= {});
1258
+ var X;
1257
1259
  (function(e2) {
1258
1260
  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`;
1259
- })(Z ||= {});
1260
- var Kr = {};
1261
- var qr = (Kr[Z.PRODUCT_PAGE] = { variables: [`slug`], required: [`slug`] }, Kr);
1262
- var Jr = `{{main-mapping}}`;
1261
+ })(X ||= {});
1263
1262
  var Yr = {};
1264
- var Xr;
1265
- var Zr = (Yr[Z.BLOG_POST] = { variables: [`slug`], required: [`slug`], subMappings: (Xr = {}, Xr[Z.BLOG_POST_EDIT] = { defaultMapping: `${Jr}/edit` }, Xr[Z.BLOG_POST_PREVIEW] = { required: [`instance`], defaultMapping: `${Jr}/preview/{{instance}}` }, Xr) }, Yr);
1263
+ var Xr = (Yr[X.PRODUCT_PAGE] = { variables: [`slug`], required: [`slug`] }, Yr);
1264
+ var Zr = `{{main-mapping}}`;
1266
1265
  var Qr = {};
1267
- var $r = (Qr[Z.BLOG_CATEGORY] = { variables: [`slug`], required: [`slug`], defaultPrefix: `categories` }, Qr);
1268
- var ei = {};
1269
- var ti;
1270
- var ni;
1271
- var ri = (ei[Z.FORUM_POST] = { variables: [`categorySlug`, `postSlug`], required: [`categorySlug`, `postSlug`], subMappings: (ti = {}, ti[Z.FORUM_POST_EDIT] = { defaultMapping: `${Jr}/edit` }, ti[Z.FORUM_POST_PAGINATION] = { required: [`page`], defaultMapping: `${Jr}/p-{{page}}` }, ti[Z.FORUM_POST_DEEP_LINK_DATA] = { required: [`deepLinkData`], defaultMapping: `${Jr}/dl-{{deepLinkData}}` }, ti[Z.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA] = { required: [`page`, `deepLinkData`], defaultMapping: `${Jr}/p-{{page}}/dl-{{deepLinkData}}` }, ti) }, ei[Z.FORUM_CATEGORY] = { variables: [`slug`], required: [`slug`], subMappings: (ni = {}, ni[Z.FORUM_CATEGORY_CREATE_POST] = { defaultMapping: `${Jr}/create-post` }, ni[Z.FORUM_CATEGORY_CREATE_QUESTION] = { defaultMapping: `${Jr}/create-question` }, ni[Z.FORUM_CATEGORY_PAGINATION] = { required: [`page`], defaultMapping: `${Jr}/p-{{page}}` }, ni) }, ei);
1272
- var ii = {};
1273
- var ai = (ii[Z.GROUP] = { variables: [`groupId`, `tabName`], required: [`groupId`, `tabName`] }, ii[Z.GROUP_POST] = { variables: [`groupId`, `tabName`, `postId`], required: [`groupId`, `tabName`, `postId`] }, ii);
1274
- var oi = {};
1275
- var si = (oi[Z.BOOKINGS_SERVICE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `service-page` }, oi);
1276
- var ci = {};
1277
- var li = (ci[Z.CHALLENGES_PAGE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `challenge-page` }, ci);
1278
- var ui = {};
1279
- var di = (ui[Gr.product_page] = qr, ui[Gr.post] = Zr, ui[Gr.blog] = $r, ui[Gr.forum] = ri, ui[Gr.group] = ai, ui[Gr.bookings] = si, ui[Gr.challenges] = li, ui);
1280
- var fi = function() {
1281
- return fi = Object.assign || function(e2) {
1266
+ var $r;
1267
+ var ei = (Qr[X.BLOG_POST] = { variables: [`slug`], required: [`slug`], subMappings: ($r = {}, $r[X.BLOG_POST_EDIT] = { defaultMapping: `${Zr}/edit` }, $r[X.BLOG_POST_PREVIEW] = { required: [`instance`], defaultMapping: `${Zr}/preview/{{instance}}` }, $r) }, Qr);
1268
+ var ti = {};
1269
+ var ni = (ti[X.BLOG_CATEGORY] = { variables: [`slug`], required: [`slug`], defaultPrefix: `categories` }, ti);
1270
+ var ri = {};
1271
+ var ii;
1272
+ var ai;
1273
+ var oi = (ri[X.FORUM_POST] = { variables: [`categorySlug`, `postSlug`], required: [`categorySlug`, `postSlug`], subMappings: (ii = {}, ii[X.FORUM_POST_EDIT] = { defaultMapping: `${Zr}/edit` }, ii[X.FORUM_POST_PAGINATION] = { required: [`page`], defaultMapping: `${Zr}/p-{{page}}` }, ii[X.FORUM_POST_DEEP_LINK_DATA] = { required: [`deepLinkData`], defaultMapping: `${Zr}/dl-{{deepLinkData}}` }, ii[X.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA] = { required: [`page`, `deepLinkData`], defaultMapping: `${Zr}/p-{{page}}/dl-{{deepLinkData}}` }, ii) }, ri[X.FORUM_CATEGORY] = { variables: [`slug`], required: [`slug`], subMappings: (ai = {}, ai[X.FORUM_CATEGORY_CREATE_POST] = { defaultMapping: `${Zr}/create-post` }, ai[X.FORUM_CATEGORY_CREATE_QUESTION] = { defaultMapping: `${Zr}/create-question` }, ai[X.FORUM_CATEGORY_PAGINATION] = { required: [`page`], defaultMapping: `${Zr}/p-{{page}}` }, ai) }, ri);
1274
+ var si = {};
1275
+ var ci = (si[X.GROUP] = { variables: [`groupId`, `tabName`], required: [`groupId`, `tabName`] }, si[X.GROUP_POST] = { variables: [`groupId`, `tabName`, `postId`], required: [`groupId`, `tabName`, `postId`] }, si);
1276
+ var li = {};
1277
+ var ui = (li[X.BOOKINGS_SERVICE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `service-page` }, li);
1278
+ var di = {};
1279
+ var fi = (di[X.CHALLENGES_PAGE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `challenge-page` }, di);
1280
+ var pi = {};
1281
+ var mi = (pi[Jr.product_page] = Xr, pi[Jr.post] = ei, pi[Jr.blog] = ni, pi[Jr.forum] = oi, pi[Jr.group] = ci, pi[Jr.bookings] = ui, pi[Jr.challenges] = fi, pi);
1282
+ var hi = function() {
1283
+ return hi = Object.assign || function(e2) {
1282
1284
  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]);
1283
1285
  return e2;
1284
- }, fi.apply(this, arguments);
1286
+ }, hi.apply(this, arguments);
1285
1287
  };
1286
- function pi(e2) {
1288
+ function gi(e2) {
1287
1289
  var t2 = typeof Symbol == `function` && Symbol.iterator, n2 = t2 && e2[t2], r2 = 0;
1288
1290
  if (n2) return n2.call(e2);
1289
1291
  if (e2 && typeof e2.length == `number`) return { next: function() {
@@ -1291,7 +1293,7 @@ function pi(e2) {
1291
1293
  } };
1292
1294
  throw TypeError(t2 ? `Object is not iterable.` : `Symbol.iterator is not defined.`);
1293
1295
  }
1294
- function Q(e2, t2) {
1296
+ function Z(e2, t2) {
1295
1297
  var n2 = typeof Symbol == `function` && e2[Symbol.iterator];
1296
1298
  if (!n2) return e2;
1297
1299
  var r2 = n2.call(e2), i2, a2 = [], o2;
@@ -1308,190 +1310,190 @@ function Q(e2, t2) {
1308
1310
  }
1309
1311
  return a2;
1310
1312
  }
1311
- function mi(e2, t2, n2) {
1313
+ function _i(e2, t2, n2) {
1312
1314
  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]);
1313
1315
  return e2.concat(a2 || Array.prototype.slice.call(t2));
1314
1316
  }
1315
- var hi = function(e2) {
1316
- return Object.values(gi()).some(function(t2) {
1317
+ var vi = function(e2) {
1318
+ return Object.values(yi()).some(function(t2) {
1317
1319
  return !!t2?.subMappings?.[e2];
1318
1320
  });
1319
1321
  };
1320
- var gi = function() {
1321
- return Object.values(di).reduce(function(e2, t2) {
1322
- return fi(fi({}, e2), t2);
1322
+ var yi = function() {
1323
+ return Object.values(mi).reduce(function(e2, t2) {
1324
+ return hi(hi({}, e2), t2);
1323
1325
  }, {}) || {};
1324
1326
  };
1325
- var _i = function(e2) {
1326
- var t2 = gi()[e2];
1327
- return !t2 && hi(e2) && console.warn(`You cannot get variables schema for subMappings key (${e2}).`), t2;
1327
+ var bi = function(e2) {
1328
+ var t2 = yi()[e2];
1329
+ return !t2 && vi(e2) && console.warn(`You cannot get variables schema for subMappings key (${e2}).`), t2;
1328
1330
  };
1329
- var vi = function(e2) {
1330
- return Object.entries(di).filter(function(t2) {
1331
- var n2 = Q(t2, 2)[1];
1331
+ var xi = function(e2) {
1332
+ return Object.entries(mi).filter(function(t2) {
1333
+ var n2 = Z(t2, 2)[1];
1332
1334
  return Object.keys(n2).includes(e2);
1333
1335
  }).map(function(e3) {
1334
- return Q(e3, 1)[0];
1336
+ return Z(e3, 1)[0];
1335
1337
  })[0];
1336
1338
  };
1337
- var yi = function(e2) {
1338
- return Object.entries(gi()).find(function(t2) {
1339
- var n2 = Q(t2, 2);
1339
+ var Si = function(e2) {
1340
+ return Object.entries(yi()).find(function(t2) {
1341
+ var n2 = Z(t2, 2);
1340
1342
  return n2[0], !!n2[1]?.subMappings?.[e2];
1341
1343
  });
1342
1344
  };
1343
- var bi = function(e2) {
1345
+ var Ci = function(e2) {
1344
1346
  var t2 = [];
1345
- if (hi(e2)) {
1346
- var n2 = Q(yi(e2), 2);
1347
+ if (vi(e2)) {
1348
+ var n2 = Z(Si(e2), 2);
1347
1349
  n2[0];
1348
1350
  var r2 = n2[1];
1349
- t2.push.apply(t2, mi(mi([], Q(r2?.required || []), false), Q(r2?.subMappings?.[e2]?.required || []), false));
1350
- } else t2.push.apply(t2, mi([], Q(_i(e2)?.required || []), false));
1351
+ t2.push.apply(t2, _i(_i([], Z(r2?.required || []), false), Z(r2?.subMappings?.[e2]?.required || []), false));
1352
+ } else t2.push.apply(t2, _i([], Z(bi(e2)?.required || []), false));
1351
1353
  return t2;
1352
1354
  };
1353
- var xi = function(e2, t2) {
1355
+ var wi = function(e2, t2) {
1354
1356
  var n2;
1355
1357
  return t2 === void 0 && (t2 = ``), (n2 = e2?.main)?.find?.call(n2, function(e3) {
1356
1358
  return e3.key === t2;
1357
1359
  });
1358
1360
  };
1359
- var Si = function(e2, t2) {
1361
+ var Ti = function(e2, t2) {
1360
1362
  return Error(`Url Mappings Error - [${e2}]: ${t2}`);
1361
1363
  };
1362
- var Ci = Object.values(Z);
1363
- var wi = Si(`key`, `must be one of: ${Ci.toString()}`);
1364
- var Ti = function(e2) {
1365
- if (typeof e2 != `string` || !Ci.includes(e2)) return wi;
1364
+ var Ei = Object.values(X);
1365
+ var Di = Ti(`key`, `must be one of: ${Ei.toString()}`);
1366
+ var Oi = function(e2) {
1367
+ if (typeof e2 != `string` || !Ei.includes(e2)) return Di;
1366
1368
  };
1367
- var Ei = Si(`itemData`, `must be on object with string as value, for example: { "slug": "shoes" }`);
1368
- var Di = function(e2) {
1369
+ var ki = Ti(`itemData`, `must be on object with string as value, for example: { "slug": "shoes" }`);
1370
+ var Ai = function(e2) {
1369
1371
  if (typeof e2 != `object` || !e2 || !Object.values(e2).every(function(e3) {
1370
1372
  return typeof e3 == `string`;
1371
- }) || Array.isArray(e2)) return Ei;
1373
+ }) || Array.isArray(e2)) return ki;
1372
1374
  };
1373
- var Oi = Si(`itemData`, `must have required variables, for example: { "slug": "shoes" }`);
1374
- var ki = function(e2, t2) {
1375
+ var ji = Ti(`itemData`, `must have required variables, for example: { "slug": "shoes" }`);
1376
+ var Mi = function(e2, t2) {
1375
1377
  try {
1376
- var n2 = bi(e2);
1378
+ var n2 = Ci(e2);
1377
1379
  if (!n2.every(function(e3) {
1378
1380
  return !!t2[e3];
1379
1381
  }) || !n2.length) throw Error();
1380
1382
  } catch {
1381
- return Oi;
1383
+ return ji;
1382
1384
  }
1383
1385
  };
1384
- var Ai = function(e2) {
1386
+ var Ni = function(e2) {
1385
1387
  var t2 = e2.key, n2 = e2.itemData;
1386
- return [Ti(t2), Di(n2), ki(t2, n2)].find(Boolean);
1388
+ return [Oi(t2), Ai(n2), Mi(t2, n2)].find(Boolean);
1387
1389
  };
1388
- var ji = function(e2) {
1390
+ var Pi = function(e2) {
1389
1391
  return function(t2) {
1390
- var n2 = new RegExp(Ur, `g`), r2 = t2.replace(n2, ``);
1392
+ var n2 = new RegExp(Kr, `g`), r2 = t2.replace(n2, ``);
1391
1393
  return e2?.[r2];
1392
1394
  };
1393
1395
  };
1394
- var Mi = function(e2, t2, n2, r2) {
1396
+ var Fi = function(e2, t2, n2, r2) {
1395
1397
  e2 === void 0 && (e2 = { main: [] }), r2 === void 0 && (r2 = {});
1396
- var i2 = Ai({ key: t2, itemData: n2 });
1398
+ var i2 = Ni({ key: t2, itemData: n2 });
1397
1399
  if (i2) throw i2;
1398
- var a2 = (xi(e2, t2) || {}).mapping, o2 = (r2 || {}).baseUrl;
1400
+ var a2 = (wi(e2, t2) || {}).mapping, o2 = (r2 || {}).baseUrl;
1399
1401
  if (o2 ??= ``, o2 = o2.endsWith(`/`) ? o2?.slice(0, -1) : o2, a2 && typeof a2 == `string`) {
1400
- var s2 = new RegExp(Hr, `g`), c2 = a2.replace(s2, ji(n2));
1402
+ var s2 = new RegExp(Gr, `g`), c2 = a2.replace(s2, Pi(n2));
1401
1403
  return o2.concat(`/${c2}`);
1402
1404
  }
1403
1405
  };
1404
- var Ni = /[.*+?^$()|]/g;
1405
- var Pi = function(e2) {
1406
- var t2 = e2.replace(Ni, `\\$&`).replace(new RegExp(Hr, `g`), Wr);
1406
+ var Ii = /[.*+?^$()|]/g;
1407
+ var Li = function(e2) {
1408
+ var t2 = e2.replace(Ii, `\\$&`).replace(new RegExp(Gr, `g`), qr);
1407
1409
  return RegExp(`^${t2}$`);
1408
1410
  };
1409
- var Fi = function(e2, t2) {
1411
+ var Ri = function(e2, t2) {
1410
1412
  return e2 === void 0 && (e2 = []), e2.find(function(e3) {
1411
- return Pi(e3).test(t2);
1413
+ return Li(e3).test(t2);
1412
1414
  });
1413
1415
  };
1414
- Si(`url`, `Url must be a string`);
1415
- var Ii = function(e2) {
1416
+ Ti(`url`, `Url must be a string`);
1417
+ var zi = function(e2) {
1416
1418
  return [` `, ` `, `
1417
1419
  `].every(function(t2) {
1418
1420
  return !e2?.includes?.call(e2, t2);
1419
1421
  });
1420
1422
  };
1421
- var Li = function(e2) {
1422
- return e2?.length <= Yi.MAX_URL_MAPPING_LENGTH;
1423
+ var Bi = function(e2) {
1424
+ return e2?.length <= Qi.MAX_URL_MAPPING_LENGTH;
1423
1425
  };
1424
- var Ri = function(e2) {
1426
+ var Vi = function(e2) {
1425
1427
  return e2?.split(`/`).every(Boolean);
1426
1428
  };
1427
- var zi = function(e2, t2) {
1429
+ var Hi = function(e2, t2) {
1428
1430
  var n2 = t2.urlMappingKey;
1429
- return bi(n2)?.every(function(t3) {
1431
+ return Ci(n2)?.every(function(t3) {
1430
1432
  return e2?.includes(`{{${t3}}}`);
1431
1433
  });
1432
1434
  };
1433
- var Bi = function(e2) {
1434
- return (e2.match(new RegExp(Hr, `g`))?.length || 0) <= 1;
1435
+ var Ui = function(e2) {
1436
+ return (e2.match(new RegExp(Gr, `g`))?.length || 0) <= 1;
1435
1437
  };
1436
- var Vi = function(e2) {
1437
- return e2?.split(`/`).every(Bi);
1438
+ var Wi = function(e2) {
1439
+ return e2?.split(`/`).every(Ui);
1438
1440
  };
1439
- var Hi = function(e2) {
1441
+ var Gi = function(e2) {
1440
1442
  return [e2.publishedPrefix, e2.savedPrefix].filter(Boolean);
1441
1443
  };
1442
- var Ui = function(e2, t2) {
1444
+ var Ki = function(e2, t2) {
1443
1445
  return t2 === void 0 && (t2 = []), function(n2, r2) {
1444
1446
  var i2 = n2.split(`/`), a2 = n2 === r2;
1445
1447
  if (i2.length < 1 || a2) return true;
1446
- var o2 = Q(r2.split(`/`), 1)[0], s2 = Q(i2, 1)[0];
1448
+ var o2 = Z(r2.split(`/`), 1)[0], s2 = Z(i2, 1)[0];
1447
1449
  return t2.includes(s2) ? true : e2.every(function(e3) {
1448
1450
  return e3 === o2 || e3 !== s2;
1449
1451
  });
1450
1452
  };
1451
1453
  };
1452
- var Wi = function(e2, t2) {
1454
+ var qi = function(e2, t2) {
1453
1455
  var n2 = t2.pathPrefixes;
1454
- return Ui(Object.values(n2).map(function(e3) {
1456
+ return Ki(Object.values(n2).map(function(e3) {
1455
1457
  return e3.publishedPrefix;
1456
- }).filter(Boolean), Hi(t2.pathPrefix))(e2, t2.defaultMapping.defaultPublished);
1458
+ }).filter(Boolean), Gi(t2.pathPrefix))(e2, t2.defaultMapping.defaultPublished);
1457
1459
  };
1458
- var Gi = function(e2, t2) {
1460
+ var Ji = function(e2, t2) {
1459
1461
  var n2 = t2.urlMappingKey, r2 = t2.urlMappings;
1460
- return !Fi(r2.main?.filter(function(e3) {
1462
+ return !Ri(r2.main?.filter(function(e3) {
1461
1463
  return n2 !== e3.key;
1462
1464
  }).map(function(e3) {
1463
1465
  return e3.mapping;
1464
1466
  }), e2);
1465
1467
  };
1466
- var Ki = function(e2) {
1467
- e2 = e2.replace(new RegExp(Hr, `ig`), ``);
1468
+ var Yi = function(e2) {
1469
+ e2 = e2.replace(new RegExp(Gr, `ig`), ``);
1468
1470
  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, ``);
1469
1471
  return n2 && r2;
1470
1472
  };
1471
- var qi = function(e2) {
1472
- var t2 = Q(e2, 1)[0], n2 = e2.slice(-1);
1473
+ var Xi = function(e2) {
1474
+ var t2 = Z(e2, 1)[0], n2 = e2.slice(-1);
1473
1475
  return t2 !== `/` && n2 !== `/`;
1474
1476
  };
1475
- var Ji = function(e2, t2) {
1477
+ var Zi = function(e2, t2) {
1476
1478
  var n2 = t2.pathPrefixes;
1477
- return Ui(Object.values(n2).map(function(e3) {
1479
+ return Ki(Object.values(n2).map(function(e3) {
1478
1480
  return e3.savedPrefix;
1479
- }).filter(Boolean), Hi(t2.pathPrefix))(e2, t2.defaultMapping.defaultSaved);
1481
+ }).filter(Boolean), Gi(t2.pathPrefix))(e2, t2.defaultMapping.defaultSaved);
1480
1482
  };
1481
- var $;
1483
+ var Q;
1482
1484
  (function(e2) {
1483
1485
  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`;
1484
- })($ ||= {});
1485
- var Yi = function() {
1486
+ })(Q ||= {});
1487
+ var Qi = function() {
1486
1488
  function e2(e3) {
1487
1489
  var t2 = e3.urlMappingKey, n2 = e3.pathPrefixes, r2 = e3.urlMappings, i2 = this;
1488
1490
  this.initValidators = function() {
1489
- i2.validators = [[Li, $.MAX_LENGTH_ERROR], [Ii, $.NO_SPACES_ERROR], [qi, $.NO_STARTING_OR_ENDING_SLASH_ERROR], [Ri, $.NO_EMPTY_SEGMENT_ERROR], [Ki, $.NO_INVALID_CHARACTERS_ERROR], [zi, $.CONTAIN_MAIN_VARIABLE_ERROR], [Vi, $.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR], [Wi, $.ONLY_UNIQUE_PUBLISHED_URL_ERROR], [Ji, $.ONLY_UNIQUE_SAVED_URL_ERROR], [Gi, $.ONLY_UNIQUE_MAPPING_ERROR]];
1490
- }, this.urlMappings = r2, this.pathPrefixes = n2, this.urlMappingKey = t2, this.pathPrefix = this.getPathPrefix(), this.defaultMapping = Xi(t2, this.pathPrefix), this.initValidators();
1491
+ i2.validators = [[Bi, Q.MAX_LENGTH_ERROR], [zi, Q.NO_SPACES_ERROR], [Xi, Q.NO_STARTING_OR_ENDING_SLASH_ERROR], [Vi, Q.NO_EMPTY_SEGMENT_ERROR], [Yi, Q.NO_INVALID_CHARACTERS_ERROR], [Hi, Q.CONTAIN_MAIN_VARIABLE_ERROR], [Wi, Q.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR], [qi, Q.ONLY_UNIQUE_PUBLISHED_URL_ERROR], [Zi, Q.ONLY_UNIQUE_SAVED_URL_ERROR], [Ji, Q.ONLY_UNIQUE_MAPPING_ERROR]];
1492
+ }, this.urlMappings = r2, this.pathPrefixes = n2, this.urlMappingKey = t2, this.pathPrefix = this.getPathPrefix(), this.defaultMapping = $i(t2, this.pathPrefix), this.initValidators();
1491
1493
  }
1492
1494
  return e2.prototype.getPathPrefix = function() {
1493
- var t2 = vi(this.urlMappingKey);
1494
- if (!t2) throw hi(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})`);
1495
+ var t2 = xi(this.urlMappingKey);
1496
+ if (!t2) throw vi(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})`);
1495
1497
  return this.pathPrefixes[t2] || e2.FALLBACK_PATH_PREFIX;
1496
1498
  }, Object.defineProperty(e2.prototype, "validatorProps", { get: function() {
1497
1499
  var e3 = this;
@@ -1499,8 +1501,8 @@ var Yi = function() {
1499
1501
  }, enumerable: false, configurable: true }), e2.prototype.validate = function(e3) {
1500
1502
  var t2, n2;
1501
1503
  try {
1502
- for (var r2 = pi(this.validators), i2 = r2.next(); !i2.done; i2 = r2.next()) {
1503
- var a2 = Q(i2.value, 2), o2 = a2[0], s2 = a2[1], c2 = !!o2(e3, this.validatorProps);
1504
+ for (var r2 = gi(this.validators), i2 = r2.next(); !i2.done; i2 = r2.next()) {
1505
+ var a2 = Z(i2.value, 2), o2 = a2[0], s2 = a2[1], c2 = !!o2(e3, this.validatorProps);
1504
1506
  if (!c2) return { isValid: c2, error: s2 };
1505
1507
  }
1506
1508
  } catch (e4) {
@@ -1513,251 +1515,251 @@ var Yi = function() {
1513
1515
  }
1514
1516
  }
1515
1517
  return { isValid: true };
1516
- }, e2.errorArray = Object.values($), e2.MAX_URL_MAPPING_LENGTH = 1e3, e2.FALLBACK_PATH_PREFIX = `unknown`, e2;
1518
+ }, e2.errorArray = Object.values(Q), e2.MAX_URL_MAPPING_LENGTH = 1e3, e2.FALLBACK_PATH_PREFIX = `unknown`, e2;
1517
1519
  }();
1518
- var Xi = function(e2, t2) {
1519
- var n2 = gi()[e2] || { required: [`slug`] }, r2 = n2.required, i2 = n2.defaultPrefix, a2 = {};
1520
- return t2 && typeof t2 == `object` ? (a2.savedPrefix = t2.savedPrefix ?? ``, a2.publishedPrefix = t2.publishedPrefix ?? ``) : (a2.savedPrefix = Yi.FALLBACK_PATH_PREFIX, a2.publishedPrefix = Yi.FALLBACK_PATH_PREFIX), { defaultSaved: mi([a2.savedPrefix, i2], Q(r2?.map(function(e3) {
1520
+ var $i = function(e2, t2) {
1521
+ var n2 = yi()[e2] || { required: [`slug`] }, r2 = n2.required, i2 = n2.defaultPrefix, a2 = {};
1522
+ return t2 && typeof t2 == `object` ? (a2.savedPrefix = t2.savedPrefix ?? ``, a2.publishedPrefix = t2.publishedPrefix ?? ``) : (a2.savedPrefix = Qi.FALLBACK_PATH_PREFIX, a2.publishedPrefix = Qi.FALLBACK_PATH_PREFIX), { defaultSaved: _i([a2.savedPrefix, i2], Z(r2?.map(function(e3) {
1521
1523
  return `{{${e3}}}`;
1522
- })), false).filter(Boolean).join(`/`), defaultPublished: mi([a2.publishedPrefix, i2], Q(r2?.map(function(e3) {
1524
+ })), false).filter(Boolean).join(`/`), defaultPublished: _i([a2.publishedPrefix, i2], Z(r2?.map(function(e3) {
1523
1525
  return `{{${e3}}}`;
1524
1526
  })), false).filter(Boolean).join(`/`) };
1525
1527
  };
1526
- function Zi(e2, t2) {
1527
- return t2 ? Mi(e2, Z.BOOKINGS_SERVICE, { slug: t2 }, { baseUrl: `` }) : void 0;
1528
+ function ea(e2, t2) {
1529
+ return t2 ? Fi(e2, X.BOOKINGS_SERVICE, { slug: t2 }, { baseUrl: `` }) : void 0;
1528
1530
  }
1529
- var Qi = [{ path: `bookingPolicyViolations.earliestBookingDate` }];
1530
- var $i = [{ path: `timeSlots.bookingPolicyViolations.earliestBookingDate` }];
1531
- function ea(e2) {
1532
- return St(Object.assign(e2, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "*.dev.wix-code.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "manage._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }], "www._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], _: [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "blocks._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "create.editorx": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor.wixapps.net": [{ srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }] } }));
1531
+ var ta = [{ path: `bookingPolicyViolations.earliestBookingDate` }];
1532
+ var na = [{ path: `timeSlots.bookingPolicyViolations.earliestBookingDate` }];
1533
+ function ra(e2) {
1534
+ return H(Object.assign(e2, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "*.dev.wix-code.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "manage._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }], "www._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], _: [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "blocks._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "create.editorx": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor.wixapps.net": [{ srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }] } }));
1533
1535
  }
1534
- var ta = `@wix/auto_sdk_bookings_availability-time-slots`;
1535
- function na(e2) {
1536
+ var ia = `@wix/auto_sdk_bookings_availability-time-slots`;
1537
+ function aa(e2) {
1536
1538
  function t2({ host: t3 }) {
1537
- let n2 = tt(e2, [{ transformFn: He, paths: Qi }]);
1538
- return { entityFqdn: `wix.bookings.availability.v2.time_slot`, method: `POST`, methodFqn: `com.wixpress.bookings.availability.v2.AvailabilityTimeSlots.ListAvailabilityTimeSlots`, packageName: ta, migrationOptions: { optInTransformResponse: true }, url: ea({ protoPath: `/v2/time-slots`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => tt(e3, [{ transformFn: Ue, paths: $i }]) };
1539
+ let n2 = B(e2, [{ transformFn: He, paths: ta }]);
1540
+ return { entityFqdn: `wix.bookings.availability.v2.time_slot`, method: `POST`, methodFqn: `com.wixpress.bookings.availability.v2.AvailabilityTimeSlots.ListAvailabilityTimeSlots`, packageName: ia, migrationOptions: { optInTransformResponse: true }, url: ra({ protoPath: `/v2/time-slots`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => B(e3, [{ transformFn: Ue, paths: na }]) };
1539
1541
  }
1540
1542
  return t2;
1541
1543
  }
1542
- async function ra(e2) {
1543
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = na(Ve({ serviceId: e2?.serviceId, fromLocalDate: e2?.fromLocalDate, toLocalDate: e2?.toLocalDate, timeZone: e2?.timeZone, locations: e2?.locations, includeResourceTypeIds: e2?.includeResourceTypeIds, bookable: e2?.bookable, bookingPolicyViolations: e2?.bookingPolicyViolations, timeSlotsPerDay: e2?.timeSlotsPerDay, cursorPaging: e2?.cursorPaging, customerChoices: e2?.customerChoices, resourceTypes: e2?.resourceTypes }));
1544
+ async function oa(e2) {
1545
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = aa(Ve({ serviceId: e2?.serviceId, fromLocalDate: e2?.fromLocalDate, toLocalDate: e2?.toLocalDate, timeZone: e2?.timeZone, locations: e2?.locations, includeResourceTypeIds: e2?.includeResourceTypeIds, bookable: e2?.bookable, bookingPolicyViolations: e2?.bookingPolicyViolations, timeSlotsPerDay: e2?.timeSlotsPerDay, cursorPaging: e2?.cursorPaging, customerChoices: e2?.customerChoices, resourceTypes: e2?.resourceTypes }));
1544
1546
  n2?.onSiteCall?.();
1545
1547
  try {
1546
1548
  let e3 = await t2.request(r2);
1547
1549
  return n2?.onSuccess?.(e3), R(e3.data);
1548
1550
  } catch (e3) {
1549
- let t3 = dt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { serviceId: `$[0].serviceId`, fromLocalDate: `$[0].fromLocalDate`, toLocalDate: `$[0].toLocalDate`, timeZone: `$[0].timeZone`, locations: `$[0].locations`, includeResourceTypeIds: `$[0].includeResourceTypeIds`, bookable: `$[0].bookable`, bookingPolicyViolations: `$[0].bookingPolicyViolations`, timeSlotsPerDay: `$[0].timeSlotsPerDay`, cursorPaging: `$[0].cursorPaging`, customerChoices: `$[0].customerChoices`, resourceTypes: `$[0].resourceTypes` }, singleArgumentUnchanged: false }, [`options`]);
1551
+ let t3 = lt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { serviceId: `$[0].serviceId`, fromLocalDate: `$[0].fromLocalDate`, toLocalDate: `$[0].toLocalDate`, timeZone: `$[0].timeZone`, locations: `$[0].locations`, includeResourceTypeIds: `$[0].includeResourceTypeIds`, bookable: `$[0].bookable`, bookingPolicyViolations: `$[0].bookingPolicyViolations`, timeSlotsPerDay: `$[0].timeSlotsPerDay`, cursorPaging: `$[0].cursorPaging`, customerChoices: `$[0].customerChoices`, resourceTypes: `$[0].resourceTypes` }, singleArgumentUnchanged: false }, [`options`]);
1550
1552
  throw n2?.onError?.(e3), t3;
1551
1553
  }
1552
1554
  }
1553
- function ia(e2) {
1554
- return (t2) => ra(t2, { httpClient: e2 });
1555
+ function sa(e2) {
1556
+ return (t2) => oa(t2, { httpClient: e2 });
1555
1557
  }
1556
- var aa = V(ia);
1557
- var oa = [{ path: `bookingPolicyViolations.earliestBookingDate` }];
1558
- var sa = [{ path: `timeSlots.bookingPolicyViolations.earliestBookingDate` }, { path: `schedulesInfo.firstSessionStart` }, { path: `schedulesInfo.lastSessionEnd` }, { path: `schedulesInfo.enrollmentViolations.earliestBookingDate` }];
1559
- function ca(e2) {
1560
- return St(Object.assign(e2, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "*.dev.wix-code.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "manage._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }], "www._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], _: [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "blocks._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "create.editorx": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor.wixapps.net": [{ srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }] } }));
1558
+ var ca = bt(sa);
1559
+ var la = [{ path: `bookingPolicyViolations.earliestBookingDate` }];
1560
+ var ua = [{ path: `timeSlots.bookingPolicyViolations.earliestBookingDate` }, { path: `schedulesInfo.firstSessionStart` }, { path: `schedulesInfo.lastSessionEnd` }, { path: `schedulesInfo.enrollmentViolations.earliestBookingDate` }];
1561
+ function da(e2) {
1562
+ return H(Object.assign(e2, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "*.dev.wix-code.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "manage._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }], "www._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], _: [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "blocks._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "create.editorx": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor.wixapps.net": [{ srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }] } }));
1561
1563
  }
1562
- var la = `@wix/auto_sdk_bookings_event-time-slots`;
1563
- function ua(e2) {
1564
+ var fa = `@wix/auto_sdk_bookings_event-time-slots`;
1565
+ function pa(e2) {
1564
1566
  function t2({ host: t3 }) {
1565
- let n2 = tt(e2, [{ transformFn: He, paths: oa }]);
1566
- return { entityFqdn: `wix.bookings.availability.v2.time_slot`, method: `POST`, methodFqn: `com.wixpress.bookings.availability.v2.EventTimeSlots.ListEventTimeSlots`, packageName: la, migrationOptions: { optInTransformResponse: true }, url: ca({ protoPath: `/v2/time-slots/event`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => tt(e3, [{ transformFn: Ue, paths: sa }]) };
1567
+ let n2 = B(e2, [{ transformFn: He, paths: la }]);
1568
+ return { entityFqdn: `wix.bookings.availability.v2.time_slot`, method: `POST`, methodFqn: `com.wixpress.bookings.availability.v2.EventTimeSlots.ListEventTimeSlots`, packageName: fa, migrationOptions: { optInTransformResponse: true }, url: da({ protoPath: `/v2/time-slots/event`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => B(e3, [{ transformFn: Ue, paths: ua }]) };
1567
1569
  }
1568
1570
  return t2;
1569
1571
  }
1570
- async function da(e2) {
1571
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ua(Ve({ fromLocalDate: e2?.fromLocalDate, toLocalDate: e2?.toLocalDate, timeZone: e2?.timeZone, serviceIds: e2?.serviceIds, includeNonBookable: e2?.includeNonBookable, minBookableCapacity: e2?.minBookableCapacity, eventFilter: e2?.eventFilter, maxSlotsPerDay: e2?.maxSlotsPerDay, cursorPaging: e2?.cursorPaging, bookingPolicyViolations: e2?.bookingPolicyViolations }));
1572
+ async function ma(e2) {
1573
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = pa(Ve({ fromLocalDate: e2?.fromLocalDate, toLocalDate: e2?.toLocalDate, timeZone: e2?.timeZone, serviceIds: e2?.serviceIds, includeNonBookable: e2?.includeNonBookable, minBookableCapacity: e2?.minBookableCapacity, eventFilter: e2?.eventFilter, maxSlotsPerDay: e2?.maxSlotsPerDay, cursorPaging: e2?.cursorPaging, bookingPolicyViolations: e2?.bookingPolicyViolations }));
1572
1574
  n2?.onSiteCall?.();
1573
1575
  try {
1574
1576
  let e3 = await t2.request(r2);
1575
1577
  return n2?.onSuccess?.(e3), R(e3.data);
1576
1578
  } catch (e3) {
1577
- let t3 = dt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { fromLocalDate: `$[0].fromLocalDate`, toLocalDate: `$[0].toLocalDate`, timeZone: `$[0].timeZone`, serviceIds: `$[0].serviceIds`, includeNonBookable: `$[0].includeNonBookable`, minBookableCapacity: `$[0].minBookableCapacity`, eventFilter: `$[0].eventFilter`, maxSlotsPerDay: `$[0].maxSlotsPerDay`, cursorPaging: `$[0].cursorPaging`, bookingPolicyViolations: `$[0].bookingPolicyViolations` }, singleArgumentUnchanged: false }, [`options`]);
1579
+ let t3 = lt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { fromLocalDate: `$[0].fromLocalDate`, toLocalDate: `$[0].toLocalDate`, timeZone: `$[0].timeZone`, serviceIds: `$[0].serviceIds`, includeNonBookable: `$[0].includeNonBookable`, minBookableCapacity: `$[0].minBookableCapacity`, eventFilter: `$[0].eventFilter`, maxSlotsPerDay: `$[0].maxSlotsPerDay`, cursorPaging: `$[0].cursorPaging`, bookingPolicyViolations: `$[0].bookingPolicyViolations` }, singleArgumentUnchanged: false }, [`options`]);
1578
1580
  throw n2?.onError?.(e3), t3;
1579
1581
  }
1580
1582
  }
1581
- function fa(e2) {
1582
- return (t2) => da(t2, { httpClient: e2 });
1583
+ function ha(e2) {
1584
+ return (t2) => ma(t2, { httpClient: e2 });
1583
1585
  }
1584
- var pa = V(fa);
1585
- var ma = [{ path: `bookingPolicyViolations.earliestBookingDate` }];
1586
- var ha = [{ path: `timeSlots.bookingPolicyViolations.earliestBookingDate` }];
1587
- function ga(e2) {
1588
- return St(Object.assign(e2, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "*.dev.wix-code.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "manage._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }], "www._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], _: [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "blocks._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "create.editorx": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor.wixapps.net": [{ srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }] } }));
1586
+ var ga = bt(ha);
1587
+ var _a = [{ path: `bookingPolicyViolations.earliestBookingDate` }];
1588
+ var va = [{ path: `timeSlots.bookingPolicyViolations.earliestBookingDate` }];
1589
+ function ya(e2) {
1590
+ return H(Object.assign(e2, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "*.dev.wix-code.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "manage._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }], "www._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], _: [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "blocks._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "create.editorx": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor.wixapps.net": [{ srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }] } }));
1589
1591
  }
1590
- var _a = `@wix/auto_sdk_bookings_multi-service-availability-time-slots`;
1591
- function va(e2) {
1592
+ var ba = `@wix/auto_sdk_bookings_multi-service-availability-time-slots`;
1593
+ function xa(e2) {
1592
1594
  function t2({ host: t3 }) {
1593
- let n2 = tt(e2, [{ transformFn: He, paths: ma }]);
1594
- return { entityFqdn: `wix.bookings.availability.v2.time_slot`, method: `POST`, methodFqn: `com.wixpress.bookings.availability.v2.MultiServiceAvailabilityTimeSlots.ListMultiServiceAvailabilityTimeSlots`, packageName: _a, migrationOptions: { optInTransformResponse: true }, url: ga({ protoPath: `/v2/multi-service-time-slots`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => tt(e3, [{ transformFn: Ue, paths: ha }]) };
1595
+ let n2 = B(e2, [{ transformFn: He, paths: _a }]);
1596
+ return { entityFqdn: `wix.bookings.availability.v2.time_slot`, method: `POST`, methodFqn: `com.wixpress.bookings.availability.v2.MultiServiceAvailabilityTimeSlots.ListMultiServiceAvailabilityTimeSlots`, packageName: ba, migrationOptions: { optInTransformResponse: true }, url: ya({ protoPath: `/v2/multi-service-time-slots`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => B(e3, [{ transformFn: Ue, paths: va }]) };
1595
1597
  }
1596
1598
  return t2;
1597
1599
  }
1598
- async function ya(e2) {
1599
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = va(Ve({ services: e2?.services, fromLocalDate: e2?.fromLocalDate, toLocalDate: e2?.toLocalDate, timeZone: e2?.timeZone, location: e2?.location, bookable: e2?.bookable, bookingPolicyViolations: e2?.bookingPolicyViolations, timeSlotsPerDay: e2?.timeSlotsPerDay, cursorPaging: e2?.cursorPaging }));
1600
+ async function Sa(e2) {
1601
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = xa(Ve({ services: e2?.services, fromLocalDate: e2?.fromLocalDate, toLocalDate: e2?.toLocalDate, timeZone: e2?.timeZone, location: e2?.location, bookable: e2?.bookable, bookingPolicyViolations: e2?.bookingPolicyViolations, timeSlotsPerDay: e2?.timeSlotsPerDay, cursorPaging: e2?.cursorPaging }));
1600
1602
  n2?.onSiteCall?.();
1601
1603
  try {
1602
1604
  let e3 = await t2.request(r2);
1603
1605
  return n2?.onSuccess?.(e3), R(e3.data);
1604
1606
  } catch (e3) {
1605
- let t3 = dt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { services: `$[0].services`, fromLocalDate: `$[0].fromLocalDate`, toLocalDate: `$[0].toLocalDate`, timeZone: `$[0].timeZone`, location: `$[0].location`, bookable: `$[0].bookable`, bookingPolicyViolations: `$[0].bookingPolicyViolations`, timeSlotsPerDay: `$[0].timeSlotsPerDay`, cursorPaging: `$[0].cursorPaging` }, singleArgumentUnchanged: false }, [`options`]);
1607
+ let t3 = lt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { services: `$[0].services`, fromLocalDate: `$[0].fromLocalDate`, toLocalDate: `$[0].toLocalDate`, timeZone: `$[0].timeZone`, location: `$[0].location`, bookable: `$[0].bookable`, bookingPolicyViolations: `$[0].bookingPolicyViolations`, timeSlotsPerDay: `$[0].timeSlotsPerDay`, cursorPaging: `$[0].cursorPaging` }, singleArgumentUnchanged: false }, [`options`]);
1606
1608
  throw n2?.onError?.(e3), t3;
1607
1609
  }
1608
1610
  }
1609
- function ba(e2) {
1610
- return (t2) => ya(t2, { httpClient: e2 });
1611
+ function Ca(e2) {
1612
+ return (t2) => Sa(t2, { httpClient: e2 });
1611
1613
  }
1612
- var xa = V(ba);
1613
- var Sa = ((e2) => (e2.UNKNOWN = `UNKNOWN`, e2.CUSTOM = `CUSTOM`, e2.STAFF_MEMBER = `STAFF_MEMBER`, e2.DURATION = `DURATION`, e2.DATE_TIME = `DATE_TIME`, e2.NUMBER_OF_PARTICIPANTS = `NUMBER_OF_PARTICIPANTS`, e2.LOCATION = `LOCATION`, e2.DURATION_RANGE = `DURATION_RANGE`, e2))(Sa || {});
1614
- var Ca = ((e2) => (e2.APPOINTMENT = `APPOINTMENT`, e2.CLASS = `CLASS`, e2.COURSE = `COURSE`, e2))(Ca || {});
1615
- var wa = ((e2) => (e2.CUSTOM = `CUSTOM`, e2.BUSINESS = `BUSINESS`, e2.CUSTOMER = `CUSTOMER`, e2))(wa || {});
1616
- var Ta = [{ path: `timeSlotsConfiguration.createdDate` }, { path: `timeSlotsConfiguration.updatedDate` }];
1617
- function Ea(e2) {
1618
- return St(Object.assign(e2, { domainToMappings: { _: [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/_api/time-slots-config`, destPath: `` }] } }));
1614
+ var wa = bt(Ca);
1615
+ var Ta = ((e2) => (e2.UNKNOWN = `UNKNOWN`, e2.CUSTOM = `CUSTOM`, e2.STAFF_MEMBER = `STAFF_MEMBER`, e2.DURATION = `DURATION`, e2.DATE_TIME = `DATE_TIME`, e2.NUMBER_OF_PARTICIPANTS = `NUMBER_OF_PARTICIPANTS`, e2.LOCATION = `LOCATION`, e2.DURATION_RANGE = `DURATION_RANGE`, e2))(Ta || {});
1616
+ var Ea = ((e2) => (e2.APPOINTMENT = `APPOINTMENT`, e2.CLASS = `CLASS`, e2.COURSE = `COURSE`, e2))(Ea || {});
1617
+ var Da = ((e2) => (e2.CUSTOM = `CUSTOM`, e2.BUSINESS = `BUSINESS`, e2.CUSTOMER = `CUSTOMER`, e2))(Da || {});
1618
+ var Oa = [{ path: `timeSlotsConfiguration.createdDate` }, { path: `timeSlotsConfiguration.updatedDate` }];
1619
+ function ka(e2) {
1620
+ return H(Object.assign(e2, { domainToMappings: { _: [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/_api/time-slots-config`, destPath: `` }] } }));
1619
1621
  }
1620
- var Da = `@wix/auto_sdk_bookings_time-slots-configuration`;
1621
- function Oa(e2) {
1622
+ var Aa = `@wix/auto_sdk_bookings_time-slots-configuration`;
1623
+ function ja(e2) {
1622
1624
  function t2({ host: t3 }) {
1623
- return { entityFqdn: `wix.bookings.timeslots_configuration.v1.time_slots_configuration`, method: `GET`, methodFqn: `wix.bookings.timeslots.configuration.v1.TimeSlotsConfigurationService.GetTimeSlotsConfigurationByAppId`, packageName: Da, migrationOptions: { optInTransformResponse: true }, url: Ea({ protoPath: `/v1/time-slots-configurations/app/{appId}`, data: e2, host: t3 }), params: xt(e2), transformResponse: (e3) => tt(e3, [{ transformFn: Ue, paths: Ta }]) };
1625
+ return { entityFqdn: `wix.bookings.timeslots_configuration.v1.time_slots_configuration`, method: `GET`, methodFqn: `wix.bookings.timeslots.configuration.v1.TimeSlotsConfigurationService.GetTimeSlotsConfigurationByAppId`, packageName: Aa, migrationOptions: { optInTransformResponse: true }, url: ka({ protoPath: `/v1/time-slots-configurations/app/{appId}`, data: e2, host: t3 }), params: xt(e2), transformResponse: (e3) => B(e3, [{ transformFn: Ue, paths: Oa }]) };
1624
1626
  }
1625
1627
  return t2;
1626
1628
  }
1627
- async function ka(e2) {
1628
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Oa(Ve({ appId: e2 }));
1629
+ async function Ma(e2) {
1630
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ja(Ve({ appId: e2 }));
1629
1631
  n2?.onSiteCall?.();
1630
1632
  try {
1631
1633
  let e3 = await t2.request(r2);
1632
1634
  return n2?.onSuccess?.(e3), R(e3.data);
1633
1635
  } catch (e3) {
1634
- let t3 = dt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { appId: `$[0]` }, singleArgumentUnchanged: false }, [`appId`]);
1636
+ let t3 = lt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { appId: `$[0]` }, singleArgumentUnchanged: false }, [`appId`]);
1635
1637
  throw n2?.onError?.(e3), t3;
1636
1638
  }
1637
1639
  }
1638
- function Aa(e2) {
1639
- return (t2) => ka(t2, { httpClient: e2 });
1640
+ function Na(e2) {
1641
+ return (t2) => Ma(t2, { httpClient: e2 });
1640
1642
  }
1641
- var ja = V(Aa);
1642
- var Ma = [{ path: `bookingsSettings.createdDate` }, { path: `bookingsSettings.updatedDate` }];
1643
- var Na = [{ path: `bookingsSettings.siteProperties.address.coordinates.latitude` }, { path: `bookingsSettings.siteProperties.address.coordinates.longitude` }];
1644
- function Pa(e2) {
1645
- return St(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: `` }] } }));
1643
+ var Pa = bt(Na);
1644
+ var Fa = [{ path: `bookingsSettings.createdDate` }, { path: `bookingsSettings.updatedDate` }];
1645
+ var Ia = [{ path: `bookingsSettings.siteProperties.address.coordinates.latitude` }, { path: `bookingsSettings.siteProperties.address.coordinates.longitude` }];
1646
+ function La(e2) {
1647
+ return H(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: `` }] } }));
1646
1648
  }
1647
- var Fa = `@wix/auto_sdk_bookings_bookings-settings`;
1648
- function Ia(e2) {
1649
+ var Ra = `@wix/auto_sdk_bookings_bookings-settings`;
1650
+ function za(e2) {
1649
1651
  function t2({ host: t3 }) {
1650
- return { entityFqdn: `wix.bookings.v2.bookings_settings`, method: `GET`, methodFqn: `wix.bookings.settings.v2.BookingsSettingsService.GetBookingsSettings`, packageName: Fa, migrationOptions: { optInTransformResponse: true }, url: Pa({ protoPath: `/v2/settings`, data: e2, host: t3 }), params: xt(e2), transformResponse: (e3) => tt(e3, [{ transformFn: Ue, paths: Ma }, { transformFn: qt, paths: Na }]), fallback: [{ method: `GET`, url: Pa({ protoPath: `/v2/settings`, data: e2, host: t3 }), params: xt(e2) }] };
1652
+ return { entityFqdn: `wix.bookings.v2.bookings_settings`, method: `GET`, methodFqn: `wix.bookings.settings.v2.BookingsSettingsService.GetBookingsSettings`, packageName: Ra, migrationOptions: { optInTransformResponse: true }, url: La({ protoPath: `/v2/settings`, data: e2, host: t3 }), params: xt(e2), transformResponse: (e3) => B(e3, [{ transformFn: Ue, paths: Fa }, { transformFn: Kt, paths: Ia }]), fallback: [{ method: `GET`, url: La({ protoPath: `/v2/settings`, data: e2, host: t3 }), params: xt(e2) }] };
1651
1653
  }
1652
1654
  return t2;
1653
1655
  }
1654
- var La = ((e2) => (e2.BUSINESS_TIME_ZONE = `BUSINESS_TIME_ZONE`, e2.CUSTOMER_TIME_ZONE = `CUSTOMER_TIME_ZONE`, e2))(La || {});
1655
- async function Ra() {
1656
- let { httpClient: e2, sideEffects: t2 } = arguments[0], n2 = Ia(Ve({}));
1656
+ var Ba = ((e2) => (e2.BUSINESS_TIME_ZONE = `BUSINESS_TIME_ZONE`, e2.CUSTOMER_TIME_ZONE = `CUSTOMER_TIME_ZONE`, e2))(Ba || {});
1657
+ async function Va() {
1658
+ let { httpClient: e2, sideEffects: t2 } = arguments[0], n2 = za(Ve({}));
1657
1659
  t2?.onSiteCall?.();
1658
1660
  try {
1659
1661
  let r2 = await e2.request(n2);
1660
1662
  return t2?.onSuccess?.(r2), R(r2.data)?.bookingsSettings;
1661
1663
  } catch (e3) {
1662
- let n3 = dt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: {}, singleArgumentUnchanged: false }, []);
1664
+ let n3 = lt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: {}, singleArgumentUnchanged: false }, []);
1663
1665
  throw t2?.onError?.(e3), n3;
1664
1666
  }
1665
1667
  }
1666
- function za(e2) {
1667
- return () => Ra({ httpClient: e2 });
1668
+ function Ha(e2) {
1669
+ return () => Va({ httpClient: e2 });
1668
1670
  }
1669
- var Ba = V(za);
1670
- function Va(e2) {
1671
+ var Ua = bt(Ha);
1672
+ function Wa(e2) {
1671
1673
  return e2.business?._id ?? null;
1672
1674
  }
1673
- function Ha(e2) {
1675
+ function Ga(e2) {
1674
1676
  return e2.business?.name ?? null;
1675
1677
  }
1676
- function Ua(e2) {
1677
- return (e2?.locations ?? []).filter((e3) => e3.type === wa.BUSINESS).map((e3) => ({ id: Va(e3) ?? ``, label: Ha(e3) ?? `` })).filter((e3) => e3.id !== ``).sort((e3, t2) => e3.label.localeCompare(t2.label));
1678
+ function Ka(e2) {
1679
+ return (e2?.locations ?? []).filter((e3) => e3.type === Da.BUSINESS).map((e3) => ({ id: Wa(e3) ?? ``, label: Ga(e3) ?? `` })).filter((e3) => e3.id !== ``).sort((e3, t2) => e3.label.localeCompare(t2.label));
1678
1680
  }
1679
- var Wa = (e2) => e2 === Ca.APPOINTMENT;
1680
- var Ga = (e2) => e2 === Ca.CLASS;
1681
- var Ka = (e2) => e2 === Ca.COURSE;
1682
- var qa = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
1683
- function Ja(e2) {
1681
+ var qa = (e2) => e2 === Ea.APPOINTMENT;
1682
+ var Ja = (e2) => e2 === Ea.CLASS;
1683
+ var Ya = (e2) => e2 === Ea.COURSE;
1684
+ var Xa = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
1685
+ function Za(e2) {
1684
1686
  if (!e2) return null;
1685
- let t2 = eo(e2).map((e3) => e3.id), n2 = { ...e2.durationChoiceId ? { durationChoiceId: e2.durationChoiceId } : {}, ...e2.durationInMinutes ? { durationInMinutes: e2.durationInMinutes } : {}, ...t2.length ? { addOnIds: t2 } : {}, ...e2.requestedGender ? { requestedGender: { gender: e2.requestedGender } } : {} };
1687
+ let t2 = ro(e2).map((e3) => e3.id), n2 = { ...e2.durationChoiceId ? { durationChoiceId: e2.durationChoiceId } : {}, ...e2.durationInMinutes ? { durationInMinutes: e2.durationInMinutes } : {}, ...t2.length ? { addOnIds: t2 } : {}, ...e2.requestedGender ? { requestedGender: { gender: e2.requestedGender } } : {} };
1686
1688
  return Object.keys(n2).length ? n2 : null;
1687
1689
  }
1688
- function Ya(e2) {
1690
+ function Qa(e2) {
1689
1691
  return (e2?.services.length ?? 0) > 1;
1690
1692
  }
1691
- var Xa = (e2) => ({ valid: false, reason: e2 });
1692
- function Za(e2) {
1693
+ var $a = (e2) => ({ valid: false, reason: e2 });
1694
+ function eo(e2) {
1693
1695
  let t2 = e2?.services ?? [];
1694
- if (!Ya(e2) || t2.some((e3) => !e3.serviceId)) return Xa(`too-few-services`);
1695
- if (t2.some((e3) => e3.serviceType && e3.serviceType !== `APPOINTMENT`)) return Xa(`not-appointment`);
1696
+ if (!Qa(e2) || t2.some((e3) => !e3.serviceId)) return $a(`too-few-services`);
1697
+ if (t2.some((e3) => e3.serviceType && e3.serviceType !== `APPOINTMENT`)) return $a(`not-appointment`);
1696
1698
  let n2 = t2[0].locationType ?? `BUSINESS`, r2 = t2[0].locationId ?? null;
1697
- if (t2.some((e3) => (e3.locationType ?? `BUSINESS`) !== n2 || (e3.locationId ?? null) !== r2)) return Xa(`location-mixed`);
1698
- if (r2 && n2 !== `BUSINESS`) return Xa(`location-id-not-business`);
1699
- let i2 = t2.map((e3) => ({ serviceId: e3.serviceId, staff: $a(e3), customerChoices: Ja(e3) }));
1699
+ if (t2.some((e3) => (e3.locationType ?? `BUSINESS`) !== n2 || (e3.locationId ?? null) !== r2)) return $a(`location-mixed`);
1700
+ if (r2 && n2 !== `BUSINESS`) return $a(`location-id-not-business`);
1701
+ let i2 = t2.map((e3) => ({ serviceId: e3.serviceId, staff: no(e3), customerChoices: Za(e3) }));
1700
1702
  return { valid: true, locationId: r2, locationType: n2, services: i2, requestKey: JSON.stringify([n2, r2, i2]) };
1701
1703
  }
1702
- var Qa = `staff`;
1703
- function $a(e2) {
1704
- let t2 = e2.resources?.find((e3) => e3.type === Qa);
1704
+ var to = `staff`;
1705
+ function no(e2) {
1706
+ let t2 = e2.resources?.find((e3) => e3.type === to);
1705
1707
  if (!t2) return null;
1706
1708
  let n2 = t2.ids[0];
1707
1709
  return n2 ? { anyResource: false, staffMemberId: n2 } : t2.anyResource ? { anyResource: true } : null;
1708
1710
  }
1709
- function eo(e2) {
1711
+ function ro(e2) {
1710
1712
  return e2.addOns ?? [];
1711
1713
  }
1712
- function to(e2, t2) {
1714
+ function io(e2, t2) {
1713
1715
  let n2 = e2(t2);
1714
1716
  return n2 ? n2.replace(/\/$/, ``) || `/` : null;
1715
1717
  }
1716
- function no(e2, t2, n2) {
1718
+ function ao(e2, t2, n2) {
1717
1719
  let r2 = e2(t2);
1718
1720
  return !r2 || !n2 ? null : `${r2.replace(/\/$/, ``)}/${n2}`;
1719
1721
  }
1720
- function ro(e2, t2) {
1722
+ function oo(e2, t2) {
1721
1723
  switch (e2) {
1722
1724
  case `servicePage`:
1723
- return (t2.slug ? t2.buildCustomServiceUrl(t2.slug) : void 0) ?? no(t2.appSectionUrl, Vr.SERVICE_PAGE, t2.slug);
1725
+ return (t2.slug ? t2.buildCustomServiceUrl(t2.slug) : void 0) ?? ao(t2.appSectionUrl, Wr.SERVICE_PAGE, t2.slug);
1724
1726
  case `bookingCalendar`:
1725
- return t2.isMultiService ? to(t2.appSectionUrl, Vr.CALENDAR_PAGE) : no(t2.appSectionUrl, Vr.CALENDAR_PAGE, t2.slug);
1727
+ return t2.isMultiService ? io(t2.appSectionUrl, Wr.CALENDAR_PAGE) : ao(t2.appSectionUrl, Wr.CALENDAR_PAGE, t2.slug);
1726
1728
  case `bookingForm`:
1727
- return t2.serviceId ? no(t2.appSectionUrl, Vr.FORM_PAGE, t2.slug) : null;
1729
+ return t2.serviceId ? ao(t2.appSectionUrl, Wr.FORM_PAGE, t2.slug) : null;
1728
1730
  default:
1729
1731
  return null;
1730
1732
  }
1731
1733
  }
1732
- var io = (e2) => e2.target === `_blank`;
1733
- var ao = (e2, t2) => t2 === `/` ? e2 : new URL(`.${t2}`, `${e2}/`).href;
1734
- var oo = (e2, t2, n2) => n2 ? `.${t2}` : so(e2, t2);
1735
- var so = (e2, t2) => e2 ? ao(e2, t2) : t2;
1736
- var co = () => {
1737
- let { previewMode: e2 } = f(Mr), t2 = f(Fr), n2 = t2.siteUrl.replace(/\/$/, ``), { navigateTo: i2 } = f(Pr), a2 = f(Ir), o2 = d(), s2 = r(async (t3) => {
1738
- let r2 = oo(n2, t3, e2);
1734
+ var so = (e2) => e2.target === `_blank`;
1735
+ var co = (e2, t2) => t2 === `/` ? e2 : new URL(`.${t2}`, `${e2}/`).href;
1736
+ var lo = (e2, t2, n2) => n2 ? `.${t2}` : uo(e2, t2);
1737
+ var uo = (e2, t2) => e2 ? co(e2, t2) : t2;
1738
+ var fo = () => {
1739
+ let { previewMode: e2 } = f(Fr), t2 = f(Rr), n2 = t2.siteUrl.replace(/\/$/, ``), { navigateTo: i2 } = f(Lr), a2 = f(zr), o2 = d(), s2 = r(async (t3) => {
1740
+ let r2 = lo(n2, t3, e2);
1739
1741
  await i2({ href: r2 });
1740
1742
  }, [e2, n2, i2]), c2 = r(async (e3) => {
1741
- await i2(io(e3) ? { href: e3.href, type: `ExternalLink`, target: `_blank` } : { href: e3.href });
1742
- }, [i2]), l2 = r((e3) => so(n2, e3), [n2]), u2 = r((e3) => t2.appSectionRelativeUrl(Lr, e3), [t2]), p2 = r((e3) => Zi(a2.urlMappings, e3), [a2]), m2 = r((e3, t3) => ro(e3, { ...t3, appSectionUrl: u2, buildCustomServiceUrl: p2 }), [u2, p2]), h2 = r((e3, t3) => {
1743
+ await i2(so(e3) ? { href: e3.href, type: `ExternalLink`, target: `_blank` } : { href: e3.href });
1744
+ }, [i2]), l2 = r((e3) => uo(n2, e3), [n2]), u2 = r((e3) => t2.appSectionRelativeUrl(Br, e3), [t2]), p2 = r((e3) => ea(a2.urlMappings, e3), [a2]), m2 = r((e3, t3) => oo(e3, { ...t3, appSectionUrl: u2, buildCustomServiceUrl: p2 }), [u2, p2]), h2 = r((e3, t3) => {
1743
1745
  let r2 = m2(e3, t3);
1744
- return r2 && n2 ? ao(n2, r2) : null;
1746
+ return r2 && n2 ? co(n2, r2) : null;
1745
1747
  }, [m2, n2]), g2 = r((e3, t3) => {
1746
1748
  let n3 = m2(e3, t3);
1747
1749
  n3 && s2(n3);
1748
- }, [m2, s2]), _2 = r(() => u2(Vr.FORM_PAGE) || void 0, [u2]), v2 = r((e3) => Object.values(o2(Nr).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]);
1749
- return { navigate: s2, navigateToHref: c2, resolvePath: m2, toHref: l2, resolveAbsoluteUrl: h2, navigateTo: g2, getBookingFormPath: _2, getCartPagePath: r(() => v2(Rr), [v2]), getThankYouPagePath: r((e3) => {
1750
- let t3 = v2(zr);
1750
+ }, [m2, s2]), _2 = r(() => u2(Wr.FORM_PAGE) || void 0, [u2]), v2 = r((e3) => Object.values(o2(Ir).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]);
1751
+ return { navigate: s2, navigateToHref: c2, resolvePath: m2, toHref: l2, resolveAbsoluteUrl: h2, navigateTo: g2, getBookingFormPath: _2, getCartPagePath: r(() => v2(Vr), [v2]), getThankYouPagePath: r((e3) => {
1752
+ let t3 = v2(Hr);
1751
1753
  return t3 ? `${t3}/${e3}?origin=bookings` : void 0;
1752
1754
  }, [v2]) };
1753
1755
  };
1754
- function lo(e2) {
1756
+ function po(e2) {
1755
1757
  return e2?.details?.applicationError?.code;
1756
1758
  }
1757
- function uo() {
1759
+ function mo() {
1758
1760
  let e2 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
1759
1761
  if (e2) return { initWixModules(t3, n3) {
1760
- return fo(() => e2(t3, n3));
1762
+ return ho(() => e2(t3, n3));
1761
1763
  }, fetchWithAuth() {
1762
1764
  throw Error(`fetchWithAuth is not available in this context`);
1763
1765
  }, graphql() {
@@ -1767,10 +1769,10 @@ function uo() {
1767
1769
  if (t2 || n2) return { initWixModules(e3, r2) {
1768
1770
  if (r2) {
1769
1771
  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`);
1770
- return fo(() => n2.use(e3));
1772
+ return ho(() => n2.use(e3));
1771
1773
  }
1772
1774
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1773
- return fo(() => t2.use(e3));
1775
+ return ho(() => t2.use(e3));
1774
1776
  }, fetchWithAuth: (e3, n3) => {
1775
1777
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1776
1778
  return t2.fetchWithAuth(e3, n3);
@@ -1782,7 +1784,7 @@ function uo() {
1782
1784
  return t2.graphql(e3, n3, r2);
1783
1785
  } };
1784
1786
  }
1785
- function fo(e2) {
1787
+ function ho(e2) {
1786
1788
  let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
1787
1789
  globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
1788
1790
  try {
@@ -1791,17 +1793,17 @@ function fo(e2) {
1791
1793
  globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
1792
1794
  }
1793
1795
  }
1794
- function po(e2, t2) {
1796
+ function go(e2, t2) {
1795
1797
  return { ...e2, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
1796
- let r2 = uo();
1798
+ let r2 = mo();
1797
1799
  if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1798
1800
  return r2.initWixModules(e2)[t3].apply(void 0, n2);
1799
1801
  }])) };
1800
1802
  }
1801
- function mo(e2) {
1802
- return po({ __type: `host`, create: (t2) => Object.entries(e2).reduce((e3, [n2, r2]) => ({ ...e3, [n2]: r2(t2) }), {}) }, Object.keys(e2));
1803
+ function _o(e2) {
1804
+ return go({ __type: `host`, create: (t2) => Object.entries(e2).reduce((e3, [n2, r2]) => ({ ...e3, [n2]: r2(t2) }), {}) }, Object.keys(e2));
1803
1805
  }
1804
- var ho = class {
1806
+ var vo = class {
1805
1807
  constructor(e2) {
1806
1808
  this.message = e2, this.captureException = () => {
1807
1809
  console.error(this.message);
@@ -1816,110 +1818,110 @@ var ho = class {
1816
1818
  };
1817
1819
  }
1818
1820
  };
1819
- var go = (e2) => new ho(e2);
1820
- var _o = mo({ getMonitoringClient: (e2) => () => e2.getMonitoringClient ? e2.getMonitoringClient() : go(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
1821
- var vo = { 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` };
1822
- function yo(e2) {
1821
+ var yo = (e2) => new vo(e2);
1822
+ var bo = _o({ getMonitoringClient: (e2) => () => e2.getMonitoringClient ? e2.getMonitoringClient() : yo(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
1823
+ var xo = { 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` };
1824
+ function So(e2) {
1823
1825
  try {
1824
- let t2 = _o.getMonitoringClient?.();
1826
+ let t2 = bo.getMonitoringClient?.();
1825
1827
  return t2 && typeof t2[e2] == `function` ? t2 : null;
1826
1828
  } catch {
1827
1829
  return null;
1828
1830
  }
1829
1831
  }
1830
- function bo(e2, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
1831
- let a2 = yo(`captureException`);
1832
+ function $(e2, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
1833
+ let a2 = So(`captureException`);
1832
1834
  if (!a2) return;
1833
1835
  let o2 = e2 instanceof Error ? e2 : Error(String(e2));
1834
1836
  a2.captureException(o2, { level: r2, tags: { feature: t2, action: n2 }, ...i2 ? { contexts: i2 } : {} });
1835
1837
  }
1836
- var xo = (e2) => {
1838
+ var Co = (e2) => {
1837
1839
  let t2 = (e3) => e3 < 10 ? `0${e3}` : `${e3}`;
1838
1840
  return `${e2.getFullYear()}-${t2(e2.getMonth() + 1)}-${t2(e2.getDate())}`;
1839
1841
  };
1840
- var So = (e2) => /* @__PURE__ */ new Date(`${e2}T00:00:00`);
1841
- var Co = (e2, t2) => new Intl.DateTimeFormat(`en-CA`, { year: `numeric`, month: `2-digit`, day: `2-digit`, ...t2 ? { timeZone: t2 } : {} }).format(e2);
1842
- var wo = (e2) => `${xo(e2)}T00:00:00`;
1843
- var To = (e2) => `${xo(e2)}T23:59:59`;
1844
- function Eo(e2, t2) {
1845
- return `${Co(e2, t2)}T${new Intl.DateTimeFormat(`en-GB`, { timeZone: t2, hourCycle: `h23`, hour: `2-digit`, minute: `2-digit`, second: `2-digit` }).format(e2)}`;
1842
+ var wo = (e2) => /* @__PURE__ */ new Date(`${e2}T00:00:00`);
1843
+ var To = (e2, t2) => new Intl.DateTimeFormat(`en-CA`, { year: `numeric`, month: `2-digit`, day: `2-digit`, ...t2 ? { timeZone: t2 } : {} }).format(e2);
1844
+ var Eo = (e2) => `${Co(e2)}T00:00:00`;
1845
+ var Do = (e2) => `${Co(e2)}T23:59:59`;
1846
+ function Oo(e2, t2) {
1847
+ return `${To(e2, t2)}T${new Intl.DateTimeFormat(`en-GB`, { timeZone: t2, hourCycle: `h23`, hour: `2-digit`, minute: `2-digit`, second: `2-digit` }).format(e2)}`;
1846
1848
  }
1847
- function Do(e2, t2) {
1848
- let n2 = Eo(new Date(Date.now()), t2);
1849
+ function ko(e2, t2) {
1850
+ let n2 = Oo(new Date(Date.now()), t2);
1849
1851
  return n2.slice(0, 10) === e2 ? n2 : `${e2}T00:00:00`;
1850
1852
  }
1851
- var Oo = /^\d{4}-\d{2}-\d{2}$/;
1852
- var ko = 864e5;
1853
- function Ao(e2) {
1854
- if (typeof e2 != `string` || !Oo.test(e2)) return false;
1855
- let t2 = So(e2);
1856
- return !Number.isNaN(t2.getTime()) && xo(t2) === e2;
1853
+ var Ao = /^\d{4}-\d{2}-\d{2}$/;
1854
+ var jo = 864e5;
1855
+ function Mo(e2) {
1856
+ if (typeof e2 != `string` || !Ao.test(e2)) return false;
1857
+ let t2 = wo(e2);
1858
+ return !Number.isNaN(t2.getTime()) && Co(t2) === e2;
1857
1859
  }
1858
- function jo(e2) {
1860
+ function No(e2) {
1859
1861
  if (!e2 || typeof e2 != `object`) return false;
1860
1862
  let { startDate: t2, endDate: n2 } = e2;
1861
- return Ao(t2) && Ao(n2) && t2 <= n2;
1863
+ return Mo(t2) && Mo(n2) && t2 <= n2;
1862
1864
  }
1863
- function Mo(e2, t2) {
1864
- let n2 = So(e2);
1865
- return n2.setDate(n2.getDate() + t2), xo(n2);
1865
+ function Po(e2, t2) {
1866
+ let n2 = wo(e2);
1867
+ return n2.setDate(n2.getDate() + t2), Co(n2);
1866
1868
  }
1867
- function No({ startDate: e2, endDate: t2 }) {
1868
- let n2 = So(t2).getTime() - So(e2).getTime();
1869
- return Math.round(n2 / ko) + 1;
1869
+ function Fo({ startDate: e2, endDate: t2 }) {
1870
+ let n2 = wo(t2).getTime() - wo(e2).getTime();
1871
+ return Math.round(n2 / jo) + 1;
1870
1872
  }
1871
- function Po(e2) {
1872
- let t2 = So(e2), n2 = new Date(t2.getFullYear(), t2.getMonth(), 1), r2 = new Date(t2.getFullYear(), t2.getMonth() + 1, 0);
1873
- return { startDate: xo(n2), endDate: xo(r2) };
1873
+ function Io(e2) {
1874
+ let t2 = wo(e2), n2 = new Date(t2.getFullYear(), t2.getMonth(), 1), r2 = new Date(t2.getFullYear(), t2.getMonth() + 1, 0);
1875
+ return { startDate: Co(n2), endDate: Co(r2) };
1874
1876
  }
1875
- function Fo(e2) {
1876
- let t2 = Po(e2.startDate);
1877
+ function Lo(e2) {
1878
+ let t2 = Io(e2.startDate);
1877
1879
  return t2.startDate === e2.startDate && t2.endDate === e2.endDate;
1878
1880
  }
1879
- function Io(e2, t2) {
1880
- if (Fo(e2)) {
1881
- let n3 = So(e2.startDate);
1882
- return Po(xo(new Date(n3.getFullYear(), n3.getMonth() + t2, 1)));
1881
+ function Ro(e2, t2) {
1882
+ if (Lo(e2)) {
1883
+ let n3 = wo(e2.startDate);
1884
+ return Io(Co(new Date(n3.getFullYear(), n3.getMonth() + t2, 1)));
1883
1885
  }
1884
- let n2 = t2 * No(e2);
1885
- return { startDate: Mo(e2.startDate, n2), endDate: Mo(e2.endDate, n2) };
1886
+ let n2 = t2 * Fo(e2);
1887
+ return { startDate: Po(e2.startDate, n2), endDate: Po(e2.endDate, n2) };
1886
1888
  }
1887
- function Lo(e2, t2) {
1889
+ function zo(e2, t2) {
1888
1890
  return e2 >= t2.startDate && e2 <= t2.endDate;
1889
1891
  }
1890
- function Ro(e2) {
1891
- let t2 = So(e2), n2 = new Date(t2.getFullYear(), t2.getMonth() + 2, 0).getDate(), r2 = Math.min(t2.getDate(), n2);
1892
- return xo(new Date(t2.getFullYear(), t2.getMonth() + 1, r2));
1892
+ function Bo(e2) {
1893
+ let t2 = wo(e2), n2 = new Date(t2.getFullYear(), t2.getMonth() + 2, 0).getDate(), r2 = Math.min(t2.getDate(), n2);
1894
+ return Co(new Date(t2.getFullYear(), t2.getMonth() + 1, r2));
1893
1895
  }
1894
- function zo(e2) {
1896
+ function Vo(e2) {
1895
1897
  let t2 = [], n2 = e2.startDate;
1896
1898
  for (; n2 <= e2.endDate; ) {
1897
- let r2 = Mo(Ro(n2), -1), i2 = r2 < e2.endDate ? r2 : e2.endDate;
1898
- t2.push({ startDate: n2, endDate: i2 }), n2 = Mo(i2, 1);
1899
+ let r2 = Po(Bo(n2), -1), i2 = r2 < e2.endDate ? r2 : e2.endDate;
1900
+ t2.push({ startDate: n2, endDate: i2 }), n2 = Po(i2, 1);
1899
1901
  }
1900
1902
  return t2;
1901
1903
  }
1902
- function Bo({ allowGenderSelection: e2, staffSelectionStrategy: t2 }) {
1904
+ function Ho({ allowGenderSelection: e2, staffSelectionStrategy: t2 }) {
1903
1905
  return e2 && t2 !== `CUSTOMER_CANNOT_CHOOSE`;
1904
1906
  }
1905
- async function Vo() {
1906
- let e2 = await ja(Lr);
1907
+ async function Uo() {
1908
+ let e2 = await Pa(Br);
1907
1909
  return { businessTimeZone: e2.timeSlotsConfiguration?.displayTimeZone?.timeZone || null, staffSelectionStrategy: e2.timeSlotsConfiguration?.staffSelection?.strategy ?? null, allowGenderSelection: e2.timeSlotsConfiguration?.staffSelection?.allowGenderSelection ?? false };
1908
1910
  }
1909
- function Ho(e2) {
1911
+ function Wo(e2) {
1910
1912
  let t2 = e2.location?._id || (e2.location?.locationType ? `${e2.location.locationType}:${e2.location.formattedAddress ?? ``}` : ``);
1911
1913
  return `${e2.localStartDate ?? ``}|${e2.localEndDate ?? ``}|${t2}`;
1912
1914
  }
1913
- function Uo(e2) {
1915
+ function Go(e2) {
1914
1916
  return e2.availableResources?.[0]?.resources?.[0]?._id ?? null;
1915
1917
  }
1916
- function Wo(e2) {
1917
- return `${Ho(e2)}|${Uo(e2) ?? ``}`;
1918
+ function Ko(e2) {
1919
+ return `${Wo(e2)}|${Go(e2) ?? ``}`;
1918
1920
  }
1919
- function Go(e2) {
1921
+ function qo(e2) {
1920
1922
  let t2 = /* @__PURE__ */ new Map();
1921
1923
  for (let n2 of e2) {
1922
- let e3 = Ho(n2), r2 = t2.get(e3);
1924
+ let e3 = Wo(n2), r2 = t2.get(e3);
1923
1925
  r2 ? r2.push(n2) : t2.set(e3, [n2]);
1924
1926
  }
1925
1927
  return [...t2.values()].map((e3) => {
@@ -1928,94 +1930,116 @@ function Go(e2) {
1928
1930
  return { ...n2[0], availableResources: n2.flatMap((e4) => e4.availableResources ?? []) };
1929
1931
  });
1930
1932
  }
1931
- function Ko(e2) {
1933
+ function Jo(e2) {
1932
1934
  return e2 ? { locations: [{ _id: e2, locationType: `BUSINESS` }] } : {};
1933
1935
  }
1934
- function qo(e2) {
1935
- return e2 ? { resourceTypes: [{ resourceTypeId: Br, resourceIds: [e2] }] } : {};
1936
+ function Yo(e2) {
1937
+ return e2 ? { resourceTypes: [{ resourceTypeId: Ur, resourceIds: [e2] }] } : {};
1936
1938
  }
1937
- function Jo(e2) {
1939
+ function Xo(e2) {
1938
1940
  let { requestedGender: t2, ...n2 } = e2;
1939
1941
  return Object.keys(n2).length ? n2 : void 0;
1940
1942
  }
1941
- function Yo(e2, t2) {
1943
+ function Zo(e2, t2) {
1942
1944
  if (!e2) return {};
1943
- let n2 = t2 ? Jo(e2) : e2;
1945
+ let n2 = t2 ? Xo(e2) : e2;
1944
1946
  return n2 ? { customerChoices: n2 } : {};
1945
1947
  }
1946
- var Xo = `REQUESTED_GENDER_NOT_ALLOWED`;
1947
- function Zo(e2) {
1948
- return lo(e2) === Xo;
1948
+ var Qo = `REQUESTED_GENDER_NOT_ALLOWED`;
1949
+ function $o(e2) {
1950
+ return po(e2) === Qo;
1949
1951
  }
1950
- var Qo = false;
1951
- var $o = /* @__PURE__ */ new Set();
1952
- function es() {
1953
- return Qo;
1952
+ var es = false;
1953
+ var ts = /* @__PURE__ */ new Set();
1954
+ function ns() {
1955
+ return es;
1954
1956
  }
1955
- function ts(e2) {
1956
- return $o.add(e2), () => $o.delete(e2);
1957
+ function rs(e2) {
1958
+ return ts.add(e2), () => ts.delete(e2);
1957
1959
  }
1958
- function ns() {
1959
- Qo || (Qo = true, $o.forEach((e2) => e2()));
1960
+ function is() {
1961
+ es || (es = true, ts.forEach((e2) => e2()));
1960
1962
  }
1961
- async function rs(e2) {
1963
+ async function as(e2) {
1962
1964
  let { customerChoices: t2, ...n2 } = e2, r2 = (e3) => {
1963
- let t3 = Jo(e3);
1964
- return aa({ ...n2, ...t3 ? { customerChoices: t3 } : {} });
1965
+ let t3 = Xo(e3);
1966
+ return ca({ ...n2, ...t3 ? { customerChoices: t3 } : {} });
1965
1967
  };
1966
- if (Qo && t2?.requestedGender) return r2(t2);
1968
+ if (es && t2?.requestedGender) return r2(t2);
1967
1969
  try {
1968
- return await aa(e2);
1970
+ return await ca(e2);
1969
1971
  } catch (e3) {
1970
- if (!t2?.requestedGender || !Zo(e3)) throw e3;
1971
- return bo(e3, { feature: vo.timeSlots, action: `requested-gender-rejected`, level: `warning` }), ns(), r2(t2);
1972
+ if (!t2?.requestedGender || !$o(e3)) throw e3;
1973
+ return $(e3, { feature: xo.timeSlots, action: `requested-gender-rejected`, level: `warning` }), is(), r2(t2);
1972
1974
  }
1973
1975
  }
1974
- function is(e2, t2, n2) {
1976
+ function os(e2, t2, n2) {
1975
1977
  return { ...e2 ? { "location.id": e2 } : {}, ...t2 ? { "resources.id": { $hasSome: [t2] } } : {}, ...n2 ? { remainingCapacity: { $gte: n2 } } : {} };
1976
1978
  }
1977
- async function as(e2) {
1978
- let t2 = await pa(e2);
1979
+ async function ss(e2) {
1980
+ let t2 = await ga(e2);
1979
1981
  return { timeSlots: t2.timeSlots ?? [], timeZone: t2.timeZone ?? null, nextCursor: t2.pagingMetadata?.cursors?.next || null };
1980
1982
  }
1981
- function os({ serviceId: e2, serviceType: t2, fromLocalDate: n2, toLocalDate: r2, timeZone: i2, locationId: a2, staffId: o2, onlyAvailableSlots: s2 = false, customerChoices: c2, minRemainingCapacity: l2, timeSlotsPerDay: u2, limit: d2, cursor: f2 }) {
1982
- return Wa(t2) ? ss({ serviceId: e2, fromLocalDate: n2, toLocalDate: r2, timeZone: i2, locationId: a2, staffId: o2, onlyAvailableSlots: s2, customerChoices: c2, timeSlotsPerDay: u2, limit: d2, cursor: f2 }) : as({ serviceIds: [e2], fromLocalDate: n2, ...r2 ? { toLocalDate: r2 } : {}, ...i2 ? { timeZone: i2 } : {}, includeNonBookable: !s2, eventFilter: { type: t2, ...is(a2, o2, l2) }, cursorPaging: { limit: d2, ...f2 ? { cursor: f2 } : {} } });
1983
+ function cs({ serviceId: e2, serviceType: t2, fromLocalDate: n2, toLocalDate: r2, timeZone: i2, locationId: a2, staffId: o2, onlyAvailableSlots: s2 = false, customerChoices: c2, minRemainingCapacity: l2, timeSlotsPerDay: u2, limit: d2, cursor: f2 }) {
1984
+ return qa(t2) ? ls({ serviceId: e2, fromLocalDate: n2, toLocalDate: r2, timeZone: i2, locationId: a2, staffId: o2, onlyAvailableSlots: s2, customerChoices: c2, timeSlotsPerDay: u2, limit: d2, cursor: f2 }) : ss({ serviceIds: [e2], fromLocalDate: n2, ...r2 ? { toLocalDate: r2 } : {}, ...i2 ? { timeZone: i2 } : {}, includeNonBookable: !s2, eventFilter: { type: t2, ...os(a2, o2, l2) }, cursorPaging: { limit: d2, ...f2 ? { cursor: f2 } : {} } });
1983
1985
  }
1984
- async function ss({ serviceId: e2, fromLocalDate: t2, toLocalDate: n2, timeZone: r2, locationId: i2, staffId: a2, onlyAvailableSlots: o2, customerChoices: s2, timeSlotsPerDay: c2, limit: l2, cursor: u2 }) {
1985
- let d2 = await rs({ serviceId: e2, fromLocalDate: t2, ...n2 ? { toLocalDate: n2 } : {}, ...r2 ? { timeZone: r2 } : {}, ...o2 ? { bookable: true } : {}, ...Ko(i2), ...qo(a2), ...Yo(s2, a2), includeResourceTypeIds: [Br], ...c2 == null ? {} : { timeSlotsPerDay: c2 }, cursorPaging: { limit: l2, ...u2 ? { cursor: u2 } : {} } });
1986
+ async function ls({ serviceId: e2, fromLocalDate: t2, toLocalDate: n2, timeZone: r2, locationId: i2, staffId: a2, onlyAvailableSlots: o2, customerChoices: s2, timeSlotsPerDay: c2, limit: l2, cursor: u2 }) {
1987
+ let d2 = await as({ serviceId: e2, fromLocalDate: t2, ...n2 ? { toLocalDate: n2 } : {}, ...r2 ? { timeZone: r2 } : {}, ...o2 ? { bookable: true } : {}, ...Jo(i2), ...Yo(a2), ...Zo(s2, a2), includeResourceTypeIds: [Ur], ...c2 == null ? {} : { timeSlotsPerDay: c2 }, cursorPaging: { limit: l2, ...u2 ? { cursor: u2 } : {} } });
1986
1988
  return { timeSlots: d2.timeSlots ?? [], timeZone: d2.timeZone ?? null, nextCursor: d2.cursorPagingMetadata?.cursors?.next || null };
1987
1989
  }
1988
- var cs = 6;
1989
- var ls = 864e5;
1990
- function us(e2) {
1991
- let t2 = e2 ? So(e2) : new Date(Date.now()), n2 = new Date(t2.getFullYear(), t2.getMonth() + cs + 1, 1), r2 = new Date(n2.getTime() - ls);
1992
- return { fromLocalDate: wo(t2), toLocalDate: To(r2) };
1990
+ var us = 6;
1991
+ var ds = 864e5;
1992
+ function fs(e2) {
1993
+ let t2 = e2 ? wo(e2) : new Date(Date.now()), n2 = new Date(t2.getFullYear(), t2.getMonth() + us + 1, 1), r2 = new Date(n2.getTime() - ds);
1994
+ return { fromLocalDate: Eo(t2), toLocalDate: Do(r2) };
1993
1995
  }
1994
- async function ds({ serviceId: e2, serviceType: t2, timeZone: n2, limit: r2, onlyAvailableSlots: i2 = true, fromDate: a2, locationId: o2, staffId: s2, customerChoices: c2, minRemainingCapacity: l2 }) {
1995
- let { fromLocalDate: u2, toLocalDate: d2 } = us(a2);
1996
- if (Ga(t2) || Ka(t2)) {
1997
- let a3 = { ...Ka(t2) ? { type: `COURSE` } : {}, ...is(o2, s2, l2) }, c3 = await as({ serviceIds: [e2], fromLocalDate: u2, toLocalDate: d2, ...n2 ? { timeZone: n2 } : {}, includeNonBookable: !i2, ...Object.keys(a3).length ? { eventFilter: a3 } : {}, ...r2 == null ? {} : { cursorPaging: { limit: r2 } } });
1996
+ async function ps({ serviceId: e2, serviceType: t2, timeZone: n2, limit: r2, onlyAvailableSlots: i2 = true, fromDate: a2, locationId: o2, staffId: s2, customerChoices: c2, minRemainingCapacity: l2 }) {
1997
+ let { fromLocalDate: u2, toLocalDate: d2 } = fs(a2);
1998
+ if (Ja(t2) || Ya(t2)) {
1999
+ let a3 = { ...Ya(t2) ? { type: `COURSE` } : {}, ...os(o2, s2, l2) }, c3 = await ss({ serviceIds: [e2], fromLocalDate: u2, toLocalDate: d2, ...n2 ? { timeZone: n2 } : {}, includeNonBookable: !i2, ...Object.keys(a3).length ? { eventFilter: a3 } : {}, ...r2 == null ? {} : { cursorPaging: { limit: r2 } } });
1998
2000
  return { timeSlots: c3.timeSlots, timeZone: c3.timeZone };
1999
2001
  }
2000
- let f2 = await rs({ serviceId: e2, fromLocalDate: u2, toLocalDate: d2, ...n2 ? { timeZone: n2 } : {}, ...i2 ? { bookable: true } : {}, ...Ko(o2), ...qo(s2), ...Yo(c2, s2), includeResourceTypeIds: [Br], ...r2 == null ? {} : { cursorPaging: { limit: r2 } } });
2002
+ let f2 = await as({ serviceId: e2, fromLocalDate: u2, toLocalDate: d2, ...n2 ? { timeZone: n2 } : {}, ...i2 ? { bookable: true } : {}, ...Jo(o2), ...Yo(s2), ...Zo(c2, s2), includeResourceTypeIds: [Ur], ...r2 == null ? {} : { cursorPaging: { limit: r2 } } });
2001
2003
  return { timeSlots: f2.timeSlots ?? [], timeZone: f2.timeZone ?? null };
2002
2004
  }
2003
- var fs = 1e3;
2004
- async function ps({ serviceId: e2, serviceType: t2, date: n2, timeZone: r2, onlyAvailableSlots: i2, locationId: a2, staffId: o2, customerChoices: s2, minRemainingCapacity: c2, fromLocalDate: l2, toLocalDate: u2 }) {
2005
- let d2 = `${n2}T00:00:00`, f2 = `${n2}T23:59:59`, p2 = Ka(t2) ? `COURSE` : Ga(t2) ? `CLASS` : `APPOINTMENT`, m2 = [], h2 = null, g2;
2005
+ var ms = 1e3;
2006
+ async function hs({ serviceId: e2, serviceType: t2, date: n2, timeZone: r2, onlyAvailableSlots: i2, locationId: a2, staffId: o2, customerChoices: s2, minRemainingCapacity: c2, fromLocalDate: l2, toLocalDate: u2 }) {
2007
+ let d2 = `${n2}T00:00:00`, f2 = `${n2}T23:59:59`, p2 = Ya(t2) ? `COURSE` : Ja(t2) ? `CLASS` : `APPOINTMENT`, m2 = [], h2 = null, g2;
2006
2008
  do {
2007
- let t3 = await os({ serviceId: e2, serviceType: p2, fromLocalDate: l2 && l2 > d2 ? l2 : d2, toLocalDate: u2 && u2 < f2 ? u2 : f2, timeZone: r2, locationId: a2, staffId: o2, onlyAvailableSlots: i2, customerChoices: s2, minRemainingCapacity: c2, limit: fs, cursor: g2 });
2009
+ let t3 = await cs({ serviceId: e2, serviceType: p2, fromLocalDate: l2 && l2 > d2 ? l2 : d2, toLocalDate: u2 && u2 < f2 ? u2 : f2, timeZone: r2, locationId: a2, staffId: o2, onlyAvailableSlots: i2, customerChoices: s2, minRemainingCapacity: c2, limit: ms, cursor: g2 });
2008
2010
  m2.push(...t3.timeSlots), h2 = t3.timeZone ?? h2, g2 = t3.nextCursor ?? void 0;
2009
2011
  } while (g2);
2010
2012
  return { timeSlots: m2, timeZone: h2 };
2011
2013
  }
2012
- function ms(e2) {
2014
+ function gs(e2) {
2013
2015
  return { slotStart: e2.localStartDate, slotEnd: e2.localEndDate, eventId: e2.eventInfo?.eventId, scheduleId: e2.scheduleId ?? void 0, locationId: e2.location?._id ?? void 0, locationType: e2.location?.locationType ?? void 0 };
2014
2016
  }
2015
- function hs(e2) {
2016
- return e2?.options?.values?.[0]?.type === Sa.STAFF_MEMBER;
2017
+ function _s(e2) {
2018
+ return e2?.options?.values?.[0]?.type === Ta.STAFF_MEMBER;
2019
+ }
2020
+ function vs(e2) {
2021
+ return e2.staffMemberDetails?.staffMembers ?? [];
2017
2022
  }
2018
- function gs(e2) {
2023
+ function ys(e2, t2) {
2024
+ let n2 = e2.workingHoursLocationCoverage;
2025
+ return { staffMemberId: e2.staffMemberId ?? ``, name: e2.name ?? null, image: null, isSelected: t2 === e2.staffMemberId, ...n2 ? { locationCoverage: { availableAtAllLocations: n2.availableAtAllLocations ?? false, locationIds: n2.locationIds ?? [] } } : {} };
2026
+ }
2027
+ function bs(e2, t2) {
2028
+ let n2 = e2.locationCoverage;
2029
+ return !n2 || n2.availableAtAllLocations || n2.locationIds.includes(t2);
2030
+ }
2031
+ function xs(e2, t2) {
2032
+ return t2 ? e2.filter((e3) => bs(e3, t2)) : e2;
2033
+ }
2034
+ function Ss(e2, t2) {
2035
+ if (t2.length === 0) return e2;
2036
+ let n2 = e2.filter((e3) => xs(t2, e3.id).length > 0);
2037
+ return n2.length > 0 ? n2 : e2;
2038
+ }
2039
+ function Cs(e2) {
2040
+ return vs(e2).map((e3) => ys(e3, null));
2041
+ }
2042
+ function ws(e2) {
2019
2043
  let t2 = e2;
2020
2044
  if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e3) => {
2021
2045
  t2.__state = { status: `fulfilled`, value: e3 };
@@ -2024,33 +2048,33 @@ function gs(e2) {
2024
2048
  })), t2.__state.status === `fulfilled`) return t2.__state.value;
2025
2049
  throw t2.__state.status === `rejected` ? t2.__state.reason : t2;
2026
2050
  }
2027
- function _s(e2) {
2051
+ function Ts(e2) {
2028
2052
  let t2 = Promise.resolve(e2);
2029
2053
  return t2.__state = { status: `fulfilled`, value: e2 }, t2;
2030
2054
  }
2031
- var vs = jr(`@wix/site-service-warmup-data`);
2032
- function ys() {
2055
+ var Es = Pr(`@wix/site-service-warmup-data`);
2056
+ function Ds() {
2033
2057
  try {
2034
2058
  return d();
2035
2059
  } catch {
2036
2060
  return null;
2037
2061
  }
2038
2062
  }
2039
- function bs(e2) {
2063
+ function Os(e2) {
2040
2064
  try {
2041
- return e2 ? e2(vs) : null;
2065
+ return e2 ? e2(Es) : null;
2042
2066
  } catch {
2043
2067
  return null;
2044
2068
  }
2045
2069
  }
2046
- function xs() {
2047
- let e2 = bs(ys()), t2 = typeof window > `u`;
2070
+ function ks() {
2071
+ let e2 = Os(Ds()), t2 = typeof window > `u`;
2048
2072
  return { scope: e2 ?? void 0, get: async (n2) => {
2049
2073
  if (t2 || !e2) return null;
2050
2074
  try {
2051
2075
  return await e2.get(n2);
2052
2076
  } catch (e3) {
2053
- return bo(e3, { feature: vo.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2077
+ return $(e3, { feature: xo.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2054
2078
  }
2055
2079
  }, set: (n2, r2) => {
2056
2080
  if (t2 && e2) try {
@@ -2059,57 +2083,57 @@ function xs() {
2059
2083
  }
2060
2084
  } };
2061
2085
  }
2062
- var Ss = `bookings-uou`;
2063
- function Cs() {
2064
- return `${Ss}:bookings-settings`;
2086
+ var As = `bookings-uou`;
2087
+ function js() {
2088
+ return `${As}:bookings-settings`;
2065
2089
  }
2066
- function ws() {
2067
- return `${Ss}:time-slots-configuration`;
2090
+ function Ms() {
2091
+ return `${As}:time-slots-configuration`;
2068
2092
  }
2069
- var Ts = 5e3;
2070
- var Es = 100;
2071
- var Ds = `wix-warmup-data`;
2072
- var Os = null;
2073
- function ks(e2) {
2093
+ var Ns = 5e3;
2094
+ var Ps = 100;
2095
+ var Fs = `wix-warmup-data`;
2096
+ var Is = null;
2097
+ function Ls(e2) {
2074
2098
  if (typeof document < `u`) try {
2075
- let t2 = document.getElementById(Ds)?.textContent;
2076
- return t2 ? (Os?.text !== t2 && (Os = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Os.data[e2] ?? void 0) : void 0;
2099
+ let t2 = document.getElementById(Fs)?.textContent;
2100
+ return t2 ? (Is?.text !== t2 && (Is = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Is.data[e2] ?? void 0) : void 0;
2077
2101
  } catch {
2078
2102
  return;
2079
2103
  }
2080
2104
  }
2081
- var As = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2082
- var js = As();
2083
- var Ms = /* @__PURE__ */ new WeakMap();
2084
- var Ns = /* @__PURE__ */ new WeakMap();
2085
- function Ps(e2) {
2086
- if (!e2) return js;
2087
- let t2 = Ms.get(e2);
2088
- return t2 || (t2 = As(), Ms.set(e2, t2)), t2;
2105
+ var Rs = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2106
+ var zs = Rs();
2107
+ var Bs = /* @__PURE__ */ new WeakMap();
2108
+ var Vs = /* @__PURE__ */ new WeakMap();
2109
+ function Hs(e2) {
2110
+ if (!e2) return zs;
2111
+ let t2 = Bs.get(e2);
2112
+ return t2 || (t2 = Rs(), Bs.set(e2, t2)), t2;
2089
2113
  }
2090
- function Fs({ key: e2, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2114
+ function Us({ key: e2, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2091
2115
  if (e2 === null) return n2();
2092
2116
  if (typeof window > `u`) {
2093
2117
  let r3 = () => n2().then((n3) => (t2.set(e2, n3), n3)), { scope: i3 } = t2;
2094
2118
  if (!i3) return r3();
2095
- let a3 = Ns.get(i3);
2096
- a3 || (a3 = /* @__PURE__ */ new Map(), Ns.set(i3, a3));
2119
+ let a3 = Vs.get(i3);
2120
+ a3 || (a3 = /* @__PURE__ */ new Map(), Vs.set(i3, a3));
2097
2121
  let o3 = a3.get(e2);
2098
2122
  if (o3) return o3;
2099
2123
  let s3 = r3();
2100
2124
  return a3.set(e2, s3), s3.catch(() => a3.delete(e2)), s3;
2101
2125
  }
2102
- let i2 = Ps(t2.scope), a2 = Date.now();
2126
+ let i2 = Hs(t2.scope), a2 = Date.now();
2103
2127
  for (let [e3, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e3);
2104
2128
  let o2 = i2.promises.get(e2);
2105
2129
  if (o2 && !r2) return o2.promise;
2106
2130
  r2 && i2.invalidatedWarmup.add(e2);
2107
2131
  let s2 = !i2.invalidatedWarmup.has(e2);
2108
2132
  if (s2) {
2109
- let t3 = ks(e2);
2133
+ let t3 = Ls(e2);
2110
2134
  if (t3 !== void 0) {
2111
- let n3 = _s(t3);
2112
- return i2.promises.set(e2, { promise: n3, expiresAt: a2 + Ts }), n3;
2135
+ let n3 = Ts(t3);
2136
+ return i2.promises.set(e2, { promise: n3, expiresAt: a2 + Ns }), n3;
2113
2137
  }
2114
2138
  }
2115
2139
  let c2 = (async () => {
@@ -2119,69 +2143,69 @@ function Fs({ key: e2, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2119
2143
  }
2120
2144
  return n2();
2121
2145
  })();
2122
- i2.promises.size >= Es && i2.promises.delete(i2.promises.keys().next().value);
2146
+ i2.promises.size >= Ps && i2.promises.delete(i2.promises.keys().next().value);
2123
2147
  let l2 = { promise: c2, expiresAt: 1 / 0 };
2124
2148
  return i2.promises.set(e2, l2), c2.then(() => {
2125
- l2.expiresAt = Date.now() + Ts;
2149
+ l2.expiresAt = Date.now() + Ns;
2126
2150
  }, () => {
2127
2151
  i2.promises.get(e2) === l2 && i2.promises.delete(e2);
2128
2152
  }), c2;
2129
2153
  }
2130
- var Is = { displayTimeZonePolicy: { basedOn: La.BUSINESS_TIME_ZONE, customerCanChange: false }, multiServiceAppointmentsEnabled: false };
2131
- async function Ls() {
2154
+ var Ws = { displayTimeZonePolicy: { basedOn: Ba.BUSINESS_TIME_ZONE, customerCanChange: false }, multiServiceAppointmentsEnabled: false };
2155
+ async function Gs() {
2132
2156
  try {
2133
- let e2 = await Ba();
2134
- return { displayTimeZonePolicy: { basedOn: e2.displayTimeZone?.basedOn ?? La.BUSINESS_TIME_ZONE, customerCanChange: e2.displayTimeZone?.customerCanChange ?? false }, multiServiceAppointmentsEnabled: e2.multiServiceAppointments?.enabled ?? false };
2157
+ let e2 = await Ua();
2158
+ return { displayTimeZonePolicy: { basedOn: e2.displayTimeZone?.basedOn ?? Ba.BUSINESS_TIME_ZONE, customerCanChange: e2.displayTimeZone?.customerCanChange ?? false }, multiServiceAppointmentsEnabled: e2.multiServiceAppointments?.enabled ?? false };
2135
2159
  } catch (e2) {
2136
- return bo(e2, { feature: vo.bookingsSettings, action: `fetch-bookings-settings`, level: `warning` }), Is;
2160
+ return $(e2, { feature: xo.bookingsSettings, action: `fetch-bookings-settings`, level: `warning` }), Ws;
2137
2161
  }
2138
2162
  }
2139
- var Rs = { isLoading: true };
2140
- var zs = n(null);
2141
- var Bs = `useBookingsSettingsContext must be used within BookingsSettingsProvider`;
2142
- function Vs() {
2143
- let e2 = i(zs);
2144
- if (!e2) throw Error(Bs);
2163
+ var Ks = { isLoading: true };
2164
+ var qs = n(null);
2165
+ var Js = `useBookingsSettingsContext must be used within BookingsSettingsProvider`;
2166
+ function Ys() {
2167
+ let e2 = i(qs);
2168
+ if (!e2) throw Error(Js);
2145
2169
  return e2;
2146
2170
  }
2147
- function Hs(e2) {
2148
- return e2.basedOn === La.CUSTOMER_TIME_ZONE ? Intl.DateTimeFormat().resolvedOptions().timeZone : void 0;
2171
+ function Xs(e2) {
2172
+ return e2.basedOn === Ba.CUSTOMER_TIME_ZONE ? Intl.DateTimeFormat().resolvedOptions().timeZone : void 0;
2149
2173
  }
2150
- function Us() {
2151
- let e2 = Vs();
2152
- return e2.isLoading ? void 0 : Hs(e2.displayTimeZonePolicy);
2174
+ function Zs() {
2175
+ let e2 = Ys();
2176
+ return e2.isLoading ? void 0 : Xs(e2.displayTimeZonePolicy);
2153
2177
  }
2154
- function Ws({ settingsPromise: e2, children: t2 }) {
2155
- let n2 = gs(e2), r2 = o(() => ({ isLoading: false, ...n2 }), [n2]);
2156
- return p(zs.Provider, { value: r2, children: t2 });
2178
+ function Qs({ settingsPromise: e2, children: t2 }) {
2179
+ let n2 = ws(e2), r2 = o(() => ({ isLoading: false, ...n2 }), [n2]);
2180
+ return p(qs.Provider, { value: r2, children: t2 });
2157
2181
  }
2158
- function Gs({ bookingsSettings: e2, children: n2 }) {
2159
- let r2 = xs(), [i2] = c(() => e2 ? null : Fs({ key: Cs(), warmupData: r2, fetchData: Ls }));
2160
- return e2 ? p(zs.Provider, { value: { isLoading: false, ...e2 }, children: n2 }) : p(t, { fallback: p(zs.Provider, { value: Rs, children: n2 }), children: p(Ws, { settingsPromise: i2, children: n2 }) });
2182
+ function $s({ bookingsSettings: e2, children: n2 }) {
2183
+ let r2 = ks(), [i2] = c(() => e2 ? null : Us({ key: js(), warmupData: r2, fetchData: Gs }));
2184
+ return e2 ? p(qs.Provider, { value: { isLoading: false, ...e2 }, children: n2 }) : p(t, { fallback: p(qs.Provider, { value: Ks, children: n2 }), children: p(Qs, { settingsPromise: i2, children: n2 }) });
2161
2185
  }
2162
- var Ks = 1e3;
2163
- var qs = class extends e {
2186
+ var ec = 1e3;
2187
+ var tc = class extends e {
2164
2188
  state = { hasError: false };
2165
2189
  static getDerivedStateFromError() {
2166
2190
  return { hasError: true };
2167
2191
  }
2168
2192
  componentDidCatch(e2, t2) {
2169
- bo(e2, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2193
+ $(e2, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2170
2194
  }
2171
2195
  render() {
2172
2196
  return this.state.hasError ? this.props.fallback : this.props.children;
2173
2197
  }
2174
2198
  };
2175
- var Js = `appSectionParams`;
2176
- function Ys(e2) {
2177
- let t2 = e2.searchParams.get(Js);
2199
+ var nc = `appSectionParams`;
2200
+ function rc(e2) {
2201
+ let t2 = e2.searchParams.get(nc);
2178
2202
  if (t2 === null) return e2;
2179
2203
  let n2 = new URL(e2);
2180
- n2.searchParams.delete(Js);
2181
- for (let [e3, r2] of Object.entries(Xs(t2))) typeof r2 == `string` && !n2.searchParams.has(e3) && n2.searchParams.set(e3, r2);
2204
+ n2.searchParams.delete(nc);
2205
+ for (let [e3, r2] of Object.entries(ic(t2))) typeof r2 == `string` && !n2.searchParams.has(e3) && n2.searchParams.set(e3, r2);
2182
2206
  return n2;
2183
2207
  }
2184
- function Xs(e2) {
2208
+ function ic(e2) {
2185
2209
  try {
2186
2210
  let t2 = JSON.parse(e2);
2187
2211
  return t2 && typeof t2 == `object` && !Array.isArray(t2) ? t2 : {};
@@ -2189,16 +2213,16 @@ function Xs(e2) {
2189
2213
  return {};
2190
2214
  }
2191
2215
  }
2192
- var Zs = `bookings-uou:url-change`;
2193
- var Qs = (e2) => {
2216
+ var ac = `bookings-uou:url-change`;
2217
+ var oc = (e2) => {
2194
2218
  let t2 = new URL(e2);
2195
2219
  return t2.searchParams.sort(), t2.href;
2196
2220
  };
2197
- function $s(e2, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2221
+ function sc(e2, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2198
2222
  let r2 = globalThis.window;
2199
2223
  if (!r2?.history) return;
2200
2224
  let i2 = new URL(r2.location.href);
2201
- if (Qs(i2) === Qs(e2)) return;
2225
+ if (oc(i2) === oc(e2)) return;
2202
2226
  let a2 = { scrollY: r2.scrollY };
2203
2227
  if (n2) r2.history.replaceState(a2, ``, e2.href);
2204
2228
  else {
@@ -2209,82 +2233,82 @@ function $s(e2, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2209
2233
  return;
2210
2234
  }
2211
2235
  }
2212
- r2.dispatchEvent(new Event(Zs));
2236
+ r2.dispatchEvent(new Event(ac));
2213
2237
  }
2214
- function ec(e2) {
2238
+ function cc(e2) {
2215
2239
  let t2 = globalThis.window;
2216
- return t2 ? (t2.addEventListener(Zs, e2), t2.addEventListener(`popstate`, e2), () => {
2217
- t2.removeEventListener(Zs, e2), t2.removeEventListener(`popstate`, e2);
2240
+ return t2 ? (t2.addEventListener(ac, e2), t2.addEventListener(`popstate`, e2), () => {
2241
+ t2.removeEventListener(ac, e2), t2.removeEventListener(`popstate`, e2);
2218
2242
  }) : () => {
2219
2243
  };
2220
2244
  }
2221
- var tc = (e2) => {
2245
+ var lc = (e2) => {
2222
2246
  try {
2223
2247
  return decodeURIComponent(e2);
2224
2248
  } catch {
2225
2249
  return e2;
2226
2250
  }
2227
2251
  };
2228
- function nc(e2, t2) {
2252
+ function uc(e2, t2) {
2229
2253
  let n2 = t2 ? new URL(t2).pathname : `/`;
2230
- return `./${tc(new URL(e2).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2254
+ return `./${lc(new URL(e2).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2231
2255
  }
2232
- function rc() {
2233
- let e2 = f(Fr), t2 = r(() => e2.currentUrl, [e2]), n2 = l(ec, t2, t2), i2 = o(() => Ys(new URL(n2)), [n2]), a2 = e2.siteUrl.replace(/\/$/, ``);
2234
- return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => Ys(new URL(e2.currentUrl)), getRelativeUrl: () => nc(e2.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: $s };
2256
+ function dc() {
2257
+ let e2 = f(Rr), t2 = r(() => e2.currentUrl, [e2]), n2 = l(cc, t2, t2), i2 = o(() => rc(new URL(n2)), [n2]), a2 = e2.siteUrl.replace(/\/$/, ``);
2258
+ return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => rc(new URL(e2.currentUrl)), getRelativeUrl: () => uc(e2.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: sc };
2235
2259
  }
2236
- var ic = jr(`@wix/site-service-business-logger`);
2237
- function ac(e2) {
2260
+ var fc = Pr(`@wix/site-service-business-logger`);
2261
+ function pc(e2) {
2238
2262
  return { evid: 32, src: 16, endpoint: ``, params: e2 };
2239
2263
  }
2240
- function oc(e2) {
2264
+ function mc(e2) {
2241
2265
  return { evid: 33, src: 16, endpoint: ``, params: e2 };
2242
2266
  }
2243
- function sc(e2) {
2267
+ function hc(e2) {
2244
2268
  return { evid: 34, src: 16, endpoint: ``, params: e2 };
2245
2269
  }
2246
- var cc = { 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` };
2247
- Vr.BOOK_ONLINE;
2248
- var lc = `new_bookings_server`;
2249
- var uc = { TIMEZONE_PICKER: `timezone_picker`, TIME_PICKER: `time_picker`, BOOKING_DETAILS: `booking_details`, RESCHEDULE_DIALOG: `reschedule_dialog` };
2250
- var dc = { DROPDOWN: `dropdown`, TIME_SLOT: `time_slot`, EXPAND: `expand`, COLLAPSE: `collapse` };
2251
- var fc = (e2) => {
2252
- let { reportBi: t2 } = f(ic);
2270
+ var gc = { 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` };
2271
+ Wr.BOOK_ONLINE;
2272
+ var _c = `new_bookings_server`;
2273
+ var vc = { TIMEZONE_PICKER: `timezone_picker`, TIME_PICKER: `time_picker`, BOOKING_DETAILS: `booking_details`, RESCHEDULE_DIALOG: `reschedule_dialog` };
2274
+ var yc = { DROPDOWN: `dropdown`, TIME_SLOT: `time_slot`, EXPAND: `expand`, COLLAPSE: `collapse` };
2275
+ var bc = (e2) => {
2276
+ let { reportBi: t2 } = f(fc);
2253
2277
  return r((n2) => {
2254
- t2({ widget_name: e2, bookingsPlatform: lc, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
2278
+ t2({ widget_name: e2, bookingsPlatform: _c, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
2255
2279
  }, [t2, e2]);
2256
2280
  };
2257
- var pc = (e2, t2 = true) => {
2258
- let n2 = fc(e2), { getParsedUrl: r2 } = rc(), i2 = s(false);
2281
+ var xc = (e2, t2 = true) => {
2282
+ let n2 = bc(e2), { getParsedUrl: r2 } = dc(), i2 = s(false);
2259
2283
  a(() => {
2260
- t2 && !i2.current && (i2.current = true, n2(ac({ referralInfo: r2().searchParams.get(qa.referral) ?? void 0 })));
2284
+ t2 && !i2.current && (i2.current = true, n2(pc({ referralInfo: r2().searchParams.get(Xa.referral) ?? void 0 })));
2261
2285
  }, [t2, n2, r2]);
2262
2286
  };
2263
- function mc(e2) {
2287
+ function Sc(e2) {
2264
2288
  return { evid: 596, src: 16, endpoint: `wixboost-ugc`, params: e2 };
2265
2289
  }
2266
- function hc(e2, t2) {
2290
+ function Cc(e2, t2) {
2267
2291
  let n2 = new Intl.DateTimeFormat(`en-US`, { timeZone: t2, hourCycle: `h23`, year: `numeric`, month: `2-digit`, day: `2-digit`, hour: `2-digit`, minute: `2-digit`, second: `2-digit` }).formatToParts(new Date(e2)), r2 = {};
2268
2292
  for (let e3 of n2) e3.type !== `literal` && (r2[e3.type] = Number(e3.value));
2269
2293
  return Date.UTC(r2.year, r2.month - 1, r2.day, r2.hour, r2.minute, r2.second) - e2;
2270
2294
  }
2271
- function gc(e2, t2) {
2295
+ function wc(e2, t2) {
2272
2296
  let n2 = e2.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?/);
2273
2297
  if (!n2) return null;
2274
2298
  let [, r2, i2, a2, o2, s2, c2] = n2, l2 = Date.UTC(Number(r2), Number(i2) - 1, Number(a2), Number(o2), Number(s2), c2 ? Number(c2) : 0);
2275
2299
  if (Number.isNaN(l2)) return null;
2276
2300
  try {
2277
- let e3 = l2 - hc(l2, t2);
2278
- return new Date(l2 - hc(e3, t2));
2301
+ let e3 = l2 - Cc(l2, t2);
2302
+ return new Date(l2 - Cc(e3, t2));
2279
2303
  } catch {
2280
2304
  return null;
2281
2305
  }
2282
2306
  }
2283
- function _c({ start: e2, end: t2, timeZone: n2, ...r2 }) {
2284
- let i2 = (e3) => e3 && n2 ? gc(e3, n2)?.getTime() : void 0;
2285
- return sc({ bookingsServiceId: r2.serviceId, serviceType: r2.serviceType, startTime: i2(e2), endTime: i2(t2), isEligibleForFlowCompletion: r2.isEligibleForFlowCompletion });
2307
+ function Tc({ start: e2, end: t2, timeZone: n2, ...r2 }) {
2308
+ let i2 = (e3) => e3 && n2 ? wc(e3, n2)?.getTime() : void 0;
2309
+ return hc({ bookingsServiceId: r2.serviceId, serviceType: r2.serviceType, startTime: i2(e2), endTime: i2(t2), isEligibleForFlowCompletion: r2.isEligibleForFlowCompletion });
2286
2310
  }
2287
- function vc({ nextAvailableSlotsCount: e2, isLoading: t2, hasError: n2, children: r2 }) {
2311
+ function Ec({ nextAvailableSlotsCount: e2, isLoading: t2, hasError: n2, children: r2 }) {
2288
2312
  let i2 = n2 ? `loadFailed` : null, a2 = { selectedDate: null, daysAvailabilityRange: null, daysAvailability: [], daysAvailabilityLoading: false, daysAvailabilityHasError: false, timeSlotsLoading: t2, timeSlotsErrorCode: i2, selectDate: async () => {
2289
2313
  }, setDaysAvailabilityRange: async () => {
2290
2314
  }, nextDaysAvailabilityRange: async () => {
@@ -2300,107 +2324,107 @@ function vc({ nextAvailableSlotsCount: e2, isLoading: t2, hasError: n2, children
2300
2324
  }, navigateToBookingForm: () => {
2301
2325
  }, timeSlotLimitPerDay: null, expandedDates: /* @__PURE__ */ new Set(), daysWithMore: /* @__PURE__ */ new Set(), loadingDate: null, loadAllTimeSlotsForDay: async () => {
2302
2326
  } };
2303
- return p(vl.Provider, { value: a2, children: r2 });
2327
+ return p(El.Provider, { value: a2, children: r2 });
2304
2328
  }
2305
- function yc({ nextAvailableSlotsCount: e2, children: t2 }) {
2306
- return p(vc, { nextAvailableSlotsCount: e2, isLoading: true, hasError: false, children: t2 });
2329
+ function Dc({ nextAvailableSlotsCount: e2, children: t2 }) {
2330
+ return p(Ec, { nextAvailableSlotsCount: e2, isLoading: true, hasError: false, children: t2 });
2307
2331
  }
2308
- function bc({ nextAvailableSlotsCount: e2, children: t2 }) {
2309
- return p(vc, { nextAvailableSlotsCount: e2, isLoading: false, hasError: true, children: t2 });
2332
+ function Oc({ nextAvailableSlotsCount: e2, children: t2 }) {
2333
+ return p(Ec, { nextAvailableSlotsCount: e2, isLoading: false, hasError: true, children: t2 });
2310
2334
  }
2311
- var xc = 1e3;
2312
- function Sc(e2, t2) {
2335
+ var kc = 1e3;
2336
+ function Ac(e2, t2) {
2313
2337
  let n2 = /* @__PURE__ */ new Map();
2314
2338
  for (let e3 of t2) {
2315
2339
  let t3 = e3.localStartDate?.slice(0, 10);
2316
2340
  t3 && (e3.bookable ? n2.set(t3, `available`) : n2.has(t3) || n2.set(t3, `unavailable`));
2317
2341
  }
2318
- let r2 = [], i2 = No(e2);
2342
+ let r2 = [], i2 = Fo(e2);
2319
2343
  for (let t3 = 0; t3 < i2; t3 += 1) {
2320
- let i3 = Mo(e2.startDate, t3);
2344
+ let i3 = Po(e2.startDate, t3);
2321
2345
  r2.push({ date: i3, availability: n2.get(i3) ?? `none` });
2322
2346
  }
2323
2347
  return r2;
2324
2348
  }
2325
- function Cc(e2, t2) {
2326
- return { fromLocalDate: Do(e2.startDate, t2), toLocalDate: To(So(e2.endDate)) };
2349
+ function jc(e2, t2) {
2350
+ return { fromLocalDate: ko(e2.startDate, t2), toLocalDate: Do(wo(e2.endDate)) };
2327
2351
  }
2328
- async function wc(e2, t2, n2, r2, i2, a2) {
2329
- return (await rs({ serviceId: e2, ...Cc(n2, t2), timeZone: t2, ...Ko(r2), ...qo(i2), ...Yo(a2, i2), timeSlotsPerDay: 1, cursorPaging: { limit: Math.min(No(n2), xc) } })).timeSlots ?? [];
2352
+ async function Mc(e2, t2, n2, r2, i2, a2) {
2353
+ return (await as({ serviceId: e2, ...jc(n2, t2), timeZone: t2, ...Jo(r2), ...Yo(i2), ...Zo(a2, i2), timeSlotsPerDay: 1, cursorPaging: { limit: Math.min(Fo(n2), kc) } })).timeSlots ?? [];
2330
2354
  }
2331
- async function Tc(e2, t2, n2, r2, i2, a2) {
2332
- return (await as({ serviceIds: [e2], ...Cc(n2, t2), timeZone: t2, includeNonBookable: true, eventFilter: { type: `CLASS`, ...is(r2, i2, a2) }, maxSlotsPerDay: 1, cursorPaging: { limit: Math.min(No(n2), xc) } })).timeSlots;
2355
+ async function Nc(e2, t2, n2, r2, i2, a2) {
2356
+ return (await ss({ serviceIds: [e2], ...jc(n2, t2), timeZone: t2, includeNonBookable: true, eventFilter: { type: `CLASS`, ...os(r2, i2, a2) }, maxSlotsPerDay: 1, cursorPaging: { limit: Math.min(Fo(n2), kc) } })).timeSlots;
2333
2357
  }
2334
- async function Ec({ serviceId: e2, serviceType: t2, range: n2, fromDate: r2, timeZone: i2, locationId: a2, staffId: o2, customerChoices: s2, minRemainingCapacity: c2 }) {
2335
- if (Ka(t2) || n2.endDate < r2) return Sc(n2, []);
2336
- let l2 = { startDate: n2.startDate < r2 ? r2 : n2.startDate, endDate: n2.endDate }, u2 = Ga(t2) ? zo(l2) : [l2];
2337
- return Sc(n2, (await Promise.all(u2.map((n3) => Ga(t2) ? Tc(e2, i2, n3, a2, o2, c2) : wc(e2, i2, n3, a2, o2, s2)))).flat());
2358
+ async function Pc({ serviceId: e2, serviceType: t2, range: n2, fromDate: r2, timeZone: i2, locationId: a2, staffId: o2, customerChoices: s2, minRemainingCapacity: c2 }) {
2359
+ if (Ya(t2) || n2.endDate < r2) return Ac(n2, []);
2360
+ let l2 = { startDate: n2.startDate < r2 ? r2 : n2.startDate, endDate: n2.endDate }, u2 = Ja(t2) ? Vo(l2) : [l2];
2361
+ return Ac(n2, (await Promise.all(u2.map((n3) => Ja(t2) ? Nc(e2, i2, n3, a2, o2, c2) : Mc(e2, i2, n3, a2, o2, s2)))).flat());
2338
2362
  }
2339
- function Dc({ serviceId: e2, staff: t2, customerChoices: n2 }) {
2363
+ function Fc({ serviceId: e2, staff: t2, customerChoices: n2 }) {
2340
2364
  let r2 = t2 && !t2.anyResource ? t2.staffMemberId : void 0;
2341
- return { serviceId: e2, ...Yo(n2, r2), ...t2?.anyResource ? {} : { includeResourceTypeIds: [Br] }, ...r2 ? { resourceTypes: [{ resourceTypeId: Br, resourceIds: [r2] }] } : {} };
2365
+ return { serviceId: e2, ...Zo(n2, r2), ...t2?.anyResource ? {} : { includeResourceTypeIds: [Ur] }, ...r2 ? { resourceTypes: [{ resourceTypeId: Ur, resourceIds: [r2] }] } : {} };
2342
2366
  }
2343
- function Oc({ services: e2, locationId: t2, locationType: n2, timeZone: r2 }) {
2344
- return { services: e2.map(Dc), timeZone: r2, location: { ...t2 ? { _id: t2 } : {}, locationType: n2 } };
2367
+ function Ic({ services: e2, locationId: t2, locationType: n2, timeZone: r2 }) {
2368
+ return { services: e2.map(Fc), timeZone: r2, location: { ...t2 ? { _id: t2 } : {}, locationType: n2 } };
2345
2369
  }
2346
- function kc(e2) {
2347
- let { customerChoices: t2, ...n2 } = e2, r2 = t2 ? Jo(t2) : void 0;
2370
+ function Lc(e2) {
2371
+ let { customerChoices: t2, ...n2 } = e2, r2 = t2 ? Xo(t2) : void 0;
2348
2372
  return r2 ? { ...n2, customerChoices: r2 } : n2;
2349
2373
  }
2350
- async function Ac(e2) {
2351
- let t2 = e2.services ?? [], n2 = () => xa({ ...e2, services: t2.map(kc) }), r2 = t2.some((e3) => e3.customerChoices?.requestedGender);
2352
- if (r2 && es()) return n2();
2374
+ async function Rc(e2) {
2375
+ let t2 = e2.services ?? [], n2 = () => wa({ ...e2, services: t2.map(Lc) }), r2 = t2.some((e3) => e3.customerChoices?.requestedGender);
2376
+ if (r2 && ns()) return n2();
2353
2377
  try {
2354
- return await xa(e2);
2378
+ return await wa(e2);
2355
2379
  } catch (e3) {
2356
- if (!r2 || !Zo(e3)) throw e3;
2357
- return bo(e3, { feature: vo.timeSlots, action: `requested-gender-rejected`, level: `warning` }), ns(), n2();
2380
+ if (!r2 || !$o(e3)) throw e3;
2381
+ return $(e3, { feature: xo.timeSlots, action: `requested-gender-rejected`, level: `warning` }), is(), n2();
2358
2382
  }
2359
2383
  }
2360
- var jc = 1e3;
2361
- async function Mc({ range: e2, fromDate: t2, ...n2 }) {
2362
- if (e2.endDate < t2) return Sc(e2, []);
2384
+ var zc = 1e3;
2385
+ async function Bc({ range: e2, fromDate: t2, ...n2 }) {
2386
+ if (e2.endDate < t2) return Ac(e2, []);
2363
2387
  let r2 = { startDate: e2.startDate < t2 ? t2 : e2.startDate, endDate: e2.endDate };
2364
- return Sc(e2, (await Ac({ ...Oc(n2), fromLocalDate: Do(r2.startDate, n2.timeZone), toLocalDate: To(So(r2.endDate)), timeSlotsPerDay: 1, cursorPaging: { limit: Math.min(No(r2), jc) } })).timeSlots ?? []);
2388
+ return Ac(e2, (await Rc({ ...Ic(n2), fromLocalDate: ko(r2.startDate, n2.timeZone), toLocalDate: Do(wo(r2.endDate)), timeSlotsPerDay: 1, cursorPaging: { limit: Math.min(Fo(r2), zc) } })).timeSlots ?? []);
2365
2389
  }
2366
- async function Nc({ date: e2, onlyAvailableSlots: t2, fromLocalDate: n2, ...r2 }) {
2390
+ async function Vc({ date: e2, onlyAvailableSlots: t2, fromLocalDate: n2, ...r2 }) {
2367
2391
  let i2 = `${e2}T00:00:00`, a2 = [], o2 = null, s2;
2368
2392
  do {
2369
- let c2 = await Ac({ ...Oc(r2), fromLocalDate: n2 && n2 > i2 ? n2 : i2, toLocalDate: `${e2}T23:59:59`, ...t2 ? { bookable: true } : {}, cursorPaging: { limit: jc, ...s2 ? { cursor: s2 } : {} } });
2393
+ let c2 = await Rc({ ...Ic(r2), fromLocalDate: n2 && n2 > i2 ? n2 : i2, toLocalDate: `${e2}T23:59:59`, ...t2 ? { bookable: true } : {}, cursorPaging: { limit: zc, ...s2 ? { cursor: s2 } : {} } });
2370
2394
  a2.push(...c2.timeSlots ?? []), o2 = c2.timeZone ?? o2, s2 = c2.cursorPagingMetadata?.cursors?.next || void 0;
2371
2395
  } while (s2);
2372
2396
  return { timeSlots: a2, timeZone: o2 };
2373
2397
  }
2374
- async function Pc({ fromDate: e2, ...t2 }) {
2375
- let n2 = await Ac({ ...Oc(t2), ...us(e2), bookable: true, cursorPaging: { limit: 1 } });
2398
+ async function Hc({ fromDate: e2, ...t2 }) {
2399
+ let n2 = await Rc({ ...Ic(t2), ...fs(e2), bookable: true, cursorPaging: { limit: 1 } });
2376
2400
  return { timeSlots: n2.timeSlots ?? [], timeZone: n2.timeZone ?? null };
2377
2401
  }
2378
- var Fc = [];
2379
- function Ic({ enabled: e2, serviceId: t2, serviceType: n2, multiServiceRequest: i2, timeZone: l2, today: u2, locationId: d2, staffId: f2, loadInitially: p2, customerChoices: m2, minRemainingCapacity: h2, onlyAvailableSlots: g2 }) {
2380
- let [_2, v2] = c(null), [y2, b2] = c(p2), [x2, S2] = c(Fc), [C2, w2] = c(false), [T2, ee2] = c(false), E2 = s(0);
2402
+ var Uc = [];
2403
+ function Wc({ enabled: e2, serviceId: t2, serviceType: n2, multiServiceRequest: i2, timeZone: l2, today: u2, locationId: d2, staffId: f2, loadInitially: p2, customerChoices: m2, minRemainingCapacity: h2, onlyAvailableSlots: g2 }) {
2404
+ let [_2, v2] = c(null), [y2, b2] = c(p2), [x2, S2] = c(Uc), [C2, w2] = c(false), [T2, ee2] = c(false), E2 = s(0);
2381
2405
  a(() => {
2382
- _2 === null && u2 && v2(Po(u2));
2406
+ _2 === null && u2 && v2(Io(u2));
2383
2407
  }, [_2, u2]), a(() => {
2384
- if (!y2 || !e2 || !(t2 || i2) || !l2 || !u2 || !_2 || !i2 && Ka(n2)) return;
2408
+ if (!y2 || !e2 || !(t2 || i2) || !l2 || !u2 || !_2 || !i2 && Ya(n2)) return;
2385
2409
  let r2 = ++E2.current;
2386
- return w2(true), (i2 ? Mc({ ...i2, range: _2, fromDate: u2, timeZone: l2 }) : Ec({ serviceId: t2, serviceType: n2, range: _2, fromDate: u2, timeZone: l2, locationId: d2 ?? void 0, staffId: f2 ?? void 0, customerChoices: m2, minRemainingCapacity: h2 })).then((e3) => {
2410
+ return w2(true), (i2 ? Bc({ ...i2, range: _2, fromDate: u2, timeZone: l2 }) : Pc({ serviceId: t2, serviceType: n2, range: _2, fromDate: u2, timeZone: l2, locationId: d2 ?? void 0, staffId: f2 ?? void 0, customerChoices: m2, minRemainingCapacity: h2 })).then((e3) => {
2387
2411
  r2 === E2.current && (S2(e3), ee2(false), w2(false));
2388
2412
  }).catch((e3) => {
2389
- r2 === E2.current && (bo(e3, { feature: vo.timeSlots, action: `fetch-days-availability`, level: `warning` }), ee2(true), w2(false));
2413
+ r2 === E2.current && ($(e3, { feature: xo.timeSlots, action: `fetch-days-availability`, level: `warning` }), ee2(true), w2(false));
2390
2414
  }), () => {
2391
2415
  r2 === E2.current && (E2.current += 1);
2392
2416
  };
2393
2417
  }, [y2, e2, t2, n2, i2, l2, u2, _2, d2, f2, m2, h2]);
2394
2418
  let D2 = r(async (e3) => {
2395
- jo(e3) && (v2(e3), b2(true));
2419
+ No(e3) && (v2(e3), b2(true));
2396
2420
  }, []), O2 = r(async () => {
2397
- v2((e3) => e3 && Io(e3, 1)), b2(true);
2421
+ v2((e3) => e3 && Ro(e3, 1)), b2(true);
2398
2422
  }, []), te2 = r(async () => {
2399
- v2((e3) => e3 && Io(e3, -1)), b2(true);
2423
+ v2((e3) => e3 && Ro(e3, -1)), b2(true);
2400
2424
  }, []);
2401
2425
  return { range: _2, daysAvailability: o(() => g2 ? x2.map((e3) => e3.availability === `unavailable` ? { ...e3, availability: `none` } : e3) : x2, [x2, g2]), isLoading: C2, hasError: T2, setRange: D2, nextRange: O2, previousRange: te2 };
2402
2426
  }
2403
- function Lc({ enabled: e2, serviceId: t2, serviceType: n2, multiServiceRequest: i2, timeZone: o2, today: l2, locationId: u2, staffId: d2, customerChoices: f2, minRemainingCapacity: p2, onlyAvailableSlots: m2, serviceLoading: h2 }) {
2427
+ function Gc({ enabled: e2, serviceId: t2, serviceType: n2, multiServiceRequest: i2, timeZone: o2, today: l2, locationId: u2, staffId: d2, customerChoices: f2, minRemainingCapacity: p2, onlyAvailableSlots: m2, serviceLoading: h2 }) {
2404
2428
  let [g2, _2] = c(null), [v2, y2] = c(0), [b2, x2] = c(null), [S2, C2] = c(null), [w2, T2] = c(null), [ee2, E2] = c(false), D2 = s(0), O2 = s(0), te2 = s(0), k2 = r(() => {
2405
2429
  O2.current += 1, E2(false);
2406
2430
  }, []);
@@ -2421,99 +2445,99 @@ function Lc({ enabled: e2, serviceId: t2, serviceType: n2, multiServiceRequest:
2421
2445
  _2(null);
2422
2446
  return;
2423
2447
  }
2424
- if (!i2 && Ka(n2)) {
2448
+ if (!i2 && Ya(n2)) {
2425
2449
  _2(null);
2426
2450
  return;
2427
2451
  }
2428
- let r2 = Eo(new Date(Date.now()), o2), a2 = ++D2.current;
2452
+ let r2 = Oo(new Date(Date.now()), o2), a2 = ++D2.current;
2429
2453
  x2(null), C2(null), T2(null);
2430
2454
  let s2 = r2.slice(0, 10) === g2.date ? r2 : void 0;
2431
- return (i2 ? Nc({ ...i2, date: g2.date, timeZone: o2, onlyAvailableSlots: m2, fromLocalDate: s2 }) : ps({ serviceId: t2, serviceType: n2, date: g2.date, timeZone: o2, onlyAvailableSlots: m2, locationId: u2 ?? void 0, staffId: d2 ?? void 0, customerChoices: f2, minRemainingCapacity: p2, fromLocalDate: s2 })).then((e3) => {
2455
+ return (i2 ? Vc({ ...i2, date: g2.date, timeZone: o2, onlyAvailableSlots: m2, fromLocalDate: s2 }) : hs({ serviceId: t2, serviceType: n2, date: g2.date, timeZone: o2, onlyAvailableSlots: m2, locationId: u2 ?? void 0, staffId: d2 ?? void 0, customerChoices: f2, minRemainingCapacity: p2, fromLocalDate: s2 })).then((e3) => {
2432
2456
  a2 === D2.current && x2({ timeSlots: e3.timeSlots, timeZone: e3.timeZone ?? o2 });
2433
2457
  }).catch((e3) => {
2434
- a2 === D2.current && (bo(e3, { feature: vo.timeSlots, action: `fetch-day-time-slots`, level: `warning` }), C2(`timeSlotsLoadFailed`));
2458
+ a2 === D2.current && ($(e3, { feature: xo.timeSlots, action: `fetch-day-time-slots`, level: `warning` }), C2(`timeSlotsLoadFailed`));
2435
2459
  }), () => {
2436
2460
  a2 === D2.current && (D2.current += 1);
2437
2461
  };
2438
2462
  }, [g2, v2, e2, t2, h2, n2, i2, o2, l2, u2, d2, f2, p2, m2]);
2439
2463
  let ne2 = r(async (e3) => {
2440
- !i2 && Ka(n2) || !Ao(e3) || l2 && e3 < l2 || (k2(), y2((e4) => e4 + 1), _2({ kind: `day`, date: e3 }));
2464
+ !i2 && Ya(n2) || !Mo(e3) || l2 && e3 < l2 || (k2(), y2((e4) => e4 + 1), _2({ kind: `day`, date: e3 }));
2441
2465
  }, [n2, i2, l2, k2]), re2 = g2?.date ?? null, j2 = r(async () => {
2442
2466
  let r2 = !!(t2 || i2);
2443
- if (!i2 && Ka(n2) || !e2 || !r2 || !o2) return { outcome: `none` };
2467
+ if (!i2 && Ya(n2) || !e2 || !r2 || !o2) return { outcome: `none` };
2444
2468
  let a2 = D2.current, s2 = ++O2.current, c2 = ++te2.current, m3 = () => a2 === D2.current && s2 === O2.current;
2445
2469
  E2(true), T2(null);
2446
2470
  try {
2447
- let e3 = re2 ?? l2 ?? void 0, r3 = i2 ? await Pc({ ...i2, timeZone: o2, fromDate: e3 }) : await ds({ serviceId: t2, serviceType: n2, timeZone: o2, limit: 1, onlyAvailableSlots: true, fromDate: e3, locationId: u2 ?? void 0, staffId: d2 ?? void 0, customerChoices: f2, minRemainingCapacity: p2 });
2471
+ let e3 = re2 ?? l2 ?? void 0, r3 = i2 ? await Hc({ ...i2, timeZone: o2, fromDate: e3 }) : await ps({ serviceId: t2, serviceType: n2, timeZone: o2, limit: 1, onlyAvailableSlots: true, fromDate: e3, locationId: u2 ?? void 0, staffId: d2 ?? void 0, customerChoices: f2, minRemainingCapacity: p2 });
2448
2472
  if (!m3()) return { outcome: `cancelled` };
2449
2473
  let a3 = r3.timeSlots[0]?.localStartDate?.slice(0, 10) ?? null;
2450
2474
  return a3 ? { outcome: `found`, date: a3 } : { outcome: `none` };
2451
2475
  } catch (e3) {
2452
- return m3() ? (bo(e3, { feature: vo.timeSlots, action: `find-next-available-date`, level: `warning` }), T2(`timeSlotsLoadFailed`), { outcome: `error` }) : { outcome: `cancelled` };
2476
+ return m3() ? ($(e3, { feature: xo.timeSlots, action: `find-next-available-date`, level: `warning` }), T2(`timeSlotsLoadFailed`), { outcome: `error` }) : { outcome: `cancelled` };
2453
2477
  } finally {
2454
2478
  c2 === te2.current && E2(false);
2455
2479
  }
2456
2480
  }, [e2, t2, n2, i2, o2, l2, u2, d2, f2, p2, re2]), ie2 = w2 ?? S2;
2457
2481
  return { query: g2, selectedDate: re2, timeSlots: b2?.timeSlots ?? null, timeZone: b2?.timeZone ?? null, isLoading: ee2 || g2 !== null && b2 === null && S2 === null, error: ie2, selectDate: ne2, findNextAvailableDate: j2 };
2458
2482
  }
2459
- function Rc(e2, t2) {
2483
+ function Kc(e2, t2) {
2460
2484
  return t2 === void 0 ? false : !e2 || new Date(e2).getTime() <= t2;
2461
2485
  }
2462
- function zc({ serviceId: e2, serviceType: t2, lastSessionEnd: n2, timeZone: r2, now: i2, onlyAvailableSlots: a2, locationId: o2, staffId: s2, timeSlotLimitPerDay: c2, customerChoices: l2, minRemainingCapacity: u2 }) {
2463
- let d2 = { serviceId: e2, onlyAvailableSlots: a2, locationId: o2 ?? void 0, staffId: s2 ?? void 0, timeZone: r2, fromLocalDate: Eo(new Date(i2), r2) };
2464
- return Ga(t2) ? { ...d2, serviceType: `CLASS`, minRemainingCapacity: u2 } : Ka(t2) ? !n2 || Rc(n2, i2) ? void 0 : { ...d2, serviceType: `COURSE`, toLocalDate: Eo(new Date(n2), r2) } : { ...d2, serviceType: `APPOINTMENT`, toLocalDate: us().toLocalDate, timeSlotsPerDay: c2 + 1, customerChoices: l2 };
2486
+ function qc({ serviceId: e2, serviceType: t2, lastSessionEnd: n2, timeZone: r2, now: i2, onlyAvailableSlots: a2, locationId: o2, staffId: s2, timeSlotLimitPerDay: c2, customerChoices: l2, minRemainingCapacity: u2 }) {
2487
+ let d2 = { serviceId: e2, onlyAvailableSlots: a2, locationId: o2 ?? void 0, staffId: s2 ?? void 0, timeZone: r2, fromLocalDate: Oo(new Date(i2), r2) };
2488
+ return Ja(t2) ? { ...d2, serviceType: `CLASS`, minRemainingCapacity: u2 } : Ya(t2) ? !n2 || Kc(n2, i2) ? void 0 : { ...d2, serviceType: `COURSE`, toLocalDate: Oo(new Date(n2), r2) } : { ...d2, serviceType: `APPOINTMENT`, toLocalDate: fs().toLocalDate, timeSlotsPerDay: c2 + 1, customerChoices: l2 };
2465
2489
  }
2466
- function Bc({ isAppointment: e2, staffOnSlotCount: t2, hasStaffFilter: n2, hasRequestedGender: r2, hasStaffPricedVariants: i2, staffSelectionStrategy: a2 }) {
2490
+ function Jc({ isAppointment: e2, staffOnSlotCount: t2, hasStaffFilter: n2, hasRequestedGender: r2, hasStaffPricedVariants: i2, staffSelectionStrategy: a2 }) {
2467
2491
  return e2 && t2 > 1 && !n2 && !i2 && (a2 !== `CUSTOMER_MUST_CHOOSE` || r2);
2468
2492
  }
2469
- function Vc(e2, t2) {
2493
+ function Yc(e2, t2) {
2470
2494
  return e2.length ? e2.length === 1 ? { anyResource: false, staffMemberId: e2[0] } : t2 ? { anyResource: true } : null : null;
2471
2495
  }
2472
- function Hc(e2, t2, n2) {
2496
+ function Xc(e2, t2, n2) {
2473
2497
  return t2 && !t2.anyResource && e2.includes(t2.staffMemberId) ? { isComplete: true, resourceId: t2.staffMemberId } : t2?.anyResource && n2 ? { isComplete: true, resourceId: void 0 } : e2.length <= 1 ? { isComplete: true, resourceId: e2[0] } : { isComplete: n2, resourceId: void 0 };
2474
2498
  }
2475
- var Uc = { staff: null, requestedGender: null, locationId: null };
2476
- function Wc({ entry: e2, appointmentLike: t2, staffChoiceHidden: n2, staffPriced: r2, staffSelectionStrategy: i2, genderAllowed: a2, staffMemberIds: o2, locationIds: s2 }) {
2477
- if (!e2) return Uc;
2478
- let c2 = e2.locationId && s2.includes(e2.locationId) ? e2.locationId : null, l2 = t2 && !n2 ? $a(e2) : null;
2479
- if (!l2) return { ...Uc, locationId: c2 };
2480
- if (!l2.anyResource) return o2.includes(l2.staffMemberId) ? { staff: l2, requestedGender: null, locationId: c2 } : { ...Uc, locationId: c2 };
2499
+ var Zc = { staff: null, requestedGender: null, locationId: null };
2500
+ function Qc({ entry: e2, appointmentLike: t2, staffChoiceHidden: n2, staffPriced: r2, staffSelectionStrategy: i2, genderAllowed: a2, staffMemberIds: o2, locationIds: s2 }) {
2501
+ if (!e2) return Zc;
2502
+ let c2 = e2.locationId && s2.includes(e2.locationId) ? e2.locationId : null, l2 = t2 && !n2 ? no(e2) : null;
2503
+ if (!l2) return { ...Zc, locationId: c2 };
2504
+ if (!l2.anyResource) return o2.includes(l2.staffMemberId) ? { staff: l2, requestedGender: null, locationId: c2 } : { ...Zc, locationId: c2 };
2481
2505
  let u2 = a2 ? e2.requestedGender ?? null : null;
2482
- return o2.length > 1 && !r2 && (i2 !== `CUSTOMER_MUST_CHOOSE` || u2 !== null) ? { staff: l2, requestedGender: u2, locationId: c2 } : { ...Uc, locationId: c2 };
2506
+ return o2.length > 1 && !r2 && (i2 !== `CUSTOMER_MUST_CHOOSE` || u2 !== null) ? { staff: l2, requestedGender: u2, locationId: c2 } : { ...Zc, locationId: c2 };
2483
2507
  }
2484
- var Gc = [];
2485
- function Kc({ sessions: e2, dayQuery: t2, daySlots: n2, staffFilter: r2, appointmentLike: i2, limitPerDay: a2, expandedDates: o2 }) {
2486
- let s2 = tl(nl(e2, r2)), c2 = n2 ? nl(i2 ? Go(n2) : n2, r2) : Gc;
2487
- return { rows: t2 ? c2 : rl(s2, a2, o2), slotIdOf: t2 ? Ho : Wo, daysWithMore: el(s2, a2, o2) };
2508
+ var $c = [];
2509
+ function el({ sessions: e2, dayQuery: t2, daySlots: n2, staffFilter: r2, appointmentLike: i2, limitPerDay: a2, expandedDates: o2 }) {
2510
+ let s2 = ll(ul(e2, r2)), c2 = n2 ? ul(i2 ? qo(n2) : n2, r2) : $c;
2511
+ return { rows: t2 ? c2 : dl(s2, a2, o2), slotIdOf: t2 ? Wo : Ko, daysWithMore: cl(s2, a2, o2) };
2488
2512
  }
2489
- function qc({ rows: e2, slotIdOf: t2 }, n2) {
2490
- return [...e2.filter((e3) => t2(e3) === n2)].sort((e3, t3) => $c(t3) - $c(e3))[0] ?? null;
2513
+ function tl({ rows: e2, slotIdOf: t2 }, n2) {
2514
+ return [...e2.filter((e3) => t2(e3) === n2)].sort((e3, t3) => sl(t3) - sl(e3))[0] ?? null;
2491
2515
  }
2492
- function Jc(e2, t2, n2, r2) {
2493
- return { slotId: n2(e2), slotStartTime: e2.localStartDate ?? null, slotEndTime: e2.localEndDate ?? null, bookable: e2.bookable ?? false, totalCapacity: e2.totalCapacity ?? null, remainingCapacity: e2.remainingCapacity ?? null, bookableCapacity: e2.bookableCapacity ?? null, eventId: e2.eventInfo?.eventId ?? null, eventTitle: e2.eventInfo?.eventTitle ?? null, waitlistCapacity: e2.eventInfo?.waitingList?.remainingCapacity ?? null, locationId: e2.location?._id ?? null, locationName: e2.location?.name || e2.location?.formattedAddress || null, durationMinutes: Qc(e2, t2), isAllDay: e2.allDay ?? false, staff: r2 ? [] : Yc(e2) };
2516
+ function nl(e2, t2, n2, r2) {
2517
+ return { slotId: n2(e2), slotStartTime: e2.localStartDate ?? null, slotEndTime: e2.localEndDate ?? null, bookable: e2.bookable ?? false, totalCapacity: e2.totalCapacity ?? null, remainingCapacity: e2.remainingCapacity ?? null, bookableCapacity: e2.bookableCapacity ?? null, eventId: e2.eventInfo?.eventId ?? null, eventTitle: e2.eventInfo?.eventTitle ?? null, waitlistCapacity: e2.eventInfo?.waitingList?.remainingCapacity ?? null, locationId: e2.location?._id ?? null, locationName: e2.location?.name || e2.location?.formattedAddress || null, durationMinutes: ol(e2, t2), isAllDay: e2.allDay ?? false, staff: r2 ? [] : rl(e2) };
2494
2518
  }
2495
- function Yc(e2) {
2519
+ function rl(e2) {
2496
2520
  let t2 = /* @__PURE__ */ new Map();
2497
2521
  for (let n2 of e2.availableResources ?? []) if (n2.resourceTypeId === `1cd44cf8-756f-41c3-bd90-3e2ffcaf1155`) for (let e3 of n2.resources ?? []) e3._id && !t2.has(e3._id) && t2.set(e3._id, e3.name ?? ``);
2498
2522
  return [...t2].map(([e3, t3]) => ({ staffMemberId: e3, name: t3 }));
2499
2523
  }
2500
- function Xc(e2) {
2501
- let t2 = Yc(e2);
2524
+ function il(e2) {
2525
+ let t2 = rl(e2);
2502
2526
  if (t2.length) return t2.length === 1 ? t2[0].staffMemberId : null;
2503
2527
  }
2504
- function Zc(e2) {
2505
- return Yc(e2).map((e3) => e3.staffMemberId);
2528
+ function al(e2) {
2529
+ return rl(e2).map((e3) => e3.staffMemberId);
2506
2530
  }
2507
- function Qc(e2, t2) {
2531
+ function ol(e2, t2) {
2508
2532
  if (!e2.localStartDate || !e2.localEndDate) return null;
2509
- let n2 = e2.allDay ? `UTC` : t2 ?? `UTC`, r2 = gc(e2.localStartDate, n2), i2 = gc(e2.localEndDate, n2);
2533
+ let n2 = e2.allDay ? `UTC` : t2 ?? `UTC`, r2 = wc(e2.localStartDate, n2), i2 = wc(e2.localEndDate, n2);
2510
2534
  return !r2 || !i2 || i2 < r2 ? null : Math.round((i2.getTime() - r2.getTime()) / 6e4);
2511
2535
  }
2512
- function $c(e2) {
2536
+ function sl(e2) {
2513
2537
  let t2 = e2.bookableCapacity ?? e2.remainingCapacity;
2514
2538
  return (e2.eventInfo?.waitingList?.remainingCapacity ?? 0) > 0 && (t2 ?? 0) <= 0 ? 1 : e2.bookable ? 2 : 0;
2515
2539
  }
2516
- function el(e2, t2, n2) {
2540
+ function cl(e2, t2, n2) {
2517
2541
  let r2 = /* @__PURE__ */ new Map();
2518
2542
  for (let t3 of e2) {
2519
2543
  let e3 = (t3.localStartDate ?? ``).slice(0, 10);
@@ -2521,16 +2545,16 @@ function el(e2, t2, n2) {
2521
2545
  }
2522
2546
  return new Set([...r2].filter(([e3, r3]) => r3 > t2 && !n2.has(e3)).map(([e3]) => e3));
2523
2547
  }
2524
- function tl(e2) {
2548
+ function ll(e2) {
2525
2549
  return e2.flatMap((e3) => {
2526
- let t2 = e3.availableResources?.find((e4) => e4.resourceTypeId === Br), n2 = t2?.resources ?? [];
2550
+ let t2 = e3.availableResources?.find((e4) => e4.resourceTypeId === Ur), n2 = t2?.resources ?? [];
2527
2551
  return n2.length <= 1 ? [e3] : n2.map((n3) => ({ ...e3, availableResources: [{ ...t2, resources: [n3] }] }));
2528
2552
  });
2529
2553
  }
2530
- function nl(e2, t2) {
2554
+ function ul(e2, t2) {
2531
2555
  return t2 ? e2.map((e3) => ({ ...e3, availableResources: e3.availableResources?.map((e4) => e4.resourceTypeId === `1cd44cf8-756f-41c3-bd90-3e2ffcaf1155` ? { ...e4, resources: e4.resources?.filter((e5) => e5._id === t2) } : e4) })) : e2;
2532
2556
  }
2533
- function rl(e2, t2, n2) {
2557
+ function dl(e2, t2, n2) {
2534
2558
  let r2 = /* @__PURE__ */ new Map();
2535
2559
  return e2.filter((e3) => {
2536
2560
  let i2 = (e3.localStartDate ?? ``).slice(0, 10);
@@ -2539,21 +2563,21 @@ function rl(e2, t2, n2) {
2539
2563
  return r2.set(i2, a2 + 1), a2 < t2;
2540
2564
  });
2541
2565
  }
2542
- async function il() {
2566
+ async function fl() {
2543
2567
  try {
2544
- return await Vo();
2568
+ return await Uo();
2545
2569
  } catch (e2) {
2546
- return bo(e2, { feature: vo.timeSlots, action: `fetch-business-time-zone`, level: `warning` }), { businessTimeZone: null, staffSelectionStrategy: void 0, allowGenderSelection: false };
2570
+ return $(e2, { feature: xo.timeSlots, action: `fetch-business-time-zone`, level: `warning` }), { businessTimeZone: null, staffSelectionStrategy: void 0, allowGenderSelection: false };
2547
2571
  }
2548
2572
  }
2549
- function al(e2) {
2550
- return Fs({ key: ws(), warmupData: e2, fetchData: il });
2573
+ function pl(e2) {
2574
+ return Us({ key: Ms(), warmupData: e2, fetchData: fl });
2551
2575
  }
2552
- function ol(e2) {
2576
+ function ml(e2) {
2553
2577
  return (e2.localStartDate ?? ``).slice(0, 10);
2554
2578
  }
2555
- var sl = [];
2556
- function cl(e2, t2) {
2579
+ var hl = [];
2580
+ function gl(e2, t2) {
2557
2581
  let { serviceId: n2 = ``, serviceType: r2 = `CLASS`, fromLocalDate: i2 = ``, toLocalDate: o2, timeZone: l2, locationId: u2, staffId: d2, onlyAvailableSlots: f2 = false, customerChoices: p2, minRemainingCapacity: m2, timeSlotsPerDay: h2 } = t2 ?? {}, [g2, _2] = c([]), [v2, y2] = c([]), [b2, x2] = c(1), [S2, C2] = c(!!n2), [w2, T2] = c(null), [ee2, E2] = c(null), [D2, O2] = c(/* @__PURE__ */ new Set()), [te2, k2] = c(null), A2 = s(null), ne2 = s(null);
2558
2582
  a(() => {
2559
2583
  if (_2([]), y2([]), x2(1), E2(null), T2(null), O2(/* @__PURE__ */ new Set()), k2(null), C2(!!n2), !n2) return;
@@ -2571,7 +2595,7 @@ function cl(e2, t2) {
2571
2595
  let a3 = [], b3 = null, S3 = v4 ?? void 0, C3 = /* @__PURE__ */ new Set();
2572
2596
  do {
2573
2597
  S3 && C3.add(S3);
2574
- let s3 = await os({ serviceId: n2, serviceType: r2, fromLocalDate: i2, toLocalDate: o2, timeZone: l2, locationId: u2, staffId: d2, onlyAvailableSlots: f2, customerChoices: p2, minRemainingCapacity: m2, timeSlotsPerDay: h2, limit: e2, cursor: S3 });
2598
+ let s3 = await cs({ serviceId: n2, serviceType: r2, fromLocalDate: i2, toLocalDate: o2, timeZone: l2, locationId: u2, staffId: d2, onlyAvailableSlots: f2, customerChoices: p2, minRemainingCapacity: m2, timeSlotsPerDay: h2, limit: e2, cursor: S3 });
2575
2599
  if (t3) return;
2576
2600
  if (a3.push(...s3.timeSlots), b3 = s3.nextCursor, b3 && C3.has(b3)) throw Error(`The session API repeated a page cursor`);
2577
2601
  S3 = b3 ?? void 0, E2(s3.timeZone ?? l2 ?? null);
@@ -2579,7 +2603,7 @@ function cl(e2, t2) {
2579
2603
  s2 = [...s2, a3], c2 = [...c2, b3], _2(s2), y2(c2), (g4 === 1 || a3.length > 0) && x2(g4);
2580
2604
  } catch (e3) {
2581
2605
  if (t3) return;
2582
- bo(e3, { feature: vo.sessions, action: `fetch-page` }), T2(e3 instanceof Error ? e3.message : `Failed to load sessions`);
2606
+ $(e3, { feature: xo.sessions, action: `fetch-page` }), T2(e3 instanceof Error ? e3.message : `Failed to load sessions`);
2583
2607
  } finally {
2584
2608
  a2 = false, t3 || C2(false);
2585
2609
  }
@@ -2593,16 +2617,16 @@ function cl(e2, t2) {
2593
2617
  }
2594
2618
  a2 = true, k2(e3), T2(null);
2595
2619
  try {
2596
- let a3 = await ps({ serviceId: n2, serviceType: r2, date: e3, timeZone: l2, onlyAvailableSlots: f2, locationId: u2, staffId: d2, customerChoices: p2, minRemainingCapacity: m2, fromLocalDate: i2, toLocalDate: o2 });
2620
+ let a3 = await hs({ serviceId: n2, serviceType: r2, date: e3, timeZone: l2, onlyAvailableSlots: f2, locationId: u2, staffId: d2, customerChoices: p2, minRemainingCapacity: m2, fromLocalDate: i2, toLocalDate: o2 });
2597
2621
  if (t3) return;
2598
- let c3 = a3.timeSlots.filter((t4) => ol(t4) === e3), h3 = Math.max(0, s2.findIndex((t4) => t4.some((t5) => ol(t5) === e3)));
2622
+ let c3 = a3.timeSlots.filter((t4) => ml(t4) === e3), h3 = Math.max(0, s2.findIndex((t4) => t4.some((t5) => ml(t5) === e3)));
2599
2623
  s2 = s2.map((t4, n3) => {
2600
- let r3 = t4.filter((t5) => ol(t5) !== e3);
2624
+ let r3 = t4.filter((t5) => ml(t5) !== e3);
2601
2625
  return n3 === h3 ? [...r3, ...c3] : r3;
2602
2626
  }), _2(s2), O2((t4) => /* @__PURE__ */ new Set([...t4, e3]));
2603
2627
  } catch (e4) {
2604
2628
  if (t3) return;
2605
- bo(e4, { feature: vo.sessions, action: `fetch-day` }), T2(e4 instanceof Error ? e4.message : `Failed to load sessions`);
2629
+ $(e4, { feature: xo.sessions, action: `fetch-day` }), T2(e4 instanceof Error ? e4.message : `Failed to load sessions`);
2606
2630
  } finally {
2607
2631
  a2 = false, t3 || k2(null);
2608
2632
  }
@@ -2612,173 +2636,182 @@ function cl(e2, t2) {
2612
2636
  t3 = true, A2.current = null, ne2.current = null;
2613
2637
  };
2614
2638
  }, [n2, r2, i2, o2, l2, u2, d2, f2, p2, m2, h2, e2]);
2615
- let re2 = [...g2[b2 - 1] ?? sl].sort((e3, t3) => (e3.localStartDate ?? ``).localeCompare(t3.localStartDate ?? ``)), j2 = g2[b2], ie2 = j2 ? j2.length > 0 : v2[b2 - 1] != null, M2 = b2 > 1;
2639
+ let re2 = [...g2[b2 - 1] ?? hl].sort((e3, t3) => (e3.localStartDate ?? ``).localeCompare(t3.localStartDate ?? ``)), j2 = g2[b2], ie2 = j2 ? j2.length > 0 : v2[b2 - 1] != null, M2 = b2 > 1;
2616
2640
  async function ae2() {
2617
2641
  ie2 && !S2 && await A2.current?.(b2 + 1);
2618
2642
  }
2619
- function N2() {
2643
+ function oe2() {
2620
2644
  M2 && !S2 && A2.current?.(b2 - 1);
2621
2645
  }
2622
- async function oe2(e3) {
2646
+ async function se2(e3) {
2623
2647
  S2 || te2 !== null || D2.has(e3) || await ne2.current?.(e3);
2624
2648
  }
2625
- return { isLoadingPage: S2, firstPageSettled: g2.length > 0 || w2 !== null, error: w2, timeZone: ee2, sessions: re2, pageSize: e2, currentPage: b2, hasNextPage: ie2, hasPreviousPage: M2, nextPage: ae2, previousPage: N2, expandedDates: D2, loadingDate: te2, loadAllSessionsForDay: oe2 };
2649
+ return { isLoadingPage: S2, firstPageSettled: g2.length > 0 || w2 !== null, error: w2, timeZone: ee2, sessions: re2, pageSize: e2, currentPage: b2, hasNextPage: ie2, hasPreviousPage: M2, nextPage: ae2, previousPage: oe2, expandedDates: D2, loadingDate: te2, loadAllSessionsForDay: se2 };
2626
2650
  }
2627
- var ll = (e2) => e2?.onlineBooking?.enabled === true;
2628
- function ul(e2) {
2651
+ var _l = (e2) => e2?.onlineBooking?.enabled === true;
2652
+ function vl(e2) {
2629
2653
  return !!e2?._id;
2630
2654
  }
2631
- function dl(e2, t2) {
2655
+ function yl(e2, t2) {
2632
2656
  return e2 ? e2.anyResource ? t2 ?? `` : e2.staffMemberId : null;
2633
2657
  }
2634
- var fl = [];
2635
- var pl = [];
2636
- var ml = on.map((e2) => ({ id: e2, gender: e2 }));
2637
- var hl = { isSelectionValidated: false };
2638
- var gl = () => {
2658
+ var bl = [];
2659
+ var xl = [];
2660
+ var Sl = sn.map((e2) => ({ id: e2, gender: e2 }));
2661
+ var Cl = { isSelectionValidated: false };
2662
+ var wl = () => {
2639
2663
  };
2640
- var _l = async () => {
2664
+ var Tl = async () => {
2641
2665
  };
2642
- var vl = n(null);
2643
- function yl() {
2644
- let e2 = i(vl);
2666
+ var El = n(null);
2667
+ function Dl() {
2668
+ let e2 = i(El);
2645
2669
  if (!e2) throw Error(`useTimeSlotsContext must be used within TimeSlotsContextProvider`);
2646
2670
  return e2;
2647
2671
  }
2648
- function bl(e2, t2, n2) {
2672
+ function Ol(e2, t2, n2) {
2649
2673
  e2 ? t2() : n2();
2650
2674
  }
2651
- var xl = { loginRequired: `rescheduleLoginRequired`, notFound: `rescheduleNotFound`, accessDenied: `rescheduleAccessDenied`, failed: `rescheduleNotFound`, wrongService: `rescheduleNotFound`, notReschedulable: `rescheduleNotReschedulable` };
2652
- function Sl(e2 = 3) {
2653
- return Math.min(Math.max(e2, 1), Ks);
2675
+ var kl = { loginRequired: `rescheduleLoginRequired`, notFound: `rescheduleNotFound`, accessDenied: `rescheduleAccessDenied`, failed: `rescheduleNotFound`, wrongService: `rescheduleNotFound`, notReschedulable: `rescheduleNotReschedulable` };
2676
+ function Al(e2 = 3) {
2677
+ return Math.min(Math.max(e2, 1), ec);
2654
2678
  }
2655
- function Cl(e2) {
2679
+ function jl(e2) {
2656
2680
  let { isLoading: n2, bookingsSettingsLoading: r2 } = u();
2657
- pc(cc.TIME_SLOTS, !n2 && !r2);
2658
- let i2 = xs(), [a2] = c(() => al(i2));
2659
- return p(Gs, { children: p(t, { fallback: p(yc, { nextAvailableSlotsCount: Sl(e2.nextAvailableSlotsCount), children: e2.children }), children: p(Tl, { ...e2, configurationPromise: a2 }) }) });
2681
+ xc(gc.TIME_SLOTS, !n2 && !r2);
2682
+ let i2 = ks(), [a2] = c(() => pl(i2));
2683
+ return p($s, { children: p(t, { fallback: p(Dc, { nextAvailableSlotsCount: Al(e2.nextAvailableSlotsCount), children: e2.children }), children: p(Nl, { ...e2, configurationPromise: a2 }) }) });
2660
2684
  }
2661
- function wl(e2) {
2685
+ function Ml(e2) {
2662
2686
  let [t2, n2] = c({ serviceId: e2, key: 0 });
2663
2687
  return e2 !== t2.serviceId && n2({ serviceId: e2, key: t2.serviceId ? t2.key + 1 : t2.key }), t2.key;
2664
2688
  }
2665
- function Tl({ onlyAvailableSlots: e2 = true, nextAvailableSlotsCount: t2 = 3, loadDaysAvailabilityInitially: n2 = false, timeSlotLimitPerDay: r2 = 100, configurationPromise: i2, children: o2 }) {
2666
- let s2 = Vs().isLoading, { searchParams: d2 } = rc(), { reschedule: f2 } = u(), [m2] = c(() => ({ locationId: d2.get(qa.location), staffId: d2.get(qa.resource), timeZone: (f2 ? void 0 : Ar(d2.get(qa.blob))?.timezone) ?? d2.get(qa.timezone) })), [h2, g2] = c(m2.timeZone), _2 = Sl(t2), [v2, y2] = c(false);
2689
+ function Nl({ onlyAvailableSlots: e2 = true, nextAvailableSlotsCount: t2 = 3, loadDaysAvailabilityInitially: n2 = false, timeSlotLimitPerDay: r2 = 100, configurationPromise: i2, children: o2 }) {
2690
+ let s2 = Ys().isLoading, { searchParams: d2 } = dc(), { reschedule: f2 } = u(), [m2] = c(() => ({ locationId: d2.get(Xa.location), staffId: d2.get(Xa.resource), timeZone: (f2 ? void 0 : Nr(d2.get(Xa.blob))?.timezone) ?? d2.get(Xa.timezone) })), [h2, g2] = c(m2.timeZone), _2 = Al(t2), [v2, y2] = c(false);
2667
2691
  a(() => y2(true), []);
2668
- let b2 = v2 && !s2, x2 = gs(i2), S2 = l(ts, es, () => false), { serviceId: C2 } = u(), w2 = wl(C2), T2 = Number.isFinite(r2) ? Math.max(1, Math.floor(r2)) : 100;
2669
- return p(qs, { fallback: p(bc, { nextAvailableSlotsCount: _2, children: o2 }), feature: vo.timeSlots, children: p(El, { onlyAvailableSlots: e2, selectedTimeZone: h2, setSelectedTimeZone: g2, enabled: b2, nextAvailableSlotsCount: _2, loadDaysAvailabilityInitially: n2, timeSlotLimitPerDay: T2, landingLocationId: m2.locationId, landingStaffId: m2.staffId, businessTimeZone: x2.businessTimeZone, staffSelectionStrategy: x2.staffSelectionStrategy, allowGenderSelection: x2.allowGenderSelection, requestedGenderRejected: S2, children: o2 }) }, w2);
2692
+ let b2 = v2 && !s2, x2 = ws(i2), S2 = l(rs, ns, () => false), { serviceId: C2 } = u(), w2 = Ml(C2), T2 = Number.isFinite(r2) ? Math.max(1, Math.floor(r2)) : 100;
2693
+ return p(tc, { fallback: p(Oc, { nextAvailableSlotsCount: _2, children: o2 }), feature: xo.timeSlots, children: p(Pl, { onlyAvailableSlots: e2, selectedTimeZone: h2, setSelectedTimeZone: g2, enabled: b2, nextAvailableSlotsCount: _2, loadDaysAvailabilityInitially: n2, timeSlotLimitPerDay: T2, landingLocationId: m2.locationId, landingStaffId: m2.staffId, businessTimeZone: x2.businessTimeZone, staffSelectionStrategy: x2.staffSelectionStrategy, allowGenderSelection: x2.allowGenderSelection, requestedGenderRejected: S2, children: o2 }) }, w2);
2670
2694
  }
2671
- function El({ onlyAvailableSlots: e2, selectedTimeZone: t2, setSelectedTimeZone: n2, enabled: i2, nextAvailableSlotsCount: l2, loadDaysAvailabilityInitially: d2, timeSlotLimitPerDay: f2, landingLocationId: m2, landingStaffId: h2, businessTimeZone: g2, staffSelectionStrategy: _2, allowGenderSelection: v2, requestedGenderRejected: y2, children: b2 }) {
2672
- let { service: x2, serviceId: S2, serviceType: C2, setSlot: w2, clearSlot: T2, setMultiServiceSlot: ee2, clearMultiServiceSlot: E2, draftRevision: D2, navigateToMultiServiceForm: O2, selection: te2, selectStaffMember: k2, clearSelection: A2, clearStaffMember: ne2, withSelectionParam: re2, staffMembers: j2, serviceOptionsAndVariants: ie2, isLoading: M2, hasError: ae2, multiServiceAppointmentServices: N2 = pl, reschedule: oe2 } = u(), P2 = oe2 != null, se2 = P2 && oe2.status !== `ready`, ce2 = P2 && oe2.status === `loading`, le2 = P2 ? xl[oe2.status] : void 0, ue2 = se2 ? null : oe2?.booking ?? null, de2 = ue2 ? oe2.validUntil : null, fe2 = ul(x2) && !ll(x2), F2 = fe2 || se2 ? null : S2, pe2 = rc(), me2 = P2 ? null : pe2.searchParams.get(qa.blob), he2 = o(() => Za(Ar(me2)), [me2]), I2 = !S2 && !M2 && !ae2 && (he2.valid || he2.reason !== `too-few-services`), ge2 = I2 && he2.valid && N2.some((e3) => !ll(e3) && he2.services.some((t3) => t3.serviceId === e3._id)), _e2 = fe2 || ge2, ve2 = I2 && he2.valid && !ge2 ? he2.requestKey : null, ye2 = o(() => ve2 && he2.valid ? { services: he2.services, locationId: he2.locationId, locationType: he2.locationType } : null, [ve2]), be2 = !!F2 || ye2 !== null, xe2 = F2 || ve2, Se2 = i2 && !M2 && !ae2 && !be2 && !ce2, Ce2 = Us(), we2 = Vs(), { navigate: Te2, resolvePath: Ee2 } = co(), [De2, Oe2] = c(null), [ke2, Ae2] = c(false), je2 = s([]), Me2 = s(false), Ne2 = r(() => (Ae2(true), Me2.current ? Promise.resolve() : new Promise((e3) => {
2695
+ function Pl({ onlyAvailableSlots: e2, selectedTimeZone: t2, setSelectedTimeZone: n2, enabled: i2, nextAvailableSlotsCount: l2, loadDaysAvailabilityInitially: d2, timeSlotLimitPerDay: f2, landingLocationId: m2, landingStaffId: h2, businessTimeZone: g2, staffSelectionStrategy: _2, allowGenderSelection: v2, requestedGenderRejected: y2, children: b2 }) {
2696
+ let { service: x2, serviceId: S2, serviceType: C2, setSlot: w2, clearSlot: T2, setMultiServiceSlot: ee2, clearMultiServiceSlot: E2, draftRevision: D2, navigateToMultiServiceForm: O2, selection: te2, selectStaffMember: k2, clearSelection: A2, clearStaffMember: ne2, withSelectionParam: re2, staffMembers: j2, serviceOptionsAndVariants: ie2, isLoading: M2, hasError: ae2, multiServiceAppointmentServices: oe2 = xl, reschedule: se2 } = u(), N2 = se2 != null, ce2 = N2 && se2.status !== `ready`, le2 = N2 && se2.status === `loading`, ue2 = N2 ? kl[se2.status] : void 0, de2 = ce2 ? null : se2?.booking ?? null, fe2 = de2 ? se2.validUntil : null, pe2 = vl(x2) && !_l(x2), P2 = pe2 || ce2 ? null : S2, me2 = dc(), he2 = N2 ? null : me2.searchParams.get(Xa.blob), F2 = o(() => eo(Nr(he2)), [he2]), I2 = !S2 && !M2 && !ae2 && (F2.valid || F2.reason !== `too-few-services`), ge2 = I2 && F2.valid && oe2.some((e3) => !_l(e3) && F2.services.some((t3) => t3.serviceId === e3._id)), _e2 = pe2 || ge2, ve2 = I2 && F2.valid && !ge2 ? F2.requestKey : null, ye2 = o(() => ve2 && F2.valid ? { services: F2.services, locationId: F2.locationId, locationType: F2.locationType } : null, [ve2]), be2 = !!P2 || ye2 !== null, xe2 = P2 || ve2, Se2 = i2 && !M2 && !ae2 && !be2 && !le2, Ce2 = Zs(), we2 = Ys(), { navigate: Te2, resolvePath: Ee2 } = fo(), [De2, Oe2] = c(null), [ke2, Ae2] = c(false), je2 = s([]), Me2 = s(false), Ne2 = r(() => (Ae2(true), Me2.current ? Promise.resolve() : new Promise((e3) => {
2673
2697
  je2.current.push(e3);
2674
- })), []), Pe2 = i2 ? Intl.DateTimeFormat().resolvedOptions().timeZone : null, Fe2 = Ua(x2), Ie2 = s(null), Le2 = $a(te2), Re2 = s(Le2);
2698
+ })), []), Pe2 = i2 ? Intl.DateTimeFormat().resolvedOptions().timeZone : null, Fe2 = Ka(x2), Ie2 = s(null), Le2 = no(te2), Re2 = s(Le2);
2675
2699
  Re2.current = Le2;
2676
- let ze2 = Le2 && !Le2.anyResource ? Le2.staffMemberId : null, Be2 = te2.requestedGender ?? null, L2 = !Ga(C2) && !Ka(C2), Ve2 = L2 && !I2 && hs(ie2), R2 = I2 || L2 && _2 === `CUSTOMER_CANNOT_CHOOSE`, He2 = _2 !== void 0, Ue2 = Bo({ allowGenderSelection: v2, staffSelectionStrategy: _2 ?? null }) && L2 && !I2 && !Ve2, We2 = Ue2 && !y2, Ge2 = o(() => F2 ? Ar(me2)?.services.find((e3) => e3.serviceId === F2) ?? null : null, [me2, F2]), Ke2 = (j2 ?? []).map((e3) => e3.staffMemberId).join(`,`), qe2 = Fe2.map((e3) => e3.id).join(`,`), Je2 = o(() => Wc({ entry: Ge2, appointmentLike: L2, staffChoiceHidden: R2, staffPriced: Ve2, staffSelectionStrategy: _2, genderAllowed: We2, staffMemberIds: Ke2.split(`,`), locationIds: qe2.split(`,`) }), [Ge2, L2, R2, Ve2, _2, We2, Ke2, qe2]), z2 = Je2.staff, Ye2 = Je2.locationId, Xe2 = R2 || z2 !== null, [Ze2, Qe2] = c(null), [$e2, et2] = c(m2 !== null || P2), tt2 = (e3) => !!e3 && Fe2.some((t3) => t3.id === e3), nt2 = ue2?.locationId ?? null, rt2 = Ze2 ?? ($e2 ? tt2(nt2) ? nt2 : m2 : null), it2 = Ye2 ?? (tt2(rt2) ? rt2 : null), at2 = o(() => Ye2 ? [] : Fe2.map((e3) => ({ id: e3.id, name: e3.label })), [x2, Ye2]), ot2 = o(() => Xe2 ? [] : (j2 ?? []).filter((e3) => e3.name).map((e3) => ({ id: e3.staffMemberId, name: e3.name ?? ``, gender: null })), [j2, Xe2]), st2 = L2 && !He2 ? fl : ot2, ct2 = We2 && st2.length > 1, lt2 = o(() => ct2 ? [...ml, ...st2] : st2, [ct2, st2]), [ut2, dt2] = c(null), [ft2, pt2] = c(h2 !== null), mt2 = ut2 ?? (ft2 ? h2 : null), B2 = z2 ? z2.anyResource ? null : z2.staffMemberId : mt2 !== null && ot2.some((e3) => e3.id === mt2) ? mt2 : null, ht2 = Le2?.anyResource ? Be2 : null, [gt2, _t2] = c(ht2), [vt2, yt2] = c(ht2);
2677
- !y2 && Le2?.anyResource && Be2 !== vt2 && (yt2(Be2), _t2(Be2));
2678
- let bt2 = z2 ? Je2.requestedGender : Ue2 && st2.length > 1 && B2 === null ? gt2 : null, V2 = y2 ? null : bt2, xt2 = r((e3) => {
2679
- Re2.current = e3, e3 ? e3.anyResource ? A2(V2 ?? void 0) : k2(e3.staffMemberId) : ne2();
2680
- }, [ne2, A2, k2, V2]), St2 = r((e3) => xt2(e3 ? { anyResource: false, staffMemberId: e3 } : { anyResource: true }), [xt2]), Ct2 = (ue2?.addOnIds ?? []).filter((e3) => x2?.addOnGroups?.some((t3) => t3.addOnIds?.includes(e3))), wt2 = ue2 && Ga(C2) ? ue2.participants : null, Tt2 = L2 ? Ja(te2) : null, { addOnIds: Et2, ...Dt2 } = Tt2 ?? {}, Ot2 = L2 && ue2 ? Ct2.length ? { ...Dt2, addOnIds: Ct2 } : Dt2 : Tt2, kt2 = Ot2 ? Jo(Ot2) : void 0, At2 = JSON.stringify(bt2 ? { ...kt2, requestedGender: { gender: bt2 } } : kt2 ?? null), jt2 = o(() => JSON.parse(At2), [At2]), Mt2 = z2?.anyResource === true, Nt2 = r((e3) => Mt2 || _2 !== void 0 && Bc({ isAppointment: L2, staffOnSlotCount: e3, hasStaffFilter: B2 !== null, hasRequestedGender: V2 !== null, hasStaffPricedVariants: Ve2, staffSelectionStrategy: _2 }), [Mt2, L2, _2, B2, V2, Ve2]), Pt2 = r((e3) => z2 ?? (R2 ? null : e3), [z2, R2]), Ft2 = r((e3) => {
2681
- let t3 = e3 === null ? null : lt2.find((t4) => t4.id === e3);
2682
- t3 !== void 0 && (pt2(false), dt2(t3 && !t3.gender ? t3.id : null), _t2(t3?.gender ?? null));
2683
- }, [lt2]), It2 = r((e3) => {
2684
- (e3 === null || Fe2.some((t3) => t3.id === e3)) && (et2(false), Qe2(e3));
2685
- }, [x2]), Lt2 = !!(i2 && !we2.isLoading && we2.displayTimeZonePolicy.customerCanChange && g2 && Pe2 && g2 !== Pe2), H2 = i2 ? Lt2 && t2 && (t2 === g2 || t2 === Pe2) ? t2 : Ce2 ?? g2 ?? Pe2 : null, Rt2 = r((e3) => {
2686
- Lt2 && (e3 === g2 || e3 === Pe2) && n2(e3);
2687
- }, [Lt2, g2, Pe2, n2]), zt2 = o(() => i2 && !M2 && be2 ? Date.now() : void 0, [i2, M2, F2, ye2, H2]), Bt2 = zt2 !== void 0 && H2 ? Co(new Date(zt2), H2) : null, { range: Vt2, daysAvailability: Ht2, isLoading: Ut2, hasError: Wt2, setRange: Gt2, nextRange: Kt2, previousRange: qt2 } = Ic({ enabled: i2, serviceId: F2, serviceType: C2, multiServiceRequest: ye2, timeZone: H2, today: Bt2, locationId: it2, staffId: B2, customerChoices: jt2, minRemainingCapacity: wt2, loadInitially: d2, onlyAvailableSlots: e2 }), Jt2 = de2?.slice(0, 10) ?? null, Yt2 = o(() => Jt2 ? Ht2.map((e3) => e3.date > Jt2 ? { ...e3, availability: `none` } : e3) : Ht2, [Ht2, Jt2]), Xt2 = de2 && H2 ? Eo(new Date(de2), H2) : null, { query: U2, selectedDate: Zt2, timeSlots: Qt2, isLoading: $t2, error: en2, selectDate: tn2, findNextAvailableDate: nn2 } = Lc({ enabled: i2, serviceId: F2, serviceType: C2, multiServiceRequest: ye2, timeZone: H2, today: Bt2, locationId: it2, staffId: B2, customerChoices: jt2, minRemainingCapacity: wt2, onlyAvailableSlots: e2, serviceLoading: M2 }), rn2 = s(true), an2 = s(null);
2700
+ let ze2 = Le2 && !Le2.anyResource ? Le2.staffMemberId : null, Be2 = te2.requestedGender ?? null, L2 = !Ja(C2) && !Ya(C2), Ve2 = L2 && !I2 && _s(ie2), R2 = I2 || L2 && _2 === `CUSTOMER_CANNOT_CHOOSE`, He2 = _2 !== void 0, Ue2 = Ho({ allowGenderSelection: v2, staffSelectionStrategy: _2 ?? null }) && L2 && !I2 && !Ve2, We2 = Ue2 && !y2, Ge2 = o(() => P2 ? Nr(he2)?.services.find((e3) => e3.serviceId === P2) ?? null : null, [he2, P2]), Ke2 = (j2 ?? []).map((e3) => e3.staffMemberId).join(`,`), qe2 = Fe2.map((e3) => e3.id).join(`,`), Je2 = o(() => Qc({ entry: Ge2, appointmentLike: L2, staffChoiceHidden: R2, staffPriced: Ve2, staffSelectionStrategy: _2, genderAllowed: We2, staffMemberIds: Ke2.split(`,`), locationIds: qe2.split(`,`) }), [Ge2, L2, R2, Ve2, _2, We2, Ke2, qe2]), z2 = Je2.staff, Ye2 = Je2.locationId, Xe2 = R2 || z2 !== null, [Ze2, Qe2] = c(null), [$e2, et2] = c(m2 !== null || N2), B2 = o(() => x2 ? Cs(x2) : [], [x2]), tt2 = z2 && !z2.anyResource ? z2.staffMemberId : null, nt2 = o(() => {
2701
+ if (!tt2) return B2;
2702
+ let e3 = B2.find((e4) => e4.staffMemberId === tt2);
2703
+ return e3 ? [e3] : B2;
2704
+ }, [B2, tt2]), rt2 = de2?.locationId ?? null, it2 = o(() => {
2705
+ let e3 = Ss(Fe2, nt2);
2706
+ return !rt2 || e3.some((e4) => e4.id === rt2) ? e3 : Fe2.filter((t3) => t3.id === rt2 || e3.some((e4) => e4.id === t3.id));
2707
+ }, [x2, nt2, rt2]), at2 = (e3) => !!e3 && it2.some((t3) => t3.id === e3), ot2 = Ze2 ?? ($e2 ? at2(rt2) ? rt2 : m2 : null), st2 = Fe2.length > 1 && it2.length === 1 ? it2[0].id : null, V2 = Ye2 ?? (at2(ot2) ? ot2 : st2), ct2 = o(() => Ye2 ? [] : it2.map((e3) => ({ id: e3.id, name: e3.label })), [it2, Ye2]), lt2 = o(() => new Map(B2.map((e3) => [e3.staffMemberId, e3.locationCoverage])), [B2]), ut2 = r((e3, t3) => xs([{ staffMemberId: e3, locationCoverage: lt2.get(e3) }], t3).length === 1, [lt2]), dt2 = o(() => Xe2 ? [] : (j2 ?? []).filter((e3) => e3.name).map((e3) => ({ id: e3.staffMemberId, name: e3.name ?? ``, gender: null })), [j2, Xe2]), ft2 = o(() => V2 ? dt2.filter((e3) => ut2(e3.id, V2)) : dt2, [dt2, V2, ut2]), pt2 = L2 && !He2 ? bl : ft2, mt2 = L2 && !He2 ? 0 : dt2.length, ht2 = We2 && mt2 > 1, gt2 = o(() => ht2 ? [...Sl, ...pt2] : pt2, [ht2, pt2]), [_t2, vt2] = c(null), [yt2, bt2] = c(h2 !== null);
2708
+ yt2 && h2 !== null && V2 !== null && !ut2(h2, V2) && bt2(false);
2709
+ let xt2 = _t2 ?? (yt2 ? h2 : null), H2 = z2 ? z2.anyResource ? null : z2.staffMemberId : xt2 !== null && ft2.some((e3) => e3.id === xt2) ? xt2 : null, St2 = Le2?.anyResource ? Be2 : null, [Ct2, wt2] = c(St2), [Tt2, Et2] = c(St2);
2710
+ !y2 && Le2?.anyResource && Be2 !== Tt2 && (Et2(Be2), wt2(Be2));
2711
+ let Dt2 = z2 ? Je2.requestedGender : Ue2 && mt2 > 1 && H2 === null ? Ct2 : null, Ot2 = y2 ? null : Dt2, kt2 = r((e3) => {
2712
+ Re2.current = e3, e3 ? e3.anyResource ? A2(Ot2 ?? void 0) : k2(e3.staffMemberId) : ne2();
2713
+ }, [ne2, A2, k2, Ot2]), At2 = r((e3) => kt2(e3 ? { anyResource: false, staffMemberId: e3 } : { anyResource: true }), [kt2]), jt2 = (de2?.addOnIds ?? []).filter((e3) => x2?.addOnGroups?.some((t3) => t3.addOnIds?.includes(e3))), Mt2 = de2 && Ja(C2) ? de2.participants : null, Nt2 = L2 ? Za(te2) : null, { addOnIds: Pt2, ...Ft2 } = Nt2 ?? {}, It2 = L2 && de2 ? jt2.length ? { ...Ft2, addOnIds: jt2 } : Ft2 : Nt2, Lt2 = It2 ? Xo(It2) : void 0, Rt2 = JSON.stringify(Dt2 ? { ...Lt2, requestedGender: { gender: Dt2 } } : Lt2 ?? null), zt2 = o(() => JSON.parse(Rt2), [Rt2]), Bt2 = z2?.anyResource === true, Vt2 = r((e3) => Bt2 || _2 !== void 0 && Jc({ isAppointment: L2, staffOnSlotCount: e3, hasStaffFilter: H2 !== null, hasRequestedGender: Ot2 !== null, hasStaffPricedVariants: Ve2, staffSelectionStrategy: _2 }), [Bt2, L2, _2, H2, Ot2, Ve2]), Ht2 = r((e3) => z2 ?? (R2 ? null : e3), [z2, R2]), Ut2 = r((e3) => {
2714
+ let t3 = e3 === null ? null : gt2.find((t4) => t4.id === e3);
2715
+ t3 !== void 0 && (bt2(false), vt2(t3 && !t3.gender ? t3.id : null), wt2(t3?.gender ?? null));
2716
+ }, [gt2]), Wt2 = r((e3) => {
2717
+ (e3 === null || it2.some((t3) => t3.id === e3)) && (et2(false), Qe2(e3), xt2 !== null && e3 !== null && !ut2(xt2, e3) && (vt2(null), bt2(false)));
2718
+ }, [it2, xt2, ut2]), Gt2 = !!(i2 && !we2.isLoading && we2.displayTimeZonePolicy.customerCanChange && g2 && Pe2 && g2 !== Pe2), U2 = i2 ? Gt2 && t2 && (t2 === g2 || t2 === Pe2) ? t2 : Ce2 ?? g2 ?? Pe2 : null, Kt2 = r((e3) => {
2719
+ Gt2 && (e3 === g2 || e3 === Pe2) && n2(e3);
2720
+ }, [Gt2, g2, Pe2, n2]), qt2 = o(() => i2 && !M2 && be2 ? Date.now() : void 0, [i2, M2, P2, ye2, U2]), Jt2 = qt2 !== void 0 && U2 ? To(new Date(qt2), U2) : null, { range: Yt2, daysAvailability: Xt2, isLoading: Zt2, hasError: Qt2, setRange: $t2, nextRange: en2, previousRange: tn2 } = Wc({ enabled: i2, serviceId: P2, serviceType: C2, multiServiceRequest: ye2, timeZone: U2, today: Jt2, locationId: V2, staffId: H2, customerChoices: zt2, minRemainingCapacity: Mt2, loadInitially: d2, onlyAvailableSlots: e2 }), nn2 = fe2?.slice(0, 10) ?? null, rn2 = o(() => nn2 ? Xt2.map((e3) => e3.date > nn2 ? { ...e3, availability: `none` } : e3) : Xt2, [Xt2, nn2]), an2 = fe2 && U2 ? Oo(new Date(fe2), U2) : null, { query: W2, selectedDate: on2, timeSlots: sn2, isLoading: cn2, error: ln2, selectDate: un2, findNextAvailableDate: dn2 } = Gc({ enabled: i2, serviceId: P2, serviceType: C2, multiServiceRequest: ye2, timeZone: U2, today: Jt2, locationId: V2, staffId: H2, customerChoices: zt2, minRemainingCapacity: Mt2, onlyAvailableSlots: e2, serviceLoading: M2 }), fn2 = s(true), pn2 = s(null);
2688
2721
  a(() => {
2689
- if (rn2.current) {
2690
- rn2.current = false;
2722
+ if (fn2.current) {
2723
+ fn2.current = false;
2691
2724
  return;
2692
2725
  }
2693
- Oe2(null), Ie2.current && bl(F2, T2, E2), Ie2.current = null, an2.current = null;
2694
- }, [U2, ye2, H2, it2, B2, jt2, wt2, e2, l2, f2, D2]);
2695
- let on2 = r(async () => {
2696
- let e3 = await nn2();
2697
- return e3.outcome === `found` ? Jt2 && e3.date > Jt2 ? `none` : (await Promise.all([tn2(e3.date), Vt2 && Lo(e3.date, Vt2) ? Promise.resolve() : Gt2(Po(e3.date))]), `found`) : e3.outcome;
2698
- }, [nn2, Jt2, tn2, Vt2, Gt2]), sn2 = !!(i2 && !M2 && be2 && H2 && Bt2), cn2 = i2 && !M2 && !be2, [ln2, un2] = c(false), [dn2, fn2] = c(0), pn2 = s(false), mn2 = s([]), W2 = s(0), hn2 = r(() => {
2699
- un2(false);
2700
- let e3 = mn2.current;
2701
- return mn2.current = [], e3;
2702
- }, []), gn2 = r(() => {
2703
- W2.current += 1, hn2().forEach((e3) => e3(`cancelled`));
2704
- }, [hn2]), _n2 = r((e3) => (gn2(), tn2(e3)), [gn2, tn2]), vn2 = r((e3) => {
2705
- let t3 = W2.current;
2706
- pn2.current = true, on2().then((n3) => {
2707
- pn2.current = false, n3 === `cancelled` && t3 === W2.current ? (mn2.current.unshift(...e3), un2(true)) : e3.forEach((e4) => e4(n3)), fn2((e4) => e4 + 1);
2726
+ Oe2(null), Ie2.current && Ol(P2, T2, E2), Ie2.current = null, pn2.current = null;
2727
+ }, [W2, ye2, U2, V2, H2, zt2, Mt2, e2, l2, f2, D2]);
2728
+ let mn2 = r(async () => {
2729
+ let e3 = await dn2();
2730
+ return e3.outcome === `found` ? nn2 && e3.date > nn2 ? `none` : (await Promise.all([un2(e3.date), Yt2 && zo(e3.date, Yt2) ? Promise.resolve() : $t2(Io(e3.date))]), `found`) : e3.outcome;
2731
+ }, [dn2, nn2, un2, Yt2, $t2]), hn2 = !!(i2 && !M2 && be2 && U2 && Jt2), G2 = i2 && !M2 && !be2, [gn2, _n2] = c(false), [vn2, yn2] = c(0), bn2 = s(false), xn2 = s([]), Sn2 = s(0), Cn2 = r(() => {
2732
+ _n2(false);
2733
+ let e3 = xn2.current;
2734
+ return xn2.current = [], e3;
2735
+ }, []), wn2 = r(() => {
2736
+ Sn2.current += 1, Cn2().forEach((e3) => e3(`cancelled`));
2737
+ }, [Cn2]), Tn2 = r((e3) => (wn2(), un2(e3)), [wn2, un2]), En2 = r((e3) => {
2738
+ let t3 = Sn2.current;
2739
+ bn2.current = true, mn2().then((n3) => {
2740
+ bn2.current = false, n3 === `cancelled` && t3 === Sn2.current ? (xn2.current.unshift(...e3), _n2(true)) : e3.forEach((e4) => e4(n3)), yn2((e4) => e4 + 1);
2708
2741
  });
2709
- }, [on2]), yn2 = r(() => cn2 ? Promise.resolve(`none`) : new Promise((e3) => {
2710
- if (sn2 && !pn2.current) {
2711
- vn2([...hn2(), e3]);
2742
+ }, [mn2]), Dn2 = r(() => G2 ? Promise.resolve(`none`) : new Promise((e3) => {
2743
+ if (hn2 && !bn2.current) {
2744
+ En2([...Cn2(), e3]);
2712
2745
  return;
2713
2746
  }
2714
- mn2.current.push(e3), un2(true);
2715
- }), [cn2, sn2, vn2, hn2]);
2747
+ xn2.current.push(e3), _n2(true);
2748
+ }), [G2, hn2, En2, Cn2]);
2716
2749
  a(() => {
2717
- if (ln2 && !pn2.current) {
2718
- if (cn2) {
2719
- hn2().forEach((e3) => e3(`none`));
2750
+ if (gn2 && !bn2.current) {
2751
+ if (G2) {
2752
+ Cn2().forEach((e3) => e3(`none`));
2720
2753
  return;
2721
2754
  }
2722
- sn2 && vn2(hn2());
2755
+ hn2 && En2(Cn2());
2723
2756
  }
2724
- }, [ln2, dn2, sn2, cn2, vn2, hn2]);
2725
- let bn2 = x2?.schedule?.lastSessionEnd, xn2 = L2 || Ga(C2) || Ka(C2) && !Rc(bn2, zt2), Sn2 = !!(ke2 && i2 && !M2 && F2 && H2 && zt2 !== void 0), Cn2 = Sn2 && F2 && H2 && zt2 !== void 0 ? zc({ serviceId: F2, serviceType: C2, lastSessionEnd: bn2, timeZone: H2, now: zt2, onlyAvailableSlots: e2, locationId: it2, staffId: B2, timeSlotLimitPerDay: f2, customerChoices: jt2, minRemainingCapacity: wt2 }) : void 0, G2 = cl(l2, Cn2), wn2 = ke2 && F2 && xn2 && !(ke2 && F2 && xn2 && (!i2 || M2)) && !H2, Tn2 = _e2 ? `onlineBookingOff` : le2 ?? (G2.error === null ? wn2 ? `timeZoneMissing` : null : `upcomingSlotsLoadFailed`), En2 = U2 !== null, Dn2 = o(() => Kc({ sessions: G2.sessions, dayQuery: En2, daySlots: Qt2, staffFilter: B2, appointmentLike: L2, limitPerDay: f2, expandedDates: G2.expandedDates }), [G2.sessions, En2, Qt2, B2, L2, f2, G2.expandedDates]), { slotIdOf: On2 } = Dn2, kn2 = ke2 && (Cn2 ? G2.firstPageSettled : Sn2 || i2 && !M2 && !F2 || wn2);
2726
- Me2.current = kn2, a(() => {
2727
- if (!kn2) return;
2757
+ }, [gn2, vn2, hn2, G2, En2, Cn2]);
2758
+ let On2 = x2?.schedule?.lastSessionEnd, kn2 = L2 || Ja(C2) || Ya(C2) && !Kc(On2, qt2), An2 = !!(ke2 && i2 && !M2 && P2 && U2 && qt2 !== void 0), jn2 = An2 && P2 && U2 && qt2 !== void 0 ? qc({ serviceId: P2, serviceType: C2, lastSessionEnd: On2, timeZone: U2, now: qt2, onlyAvailableSlots: e2, locationId: V2, staffId: H2, timeSlotLimitPerDay: f2, customerChoices: zt2, minRemainingCapacity: Mt2 }) : void 0, K2 = gl(l2, jn2), Mn2 = ke2 && P2 && kn2 && !(ke2 && P2 && kn2 && (!i2 || M2)) && !U2, Nn2 = _e2 ? `onlineBookingOff` : ue2 ?? (K2.error === null ? Mn2 ? `timeZoneMissing` : null : `upcomingSlotsLoadFailed`), Pn2 = W2 !== null, Fn2 = o(() => el({ sessions: K2.sessions, dayQuery: Pn2, daySlots: sn2, staffFilter: H2, appointmentLike: L2, limitPerDay: f2, expandedDates: K2.expandedDates }), [K2.sessions, Pn2, sn2, H2, L2, f2, K2.expandedDates]), { slotIdOf: In2 } = Fn2, Ln2 = ke2 && (jn2 ? K2.firstPageSettled : An2 || i2 && !M2 && !P2 || Mn2);
2759
+ Me2.current = Ln2, a(() => {
2760
+ if (!Ln2) return;
2728
2761
  let e3 = je2.current;
2729
2762
  je2.current = [], e3.forEach((e4) => e4());
2730
- }, [kn2]);
2731
- let An2 = ke2 && !kn2 || G2.isLoadingPage, jn2 = Tn2 !== null, Mn2 = U2 ? $t2 : An2 || $t2 || !i2 || be2 && !H2 || ln2 || ce2, Nn2 = U2 ? en2 : en2 ?? Tn2, Pn2 = U2 ? en2 !== null : jn2 || en2 !== null, Fn2 = fc(cc.TIME_SLOTS), In2 = s(false), Ln2 = r((e3, t3) => {
2763
+ }, [Ln2]);
2764
+ let Rn2 = ke2 && !Ln2 || K2.isLoadingPage, zn2 = Nn2 !== null, Bn2 = W2 ? cn2 : Rn2 || cn2 || !i2 || be2 && !U2 || gn2 || le2, Vn2 = W2 ? ln2 : ln2 ?? Nn2, Hn2 = W2 ? ln2 !== null : zn2 || ln2 !== null, q2 = bc(gc.TIME_SLOTS), Un2 = s(false), Wn2 = r((e3, t3) => {
2732
2765
  if (!t3.bookable) {
2733
- an2.current = null;
2766
+ pn2.current = null;
2734
2767
  return;
2735
2768
  }
2736
- if (e3 === an2.current) return;
2737
- an2.current = e3;
2738
- let n3 = F2 ?? t3.serviceId ?? t3.nestedTimeSlots?.[0]?.serviceId ?? void 0, r2 = C2 ?? N2.find((e4) => e4._id === n3)?.type ?? void 0;
2739
- !In2.current && !P2 && Fn2(oc({ bookingsServiceId: n3, serviceType: r2, isEligibleForFlowCompletion: true })), In2.current = true, Fn2(mc({ component: uc.TIME_PICKER, element: dc.TIME_SLOT, properties: JSON.stringify({ selectedTime: t3.localStartDate }) }));
2740
- }, [Fn2, F2, C2, N2, P2]), Rn2 = r((e3) => {
2769
+ if (e3 === pn2.current) return;
2770
+ pn2.current = e3;
2771
+ let n3 = P2 ?? t3.serviceId ?? t3.nestedTimeSlots?.[0]?.serviceId ?? void 0, r2 = C2 ?? oe2.find((e4) => e4._id === n3)?.type ?? void 0;
2772
+ !Un2.current && !N2 && q2(mc({ bookingsServiceId: n3, serviceType: r2, isEligibleForFlowCompletion: true })), Un2.current = true, q2(Sc({ component: vc.TIME_PICKER, element: yc.TIME_SLOT, properties: JSON.stringify({ selectedTime: t3.localStartDate }) }));
2773
+ }, [q2, P2, C2, oe2, N2]), Gn2 = r((e3) => {
2741
2774
  if (e3 === null) {
2742
2775
  let e4 = Ie2.current !== null;
2743
- Ie2.current = null, an2.current = null, Oe2(null), e4 && bl(F2, T2, E2);
2776
+ Ie2.current = null, pn2.current = null, Oe2(null), e4 && Ol(P2, T2, E2);
2744
2777
  return;
2745
2778
  }
2746
- let t3 = qc(Dn2, e3);
2779
+ let t3 = tl(Fn2, e3);
2747
2780
  if (!t3) return;
2748
2781
  if (I2) {
2749
- if (!ee2(t3.nestedTimeSlots ?? [], H2 ?? void 0)) return;
2750
- Ie2.current = t3, Oe2(t3), Ln2(e3, t3);
2782
+ if (!ee2(t3.nestedTimeSlots ?? [], U2 ?? void 0)) return;
2783
+ Ie2.current = t3, Oe2(t3), Wn2(e3, t3);
2751
2784
  return;
2752
2785
  }
2753
- Ie2.current = t3, Oe2(t3), Ln2(e3, t3);
2754
- let n3 = Zc(t3);
2755
- if (w2(ms(t3), { staffId: L2 ? void 0 : Xc(t3), timezone: H2 ?? void 0, bookable: t3.bookable, staffChoiceRequired: L2 && He2 && !R2 && n3.length > 1 && !Nt2(n3.length), rescheduleStaffId: L2 && (_2 !== `CUSTOMER_MAY_CHOOSE` || !Nt2(n3.length)) ? n3[0] : void 0 }), !L2) return;
2786
+ Ie2.current = t3, Oe2(t3), Wn2(e3, t3);
2787
+ let n3 = al(t3);
2788
+ if (w2(gs(t3), { staffId: L2 ? void 0 : il(t3), timezone: U2 ?? void 0, bookable: t3.bookable, staffChoiceRequired: L2 && He2 && !R2 && n3.length > 1 && !Vt2(n3.length), rescheduleStaffId: L2 && (_2 !== `CUSTOMER_MAY_CHOOSE` || !Vt2(n3.length)) ? n3[0] : void 0 }), !L2) return;
2756
2789
  let r2 = Re2.current, i3;
2757
- i3 = z2 || (B2 && n3.includes(B2) ? { anyResource: false, staffMemberId: B2 } : V2 !== null && Nt2(n3.length) ? { anyResource: true } : Vc(n3, He2 && Nt2(n3.length))), dl(i3, V2) !== dl(r2, Be2) && xt2(i3);
2758
- }, [I2, F2, T2, E2, ee2, w2, Dn2, Ln2, H2, L2, He2, _2, Nt2, z2, B2, V2, Be2, xt2]), zn2 = r(() => {
2790
+ i3 = z2 || (H2 && n3.includes(H2) ? { anyResource: false, staffMemberId: H2 } : Ot2 !== null && Vt2(n3.length) ? { anyResource: true } : Yc(n3, He2 && Vt2(n3.length))), yl(i3, Ot2) !== yl(r2, Be2) && kt2(i3);
2791
+ }, [I2, P2, T2, E2, ee2, w2, Fn2, Wn2, U2, L2, He2, _2, Vt2, z2, H2, Ot2, Be2, kt2]), Kn2 = r(() => {
2759
2792
  let e3 = Ie2.current;
2760
- if (!e3 || P2) return;
2793
+ if (!e3 || N2) return;
2761
2794
  if (I2) {
2762
- O2(Fn2);
2795
+ O2(q2);
2763
2796
  return;
2764
2797
  }
2765
- if (!F2) return;
2798
+ if (!P2) return;
2766
2799
  let t3;
2767
2800
  if (L2) {
2768
- let n4 = Zc(e3), r2 = Hc(n4, Pt2(Re2.current), Nt2(n4.length));
2801
+ let n4 = al(e3), r2 = Xc(n4, Ht2(Re2.current), Vt2(n4.length));
2769
2802
  t3 = (r2.isComplete ? r2.resourceId : n4[0]) ?? (n4.length ? null : void 0);
2770
2803
  }
2771
- let n3 = Ee2(`bookingForm`, { slug: x2?.mainSlug?.name ?? null, serviceId: F2 });
2772
- e3.bookable && Fn2(_c({ serviceId: F2, serviceType: C2 ?? void 0, start: e3.localStartDate, end: e3.localEndDate, timeZone: H2 ?? void 0, isEligibleForFlowCompletion: !!n3 })), n3 && Te2(re2(n3, { handoff: true, staffId: t3 }));
2773
- }, [Fn2, I2, O2, H2, F2, C2, x2, L2, Pt2, Nt2, Te2, Ee2, re2, P2]), Bn2 = De2 ? Zc(De2) : null, Vn2 = Bn2 ? I2 || !L2 || Hc(Bn2, Pt2(Le2), Nt2(Bn2.length)).isComplete : false, K2 = Bn2 ? Nt2(Bn2.length) : false, Hn2 = o(() => !De2 || Xe2 ? [] : Yc(De2).map((e3) => ({ staffMemberId: e3.staffMemberId, name: e3.name || null, image: null, isSelected: e3.staffMemberId === ze2 })), [De2, Xe2, ze2]), Un2 = o(() => ({ ...hl, isMultiService: I2, hasValidSchedulingInput: be2, availabilityRequestKey: xe2, needsServiceChoice: Se2, isRescheduling: P2, rescheduleValidUntil: Xt2, businessTimeZone: g2, canChangeTimeZone: Lt2, setTimeZone: Rt2, locationFilterOptions: at2, selectedLocationFilter: it2, setLocationFilter: It2, staffFilterOptions: lt2, selectedStaffFilter: B2, setStaffFilter: Ft2, requestedGender: V2, genderSelectionAllowed: We2, currentTimeSlotsPage: U2 ? 1 : G2.currentPage, hasNextTimeSlotsPage: !U2 && G2.hasNextPage, hasPreviousTimeSlotsPage: !U2 && G2.hasPreviousPage, nextTimeSlotsPage: U2 ? _l : G2.nextPage, loadUpcomingTimeSlots: Ne2, upcomingTimeSlotsRequested: ke2, previousTimeSlotsPage: U2 ? gl : G2.previousPage, timeSlots: Dn2.rows.map((e3) => Jc(e3, H2, On2, R2)), isLoading: Mn2, hasError: Pn2, errorCode: Nn2, selectedDate: Zt2, daysAvailabilityRange: Vt2, daysAvailability: Yt2, daysAvailabilityLoading: Ut2, daysAvailabilityHasError: Wt2, timeSlotsLoading: Mn2, timeSlotsErrorCode: Nn2, selectDate: _n2, setDaysAvailabilityRange: Gt2, nextDaysAvailabilityRange: Kt2, previousDaysAvailabilityRange: qt2, goToNextAvailableDate: yn2, nextAvailableSlotsCount: l2, timeZone: H2, staffFromSlots: Hn2, selectedResourceId: ze2, setSelectedResource: St2, canAutoAssignStaff: K2, isComplete: Vn2, selectedTimeSlot: De2 ? Jc(De2, H2, On2, R2) : null, selectTimeSlot: Rn2, navigateToBookingForm: zn2, timeSlotLimitPerDay: f2, expandedDates: G2.expandedDates, daysWithMore: Dn2.daysWithMore, loadingDate: G2.loadingDate, loadAllTimeSlotsForDay: G2.loadAllSessionsForDay }), [I2, be2, xe2, Se2, P2, Xt2, g2, H2, Lt2, Rt2, G2, Ne2, ke2, at2, it2, It2, lt2, B2, Ft2, V2, We2, U2, Mn2, Nn2, Pn2, Dn2, Zt2, Vt2, Yt2, Ut2, Wt2, _n2, Gt2, Kt2, qt2, yn2, l2, Hn2, ze2, St2, K2, Vn2, De2, Rn2, zn2, f2, On2, R2]);
2774
- return p(vl.Provider, { value: Un2, children: b2 });
2804
+ let n3 = Ee2(`bookingForm`, { slug: x2?.mainSlug?.name ?? null, serviceId: P2 });
2805
+ e3.bookable && q2(Tc({ serviceId: P2, serviceType: C2 ?? void 0, start: e3.localStartDate, end: e3.localEndDate, timeZone: U2 ?? void 0, isEligibleForFlowCompletion: !!n3 })), n3 && Te2(re2(n3, { handoff: true, staffId: t3 }));
2806
+ }, [q2, I2, O2, U2, P2, C2, x2, L2, Ht2, Vt2, Te2, Ee2, re2, N2]), qn2 = De2 ? al(De2) : null, Jn2 = qn2 ? I2 || !L2 || Xc(qn2, Ht2(Le2), Vt2(qn2.length)).isComplete : false, Yn2 = qn2 ? Vt2(qn2.length) : false, Xn2 = o(() => !De2 || Xe2 ? [] : rl(De2).map((e3) => ({ staffMemberId: e3.staffMemberId, name: e3.name || null, image: null, isSelected: e3.staffMemberId === ze2 })), [De2, Xe2, ze2]), Zn2 = o(() => ({ ...Cl, isMultiService: I2, hasValidSchedulingInput: be2, availabilityRequestKey: xe2, needsServiceChoice: Se2, isRescheduling: N2, rescheduleValidUntil: an2, businessTimeZone: g2, canChangeTimeZone: Gt2, setTimeZone: Kt2, locationFilterOptions: ct2, selectedLocationFilter: V2, setLocationFilter: Wt2, staffFilterOptions: gt2, selectedStaffFilter: H2, setStaffFilter: Ut2, requestedGender: Ot2, genderSelectionAllowed: We2, currentTimeSlotsPage: W2 ? 1 : K2.currentPage, hasNextTimeSlotsPage: !W2 && K2.hasNextPage, hasPreviousTimeSlotsPage: !W2 && K2.hasPreviousPage, nextTimeSlotsPage: W2 ? Tl : K2.nextPage, loadUpcomingTimeSlots: Ne2, upcomingTimeSlotsRequested: ke2, previousTimeSlotsPage: W2 ? wl : K2.previousPage, timeSlots: Fn2.rows.map((e3) => nl(e3, U2, In2, R2)), isLoading: Bn2, hasError: Hn2, errorCode: Vn2, selectedDate: on2, daysAvailabilityRange: Yt2, daysAvailability: rn2, daysAvailabilityLoading: Zt2, daysAvailabilityHasError: Qt2, timeSlotsLoading: Bn2, timeSlotsErrorCode: Vn2, selectDate: Tn2, setDaysAvailabilityRange: $t2, nextDaysAvailabilityRange: en2, previousDaysAvailabilityRange: tn2, goToNextAvailableDate: Dn2, nextAvailableSlotsCount: l2, timeZone: U2, staffFromSlots: Xn2, selectedResourceId: ze2, setSelectedResource: At2, canAutoAssignStaff: Yn2, isComplete: Jn2, selectedTimeSlot: De2 ? nl(De2, U2, In2, R2) : null, selectTimeSlot: Gn2, navigateToBookingForm: Kn2, timeSlotLimitPerDay: f2, expandedDates: K2.expandedDates, daysWithMore: Fn2.daysWithMore, loadingDate: K2.loadingDate, loadAllTimeSlotsForDay: K2.loadAllSessionsForDay }), [I2, be2, xe2, Se2, N2, an2, g2, U2, Gt2, Kt2, K2, Ne2, ke2, ct2, V2, Wt2, gt2, H2, Ut2, Ot2, We2, W2, Bn2, Vn2, Hn2, Fn2, on2, Yt2, rn2, Zt2, Qt2, Tn2, $t2, en2, tn2, Dn2, l2, Xn2, ze2, At2, Yn2, Jn2, De2, Gn2, Kn2, f2, In2, R2]);
2807
+ return p(El.Provider, { value: Zn2, children: b2 });
2775
2808
  }
2776
- var Dl = an;
2809
+ var Fl = on(`4936242d-905c-48bf-80ce-5f56d075de4f`);
2777
2810
  export {
2778
- Cl as TimeSlotsContextProvider,
2779
- Cl as default,
2780
- Dl as injectAccessTokenGetter,
2781
- vl as timeSlotsContext,
2782
- yl as useTimeSlotsContext
2811
+ jl as TimeSlotsContextProvider,
2812
+ jl as default,
2813
+ Fl as injectAccessTokenGetter,
2814
+ El as timeSlotsContext,
2815
+ Dl as useTimeSlotsContext
2783
2816
  };
2784
2817
  //# sourceMappingURL=context-time-slots.mjs.map