@wix/bookings 1.0.1757 → 1.0.1758

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