@wix/bookings 1.0.1749 → 1.0.1751

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/_sdk-exports/context-booking-checkout/runtime.js +2 -0
  2. package/_sdk-exports/context-categories/runtime.js +1 -0
  3. package/_sdk-exports/context-locations/runtime.js +1 -0
  4. package/_sdk-exports/{context-service-context → context-service}/runtime.d.ts +1 -1
  5. package/_sdk-exports/{context-service-context → context-service}/runtime.js +2 -2
  6. package/_sdk-exports/context-service-addons/runtime.js +1 -0
  7. package/_sdk-exports/context-services/runtime.js +2 -0
  8. package/_sdk-exports/context-time-slots/runtime.js +2 -0
  9. package/build/cjs/{context-booking-checkout-context.js → context-booking-checkout.js} +909 -925
  10. package/build/cjs/context-booking-checkout.js.map +1 -0
  11. package/build/cjs/{context-categories-context.js → context-categories.js} +287 -293
  12. package/build/cjs/context-categories.js.map +1 -0
  13. package/build/cjs/{context-locations-context.js → context-locations.js} +362 -368
  14. package/build/cjs/context-locations.js.map +1 -0
  15. package/build/cjs/{context-service-addons-context.js → context-service-addons.js} +424 -430
  16. package/build/cjs/context-service-addons.js.map +1 -0
  17. package/build/cjs/{context-service-context.d.ts → context-service.d.ts} +1 -1
  18. package/build/cjs/{context-service-context.js → context-service.js} +964 -977
  19. package/build/cjs/context-service.js.map +1 -0
  20. package/build/cjs/{context-services-context.js → context-services.js} +600 -611
  21. package/build/cjs/context-services.js.map +1 -0
  22. package/build/cjs/{context-time-slots-context.js → context-time-slots.js} +1187 -1195
  23. package/build/cjs/context-time-slots.js.map +1 -0
  24. package/build/es/{context-booking-checkout-context.mjs → context-booking-checkout.mjs} +906 -922
  25. package/build/es/context-booking-checkout.mjs.map +1 -0
  26. package/build/es/{context-categories-context.mjs → context-categories.mjs} +283 -289
  27. package/build/es/context-categories.mjs.map +1 -0
  28. package/build/es/{context-locations-context.mjs → context-locations.mjs} +358 -364
  29. package/build/es/context-locations.mjs.map +1 -0
  30. package/build/es/{context-service-addons-context.mjs → context-service-addons.mjs} +417 -423
  31. package/build/es/context-service-addons.mjs.map +1 -0
  32. package/build/{internal/cjs/context-service-context.d.ts → es/context-service.d.mts} +1 -1
  33. package/build/es/{context-service-context.mjs → context-service.mjs} +960 -973
  34. package/build/es/context-service.mjs.map +1 -0
  35. package/build/es/{context-services-context.mjs → context-services.mjs} +596 -607
  36. package/build/es/context-services.mjs.map +1 -0
  37. package/build/es/{context-time-slots-context.mjs → context-time-slots.mjs} +1181 -1189
  38. package/build/es/context-time-slots.mjs.map +1 -0
  39. package/build/internal/{es/context-service-context.d.mts → cjs/context-service.d.ts} +1 -1
  40. package/build/{es/context-service-context.d.mts → internal/es/context-service.d.mts} +1 -1
  41. package/context/booking-checkout/package.json +3 -0
  42. package/context/categories/package.json +3 -0
  43. package/context/locations/package.json +3 -0
  44. package/context/service/package.json +3 -0
  45. package/context/service-addons/package.json +3 -0
  46. package/context/services/package.json +3 -0
  47. package/context/time-slots/package.json +3 -0
  48. package/package.json +43 -43
  49. package/_sdk-exports/context-booking-checkout-context/runtime.js +0 -2
  50. package/_sdk-exports/context-categories-context/runtime.js +0 -1
  51. package/_sdk-exports/context-locations-context/runtime.js +0 -1
  52. package/_sdk-exports/context-service-addons-context/runtime.js +0 -1
  53. package/_sdk-exports/context-services-context/runtime.js +0 -2
  54. package/_sdk-exports/context-time-slots-context/runtime.js +0 -2
  55. package/build/cjs/context-booking-checkout-context.js.map +0 -1
  56. package/build/cjs/context-categories-context.js.map +0 -1
  57. package/build/cjs/context-locations-context.js.map +0 -1
  58. package/build/cjs/context-service-addons-context.js.map +0 -1
  59. package/build/cjs/context-service-context.js.map +0 -1
  60. package/build/cjs/context-services-context.js.map +0 -1
  61. package/build/cjs/context-time-slots-context.js.map +0 -1
  62. package/build/es/context-booking-checkout-context.mjs.map +0 -1
  63. package/build/es/context-categories-context.mjs.map +0 -1
  64. package/build/es/context-locations-context.mjs.map +0 -1
  65. package/build/es/context-service-addons-context.mjs.map +0 -1
  66. package/build/es/context-service-context.mjs.map +0 -1
  67. package/build/es/context-services-context.mjs.map +0 -1
  68. package/build/es/context-time-slots-context.mjs.map +0 -1
  69. package/context/booking-checkout-context/package.json +0 -3
  70. package/context/categories-context/package.json +0 -3
  71. package/context/locations-context/package.json +0 -3
  72. package/context/service-addons-context/package.json +0 -3
  73. package/context/service-context/package.json +0 -3
  74. package/context/services-context/package.json +0 -3
  75. package/context/time-slots-context/package.json +0 -3
  76. /package/_sdk-exports/{context-booking-checkout-context → context-booking-checkout}/runtime.d.ts +0 -0
  77. /package/_sdk-exports/{context-categories-context → context-categories}/runtime.d.ts +0 -0
  78. /package/_sdk-exports/{context-locations-context → context-locations}/runtime.d.ts +0 -0
  79. /package/_sdk-exports/{context-service-addons-context → context-service-addons}/runtime.d.ts +0 -0
  80. /package/_sdk-exports/{context-services-context → context-services}/runtime.d.ts +0 -0
  81. /package/_sdk-exports/{context-time-slots-context → context-time-slots}/runtime.d.ts +0 -0
  82. /package/build/cjs/{context-booking-checkout-context.d.ts → context-booking-checkout.d.ts} +0 -0
  83. /package/build/cjs/{context-categories-context.d.ts → context-categories.d.ts} +0 -0
  84. /package/build/cjs/{context-locations-context.d.ts → context-locations.d.ts} +0 -0
  85. /package/build/cjs/{context-service-addons-context.d.ts → context-service-addons.d.ts} +0 -0
  86. /package/build/cjs/{context-services-context.d.ts → context-services.d.ts} +0 -0
  87. /package/build/cjs/{context-time-slots-context.d.ts → context-time-slots.d.ts} +0 -0
  88. /package/build/es/{context-booking-checkout-context.d.mts → context-booking-checkout.d.mts} +0 -0
  89. /package/build/es/{context-categories-context.d.mts → context-categories.d.mts} +0 -0
  90. /package/build/es/{context-locations-context.d.mts → context-locations.d.mts} +0 -0
  91. /package/build/es/{context-service-addons-context.d.mts → context-service-addons.d.mts} +0 -0
  92. /package/build/es/{context-services-context.d.mts → context-services.d.mts} +0 -0
  93. /package/build/es/{context-time-slots-context.d.mts → context-time-slots.d.mts} +0 -0
  94. /package/build/internal/cjs/{context-booking-checkout-context.d.ts → context-booking-checkout.d.ts} +0 -0
  95. /package/build/internal/cjs/{context-categories-context.d.ts → context-categories.d.ts} +0 -0
  96. /package/build/internal/cjs/{context-locations-context.d.ts → context-locations.d.ts} +0 -0
  97. /package/build/internal/cjs/{context-service-addons-context.d.ts → context-service-addons.d.ts} +0 -0
  98. /package/build/internal/cjs/{context-services-context.d.ts → context-services.d.ts} +0 -0
  99. /package/build/internal/cjs/{context-time-slots-context.d.ts → context-time-slots.d.ts} +0 -0
  100. /package/build/internal/es/{context-booking-checkout-context.d.mts → context-booking-checkout.d.mts} +0 -0
  101. /package/build/internal/es/{context-categories-context.d.mts → context-categories.d.mts} +0 -0
  102. /package/build/internal/es/{context-locations-context.d.mts → context-locations.d.mts} +0 -0
  103. /package/build/internal/es/{context-service-addons-context.d.mts → context-service-addons.d.mts} +0 -0
  104. /package/build/internal/es/{context-services-context.d.mts → context-services.d.mts} +0 -0
  105. /package/build/internal/es/{context-time-slots-context.d.mts → context-time-slots.d.mts} +0 -0
@@ -17,20 +17,20 @@ var __copyProps = (to2, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // context-service-context.ts
21
- var context_service_context_exports = {};
22
- __export(context_service_context_exports, {
23
- SERVICE_CONTEXT_MISSING_PROVIDER_ERROR: () => Zy,
24
- ServiceContextProvider: () => Sb,
25
- default: () => Sb,
26
- injectAccessTokenGetter: () => Cb,
27
- resolveServiceTarget: () => $y,
28
- serviceContext: () => Xy,
29
- useServiceContext: () => Qy
20
+ // context-service.ts
21
+ var context_service_exports = {};
22
+ __export(context_service_exports, {
23
+ SERVICE_CONTEXT_MISSING_PROVIDER_ERROR: () => Ky,
24
+ ServiceContextProvider: () => _b,
25
+ default: () => _b,
26
+ injectAccessTokenGetter: () => vb,
27
+ resolveServiceTarget: () => Jy,
28
+ serviceContext: () => Gy,
29
+ useServiceContext: () => qy
30
30
  });
31
- module.exports = __toCommonJS(context_service_context_exports);
31
+ module.exports = __toCommonJS(context_service_exports);
32
32
 
33
- // _sdk-exports/context-service-context/runtime.js
33
+ // _sdk-exports/context-service/runtime.js
34
34
  var import_react = require("react");
35
35
  var import_services_manager_react = require("@wix/services-manager-react");
36
36
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -3012,93 +3012,90 @@ var Ud = false;
3012
3012
  function Wd() {
3013
3013
  return Ud;
3014
3014
  }
3015
- function Gd(e2) {
3016
- return e2;
3017
- }
3018
- var Kd = Gd;
3019
- var qd = Kd(`@wix/viewer-service-business-logger`);
3020
- function Jd(e2) {
3015
+ var Gd = _a;
3016
+ var Kd = Gd(`@wix/site-service-business-logger`);
3017
+ function qd(e2) {
3021
3018
  return { evid: 1190, src: 16, endpoint: ``, params: e2 };
3022
3019
  }
3023
- function Yd(e2) {
3020
+ function Jd(e2) {
3024
3021
  return { evid: 32, src: 16, endpoint: ``, params: e2 };
3025
3022
  }
3026
- function Xd(e2) {
3023
+ function Yd(e2) {
3027
3024
  return { evid: 33, src: 16, endpoint: ``, params: e2 };
3028
3025
  }
3029
- function Zd(e2) {
3026
+ function Xd(e2) {
3030
3027
  return { evid: 34, src: 16, endpoint: ``, params: e2 };
3031
3028
  }
3032
- function Qd(e2) {
3029
+ function Zd(e2) {
3033
3030
  return { evid: 87, src: 16, endpoint: ``, params: e2 };
3034
3031
  }
3035
3032
  var Y = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
3036
- var $d = { 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` };
3033
+ var Qd = { 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` };
3037
3034
  bd.BOOK_ONLINE;
3038
- var ef = `new_bookings_server`;
3039
- var tf = { WIDGET_BUTTON: `widget_button`, WIDGET_MORE_INFO_LABEL: `widget_more_info_label`, EXPLORE_PLANS: `explore_plans` };
3040
- var nf = { servicePage: `service_page`, bookingCalendar: `calendar_page`, bookingForm: `form` };
3041
- var rf = { servicePage: `navigate_to_service_page`, bookingCalendar: `navigate_to_calendar`, bookingForm: `navigate_to_booking_form` };
3042
- var af = `click`;
3043
- var of = { TIMEZONE_PICKER: `timezone_picker`, TIME_PICKER: `time_picker`, BOOKING_DETAILS: `booking_details`, RESCHEDULE_DIALOG: `reschedule_dialog` };
3044
- var sf = { CONFIRM_BUTTON: `confirm_button`, GO_TO_HOMEPAGE_BUTTON: `go_to_homepage_button` };
3045
- var cf = `reschedule success`;
3046
- var lf = (e2) => {
3047
- let t2 = (0, import_services_manager_react.useService)(qd);
3035
+ var $d = `new_bookings_server`;
3036
+ var ef = { WIDGET_BUTTON: `widget_button`, WIDGET_MORE_INFO_LABEL: `widget_more_info_label`, EXPLORE_PLANS: `explore_plans` };
3037
+ var tf = { servicePage: `service_page`, bookingCalendar: `calendar_page`, bookingForm: `form` };
3038
+ var nf = { servicePage: `navigate_to_service_page`, bookingCalendar: `navigate_to_calendar`, bookingForm: `navigate_to_booking_form` };
3039
+ var rf = `click`;
3040
+ var af = { TIMEZONE_PICKER: `timezone_picker`, TIME_PICKER: `time_picker`, BOOKING_DETAILS: `booking_details`, RESCHEDULE_DIALOG: `reschedule_dialog` };
3041
+ var of = { CONFIRM_BUTTON: `confirm_button`, GO_TO_HOMEPAGE_BUTTON: `go_to_homepage_button` };
3042
+ var sf = `reschedule success`;
3043
+ var cf = (e2) => {
3044
+ let { reportBi: t2 } = (0, import_services_manager_react.useService)(Kd);
3048
3045
  return (0, import_react.useCallback)((n2) => {
3049
- t2.reportBi({ widget_name: e2, bookingsPlatform: ef, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
3046
+ t2({ widget_name: e2, bookingsPlatform: $d, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
3050
3047
  }, [t2, e2]);
3051
3048
  };
3052
- var uf = (e2, t2 = true) => {
3053
- let n2 = lf(e2), { getParsedUrl: r2 } = Oa(), i2 = (0, import_react.useRef)(false);
3049
+ var lf = (e2, t2 = true) => {
3050
+ let n2 = cf(e2), { getParsedUrl: r2 } = Oa(), i2 = (0, import_react.useRef)(false);
3054
3051
  (0, import_react.useEffect)(() => {
3055
- t2 && !i2.current && (i2.current = true, n2(Yd({ referralInfo: r2().searchParams.get(Y.referral) ?? void 0 })));
3052
+ t2 && !i2.current && (i2.current = true, n2(Jd({ referralInfo: r2().searchParams.get(Y.referral) ?? void 0 })));
3056
3053
  }, [t2, n2, r2]);
3057
3054
  };
3058
- function df(e2) {
3055
+ function uf(e2) {
3059
3056
  return { evid: 501, src: 16, endpoint: `wixboost-ugc`, params: e2 };
3060
3057
  }
3061
- function ff(e2) {
3058
+ function df(e2) {
3062
3059
  return { evid: 551, src: 16, endpoint: `wixboost-ugc`, params: e2 };
3063
3060
  }
3064
- function pf(e2) {
3061
+ function ff(e2) {
3065
3062
  return { evid: 596, src: 16, endpoint: `wixboost-ugc`, params: e2 };
3066
3063
  }
3067
- function mf(e2, t2) {
3064
+ function pf(e2, t2) {
3068
3065
  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 = {};
3069
3066
  for (let e3 of n2) e3.type !== `literal` && (r2[e3.type] = Number(e3.value));
3070
3067
  return Date.UTC(r2.year, r2.month - 1, r2.day, r2.hour, r2.minute, r2.second) - e2;
3071
3068
  }
3072
- function hf(e2, t2) {
3069
+ function mf(e2, t2) {
3073
3070
  let n2 = e2.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?/);
3074
3071
  if (!n2) return null;
3075
3072
  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);
3076
3073
  if (Number.isNaN(l2)) return null;
3077
3074
  try {
3078
- let e3 = l2 - mf(l2, t2);
3079
- return new Date(l2 - mf(e3, t2));
3075
+ let e3 = l2 - pf(l2, t2);
3076
+ return new Date(l2 - pf(e3, t2));
3080
3077
  } catch {
3081
3078
  return null;
3082
3079
  }
3083
3080
  }
3084
- function gf({ start: e2, end: t2, timeZone: n2, ...r2 }) {
3085
- let i2 = (e3) => e3 && n2 ? hf(e3, n2)?.getTime() : void 0;
3086
- return Zd({ bookingsServiceId: r2.serviceId, serviceType: r2.serviceType, startTime: i2(e2), endTime: i2(t2), isEligibleForFlowCompletion: r2.isEligibleForFlowCompletion });
3081
+ function hf({ start: e2, end: t2, timeZone: n2, ...r2 }) {
3082
+ let i2 = (e3) => e3 && n2 ? mf(e3, n2)?.getTime() : void 0;
3083
+ return Xd({ bookingsServiceId: r2.serviceId, serviceType: r2.serviceType, startTime: i2(e2), endTime: i2(t2), isEligibleForFlowCompletion: r2.isEligibleForFlowCompletion });
3087
3084
  }
3088
- function _f(e2) {
3085
+ function gf(e2) {
3089
3086
  return mi(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/events-3`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }, { srcPath: `/_api/calendar/v3/ro/events`, destPath: `/v3/events` }], "www.wixapis.com": [{ srcPath: `/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], _: [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "*.dev.wix-code.com": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "editor._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "blocks._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "create.editorx": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }] } }));
3090
3087
  }
3091
- var vf = `@wix/auto_sdk_calendar_events`;
3092
- function yf(e2) {
3088
+ var _f = `@wix/auto_sdk_calendar_events`;
3089
+ function vf(e2) {
3093
3090
  function t2({ host: t3 }) {
3094
- return { entityFqdn: `wix.calendar.v3.event`, method: `POST`, methodFqn: `wix.calendar.events.v3.EventsService.QueryEvents`, packageName: vf, migrationOptions: { optInTransformResponse: true }, url: _f({ protoPath: `/v3/events/query`, data: e2, host: t3 }), data: e2, transformResponse: (e3) => B(e3, [{ transformFn: z, paths: [{ path: `events.createdDate` }, { path: `events.updatedDate` }, { path: `events.start.utcDate` }, { path: `events.end.utcDate` }, { path: `events.adjustedStart.utcDate` }, { path: `events.adjustedEnd.utcDate` }, { path: `events.recurrenceRule.until.utcDate` }, { path: `events.recurrenceRule.adjustedUntil.utcDate` }] }]) };
3091
+ return { entityFqdn: `wix.calendar.v3.event`, method: `POST`, methodFqn: `wix.calendar.events.v3.EventsService.QueryEvents`, packageName: _f, migrationOptions: { optInTransformResponse: true }, url: gf({ protoPath: `/v3/events/query`, data: e2, host: t3 }), data: e2, transformResponse: (e3) => B(e3, [{ transformFn: z, paths: [{ path: `events.createdDate` }, { path: `events.updatedDate` }, { path: `events.start.utcDate` }, { path: `events.end.utcDate` }, { path: `events.adjustedStart.utcDate` }, { path: `events.adjustedEnd.utcDate` }, { path: `events.recurrenceRule.until.utcDate` }, { path: `events.recurrenceRule.adjustedUntil.utcDate` }] }]) };
3095
3092
  }
3096
3093
  return t2;
3097
3094
  }
3098
- function bf(e2) {
3095
+ function yf(e2) {
3099
3096
  let { httpClient: t2, sideEffects: n2 } = arguments[1];
3100
3097
  return Ua({ func: async (r2) => {
3101
- let i2 = yf({ ...r2, ...e2 ?? {} });
3098
+ let i2 = vf({ ...r2, ...e2 ?? {} });
3102
3099
  n2?.onSiteCall?.();
3103
3100
  try {
3104
3101
  let e3 = await t2.request(i2);
@@ -3116,8 +3113,8 @@ function bf(e2) {
3116
3113
  throw V(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
3117
3114
  }, pagingMethod: `CURSOR`, transformationPaths: {} });
3118
3115
  }
3119
- async function xf(e2, t2) {
3120
- let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = yf(L({ query: e2, ...t2 }));
3116
+ async function bf(e2, t2) {
3117
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = vf(L({ query: e2, ...t2 }));
3121
3118
  r2?.onSiteCall?.();
3122
3119
  try {
3123
3120
  let e3 = await n2.request(i2);
@@ -3128,57 +3125,57 @@ async function xf(e2, t2) {
3128
3125
  }
3129
3126
  }
3130
3127
  ({ ...Xa() });
3131
- function Sf(e2) {
3132
- return (t2) => bf(t2, { httpClient: e2 });
3128
+ function xf(e2) {
3129
+ return (t2) => yf(t2, { httpClient: e2 });
3133
3130
  }
3134
- function Cf(e2) {
3135
- return (t2, n2) => xf(t2, n2, { httpClient: e2 });
3136
- }
3137
- var wf = _(`wix.calendar.v3.event_cancelled`, true, (e2) => R(B(e2, [{ transformFn: z, paths: [{ path: `data.event.createdDate` }, { path: `data.event.updatedDate` }, { path: `data.event.start.utcDate` }, { path: `data.event.end.utcDate` }, { path: `data.event.adjustedStart.utcDate` }, { path: `data.event.adjustedEnd.utcDate` }, { path: `data.event.recurrenceRule.until.utcDate` }, { path: `data.event.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
3138
- var Tf = _(`wix.calendar.v3.event_created`, true, (e2) => R(B(e2, [{ transformFn: z, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
3139
- var Ef = _(`wix.calendar.v3.event_recurring_split`, true, (e2) => R(B(e2, [{ transformFn: z, paths: [{ path: `data.updatedRecurringEventEndingBeforeSplit.createdDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.updatedDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.start.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.end.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedStart.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedEnd.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.until.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.createdDate` }, { path: `data.newRecurringEventStartingFromSplit.updatedDate` }, { path: `data.newRecurringEventStartingFromSplit.start.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.end.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedStart.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedEnd.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.until.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
3140
- var Df = _(`wix.calendar.v3.event_updated`, true, (e2) => R(B(e2, [{ transformFn: z, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }, { path: `modifiedFields.start.utcDate` }, { path: `modifiedFields.end.utcDate` }, { path: `modifiedFields.adjustedStart.utcDate` }, { path: `modifiedFields.adjustedEnd.utcDate` }, { path: `modifiedFields.recurrenceRule.until.utcDate` }, { path: `modifiedFields.recurrenceRule.adjustedUntil.utcDate` }] }])))();
3141
- function Of(e2) {
3142
- let t2 = oo({ builderQueryFunction: (t3) => Sf(e2)(t3), typedQueryFunction: (t3, n3) => Cf(e2)(t3, n3), hasOptionsParameter: true });
3131
+ function Sf(e2) {
3132
+ return (t2, n2) => bf(t2, n2, { httpClient: e2 });
3133
+ }
3134
+ var Cf = _(`wix.calendar.v3.event_cancelled`, true, (e2) => R(B(e2, [{ transformFn: z, paths: [{ path: `data.event.createdDate` }, { path: `data.event.updatedDate` }, { path: `data.event.start.utcDate` }, { path: `data.event.end.utcDate` }, { path: `data.event.adjustedStart.utcDate` }, { path: `data.event.adjustedEnd.utcDate` }, { path: `data.event.recurrenceRule.until.utcDate` }, { path: `data.event.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
3135
+ var wf = _(`wix.calendar.v3.event_created`, true, (e2) => R(B(e2, [{ transformFn: z, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
3136
+ var Tf = _(`wix.calendar.v3.event_recurring_split`, true, (e2) => R(B(e2, [{ transformFn: z, paths: [{ path: `data.updatedRecurringEventEndingBeforeSplit.createdDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.updatedDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.start.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.end.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedStart.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedEnd.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.until.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.createdDate` }, { path: `data.newRecurringEventStartingFromSplit.updatedDate` }, { path: `data.newRecurringEventStartingFromSplit.start.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.end.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedStart.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedEnd.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.until.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
3137
+ var Ef = _(`wix.calendar.v3.event_updated`, true, (e2) => R(B(e2, [{ transformFn: z, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }, { path: `modifiedFields.start.utcDate` }, { path: `modifiedFields.end.utcDate` }, { path: `modifiedFields.adjustedStart.utcDate` }, { path: `modifiedFields.adjustedEnd.utcDate` }, { path: `modifiedFields.recurrenceRule.until.utcDate` }, { path: `modifiedFields.recurrenceRule.adjustedUntil.utcDate` }] }])))();
3138
+ function Df(e2) {
3139
+ let t2 = oo({ builderQueryFunction: (t3) => xf(e2)(t3), typedQueryFunction: (t3, n3) => Sf(e2)(t3, n3), hasOptionsParameter: true });
3143
3140
  function n2(e3, n3) {
3144
3141
  return t2(...arguments);
3145
3142
  }
3146
3143
  return n2;
3147
3144
  }
3148
- var kf = H(Of);
3149
- Bi(wf), Bi(Tf), Bi(Ef), Bi(Df);
3150
- var Af = 1e3;
3151
- async function jf(e2, t2) {
3145
+ var Of = H(Df);
3146
+ Bi(Cf), Bi(wf), Bi(Tf), Bi(Ef);
3147
+ var kf = 1e3;
3148
+ async function Af(e2, t2) {
3152
3149
  let n2 = [], r2;
3153
3150
  do {
3154
- let i2 = await kf({ filter: e2, cursorPaging: { limit: Af, ...r2 ? { cursor: r2 } : {} } }, t2);
3151
+ let i2 = await Of({ filter: e2, cursorPaging: { limit: kf, ...r2 ? { cursor: r2 } : {} } }, t2);
3155
3152
  n2.push(...i2.events ?? []), r2 = i2.pagingMetadata?.hasNext ? i2.pagingMetadata.cursors?.next ?? void 0 : void 0;
3156
3153
  } while (r2);
3157
3154
  return n2;
3158
3155
  }
3159
- async function Mf(e2, t2) {
3160
- return e2.length === 0 ? [] : jf({ appId: gd, scheduleId: { $in: e2 } }, { recurrenceType: [`MASTER`, `NONE`], fromLocalDate: Hd(/* @__PURE__ */ new Date()), ...t2 ? { timeZone: t2 } : {} });
3156
+ async function jf(e2, t2) {
3157
+ return e2.length === 0 ? [] : Af({ appId: gd, scheduleId: { $in: e2 } }, { recurrenceType: [`MASTER`, `NONE`], fromLocalDate: Hd(/* @__PURE__ */ new Date()), ...t2 ? { timeZone: t2 } : {} });
3161
3158
  }
3162
- var Nf = `SERVICE_OPTIONS_AND_VARIANTS_NOT_FOUND`;
3163
- async function Pf(e2) {
3159
+ var Mf = `SERVICE_OPTIONS_AND_VARIANTS_NOT_FOUND`;
3160
+ async function Nf(e2) {
3164
3161
  try {
3165
3162
  let { serviceVariants: t2 } = await So(e2);
3166
3163
  return t2 ?? null;
3167
3164
  } catch (e3) {
3168
- if (zd(e3) === Nf) return null;
3165
+ if (zd(e3) === Mf) return null;
3169
3166
  throw e3;
3170
3167
  }
3171
3168
  }
3172
- var Ff = 100;
3173
- async function If(e2) {
3169
+ var Pf = 100;
3170
+ async function Ff(e2) {
3174
3171
  if (e2.length === 0) return {};
3175
3172
  let t2 = [];
3176
- for (let n3 = 0; n3 < e2.length; n3 += Ff) t2.push(e2.slice(n3, n3 + Ff));
3177
- let n2 = await Promise.all(t2.map((e3) => Co().in(`serviceId`, e3).limit(Ff).find())), r2 = {};
3173
+ for (let n3 = 0; n3 < e2.length; n3 += Pf) t2.push(e2.slice(n3, n3 + Pf));
3174
+ let n2 = await Promise.all(t2.map((e3) => Co().in(`serviceId`, e3).limit(Pf).find())), r2 = {};
3178
3175
  for (let e3 of n2.flatMap((e4) => e4.items ?? [])) e3.serviceId && (r2[e3.serviceId] = e3);
3179
3176
  return r2;
3180
3177
  }
3181
- function Lf(e2, t2) {
3178
+ function If(e2, t2) {
3182
3179
  let n2 = e2?.value, r2 = e2?.currency;
3183
3180
  if (n2 == null || !r2) return null;
3184
3181
  let i2 = Number(n2);
@@ -3186,61 +3183,61 @@ function Lf(e2, t2) {
3186
3183
  let a2 = i2 % 1 == 0 ? 0 : 2;
3187
3184
  return new Intl.NumberFormat(t2, { style: `currency`, currency: r2, currencyDisplay: `symbol`, maximumFractionDigits: a2, minimumFractionDigits: a2 }).format(i2).replace(/\p{Zs}/gu, `\xA0`);
3188
3185
  }
3189
- function Rf(e2, t2) {
3186
+ function Lf(e2, t2) {
3190
3187
  if (e2 == null || !Number.isFinite(e2) || e2 <= 0) return null;
3191
3188
  let n2 = new Intl.NumberFormat(t2, { style: `unit`, unit: `hour`, unitDisplay: `short` }), r2 = new Intl.NumberFormat(t2, { style: `unit`, unit: `minute`, unitDisplay: `short` });
3192
3189
  if (e2 < 60) return r2.format(e2);
3193
3190
  let i2 = Math.floor(e2 / 60), a2 = e2 % 60;
3194
3191
  return a2 === 0 ? n2.format(i2) : `${n2.format(i2)} ${r2.format(a2)}`;
3195
3192
  }
3196
- function zf(e2) {
3193
+ function Rf(e2) {
3197
3194
  return e2.staffMemberId ? e2.staffMemberId : e2._id ? e2._id : e2.custom == null ? null : e2.custom;
3198
3195
  }
3199
- function Bf(e2, t2, n2, r2) {
3200
- return e2.custom == null ? e2.staffMemberId ? n2[e2.staffMemberId] ?? null : e2.businessLocationId ? r2[e2.businessLocationId] ?? null : e2.duration ? e2.duration.name ?? Rf(e2.duration.minutes, t2) : null : e2.custom;
3196
+ function zf(e2, t2, n2, r2) {
3197
+ return e2.custom == null ? e2.staffMemberId ? n2[e2.staffMemberId] ?? null : e2.businessLocationId ? r2[e2.businessLocationId] ?? null : e2.duration ? e2.duration.name ?? Lf(e2.duration.minutes, t2) : null : e2.custom;
3201
3198
  }
3202
- function Vf(e2) {
3199
+ function Bf(e2) {
3203
3200
  let t2 = {};
3204
3201
  for (let n2 of e2) n2.staffMemberId && (t2[n2.staffMemberId] = n2.name ?? ``);
3205
3202
  return t2;
3206
3203
  }
3207
- function Hf(e2) {
3204
+ function Vf(e2) {
3208
3205
  let t2 = {};
3209
3206
  for (let n2 of e2) n2.id && (t2[n2.id] = n2.label);
3210
3207
  return t2;
3211
3208
  }
3212
- function Uf(e2) {
3209
+ function Hf(e2) {
3213
3210
  return e2?.options?.values?.[0]?.type === mo.STAFF_MEMBER;
3214
3211
  }
3215
- function Wf(e2, { locale: t2, staffMembers: n2 = [], businessLocations: r2 = [] }) {
3212
+ function Uf(e2, { locale: t2, staffMembers: n2 = [], businessLocations: r2 = [] }) {
3216
3213
  let i2 = e2?.options?.values?.[0];
3217
3214
  if (!i2) return null;
3218
- let a2 = Vf(n2), o2 = Hf(r2), s2 = (e2?.variants?.values ?? []).map((e3) => {
3215
+ let a2 = Bf(n2), o2 = Vf(r2), s2 = (e2?.variants?.values ?? []).map((e3) => {
3219
3216
  let n3 = e3.choices?.[0];
3220
- return { choiceId: n3 ? zf(n3) : null, label: n3 ? Bf(n3, t2, a2, o2) : null, price: Lf(e3.price, t2), priceAmount: e3.price?.value ?? null, durationMinutes: n3?.duration?.minutes ?? null, durationName: n3?.duration?.name ?? null, businessLocationId: n3?.businessLocationId ?? null };
3217
+ return { choiceId: n3 ? Rf(n3) : null, label: n3 ? zf(n3, t2, a2, o2) : null, price: If(e3.price, t2), priceAmount: e3.price?.value ?? null, durationMinutes: n3?.duration?.minutes ?? null, durationName: n3?.duration?.name ?? null, businessLocationId: n3?.businessLocationId ?? null };
3221
3218
  });
3222
3219
  return { optionId: i2._id ?? null, type: i2.type ?? null, name: i2.customData?.name || i2.durationData?.name || null, choices: s2 };
3223
3220
  }
3224
- function Gf(e2) {
3221
+ function Wf(e2) {
3225
3222
  return e2.staffMemberDetails?.staffMembers ?? [];
3226
3223
  }
3227
- function Kf(e2, t2) {
3224
+ function Gf(e2, t2) {
3228
3225
  let n2 = e2.workingHoursLocationCoverage;
3229
3226
  return { staffMemberId: e2.staffMemberId ?? ``, name: e2.name ?? null, image: null, isSelected: t2 === e2.staffMemberId, ...n2 ? { locationCoverage: { availableAtAllLocations: n2.availableAtAllLocations ?? false, locationIds: n2.locationIds ?? [] } } : {} };
3230
3227
  }
3231
- function qf(e2) {
3228
+ function Kf(e2) {
3232
3229
  return e2 == null;
3233
3230
  }
3234
- var Jf = `Wix code SDK error:`;
3235
- var Yf = (e2) => {
3236
- console.error(`${Jf} ${e2}`);
3231
+ var qf = `Wix code SDK error:`;
3232
+ var Jf = (e2) => {
3233
+ console.error(`${qf} ${e2}`);
3237
3234
  };
3238
3235
  var X = { IMAGE: `image`, DOCUMENT: `document`, VIDEO: `video`, AUDIO: `audio`, VECTOR: `vector` };
3239
3236
  var Z = { empty_media_id: `empty_media_id`, empty_poster_id: `empty_poster_id`, bad_media_id: `bad_media_id`, unknown_media_type: `unknown_media_type`, missing_width_height: `missing_width_height`, non_string_media_id: `non_string_media_id` };
3240
- var Xf = { vector: (e2, t2) => `wix:vector://v1/${e2}/${t2}`, image: (e2, t2, n2, r2, i2) => `wix:image://v1/${e2}/${t2}#originWidth=${n2}&originHeight=${r2}${i2 ? `&watermark=${i2}` : ``}`, document: (e2, t2) => `wix:document://v1/${e2}/${t2}`, video: (e2, t2, n2, r2 = 0, i2 = 0) => `wix:video://v1/${e2}/${n2}#posterUri=${t2}&posterWidth=${r2}&posterHeight=${i2}`, audio: (e2, t2, n2) => `wix:audio://v1/${e2}/${t2}#duration=${n2}` };
3241
- var Zf = { vector: /^wix:vector:\/\/v1\/([^\/]+)\/([^\/]*)$/, image: /^wix:image:\/\/v1\/([^\/]+)\/([^\/]*)#originWidth=([0-9]+)&originHeight=([0-9]+)(?:&watermark=([^\/]+))?$/, document: /^wix:document:\/\/v1\/([^\/]+)\/([^\/]+)$/, video: /^wix:video:\/\/v1\/([^\/]+)\/([^\/]+)#posterUri=([^\/]+)&posterWidth=([0-9]+)&posterHeight=([0-9]+)$/, audio: /^wix:audio:\/\/v1\/([^\/]+)\/([^\/]+)#duration=([0-9]+)$/, deprecated_video: /^wix:video:\/\/v1\/([^\/]+)\/([^\/]+)\/#posterUri=([^\/]+)&posterWidth=([0-9]+)&posterHeight=([0-9]+)$/, deprecated_image: /^image:\/\/v1\/([^\/]+)\/([0-9]+)_([0-9]+)\/([^\/]*)$/, deprecated_type: /^(image):/, type: /^wix:(\w+):/, splitExtension: /\.(?=[^.]+$)/, emptyTitle: /^_\./ };
3242
- function Qf(e2, t2 = ``, n2) {
3243
- let [r2, i2] = n2.split(Zf.splitExtension), [a2, o2] = t2.split(Zf.splitExtension), s2;
3237
+ var Yf = { vector: (e2, t2) => `wix:vector://v1/${e2}/${t2}`, image: (e2, t2, n2, r2, i2) => `wix:image://v1/${e2}/${t2}#originWidth=${n2}&originHeight=${r2}${i2 ? `&watermark=${i2}` : ``}`, document: (e2, t2) => `wix:document://v1/${e2}/${t2}`, video: (e2, t2, n2, r2 = 0, i2 = 0) => `wix:video://v1/${e2}/${n2}#posterUri=${t2}&posterWidth=${r2}&posterHeight=${i2}`, audio: (e2, t2, n2) => `wix:audio://v1/${e2}/${t2}#duration=${n2}` };
3238
+ var Xf = { vector: /^wix:vector:\/\/v1\/([^\/]+)\/([^\/]*)$/, image: /^wix:image:\/\/v1\/([^\/]+)\/([^\/]*)#originWidth=([0-9]+)&originHeight=([0-9]+)(?:&watermark=([^\/]+))?$/, document: /^wix:document:\/\/v1\/([^\/]+)\/([^\/]+)$/, video: /^wix:video:\/\/v1\/([^\/]+)\/([^\/]+)#posterUri=([^\/]+)&posterWidth=([0-9]+)&posterHeight=([0-9]+)$/, audio: /^wix:audio:\/\/v1\/([^\/]+)\/([^\/]+)#duration=([0-9]+)$/, deprecated_video: /^wix:video:\/\/v1\/([^\/]+)\/([^\/]+)\/#posterUri=([^\/]+)&posterWidth=([0-9]+)&posterHeight=([0-9]+)$/, deprecated_image: /^image:\/\/v1\/([^\/]+)\/([0-9]+)_([0-9]+)\/([^\/]*)$/, deprecated_type: /^(image):/, type: /^wix:(\w+):/, splitExtension: /\.(?=[^.]+$)/, emptyTitle: /^_\./ };
3239
+ function Zf(e2, t2 = ``, n2) {
3240
+ let [r2, i2] = n2.split(Xf.splitExtension), [a2, o2] = t2.split(Xf.splitExtension), s2;
3244
3241
  switch (e2) {
3245
3242
  case X.IMAGE:
3246
3243
  s2 = `${a2 || `_`}.${o2 || i2}`;
@@ -3262,109 +3259,109 @@ function Qf(e2, t2 = ``, n2) {
3262
3259
  }
3263
3260
  return encodeURI(s2);
3264
3261
  }
3265
- function $f(e2) {
3266
- return Zf.emptyTitle.test(e2) ? `` : decodeURI(e2);
3262
+ function Qf(e2) {
3263
+ return Xf.emptyTitle.test(e2) ? `` : decodeURI(e2);
3267
3264
  }
3268
- function ep({ mediaId: e2, title: t2, width: n2, height: r2, watermark: i2 }) {
3265
+ function $f({ mediaId: e2, title: t2, width: n2, height: r2, watermark: i2 }) {
3269
3266
  if (!e2) return { error: Z.empty_media_id };
3270
3267
  if (typeof r2 != `number` || typeof n2 != `number`) return { error: Z.missing_width_height };
3271
- let a2 = Qf(X.IMAGE, t2, e2);
3272
- return { item: Xf.image(e2, a2, n2, r2, i2) };
3268
+ let a2 = Zf(X.IMAGE, t2, e2);
3269
+ return { item: Yf.image(e2, a2, n2, r2, i2) };
3273
3270
  }
3274
- function tp({ mediaId: e2, title: t2 }) {
3271
+ function ep({ mediaId: e2, title: t2 }) {
3275
3272
  if (!e2) return { error: Z.empty_media_id };
3276
- let n2 = Qf(X.DOCUMENT, t2, e2);
3277
- return { item: Xf.document(e2, n2) };
3273
+ let n2 = Zf(X.DOCUMENT, t2, e2);
3274
+ return { item: Yf.document(e2, n2) };
3278
3275
  }
3279
- function np({ mediaId: e2, title: t2 }) {
3276
+ function tp({ mediaId: e2, title: t2 }) {
3280
3277
  if (!e2) return { error: Z.empty_media_id };
3281
- let n2 = Qf(X.VECTOR, t2, e2);
3282
- return { item: Xf.vector(e2, n2) };
3278
+ let n2 = Zf(X.VECTOR, t2, e2);
3279
+ return { item: Yf.vector(e2, n2) };
3283
3280
  }
3284
- function rp({ mediaId: e2, title: t2, width: n2, height: r2, posterId: i2 }) {
3281
+ function np({ mediaId: e2, title: t2, width: n2, height: r2, posterId: i2 }) {
3285
3282
  if (!e2) return { error: Z.empty_media_id };
3286
3283
  if (!i2) return { error: Z.empty_poster_id };
3287
3284
  if (isNaN(r2 || NaN) || isNaN(n2 || NaN)) return { error: Z.missing_width_height };
3288
- let a2 = e2.replace(`video/`, ``), o2 = Qf(X.VIDEO, t2, a2);
3289
- return { item: Xf.video(a2, i2, o2, n2, r2) };
3285
+ let a2 = e2.replace(`video/`, ``), o2 = Zf(X.VIDEO, t2, a2);
3286
+ return { item: Yf.video(a2, i2, o2, n2, r2) };
3290
3287
  }
3291
- function ip({ mediaId: e2, title: t2, duration: n2 }) {
3288
+ function rp({ mediaId: e2, title: t2, duration: n2 }) {
3292
3289
  if (!e2) return { error: Z.empty_media_id };
3293
- let r2 = Qf(X.AUDIO, t2, e2);
3294
- return { item: Xf.audio(e2, r2, n2 || 0) };
3290
+ let r2 = Zf(X.AUDIO, t2, e2);
3291
+ return { item: Yf.audio(e2, r2, n2 || 0) };
3295
3292
  }
3296
- function ap(e2) {
3297
- let [, t2, n2, r2, i2, a2] = e2.match(Zf.image) || [], o2 = $f(n2);
3293
+ function ip(e2) {
3294
+ let [, t2, n2, r2, i2, a2] = e2.match(Xf.image) || [], o2 = Qf(n2);
3298
3295
  return t2 ? { type: X.IMAGE, mediaId: t2, title: o2, width: parseInt(r2, 10), height: parseInt(i2, 10), watermark: a2 } : { error: Z.bad_media_id };
3299
3296
  }
3300
- function op(e2) {
3301
- let [, t2, n2, r2, i2] = e2.match(Zf.deprecated_image) || [], a2 = $f(i2);
3297
+ function ap(e2) {
3298
+ let [, t2, n2, r2, i2] = e2.match(Xf.deprecated_image) || [], a2 = Qf(i2);
3302
3299
  return t2 ? { type: X.IMAGE, mediaId: t2, title: a2, width: parseInt(n2, 10), height: parseInt(r2, 10) } : { error: Z.bad_media_id };
3303
3300
  }
3304
- function sp(e2) {
3305
- let [, t2, n2] = e2.match(Zf.document) || [], r2 = $f(n2);
3301
+ function op(e2) {
3302
+ let [, t2, n2] = e2.match(Xf.document) || [], r2 = Qf(n2);
3306
3303
  return t2 ? { type: X.DOCUMENT, mediaId: t2, title: r2 } : { error: Z.bad_media_id };
3307
3304
  }
3308
- function cp(e2) {
3309
- let [, t2, n2] = e2.match(Zf.vector) || [], r2 = $f(n2);
3305
+ function sp(e2) {
3306
+ let [, t2, n2] = e2.match(Xf.vector) || [], r2 = Qf(n2);
3310
3307
  return t2 ? { type: X.VECTOR, mediaId: t2, title: r2 } : { error: Z.bad_media_id };
3311
3308
  }
3312
- function lp(e2) {
3313
- let t2 = Zf.deprecated_video.test(e2) ? Zf.deprecated_video : Zf.video, [, n2, r2, i2, a2, o2] = e2.match(t2) || [], s2 = $f(r2);
3309
+ function cp(e2) {
3310
+ let t2 = Xf.deprecated_video.test(e2) ? Xf.deprecated_video : Xf.video, [, n2, r2, i2, a2, o2] = e2.match(t2) || [], s2 = Qf(r2);
3314
3311
  return n2 && i2 ? { type: X.VIDEO, mediaId: n2, posterId: i2, width: parseInt(a2, 10), height: parseInt(o2, 10), title: s2 } : { error: Z.bad_media_id };
3315
3312
  }
3316
- function up(e2) {
3317
- let [, t2, n2, r2] = e2.match(Zf.audio) || [], i2 = $f(n2);
3313
+ function lp(e2) {
3314
+ let [, t2, n2, r2] = e2.match(Xf.audio) || [], i2 = Qf(n2);
3318
3315
  return t2 ? { type: X.AUDIO, mediaId: t2, title: i2, duration: parseInt(r2, 10) } : { error: Z.bad_media_id };
3319
3316
  }
3320
- function dp({ mediaId: e2, type: t2, title: n2, width: r2, height: i2, posterId: a2, watermark: o2, duration: s2 }) {
3317
+ function up({ mediaId: e2, type: t2, title: n2, width: r2, height: i2, posterId: a2, watermark: o2, duration: s2 }) {
3321
3318
  switch (t2) {
3322
3319
  case X.IMAGE:
3323
- return ep({ mediaId: e2, title: n2, width: r2, height: i2, watermark: o2 });
3320
+ return $f({ mediaId: e2, title: n2, width: r2, height: i2, watermark: o2 });
3324
3321
  case X.DOCUMENT:
3325
- return tp({ mediaId: e2, title: n2 });
3322
+ return ep({ mediaId: e2, title: n2 });
3326
3323
  case X.VECTOR:
3327
- return np({ mediaId: e2, title: n2 });
3324
+ return tp({ mediaId: e2, title: n2 });
3328
3325
  case X.VIDEO:
3329
- return rp({ mediaId: e2, title: n2, width: r2, height: i2, posterId: a2 });
3326
+ return np({ mediaId: e2, title: n2, width: r2, height: i2, posterId: a2 });
3330
3327
  case X.AUDIO:
3331
- return ip({ mediaId: e2, title: n2, duration: s2 });
3328
+ return rp({ mediaId: e2, title: n2, duration: s2 });
3332
3329
  default:
3333
3330
  return { error: Z.unknown_media_type };
3334
3331
  }
3335
3332
  }
3336
- function fp(e2 = ``) {
3333
+ function dp(e2 = ``) {
3337
3334
  if (typeof e2 != `string`) return { error: Z.non_string_media_id };
3338
- let [, t2] = e2.match(Zf.type) || [];
3335
+ let [, t2] = e2.match(Xf.type) || [];
3339
3336
  switch (t2) {
3340
3337
  case X.IMAGE:
3341
- return ap(e2);
3338
+ return ip(e2);
3342
3339
  case X.DOCUMENT:
3343
- return sp(e2);
3340
+ return op(e2);
3344
3341
  case X.VECTOR:
3345
- return cp(e2);
3342
+ return sp(e2);
3346
3343
  case X.VIDEO:
3347
- return lp(e2);
3344
+ return cp(e2);
3348
3345
  case X.AUDIO:
3349
- return up(e2);
3346
+ return lp(e2);
3350
3347
  default:
3351
- let [, t3] = e2.match(Zf.deprecated_type) || [];
3352
- return t3 ? op(e2) : { error: Z.unknown_media_type };
3348
+ let [, t3] = e2.match(Xf.deprecated_type) || [];
3349
+ return t3 ? ap(e2) : { error: Z.unknown_media_type };
3353
3350
  }
3354
3351
  }
3355
- var pp = { externalUrl: /(^https?)|(^data)|(^blob)|(^\/\/)/, inlineSvg: /<svg[\s\S]*>[\s\S]*<\/svg>/im };
3356
- var mp = { [X.VECTOR]: [pp.externalUrl, pp.inlineSvg], [X.IMAGE]: [pp.externalUrl], [X.DOCUMENT]: [], [X.VIDEO]: [], [X.AUDIO]: [pp.externalUrl] };
3357
- function hp({ mediaId: e2, type: t2, title: n2, width: r2, height: i2, posterId: a2, watermark: o2, duration: s2 }) {
3358
- return mp[t2]?.some((t3) => t3.test(e2)) ? { item: e2 } : dp({ mediaId: e2, type: t2, title: n2, width: r2, height: i2, posterId: a2, watermark: o2, duration: s2 });
3352
+ var fp = { externalUrl: /(^https?)|(^data)|(^blob)|(^\/\/)/, inlineSvg: /<svg[\s\S]*>[\s\S]*<\/svg>/im };
3353
+ var pp = { [X.VECTOR]: [fp.externalUrl, fp.inlineSvg], [X.IMAGE]: [fp.externalUrl], [X.DOCUMENT]: [], [X.VIDEO]: [], [X.AUDIO]: [fp.externalUrl] };
3354
+ function mp({ mediaId: e2, type: t2, title: n2, width: r2, height: i2, posterId: a2, watermark: o2, duration: s2 }) {
3355
+ return pp[t2]?.some((t3) => t3.test(e2)) ? { item: e2 } : up({ mediaId: e2, type: t2, title: n2, width: r2, height: i2, posterId: a2, watermark: o2, duration: s2 });
3359
3356
  }
3360
- function gp(e2, t2) {
3357
+ function hp(e2, t2) {
3361
3358
  if (!Object.values(X).includes(t2)) return { error: Z.unknown_media_type };
3362
- if (mp[t2].some((t3) => t3.test(e2))) return { type: t2, mediaId: e2 };
3363
- let n2 = fp(e2);
3359
+ if (pp[t2].some((t3) => t3.test(e2))) return { type: t2, mediaId: e2 };
3360
+ let n2 = dp(e2);
3364
3361
  return n2.error === Z.non_string_media_id ? n2 : n2.error === Z.unknown_media_type || t2 !== n2.type ? { error: Z.bad_media_id } : n2;
3365
3362
  }
3366
- var _p = (e2) => `aria` + e2.charAt(0).toUpperCase() + e2.slice(1);
3367
- function vp(e2, t2) {
3363
+ var gp = (e2) => `aria` + e2.charAt(0).toUpperCase() + e2.slice(1);
3364
+ function _p(e2, t2) {
3368
3365
  let { modifyAriaSourceKeys: n2 } = t2 ?? {};
3369
3366
  return (t3) => {
3370
3367
  let r2 = {};
@@ -3372,13 +3369,13 @@ function vp(e2, t2) {
3372
3369
  let a2 = e2[i2](t3), o2 = Object.keys(a2);
3373
3370
  for (let e3 = 0; e3 < o2.length; e3++) {
3374
3371
  let t4 = o2[e3], i3 = Object.getOwnPropertyDescriptor(a2, t4);
3375
- Object.defineProperty(r2, n2 && i3.get ? _p(t4) : t4, i3);
3372
+ Object.defineProperty(r2, n2 && i3.get ? gp(t4) : t4, i3);
3376
3373
  }
3377
3374
  }
3378
3375
  return r2;
3379
3376
  };
3380
3377
  }
3381
- var yp = ({ handlers: e2, metaData: t2 }) => {
3378
+ var vp = ({ handlers: e2, metaData: t2 }) => {
3382
3379
  let { compId: n2, connection: r2, compType: i2, isGlobal: a2, getParent: o2, role: s2, wixCodeId: c2 } = t2, l2 = `$w.${i2}`;
3383
3380
  return { get id() {
3384
3381
  return c2 || s2;
@@ -3400,14 +3397,14 @@ var yp = ({ handlers: e2, metaData: t2 }) => {
3400
3397
  return { id: s2, type: l2, global: a2() };
3401
3398
  } };
3402
3399
  };
3403
- var bp = (e2) => {
3400
+ var yp = (e2) => {
3404
3401
  let { props: t2, setProps: n2 } = e2;
3405
3402
  return { get src() {
3406
- return hp({ type: `image`, mediaId: t2?.image?.uri, title: t2?.image?.name, width: t2?.image?.width, height: t2?.image?.height }).item ?? ``;
3403
+ return mp({ type: `image`, mediaId: t2?.image?.uri, title: t2?.image?.name, width: t2?.image?.width, height: t2?.image?.height }).item ?? ``;
3407
3404
  }, set src(e3) {
3408
- let { height: r2, width: i2, title: a2, error: o2, mediaId: s2 } = gp((qf(e3) ? `` : e3).toString(), `image`);
3405
+ let { height: r2, width: i2, title: a2, error: o2, mediaId: s2 } = hp((Kf(e3) ? `` : e3).toString(), `image`);
3409
3406
  if (o2) {
3410
- Yf(`The "src" property cannot be set to "src". It must be a valid URL starting with "http://", "https://", or "wix:image://".`);
3407
+ Jf(`The "src" property cannot be set to "src". It must be a valid URL starting with "http://", "https://", or "wix:image://".`);
3411
3408
  return;
3412
3409
  }
3413
3410
  let { image: c2 } = t2, l2 = c2, u2 = { ...l2, width: i2 || l2?.width, height: r2 || l2?.height, uri: s2 || l2?.uri, name: a2 || l2?.name, crop: null };
@@ -3415,7 +3412,7 @@ var bp = (e2) => {
3415
3412
  }, get alt() {
3416
3413
  return t2.image?.alt;
3417
3414
  }, set alt(e3) {
3418
- if (qf(e3)) {
3415
+ if (Kf(e3)) {
3419
3416
  let e4 = t2.image || {};
3420
3417
  delete e4.alt, n2({ image: e4 });
3421
3418
  } else n2({ image: { ...t2.image, alt: e3 } });
@@ -3433,34 +3430,34 @@ var bp = (e2) => {
3433
3430
  return { type: `$w.Image`, alt: t2?.image?.alt, src: t2?.image?.uri, name: t2?.image?.name };
3434
3431
  } };
3435
3432
  };
3436
- vp([bp, yp]);
3437
- var xp = `11062b_7b9f1e3756b64285ad5cf5e244b4ae77~mv2.png`;
3438
- var Sp = `wix:image://v1/${xp}/${xp}#originWidth=460&originHeight=460`;
3439
- function Cp(e2) {
3433
+ _p([yp, vp]);
3434
+ var bp = `11062b_7b9f1e3756b64285ad5cf5e244b4ae77~mv2.png`;
3435
+ var xp = `wix:image://v1/${bp}/${bp}#originWidth=460&originHeight=460`;
3436
+ function Sp(e2) {
3440
3437
  if (!e2) return null;
3441
3438
  let t2;
3442
- return bp({ props: {}, setProps: ({ image: e3 }) => {
3439
+ return yp({ props: {}, setProps: ({ image: e3 }) => {
3443
3440
  t2 = e3;
3444
3441
  } }).src = e2, t2 ?? null;
3445
3442
  }
3443
+ function Cp(e2) {
3444
+ return Sp(e2.media?.mainMedia?.image || xp);
3445
+ }
3446
3446
  function wp(e2) {
3447
- return Cp(e2.media?.mainMedia?.image || Sp);
3447
+ return Sp(e2.media?.coverMedia?.image) ?? void 0;
3448
3448
  }
3449
3449
  function Tp(e2) {
3450
- return Cp(e2.media?.coverMedia?.image) ?? void 0;
3450
+ return (e2?.media?.items ?? []).flatMap((e3) => Dp(e3.image));
3451
3451
  }
3452
3452
  function Ep(e2) {
3453
- return (e2?.media?.items ?? []).flatMap((e3) => Op(e3.image));
3453
+ return !!e2?.media?.items?.some((e3) => Op(e3.image));
3454
3454
  }
3455
3455
  function Dp(e2) {
3456
- return !!e2?.media?.items?.some((e3) => kp(e3.image));
3457
- }
3458
- function Op(e2) {
3459
3456
  if (!e2) return [];
3460
- let t2 = kp(e2);
3457
+ let t2 = Op(e2);
3461
3458
  return t2 ? [{ type: `image`, src: e2, width: t2.width, height: t2.height }] : [];
3462
3459
  }
3463
- function kp(e2) {
3460
+ function Op(e2) {
3464
3461
  if (!e2) return null;
3465
3462
  try {
3466
3463
  return yr.getImageUrl(e2);
@@ -3468,7 +3465,7 @@ function kp(e2) {
3468
3465
  return null;
3469
3466
  }
3470
3467
  }
3471
- function Ap(e2) {
3468
+ function kp(e2) {
3472
3469
  switch (e2.type) {
3473
3470
  case dc.BUSINESS:
3474
3471
  return `business`;
@@ -3480,7 +3477,7 @@ function Ap(e2) {
3480
3477
  return null;
3481
3478
  }
3482
3479
  }
3483
- function jp(e2, t2) {
3480
+ function Ap(e2, t2) {
3484
3481
  switch (e2.type) {
3485
3482
  case dc.BUSINESS:
3486
3483
  return e2.business?.name ?? null;
@@ -3492,463 +3489,444 @@ function jp(e2, t2) {
3492
3489
  return null;
3493
3490
  }
3494
3491
  }
3495
- function Mp(e2) {
3492
+ function jp(e2) {
3496
3493
  return (e2?.locations ?? []).flatMap((e3) => {
3497
- let t2 = Ap(e3);
3494
+ let t2 = kp(e3);
3498
3495
  if (!t2) return [];
3499
3496
  if (t2 === `customer`) return [{ type: t2, text: null }];
3500
- let n2 = jp(e3, ``);
3497
+ let n2 = Ap(e3, ``);
3501
3498
  return n2 ? [{ type: t2, text: n2 }] : [];
3502
3499
  });
3503
3500
  }
3504
- var Np = { AVAILABLE: `available`, FULLY_BOOKED: `fullyBooked`, BOOKING_NOT_OPEN_YET: `bookingNotOpenYet`, BOOKING_CLOSED: `bookingClosed`, COURSE_IN_PROGRESS: `courseInProgress`, NO_UPCOMING_SESSIONS: `noUpcomingSessions` };
3505
- var Pp = 6e4;
3506
- var Fp = (e2) => e2?.onlineBooking?.enabled === true;
3507
- var Ip = (e2) => e2 ? new Date(e2).getTime() : null;
3508
- var Lp = (e2, t2) => t2 !== void 0 && e2 !== null && e2 <= t2;
3509
- function Rp({ service: e2, courseRemainingCapacity: t2, now: n2 }) {
3510
- let r2 = Fp(e2), i2 = Ip(e2?.schedule?.firstSessionStart), a2 = Ip(e2?.schedule?.lastSessionEnd), o2 = i2 !== null;
3501
+ var Mp = { AVAILABLE: `available`, FULLY_BOOKED: `fullyBooked`, BOOKING_NOT_OPEN_YET: `bookingNotOpenYet`, BOOKING_CLOSED: `bookingClosed`, COURSE_IN_PROGRESS: `courseInProgress`, NO_UPCOMING_SESSIONS: `noUpcomingSessions` };
3502
+ var Np = 6e4;
3503
+ var Pp = (e2) => e2?.onlineBooking?.enabled === true;
3504
+ var Fp = (e2) => e2 ? new Date(e2).getTime() : null;
3505
+ var Ip = (e2, t2) => t2 !== void 0 && e2 !== null && e2 <= t2;
3506
+ function Lp({ service: e2, courseRemainingCapacity: t2, now: n2 }) {
3507
+ let r2 = Pp(e2), i2 = Fp(e2?.schedule?.firstSessionStart), a2 = Fp(e2?.schedule?.lastSessionEnd), o2 = i2 !== null;
3511
3508
  if (!Dd(e2?.type)) {
3512
- let t3 = !Ed(e2?.type) || o2 && !Lp(a2, n2);
3513
- return { state: r2 && !t3 ? Np.NO_UPCOMING_SESSIONS : Np.AVAILABLE, isAvailableForBooking: r2 && t3, bookingOpensAt: null };
3509
+ let t3 = !Ed(e2?.type) || o2 && !Ip(a2, n2);
3510
+ return { state: r2 && !t3 ? Mp.NO_UPCOMING_SESSIONS : Mp.AVAILABLE, isAvailableForBooking: r2 && t3, bookingOpensAt: null };
3514
3511
  }
3515
- let s2 = e2?.bookingPolicy, c2 = s2?.limitEarlyBookingPolicy?.enabled ? s2.limitEarlyBookingPolicy.earliestBookingInMinutes ?? 0 : 0, l2 = s2?.limitLateBookingPolicy?.enabled ? s2.limitLateBookingPolicy.latestBookingInMinutes ?? 0 : 0, u2 = s2?.bookAfterStartPolicy?.enabled === true, d2 = i2 === null || n2 === void 0 ? null : (i2 - n2) / Pp, f2 = t2 !== null && t2 <= 0, p2 = d2 !== null && c2 > 0 && d2 >= c2, m2 = d2 !== null && !u2 && d2 <= l2, h2 = o2 && !Lp(a2, n2), g2 = Lp(i2, n2) && !Lp(a2, n2) && u2, _2 = i2 === null ? null : new Date(i2 - c2 * Pp), v2 = Np.AVAILABLE;
3516
- return r2 && (f2 ? v2 = Np.FULLY_BOOKED : p2 ? v2 = Np.BOOKING_NOT_OPEN_YET : m2 ? v2 = Np.BOOKING_CLOSED : h2 ? g2 && (v2 = Np.COURSE_IN_PROGRESS) : v2 = Np.NO_UPCOMING_SESSIONS), { state: v2, isAvailableForBooking: r2 && !f2 && h2 && !p2 && !m2, bookingOpensAt: _2 };
3512
+ let s2 = e2?.bookingPolicy, c2 = s2?.limitEarlyBookingPolicy?.enabled ? s2.limitEarlyBookingPolicy.earliestBookingInMinutes ?? 0 : 0, l2 = s2?.limitLateBookingPolicy?.enabled ? s2.limitLateBookingPolicy.latestBookingInMinutes ?? 0 : 0, u2 = s2?.bookAfterStartPolicy?.enabled === true, d2 = i2 === null || n2 === void 0 ? null : (i2 - n2) / Np, f2 = t2 !== null && t2 <= 0, p2 = d2 !== null && c2 > 0 && d2 >= c2, m2 = d2 !== null && !u2 && d2 <= l2, h2 = o2 && !Ip(a2, n2), g2 = Ip(i2, n2) && !Ip(a2, n2) && u2, _2 = i2 === null ? null : new Date(i2 - c2 * Np), v2 = Mp.AVAILABLE;
3513
+ return r2 && (f2 ? v2 = Mp.FULLY_BOOKED : p2 ? v2 = Mp.BOOKING_NOT_OPEN_YET : m2 ? v2 = Mp.BOOKING_CLOSED : h2 ? g2 && (v2 = Mp.COURSE_IN_PROGRESS) : v2 = Mp.NO_UPCOMING_SESSIONS), { state: v2, isAvailableForBooking: r2 && !f2 && h2 && !p2 && !m2, bookingOpensAt: _2 };
3517
3514
  }
3518
- var zp = [];
3519
- var Bp = (e2) => (e2.recurrenceRule?.days ?? []).map((e3) => ({ day: e3 }));
3520
- function Vp(e2) {
3521
- let t2 = e2.flatMap(Bp);
3522
- return t2.length === 0 ? zp : t2;
3515
+ var Rp = [];
3516
+ var zp = (e2) => (e2.recurrenceRule?.days ?? []).map((e3) => ({ day: e3 }));
3517
+ function Bp(e2) {
3518
+ let t2 = e2.flatMap(zp);
3519
+ return t2.length === 0 ? Rp : t2;
3523
3520
  }
3524
- function Hp(e2, t2) {
3521
+ function Vp(e2, t2) {
3525
3522
  return t2 === void 0 ? false : !e2 || new Date(e2).getTime() <= t2;
3526
3523
  }
3527
- function Up(e2) {
3524
+ function Hp(e2) {
3528
3525
  return e2 !== null && e2 <= 0;
3529
3526
  }
3530
- function Wp({ lastSessionEnd: e2, masterEvents: t2, now: n2 }) {
3531
- if (Hp(e2, n2)) return null;
3527
+ function Up({ lastSessionEnd: e2, masterEvents: t2, now: n2 }) {
3528
+ if (Vp(e2, n2)) return null;
3532
3529
  let r2 = t2[0];
3533
3530
  return r2 ? { totalCapacity: r2.totalCapacity ?? null, remainingCapacity: r2.remainingCapacity ?? null } : null;
3534
3531
  }
3535
- var Gp = { BOOK: `book`, REQUEST_TO_BOOK: `requestToBook`, VIEW_COURSE: `viewCourse` };
3536
- var Kp = (e2, t2) => !e2 || new Date(e2).getTime() <= t2;
3537
- var qp = 6e4;
3538
- function Jp(e2, t2) {
3532
+ var Wp = { BOOK: `book`, REQUEST_TO_BOOK: `requestToBook`, VIEW_COURSE: `viewCourse` };
3533
+ var Gp = (e2, t2) => !e2 || new Date(e2).getTime() <= t2;
3534
+ var Kp = 6e4;
3535
+ function qp(e2, t2) {
3539
3536
  if (t2 === void 0) return false;
3540
3537
  let n2 = e2.bookingPolicy?.bookAfterStartPolicy?.enabled, r2 = e2.schedule?.firstSessionStart ?? null, i2 = e2.schedule?.lastSessionEnd ?? null, a2 = false;
3541
3538
  if (!n2 && r2 && e2.bookingPolicy?.limitLateBookingPolicy?.enabled) {
3542
3539
  let n3 = e2.bookingPolicy.limitLateBookingPolicy.latestBookingInMinutes ?? 0;
3543
- a2 = t2 >= new Date(r2).getTime() - n3 * qp;
3540
+ a2 = t2 >= new Date(r2).getTime() - n3 * Kp;
3544
3541
  }
3545
- let o2 = Dd(e2.type) && Kp(i2, t2), s2 = Kp(r2, t2);
3542
+ let o2 = Dd(e2.type) && Gp(i2, t2), s2 = Gp(r2, t2);
3546
3543
  return o2 || s2 && !n2 || a2;
3547
3544
  }
3548
- function Yp(e2) {
3549
- return Dd(e2.serviceType) && (e2.courseFull || e2.tooLateToBook) ? Gp.VIEW_COURSE : e2.requireManualApproval ? Gp.REQUEST_TO_BOOK : Gp.BOOK;
3545
+ function Jp(e2) {
3546
+ return Dd(e2.serviceType) && (e2.courseFull || e2.tooLateToBook) ? Wp.VIEW_COURSE : e2.requireManualApproval ? Wp.REQUEST_TO_BOOK : Wp.BOOK;
3550
3547
  }
3551
- var { RateType: Xp, FrequencyType: Zp } = Jo;
3552
- var Qp = { rateType: null, price: null, priceAfterDiscount: null, discountName: null, calculatedAtCheckout: false, subscriptionFrequency: null, isFree: false };
3553
- function $p(e2) {
3548
+ var { RateType: Yp, FrequencyType: Xp } = Jo;
3549
+ var Zp = { rateType: null, price: null, priceAfterDiscount: null, discountName: null, calculatedAtCheckout: false, subscriptionFrequency: null, isFree: false };
3550
+ function Qp(e2) {
3554
3551
  if (e2 == null || e2 === ``) return false;
3555
3552
  let t2 = Number(e2);
3556
3553
  return Number.isFinite(t2) && t2 === 0;
3557
3554
  }
3558
- function em(e2, t2) {
3555
+ function $p(e2, t2) {
3559
3556
  let n2 = e2?.payment;
3560
- if (!n2) return Qp;
3557
+ if (!n2) return Zp;
3561
3558
  let r2 = n2.rateType ?? null, i2 = null;
3562
3559
  switch (r2) {
3563
- case Xp.FIXED:
3564
- i2 = Lf(n2.fixed?.price, t2);
3560
+ case Yp.FIXED:
3561
+ i2 = If(n2.fixed?.price, t2);
3565
3562
  break;
3566
- case Xp.VARIED:
3567
- i2 = Lf(n2.varied?.minPrice, t2);
3563
+ case Yp.VARIED:
3564
+ i2 = If(n2.varied?.minPrice, t2);
3568
3565
  break;
3569
- case Xp.CUSTOM:
3566
+ case Yp.CUSTOM:
3570
3567
  i2 = n2.custom?.description ?? null;
3571
3568
  break;
3572
- case Xp.SUBSCRIPTION:
3573
- i2 = Lf(n2.subscription?.amountPerBillingCycle, t2);
3569
+ case Yp.SUBSCRIPTION:
3570
+ i2 = If(n2.subscription?.amountPerBillingCycle, t2);
3574
3571
  }
3575
- let a2 = !(n2.pricingPlanIds?.length || n2.options?.pricingPlan) && (r2 === Xp.NO_FEE || r2 === Xp.FIXED && $p(n2.fixed?.price?.value)), o2 = n2.discountInfo?.discountName ?? null, s2 = o2 && r2 === Xp.FIXED ? Lf(n2.discountInfo?.priceAfterDiscount, t2) : null;
3572
+ let a2 = !(n2.pricingPlanIds?.length || n2.options?.pricingPlan) && (r2 === Yp.NO_FEE || r2 === Yp.FIXED && Qp(n2.fixed?.price?.value)), o2 = n2.discountInfo?.discountName ?? null, s2 = o2 && r2 === Yp.FIXED ? If(n2.discountInfo?.priceAfterDiscount, t2) : null;
3576
3573
  return { rateType: r2, price: i2, priceAfterDiscount: s2, discountName: o2, calculatedAtCheckout: !!o2 && !s2, subscriptionFrequency: n2.subscription?.frequency ?? null, isFree: a2 };
3577
3574
  }
3578
- function tm(e2) {
3579
- return e2 ? Gf(e2).filter((e3) => e3.staffMemberId).map((e3) => {
3580
- let { staffMemberId: t2, name: n2, image: r2 } = Kf(e3, null);
3575
+ function em(e2) {
3576
+ return e2 ? Wf(e2).filter((e3) => e3.staffMemberId).map((e3) => {
3577
+ let { staffMemberId: t2, name: n2, image: r2 } = Gf(e3, null);
3581
3578
  return { staffMemberId: t2, name: n2, image: r2 };
3582
3579
  }) : [];
3583
3580
  }
3584
- function nm(e2, t2, n2) {
3585
- return Dd(e2?.type) ? Wp({ lastSessionEnd: e2?.schedule?.lastSessionEnd, masterEvents: t2, now: n2 }) : null;
3581
+ function tm(e2, t2, n2) {
3582
+ return Dd(e2?.type) ? Up({ lastSessionEnd: e2?.schedule?.lastSessionEnd, masterEvents: t2, now: n2 }) : null;
3586
3583
  }
3587
- function rm({ service: e2, masterEvents: t2, locale: n2, timeZone: r2, now: i2 }) {
3588
- let a2 = nm(e2, t2, i2), o2 = t2[0]?.timeZone ?? r2 ?? `UTC`, s2 = Rp({ service: e2, courseRemainingCapacity: a2?.remainingCapacity ?? null, now: i2 }), c2 = e2?.bookingPolicy?.customPolicyDescription;
3589
- return { serviceId: e2?._id ?? null, serviceSlug: e2?.mainSlug?.name ?? null, serviceName: e2?.name ?? null, serviceDescription: e2?.description ?? null, serviceTagLine: e2?.tagLine ?? null, serviceType: e2?.type ?? null, serviceDefaultDuration: e2 ? Rf(Rd(e2), n2) : null, serviceImage: e2 ? wp(e2) : null, serviceCtaState: Yp({ serviceType: e2?.type ?? null, requireManualApproval: !!e2?.onlineBooking?.requireManualApproval, courseFull: Up(a2?.remainingCapacity ?? null), tooLateToBook: e2 ? Jp(e2, i2) : false }), servicePrice: em(e2, n2), isVariedService: e2 ? Od(e2) : false, hasAddOns: e2 ? Ad(e2) : false, isConferenceEnabled: !!e2?.conferencing?.enabled, offeredDays: Vp(t2), courseAvailability: a2, courseStartDate: e2?.schedule?.firstSessionStart ? Vd(new Date(e2.schedule.firstSessionStart), o2) : null, courseEndDate: e2?.schedule?.lastSessionEnd ? Vd(new Date(e2.schedule.lastSessionEnd), o2) : null, staffMembers: tm(e2), coverImage: e2 ? Tp(e2) : void 0, gallery: Ep(e2), serviceLocations: Mp(e2), policyDescription: c2?.enabled ? c2.description ?? null : null, serviceBookability: s2, displayTimeZone: o2 };
3584
+ function nm({ service: e2, masterEvents: t2, locale: n2, timeZone: r2, now: i2 }) {
3585
+ let a2 = tm(e2, t2, i2), o2 = t2[0]?.timeZone ?? r2 ?? `UTC`, s2 = Lp({ service: e2, courseRemainingCapacity: a2?.remainingCapacity ?? null, now: i2 }), c2 = e2?.bookingPolicy?.customPolicyDescription;
3586
+ return { serviceId: e2?._id ?? null, serviceSlug: e2?.mainSlug?.name ?? null, serviceName: e2?.name ?? null, serviceDescription: e2?.description ?? null, serviceTagLine: e2?.tagLine ?? null, serviceType: e2?.type ?? null, serviceDefaultDuration: e2 ? Lf(Rd(e2), n2) : null, serviceImage: e2 ? Cp(e2) : null, serviceCtaState: Jp({ serviceType: e2?.type ?? null, requireManualApproval: !!e2?.onlineBooking?.requireManualApproval, courseFull: Hp(a2?.remainingCapacity ?? null), tooLateToBook: e2 ? qp(e2, i2) : false }), servicePrice: $p(e2, n2), isVariedService: e2 ? Od(e2) : false, hasAddOns: e2 ? Ad(e2) : false, isConferenceEnabled: !!e2?.conferencing?.enabled, offeredDays: Bp(t2), courseAvailability: a2, courseStartDate: e2?.schedule?.firstSessionStart ? Vd(new Date(e2.schedule.firstSessionStart), o2) : null, courseEndDate: e2?.schedule?.lastSessionEnd ? Vd(new Date(e2.schedule.lastSessionEnd), o2) : null, staffMembers: em(e2), coverImage: e2 ? wp(e2) : void 0, gallery: Tp(e2), serviceLocations: jp(e2), policyDescription: c2?.enabled ? c2.description ?? null : null, serviceBookability: s2, displayTimeZone: o2 };
3590
3587
  }
3591
- function im(e2) {
3588
+ function rm(e2) {
3592
3589
  let t2 = e2.schedule?.availabilityConstraints?.durations;
3593
3590
  if (!Td(e2.type) || !Array.isArray(t2)) return false;
3594
3591
  let n2 = t2.map((e3) => typeof e3 == `number` ? e3 : e3?.minutes);
3595
3592
  return new Set(n2).size > 1;
3596
3593
  }
3597
- function am(e2) {
3594
+ function im(e2) {
3598
3595
  if (!Td(e2.type)) return false;
3599
3596
  let t2 = new Set(e2.addOnGroups?.flatMap((e3) => e3.addOnIds ?? []));
3600
3597
  return !!e2.addOnDetails?.some((e3) => e3.addOnId && t2.has(e3.addOnId) && (e3.durationInMinutes ?? 0) > 0);
3601
3598
  }
3602
- function om(e2) {
3603
- return im(e2) || am(e2);
3604
- }
3605
- function sm(e2) {
3606
- return e2;
3607
- }
3608
- var cm = sm(`@wix/site-service-lightbox`);
3609
- function lm(e2) {
3610
- return e2;
3611
- }
3612
- var um = lm(`@wix/viewer-service-lightbox`);
3613
- function dm(e2) {
3614
- return e2;
3599
+ function am(e2) {
3600
+ return rm(e2) || im(e2);
3615
3601
  }
3616
- var fm = dm(`@wix/site-service-pages`);
3617
- function pm() {
3602
+ var om = _a(`@wix/site-service-lightbox`);
3603
+ var sm = _a(`@wix/site-service-pages`);
3604
+ function cm() {
3618
3605
  try {
3619
3606
  return (0, import_services_manager_react.useGetService)();
3620
3607
  } catch {
3621
3608
  return null;
3622
3609
  }
3623
3610
  }
3624
- function mm({ service: e2, ...t2 }) {
3611
+ function lm({ service: e2, ...t2 }) {
3625
3612
  return { ...t2, serviceType: e2?.type ?? t2.serviceType };
3626
3613
  }
3627
- function hm(e2) {
3628
- let t2 = gm(e2);
3614
+ function um(e2) {
3615
+ let t2 = dm(e2);
3629
3616
  if (!t2) return null;
3630
3617
  let [n2, r2] = t2;
3631
3618
  return { pageId: n2, slug: r2.path };
3632
3619
  }
3633
- function gm(e2) {
3620
+ function dm(e2) {
3634
3621
  let t2 = Object.entries(e2).filter(([, e3]) => e3.popup), n2 = t2.find(([e3, t3]) => e3 === `95a79598-f5d6-4902-877d-35f31f144b7b` || t3.appPageId === `95a79598-f5d6-4902-877d-35f31f144b7b`);
3635
3622
  if (n2) return n2;
3636
3623
  let r2 = t2.filter(([, e3]) => e3.appDefinitionId === gd);
3637
3624
  return r2.length === 1 ? r2[0] : null;
3638
3625
  }
3639
- function _m(e2) {
3640
- try {
3641
- let t2 = e2(cm);
3642
- return { open: ({ slug: e3 }, n2) => t2.open({ slug: e3, context: n2 }), close: () => t2.close(), getContext: () => t2.getContext() };
3643
- } catch (t2) {
3644
- try {
3645
- let t3 = e2(um);
3646
- return { open: ({ pageId: e3 }, n2) => t3.open({ pageId: e3, context: n2 }), close: () => t3.close(), getContext: () => t3.getContext() };
3647
- } catch (e3) {
3648
- throw Error(`No lightbox service is provided: ${String(t2)}; ${String(e3)}`);
3649
- }
3650
- }
3626
+ function fm(e2) {
3627
+ let t2 = e2(om);
3628
+ return { open: ({ slug: e3 }, n2) => t2.open({ slug: e3, context: n2 }), close: () => t2.close(), getContext: () => t2.getContext() };
3651
3629
  }
3652
- function vm() {
3653
- let e2 = pm();
3630
+ function pm() {
3631
+ let e2 = cm();
3654
3632
  return (0, import_react.useMemo)(() => {
3655
- let t2 = null, n2 = (e3) => (t2 ??= _m(e3), t2), r2 = () => {
3633
+ let t2 = null, n2 = (e3) => (t2 ??= fm(e3), t2), r2 = () => {
3656
3634
  if (!e2) throw Error(`Services are not available outside a ServicesManagerProvider`);
3657
3635
  return e2;
3658
3636
  };
3659
3637
  return { open: async (e3) => {
3660
- let t3 = r2(), i2 = hm(t3(fm).pages);
3638
+ let t3 = r2(), i2 = um(t3(sm).pages);
3661
3639
  if (!i2) throw Error(`Preferences popup page was not found among the site pages`);
3662
3640
  await n2(t3).open(i2, e3);
3663
3641
  }, close: () => n2(r2()).close(), getContext: () => n2(r2()).getContext() ?? null };
3664
3642
  }, [e2]);
3665
3643
  }
3666
- var ym = [`ANY_FEMALE`, `ANY_MALE`];
3667
- var bm = `3.7.8`;
3668
- var xm = bm;
3669
- var Sm = typeof Buffer == `function`;
3670
- var Cm = typeof TextDecoder == `function` ? new TextDecoder() : void 0;
3671
- var wm = typeof TextEncoder == `function` ? new TextEncoder() : void 0;
3672
- var Tm = Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`);
3673
- var Em = ((e2) => {
3644
+ var mm = [`ANY_FEMALE`, `ANY_MALE`];
3645
+ var hm = `3.7.8`;
3646
+ var gm = hm;
3647
+ var _m = typeof Buffer == `function`;
3648
+ var vm = typeof TextDecoder == `function` ? new TextDecoder() : void 0;
3649
+ var ym = typeof TextEncoder == `function` ? new TextEncoder() : void 0;
3650
+ var bm = Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`);
3651
+ var xm = ((e2) => {
3674
3652
  let t2 = {};
3675
3653
  return e2.forEach((e3, n2) => t2[e3] = n2), t2;
3676
- })(Tm);
3677
- var Dm = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
3678
- var Om = String.fromCharCode.bind(String);
3679
- var km = typeof Uint8Array.from == `function` ? Uint8Array.from.bind(Uint8Array) : (e2) => new Uint8Array(Array.prototype.slice.call(e2, 0));
3680
- var Am = (e2) => e2.replace(/=/g, ``).replace(/[+\/]/g, (e3) => e3 == `+` ? `-` : `_`);
3681
- var jm = (e2) => e2.replace(/[^A-Za-z0-9\+\/]/g, ``);
3682
- var Mm = (e2) => {
3654
+ })(bm);
3655
+ var Sm = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
3656
+ var Cm = String.fromCharCode.bind(String);
3657
+ var wm = typeof Uint8Array.from == `function` ? Uint8Array.from.bind(Uint8Array) : (e2) => new Uint8Array(Array.prototype.slice.call(e2, 0));
3658
+ var Tm = (e2) => e2.replace(/=/g, ``).replace(/[+\/]/g, (e3) => e3 == `+` ? `-` : `_`);
3659
+ var Em = (e2) => e2.replace(/[^A-Za-z0-9\+\/]/g, ``);
3660
+ var Dm = (e2) => {
3683
3661
  let t2, n2, r2, i2, a2 = ``, o2 = e2.length % 3;
3684
3662
  for (let o3 = 0; o3 < e2.length; ) {
3685
3663
  if ((n2 = e2.charCodeAt(o3++)) > 255 || (r2 = e2.charCodeAt(o3++)) > 255 || (i2 = e2.charCodeAt(o3++)) > 255) throw TypeError(`invalid character found`);
3686
- t2 = n2 << 16 | r2 << 8 | i2, a2 += Tm[t2 >> 18 & 63] + Tm[t2 >> 12 & 63] + Tm[t2 >> 6 & 63] + Tm[t2 & 63];
3664
+ t2 = n2 << 16 | r2 << 8 | i2, a2 += bm[t2 >> 18 & 63] + bm[t2 >> 12 & 63] + bm[t2 >> 6 & 63] + bm[t2 & 63];
3687
3665
  }
3688
3666
  return o2 ? a2.slice(0, o2 - 3) + `===`.substring(o2) : a2;
3689
3667
  };
3690
- var Nm = typeof btoa == `function` ? (e2) => btoa(e2) : Sm ? (e2) => Buffer.from(e2, `binary`).toString(`base64`) : Mm;
3691
- var Pm = Sm ? (e2) => Buffer.from(e2).toString(`base64`) : (e2) => {
3668
+ var Om = typeof btoa == `function` ? (e2) => btoa(e2) : _m ? (e2) => Buffer.from(e2, `binary`).toString(`base64`) : Dm;
3669
+ var km = _m ? (e2) => Buffer.from(e2).toString(`base64`) : (e2) => {
3692
3670
  let t2 = 4096, n2 = [];
3693
- for (let r2 = 0, i2 = e2.length; r2 < i2; r2 += t2) n2.push(Om.apply(null, e2.subarray(r2, r2 + t2)));
3694
- return Nm(n2.join(``));
3671
+ for (let r2 = 0, i2 = e2.length; r2 < i2; r2 += t2) n2.push(Cm.apply(null, e2.subarray(r2, r2 + t2)));
3672
+ return Om(n2.join(``));
3695
3673
  };
3696
- var Fm = (e2, t2 = false) => t2 ? Am(Pm(e2)) : Pm(e2);
3697
- var Im = (e2) => {
3674
+ var Am = (e2, t2 = false) => t2 ? Tm(km(e2)) : km(e2);
3675
+ var jm = (e2) => {
3698
3676
  if (e2.length < 2) {
3699
3677
  var t2 = e2.charCodeAt(0);
3700
- return t2 < 128 ? e2 : t2 < 2048 ? Om(192 | t2 >>> 6) + Om(128 | t2 & 63) : Om(224 | t2 >>> 12 & 15) + Om(128 | t2 >>> 6 & 63) + Om(128 | t2 & 63);
3678
+ return t2 < 128 ? e2 : t2 < 2048 ? Cm(192 | t2 >>> 6) + Cm(128 | t2 & 63) : Cm(224 | t2 >>> 12 & 15) + Cm(128 | t2 >>> 6 & 63) + Cm(128 | t2 & 63);
3701
3679
  }
3702
3680
  var t2 = 65536 + (e2.charCodeAt(0) - 55296) * 1024 + (e2.charCodeAt(1) - 56320);
3703
- return Om(240 | t2 >>> 18 & 7) + Om(128 | t2 >>> 12 & 63) + Om(128 | t2 >>> 6 & 63) + Om(128 | t2 & 63);
3681
+ return Cm(240 | t2 >>> 18 & 7) + Cm(128 | t2 >>> 12 & 63) + Cm(128 | t2 >>> 6 & 63) + Cm(128 | t2 & 63);
3704
3682
  };
3705
- var Lm = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
3706
- var Rm = (e2) => e2.replace(Lm, Im);
3707
- var zm = Sm ? (e2) => Buffer.from(e2, `utf8`).toString(`base64`) : wm ? (e2) => Pm(wm.encode(e2)) : (e2) => Nm(Rm(e2));
3708
- var Bm = (e2, t2 = false) => t2 ? Am(zm(e2)) : zm(e2);
3709
- var Vm = (e2) => Bm(e2, true);
3710
- var Hm = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
3711
- var Um = (e2) => {
3683
+ var Mm = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
3684
+ var Nm = (e2) => e2.replace(Mm, jm);
3685
+ var Pm = _m ? (e2) => Buffer.from(e2, `utf8`).toString(`base64`) : ym ? (e2) => km(ym.encode(e2)) : (e2) => Om(Nm(e2));
3686
+ var Fm = (e2, t2 = false) => t2 ? Tm(Pm(e2)) : Pm(e2);
3687
+ var Im = (e2) => Fm(e2, true);
3688
+ var Lm = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
3689
+ var Rm = (e2) => {
3712
3690
  switch (e2.length) {
3713
3691
  case 4:
3714
3692
  var t2 = ((7 & e2.charCodeAt(0)) << 18 | (63 & e2.charCodeAt(1)) << 12 | (63 & e2.charCodeAt(2)) << 6 | 63 & e2.charCodeAt(3)) - 65536;
3715
- return Om((t2 >>> 10) + 55296) + Om((t2 & 1023) + 56320);
3693
+ return Cm((t2 >>> 10) + 55296) + Cm((t2 & 1023) + 56320);
3716
3694
  case 3:
3717
- return Om((15 & e2.charCodeAt(0)) << 12 | (63 & e2.charCodeAt(1)) << 6 | 63 & e2.charCodeAt(2));
3695
+ return Cm((15 & e2.charCodeAt(0)) << 12 | (63 & e2.charCodeAt(1)) << 6 | 63 & e2.charCodeAt(2));
3718
3696
  default:
3719
- return Om((31 & e2.charCodeAt(0)) << 6 | 63 & e2.charCodeAt(1));
3697
+ return Cm((31 & e2.charCodeAt(0)) << 6 | 63 & e2.charCodeAt(1));
3720
3698
  }
3721
3699
  };
3722
- var Wm = (e2) => e2.replace(Hm, Um);
3723
- var Gm = (e2) => {
3724
- if (e2 = e2.replace(/\s+/g, ``), !Dm.test(e2)) throw TypeError(`malformed base64.`);
3700
+ var zm = (e2) => e2.replace(Lm, Rm);
3701
+ var Bm = (e2) => {
3702
+ if (e2 = e2.replace(/\s+/g, ``), !Sm.test(e2)) throw TypeError(`malformed base64.`);
3725
3703
  e2 += `==`.slice(2 - (e2.length & 3));
3726
3704
  let t2, n2, r2, i2 = [];
3727
- for (let a2 = 0; a2 < e2.length; ) t2 = Em[e2.charAt(a2++)] << 18 | Em[e2.charAt(a2++)] << 12 | (n2 = Em[e2.charAt(a2++)]) << 6 | (r2 = Em[e2.charAt(a2++)]), n2 === 64 ? i2.push(Om(t2 >> 16 & 255)) : r2 === 64 ? i2.push(Om(t2 >> 16 & 255, t2 >> 8 & 255)) : i2.push(Om(t2 >> 16 & 255, t2 >> 8 & 255, t2 & 255));
3705
+ for (let a2 = 0; a2 < e2.length; ) t2 = xm[e2.charAt(a2++)] << 18 | xm[e2.charAt(a2++)] << 12 | (n2 = xm[e2.charAt(a2++)]) << 6 | (r2 = xm[e2.charAt(a2++)]), n2 === 64 ? i2.push(Cm(t2 >> 16 & 255)) : r2 === 64 ? i2.push(Cm(t2 >> 16 & 255, t2 >> 8 & 255)) : i2.push(Cm(t2 >> 16 & 255, t2 >> 8 & 255, t2 & 255));
3728
3706
  return i2.join(``);
3729
3707
  };
3730
- var Km = typeof atob == `function` ? (e2) => atob(jm(e2)) : Sm ? (e2) => Buffer.from(e2, `base64`).toString(`binary`) : Gm;
3731
- var qm = Sm ? (e2) => km(Buffer.from(e2, `base64`)) : (e2) => km(Km(e2).split(``).map((e3) => e3.charCodeAt(0)));
3732
- var Jm = (e2) => qm(Xm(e2));
3733
- var Ym = Sm ? (e2) => Buffer.from(e2, `base64`).toString(`utf8`) : Cm ? (e2) => Cm.decode(qm(e2)) : (e2) => Wm(Km(e2));
3734
- var Xm = (e2) => jm(e2.replace(/[-_]/g, (e3) => e3 == `-` ? `+` : `/`));
3735
- var Zm = (e2) => Ym(Xm(e2));
3736
- var Qm = (e2) => {
3708
+ var Vm = typeof atob == `function` ? (e2) => atob(Em(e2)) : _m ? (e2) => Buffer.from(e2, `base64`).toString(`binary`) : Bm;
3709
+ var Hm = _m ? (e2) => wm(Buffer.from(e2, `base64`)) : (e2) => wm(Vm(e2).split(``).map((e3) => e3.charCodeAt(0)));
3710
+ var Um = (e2) => Hm(Gm(e2));
3711
+ var Wm = _m ? (e2) => Buffer.from(e2, `base64`).toString(`utf8`) : vm ? (e2) => vm.decode(Hm(e2)) : (e2) => zm(Vm(e2));
3712
+ var Gm = (e2) => Em(e2.replace(/[-_]/g, (e3) => e3 == `-` ? `+` : `/`));
3713
+ var Km = (e2) => Wm(Gm(e2));
3714
+ var qm = (e2) => {
3737
3715
  if (typeof e2 != `string`) return false;
3738
3716
  let t2 = e2.replace(/\s+/g, ``).replace(/={0,2}$/, ``);
3739
3717
  return !/[^\s0-9a-zA-Z\+/]/.test(t2) || !/[^\s0-9a-zA-Z\-_]/.test(t2);
3740
3718
  };
3741
- var $m = (e2) => ({ value: e2, enumerable: false, writable: true, configurable: true });
3742
- var eh = function() {
3743
- let e2 = (e3, t2) => Object.defineProperty(String.prototype, e3, $m(t2));
3719
+ var Jm = (e2) => ({ value: e2, enumerable: false, writable: true, configurable: true });
3720
+ var Ym = function() {
3721
+ let e2 = (e3, t2) => Object.defineProperty(String.prototype, e3, Jm(t2));
3744
3722
  e2(`fromBase64`, function() {
3745
- return Zm(this);
3723
+ return Km(this);
3746
3724
  }), e2(`toBase64`, function(e3) {
3747
- return Bm(this, e3);
3725
+ return Fm(this, e3);
3748
3726
  }), e2(`toBase64URI`, function() {
3749
- return Bm(this, true);
3727
+ return Fm(this, true);
3750
3728
  }), e2(`toBase64URL`, function() {
3751
- return Bm(this, true);
3729
+ return Fm(this, true);
3752
3730
  }), e2(`toUint8Array`, function() {
3753
- return Jm(this);
3731
+ return Um(this);
3754
3732
  });
3755
3733
  };
3756
- var th = function() {
3757
- let e2 = (e3, t2) => Object.defineProperty(Uint8Array.prototype, e3, $m(t2));
3734
+ var Xm = function() {
3735
+ let e2 = (e3, t2) => Object.defineProperty(Uint8Array.prototype, e3, Jm(t2));
3758
3736
  e2(`toBase64`, function(e3) {
3759
- return Fm(this, e3);
3737
+ return Am(this, e3);
3760
3738
  }), e2(`toBase64URI`, function() {
3761
- return Fm(this, true);
3739
+ return Am(this, true);
3762
3740
  }), e2(`toBase64URL`, function() {
3763
- return Fm(this, true);
3741
+ return Am(this, true);
3764
3742
  });
3765
3743
  };
3766
- var nh = { version: bm, VERSION: xm, atob: Km, atobPolyfill: Gm, btoa: Nm, btoaPolyfill: Mm, fromBase64: Zm, toBase64: Bm, encode: Bm, encodeURI: Vm, encodeURL: Vm, utob: Rm, btou: Wm, decode: Zm, isValid: Qm, fromUint8Array: Fm, toUint8Array: Jm, extendString: eh, extendUint8Array: th, extendBuiltins: () => {
3767
- eh(), th();
3744
+ var Zm = { version: hm, VERSION: gm, atob: Vm, atobPolyfill: Bm, btoa: Om, btoaPolyfill: Dm, fromBase64: Km, toBase64: Fm, encode: Fm, encodeURI: Im, encodeURL: Im, utob: Nm, btou: zm, decode: Km, isValid: qm, fromUint8Array: Am, toUint8Array: Um, extendString: Ym, extendUint8Array: Xm, extendBuiltins: () => {
3745
+ Ym(), Xm();
3768
3746
  } };
3769
- var rh = Uint8Array;
3770
- var ih = Uint16Array;
3771
- var ah = Int32Array;
3772
- var oh = new rh([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]);
3773
- var sh = new rh([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]);
3774
- var ch = new rh([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
3775
- var lh = function(e2, t2) {
3776
- for (var n2 = new ih(31), r2 = 0; r2 < 31; ++r2) n2[r2] = t2 += 1 << e2[r2 - 1];
3777
- for (var i2 = new ah(n2[30]), r2 = 1; r2 < 30; ++r2) for (var a2 = n2[r2]; a2 < n2[r2 + 1]; ++a2) i2[a2] = a2 - n2[r2] << 5 | r2;
3747
+ var Qm = Uint8Array;
3748
+ var $m = Uint16Array;
3749
+ var eh = Int32Array;
3750
+ var th = new Qm([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]);
3751
+ var nh = new Qm([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]);
3752
+ var rh = new Qm([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
3753
+ var ih = function(e2, t2) {
3754
+ for (var n2 = new $m(31), r2 = 0; r2 < 31; ++r2) n2[r2] = t2 += 1 << e2[r2 - 1];
3755
+ for (var i2 = new eh(n2[30]), r2 = 1; r2 < 30; ++r2) for (var a2 = n2[r2]; a2 < n2[r2 + 1]; ++a2) i2[a2] = a2 - n2[r2] << 5 | r2;
3778
3756
  return { b: n2, r: i2 };
3779
3757
  };
3780
- var uh = lh(oh, 2);
3781
- var dh = uh.b;
3782
- var fh = uh.r;
3783
- dh[28] = 258, fh[258] = 28;
3784
- for (ph = lh(sh, 0), mh = ph.b, hh = ph.r, gh = new ih(32768), Q = 0; Q < 32768; ++Q) {
3785
- _h = (Q & 43690) >> 1 | (Q & 21845) << 1;
3786
- _h = (_h & 52428) >> 2 | (_h & 13107) << 2, _h = (_h & 61680) >> 4 | (_h & 3855) << 4, gh[Q] = ((_h & 65280) >> 8 | (_h & 255) << 8) >> 1;
3787
- }
3788
- var _h;
3789
- var ph;
3790
- var mh;
3791
- var hh;
3792
- var gh;
3758
+ var ah = ih(th, 2);
3759
+ var oh = ah.b;
3760
+ var sh = ah.r;
3761
+ oh[28] = 258, sh[258] = 28;
3762
+ for (ch = ih(nh, 0), lh = ch.b, uh = ch.r, dh = new $m(32768), Q = 0; Q < 32768; ++Q) {
3763
+ fh = (Q & 43690) >> 1 | (Q & 21845) << 1;
3764
+ fh = (fh & 52428) >> 2 | (fh & 13107) << 2, fh = (fh & 61680) >> 4 | (fh & 3855) << 4, dh[Q] = ((fh & 65280) >> 8 | (fh & 255) << 8) >> 1;
3765
+ }
3766
+ var fh;
3767
+ var ch;
3768
+ var lh;
3769
+ var uh;
3770
+ var dh;
3793
3771
  var Q;
3794
- for (vh = function(e2, t2, n2) {
3795
- for (var r2 = e2.length, i2 = 0, a2 = new ih(t2); i2 < r2; ++i2) e2[i2] && ++a2[e2[i2] - 1];
3796
- var o2 = new ih(t2);
3772
+ for (ph = function(e2, t2, n2) {
3773
+ for (var r2 = e2.length, i2 = 0, a2 = new $m(t2); i2 < r2; ++i2) e2[i2] && ++a2[e2[i2] - 1];
3774
+ var o2 = new $m(t2);
3797
3775
  for (i2 = 1; i2 < t2; ++i2) o2[i2] = o2[i2 - 1] + a2[i2 - 1] << 1;
3798
3776
  var s2;
3799
3777
  if (n2) {
3800
- s2 = new ih(1 << t2);
3778
+ s2 = new $m(1 << t2);
3801
3779
  var c2 = 15 - t2;
3802
- 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[gh[d2] >> c2] = l2;
3803
- } else for (s2 = new ih(r2), i2 = 0; i2 < r2; ++i2) e2[i2] && (s2[i2] = gh[o2[e2[i2] - 1]++] >> 15 - e2[i2]);
3780
+ 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[dh[d2] >> c2] = l2;
3781
+ } else for (s2 = new $m(r2), i2 = 0; i2 < r2; ++i2) e2[i2] && (s2[i2] = dh[o2[e2[i2] - 1]++] >> 15 - e2[i2]);
3804
3782
  return s2;
3805
- }, yh = new rh(288), Q = 0; Q < 144; ++Q) yh[Q] = 8;
3806
- var vh;
3807
- var yh;
3783
+ }, mh = new Qm(288), Q = 0; Q < 144; ++Q) mh[Q] = 8;
3784
+ var ph;
3785
+ var mh;
3808
3786
  var Q;
3809
- for (Q = 144; Q < 256; ++Q) yh[Q] = 9;
3787
+ for (Q = 144; Q < 256; ++Q) mh[Q] = 9;
3810
3788
  var Q;
3811
- for (Q = 256; Q < 280; ++Q) yh[Q] = 7;
3789
+ for (Q = 256; Q < 280; ++Q) mh[Q] = 7;
3812
3790
  var Q;
3813
- for (Q = 280; Q < 288; ++Q) yh[Q] = 8;
3791
+ for (Q = 280; Q < 288; ++Q) mh[Q] = 8;
3814
3792
  var Q;
3815
- for (bh = new rh(32), Q = 0; Q < 32; ++Q) bh[Q] = 5;
3816
- var bh;
3793
+ for (hh = new Qm(32), Q = 0; Q < 32; ++Q) hh[Q] = 5;
3794
+ var hh;
3817
3795
  var Q;
3818
- var xh = vh(yh, 9, 0);
3819
- var Sh = vh(yh, 9, 1);
3820
- var Ch = vh(bh, 5, 0);
3821
- var wh = vh(bh, 5, 1);
3822
- var Th = function(e2) {
3796
+ var gh = ph(mh, 9, 0);
3797
+ var _h = ph(mh, 9, 1);
3798
+ var vh = ph(hh, 5, 0);
3799
+ var yh = ph(hh, 5, 1);
3800
+ var bh = function(e2) {
3823
3801
  for (var t2 = e2[0], n2 = 1; n2 < e2.length; ++n2) e2[n2] > t2 && (t2 = e2[n2]);
3824
3802
  return t2;
3825
3803
  };
3826
- var Eh = function(e2, t2, n2) {
3804
+ var xh = function(e2, t2, n2) {
3827
3805
  var r2 = t2 / 8 | 0;
3828
3806
  return (e2[r2] | e2[r2 + 1] << 8) >> (t2 & 7) & n2;
3829
3807
  };
3830
- var Dh = function(e2, t2) {
3808
+ var Sh = function(e2, t2) {
3831
3809
  var n2 = t2 / 8 | 0;
3832
3810
  return (e2[n2] | e2[n2 + 1] << 8 | e2[n2 + 2] << 16) >> (t2 & 7);
3833
3811
  };
3834
- var Oh = function(e2) {
3812
+ var Ch = function(e2) {
3835
3813
  return (e2 + 7) / 8 | 0;
3836
3814
  };
3837
- var kh = function(e2, t2, n2) {
3838
- return (t2 == null || t2 < 0) && (t2 = 0), (n2 == null || n2 > e2.length) && (n2 = e2.length), new rh(e2.subarray(t2, n2));
3815
+ var wh = function(e2, t2, n2) {
3816
+ return (t2 == null || t2 < 0) && (t2 = 0), (n2 == null || n2 > e2.length) && (n2 = e2.length), new Qm(e2.subarray(t2, n2));
3839
3817
  };
3840
- var Ah = [`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`];
3841
- var jh = function(e2, t2, n2) {
3842
- var r2 = Error(t2 || Ah[e2]);
3843
- if (r2.code = e2, Error.captureStackTrace && Error.captureStackTrace(r2, jh), !n2) throw r2;
3818
+ var Th = [`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`];
3819
+ var Eh = function(e2, t2, n2) {
3820
+ var r2 = Error(t2 || Th[e2]);
3821
+ if (r2.code = e2, Error.captureStackTrace && Error.captureStackTrace(r2, Eh), !n2) throw r2;
3844
3822
  return r2;
3845
3823
  };
3846
- var Mh = function(e2, t2, n2, r2) {
3824
+ var Dh = function(e2, t2, n2, r2) {
3847
3825
  var i2 = e2.length, a2 = r2 ? r2.length : 0;
3848
- if (!i2 || t2.f && !t2.l) return n2 || new rh(0);
3826
+ if (!i2 || t2.f && !t2.l) return n2 || new Qm(0);
3849
3827
  var o2 = !n2, s2 = o2 || t2.i != 2, c2 = t2.i;
3850
- o2 && (n2 = new rh(i2 * 3));
3828
+ o2 && (n2 = new Qm(i2 * 3));
3851
3829
  var l2 = function(e3) {
3852
3830
  var t3 = n2.length;
3853
3831
  if (e3 > t3) {
3854
- var r3 = new rh(Math.max(t3 * 2, e3));
3832
+ var r3 = new Qm(Math.max(t3 * 2, e3));
3855
3833
  r3.set(n2), n2 = r3;
3856
3834
  }
3857
3835
  }, 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;
3858
3836
  do {
3859
3837
  if (!p2) {
3860
- u2 = Eh(e2, d2, 1);
3861
- var v2 = Eh(e2, d2 + 1, 3);
3838
+ u2 = xh(e2, d2, 1);
3839
+ var v2 = xh(e2, d2 + 1, 3);
3862
3840
  if (d2 += 3, !v2) {
3863
- var ee2 = Oh(d2) + 4, y2 = e2[ee2 - 4] | e2[ee2 - 3] << 8, b2 = ee2 + y2;
3841
+ var ee2 = Ch(d2) + 4, y2 = e2[ee2 - 4] | e2[ee2 - 3] << 8, b2 = ee2 + y2;
3864
3842
  if (b2 > i2) {
3865
- c2 && jh(0);
3843
+ c2 && Eh(0);
3866
3844
  break;
3867
3845
  }
3868
3846
  s2 && l2(f2 + y2), n2.set(e2.subarray(ee2, b2), f2), t2.b = f2 += y2, t2.p = d2 = b2 * 8, t2.f = u2;
3869
3847
  continue;
3870
3848
  }
3871
- if (v2 == 1) p2 = Sh, m2 = wh, h2 = 9, g2 = 5;
3849
+ if (v2 == 1) p2 = _h, m2 = yh, h2 = 9, g2 = 5;
3872
3850
  else if (v2 == 2) {
3873
- var te2 = Eh(e2, d2, 31) + 257, ne2 = Eh(e2, d2 + 10, 15) + 4, x2 = te2 + Eh(e2, d2 + 5, 31) + 1;
3851
+ var te2 = xh(e2, d2, 31) + 257, ne2 = xh(e2, d2 + 10, 15) + 4, x2 = te2 + xh(e2, d2 + 5, 31) + 1;
3874
3852
  d2 += 14;
3875
- for (var S2 = new rh(x2), C2 = new rh(19), re2 = 0; re2 < ne2; ++re2) C2[ch[re2]] = Eh(e2, d2 + re2 * 3, 7);
3853
+ for (var S2 = new Qm(x2), C2 = new Qm(19), re2 = 0; re2 < ne2; ++re2) C2[rh[re2]] = xh(e2, d2 + re2 * 3, 7);
3876
3854
  d2 += ne2 * 3;
3877
- for (var w2 = Th(C2), ie2 = (1 << w2) - 1, ae2 = vh(C2, w2, 1), re2 = 0; re2 < x2; ) {
3878
- var oe2 = ae2[Eh(e2, d2, ie2)];
3855
+ for (var w2 = bh(C2), ie2 = (1 << w2) - 1, ae2 = ph(C2, w2, 1), re2 = 0; re2 < x2; ) {
3856
+ var oe2 = ae2[xh(e2, d2, ie2)];
3879
3857
  d2 += oe2 & 15;
3880
3858
  var ee2 = oe2 >> 4;
3881
3859
  if (ee2 < 16) S2[re2++] = ee2;
3882
3860
  else {
3883
3861
  var T2 = 0, E2 = 0;
3884
- for (ee2 == 16 ? (E2 = 3 + Eh(e2, d2, 3), d2 += 2, T2 = S2[re2 - 1]) : ee2 == 17 ? (E2 = 3 + Eh(e2, d2, 7), d2 += 3) : ee2 == 18 && (E2 = 11 + Eh(e2, d2, 127), d2 += 7); E2--; ) S2[re2++] = T2;
3862
+ for (ee2 == 16 ? (E2 = 3 + xh(e2, d2, 3), d2 += 2, T2 = S2[re2 - 1]) : ee2 == 17 ? (E2 = 3 + xh(e2, d2, 7), d2 += 3) : ee2 == 18 && (E2 = 11 + xh(e2, d2, 127), d2 += 7); E2--; ) S2[re2++] = T2;
3885
3863
  }
3886
3864
  }
3887
3865
  var se2 = S2.subarray(0, te2), D2 = S2.subarray(te2);
3888
- h2 = Th(se2), g2 = Th(D2), p2 = vh(se2, h2, 1), m2 = vh(D2, g2, 1);
3889
- } else jh(1);
3866
+ h2 = bh(se2), g2 = bh(D2), p2 = ph(se2, h2, 1), m2 = ph(D2, g2, 1);
3867
+ } else Eh(1);
3890
3868
  if (d2 > _2) {
3891
- c2 && jh(0);
3869
+ c2 && Eh(0);
3892
3870
  break;
3893
3871
  }
3894
3872
  }
3895
3873
  s2 && l2(f2 + 131072);
3896
3874
  for (var ce2 = (1 << h2) - 1, le2 = (1 << g2) - 1, ue2 = d2; ; ue2 = d2) {
3897
- var T2 = p2[Dh(e2, d2) & ce2], O2 = T2 >> 4;
3875
+ var T2 = p2[Sh(e2, d2) & ce2], O2 = T2 >> 4;
3898
3876
  if (d2 += T2 & 15, d2 > _2) {
3899
- c2 && jh(0);
3877
+ c2 && Eh(0);
3900
3878
  break;
3901
3879
  }
3902
- if (T2 || jh(2), O2 < 256) n2[f2++] = O2;
3880
+ if (T2 || Eh(2), O2 < 256) n2[f2++] = O2;
3903
3881
  else if (O2 == 256) {
3904
3882
  ue2 = d2, p2 = null;
3905
3883
  break;
3906
3884
  } else {
3907
3885
  var de2 = O2 - 254;
3908
3886
  if (O2 > 264) {
3909
- var re2 = O2 - 257, k2 = oh[re2];
3910
- de2 = Eh(e2, d2, (1 << k2) - 1) + dh[re2], d2 += k2;
3887
+ var re2 = O2 - 257, k2 = th[re2];
3888
+ de2 = xh(e2, d2, (1 << k2) - 1) + oh[re2], d2 += k2;
3911
3889
  }
3912
- var fe2 = m2[Dh(e2, d2) & le2], pe2 = fe2 >> 4;
3913
- fe2 || jh(3), d2 += fe2 & 15;
3914
- var D2 = mh[pe2];
3890
+ var fe2 = m2[Sh(e2, d2) & le2], pe2 = fe2 >> 4;
3891
+ fe2 || Eh(3), d2 += fe2 & 15;
3892
+ var D2 = lh[pe2];
3915
3893
  if (pe2 > 3) {
3916
- var k2 = sh[pe2];
3917
- D2 += Dh(e2, d2) & (1 << k2) - 1, d2 += k2;
3894
+ var k2 = nh[pe2];
3895
+ D2 += Sh(e2, d2) & (1 << k2) - 1, d2 += k2;
3918
3896
  }
3919
3897
  if (d2 > _2) {
3920
- c2 && jh(0);
3898
+ c2 && Eh(0);
3921
3899
  break;
3922
3900
  }
3923
3901
  s2 && l2(f2 + 131072);
3924
3902
  var me2 = f2 + de2;
3925
3903
  if (f2 < D2) {
3926
3904
  var he2 = a2 - D2, ge2 = Math.min(D2, me2);
3927
- for (he2 + f2 < 0 && jh(3); f2 < ge2; ++f2) n2[f2] = r2[he2 + f2];
3905
+ for (he2 + f2 < 0 && Eh(3); f2 < ge2; ++f2) n2[f2] = r2[he2 + f2];
3928
3906
  }
3929
3907
  for (; f2 < me2; ++f2) n2[f2] = n2[f2 - D2];
3930
3908
  }
3931
3909
  }
3932
3910
  t2.l = p2, t2.p = ue2, t2.b = f2, t2.f = u2, p2 && (u2 = 1, t2.m = h2, t2.d = m2, t2.n = g2);
3933
3911
  } while (!u2);
3934
- return f2 != n2.length && o2 ? kh(n2, 0, f2) : n2.subarray(0, f2);
3912
+ return f2 != n2.length && o2 ? wh(n2, 0, f2) : n2.subarray(0, f2);
3935
3913
  };
3936
- var Nh = function(e2, t2, n2) {
3914
+ var Oh = function(e2, t2, n2) {
3937
3915
  n2 <<= t2 & 7;
3938
3916
  var r2 = t2 / 8 | 0;
3939
3917
  e2[r2] |= n2, e2[r2 + 1] |= n2 >> 8;
3940
3918
  };
3941
- var Ph = function(e2, t2, n2) {
3919
+ var kh = function(e2, t2, n2) {
3942
3920
  n2 <<= t2 & 7;
3943
3921
  var r2 = t2 / 8 | 0;
3944
3922
  e2[r2] |= n2, e2[r2 + 1] |= n2 >> 8, e2[r2 + 2] |= n2 >> 16;
3945
3923
  };
3946
- var Fh = function(e2, t2) {
3924
+ var Ah = function(e2, t2) {
3947
3925
  for (var n2 = [], r2 = 0; r2 < e2.length; ++r2) e2[r2] && n2.push({ s: r2, f: e2[r2] });
3948
3926
  var i2 = n2.length, a2 = n2.slice();
3949
- if (!i2) return { t: Hh, l: 0 };
3927
+ if (!i2) return { t: Lh, l: 0 };
3950
3928
  if (i2 == 1) {
3951
- var o2 = new rh(n2[0].s + 1);
3929
+ var o2 = new Qm(n2[0].s + 1);
3952
3930
  return o2[n2[0].s] = 1, { t: o2, l: 1 };
3953
3931
  }
3954
3932
  n2.sort(function(e3, t3) {
@@ -3957,7 +3935,7 @@ var Fh = function(e2, t2) {
3957
3935
  var s2 = n2[0], c2 = n2[1], l2 = 0, u2 = 1, d2 = 2;
3958
3936
  for (n2[0] = { s: -1, f: s2.f + c2.f, l: s2, r: c2 }; u2 != i2 - 1; ) s2 = n2[n2[l2].f < n2[d2].f ? l2++ : d2++], c2 = n2[l2 != u2 && n2[l2].f < n2[d2].f ? l2++ : d2++], n2[u2++] = { s: -1, f: s2.f + c2.f, l: s2, r: c2 };
3959
3937
  for (var f2 = a2[0].s, r2 = 1; r2 < i2; ++r2) a2[r2].s > f2 && (f2 = a2[r2].s);
3960
- var p2 = new ih(f2 + 1), m2 = Ih(n2[u2 - 1], p2, 0);
3938
+ var p2 = new $m(f2 + 1), m2 = jh(n2[u2 - 1], p2, 0);
3961
3939
  if (m2 > t2) {
3962
3940
  var r2 = 0, h2 = 0, g2 = m2 - t2, _2 = 1 << g2;
3963
3941
  for (a2.sort(function(e3, t3) {
@@ -3977,14 +3955,14 @@ var Fh = function(e2, t2) {
3977
3955
  }
3978
3956
  m2 = t2;
3979
3957
  }
3980
- return { t: new rh(p2), l: m2 };
3958
+ return { t: new Qm(p2), l: m2 };
3981
3959
  };
3982
- var Ih = function(e2, t2, n2) {
3983
- return e2.s == -1 ? Math.max(Ih(e2.l, t2, n2 + 1), Ih(e2.r, t2, n2 + 1)) : t2[e2.s] = n2;
3960
+ var jh = function(e2, t2, n2) {
3961
+ return e2.s == -1 ? Math.max(jh(e2.l, t2, n2 + 1), jh(e2.r, t2, n2 + 1)) : t2[e2.s] = n2;
3984
3962
  };
3985
- var Lh = function(e2) {
3963
+ var Mh = function(e2) {
3986
3964
  for (var t2 = e2.length; t2 && !e2[--t2]; ) ;
3987
- for (var n2 = new ih(++t2), r2 = 0, i2 = e2[0], a2 = 1, o2 = function(e3) {
3965
+ for (var n2 = new $m(++t2), r2 = 0, i2 = e2[0], a2 = 1, o2 = function(e3) {
3988
3966
  n2[r2++] = e3;
3989
3967
  }, s2 = 1; s2 <= t2; ++s2) if (e2[s2] == i2 && s2 != t2) ++a2;
3990
3968
  else {
@@ -4000,60 +3978,60 @@ var Lh = function(e2) {
4000
3978
  }
4001
3979
  return { c: n2.subarray(0, r2), n: t2 };
4002
3980
  };
4003
- var Rh = function(e2, t2) {
3981
+ var Nh = function(e2, t2) {
4004
3982
  for (var n2 = 0, r2 = 0; r2 < t2.length; ++r2) n2 += e2[r2] * t2[r2];
4005
3983
  return n2;
4006
3984
  };
4007
- var zh = function(e2, t2, n2) {
4008
- var r2 = n2.length, i2 = Oh(t2 + 2);
3985
+ var Ph = function(e2, t2, n2) {
3986
+ var r2 = n2.length, i2 = Ch(t2 + 2);
4009
3987
  e2[i2] = r2 & 255, e2[i2 + 1] = r2 >> 8, e2[i2 + 2] = e2[i2] ^ 255, e2[i2 + 3] = e2[i2 + 1] ^ 255;
4010
3988
  for (var a2 = 0; a2 < r2; ++a2) e2[i2 + a2 + 4] = n2[a2];
4011
3989
  return (i2 + 4 + r2) * 8;
4012
3990
  };
4013
- var Bh = function(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
4014
- Nh(t2, u2++, n2), ++i2[256];
4015
- for (var d2 = Fh(i2, 15), f2 = d2.t, p2 = d2.l, m2 = Fh(a2, 15), h2 = m2.t, g2 = m2.l, _2 = Lh(f2), v2 = _2.c, ee2 = _2.n, y2 = Lh(h2), b2 = y2.c, te2 = y2.n, ne2 = new ih(19), x2 = 0; x2 < v2.length; ++x2) ++ne2[v2[x2] & 31];
3991
+ var Fh = function(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
3992
+ Oh(t2, u2++, n2), ++i2[256];
3993
+ for (var d2 = Ah(i2, 15), f2 = d2.t, p2 = d2.l, m2 = Ah(a2, 15), h2 = m2.t, g2 = m2.l, _2 = Mh(f2), v2 = _2.c, ee2 = _2.n, y2 = Mh(h2), b2 = y2.c, te2 = y2.n, ne2 = new $m(19), x2 = 0; x2 < v2.length; ++x2) ++ne2[v2[x2] & 31];
4016
3994
  for (var x2 = 0; x2 < b2.length; ++x2) ++ne2[b2[x2] & 31];
4017
- for (var S2 = Fh(ne2, 7), C2 = S2.t, re2 = S2.l, w2 = 19; w2 > 4 && !C2[ch[w2 - 1]]; --w2) ;
4018
- var ie2 = l2 + 5 << 3, ae2 = Rh(i2, yh) + Rh(a2, bh) + o2, oe2 = Rh(i2, f2) + Rh(a2, h2) + o2 + 14 + 3 * w2 + Rh(ne2, C2) + 2 * ne2[16] + 3 * ne2[17] + 7 * ne2[18];
4019
- if (c2 >= 0 && ie2 <= ae2 && ie2 <= oe2) return zh(t2, u2, e2.subarray(c2, c2 + l2));
3995
+ for (var S2 = Ah(ne2, 7), C2 = S2.t, re2 = S2.l, w2 = 19; w2 > 4 && !C2[rh[w2 - 1]]; --w2) ;
3996
+ var ie2 = l2 + 5 << 3, ae2 = Nh(i2, mh) + Nh(a2, hh) + o2, oe2 = Nh(i2, f2) + Nh(a2, h2) + o2 + 14 + 3 * w2 + Nh(ne2, C2) + 2 * ne2[16] + 3 * ne2[17] + 7 * ne2[18];
3997
+ if (c2 >= 0 && ie2 <= ae2 && ie2 <= oe2) return Ph(t2, u2, e2.subarray(c2, c2 + l2));
4020
3998
  var T2, E2, se2, D2;
4021
- if (Nh(t2, u2, 1 + (oe2 < ae2)), u2 += 2, oe2 < ae2) {
4022
- T2 = vh(f2, p2, 0), E2 = f2, se2 = vh(h2, g2, 0), D2 = h2;
4023
- var ce2 = vh(C2, re2, 0);
4024
- Nh(t2, u2, ee2 - 257), Nh(t2, u2 + 5, te2 - 1), Nh(t2, u2 + 10, w2 - 4), u2 += 14;
4025
- for (var x2 = 0; x2 < w2; ++x2) Nh(t2, u2 + 3 * x2, C2[ch[x2]]);
3999
+ if (Oh(t2, u2, 1 + (oe2 < ae2)), u2 += 2, oe2 < ae2) {
4000
+ T2 = ph(f2, p2, 0), E2 = f2, se2 = ph(h2, g2, 0), D2 = h2;
4001
+ var ce2 = ph(C2, re2, 0);
4002
+ Oh(t2, u2, ee2 - 257), Oh(t2, u2 + 5, te2 - 1), Oh(t2, u2 + 10, w2 - 4), u2 += 14;
4003
+ for (var x2 = 0; x2 < w2; ++x2) Oh(t2, u2 + 3 * x2, C2[rh[x2]]);
4026
4004
  u2 += 3 * w2;
4027
4005
  for (var le2 = [v2, b2], ue2 = 0; ue2 < 2; ++ue2) for (var O2 = le2[ue2], x2 = 0; x2 < O2.length; ++x2) {
4028
4006
  var de2 = O2[x2] & 31;
4029
- Nh(t2, u2, ce2[de2]), u2 += C2[de2], de2 > 15 && (Nh(t2, u2, O2[x2] >> 5 & 127), u2 += O2[x2] >> 12);
4007
+ Oh(t2, u2, ce2[de2]), u2 += C2[de2], de2 > 15 && (Oh(t2, u2, O2[x2] >> 5 & 127), u2 += O2[x2] >> 12);
4030
4008
  }
4031
- } else T2 = xh, E2 = yh, se2 = Ch, D2 = bh;
4009
+ } else T2 = gh, E2 = mh, se2 = vh, D2 = hh;
4032
4010
  for (var x2 = 0; x2 < s2; ++x2) {
4033
4011
  var k2 = r2[x2];
4034
4012
  if (k2 > 255) {
4035
4013
  var de2 = k2 >> 18 & 31;
4036
- Ph(t2, u2, T2[de2 + 257]), u2 += E2[de2 + 257], de2 > 7 && (Nh(t2, u2, k2 >> 23 & 31), u2 += oh[de2]);
4014
+ kh(t2, u2, T2[de2 + 257]), u2 += E2[de2 + 257], de2 > 7 && (Oh(t2, u2, k2 >> 23 & 31), u2 += th[de2]);
4037
4015
  var fe2 = k2 & 31;
4038
- Ph(t2, u2, se2[fe2]), u2 += D2[fe2], fe2 > 3 && (Ph(t2, u2, k2 >> 5 & 8191), u2 += sh[fe2]);
4039
- } else Ph(t2, u2, T2[k2]), u2 += E2[k2];
4016
+ kh(t2, u2, se2[fe2]), u2 += D2[fe2], fe2 > 3 && (kh(t2, u2, k2 >> 5 & 8191), u2 += nh[fe2]);
4017
+ } else kh(t2, u2, T2[k2]), u2 += E2[k2];
4040
4018
  }
4041
- return Ph(t2, u2, T2[256]), u2 + E2[256];
4019
+ return kh(t2, u2, T2[256]), u2 + E2[256];
4042
4020
  };
4043
- var Vh = new ah([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
4044
- var Hh = new rh(0);
4045
- var Uh = function(e2, t2, n2, r2, i2, a2) {
4046
- var o2 = a2.z || e2.length, s2 = new rh(r2 + o2 + 5 * (1 + Math.ceil(o2 / 7e3)) + i2), c2 = s2.subarray(r2, s2.length - i2), l2 = a2.l, u2 = (a2.r || 0) & 7;
4021
+ var Ih = new eh([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
4022
+ var Lh = new Qm(0);
4023
+ var Rh = function(e2, t2, n2, r2, i2, a2) {
4024
+ var o2 = a2.z || e2.length, s2 = new Qm(r2 + o2 + 5 * (1 + Math.ceil(o2 / 7e3)) + i2), c2 = s2.subarray(r2, s2.length - i2), l2 = a2.l, u2 = (a2.r || 0) & 7;
4047
4025
  if (t2) {
4048
4026
  u2 && (c2[0] = a2.r >> 3);
4049
- for (var d2 = Vh[t2 - 1], f2 = d2 >> 13, p2 = d2 & 8191, m2 = (1 << n2) - 1, h2 = a2.p || new ih(32768), g2 = a2.h || new ih(m2 + 1), _2 = Math.ceil(n2 / 3), v2 = 2 * _2, ee2 = function(t3) {
4027
+ for (var d2 = Ih[t2 - 1], f2 = d2 >> 13, p2 = d2 & 8191, m2 = (1 << n2) - 1, h2 = a2.p || new $m(32768), g2 = a2.h || new $m(m2 + 1), _2 = Math.ceil(n2 / 3), v2 = 2 * _2, ee2 = function(t3) {
4050
4028
  return (e2[t3] ^ e2[t3 + 1] << _2 ^ e2[t3 + 2] << v2) & m2;
4051
- }, y2 = new ah(25e3), b2 = new ih(288), te2 = new ih(32), ne2 = 0, x2 = 0, S2 = a2.i || 0, C2 = 0, re2 = a2.w || 0, w2 = 0; S2 + 2 < o2; ++S2) {
4029
+ }, y2 = new eh(25e3), b2 = new $m(288), te2 = new $m(32), ne2 = 0, x2 = 0, S2 = a2.i || 0, C2 = 0, re2 = a2.w || 0, w2 = 0; S2 + 2 < o2; ++S2) {
4052
4030
  var ie2 = ee2(S2), ae2 = S2 & 32767, oe2 = g2[ie2];
4053
4031
  if (h2[ae2] = oe2, g2[ie2] = ae2, re2 <= S2) {
4054
4032
  var T2 = o2 - S2;
4055
4033
  if ((ne2 > 7e3 || C2 > 24576) && (T2 > 423 || !l2)) {
4056
- u2 = Bh(e2, c2, 0, y2, b2, te2, x2, C2, w2, S2 - w2, u2), C2 = ne2 = x2 = 0, w2 = S2;
4034
+ u2 = Fh(e2, c2, 0, y2, b2, te2, x2, C2, w2, S2 - w2, u2), C2 = ne2 = x2 = 0, w2 = S2;
4057
4035
  for (var E2 = 0; E2 < 286; ++E2) b2[E2] = 0;
4058
4036
  for (var E2 = 0; E2 < 30; ++E2) te2[E2] = 0;
4059
4037
  }
@@ -4072,235 +4050,235 @@ var Uh = function(e2, t2, n2, r2, i2, a2) {
4072
4050
  ae2 = oe2, oe2 = h2[ae2], le2 += ae2 - oe2 & 32767;
4073
4051
  }
4074
4052
  if (D2) {
4075
- y2[C2++] = 268435456 | fh[se2] << 18 | hh[D2];
4076
- var ge2 = fh[se2] & 31, _e2 = hh[D2] & 31;
4077
- x2 += oh[ge2] + sh[_e2], ++b2[257 + ge2], ++te2[_e2], re2 = S2 + se2, ++ne2;
4053
+ y2[C2++] = 268435456 | sh[se2] << 18 | uh[D2];
4054
+ var ge2 = sh[se2] & 31, _e2 = uh[D2] & 31;
4055
+ x2 += th[ge2] + nh[_e2], ++b2[257 + ge2], ++te2[_e2], re2 = S2 + se2, ++ne2;
4078
4056
  } else y2[C2++] = e2[S2], ++b2[e2[S2]];
4079
4057
  }
4080
4058
  }
4081
4059
  for (S2 = Math.max(S2, re2); S2 < o2; ++S2) y2[C2++] = e2[S2], ++b2[e2[S2]];
4082
- u2 = Bh(e2, c2, l2, y2, b2, te2, x2, C2, w2, S2 - w2, u2), l2 || (a2.r = u2 & 7 | c2[u2 / 8 | 0] << 3, u2 -= 7, a2.h = g2, a2.p = h2, a2.i = S2, a2.w = re2);
4060
+ u2 = Fh(e2, c2, l2, y2, b2, te2, x2, C2, w2, S2 - w2, u2), l2 || (a2.r = u2 & 7 | c2[u2 / 8 | 0] << 3, u2 -= 7, a2.h = g2, a2.p = h2, a2.i = S2, a2.w = re2);
4083
4061
  } else {
4084
4062
  for (var S2 = a2.w || 0; S2 < o2 + l2; S2 += 65535) {
4085
4063
  var ve2 = S2 + 65535;
4086
- ve2 >= o2 && (c2[u2 / 8 | 0] = l2, ve2 = o2), u2 = zh(c2, u2 + 1, e2.subarray(S2, ve2));
4064
+ ve2 >= o2 && (c2[u2 / 8 | 0] = l2, ve2 = o2), u2 = Ph(c2, u2 + 1, e2.subarray(S2, ve2));
4087
4065
  }
4088
4066
  a2.i = o2;
4089
4067
  }
4090
- return kh(s2, 0, r2 + Oh(u2) + i2);
4068
+ return wh(s2, 0, r2 + Ch(u2) + i2);
4091
4069
  };
4092
- var Wh = function() {
4070
+ var zh = function() {
4093
4071
  for (var e2 = new Int32Array(256), t2 = 0; t2 < 256; ++t2) {
4094
4072
  for (var n2 = t2, r2 = 9; --r2; ) n2 = (n2 & 1 && -306674912) ^ n2 >>> 1;
4095
4073
  e2[t2] = n2;
4096
4074
  }
4097
4075
  return e2;
4098
4076
  }();
4099
- var Gh = function() {
4077
+ var Bh = function() {
4100
4078
  var e2 = -1;
4101
4079
  return { p: function(t2) {
4102
- for (var n2 = e2, r2 = 0; r2 < t2.length; ++r2) n2 = Wh[n2 & 255 ^ t2[r2]] ^ n2 >>> 8;
4080
+ for (var n2 = e2, r2 = 0; r2 < t2.length; ++r2) n2 = zh[n2 & 255 ^ t2[r2]] ^ n2 >>> 8;
4103
4081
  e2 = n2;
4104
4082
  }, d: function() {
4105
4083
  return ~e2;
4106
4084
  } };
4107
4085
  };
4108
- var Kh = function(e2, t2, n2, r2, i2) {
4086
+ var Vh = function(e2, t2, n2, r2, i2) {
4109
4087
  if (!i2 && (i2 = { l: 1 }, t2.dictionary)) {
4110
- var a2 = t2.dictionary.subarray(-32768), o2 = new rh(a2.length + e2.length);
4088
+ var a2 = t2.dictionary.subarray(-32768), o2 = new Qm(a2.length + e2.length);
4111
4089
  o2.set(a2), o2.set(e2, a2.length), e2 = o2, i2.w = a2.length;
4112
4090
  }
4113
- return Uh(e2, t2.level == null ? 6 : t2.level, t2.mem == null ? i2.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e2.length))) * 1.5) : 20 : 12 + t2.mem, n2, r2, i2);
4091
+ return Rh(e2, t2.level == null ? 6 : t2.level, t2.mem == null ? i2.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e2.length))) * 1.5) : 20 : 12 + t2.mem, n2, r2, i2);
4114
4092
  };
4115
- var qh = function(e2, t2, n2) {
4093
+ var Hh = function(e2, t2, n2) {
4116
4094
  for (; n2; ++t2) e2[t2] = n2, n2 >>>= 8;
4117
4095
  };
4118
- var Jh = function(e2, t2) {
4096
+ var Uh = function(e2, t2) {
4119
4097
  var n2 = t2.filename;
4120
- if (e2[0] = 31, e2[1] = 139, e2[2] = 8, e2[8] = t2.level < 2 ? 4 : t2.level == 9 ? 2 : 0, e2[9] = 3, t2.mtime != 0 && qh(e2, 4, Math.floor(new Date(t2.mtime || Date.now()) / 1e3)), n2) {
4098
+ if (e2[0] = 31, e2[1] = 139, e2[2] = 8, e2[8] = t2.level < 2 ? 4 : t2.level == 9 ? 2 : 0, e2[9] = 3, t2.mtime != 0 && Hh(e2, 4, Math.floor(new Date(t2.mtime || Date.now()) / 1e3)), n2) {
4121
4099
  e2[3] = 8;
4122
4100
  for (var r2 = 0; r2 <= n2.length; ++r2) e2[r2 + 10] = n2.charCodeAt(r2);
4123
4101
  }
4124
4102
  };
4125
- var Yh = function(e2) {
4126
- (e2[0] != 31 || e2[1] != 139 || e2[2] != 8) && jh(6, `invalid gzip data`);
4103
+ var Wh = function(e2) {
4104
+ (e2[0] != 31 || e2[1] != 139 || e2[2] != 8) && Eh(6, `invalid gzip data`);
4127
4105
  var t2 = e2[3], n2 = 10;
4128
4106
  t2 & 4 && (n2 += (e2[10] | e2[11] << 8) + 2);
4129
4107
  for (var r2 = (t2 >> 3 & 1) + (t2 >> 4 & 1); r2 > 0; r2 -= !e2[n2++]) ;
4130
4108
  return n2 + (t2 & 2);
4131
4109
  };
4132
- var Xh = function(e2) {
4110
+ var Gh = function(e2) {
4133
4111
  var t2 = e2.length;
4134
4112
  return (e2[t2 - 4] | e2[t2 - 3] << 8 | e2[t2 - 2] << 16 | e2[t2 - 1] << 24) >>> 0;
4135
4113
  };
4136
- var Zh = function(e2) {
4114
+ var Kh = function(e2) {
4137
4115
  return 10 + (e2.filename ? e2.filename.length + 1 : 0);
4138
4116
  };
4139
- function Qh(e2, t2) {
4117
+ function qh(e2, t2) {
4140
4118
  t2 ||= {};
4141
- var n2 = Gh(), r2 = e2.length;
4119
+ var n2 = Bh(), r2 = e2.length;
4142
4120
  n2.p(e2);
4143
- var i2 = Kh(e2, t2, Zh(t2), 8), a2 = i2.length;
4144
- return Jh(i2, t2), qh(i2, a2 - 8, n2.d()), qh(i2, a2 - 4, r2), i2;
4121
+ var i2 = Vh(e2, t2, Kh(t2), 8), a2 = i2.length;
4122
+ return Uh(i2, t2), Hh(i2, a2 - 8, n2.d()), Hh(i2, a2 - 4, r2), i2;
4145
4123
  }
4146
- function $h(e2, t2) {
4147
- var n2 = Yh(e2);
4148
- return n2 + 8 > e2.length && jh(6, `invalid gzip data`), Mh(e2.subarray(n2, -8), { i: 2 }, t2 && t2.out || new rh(Xh(e2)), t2 && t2.dictionary);
4124
+ function Jh(e2, t2) {
4125
+ var n2 = Wh(e2);
4126
+ return n2 + 8 > e2.length && Eh(6, `invalid gzip data`), Dh(e2.subarray(n2, -8), { i: 2 }, t2 && t2.out || new Qm(Gh(e2)), t2 && t2.dictionary);
4149
4127
  }
4150
- var eg = typeof TextDecoder < `u` && new TextDecoder();
4128
+ var Yh = typeof TextDecoder < `u` && new TextDecoder();
4151
4129
  try {
4152
- eg.decode(Hh, { stream: true });
4130
+ Yh.decode(Lh, { stream: true });
4153
4131
  } catch {
4154
4132
  }
4155
- var tg = /* @__PURE__ */ new Set([`APPOINTMENT`, `CLASS`, `COURSE`]);
4156
- var ng = new Set(ym);
4157
- function rg(e2) {
4133
+ var Xh = /* @__PURE__ */ new Set([`APPOINTMENT`, `CLASS`, `COURSE`]);
4134
+ var Zh = new Set(mm);
4135
+ function Qh(e2) {
4158
4136
  let t2 = {};
4159
4137
  for (let [n2, r2] of Object.entries(e2)) r2 != null && (Array.isArray(r2) && r2.length === 0 || (t2[n2] = r2));
4160
4138
  return t2;
4161
4139
  }
4162
- function ig(e2) {
4163
- return rg({ t: e2.type, d: e2.ids, n: e2.anyResource });
4140
+ function $h(e2) {
4141
+ return Qh({ t: e2.type, d: e2.ids, n: e2.anyResource });
4164
4142
  }
4165
- function ag(e2) {
4166
- return rg({ p: e2.numberOfParticipants, h: e2.choices });
4143
+ function eg(e2) {
4144
+ return Qh({ p: e2.numberOfParticipants, h: e2.choices });
4167
4145
  }
4168
- function og(e2) {
4169
- return rg({ i: e2.id, q: e2.quantity });
4146
+ function tg(e2) {
4147
+ return Qh({ i: e2.id, q: e2.quantity });
4170
4148
  }
4171
- function sg(e2) {
4172
- return rg({ i: e2.serviceId, g: e2.slug, y: e2.serviceType, t0: e2.slotStart, t1: e2.slotEnd, e: e2.eventId, c: e2.scheduleId, k: e2.sessionId, l: e2.locationId, lt: e2.locationType, r: e2.resources?.map(ig), x: e2.selectedVariants?.map(ag), a: e2.addOns?.map(og), dc: e2.durationChoiceId, dm: e2.durationInMinutes, rg: e2.requestedGender });
4149
+ function ng(e2) {
4150
+ return Qh({ i: e2.serviceId, g: e2.slug, y: e2.serviceType, t0: e2.slotStart, t1: e2.slotEnd, e: e2.eventId, c: e2.scheduleId, k: e2.sessionId, l: e2.locationId, lt: e2.locationType, r: e2.resources?.map($h), x: e2.selectedVariants?.map(eg), a: e2.addOns?.map(tg), dc: e2.durationChoiceId, dm: e2.durationInMinutes, rg: e2.requestedGender });
4173
4151
  }
4174
- function cg(e2) {
4175
- let t2 = rg({ m: e2.mode, z: e2.timezone, cp: e2.wantsPromoCode || void 0 });
4176
- return t2.s = e2.services.map(sg), t2;
4152
+ function rg(e2) {
4153
+ let t2 = Qh({ m: e2.mode, z: e2.timezone, cp: e2.wantsPromoCode || void 0 });
4154
+ return t2.s = e2.services.map(ng), t2;
4177
4155
  }
4178
- function lg(e2) {
4156
+ function ig(e2) {
4179
4157
  return typeof e2 == `string` ? e2 : void 0;
4180
4158
  }
4181
- function ug(e2) {
4159
+ function ag(e2) {
4182
4160
  return typeof e2 == `number` && Number.isFinite(e2) ? e2 : void 0;
4183
4161
  }
4184
- function dg(e2) {
4162
+ function og(e2) {
4185
4163
  return typeof e2 == `boolean` ? e2 : void 0;
4186
4164
  }
4187
- function fg(e2) {
4165
+ function sg(e2) {
4188
4166
  if (Array.isArray(e2)) return e2.filter((e3) => typeof e3 == `string`);
4189
4167
  }
4190
- function pg(e2) {
4168
+ function cg(e2) {
4191
4169
  return typeof e2 == `object` && !!e2;
4192
4170
  }
4193
- function mg(e2) {
4194
- if (!pg(e2)) return null;
4195
- let t2 = lg(e2.t);
4171
+ function lg(e2) {
4172
+ if (!cg(e2)) return null;
4173
+ let t2 = ig(e2.t);
4196
4174
  if (t2 === void 0) return null;
4197
- let n2 = { type: t2, ids: fg(e2.d) ?? [] }, r2 = dg(e2.n);
4175
+ let n2 = { type: t2, ids: sg(e2.d) ?? [] }, r2 = og(e2.n);
4198
4176
  return r2 !== void 0 && (n2.anyResource = r2), n2;
4199
4177
  }
4200
- function hg(e2) {
4201
- if (!pg(e2)) return null;
4202
- let t2 = ug(e2.p), n2 = fg(e2.h);
4178
+ function ug(e2) {
4179
+ if (!cg(e2)) return null;
4180
+ let t2 = ag(e2.p), n2 = sg(e2.h);
4203
4181
  if (t2 === void 0 && n2 === void 0) return null;
4204
4182
  let r2 = {};
4205
4183
  return t2 !== void 0 && (r2.numberOfParticipants = t2), n2 !== void 0 && (r2.choices = n2), r2;
4206
4184
  }
4207
- function gg(e2) {
4208
- if (!pg(e2)) return null;
4209
- let t2 = lg(e2.i), n2 = ug(e2.q);
4185
+ function dg(e2) {
4186
+ if (!cg(e2)) return null;
4187
+ let t2 = ig(e2.i), n2 = ag(e2.q);
4210
4188
  return t2 === void 0 || n2 === void 0 ? null : { id: t2, quantity: n2 };
4211
4189
  }
4212
- function _g(e2, t2) {
4190
+ function fg(e2, t2) {
4213
4191
  if (!Array.isArray(e2)) return;
4214
4192
  let n2 = e2.map(t2).filter((e3) => e3 !== null);
4215
4193
  return n2.length ? n2 : void 0;
4216
4194
  }
4217
- function vg(e2) {
4218
- if (!pg(e2)) return null;
4219
- let t2 = lg(e2.i);
4195
+ function pg(e2) {
4196
+ if (!cg(e2)) return null;
4197
+ let t2 = ig(e2.i);
4220
4198
  if (t2 === void 0) return null;
4221
- let n2 = { serviceId: t2 }, r2 = lg(e2.g);
4199
+ let n2 = { serviceId: t2 }, r2 = ig(e2.g);
4222
4200
  r2 !== void 0 && (n2.slug = r2);
4223
4201
  let i2 = function(e3) {
4224
- let t3 = lg(e3);
4225
- if (t3 !== void 0 && tg.has(t3)) return t3;
4202
+ let t3 = ig(e3);
4203
+ if (t3 !== void 0 && Xh.has(t3)) return t3;
4226
4204
  }(e2.y);
4227
4205
  i2 !== void 0 && (n2.serviceType = i2);
4228
- let a2 = lg(e2.t0);
4206
+ let a2 = ig(e2.t0);
4229
4207
  a2 !== void 0 && (n2.slotStart = a2);
4230
- let o2 = lg(e2.t1);
4208
+ let o2 = ig(e2.t1);
4231
4209
  o2 !== void 0 && (n2.slotEnd = o2);
4232
- let s2 = lg(e2.e);
4210
+ let s2 = ig(e2.e);
4233
4211
  s2 !== void 0 && (n2.eventId = s2);
4234
- let c2 = lg(e2.c);
4212
+ let c2 = ig(e2.c);
4235
4213
  c2 !== void 0 && (n2.scheduleId = c2);
4236
- let l2 = lg(e2.k);
4214
+ let l2 = ig(e2.k);
4237
4215
  l2 !== void 0 && (n2.sessionId = l2);
4238
- let u2 = lg(e2.l);
4216
+ let u2 = ig(e2.l);
4239
4217
  u2 !== void 0 && (n2.locationId = u2);
4240
- let d2 = lg(e2.lt);
4218
+ let d2 = ig(e2.lt);
4241
4219
  d2 !== `BUSINESS` && d2 !== `CUSTOM` && d2 !== `CUSTOMER` || (n2.locationType = d2);
4242
- let f2 = _g(e2.r, mg);
4220
+ let f2 = fg(e2.r, lg);
4243
4221
  f2 && (n2.resources = f2);
4244
- let p2 = _g(e2.x, hg);
4222
+ let p2 = fg(e2.x, ug);
4245
4223
  p2 && (n2.selectedVariants = p2);
4246
- let m2 = _g(e2.a, gg);
4224
+ let m2 = fg(e2.a, dg);
4247
4225
  m2 && (n2.addOns = m2);
4248
- let h2 = lg(e2.dc);
4226
+ let h2 = ig(e2.dc);
4249
4227
  h2 && (n2.durationChoiceId = h2);
4250
- let g2 = ug(e2.dm);
4228
+ let g2 = ag(e2.dm);
4251
4229
  g2 !== void 0 && Number.isInteger(g2) && g2 > 0 && (n2.durationInMinutes = g2);
4252
- let _2 = lg(e2.rg);
4253
- return _2 !== void 0 && ng.has(_2) && (n2.requestedGender = _2), n2;
4230
+ let _2 = ig(e2.rg);
4231
+ return _2 !== void 0 && Zh.has(_2) && (n2.requestedGender = _2), n2;
4254
4232
  }
4255
- function yg(e2) {
4256
- if (!pg(e2)) return null;
4257
- let t2 = lg(e2.m);
4233
+ function mg(e2) {
4234
+ if (!cg(e2)) return null;
4235
+ let t2 = ig(e2.m);
4258
4236
  if (t2 !== `single` && t2 !== `multi` || !Array.isArray(e2.s)) return null;
4259
- let n2 = { mode: t2, services: e2.s.map(vg).filter((e3) => e3 !== null) }, r2 = lg(e2.z);
4260
- return r2 !== void 0 && (n2.timezone = r2), true === dg(e2.cp) && (n2.wantsPromoCode = true), n2;
4237
+ let n2 = { mode: t2, services: e2.s.map(pg).filter((e3) => e3 !== null) }, r2 = ig(e2.z);
4238
+ return r2 !== void 0 && (n2.timezone = r2), true === og(e2.cp) && (n2.wantsPromoCode = true), n2;
4261
4239
  }
4262
- var bg = new TextEncoder();
4263
- var xg = new TextDecoder();
4264
- function Sg(e2) {
4265
- let t2 = bg.encode(JSON.stringify(cg(e2))), n2 = `1` + nh.fromUint8Array(t2, true), r2 = `2` + nh.fromUint8Array(Qh(t2, { mtime: 0 }), true);
4240
+ var hg = new TextEncoder();
4241
+ var gg = new TextDecoder();
4242
+ function _g(e2) {
4243
+ let t2 = hg.encode(JSON.stringify(rg(e2))), n2 = `1` + Zm.fromUint8Array(t2, true), r2 = `2` + Zm.fromUint8Array(qh(t2, { mtime: 0 }), true);
4266
4244
  return r2.length < n2.length ? r2 : n2;
4267
4245
  }
4268
- function Cg(e2) {
4246
+ function vg(e2) {
4269
4247
  if (!e2 || e2.length < 2) return null;
4270
4248
  try {
4271
- let t2 = e2[0], n2 = nh.toUint8Array(e2.slice(1)), r2;
4249
+ let t2 = e2[0], n2 = Zm.toUint8Array(e2.slice(1)), r2;
4272
4250
  if (t2 === `1`) r2 = n2;
4273
4251
  else {
4274
4252
  if (t2 !== `2`) return null;
4275
- r2 = $h(n2);
4253
+ r2 = Jh(n2);
4276
4254
  }
4277
- return yg(JSON.parse(xg.decode(r2)));
4255
+ return mg(JSON.parse(gg.decode(r2)));
4278
4256
  } catch {
4279
4257
  return null;
4280
4258
  }
4281
4259
  }
4282
- function wg(e2) {
4260
+ function yg(e2) {
4283
4261
  return (e2?.services.length ?? 0) > 1;
4284
4262
  }
4285
- var Tg = `staff`;
4286
- function Eg(e2, t2) {
4287
- let n2 = Cg(t2.currentUrl.searchParams.get(Y.blob)), r2;
4288
- return t2.policy === `handoff` ? (r2 = Ag(t2.entries), n2?.timezone && (r2 = { ...r2, timezone: n2.timezone })) : r2 = t2.policy === `inPlace` ? t2.entries.reduce((e3, t3) => kg(e3, t3), n2 ?? Dg()) : jg(n2, Ag(t2.entries)), t2.timezone && (r2 = { ...r2, timezone: t2.timezone }), Mg(e2, r2);
4263
+ var bg = `staff`;
4264
+ function xg(e2, t2) {
4265
+ let n2 = vg(t2.currentUrl.searchParams.get(Y.blob)), r2;
4266
+ return t2.policy === `handoff` ? (r2 = Tg(t2.entries), n2?.timezone && (r2 = { ...r2, timezone: n2.timezone })) : r2 = t2.policy === `inPlace` ? t2.entries.reduce((e3, t3) => wg(e3, t3), n2 ?? Sg()) : Eg(n2, Tg(t2.entries)), t2.timezone && (r2 = { ...r2, timezone: t2.timezone }), Dg(e2, r2);
4289
4267
  }
4290
- function Dg() {
4268
+ function Sg() {
4291
4269
  return { mode: `single`, services: [] };
4292
4270
  }
4293
- function Og(e2) {
4271
+ function Cg(e2) {
4294
4272
  return { serviceId: e2 };
4295
4273
  }
4296
- function kg(e2, t2) {
4274
+ function wg(e2, t2) {
4297
4275
  let n2 = e2.services.findIndex((e3) => e3.serviceId === t2.serviceId), r2 = n2 === -1 ? [...e2.services, t2] : e2.services.map((e3, r3) => r3 === n2 ? t2 : e3);
4298
4276
  return { ...e2, services: r2 };
4299
4277
  }
4300
- function Ag(e2) {
4301
- return { ...Dg(), services: [...e2] };
4278
+ function Tg(e2) {
4279
+ return { ...Sg(), services: [...e2] };
4302
4280
  }
4303
- function jg(e2, t2) {
4281
+ function Eg(e2, t2) {
4304
4282
  if (!e2) return t2;
4305
4283
  let n2 = /* @__PURE__ */ new Map();
4306
4284
  for (let e3 of t2.services) n2.set(e3.serviceId, (n2.get(e3.serviceId) ?? 0) + 1);
@@ -4310,171 +4288,174 @@ function jg(e2, t2) {
4310
4288
  });
4311
4289
  return { ...e2, ...t2, services: [...t2.services, ...r2] };
4312
4290
  }
4313
- function Mg(e2, t2) {
4314
- let n2 = new URL(e2, `https://blob.invalid`), r2 = wg(t2) ? `multi` : `single`;
4315
- return n2.searchParams.set(Y.blob, Sg({ ...t2, mode: r2 })), `${n2.pathname}${n2.search}${n2.hash}`;
4291
+ function Dg(e2, t2) {
4292
+ let n2 = new URL(e2, `https://blob.invalid`), r2 = yg(t2) ? `multi` : `single`;
4293
+ return n2.searchParams.set(Y.blob, _g({ ...t2, mode: r2 })), `${n2.pathname}${n2.search}${n2.hash}`;
4316
4294
  }
4317
- var Ng = /* @__PURE__ */ new Set([`serviceId`, `slug`, `serviceType`, `scheduleId`]);
4318
- function Pg(e2) {
4295
+ var Og = /* @__PURE__ */ new Set([`serviceId`, `slug`, `serviceType`, `scheduleId`]);
4296
+ function kg(e2) {
4319
4297
  return Object.keys(e2).some((t2) => {
4320
- if (Ng.has(t2)) return false;
4321
- if (t2 === `resources`) return (e2.resources ?? []).some((t3) => t3.type === `staff` ? Rg(e2) !== null : t3.ids.length > 0 || !!t3.anyResource);
4298
+ if (Og.has(t2)) return false;
4299
+ if (t2 === `resources`) return (e2.resources ?? []).some((t3) => t3.type === `staff` ? Ng(e2) !== null : t3.ids.length > 0 || !!t3.anyResource);
4322
4300
  let n2 = e2[t2];
4323
4301
  return Array.isArray(n2) ? n2.length > 0 : n2 !== void 0;
4324
4302
  });
4325
4303
  }
4326
- function Fg(e2, t2) {
4304
+ function Ag(e2, t2) {
4327
4305
  let { wantsPromoCode: n2, ...r2 } = e2;
4328
4306
  return t2 ? { ...r2, wantsPromoCode: true } : r2;
4329
4307
  }
4330
- function Ig(e2, t2) {
4331
- let n2 = Cg(t2.searchParams.get(Y.blob));
4332
- return n2 ? Mg(e2, n2) : e2;
4308
+ function jg(e2, t2) {
4309
+ let n2 = vg(t2.searchParams.get(Y.blob));
4310
+ return n2 ? Dg(e2, n2) : e2;
4333
4311
  }
4334
- function Lg(e2, t2) {
4312
+ function Mg(e2, t2) {
4335
4313
  let n2 = { ...e2 };
4336
4314
  return t2.serviceType && (n2.serviceType = t2.serviceType), t2.scheduleId && (n2.scheduleId = t2.scheduleId), n2;
4337
4315
  }
4338
- function Rg(e2) {
4339
- let t2 = e2.resources?.find((e3) => e3.type === Tg);
4316
+ function Ng(e2) {
4317
+ let t2 = e2.resources?.find((e3) => e3.type === bg);
4340
4318
  if (!t2) return null;
4341
4319
  let n2 = t2.ids[0];
4342
4320
  return n2 ? { anyResource: false, staffMemberId: n2 } : t2.anyResource ? { anyResource: true } : null;
4343
4321
  }
4344
- function zg(e2, t2) {
4345
- let n2 = (e2.resources ?? []).filter((e3) => e3.type !== Tg);
4322
+ function Pg(e2, t2) {
4323
+ let n2 = (e2.resources ?? []).filter((e3) => e3.type !== bg);
4346
4324
  if (t2) {
4347
4325
  let { requestedGender: r2, ...i2 } = e2;
4348
- return { ...i2, resources: [...n2, { type: Tg, ids: [t2] }] };
4326
+ return { ...i2, resources: [...n2, { type: bg, ids: [t2] }] };
4349
4327
  }
4350
- return { ...e2, resources: [...n2, { type: Tg, ids: [], anyResource: true }] };
4328
+ return { ...e2, resources: [...n2, { type: bg, ids: [], anyResource: true }] };
4351
4329
  }
4352
- function Bg(e2, t2) {
4353
- let n2 = zg(e2, null);
4330
+ function Fg(e2, t2) {
4331
+ let n2 = Pg(e2, null);
4354
4332
  return t2 ? n2.requestedGender = t2 : delete n2.requestedGender, n2;
4355
4333
  }
4356
- function Vg(e2) {
4357
- let t2 = (e2.resources ?? []).filter((e3) => e3.type !== Tg), { requestedGender: n2, ...r2 } = e2;
4334
+ function Ig(e2) {
4335
+ let t2 = (e2.resources ?? []).filter((e3) => e3.type !== bg), { requestedGender: n2, ...r2 } = e2;
4358
4336
  return t2.length ? r2.resources = t2 : delete r2.resources, r2;
4359
4337
  }
4360
- function Hg(e2) {
4338
+ function Lg(e2) {
4361
4339
  return e2.selectedVariants?.[0]?.choices ?? [];
4362
4340
  }
4363
- function Ug(e2, t2) {
4341
+ function Rg(e2, t2) {
4364
4342
  let n2 = { ...e2 };
4365
4343
  return delete n2.durationChoiceId, t2.length ? n2.selectedVariants = [{ choices: t2 }] : delete n2.selectedVariants, n2;
4366
4344
  }
4367
- function Wg(e2, t2) {
4345
+ function zg(e2, t2) {
4368
4346
  let n2 = e2.selectedVariants?.find((e3) => e3.choices?.[0] === t2);
4369
4347
  return n2 ? n2.numberOfParticipants ?? 1 : 0;
4370
4348
  }
4371
- function Gg(e2) {
4349
+ function Bg(e2) {
4372
4350
  return (e2.selectedVariants ?? []).reduce((e3, t2) => e3 + (t2.numberOfParticipants ?? 1), 0);
4373
4351
  }
4374
- function Kg(e2, t2, n2) {
4375
- let r2 = e2.selectedVariants ?? [], i2 = r2.filter((e3) => e3.choices?.[0] !== t2), a2 = i2.length !== r2.length, o2 = n2 <= 0 ? i2 : a2 ? r2.map((e3) => e3.choices?.[0] === t2 ? { ...e3, numberOfParticipants: n2 } : e3) : [...r2, { choices: [t2], numberOfParticipants: n2 }], s2 = Ug(e2, []);
4352
+ function Vg(e2, t2, n2) {
4353
+ let r2 = e2.selectedVariants ?? [], i2 = r2.filter((e3) => e3.choices?.[0] !== t2), a2 = i2.length !== r2.length, o2 = n2 <= 0 ? i2 : a2 ? r2.map((e3) => e3.choices?.[0] === t2 ? { ...e3, numberOfParticipants: n2 } : e3) : [...r2, { choices: [t2], numberOfParticipants: n2 }], s2 = Rg(e2, []);
4376
4354
  return o2.length && (s2.selectedVariants = o2), s2;
4377
4355
  }
4378
- function qg(e2, t2) {
4356
+ function Hg(e2, t2) {
4379
4357
  let n2 = e2.selectedVariants ?? [], r2 = n2.filter((e3) => (e3.choices ?? []).every((e4) => t2.has(e4)));
4380
4358
  if (r2.length === n2.length) return e2;
4381
4359
  let i2 = { ...e2 };
4382
4360
  return r2.length ? i2.selectedVariants = r2 : delete i2.selectedVariants, i2;
4383
4361
  }
4384
- function Jg(e2) {
4362
+ function Ug(e2) {
4385
4363
  return e2.addOns ?? [];
4386
4364
  }
4387
- function Yg(e2, t2) {
4365
+ function Wg(e2, t2) {
4388
4366
  let n2 = { ...e2 };
4389
4367
  return t2.length ? n2.addOns = t2 : delete n2.addOns, n2;
4390
4368
  }
4391
- function Xg(e2, t2) {
4392
- let n2 = Jg(e2);
4393
- return Yg(e2, n2.some((e3) => e3.id === t2) ? n2.filter((e3) => e3.id !== t2) : [...n2, { id: t2, quantity: 1 }]);
4369
+ function Gg(e2, t2) {
4370
+ let n2 = Ug(e2);
4371
+ return Wg(e2, n2.some((e3) => e3.id === t2) ? n2.filter((e3) => e3.id !== t2) : [...n2, { id: t2, quantity: 1 }]);
4394
4372
  }
4395
- function Zg(e2, t2, n2) {
4396
- let r2 = Jg(e2);
4397
- return n2 <= 0 ? Yg(e2, r2.filter((e3) => e3.id !== t2)) : Yg(e2, r2.some((e3) => e3.id === t2) ? r2.map((e3) => e3.id === t2 ? { ...e3, quantity: n2 } : e3) : [...r2, { id: t2, quantity: n2 }]);
4373
+ function Kg(e2, t2, n2) {
4374
+ let r2 = Ug(e2);
4375
+ return n2 <= 0 ? Wg(e2, r2.filter((e3) => e3.id !== t2)) : Wg(e2, r2.some((e3) => e3.id === t2) ? r2.map((e3) => e3.id === t2 ? { ...e3, quantity: n2 } : e3) : [...r2, { id: t2, quantity: n2 }]);
4398
4376
  }
4399
- var Qg = [`slotStart`, `slotEnd`, `eventId`, `scheduleId`, `sessionId`, `locationId`];
4400
- function $g(e2) {
4377
+ var qg = [`slotStart`, `slotEnd`, `eventId`, `scheduleId`, `sessionId`, `locationId`];
4378
+ function Jg(e2) {
4401
4379
  return !!e2.slotStart && !!e2.slotEnd;
4402
4380
  }
4403
- function e_(e2, t2) {
4381
+ function Yg(e2, t2) {
4404
4382
  let n2 = { ...e2 };
4405
- for (let e3 of Qg) {
4383
+ for (let e3 of qg) {
4406
4384
  let r2 = t2[e3];
4407
4385
  r2 == null ? delete n2[e3] : n2[e3] = r2;
4408
4386
  }
4409
4387
  return t2.locationType == null ? delete n2.locationType : n2.locationType = t2.locationType, n2;
4410
4388
  }
4411
- function t_(e2) {
4389
+ function Xg(e2) {
4412
4390
  let t2 = { ...e2 };
4413
- for (let e3 of Qg) e3 !== `locationId` && delete t2[e3];
4391
+ for (let e3 of qg) e3 !== `locationId` && delete t2[e3];
4414
4392
  return t2;
4415
4393
  }
4416
- function n_(e2, t2, n2, r2 = false) {
4417
- return t2.length !== e2.services.length || t2.some((t3, n3) => t3.serviceId !== e2.services[n3].serviceId || !t3.localStartDate || !t3.localEndDate) ? null : { ...e2, ...n2 ? { timezone: n2 } : {}, services: e2.services.map((e3, n3) => e_(r2 ? r_(e3) : e3, { slotStart: t2[n3].localStartDate ?? void 0, slotEnd: t2[n3].localEndDate ?? void 0, scheduleId: t2[n3].scheduleId ?? void 0, locationId: e3.locationId, locationType: e3.locationType ?? `BUSINESS` })) };
4394
+ function Zg(e2, t2) {
4395
+ let n2 = Xg(e2);
4396
+ t2.locationId == null ? delete n2.locationId : n2.locationId = t2.locationId, t2.locationType == null ? delete n2.locationType : n2.locationType = t2.locationType, t2.requestedGender == null ? delete n2.requestedGender : n2.requestedGender = t2.requestedGender;
4397
+ let r2 = [...(e2.resources ?? []).filter((e3) => e3.type !== bg), ...(t2.resources ?? []).filter((e3) => e3.type === bg)];
4398
+ return r2.length ? n2.resources = r2 : delete n2.resources, n2;
4399
+ }
4400
+ function Qg(e2, t2, n2, r2 = false) {
4401
+ return t2.length !== e2.services.length || t2.some((t3, n3) => t3.serviceId !== e2.services[n3].serviceId || !t3.localStartDate || !t3.localEndDate) ? null : { ...e2, ...n2 ? { timezone: n2 } : {}, services: e2.services.map((e3, n3) => Yg(r2 ? $g(e3) : e3, { slotStart: t2[n3].localStartDate ?? void 0, slotEnd: t2[n3].localEndDate ?? void 0, scheduleId: t2[n3].scheduleId ?? void 0, locationId: e3.locationId, locationType: e3.locationType ?? `BUSINESS` })) };
4418
4402
  }
4419
- function r_(e2) {
4403
+ function $g(e2) {
4420
4404
  let { requestedGender: t2, ...n2 } = e2;
4421
4405
  return n2;
4422
4406
  }
4423
- function i_(e2) {
4424
- return { ...e2, services: e2.services.map(t_) };
4407
+ function e_(e2) {
4408
+ return { ...e2, services: e2.services.map(Xg) };
4425
4409
  }
4426
- function a_(e2, t2) {
4427
- return Od(e2) ? t2 ?? void 0 : im(e2) ? void 0 : null;
4410
+ function t_(e2, t2) {
4411
+ return Od(e2) ? t2 ?? void 0 : rm(e2) ? void 0 : null;
4428
4412
  }
4429
- function o_(e2) {
4430
- return { serviceId: e2.serviceId, staff: c_(e2), variantChoiceId: Hg(e2)[0], addOns: Jg(e2).map((e3) => ({ addOnId: e3.id, quantity: e3.quantity ?? 1 })) };
4413
+ function n_(e2) {
4414
+ return { serviceId: e2.serviceId, staff: i_(e2), variantChoiceId: Lg(e2)[0], addOns: Ug(e2).map((e3) => ({ addOnId: e3.id, quantity: e3.quantity ?? 1 })) };
4431
4415
  }
4432
- function s_({ service: e2, pricingOption: t2, selection: n2, multiServiceAppointmentsEnabled: r2, basketSelections: i2 }) {
4433
- return { serviceId: e2?._id ?? void 0, service: e2 ?? void 0, variants: e2 ? a_(e2, t2) : void 0, staff: c_(n2), locationId: n2.locationId ?? void 0, variantChoiceId: Hg(n2)[0], addOns: Jg(n2).map((e3) => ({ addOnId: e3.id, quantity: e3.quantity ?? 1 })), multiServiceAppointmentsEnabled: r2, ...i2?.length ? { basket: i2.map(o_) } : {} };
4416
+ function r_({ service: e2, pricingOption: t2, selection: n2, multiServiceAppointmentsEnabled: r2, basketSelections: i2 }) {
4417
+ return { serviceId: e2?._id ?? void 0, service: e2 ?? void 0, variants: e2 ? t_(e2, t2) : void 0, staff: i_(n2), locationId: n2.locationId ?? void 0, variantChoiceId: Lg(n2)[0], addOns: Ug(n2).map((e3) => ({ addOnId: e3.id, quantity: e3.quantity ?? 1 })), multiServiceAppointmentsEnabled: r2, ...i2?.length ? { basket: i2.map(n_) } : {} };
4434
4418
  }
4435
- function c_(e2) {
4436
- let t2 = Rg(e2);
4419
+ function i_(e2) {
4420
+ let t2 = Ng(e2);
4437
4421
  if (t2) return t2.anyResource && e2.requestedGender ? { ...t2, requestedGender: e2.requestedGender } : t2;
4438
4422
  }
4439
- function l_(e2) {
4440
- return e2;
4441
- }
4442
- var u_ = l_(`@wix/site-service-locale`);
4443
- var d_ = Kd(`@wix/viewer-service-environment`);
4444
- var f_ = `en`;
4445
- function p_() {
4446
- let e2 = pm();
4447
- if (!e2) return f_;
4423
+ var a_ = _a(`@wix/site-service-locale`);
4424
+ var o_ = Gd(`@wix/viewer-service-multilingual`);
4425
+ var s_ = `en`;
4426
+ function c_() {
4427
+ let e2 = cm();
4428
+ if (!e2) return s_;
4429
+ let t2;
4448
4430
  try {
4449
- return e2(u_).locale;
4431
+ t2 = e2(a_);
4450
4432
  } catch {
4451
- try {
4452
- return e2(d_).language;
4453
- } catch {
4454
- return f_;
4455
- }
4433
+ return s_;
4456
4434
  }
4435
+ let n2;
4436
+ try {
4437
+ n2 = e2(o_);
4438
+ } catch {
4439
+ }
4440
+ return n2?.multilingualEnabled && n2.currentLocale?.regionalFormat || t2.locale || t2.language || s_;
4457
4441
  }
4458
- function m_(e2) {
4459
- return e2;
4460
- }
4461
- var h_ = m_(`@wix/site-service-warmup-data`);
4462
- function g_() {
4442
+ var l_ = _a(`@wix/site-service-warmup-data`);
4443
+ function u_() {
4463
4444
  try {
4464
4445
  return (0, import_services_manager_react.useGetService)();
4465
4446
  } catch {
4466
4447
  return null;
4467
4448
  }
4468
4449
  }
4469
- function __(e2) {
4450
+ function d_(e2) {
4470
4451
  try {
4471
- return e2 ? e2(h_) : null;
4452
+ return e2 ? e2(l_) : null;
4472
4453
  } catch {
4473
4454
  return null;
4474
4455
  }
4475
4456
  }
4476
- function v_() {
4477
- let e2 = __(g_()), t2 = typeof window > `u`;
4457
+ function f_() {
4458
+ let e2 = d_(u_()), t2 = typeof window > `u`;
4478
4459
  return { scope: e2 ?? void 0, get: async (n2) => {
4479
4460
  if (t2 || !e2) return null;
4480
4461
  try {
@@ -4489,72 +4470,72 @@ function v_() {
4489
4470
  }
4490
4471
  } };
4491
4472
  }
4492
- function y_() {
4473
+ function p_() {
4493
4474
  let [e2, t2] = (0, import_react.useState)(void 0);
4494
4475
  return (0, import_react.useEffect)(() => {
4495
4476
  (0, import_react.startTransition)(() => t2(Date.now()));
4496
4477
  }, []), e2;
4497
4478
  }
4498
- var b_ = `bookings-uou`;
4499
- function x_(e2, t2) {
4500
- return `${b_}:service:${e2}:${t2}`;
4479
+ var m_ = `bookings-uou`;
4480
+ function h_(e2, t2) {
4481
+ return `${m_}:service:${e2}:${t2}`;
4501
4482
  }
4502
- function S_(e2) {
4503
- return `${b_}:multi-service-appointment:${encodeURIComponent(JSON.stringify(e2))}`;
4483
+ function g_(e2) {
4484
+ return `${m_}:multi-service-appointment:${encodeURIComponent(JSON.stringify(e2))}`;
4504
4485
  }
4505
- function C_(e2, t2) {
4506
- return `${b_}:service-variants:${e2}:refresh-${t2}`;
4486
+ function __(e2, t2) {
4487
+ return `${m_}:service-variants:${e2}:refresh-${t2}`;
4507
4488
  }
4508
- function w_(e2, t2) {
4509
- return `${b_}:services-variants:ids-${encodeURIComponent(JSON.stringify([...e2].sort()))}:refresh-${t2}`;
4489
+ function v_(e2, t2) {
4490
+ return `${m_}:services-variants:ids-${encodeURIComponent(JSON.stringify([...e2].sort()))}:refresh-${t2}`;
4510
4491
  }
4511
- function T_() {
4512
- return `${b_}:bookings-settings`;
4492
+ function y_() {
4493
+ return `${m_}:bookings-settings`;
4513
4494
  }
4514
- var E_ = 5e3;
4515
- var D_ = 100;
4516
- var O_ = `wix-warmup-data`;
4517
- var k_ = null;
4518
- function A_(e2) {
4495
+ var b_ = 5e3;
4496
+ var x_ = 100;
4497
+ var S_ = `wix-warmup-data`;
4498
+ var C_ = null;
4499
+ function w_(e2) {
4519
4500
  if (typeof document < `u`) try {
4520
- let t2 = document.getElementById(O_)?.textContent;
4521
- return t2 ? (k_?.text !== t2 && (k_ = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), k_.data[e2] ?? void 0) : void 0;
4501
+ let t2 = document.getElementById(S_)?.textContent;
4502
+ return t2 ? (C_?.text !== t2 && (C_ = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), C_.data[e2] ?? void 0) : void 0;
4522
4503
  } catch {
4523
4504
  return;
4524
4505
  }
4525
4506
  }
4526
- var j_ = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
4527
- var M_ = j_();
4528
- var N_ = /* @__PURE__ */ new WeakMap();
4529
- var P_ = /* @__PURE__ */ new WeakMap();
4530
- function F_(e2) {
4531
- if (!e2) return M_;
4532
- let t2 = N_.get(e2);
4533
- return t2 || (t2 = j_(), N_.set(e2, t2)), t2;
4507
+ var T_ = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
4508
+ var E_ = T_();
4509
+ var D_ = /* @__PURE__ */ new WeakMap();
4510
+ var O_ = /* @__PURE__ */ new WeakMap();
4511
+ function k_(e2) {
4512
+ if (!e2) return E_;
4513
+ let t2 = D_.get(e2);
4514
+ return t2 || (t2 = T_(), D_.set(e2, t2)), t2;
4534
4515
  }
4535
- function I_({ key: e2, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
4516
+ function A_({ key: e2, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
4536
4517
  if (e2 === null) return n2();
4537
4518
  if (typeof window > `u`) {
4538
4519
  let r3 = () => n2().then((n3) => (t2.set(e2, n3), n3)), { scope: i3 } = t2;
4539
4520
  if (!i3) return r3();
4540
- let a3 = P_.get(i3);
4541
- a3 || (a3 = /* @__PURE__ */ new Map(), P_.set(i3, a3));
4521
+ let a3 = O_.get(i3);
4522
+ a3 || (a3 = /* @__PURE__ */ new Map(), O_.set(i3, a3));
4542
4523
  let o3 = a3.get(e2);
4543
4524
  if (o3) return o3;
4544
4525
  let s3 = r3();
4545
4526
  return a3.set(e2, s3), s3.catch(() => a3.delete(e2)), s3;
4546
4527
  }
4547
- let i2 = F_(t2.scope), a2 = Date.now();
4528
+ let i2 = k_(t2.scope), a2 = Date.now();
4548
4529
  for (let [e3, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e3);
4549
4530
  let o2 = i2.promises.get(e2);
4550
4531
  if (o2 && !r2) return o2.promise;
4551
4532
  r2 && i2.invalidatedWarmup.add(e2);
4552
4533
  let s2 = !i2.invalidatedWarmup.has(e2);
4553
4534
  if (s2) {
4554
- let t3 = A_(e2);
4535
+ let t3 = w_(e2);
4555
4536
  if (t3 !== void 0) {
4556
4537
  let n3 = Aa(t3);
4557
- return i2.promises.set(e2, { promise: n3, expiresAt: a2 + E_ }), n3;
4538
+ return i2.promises.set(e2, { promise: n3, expiresAt: a2 + b_ }), n3;
4558
4539
  }
4559
4540
  }
4560
4541
  let c2 = (async () => {
@@ -4564,178 +4545,176 @@ function I_({ key: e2, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
4564
4545
  }
4565
4546
  return n2();
4566
4547
  })();
4567
- i2.promises.size >= D_ && i2.promises.delete(i2.promises.keys().next().value);
4548
+ i2.promises.size >= x_ && i2.promises.delete(i2.promises.keys().next().value);
4568
4549
  let l2 = { promise: c2, expiresAt: 1 / 0 };
4569
4550
  return i2.promises.set(e2, l2), c2.then(() => {
4570
- l2.expiresAt = Date.now() + E_;
4551
+ l2.expiresAt = Date.now() + b_;
4571
4552
  }, () => {
4572
4553
  i2.promises.get(e2) === l2 && i2.promises.delete(e2);
4573
4554
  }), c2;
4574
4555
  }
4575
- var L_ = Kd(`@wix/viewer-service-router`);
4576
- function R_(e2) {
4577
- return e2;
4578
- }
4579
- var z_ = R_(`@wix/site-service-renderer-configuration`);
4580
- var B_ = `{{(.*?)}}`;
4581
- var V_ = `[{{}}]`;
4582
- var H_ = `([^/]+)`;
4583
- var U_;
4556
+ var j_ = _a(`@wix/site-service-editor-context`);
4557
+ var M_ = _a(`@wix/site-service-router`);
4558
+ var N_ = _a(`@wix/site-service-renderer-configuration`);
4559
+ var P_ = `{{(.*?)}}`;
4560
+ var F_ = `[{{}}]`;
4561
+ var I_ = `([^/]+)`;
4562
+ var L_;
4584
4563
  (function(e2) {
4585
4564
  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`;
4586
- })(U_ ||= {});
4565
+ })(L_ ||= {});
4587
4566
  var $;
4588
4567
  (function(e2) {
4589
4568
  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`;
4590
4569
  })($ ||= {});
4570
+ var R_ = {};
4571
+ var z_ = (R_[$.PRODUCT_PAGE] = { variables: [`slug`], required: [`slug`] }, R_);
4572
+ var B_ = `{{main-mapping}}`;
4573
+ var V_ = {};
4574
+ var H_;
4575
+ var U_ = (V_[$.BLOG_POST] = { variables: [`slug`], required: [`slug`], subMappings: (H_ = {}, H_[$.BLOG_POST_EDIT] = { defaultMapping: `${B_}/edit` }, H_[$.BLOG_POST_PREVIEW] = { required: [`instance`], defaultMapping: `${B_}/preview/{{instance}}` }, H_) }, V_);
4591
4576
  var W_ = {};
4592
- var G_ = (W_[$.PRODUCT_PAGE] = { variables: [`slug`], required: [`slug`] }, W_);
4593
- var K_ = `{{main-mapping}}`;
4594
- var q_ = {};
4577
+ var G_ = (W_[$.BLOG_CATEGORY] = { variables: [`slug`], required: [`slug`], defaultPrefix: `categories` }, W_);
4578
+ var K_ = {};
4579
+ var q_;
4595
4580
  var J_;
4596
- var Y_ = (q_[$.BLOG_POST] = { variables: [`slug`], required: [`slug`], subMappings: (J_ = {}, J_[$.BLOG_POST_EDIT] = { defaultMapping: `${K_}/edit` }, J_[$.BLOG_POST_PREVIEW] = { required: [`instance`], defaultMapping: `${K_}/preview/{{instance}}` }, J_) }, q_);
4581
+ var Y_ = (K_[$.FORUM_POST] = { variables: [`categorySlug`, `postSlug`], required: [`categorySlug`, `postSlug`], subMappings: (q_ = {}, q_[$.FORUM_POST_EDIT] = { defaultMapping: `${B_}/edit` }, q_[$.FORUM_POST_PAGINATION] = { required: [`page`], defaultMapping: `${B_}/p-{{page}}` }, q_[$.FORUM_POST_DEEP_LINK_DATA] = { required: [`deepLinkData`], defaultMapping: `${B_}/dl-{{deepLinkData}}` }, q_[$.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA] = { required: [`page`, `deepLinkData`], defaultMapping: `${B_}/p-{{page}}/dl-{{deepLinkData}}` }, q_) }, K_[$.FORUM_CATEGORY] = { variables: [`slug`], required: [`slug`], subMappings: (J_ = {}, J_[$.FORUM_CATEGORY_CREATE_POST] = { defaultMapping: `${B_}/create-post` }, J_[$.FORUM_CATEGORY_CREATE_QUESTION] = { defaultMapping: `${B_}/create-question` }, J_[$.FORUM_CATEGORY_PAGINATION] = { required: [`page`], defaultMapping: `${B_}/p-{{page}}` }, J_) }, K_);
4597
4582
  var X_ = {};
4598
- var Z_ = (X_[$.BLOG_CATEGORY] = { variables: [`slug`], required: [`slug`], defaultPrefix: `categories` }, X_);
4583
+ var Z_ = (X_[$.GROUP] = { variables: [`groupId`, `tabName`], required: [`groupId`, `tabName`] }, X_[$.GROUP_POST] = { variables: [`groupId`, `tabName`, `postId`], required: [`groupId`, `tabName`, `postId`] }, X_);
4599
4584
  var Q_ = {};
4600
- var $_;
4601
- var ev;
4602
- var tv = (Q_[$.FORUM_POST] = { variables: [`categorySlug`, `postSlug`], required: [`categorySlug`, `postSlug`], subMappings: ($_ = {}, $_[$.FORUM_POST_EDIT] = { defaultMapping: `${K_}/edit` }, $_[$.FORUM_POST_PAGINATION] = { required: [`page`], defaultMapping: `${K_}/p-{{page}}` }, $_[$.FORUM_POST_DEEP_LINK_DATA] = { required: [`deepLinkData`], defaultMapping: `${K_}/dl-{{deepLinkData}}` }, $_[$.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA] = { required: [`page`, `deepLinkData`], defaultMapping: `${K_}/p-{{page}}/dl-{{deepLinkData}}` }, $_) }, Q_[$.FORUM_CATEGORY] = { variables: [`slug`], required: [`slug`], subMappings: (ev = {}, ev[$.FORUM_CATEGORY_CREATE_POST] = { defaultMapping: `${K_}/create-post` }, ev[$.FORUM_CATEGORY_CREATE_QUESTION] = { defaultMapping: `${K_}/create-question` }, ev[$.FORUM_CATEGORY_PAGINATION] = { required: [`page`], defaultMapping: `${K_}/p-{{page}}` }, ev) }, Q_);
4585
+ var $_ = (Q_[$.BOOKINGS_SERVICE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `service-page` }, Q_);
4586
+ var ev = {};
4587
+ var tv = (ev[$.CHALLENGES_PAGE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `challenge-page` }, ev);
4603
4588
  var nv = {};
4604
- var rv = (nv[$.GROUP] = { variables: [`groupId`, `tabName`], required: [`groupId`, `tabName`] }, nv[$.GROUP_POST] = { variables: [`groupId`, `tabName`, `postId`], required: [`groupId`, `tabName`, `postId`] }, nv);
4605
- var iv = {};
4606
- var av = (iv[$.BOOKINGS_SERVICE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `service-page` }, iv);
4607
- var ov = {};
4608
- var sv = (ov[$.CHALLENGES_PAGE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `challenge-page` }, ov);
4609
- var cv = {};
4610
- var lv = (cv[U_.product_page] = G_, cv[U_.post] = Y_, cv[U_.blog] = Z_, cv[U_.forum] = tv, cv[U_.group] = rv, cv[U_.bookings] = av, cv[U_.challenges] = sv, cv);
4611
- var uv = function(e2) {
4612
- return Object.values(dv()).some(function(t2) {
4589
+ var rv = (nv[L_.product_page] = z_, nv[L_.post] = U_, nv[L_.blog] = G_, nv[L_.forum] = Y_, nv[L_.group] = Z_, nv[L_.bookings] = $_, nv[L_.challenges] = tv, nv);
4590
+ var iv = function(e2) {
4591
+ return Object.values(av()).some(function(t2) {
4613
4592
  return !!t2?.subMappings?.[e2];
4614
4593
  });
4615
4594
  };
4616
- var dv = function() {
4617
- return Object.values(lv).reduce(function(e2, t2) {
4595
+ var av = function() {
4596
+ return Object.values(rv).reduce(function(e2, t2) {
4618
4597
  return aa(aa({}, e2), t2);
4619
4598
  }, {}) || {};
4620
4599
  };
4621
- var fv = function(e2) {
4622
- var t2 = dv()[e2];
4623
- return !t2 && uv(e2) && console.warn(`You cannot get variables schema for subMappings key (${e2}).`), t2;
4600
+ var ov = function(e2) {
4601
+ var t2 = av()[e2];
4602
+ return !t2 && iv(e2) && console.warn(`You cannot get variables schema for subMappings key (${e2}).`), t2;
4624
4603
  };
4625
- var pv = function(e2) {
4626
- return Object.entries(lv).filter(function(t2) {
4604
+ var sv = function(e2) {
4605
+ return Object.entries(rv).filter(function(t2) {
4627
4606
  var n2 = sa(t2, 2)[1];
4628
4607
  return Object.keys(n2).includes(e2);
4629
4608
  }).map(function(e3) {
4630
4609
  return sa(e3, 1)[0];
4631
4610
  })[0];
4632
4611
  };
4633
- var mv = function(e2) {
4634
- return Object.entries(dv()).find(function(t2) {
4612
+ var cv = function(e2) {
4613
+ return Object.entries(av()).find(function(t2) {
4635
4614
  var n2 = sa(t2, 2);
4636
4615
  return n2[0], !!n2[1]?.subMappings?.[e2];
4637
4616
  });
4638
4617
  };
4639
- var hv = function(e2) {
4618
+ var lv = function(e2) {
4640
4619
  var t2 = [];
4641
- if (uv(e2)) {
4642
- var n2 = sa(mv(e2), 2);
4620
+ if (iv(e2)) {
4621
+ var n2 = sa(cv(e2), 2);
4643
4622
  n2[0];
4644
4623
  var r2 = n2[1];
4645
4624
  t2.push.apply(t2, ca(ca([], sa(r2?.required || []), false), sa(r2?.subMappings?.[e2]?.required || []), false));
4646
- } else t2.push.apply(t2, ca([], sa(fv(e2)?.required || []), false));
4625
+ } else t2.push.apply(t2, ca([], sa(ov(e2)?.required || []), false));
4647
4626
  return t2;
4648
4627
  };
4649
- var gv = function(e2, t2) {
4628
+ var uv = function(e2, t2) {
4650
4629
  var n2;
4651
4630
  return t2 === void 0 && (t2 = ``), (n2 = e2?.main)?.find?.call(n2, function(e3) {
4652
4631
  return e3.key === t2;
4653
4632
  });
4654
4633
  };
4655
- var _v = function(e2, t2) {
4634
+ var dv = function(e2, t2) {
4656
4635
  return Error(`Url Mappings Error - [${e2}]: ${t2}`);
4657
4636
  };
4658
- var vv = Object.values($);
4659
- var yv = _v(`key`, `must be one of: ${vv.toString()}`);
4660
- var bv = function(e2) {
4661
- if (typeof e2 != `string` || !vv.includes(e2)) return yv;
4637
+ var fv = Object.values($);
4638
+ var pv = dv(`key`, `must be one of: ${fv.toString()}`);
4639
+ var mv = function(e2) {
4640
+ if (typeof e2 != `string` || !fv.includes(e2)) return pv;
4662
4641
  };
4663
- var xv = _v(`itemData`, `must be on object with string as value, for example: { "slug": "shoes" }`);
4664
- var Sv = function(e2) {
4642
+ var hv = dv(`itemData`, `must be on object with string as value, for example: { "slug": "shoes" }`);
4643
+ var gv = function(e2) {
4665
4644
  if (typeof e2 != `object` || !e2 || !Object.values(e2).every(function(e3) {
4666
4645
  return typeof e3 == `string`;
4667
- }) || Array.isArray(e2)) return xv;
4646
+ }) || Array.isArray(e2)) return hv;
4668
4647
  };
4669
- var Cv = _v(`itemData`, `must have required variables, for example: { "slug": "shoes" }`);
4670
- var wv = function(e2, t2) {
4648
+ var _v = dv(`itemData`, `must have required variables, for example: { "slug": "shoes" }`);
4649
+ var vv = function(e2, t2) {
4671
4650
  try {
4672
- var n2 = hv(e2);
4651
+ var n2 = lv(e2);
4673
4652
  if (!n2.every(function(e3) {
4674
4653
  return !!t2[e3];
4675
4654
  }) || !n2.length) throw Error();
4676
4655
  } catch {
4677
- return Cv;
4656
+ return _v;
4678
4657
  }
4679
4658
  };
4680
- var Tv = function(e2) {
4659
+ var yv = function(e2) {
4681
4660
  var t2 = e2.key, n2 = e2.itemData;
4682
- return [bv(t2), Sv(n2), wv(t2, n2)].find(Boolean);
4661
+ return [mv(t2), gv(n2), vv(t2, n2)].find(Boolean);
4683
4662
  };
4684
- var Ev = function(e2) {
4663
+ var bv = function(e2) {
4685
4664
  return function(t2) {
4686
- var n2 = new RegExp(V_, `g`), r2 = t2.replace(n2, ``);
4665
+ var n2 = new RegExp(F_, `g`), r2 = t2.replace(n2, ``);
4687
4666
  return e2?.[r2];
4688
4667
  };
4689
4668
  };
4690
- var Dv = function(e2, t2, n2, r2) {
4669
+ var xv = function(e2, t2, n2, r2) {
4691
4670
  e2 === void 0 && (e2 = { main: [] }), r2 === void 0 && (r2 = {});
4692
- var i2 = Tv({ key: t2, itemData: n2 });
4671
+ var i2 = yv({ key: t2, itemData: n2 });
4693
4672
  if (i2) throw i2;
4694
- var a2 = (gv(e2, t2) || {}).mapping, o2 = (r2 || {}).baseUrl;
4673
+ var a2 = (uv(e2, t2) || {}).mapping, o2 = (r2 || {}).baseUrl;
4695
4674
  if (o2 ??= ``, o2 = o2.endsWith(`/`) ? o2?.slice(0, -1) : o2, a2 && typeof a2 == `string`) {
4696
- var s2 = new RegExp(B_, `g`), c2 = a2.replace(s2, Ev(n2));
4675
+ var s2 = new RegExp(P_, `g`), c2 = a2.replace(s2, bv(n2));
4697
4676
  return o2.concat(`/${c2}`);
4698
4677
  }
4699
4678
  };
4700
- var Ov = /[.*+?^$()|]/g;
4701
- var kv = function(e2) {
4702
- var t2 = e2.replace(Ov, `\\$&`).replace(new RegExp(B_, `g`), H_);
4679
+ var Sv = /[.*+?^$()|]/g;
4680
+ var Cv = function(e2) {
4681
+ var t2 = e2.replace(Sv, `\\$&`).replace(new RegExp(P_, `g`), I_);
4703
4682
  return RegExp(`^${t2}$`);
4704
4683
  };
4705
- var Av = function(e2, t2) {
4684
+ var wv = function(e2, t2) {
4706
4685
  return e2 === void 0 && (e2 = []), e2.find(function(e3) {
4707
- return kv(e3).test(t2);
4686
+ return Cv(e3).test(t2);
4708
4687
  });
4709
4688
  };
4710
- _v(`url`, `Url must be a string`);
4711
- var jv = function(e2) {
4689
+ dv(`url`, `Url must be a string`);
4690
+ var Tv = function(e2) {
4712
4691
  return [` `, ` `, `
4713
4692
  `].every(function(t2) {
4714
4693
  return !e2?.includes?.call(e2, t2);
4715
4694
  });
4716
4695
  };
4717
- var Mv = function(e2) {
4718
- return e2?.length <= Gv.MAX_URL_MAPPING_LENGTH;
4696
+ var Ev = function(e2) {
4697
+ return e2?.length <= zv.MAX_URL_MAPPING_LENGTH;
4719
4698
  };
4720
- var Nv = function(e2) {
4699
+ var Dv = function(e2) {
4721
4700
  return e2?.split(`/`).every(Boolean);
4722
4701
  };
4723
- var Pv = function(e2, t2) {
4702
+ var Ov = function(e2, t2) {
4724
4703
  var n2 = t2.urlMappingKey;
4725
- return hv(n2)?.every(function(t3) {
4704
+ return lv(n2)?.every(function(t3) {
4726
4705
  return e2?.includes(`{{${t3}}}`);
4727
4706
  });
4728
4707
  };
4729
- var Fv = function(e2) {
4730
- return (e2.match(new RegExp(B_, `g`))?.length || 0) <= 1;
4708
+ var kv = function(e2) {
4709
+ return (e2.match(new RegExp(P_, `g`))?.length || 0) <= 1;
4731
4710
  };
4732
- var Iv = function(e2) {
4733
- return e2?.split(`/`).every(Fv);
4711
+ var Av = function(e2) {
4712
+ return e2?.split(`/`).every(kv);
4734
4713
  };
4735
- var Lv = function(e2) {
4714
+ var jv = function(e2) {
4736
4715
  return [e2.publishedPrefix, e2.savedPrefix].filter(Boolean);
4737
4716
  };
4738
- var Rv = function(e2, t2) {
4717
+ var Mv = function(e2, t2) {
4739
4718
  return t2 === void 0 && (t2 = []), function(n2, r2) {
4740
4719
  var i2 = n2.split(`/`), a2 = n2 === r2;
4741
4720
  if (i2.length < 1 || a2) return true;
@@ -4745,49 +4724,49 @@ var Rv = function(e2, t2) {
4745
4724
  });
4746
4725
  };
4747
4726
  };
4748
- var zv = function(e2, t2) {
4727
+ var Nv = function(e2, t2) {
4749
4728
  var n2 = t2.pathPrefixes;
4750
- return Rv(Object.values(n2).map(function(e3) {
4729
+ return Mv(Object.values(n2).map(function(e3) {
4751
4730
  return e3.publishedPrefix;
4752
- }).filter(Boolean), Lv(t2.pathPrefix))(e2, t2.defaultMapping.defaultPublished);
4731
+ }).filter(Boolean), jv(t2.pathPrefix))(e2, t2.defaultMapping.defaultPublished);
4753
4732
  };
4754
- var Bv = function(e2, t2) {
4733
+ var Pv = function(e2, t2) {
4755
4734
  var n2 = t2.urlMappingKey, r2 = t2.urlMappings;
4756
- return !Av(r2.main?.filter(function(e3) {
4735
+ return !wv(r2.main?.filter(function(e3) {
4757
4736
  return n2 !== e3.key;
4758
4737
  }).map(function(e3) {
4759
4738
  return e3.mapping;
4760
4739
  }), e2);
4761
4740
  };
4762
- var Vv = function(e2) {
4763
- e2 = e2.replace(new RegExp(B_, `ig`), ``);
4741
+ var Fv = function(e2) {
4742
+ e2 = e2.replace(new RegExp(P_, `ig`), ``);
4764
4743
  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, ``);
4765
4744
  return n2 && r2;
4766
4745
  };
4767
- var Hv = function(e2) {
4746
+ var Iv = function(e2) {
4768
4747
  var t2 = sa(e2, 1)[0], n2 = e2.slice(-1);
4769
4748
  return t2 !== `/` && n2 !== `/`;
4770
4749
  };
4771
- var Uv = function(e2, t2) {
4750
+ var Lv = function(e2, t2) {
4772
4751
  var n2 = t2.pathPrefixes;
4773
- return Rv(Object.values(n2).map(function(e3) {
4752
+ return Mv(Object.values(n2).map(function(e3) {
4774
4753
  return e3.savedPrefix;
4775
- }).filter(Boolean), Lv(t2.pathPrefix))(e2, t2.defaultMapping.defaultSaved);
4754
+ }).filter(Boolean), jv(t2.pathPrefix))(e2, t2.defaultMapping.defaultSaved);
4776
4755
  };
4777
- var Wv;
4756
+ var Rv;
4778
4757
  (function(e2) {
4779
4758
  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`;
4780
- })(Wv ||= {});
4781
- var Gv = function() {
4759
+ })(Rv ||= {});
4760
+ var zv = function() {
4782
4761
  function e2(e3) {
4783
4762
  var t2 = e3.urlMappingKey, n2 = e3.pathPrefixes, r2 = e3.urlMappings, i2 = this;
4784
4763
  this.initValidators = function() {
4785
- i2.validators = [[Mv, Wv.MAX_LENGTH_ERROR], [jv, Wv.NO_SPACES_ERROR], [Hv, Wv.NO_STARTING_OR_ENDING_SLASH_ERROR], [Nv, Wv.NO_EMPTY_SEGMENT_ERROR], [Vv, Wv.NO_INVALID_CHARACTERS_ERROR], [Pv, Wv.CONTAIN_MAIN_VARIABLE_ERROR], [Iv, Wv.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR], [zv, Wv.ONLY_UNIQUE_PUBLISHED_URL_ERROR], [Uv, Wv.ONLY_UNIQUE_SAVED_URL_ERROR], [Bv, Wv.ONLY_UNIQUE_MAPPING_ERROR]];
4786
- }, this.urlMappings = r2, this.pathPrefixes = n2, this.urlMappingKey = t2, this.pathPrefix = this.getPathPrefix(), this.defaultMapping = Kv(t2, this.pathPrefix), this.initValidators();
4764
+ i2.validators = [[Ev, Rv.MAX_LENGTH_ERROR], [Tv, Rv.NO_SPACES_ERROR], [Iv, Rv.NO_STARTING_OR_ENDING_SLASH_ERROR], [Dv, Rv.NO_EMPTY_SEGMENT_ERROR], [Fv, Rv.NO_INVALID_CHARACTERS_ERROR], [Ov, Rv.CONTAIN_MAIN_VARIABLE_ERROR], [Av, Rv.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR], [Nv, Rv.ONLY_UNIQUE_PUBLISHED_URL_ERROR], [Lv, Rv.ONLY_UNIQUE_SAVED_URL_ERROR], [Pv, Rv.ONLY_UNIQUE_MAPPING_ERROR]];
4765
+ }, this.urlMappings = r2, this.pathPrefixes = n2, this.urlMappingKey = t2, this.pathPrefix = this.getPathPrefix(), this.defaultMapping = Bv(t2, this.pathPrefix), this.initValidators();
4787
4766
  }
4788
4767
  return e2.prototype.getPathPrefix = function() {
4789
- var t2 = pv(this.urlMappingKey);
4790
- if (!t2) throw uv(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})`);
4768
+ var t2 = sv(this.urlMappingKey);
4769
+ if (!t2) throw iv(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})`);
4791
4770
  return this.pathPrefixes[t2] || e2.FALLBACK_PATH_PREFIX;
4792
4771
  }, Object.defineProperty(e2.prototype, "validatorProps", { get: function() {
4793
4772
  var e3 = this;
@@ -4809,68 +4788,69 @@ var Gv = function() {
4809
4788
  }
4810
4789
  }
4811
4790
  return { isValid: true };
4812
- }, e2.errorArray = Object.values(Wv), e2.MAX_URL_MAPPING_LENGTH = 1e3, e2.FALLBACK_PATH_PREFIX = `unknown`, e2;
4791
+ }, e2.errorArray = Object.values(Rv), e2.MAX_URL_MAPPING_LENGTH = 1e3, e2.FALLBACK_PATH_PREFIX = `unknown`, e2;
4813
4792
  }();
4814
- var Kv = function(e2, t2) {
4815
- var n2 = dv()[e2] || { required: [`slug`] }, r2 = n2.required, i2 = n2.defaultPrefix, a2 = {};
4816
- return t2 && typeof t2 == `object` ? (a2.savedPrefix = t2.savedPrefix ?? ``, a2.publishedPrefix = t2.publishedPrefix ?? ``) : (a2.savedPrefix = Gv.FALLBACK_PATH_PREFIX, a2.publishedPrefix = Gv.FALLBACK_PATH_PREFIX), { defaultSaved: ca([a2.savedPrefix, i2], sa(r2?.map(function(e3) {
4793
+ var Bv = function(e2, t2) {
4794
+ var n2 = av()[e2] || { required: [`slug`] }, r2 = n2.required, i2 = n2.defaultPrefix, a2 = {};
4795
+ return t2 && typeof t2 == `object` ? (a2.savedPrefix = t2.savedPrefix ?? ``, a2.publishedPrefix = t2.publishedPrefix ?? ``) : (a2.savedPrefix = zv.FALLBACK_PATH_PREFIX, a2.publishedPrefix = zv.FALLBACK_PATH_PREFIX), { defaultSaved: ca([a2.savedPrefix, i2], sa(r2?.map(function(e3) {
4817
4796
  return `{{${e3}}}`;
4818
4797
  })), false).filter(Boolean).join(`/`), defaultPublished: ca([a2.publishedPrefix, i2], sa(r2?.map(function(e3) {
4819
4798
  return `{{${e3}}}`;
4820
4799
  })), false).filter(Boolean).join(`/`) };
4821
4800
  };
4822
- function qv(e2, t2) {
4823
- return t2 ? Dv(e2, $.BOOKINGS_SERVICE, { slug: t2 }, { baseUrl: `` }) : void 0;
4801
+ function Vv(e2, t2) {
4802
+ return t2 ? xv(e2, $.BOOKINGS_SERVICE, { slug: t2 }, { baseUrl: `` }) : void 0;
4824
4803
  }
4825
- var Jv = { courseNavigationTarget: `servicePage`, classAppointmentNavigationTarget: `servicePage` };
4826
- function Yv({ actionState: e2, serviceType: t2, config: n2 }) {
4827
- return e2 === Gp.VIEW_COURSE ? `servicePage` : Dd(t2) ? n2.courseNavigationTarget : n2.classAppointmentNavigationTarget;
4804
+ var Hv = { courseNavigationTarget: `servicePage`, classAppointmentNavigationTarget: `servicePage` };
4805
+ function Uv({ actionState: e2, serviceType: t2, config: n2 }) {
4806
+ return e2 === Wp.VIEW_COURSE ? `servicePage` : Dd(t2) ? n2.courseNavigationTarget : n2.classAppointmentNavigationTarget;
4828
4807
  }
4829
- function Xv(e2, t2, n2) {
4830
- return e2 === `bookingForm` && !Dd(t2) && !$g(n2);
4808
+ function Wv(e2, t2, n2) {
4809
+ return e2 === `bookingForm` && !Dd(t2) && !Jg(n2);
4831
4810
  }
4832
- function Zv(e2, t2) {
4811
+ function Gv(e2, t2) {
4833
4812
  let n2 = e2(t2);
4834
4813
  return n2 ? n2.replace(/\/$/, ``) || `/` : null;
4835
4814
  }
4836
- function Qv(e2, t2, n2) {
4815
+ function Kv(e2, t2, n2) {
4837
4816
  let r2 = e2(t2);
4838
4817
  return !r2 || !n2 ? null : `${r2.replace(/\/$/, ``)}/${n2}`;
4839
4818
  }
4840
- function $v(e2, t2) {
4819
+ function qv(e2, t2) {
4841
4820
  switch (e2) {
4842
4821
  case `servicePage`:
4843
- return (t2.slug ? t2.buildCustomServiceUrl(t2.slug) : void 0) ?? Qv(t2.appSectionUrl, bd.SERVICE_PAGE, t2.slug);
4822
+ return (t2.slug ? t2.buildCustomServiceUrl(t2.slug) : void 0) ?? Kv(t2.appSectionUrl, bd.SERVICE_PAGE, t2.slug);
4844
4823
  case `bookingCalendar`:
4845
- return t2.isMultiService ? Zv(t2.appSectionUrl, bd.CALENDAR_PAGE) : Qv(t2.appSectionUrl, bd.CALENDAR_PAGE, t2.slug);
4824
+ return t2.isMultiService ? Gv(t2.appSectionUrl, bd.CALENDAR_PAGE) : Kv(t2.appSectionUrl, bd.CALENDAR_PAGE, t2.slug);
4846
4825
  case `bookingForm`:
4847
- return t2.serviceId ? Qv(t2.appSectionUrl, bd.FORM_PAGE, t2.slug) : null;
4826
+ return t2.serviceId ? Kv(t2.appSectionUrl, bd.FORM_PAGE, t2.slug) : null;
4848
4827
  default:
4849
4828
  return null;
4850
4829
  }
4851
4830
  }
4852
- var ey = (e2, t2) => t2 === `/` ? e2 : new URL(`.${t2}`, `${e2}/`).href;
4853
- var ty = (e2, t2, n2) => n2 ? `.${t2}` : ny(e2, t2);
4854
- var ny = (e2, t2) => e2 ? ey(e2, t2) : t2;
4855
- var ry = () => {
4856
- let e2 = (0, import_services_manager_react.useService)(d_), t2 = (0, import_services_manager_react.useService)(va), n2 = t2.siteUrl.replace(/\/$/, ``), r2 = (0, import_services_manager_react.useService)(L_), a2 = (0, import_services_manager_react.useService)(z_), o2 = (0, import_services_manager_react.useGetService)(), s2 = (0, import_react.useCallback)(async (t3) => {
4857
- let i2 = ty(n2, t3, e2.getPreviewMode());
4858
- await r2.navigateTo({ href: i2 });
4859
- }, [e2, n2, r2]), c2 = (0, import_react.useCallback)(async ({ href: e3, target: t3 }) => {
4860
- await r2.navigateTo({ href: e3, target: t3 });
4861
- }, [r2]), l2 = (0, import_react.useCallback)((e3) => ny(n2, e3), [n2]), u2 = (0, import_react.useCallback)((e3) => t2.appSectionRelativeUrl(gd, e3), [t2]), p2 = (0, import_react.useCallback)((e3) => qv(a2.urlMappings, e3), [a2]), m2 = (0, import_react.useCallback)((e3, t3) => $v(e3, { ...t3, appSectionUrl: u2, buildCustomServiceUrl: p2 }), [u2, p2]), h2 = (0, import_react.useCallback)((e3, t3) => {
4831
+ var Jv = (e2) => e2.target === `_blank`;
4832
+ var Yv = (e2, t2) => t2 === `/` ? e2 : new URL(`.${t2}`, `${e2}/`).href;
4833
+ var Xv = (e2, t2, n2) => n2 ? `.${t2}` : Zv(e2, t2);
4834
+ var Zv = (e2, t2) => e2 ? Yv(e2, t2) : t2;
4835
+ var Qv = () => {
4836
+ let { previewMode: e2 } = (0, import_services_manager_react.useService)(j_), t2 = (0, import_services_manager_react.useService)(va), n2 = t2.siteUrl.replace(/\/$/, ``), { navigateTo: r2 } = (0, import_services_manager_react.useService)(M_), a2 = (0, import_services_manager_react.useService)(N_), o2 = (0, import_services_manager_react.useGetService)(), s2 = (0, import_react.useCallback)(async (t3) => {
4837
+ let i2 = Xv(n2, t3, e2);
4838
+ await r2({ href: i2 });
4839
+ }, [e2, n2, r2]), c2 = (0, import_react.useCallback)(async (e3) => {
4840
+ await r2(Jv(e3) ? { href: e3.href, type: `ExternalLink`, target: `_blank` } : { href: e3.href });
4841
+ }, [r2]), l2 = (0, import_react.useCallback)((e3) => Zv(n2, e3), [n2]), u2 = (0, import_react.useCallback)((e3) => t2.appSectionRelativeUrl(gd, e3), [t2]), p2 = (0, import_react.useCallback)((e3) => Vv(a2.urlMappings, e3), [a2]), m2 = (0, import_react.useCallback)((e3, t3) => qv(e3, { ...t3, appSectionUrl: u2, buildCustomServiceUrl: p2 }), [u2, p2]), h2 = (0, import_react.useCallback)((e3, t3) => {
4862
4842
  let r3 = m2(e3, t3);
4863
- return r3 && n2 ? ey(n2, r3) : null;
4843
+ return r3 && n2 ? Yv(n2, r3) : null;
4864
4844
  }, [m2, n2]), g2 = (0, import_react.useCallback)((e3, t3) => {
4865
4845
  let n3 = m2(e3, t3);
4866
4846
  n3 && s2(n3);
4867
- }, [m2, s2]), _2 = (0, import_react.useCallback)(() => u2(bd.FORM_PAGE) || void 0, [u2]), v2 = (0, import_react.useCallback)((e3) => Object.values(o2(fm).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]);
4847
+ }, [m2, s2]), _2 = (0, import_react.useCallback)(() => u2(bd.FORM_PAGE) || void 0, [u2]), v2 = (0, import_react.useCallback)((e3) => Object.values(o2(sm).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]);
4868
4848
  return { navigate: s2, navigateToHref: c2, resolvePath: m2, toHref: l2, resolveAbsoluteUrl: h2, navigateTo: g2, getBookingFormPath: _2, getCartPagePath: (0, import_react.useCallback)(() => v2(_d), [v2]), getThankYouPagePath: (0, import_react.useCallback)((e3) => {
4869
4849
  let t3 = v2(vd);
4870
4850
  return t3 ? `${t3}/${e3}?origin=bookings` : void 0;
4871
4851
  }, [v2]) };
4872
4852
  };
4873
- function iy(e2) {
4853
+ function $v(e2) {
4874
4854
  (0, import_react.useEffect)(() => {
4875
4855
  let t2 = (t3) => {
4876
4856
  t3.persisted && e2();
@@ -4878,53 +4858,53 @@ function iy(e2) {
4878
4858
  return window.addEventListener(`pageshow`, t2), () => window.removeEventListener(`pageshow`, t2);
4879
4859
  }, [e2]);
4880
4860
  }
4881
- function ay(e2) {
4882
- let t2 = Cg(e2.get(Y.blob));
4861
+ function ey(e2) {
4862
+ let t2 = vg(e2.get(Y.blob));
4883
4863
  return t2?.services.length ? t2 : null;
4884
4864
  }
4885
- var oy = { displayTimeZonePolicy: { basedOn: fd.BUSINESS_TIME_ZONE, customerCanChange: false }, multiServiceAppointmentsEnabled: false };
4886
- async function sy() {
4865
+ var ty = { displayTimeZonePolicy: { basedOn: fd.BUSINESS_TIME_ZONE, customerCanChange: false }, multiServiceAppointmentsEnabled: false };
4866
+ async function ny() {
4887
4867
  try {
4888
4868
  let e2 = await hd();
4889
4869
  return { displayTimeZonePolicy: { basedOn: e2.displayTimeZone?.basedOn ?? fd.BUSINESS_TIME_ZONE, customerCanChange: e2.displayTimeZone?.customerCanChange ?? false }, multiServiceAppointmentsEnabled: e2.multiServiceAppointments?.enabled ?? false };
4890
4870
  } catch (e2) {
4891
- return ma(e2, { feature: fa.bookingsSettings, action: `fetch-bookings-settings`, level: `warning` }), oy;
4871
+ return ma(e2, { feature: fa.bookingsSettings, action: `fetch-bookings-settings`, level: `warning` }), ty;
4892
4872
  }
4893
4873
  }
4894
- var cy = { isLoading: true };
4895
- var ly = (0, import_react.createContext)(null);
4896
- var uy = `useBookingsSettingsContext must be used within BookingsSettingsProvider`;
4897
- function dy() {
4898
- let e2 = (0, import_react.useContext)(ly);
4899
- if (!e2) throw Error(uy);
4874
+ var ry = { isLoading: true };
4875
+ var iy = (0, import_react.createContext)(null);
4876
+ var ay = `useBookingsSettingsContext must be used within BookingsSettingsProvider`;
4877
+ function oy() {
4878
+ let e2 = (0, import_react.useContext)(iy);
4879
+ if (!e2) throw Error(ay);
4900
4880
  return e2;
4901
4881
  }
4902
- function fy() {
4903
- return dy().isLoading;
4882
+ function sy() {
4883
+ return oy().isLoading;
4904
4884
  }
4905
- function py({ children: e2 }) {
4906
- return (0, import_jsx_runtime.jsx)(ly.Provider, { value: cy, children: e2 });
4885
+ function cy({ children: e2 }) {
4886
+ return (0, import_jsx_runtime.jsx)(iy.Provider, { value: ry, children: e2 });
4907
4887
  }
4908
- function my(e2) {
4888
+ function ly(e2) {
4909
4889
  return e2.basedOn === fd.CUSTOMER_TIME_ZONE ? Intl.DateTimeFormat().resolvedOptions().timeZone : void 0;
4910
4890
  }
4911
- function hy() {
4912
- let e2 = dy();
4913
- return e2.isLoading ? void 0 : my(e2.displayTimeZonePolicy);
4891
+ function uy() {
4892
+ let e2 = oy();
4893
+ return e2.isLoading ? void 0 : ly(e2.displayTimeZonePolicy);
4914
4894
  }
4915
- function gy({ settingsPromise: e2, children: t2 }) {
4895
+ function dy({ settingsPromise: e2, children: t2 }) {
4916
4896
  let n2 = ka(e2), r2 = (0, import_react.useMemo)(() => ({ isLoading: false, ...n2 }), [n2]);
4917
- return (0, import_jsx_runtime.jsx)(ly.Provider, { value: r2, children: t2 });
4897
+ return (0, import_jsx_runtime.jsx)(iy.Provider, { value: r2, children: t2 });
4918
4898
  }
4919
- function _y({ bookingsSettings: e2, children: n2 }) {
4920
- let r2 = v_(), [i2] = (0, import_react.useState)(() => e2 ? null : I_({ key: T_(), warmupData: r2, fetchData: sy }));
4921
- return e2 ? (0, import_jsx_runtime.jsx)(ly.Provider, { value: { isLoading: false, ...e2 }, children: n2 }) : (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(ly.Provider, { value: cy, children: n2 }), children: (0, import_jsx_runtime.jsx)(gy, { settingsPromise: i2, children: n2 }) });
4899
+ function fy({ bookingsSettings: e2, children: n2 }) {
4900
+ let r2 = f_(), [i2] = (0, import_react.useState)(() => e2 ? null : A_({ key: y_(), warmupData: r2, fetchData: ny }));
4901
+ return e2 ? (0, import_jsx_runtime.jsx)(iy.Provider, { value: { isLoading: false, ...e2 }, children: n2 }) : (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(iy.Provider, { value: ry, children: n2 }), children: (0, import_jsx_runtime.jsx)(dy, { settingsPromise: i2, children: n2 }) });
4922
4902
  }
4923
- function vy({ isLoading: e2, hasError: t2, bookingsSettingsLoading: n2, rescheduleRequest: r2 = null, children: i2 }) {
4924
- let a2 = r2 ? { status: `loading`, booking: null, validUntil: null } : null, o2 = { service: null, serviceName: null, serviceDescription: null, serviceTagLine: null, serviceDefaultDuration: null, serviceImage: null, serviceSlug: null, servicePageLink: null, serviceId: null, serviceType: null, servicePrice: Qp, isVariedService: false, serviceOptionsAndVariants: null, pricingOption: null, isLoadingServiceOptionsAndVariants: e2, hasAddOns: false, isConferenceEnabled: false, offeredDays: [], courseAvailability: null, courseStartDate: null, courseEndDate: null, staffMembers: [], coverImage: void 0, gallery: [], serviceLocations: [], policyDescription: null, serviceBookability: { state: Np.AVAILABLE, isAvailableForBooking: false, bookingOpensAt: null }, displayTimeZone: `UTC`, isAvailableForBooking: () => false, hasPolicyDescription: () => false, hasCoverImage: () => false, hasGalleryImages: () => false, isVariantDuration: () => false, isLoading: e2, hasError: t2, locale: `en-US`, selectStaffMember: () => {
4903
+ function py({ isLoading: e2, hasError: t2, bookingsSettingsLoading: n2, rescheduleRequest: r2 = null, children: i2 }) {
4904
+ let a2 = r2 ? { status: `loading`, booking: null, validUntil: null } : null, o2 = { service: null, serviceName: null, serviceDescription: null, serviceTagLine: null, serviceDefaultDuration: null, serviceImage: null, serviceSlug: null, servicePageLink: null, serviceId: null, serviceType: null, servicePrice: Zp, isVariedService: false, serviceOptionsAndVariants: null, pricingOption: null, isLoadingServiceOptionsAndVariants: e2, hasAddOns: false, isConferenceEnabled: false, offeredDays: [], courseAvailability: null, courseStartDate: null, courseEndDate: null, staffMembers: [], coverImage: void 0, gallery: [], serviceLocations: [], policyDescription: null, serviceBookability: { state: Mp.AVAILABLE, isAvailableForBooking: false, bookingOpensAt: null }, displayTimeZone: `UTC`, isAvailableForBooking: () => false, hasPolicyDescription: () => false, hasCoverImage: () => false, hasGalleryImages: () => false, isVariantDuration: () => false, isLoading: e2, hasError: t2, locale: `en-US`, selectStaffMember: () => {
4925
4905
  }, clearSelection: () => {
4926
4906
  }, clearStaffMember: () => {
4927
- }, selection: Og(``), selectionTimezone: void 0, setVariant: () => {
4907
+ }, selection: Cg(``), selectionTimezone: void 0, setVariant: () => {
4928
4908
  }, setVariantCounts: () => {
4929
4909
  }, maxParticipantsPerBooking: 1, toggleAddOn: () => {
4930
4910
  }, setAddOnQuantity: () => {
@@ -4932,84 +4912,84 @@ function vy({ isLoading: e2, hasError: t2, bookingsSettingsLoading: n2, reschedu
4932
4912
  }, clearSlot: () => {
4933
4913
  }, setMultiServiceSlot: () => false, clearMultiServiceSlot: () => {
4934
4914
  }, draftRevision: 0, wantsPromoCode: false, setWantsPromoCode: () => {
4935
- }, withSelectionParam: (e3) => e3, serviceCtaState: Gp.BOOK, navigateToNextPage: () => {
4915
+ }, withSelectionParam: (e3) => e3, serviceCtaState: Wp.BOOK, navigateToNextPage: () => {
4936
4916
  }, navigateToMultiServiceForm: () => {
4937
4917
  }, resolveNextPageHref: () => null, isNavigating: false, openPreferences: () => Promise.resolve(), multiServiceAppointmentsEnabled: false, isMultiServiceAppointment: false, multiServiceAppointmentServices: [], multiServiceAppointmentOptionsAndVariants: {}, multiServiceAppointmentVariantsStatus: `ready`, bookingsSettingsLoading: n2, reschedule: a2, rescheduleBooking: async () => ({ outcome: `failed` }), goHomeAfterReschedule: () => {
4938
4918
  }, canRescheduleToPick: false };
4939
- return (0, import_jsx_runtime.jsx)(Xy.Provider, { value: o2, children: i2 });
4919
+ return (0, import_jsx_runtime.jsx)(Gy.Provider, { value: o2, children: i2 });
4940
4920
  }
4941
- function yy({ rescheduleRequest: e2, children: t2 }) {
4942
- return (0, import_jsx_runtime.jsx)(py, { children: (0, import_jsx_runtime.jsx)(vy, { isLoading: true, hasError: false, bookingsSettingsLoading: true, rescheduleRequest: e2, children: t2 }) });
4921
+ function my({ rescheduleRequest: e2, children: t2 }) {
4922
+ return (0, import_jsx_runtime.jsx)(cy, { children: (0, import_jsx_runtime.jsx)(py, { isLoading: true, hasError: false, bookingsSettingsLoading: true, rescheduleRequest: e2, children: t2 }) });
4943
4923
  }
4944
- function by({ rescheduleRequest: e2, children: t2 }) {
4945
- let n2 = fy();
4946
- return (0, import_jsx_runtime.jsx)(vy, { isLoading: false, hasError: true, bookingsSettingsLoading: n2, rescheduleRequest: e2, children: t2 });
4924
+ function hy({ rescheduleRequest: e2, children: t2 }) {
4925
+ let n2 = sy();
4926
+ return (0, import_jsx_runtime.jsx)(py, { isLoading: false, hasError: true, bookingsSettingsLoading: n2, rescheduleRequest: e2, children: t2 });
4947
4927
  }
4948
- function xy(e2, t2) {
4949
- if (e2) return t2 ? hf(e2, t2)?.toISOString() ?? e2 : e2;
4928
+ function gy(e2, t2) {
4929
+ if (e2) return t2 ? mf(e2, t2)?.toISOString() ?? e2 : e2;
4950
4930
  }
4951
- var Sy = { BUSINESS: `OWNER_BUSINESS`, CUSTOM: `OWNER_CUSTOM`, CUSTOMER: `CUSTOM` };
4952
- function Cy(e2) {
4953
- return e2 ? Sy[e2] : Sy.BUSINESS;
4931
+ var _y = { BUSINESS: `OWNER_BUSINESS`, CUSTOM: `OWNER_CUSTOM`, CUSTOMER: `CUSTOM` };
4932
+ function vy(e2) {
4933
+ return e2 ? _y[e2] : _y.BUSINESS;
4954
4934
  }
4955
- function wy(e2, t2) {
4956
- let n2 = Rg(e2), r2 = n2 && !n2.anyResource ? n2.staffMemberId : null;
4957
- return { serviceId: e2.serviceId, scheduleId: e2.scheduleId, startDate: xy(e2.slotStart, t2), endDate: xy(e2.slotEnd, t2), timezone: t2, eventId: e2.eventId, sessionId: e2.sessionId, location: e2.locationId || e2.locationType ? { ...e2.locationId ? { _id: e2.locationId } : {}, locationType: Cy(e2.locationType) } : void 0, resource: r2 ? { _id: r2 } : void 0, resourceSelections: !r2 && Td(e2.serviceType) ? [{ resourceTypeId: yd, selectionMethod: `ANY_RESOURCE`, ...n2?.anyResource && e2.requestedGender ? { requestedGender: { gender: e2.requestedGender } } : {} }] : void 0 };
4935
+ function yy(e2, t2) {
4936
+ let n2 = Ng(e2), r2 = n2 && !n2.anyResource ? n2.staffMemberId : null;
4937
+ return { serviceId: e2.serviceId, scheduleId: e2.scheduleId, startDate: gy(e2.slotStart, t2), endDate: gy(e2.slotEnd, t2), timezone: t2, eventId: e2.eventId, sessionId: e2.sessionId, location: e2.locationId || e2.locationType ? { ...e2.locationId ? { _id: e2.locationId } : {}, locationType: vy(e2.locationType) } : void 0, resource: r2 ? { _id: r2 } : void 0, resourceSelections: !r2 && Td(e2.serviceType) ? [{ resourceTypeId: yd, selectionMethod: `ANY_RESOURCE`, ...n2?.anyResource && e2.requestedGender ? { requestedGender: { gender: e2.requestedGender } } : {} }] : void 0 };
4958
4938
  }
4959
- var Ty = `manage_booking_standalone_page`;
4960
- function Ey(e2) {
4939
+ var by = `manage_booking_standalone_page`;
4940
+ function xy(e2) {
4961
4941
  let t2 = e2.get(Y.bookingId) || null, n2 = e2.get(Y.token) || null;
4962
- return !t2 && !n2 ? null : { bookingId: t2, token: n2, fromManageBookingPage: e2.get(Y.referral) === Ty, redirectUrl: e2.get(Y.rescheduleRedirectUrl) || null };
4942
+ return !t2 && !n2 ? null : { bookingId: t2, token: n2, fromManageBookingPage: e2.get(Y.referral) === by, redirectUrl: e2.get(Y.rescheduleRedirectUrl) || null };
4963
4943
  }
4964
- function Dy(e2, t2, n2, r2 = null) {
4944
+ function Sy(e2, t2, n2, r2 = null) {
4965
4945
  if (n2.kind === `class`) return { eventId: e2.eventId };
4966
- let { serviceId: i2, scheduleId: a2, startDate: o2, endDate: s2, location: c2, resource: l2, resourceSelections: u2 } = wy(e2, t2);
4946
+ let { serviceId: i2, scheduleId: a2, startDate: o2, endDate: s2, location: c2, resource: l2, resourceSelections: u2 } = yy(e2, t2);
4967
4947
  return { serviceId: i2, scheduleId: a2, startDate: o2, endDate: s2, timezone: t2, ...c2 ? { location: { ...c2._id ? { _id: c2._id } : {}, locationType: c2.locationType, ...n2.customAddress !== null && c2.locationType === `CUSTOM` ? { formattedAddress: n2.customAddress } : {} } } : {}, ...l2?._id ? { resource: { _id: l2._id } } : r2 ? { resource: { _id: r2 } } : u2 ? { resourceSelections: u2 } : {} };
4968
4948
  }
4969
- var Oy = class extends Error {
4949
+ var Cy = class extends Error {
4970
4950
  reason;
4971
4951
  cause;
4972
4952
  constructor(e2, t2) {
4973
4953
  super(`Booking to reschedule not loaded: ${e2}`), this.reason = e2, this.cause = t2;
4974
4954
  }
4975
4955
  };
4976
- var ky = (e2) => e2?.status;
4977
- function Ay(e2) {
4956
+ var wy = (e2) => e2?.status;
4957
+ function Ty(e2) {
4978
4958
  return e2?.includes(`INDIVIDUAL`) ? `appointment` : e2?.includes(`GROUP`) ? `class` : `other`;
4979
4959
  }
4980
- function jy({ totalParticipants: e2, participantsChoices: t2 }) {
4960
+ function Ey({ totalParticipants: e2, participantsChoices: t2 }) {
4981
4961
  return e2 || (t2?.serviceChoices ?? []).reduce((e3, t3) => e3 + (t3.numberOfParticipants ?? 1), 0) || 1;
4982
4962
  }
4983
- function My(e2) {
4963
+ function Dy(e2) {
4984
4964
  if (!e2) return null;
4985
4965
  let t2 = new Date(e2);
4986
4966
  return Number.isNaN(t2.getTime()) ? null : t2.toISOString();
4987
4967
  }
4988
- function Ny(e2, t2) {
4968
+ function Oy(e2, t2) {
4989
4969
  let { slot: n2, schedule: r2, tags: i2 } = e2.bookedEntity ?? {}, a2 = n2?.location;
4990
- return { bookingId: t2, revision: e2.revision ?? null, serviceId: n2?.serviceId ?? r2?.serviceId ?? null, kind: Ay(i2), startDate: My(e2.startDate), participants: jy(e2), addOnIds: (e2.bookedAddOns ?? []).flatMap((e3) => e3._id ?? []), locationId: a2?._id ?? null, customAddress: a2?.locationType === `CUSTOM` ? a2.formattedAddress ?? `` : null };
4970
+ return { bookingId: t2, revision: e2.revision ?? null, serviceId: n2?.serviceId ?? r2?.serviceId ?? null, kind: Ty(i2), startDate: Dy(e2.startDate), participants: Ey(e2), addOnIds: (e2.bookedAddOns ?? []).flatMap((e3) => e3._id ?? []), locationId: a2?._id ?? null, customAddress: a2?.locationType === `CUSTOM` ? a2.formattedAddress ?? `` : null };
4991
4971
  }
4992
- async function Py({ bookingId: e2, token: t2 }) {
4972
+ async function ky({ bookingId: e2, token: t2 }) {
4993
4973
  let n2;
4994
4974
  try {
4995
4975
  t2 ? n2 = (await ad(t2)).booking : e2 && (n2 = (await Io({ filter: { _id: e2 }, cursorPaging: { limit: 1 } }, {})).extendedBookings?.[0]?.booking);
4996
4976
  } catch (e3) {
4997
- let t3 = ky(e3);
4998
- throw t3 === 404 ? new Oy(`notFound`, e3) : new Oy(t3 === 403 ? `accessDenied` : `failed`, e3);
4977
+ let t3 = wy(e3);
4978
+ throw t3 === 404 ? new Cy(`notFound`, e3) : new Cy(t3 === 403 ? `accessDenied` : `failed`, e3);
4999
4979
  }
5000
4980
  let r2 = n2?._id;
5001
- if (!n2 || !r2) throw new Oy(`notFound`);
5002
- let i2 = Ny(n2, r2);
4981
+ if (!n2 || !r2) throw new Cy(`notFound`);
4982
+ let i2 = Oy(n2, r2);
5003
4983
  return t2 ? { ...i2, customAddress: null } : i2;
5004
4984
  }
5005
- function Fy(e2) {
4985
+ function Ay(e2) {
5006
4986
  let t2 = e2?.bookedEntity?.slot;
5007
4987
  return { staffName: t2?.resource?.name || null, locationName: t2?.location?.name || t2?.location?.formattedAddress || null };
5008
4988
  }
5009
- async function Iy({ booking: e2, slot: t2, token: n2 }) {
5010
- return Fy(n2 ? (await id(n2, t2, { revision: e2.revision || `1` })).booking : (await od(e2.bookingId, t2, { revision: e2.revision ?? `` })).booking);
4989
+ async function jy({ booking: e2, slot: t2, token: n2 }) {
4990
+ return Ay(n2 ? (await id(n2, t2, { revision: e2.revision || `1` })).booking : (await od(e2.bookingId, t2, { revision: e2.revision ?? `` })).booking);
5011
4991
  }
5012
- async function Ly(e2) {
4992
+ async function My(e2) {
5013
4993
  try {
5014
4994
  let t2 = (await Io({ filter: { _id: e2 }, cursorPaging: { limit: 1 } }, { withEcomTransactions: true })).extendedBookings?.[0]?.transactions?.chargedMembershipPaymentDetails?.expirationDate;
5015
4995
  return t2 ? new Date(t2).toISOString() : null;
@@ -5017,36 +4997,36 @@ async function Ly(e2) {
5017
4997
  return ma(e3, { feature: fa.reschedule, action: `fetch-plan-valid-until`, level: `warning` }), null;
5018
4998
  }
5019
4999
  }
5020
- function Ry() {
5021
- let e2 = pm();
5000
+ function Ny() {
5001
+ let e2 = cm();
5022
5002
  return (0, import_react.useCallback)(() => {
5023
5003
  if (!e2) return null;
5024
5004
  try {
5025
- return Object.values(e2(fm).pages).some((e3) => !e3.popup && (!e3.appDefinitionId || e3.appDefinitionId === `13d21c63-b5ec-5912-8397-c3a5ddb27a97`) && e3.appPageId === `My Bookings`) ? e2(va).appSectionRelativeUrl(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, `My Bookings`) ?? null : null;
5005
+ return Object.values(e2(sm).pages).some((e3) => !e3.popup && (!e3.appDefinitionId || e3.appDefinitionId === `13d21c63-b5ec-5912-8397-c3a5ddb27a97`) && e3.appPageId === `My Bookings`) ? e2(va).appSectionRelativeUrl(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, `My Bookings`) ?? null : null;
5026
5006
  } catch {
5027
5007
  return null;
5028
5008
  }
5029
5009
  }, [e2]);
5030
5010
  }
5031
- var zy = Kd(`@wix/viewer-service-site-members`);
5032
- function By() {
5011
+ var Py = _a(`@wix/viewer-service-site-members`);
5012
+ function Fy() {
5033
5013
  try {
5034
5014
  return (0, import_services_manager_react.useGetService)();
5035
5015
  } catch {
5036
5016
  return null;
5037
5017
  }
5038
5018
  }
5039
- function Vy(e2) {
5019
+ function Iy(e2) {
5040
5020
  try {
5041
- return e2 ? e2(zy) : null;
5021
+ return e2 ? e2(Py) : null;
5042
5022
  } catch {
5043
5023
  return null;
5044
5024
  }
5045
5025
  }
5046
- function Hy() {
5047
- return Vy(By());
5026
+ function Ly() {
5027
+ return Iy(Fy());
5048
5028
  }
5049
- function Uy(e2) {
5029
+ function Ry(e2) {
5050
5030
  if (!e2) return null;
5051
5031
  try {
5052
5032
  let t2 = new URL(e2);
@@ -5055,93 +5035,93 @@ function Uy(e2) {
5055
5035
  return null;
5056
5036
  }
5057
5037
  }
5058
- function Wy(e2, { bookable: t2, staffChoiceRequired: n2, timezone: r2, validUntil: i2 }) {
5059
- if (!$g(e2) || !t2) return false;
5060
- let a2 = Rg(e2);
5038
+ function zy(e2, { bookable: t2, staffChoiceRequired: n2, timezone: r2, validUntil: i2 }) {
5039
+ if (!Jg(e2) || !t2) return false;
5040
+ let a2 = Ng(e2);
5061
5041
  if (n2 && (!a2 || a2.anyResource)) return false;
5062
- let o2 = e2.slotStart ? hf(e2.slotStart, r2) : null;
5042
+ let o2 = e2.slotStart ? mf(e2.slotStart, r2) : null;
5063
5043
  return !i2 || !o2 || o2.getTime() <= Date.parse(i2);
5064
5044
  }
5065
- var Gy = { status: `loading`, booking: null, validUntil: null };
5066
- async function Ky(e2) {
5045
+ var By = { status: `loading`, booking: null, validUntil: null };
5046
+ async function Vy(e2) {
5067
5047
  return e2.getMemberDetails ? !!await e2.getMemberDetails().catch(() => null) : !!e2.isInitiallyLoggedIn;
5068
5048
  }
5069
- async function qy(e2, t2) {
5049
+ async function Hy(e2, t2) {
5070
5050
  let { bookingId: n2, token: r2 } = e2;
5071
- if (!r2 && !(t2 && await Ky(t2)) && !(t2 && await t2.promptLogin({ mode: `login` }).then(() => true, () => false))) return { status: `loginRequired`, booking: null, validUntil: null };
5051
+ if (!r2 && !(t2 && await Vy(t2)) && !(t2 && await t2.promptLogin({ mode: `login` }).then(() => true, () => false))) return { status: `loginRequired`, booking: null, validUntil: null };
5072
5052
  try {
5073
- let [t3, i2] = await Promise.all([Py(e2), n2 && !r2 ? Ly(n2) : null]);
5053
+ let [t3, i2] = await Promise.all([ky(e2), n2 && !r2 ? My(n2) : null]);
5074
5054
  return { status: `ready`, booking: t3, validUntil: i2 };
5075
5055
  } catch (e3) {
5076
- return ma(e3, { feature: fa.reschedule, action: `fetch-booking` }), { status: e3 instanceof Oy ? e3.reason : `failed`, booking: null, validUntil: null };
5056
+ return ma(e3, { feature: fa.reschedule, action: `fetch-booking` }), { status: e3 instanceof Cy ? e3.reason : `failed`, booking: null, validUntil: null };
5077
5057
  }
5078
5058
  }
5079
- var Jy = /* @__PURE__ */ new Map();
5080
- function Yy(e2, t2, n2) {
5081
- let r2 = `${e2.bookingId ?? ``}|${e2.token ?? ``}`, i2 = Jy.get(r2) ?? { load: qy(e2, t2), users: 0 };
5082
- return i2.users += 1, Jy.set(r2, i2), i2.load.then(n2), () => {
5083
- --i2.users, i2.users === 0 && Jy.get(r2) === i2 && Jy.delete(r2);
5059
+ var Uy = /* @__PURE__ */ new Map();
5060
+ function Wy(e2, t2, n2) {
5061
+ let r2 = `${e2.bookingId ?? ``}|${e2.token ?? ``}`, i2 = Uy.get(r2) ?? { load: Hy(e2, t2), users: 0 };
5062
+ return i2.users += 1, Uy.set(r2, i2), i2.load.then(n2), () => {
5063
+ --i2.users, i2.users === 0 && Uy.get(r2) === i2 && Uy.delete(r2);
5084
5064
  };
5085
5065
  }
5086
- var Xy = (0, import_react.createContext)(null);
5087
- var Zy = `useServiceContext must be used within ServiceContextProvider`;
5088
- function Qy(e2 = false) {
5089
- let t2 = (0, import_react.useContext)(Xy);
5090
- if (!t2 && !e2) throw Error(Zy);
5066
+ var Gy = (0, import_react.createContext)(null);
5067
+ var Ky = `useServiceContext must be used within ServiceContextProvider`;
5068
+ function qy(e2 = false) {
5069
+ let t2 = (0, import_react.useContext)(Gy);
5070
+ if (!t2 && !e2) throw Error(Ky);
5091
5071
  return t2;
5092
5072
  }
5093
- function $y(e2, t2, n2) {
5073
+ function Jy(e2, t2, n2) {
5094
5074
  if (e2) return { by: `slug`, value: e2 };
5095
5075
  let r2 = t2?.services ?? [];
5096
- return wg(t2) ? { by: `multi`, serviceIds: r2.map(({ serviceId: e3 }) => e3) } : r2.length === 1 ? { by: `id`, value: r2[0].serviceId } : n2 ? { by: `id`, value: n2 } : { by: `none` };
5076
+ return yg(t2) ? { by: `multi`, serviceIds: r2.map(({ serviceId: e3 }) => e3) } : r2.length === 1 ? { by: `id`, value: r2[0].serviceId } : n2 ? { by: `id`, value: n2 } : { by: `none` };
5097
5077
  }
5098
- var eb = (e2) => void 0;
5099
- var tb = (e2, t2) => Cg(t2.get(Y.blob))?.services.find((t3) => t3.serviceId === e2);
5100
- var nb = (e2, t2) => {
5101
- let n2 = tb(e2, t2) ?? Og(e2), r2 = eb(e2);
5102
- return r2 === void 0 ? n2 : zg(n2, r2);
5078
+ var Yy = (e2) => void 0;
5079
+ var Xy = (e2, t2) => vg(t2.get(Y.blob))?.services.find((t3) => t3.serviceId === e2);
5080
+ var Zy = (e2, t2) => {
5081
+ let n2 = Xy(e2, t2) ?? Cg(e2), r2 = Yy(e2);
5082
+ return r2 === void 0 ? n2 : Pg(n2, r2);
5103
5083
  };
5104
- var rb = (e2, t2) => {
5105
- let n2 = nb(e2, t2), r2 = t2.get(Y.resource), i2 = eb(e2) !== void 0 || !!tb(e2, t2);
5106
- return r2 && !i2 ? zg(n2, r2) : n2;
5084
+ var Qy = (e2, t2) => {
5085
+ let n2 = Zy(e2, t2), r2 = t2.get(Y.resource), i2 = Yy(e2) !== void 0 || !!Xy(e2, t2);
5086
+ return r2 && !i2 ? Pg(n2, r2) : n2;
5107
5087
  };
5108
- function ib(e2, t2) {
5109
- return !e2 || !t2 || !e2.services.every($g) ? null : Mg(t2, e2);
5088
+ function $y(e2, t2) {
5089
+ return !e2 || !t2 || !e2.services.every(Jg) ? null : Dg(t2, e2);
5110
5090
  }
5111
- var ab = [];
5112
- function ob(e2) {
5091
+ var eb = [];
5092
+ function tb(e2) {
5113
5093
  return { min: 1, max: e2?.bookingPolicy?.participantsPolicy?.maxParticipantsPerBooking || 1 };
5114
5094
  }
5115
- function sb(e2, { previous: t2, others: n2 }, { min: r2, max: i2 }) {
5095
+ function nb(e2, { previous: t2, others: n2 }, { min: r2, max: i2 }) {
5116
5096
  let a2 = Math.max(0, Math.floor(e2)), o2 = Math.max(t2, i2 - n2), s2 = Math.min(a2, o2);
5117
5097
  return s2 > 0 && n2 + s2 < r2 ? Math.min(r2 - n2, o2) : s2;
5118
5098
  }
5119
- function cb({ serviceCtaState: e2, courseAvailability: t2, serviceBookability: n2 }) {
5099
+ function rb({ serviceCtaState: e2, courseAvailability: t2, serviceBookability: n2 }) {
5120
5100
  return `${e2}|${t2?.totalCapacity ?? `-`}|${t2?.remainingCapacity ?? `-`}|${t2 === null}|${n2.state}|${n2.isAvailableForBooking}`;
5121
5101
  }
5122
- var lb = (e2) => ({ service: e2, hasError: false });
5123
- var ub = () => ({ service: null, hasError: true });
5124
- var db = { service: null, hasError: false };
5125
- var fb = (e2) => ({ ...db, isMultiServiceAppointment: true, multiServiceAppointmentServices: e2 });
5126
- var pb = () => ({ ...ub(), isMultiServiceAppointment: true });
5127
- var mb = [];
5128
- var hb = {};
5129
- function gb({ servicePromise: e2, refreshSignal: n2, injected: r2, rescheduleRequest: i2 = null, bookingsSettings: a2, children: o2 }) {
5130
- return (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(yy, { rescheduleRequest: i2, children: o2 }), children: (0, import_jsx_runtime.jsx)(_y, { bookingsSettings: a2, children: (0, import_jsx_runtime.jsx)(ga, { fallback: (0, import_jsx_runtime.jsx)(by, { rescheduleRequest: i2, children: o2 }), feature: fa.service, children: (0, import_jsx_runtime.jsx)(bb, { servicePromise: e2, refreshSignal: n2, injected: r2, rescheduleRequest: i2, children: o2 }) }) }) });
5131
- }
5132
- var _b = (e2) => e2 ?? void 0;
5133
- var vb = () => void 0;
5134
- function yb(e2, t2) {
5102
+ var ib = (e2) => ({ service: e2, hasError: false });
5103
+ var ab = () => ({ service: null, hasError: true });
5104
+ var ob = { service: null, hasError: false };
5105
+ var sb = (e2) => ({ ...ob, isMultiServiceAppointment: true, multiServiceAppointmentServices: e2 });
5106
+ var cb = () => ({ ...ab(), isMultiServiceAppointment: true });
5107
+ var lb = [];
5108
+ var ub = {};
5109
+ function db({ servicePromise: e2, refreshSignal: n2, injected: r2, rescheduleRequest: i2 = null, bookingsSettings: a2, children: o2 }) {
5110
+ return (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(my, { rescheduleRequest: i2, children: o2 }), children: (0, import_jsx_runtime.jsx)(fy, { bookingsSettings: a2, children: (0, import_jsx_runtime.jsx)(ga, { fallback: (0, import_jsx_runtime.jsx)(hy, { rescheduleRequest: i2, children: o2 }), feature: fa.service, children: (0, import_jsx_runtime.jsx)(hb, { servicePromise: e2, refreshSignal: n2, injected: r2, rescheduleRequest: i2, children: o2 }) }) }) });
5111
+ }
5112
+ var fb = (e2) => e2 ?? void 0;
5113
+ var pb = () => void 0;
5114
+ function mb(e2, t2) {
5135
5115
  ma(e2, { feature: fa.service, action: `fetch-service-variants`, level: `warning`, contexts: { service: { serviceId: t2 } } });
5136
5116
  }
5137
- function bb({ servicePromise: e2, refreshSignal: t2 = 0, injected: n2, rescheduleRequest: a2 = null, children: u2 }) {
5138
- let d2 = n2 ? null : e2 ? ka(e2) : null, f2 = n2?.service ?? d2?.service ?? null, m2 = d2?.hasError ?? false, h2 = d2?.isMultiServiceAppointment ?? false, g2 = d2?.multiServiceAppointmentServices ?? mb, _2 = p_(), { navigate: v2, navigateToHref: ee2, resolvePath: y2, toHref: b2, getBookingFormPath: te2 } = ry(), ne2 = Ry(), x2 = lf($d.SERVICE), { getParsedUrl: S2, pushUrl: C2, searchParams: re2 } = Oa(), w2 = (0, import_react.useRef)(S2);
5117
+ function hb({ servicePromise: e2, refreshSignal: t2 = 0, injected: n2, rescheduleRequest: a2 = null, children: u2 }) {
5118
+ let d2 = n2 ? null : e2 ? ka(e2) : null, f2 = n2?.service ?? d2?.service ?? null, m2 = d2?.hasError ?? false, h2 = d2?.isMultiServiceAppointment ?? false, g2 = d2?.multiServiceAppointmentServices ?? lb, _2 = c_(), { navigate: v2, navigateToHref: ee2, resolvePath: y2, toHref: b2, getBookingFormPath: te2 } = Qv(), ne2 = Ny(), x2 = cf(Qd.SERVICE), { getParsedUrl: S2, pushUrl: C2, searchParams: re2 } = Oa(), w2 = (0, import_react.useRef)(S2);
5139
5119
  w2.current = S2;
5140
5120
  let ie2 = (0, import_react.useRef)(C2);
5141
5121
  ie2.current = C2;
5142
- let ae2 = v_(), oe2 = (0, import_react.useRef)(ae2);
5122
+ let ae2 = f_(), oe2 = (0, import_react.useRef)(ae2);
5143
5123
  oe2.current = ae2;
5144
- let [T2, E2] = (0, import_react.useState)(Gy), se2 = Hy(), D2 = (e3, t3) => a2 ? Og(e3) : nb(e3, t3), ce2 = (0, import_react.useRef)(D2);
5124
+ let [T2, E2] = (0, import_react.useState)(By), se2 = Ly(), D2 = (e3, t3) => a2 ? Cg(e3) : Zy(e3, t3), ce2 = (0, import_react.useRef)(D2);
5145
5125
  ce2.current = D2;
5146
5126
  let [le2, ue2] = (0, import_react.useState)(() => D2(f2?._id ?? ``, S2().searchParams)), O2 = (0, import_react.useRef)(le2), de2 = (0, import_react.useRef)(void 0), k2 = (0, import_react.useRef)(true), fe2 = (0, import_react.useRef)(false), pe2 = (0, import_react.useRef)(null), [me2, he2] = (0, import_react.useState)(null), ge2 = (0, import_react.useRef)(me2), [_e2, ve2] = (0, import_react.useState)(0), A2 = f2?._id ?? null, ye2 = (0, import_react.useMemo)(() => {
5147
5127
  if (!a2) return null;
@@ -5153,25 +5133,25 @@ function bb({ servicePromise: e2, refreshSignal: t2 = 0, injected: n2, reschedul
5153
5133
  if (!f2) return null;
5154
5134
  let e3 = y2(`servicePage`, { slug: f2.mainSlug?.name ?? null, serviceId: f2._id ?? null });
5155
5135
  return e3 ? { href: b2(e3), target: `_self` } : null;
5156
- }, [f2, y2, b2]), [Ce2, we2] = (0, import_react.useState)(ab), Te2 = n2 ? n2.masterEvents : Ce2, Ee2 = hy(), De2 = dy(), Oe2 = De2.isLoading, ke2 = !De2.isLoading && De2.multiServiceAppointmentsEnabled;
5136
+ }, [f2, y2, b2]), [Ce2, we2] = (0, import_react.useState)(eb), Te2 = n2 ? n2.masterEvents : Ce2, Ee2 = uy(), De2 = oy(), Oe2 = De2.isLoading, ke2 = !De2.isLoading && De2.multiServiceAppointmentsEnabled;
5157
5137
  (0, import_react.useEffect)(() => {
5158
5138
  if (!a2 || Oe2) return;
5159
- let e3 = false, t3 = Yy(a2, se2, (t4) => {
5139
+ let e3 = false, t3 = Wy(a2, se2, (t4) => {
5160
5140
  e3 || E2(t4);
5161
5141
  });
5162
5142
  return () => {
5163
5143
  e3 = true, t3();
5164
5144
  };
5165
5145
  }, [a2, Oe2, se2]);
5166
- let Ae2 = !n2 && !!f2 && Od(f2), je2 = Ae2 && A2 ? C_(A2, t2) : null, Me2 = (typeof window > `u` && je2 && A2 && ae2.scope && !Oe2 ? ka(Ma(I_({ key: je2, warmupData: ae2, fetchData: () => Pf(A2).catch((e3) => (yb(e3, A2), null)) }), _b, vb)) : void 0) ?? (je2 ? A_(je2) : void 0), [Ne2, Pe2] = (0, import_react.useState)(() => Me2 ?? null), [Fe2, Ie2] = (0, import_react.useState)(() => Me2 ? je2 : null), Le2 = je2 !== null && Fe2 !== je2, Re2 = n2 ? n2.serviceOptionsAndVariants : Ae2 ? Ne2 : null;
5146
+ let Ae2 = !n2 && !!f2 && Od(f2), je2 = Ae2 && A2 ? __(A2, t2) : null, Me2 = (typeof window > `u` && je2 && A2 && ae2.scope && !Oe2 ? ka(Ma(A_({ key: je2, warmupData: ae2, fetchData: () => Nf(A2).catch((e3) => (mb(e3, A2), null)) }), fb, pb)) : void 0) ?? (je2 ? w_(je2) : void 0), [Ne2, Pe2] = (0, import_react.useState)(() => Me2 ?? null), [Fe2, Ie2] = (0, import_react.useState)(() => Me2 ? je2 : null), Le2 = je2 !== null && Fe2 !== je2, Re2 = n2 ? n2.serviceOptionsAndVariants : Ae2 ? Ne2 : null;
5167
5147
  (0, import_react.useEffect)(() => {
5168
5148
  if (n2) return;
5169
5149
  let e3 = be2 && !Td(xe2) ? be2 : null;
5170
- if ((!e3 || Oe2) && we2((e4) => e4.length === 0 ? e4 : ab), Oe2) return;
5150
+ if ((!e3 || Oe2) && we2((e4) => e4.length === 0 ? e4 : eb), Oe2) return;
5171
5151
  let i2 = Ae2 ? A2 : null;
5172
5152
  if (!e3 && !i2) return;
5173
- let a3 = false, o2 = e3 ? Mf([e3], Ee2).catch(() => ab) : Promise.resolve(ab), s2 = i2 ? I_({ key: C_(i2, t2), warmupData: oe2.current, fetchData: () => Pf(i2) }).catch((e4) => {
5174
- yb(e4, i2);
5153
+ let a3 = false, o2 = e3 ? jf([e3], Ee2).catch(() => eb) : Promise.resolve(eb), s2 = i2 ? A_({ key: __(i2, t2), warmupData: oe2.current, fetchData: () => Nf(i2) }).catch((e4) => {
5154
+ mb(e4, i2);
5175
5155
  }) : Promise.resolve(void 0);
5176
5156
  return Promise.all([o2, s2]).then(([e4, t3]) => {
5177
5157
  a3 || (0, import_react.startTransition)(() => {
@@ -5181,21 +5161,21 @@ function bb({ servicePromise: e2, refreshSignal: t2 = 0, injected: n2, reschedul
5181
5161
  a3 = true;
5182
5162
  };
5183
5163
  }, [n2, be2, xe2, Ee2, Oe2, Ae2, A2, je2]);
5184
- let ze2 = a2 ? null : re2.get(Y.blob), Be2 = (0, import_react.useMemo)(() => JSON.stringify([...new Set((Cg(ze2)?.services ?? []).filter((e3) => Hg(e3).length > 0).map(({ serviceId: e3 }) => e3))].sort()), [ze2]), Ve2 = (0, import_react.useMemo)(() => {
5164
+ let ze2 = a2 ? null : re2.get(Y.blob), Be2 = (0, import_react.useMemo)(() => JSON.stringify([...new Set((vg(ze2)?.services ?? []).filter((e3) => Lg(e3).length > 0).map(({ serviceId: e3 }) => e3))].sort()), [ze2]), Ve2 = (0, import_react.useMemo)(() => {
5185
5165
  let e3 = new Set(JSON.parse(Be2));
5186
5166
  return [...new Set(g2.filter(Od).flatMap(({ _id: t3 }) => t3 && e3.has(t3) ? [t3] : []))];
5187
- }, [g2, Be2]), He2 = (0, import_react.useMemo)(() => ({ serviceIds: Ve2, refreshSignal: t2 }), [Ve2, t2]), [Ue2, We2] = (0, import_react.useState)(null), Ge2 = Ue2?.request === He2 ? Ue2 : null, Ke2 = Ge2?.data ?? hb, j2 = Ve2.length === 0 ? `ready` : Oe2 || !Ge2 ? `loading` : Ge2.data && Ve2.every((e3) => Ge2.data?.[e3]) ? `ready` : `error`;
5167
+ }, [g2, Be2]), He2 = (0, import_react.useMemo)(() => ({ serviceIds: Ve2, refreshSignal: t2 }), [Ve2, t2]), [Ue2, We2] = (0, import_react.useState)(null), Ge2 = Ue2?.request === He2 ? Ue2 : null, Ke2 = Ge2?.data ?? ub, j2 = Ve2.length === 0 ? `ready` : Oe2 || !Ge2 ? `loading` : Ge2.data && Ve2.every((e3) => Ge2.data?.[e3]) ? `ready` : `error`;
5188
5168
  (0, import_react.useEffect)(() => {
5189
5169
  let { serviceIds: e3, refreshSignal: t3 } = He2;
5190
5170
  if (Oe2 || e3.length === 0) return;
5191
5171
  let n3 = false;
5192
- return I_({ key: w_(e3, t3), warmupData: oe2.current, fetchData: () => If(e3) }).catch((e4) => (ma(e4, { feature: fa.service, action: `fetch-multi-service-variants`, level: `warning` }), null)).then((e4) => {
5172
+ return A_({ key: v_(e3, t3), warmupData: oe2.current, fetchData: () => Ff(e3) }).catch((e4) => (ma(e4, { feature: fa.service, action: `fetch-multi-service-variants`, level: `warning` }), null)).then((e4) => {
5193
5173
  n3 || (0, import_react.startTransition)(() => We2({ request: He2, data: e4 }));
5194
5174
  }), () => {
5195
5175
  n3 = true;
5196
5176
  };
5197
5177
  }, [Oe2, He2]);
5198
- let M2 = rm({ service: f2, masterEvents: Te2, locale: _2, timeZone: Ee2, now: y_() }), N2 = cb(M2), qe2 = (0, import_react.useMemo)(() => M2, [f2, Te2, _2, Ee2, N2]), Je2 = (0, import_react.useRef)(null);
5178
+ let M2 = nm({ service: f2, masterEvents: Te2, locale: _2, timeZone: Ee2, now: p_() }), N2 = rb(M2), qe2 = (0, import_react.useMemo)(() => M2, [f2, Te2, _2, Ee2, N2]), Je2 = (0, import_react.useRef)(null);
5199
5179
  (0, import_react.useEffect)(() => {
5200
5180
  if (Je2.current !== null) {
5201
5181
  let e3 = ce2.current(f2?._id ?? ``, w2.current().searchParams);
@@ -5212,52 +5192,59 @@ function bb({ servicePromise: e2, refreshSignal: t2 = 0, injected: n2, reschedul
5212
5192
  }, [ze2, A2]);
5213
5193
  let Xe2 = (0, import_react.useRef)({});
5214
5194
  Xe2.current = { serviceType: f2?.type ?? void 0, scheduleId: Dd(f2?.type) || Ed(f2?.type) ? f2?.schedule?._id ?? void 0 : void 0 };
5215
- let Ze2 = (0, import_react.useCallback)((e3, t3) => Eg(e3, { currentUrl: w2.current(), entries: [Lg(t3?.staffId === void 0 ? O2.current : zg(O2.current, t3.staffId), Xe2.current)], policy: t3?.handoff ? `handoff` : `inPlace`, timezone: de2.current }), []), Qe2 = (0, import_react.useCallback)((e3) => {
5195
+ let Ze2 = (0, import_react.useCallback)((e3, t3) => xg(e3, { currentUrl: w2.current(), entries: [Mg(t3?.staffId === void 0 ? O2.current : Pg(O2.current, t3.staffId), Xe2.current)], policy: t3?.handoff ? `handoff` : `inPlace`, timezone: de2.current }), []), Qe2 = (0, import_react.useCallback)((e3) => {
5216
5196
  let t3 = e3(O2.current);
5217
5197
  O2.current = t3, ue2(t3);
5218
5198
  }, []), $e2 = (0, import_react.useCallback)((e3) => {
5219
5199
  Qe2(e3);
5220
- let t3 = w2.current(), n3 = e3(nb(A2 ?? ``, t3.searchParams)), r2 = Eg(`${t3.pathname}${t3.search}${t3.hash}`, { currentUrl: t3, entries: [Lg(n3, Xe2.current)], policy: `inPlace` }), i2 = new URL(r2, t3);
5200
+ let t3 = w2.current(), n3 = e3(Zy(A2 ?? ``, t3.searchParams)), r2 = xg(`${t3.pathname}${t3.search}${t3.hash}`, { currentUrl: t3, entries: [Mg(n3, Xe2.current)], policy: `inPlace` }), i2 = new URL(r2, t3);
5221
5201
  Ye2.current = i2.searchParams.get(Y.blob), ie2.current(i2, { disableScrollToTop: true, skipHistory: true });
5222
- }, [Qe2, A2]), et2 = Cg(ze2)?.wantsPromoCode === true, tt2 = (0, import_react.useCallback)((e3) => {
5223
- let t3 = w2.current(), n3 = Cg(t3.searchParams.get(Y.blob));
5202
+ }, [Qe2, A2]), et2 = vg(ze2)?.wantsPromoCode === true, tt2 = (0, import_react.useCallback)((e3) => {
5203
+ let t3 = w2.current(), n3 = vg(t3.searchParams.get(Y.blob));
5224
5204
  if (!n3) return;
5225
- let r2 = new URL(Mg(`${t3.pathname}${t3.search}${t3.hash}`, Fg(n3, e3)), t3);
5205
+ let r2 = new URL(Dg(`${t3.pathname}${t3.search}${t3.hash}`, Ag(n3, e3)), t3);
5226
5206
  Ye2.current = r2.searchParams.get(Y.blob), ie2.current(r2, { disableScrollToTop: true, skipHistory: true });
5227
- }, []), nt2 = Uf(Re2), P2 = (0, import_react.useCallback)((e3, t3) => nt2 ? Ug(e3, t3 ? [t3] : []) : e3, [nt2]), F2 = (0, import_react.useCallback)((e3) => Qe2((t3) => P2(zg(t3, e3), e3)), [Qe2, P2]), rt2 = (0, import_react.useCallback)(() => Qe2((e3) => P2(Vg(e3), null)), [Qe2, P2]), I2 = (0, import_react.useCallback)((e3) => Qe2((t3) => P2(Bg(t3, e3), null)), [Qe2, P2]), it2 = (0, import_react.useCallback)((e3) => $e2((t3) => Ug(t3, e3)), [$e2]), at2 = (0, import_react.useMemo)(() => ob(f2), [f2]), ot2 = (0, import_react.useMemo)(() => Wf(Re2, { locale: _2, staffMembers: f2 ? Gf(f2) : [], businessLocations: Cd(f2) }), [Re2, _2, f2]), st2 = (0, import_react.useMemo)(() => new Set(Wf(Re2, { locale: _2 })?.choices.flatMap((e3) => e3.choiceId ? [e3.choiceId] : []) ?? []), [Re2, _2]), ct2 = (0, import_react.useCallback)((e3) => {
5207
+ }, []), nt2 = Hf(Re2), P2 = (0, import_react.useCallback)((e3, t3) => nt2 ? Rg(e3, t3 ? [t3] : []) : e3, [nt2]), F2 = (0, import_react.useCallback)((e3) => Qe2((t3) => P2(Pg(t3, e3), e3)), [Qe2, P2]), rt2 = (0, import_react.useCallback)(() => Qe2((e3) => P2(Ig(e3), null)), [Qe2, P2]), I2 = (0, import_react.useCallback)((e3) => Qe2((t3) => P2(Fg(t3, e3), null)), [Qe2, P2]), it2 = (0, import_react.useCallback)((e3) => $e2((t3) => Rg(t3, e3)), [$e2]), at2 = (0, import_react.useMemo)(() => tb(f2), [f2]), ot2 = (0, import_react.useMemo)(() => Uf(Re2, { locale: _2, staffMembers: f2 ? Wf(f2) : [], businessLocations: Cd(f2) }), [Re2, _2, f2]), st2 = (0, import_react.useMemo)(() => new Set(Uf(Re2, { locale: _2 })?.choices.flatMap((e3) => e3.choiceId ? [e3.choiceId] : []) ?? []), [Re2, _2]), ct2 = (0, import_react.useCallback)((e3) => {
5228
5208
  let t3 = Object.entries(e3).filter(([e4, t4]) => st2.has(e4) && Number.isFinite(t4));
5229
5209
  if (!t3.length) return;
5230
5210
  let n3 = (e4) => {
5231
- let n4 = qg(e4, st2), r2 = ([e5, t4]) => t4 <= Wg(n4, e5), i2 = [...t3.filter(r2), ...t3.filter((e5) => !r2(e5))];
5211
+ let n4 = Hg(e4, st2), r2 = ([e5, t4]) => t4 <= zg(n4, e5), i2 = [...t3.filter(r2), ...t3.filter((e5) => !r2(e5))];
5232
5212
  for (let [e5, t4] of i2) {
5233
- let r3 = Wg(n4, e5), i3 = sb(t4, { previous: r3, others: Gg(n4) - r3 }, at2);
5234
- i3 !== r3 && (n4 = Kg(n4, e5, i3));
5213
+ let r3 = zg(n4, e5), i3 = nb(t4, { previous: r3, others: Bg(n4) - r3 }, at2);
5214
+ i3 !== r3 && (n4 = Vg(n4, e5, i3));
5235
5215
  }
5236
5216
  return n4;
5237
5217
  };
5238
5218
  n3(O2.current) !== O2.current && $e2(n3);
5239
- }, [st2, at2, $e2]), lt2 = (0, import_react.useCallback)((e3) => $e2((t3) => Xg(t3, e3)), [$e2]), ut2 = (0, import_react.useCallback)((e3, t3) => $e2((n3) => Zg(n3, e3, t3)), [$e2]), dt2 = (0, import_react.useCallback)((e3, t3) => {
5219
+ }, [st2, at2, $e2]), lt2 = (0, import_react.useCallback)((e3) => $e2((t3) => Gg(t3, e3)), [$e2]), ut2 = (0, import_react.useCallback)((e3, t3) => $e2((n3) => Kg(n3, e3, t3)), [$e2]), dt2 = (0, import_react.useCallback)((e3, t3) => {
5240
5220
  t3?.timezone && (de2.current = t3.timezone), k2.current = t3?.bookable ?? true, fe2.current = t3?.staffChoiceRequired ?? false, pe2.current = t3?.rescheduleStaffId ?? null, Qe2((n3) => {
5241
- let r2 = e_(n3, e3);
5242
- return t3?.staffId === void 0 ? r2 : zg(r2, t3.staffId);
5221
+ let r2 = Yg(n3, e3);
5222
+ return t3?.staffId === void 0 ? r2 : Pg(r2, t3.staffId);
5243
5223
  });
5244
5224
  }, [Qe2]), ft2 = (0, import_react.useCallback)(() => {
5245
- k2.current = true, fe2.current = false, pe2.current = null, Qe2((e3) => t_(e3));
5246
- }, [Qe2]), pt2 = (0, import_react.useCallback)((e3) => {
5247
- let t3 = ge2.current ?? Cg(w2.current().searchParams.get(Y.blob)), n3 = t3 && e3(t3);
5225
+ k2.current = true, fe2.current = false, pe2.current = null;
5226
+ let e3 = ce2.current(A2 ?? ``, w2.current().searchParams);
5227
+ Qe2((t3) => {
5228
+ let n3 = Zg(t3, e3);
5229
+ if (!nt2) return n3;
5230
+ let { selectedVariants: r2, durationChoiceId: i2, ...a3 } = n3;
5231
+ return { ...a3, ...e3.selectedVariants ? { selectedVariants: e3.selectedVariants } : {}, ...e3.durationChoiceId ? { durationChoiceId: e3.durationChoiceId } : {} };
5232
+ });
5233
+ }, [Qe2, A2, nt2]), pt2 = (0, import_react.useCallback)((e3) => {
5234
+ let t3 = ge2.current ?? vg(w2.current().searchParams.get(Y.blob)), n3 = t3 && e3(t3);
5248
5235
  return n3 ? (ge2.current = n3, he2(n3), true) : false;
5249
- }, []), mt2 = (0, import_react.useCallback)((e3, t3) => pt2((n3) => n_(n3, e3, t3, Wd())), [pt2]), ht2 = (0, import_react.useCallback)(() => {
5250
- pt2(i_);
5251
- }, [pt2]), gt2 = qe2.serviceCtaState, _t2 = (0, import_react.useMemo)(() => h2 ? ib(me2 ?? Cg(ze2), te2()) : null, [h2, me2, ze2, te2]), vt2 = (0, import_react.useCallback)((e3) => {
5236
+ }, []), mt2 = (0, import_react.useCallback)((e3, t3) => pt2((n3) => Qg(n3, e3, t3, Wd())), [pt2]), ht2 = (0, import_react.useCallback)(() => {
5237
+ pt2(e_);
5238
+ }, [pt2]), gt2 = qe2.serviceCtaState, _t2 = (0, import_react.useMemo)(() => h2 ? $y(me2 ?? vg(ze2), te2()) : null, [h2, me2, ze2, te2]), vt2 = (0, import_react.useCallback)((e3) => {
5252
5239
  if (h2) return _t2 ? b2(_t2) : null;
5253
- let t3 = Yv({ actionState: gt2, serviceType: f2?.type ?? null, config: e3 ?? Jv });
5254
- if (Xv(t3, f2?.type ?? null, le2)) return null;
5240
+ let t3 = Uv({ actionState: gt2, serviceType: f2?.type ?? null, config: e3 ?? Hv });
5241
+ if (Wv(t3, f2?.type ?? null, le2)) return null;
5255
5242
  let n3 = y2(t3, { slug: f2?.mainSlug?.name ?? null, serviceId: f2?._id ?? null });
5256
5243
  return n3 ? b2(n3) : null;
5257
- }, [h2, _t2, gt2, f2, le2, y2, b2]), yt2 = vm(), [bt2, xt2] = (0, import_react.useState)(false), St2 = (0, import_react.useRef)(false), Ct2 = (0, import_react.useCallback)(() => {
5244
+ }, [h2, _t2, gt2, f2, le2, y2, b2]), yt2 = pm(), [bt2, xt2] = (0, import_react.useState)(false), St2 = (0, import_react.useRef)(false), Ct2 = (0, import_react.useCallback)(() => {
5258
5245
  St2.current = false, xt2(false);
5259
5246
  }, []);
5260
- iy(Ct2);
5247
+ $v(Ct2);
5261
5248
  let wt2 = (0, import_react.useCallback)((e3) => {
5262
5249
  St2.current = true, xt2(true);
5263
5250
  let t3 = w2.current(), n3 = new URL(b2(e3), t3).pathname === t3.pathname;
@@ -5266,27 +5253,27 @@ function bb({ servicePromise: e2, refreshSignal: t2 = 0, injected: n2, reschedul
5266
5253
  }, (e4) => {
5267
5254
  ma(e4, { feature: fa.serviceCta, action: `navigateToNextPage` }), Ct2();
5268
5255
  });
5269
- }, [v2, Ct2, b2]), Tt2 = (0, import_react.useCallback)(() => yt2.open(mm(s_({ service: f2, pricingOption: ot2 ?? void 0, selection: rb(A2 ?? ``, w2.current().searchParams), multiServiceAppointmentsEnabled: ke2 }))), [yt2, f2, ot2, A2, ke2]), Et2 = (0, import_react.useCallback)((e3) => {
5256
+ }, [v2, Ct2, b2]), Tt2 = (0, import_react.useCallback)(() => yt2.open(lm(r_({ service: f2, pricingOption: ot2 ?? void 0, selection: Qy(A2 ?? ``, w2.current().searchParams), multiServiceAppointmentsEnabled: ke2 }))), [yt2, f2, ot2, A2, ke2]), Et2 = (0, import_react.useCallback)((e3) => {
5270
5257
  if (St2.current) return;
5271
- let t3 = ge2.current ?? Cg(w2.current().searchParams.get(Y.blob)), n3 = ib(t3, te2());
5258
+ let t3 = ge2.current ?? vg(w2.current().searchParams.get(Y.blob)), n3 = $y(t3, te2());
5272
5259
  if (n3) {
5273
- for (let n4 of t3?.services ?? []) e3(gf({ serviceId: n4.serviceId, serviceType: n4.serviceType ?? g2.find(({ _id: e4 }) => e4 === n4.serviceId)?.type ?? void 0, start: n4.slotStart, end: n4.slotEnd, timeZone: t3?.timezone ?? void 0, isEligibleForFlowCompletion: true }));
5260
+ for (let n4 of t3?.services ?? []) e3(hf({ serviceId: n4.serviceId, serviceType: n4.serviceType ?? g2.find(({ _id: e4 }) => e4 === n4.serviceId)?.type ?? void 0, start: n4.slotStart, end: n4.slotEnd, timeZone: t3?.timezone ?? void 0, isEligibleForFlowCompletion: true }));
5274
5261
  wt2(n3);
5275
5262
  }
5276
- }, [te2, g2, wt2]), Dt2 = (0, import_react.useCallback)((e3, t3 = tf.WIDGET_BUTTON) => {
5263
+ }, [te2, g2, wt2]), Dt2 = (0, import_react.useCallback)((e3, t3 = ef.WIDGET_BUTTON) => {
5277
5264
  if (St2.current || a2) return;
5278
5265
  if (h2) {
5279
5266
  Et2(x2);
5280
5267
  return;
5281
5268
  }
5282
- let n3 = Yv({ actionState: gt2, serviceType: f2?.type ?? null, config: e3 ?? Jv });
5283
- if (Xv(n3, f2?.type ?? null, O2.current)) return;
5269
+ let n3 = Uv({ actionState: gt2, serviceType: f2?.type ?? null, config: e3 ?? Hv });
5270
+ if (Wv(n3, f2?.type ?? null, O2.current)) return;
5284
5271
  let r2 = y2(n3, { slug: f2?.mainSlug?.name ?? null, serviceId: f2?._id ?? null }), i2 = n3 === `bookingForm` && !Dd(f2?.type ?? null);
5285
- if (n3 !== `servicePage` && !i2 && x2(Xd({ bookingsServiceId: f2?._id ?? void 0, serviceType: f2?.type ?? void 0, isEligibleForFlowCompletion: !!r2 })), i2 && k2.current && x2(gf({ serviceId: f2?._id ?? void 0, serviceType: f2?.type ?? void 0, start: O2.current.slotStart, end: O2.current.slotEnd, timeZone: de2.current ?? Cg(ze2)?.timezone ?? Ee2, isEligibleForFlowCompletion: !!r2 })), x2(Jd({ service_id: f2?._id ?? void 0, destination: nf[n3] })), !r2) return;
5286
- x2(df({ service_id: f2?._id ?? void 0, type: f2?.type ?? void 0, isPendingApproval: f2 ? kd(f2) : void 0, referralInfo: t3, actionName: rf[n3] }));
5272
+ if (n3 !== `servicePage` && !i2 && x2(Yd({ bookingsServiceId: f2?._id ?? void 0, serviceType: f2?.type ?? void 0, isEligibleForFlowCompletion: !!r2 })), i2 && k2.current && x2(hf({ serviceId: f2?._id ?? void 0, serviceType: f2?.type ?? void 0, start: O2.current.slotStart, end: O2.current.slotEnd, timeZone: de2.current ?? vg(ze2)?.timezone ?? Ee2, isEligibleForFlowCompletion: !!r2 })), x2(qd({ service_id: f2?._id ?? void 0, destination: tf[n3] })), !r2) return;
5273
+ x2(uf({ service_id: f2?._id ?? void 0, type: f2?.type ?? void 0, isPendingApproval: f2 ? kd(f2) : void 0, referralInfo: t3, actionName: nf[n3] }));
5287
5274
  let o2 = n3 === `bookingForm`;
5288
- if (!o2 && !Pg(O2.current)) {
5289
- wt2(Ig(r2, w2.current()));
5275
+ if (!o2 && !kg(O2.current)) {
5276
+ wt2(jg(r2, w2.current()));
5290
5277
  return;
5291
5278
  }
5292
5279
  wt2(Ze2(r2, { handoff: o2 }));
@@ -5294,42 +5281,42 @@ function bb({ servicePromise: e2, refreshSignal: t2 = 0, injected: n2, reschedul
5294
5281
  kt2.current = Ot2;
5295
5282
  let At2 = (0, import_react.useCallback)(async () => {
5296
5283
  let e3 = ye2?.status === `ready` ? ye2.booking : null;
5297
- if (!ye2 || !a2 || !e3 || !Wy(O2.current, kt2.current())) return { outcome: `failed` };
5298
- x2(pf({ component: of.RESCHEDULE_DIALOG, element: sf.CONFIRM_BUTTON })), x2(Qd({ action: af, pageName: sf.CONFIRM_BUTTON, referralInfo: w2.current().searchParams.get(Y.referral) ?? void 0 }));
5299
- let t3 = Lg(O2.current, Xe2.current), n3;
5284
+ if (!ye2 || !a2 || !e3 || !zy(O2.current, kt2.current())) return { outcome: `failed` };
5285
+ x2(ff({ component: af.RESCHEDULE_DIALOG, element: of.CONFIRM_BUTTON })), x2(Zd({ action: rf, pageName: of.CONFIRM_BUTTON, referralInfo: w2.current().searchParams.get(Y.referral) ?? void 0 }));
5286
+ let t3 = Mg(O2.current, Xe2.current), n3;
5300
5287
  try {
5301
- n3 = await Iy({ booking: e3, slot: Dy(t3, de2.current ?? null, e3, pe2.current), token: a2.token });
5288
+ n3 = await jy({ booking: e3, slot: Sy(t3, de2.current ?? null, e3, pe2.current), token: a2.token });
5302
5289
  } catch (e4) {
5303
5290
  return ma(e4, { feature: fa.reschedule, action: `reschedule-booking` }), { outcome: `failed` };
5304
5291
  }
5305
- x2(ff({ bookingId: e3.bookingId }));
5292
+ x2(df({ bookingId: e3.bookingId }));
5306
5293
  let r2 = { outcome: `succeeded`, ...n3 };
5307
5294
  if (a2.fromManageBookingPage) return r2;
5308
- let i2 = Uy(a2.redirectUrl), o2 = i2 ? null : ne2();
5295
+ let i2 = Ry(a2.redirectUrl), o2 = i2 ? null : ne2();
5309
5296
  if (!i2 && !o2) return r2;
5310
5297
  try {
5311
5298
  return i2 ? await ee2({ href: i2 }) : o2 && await v2(o2), { outcome: `navigated` };
5312
5299
  } catch (e4) {
5313
5300
  return ma(e4, { feature: fa.reschedule, action: `return-after-reschedule` }), r2;
5314
5301
  }
5315
- }, [ye2, a2, ne2, v2, ee2, x2]), jt2 = Wy(le2, Ot2()), Mt2 = (0, import_react.useCallback)(() => {
5316
- x2(Qd({ component: sf.GO_TO_HOMEPAGE_BUTTON, action: af, pageName: cf })), v2(`/`).catch((e3) => ma(e3, { feature: fa.reschedule, action: `go-home` }));
5317
- }, [v2, x2]), { serviceBookability: Nt2, policyDescription: Pt2, coverImage: Ft2 } = qe2, It2 = (0, import_react.useCallback)(() => Nt2.isAvailableForBooking, [Nt2]), Lt2 = (0, import_react.useCallback)(() => !!Pt2, [Pt2]), Rt2 = (0, import_react.useCallback)(() => !!Ft2, [Ft2]), zt2 = (0, import_react.useCallback)(() => Dp(f2), [f2]), Bt2 = (0, import_react.useCallback)(() => !!f2 && om(f2), [f2]), Vt2 = (0, import_react.useMemo)(() => ({ ...qe2, service: f2, servicePageLink: Se2, serviceOptionsAndVariants: Re2, pricingOption: ot2, isLoadingServiceOptionsAndVariants: Le2, isAvailableForBooking: It2, hasPolicyDescription: Lt2, hasCoverImage: Rt2, hasGalleryImages: zt2, isVariantDuration: Bt2, isLoading: false, hasError: m2, locale: _2, selectStaffMember: F2, clearSelection: I2, clearStaffMember: rt2, selection: le2, selectionTimezone: de2.current ?? Ee2, setVariant: it2, setVariantCounts: ct2, maxParticipantsPerBooking: at2.max, toggleAddOn: lt2, setAddOnQuantity: ut2, setSlot: dt2, clearSlot: ft2, setMultiServiceSlot: mt2, clearMultiServiceSlot: ht2, draftRevision: _e2, wantsPromoCode: et2, setWantsPromoCode: tt2, withSelectionParam: Ze2, navigateToNextPage: Dt2, navigateToMultiServiceForm: Et2, resolveNextPageHref: vt2, isNavigating: bt2, openPreferences: Tt2, multiServiceAppointmentsEnabled: ke2, isMultiServiceAppointment: h2, multiServiceAppointmentServices: g2, multiServiceAppointmentOptionsAndVariants: Ke2, multiServiceAppointmentVariantsStatus: j2, bookingsSettingsLoading: Oe2, reschedule: ye2, rescheduleBooking: At2, goHomeAfterReschedule: Mt2, canRescheduleToPick: jt2 }), [qe2, f2, Se2, Re2, ot2, Le2, It2, Lt2, Rt2, zt2, Bt2, m2, _2, F2, I2, rt2, le2, Ee2, it2, ct2, at2.max, lt2, ut2, dt2, ft2, mt2, ht2, _e2, et2, tt2, Ze2, Dt2, Et2, vt2, bt2, Tt2, ke2, h2, g2, Ke2, j2, Oe2, ye2, At2, Mt2, jt2]);
5318
- return (0, import_jsx_runtime.jsx)(Xy.Provider, { value: Vt2, children: u2 });
5319
- }
5320
- function xb({ pathname: e2, initialServiceId: t2, refreshSignal: n2, editingSurface: r2, children: i2 }) {
5321
- uf($d.SERVICE);
5322
- let a2 = v_(), { getParsedUrl: o2 } = Oa(), [s2] = (0, import_react.useState)(() => r2 ? null : Ey(o2().searchParams)), [c2] = (0, import_react.useState)(() => {
5323
- let r3 = $y(Md(e2), s2 ? null : ay(o2().searchParams), t2);
5324
- return r3.by === `none` ? Aa(db) : r3.by === `multi` ? Ma(I_({ key: S_(r3.serviceIds), refresh: n2 !== 0, warmupData: a2, fetchData: () => ha(`service-context-load-multi-service`, { feature: fa.service }, Ld(r3.serviceIds)) }), fb, pb) : Ma(I_({ key: x_(r3.by, r3.value), refresh: n2 !== 0, warmupData: a2, fetchData: () => ha(`service-context-load`, { feature: fa.service }, r3.by === `slug` ? Fd(r3.value) : Id(r3.value)) }), lb, ub);
5302
+ }, [ye2, a2, ne2, v2, ee2, x2]), jt2 = zy(le2, Ot2()), Mt2 = (0, import_react.useCallback)(() => {
5303
+ x2(Zd({ component: of.GO_TO_HOMEPAGE_BUTTON, action: rf, pageName: sf })), v2(`/`).catch((e3) => ma(e3, { feature: fa.reschedule, action: `go-home` }));
5304
+ }, [v2, x2]), { serviceBookability: Nt2, policyDescription: Pt2, coverImage: Ft2 } = qe2, It2 = (0, import_react.useCallback)(() => Nt2.isAvailableForBooking, [Nt2]), Lt2 = (0, import_react.useCallback)(() => !!Pt2, [Pt2]), Rt2 = (0, import_react.useCallback)(() => !!Ft2, [Ft2]), zt2 = (0, import_react.useCallback)(() => Ep(f2), [f2]), Bt2 = (0, import_react.useCallback)(() => !!f2 && am(f2), [f2]), Vt2 = (0, import_react.useMemo)(() => ({ ...qe2, service: f2, servicePageLink: Se2, serviceOptionsAndVariants: Re2, pricingOption: ot2, isLoadingServiceOptionsAndVariants: Le2, isAvailableForBooking: It2, hasPolicyDescription: Lt2, hasCoverImage: Rt2, hasGalleryImages: zt2, isVariantDuration: Bt2, isLoading: false, hasError: m2, locale: _2, selectStaffMember: F2, clearSelection: I2, clearStaffMember: rt2, selection: le2, selectionTimezone: de2.current ?? Ee2, setVariant: it2, setVariantCounts: ct2, maxParticipantsPerBooking: at2.max, toggleAddOn: lt2, setAddOnQuantity: ut2, setSlot: dt2, clearSlot: ft2, setMultiServiceSlot: mt2, clearMultiServiceSlot: ht2, draftRevision: _e2, wantsPromoCode: et2, setWantsPromoCode: tt2, withSelectionParam: Ze2, navigateToNextPage: Dt2, navigateToMultiServiceForm: Et2, resolveNextPageHref: vt2, isNavigating: bt2, openPreferences: Tt2, multiServiceAppointmentsEnabled: ke2, isMultiServiceAppointment: h2, multiServiceAppointmentServices: g2, multiServiceAppointmentOptionsAndVariants: Ke2, multiServiceAppointmentVariantsStatus: j2, bookingsSettingsLoading: Oe2, reschedule: ye2, rescheduleBooking: At2, goHomeAfterReschedule: Mt2, canRescheduleToPick: jt2 }), [qe2, f2, Se2, Re2, ot2, Le2, It2, Lt2, Rt2, zt2, Bt2, m2, _2, F2, I2, rt2, le2, Ee2, it2, ct2, at2.max, lt2, ut2, dt2, ft2, mt2, ht2, _e2, et2, tt2, Ze2, Dt2, Et2, vt2, bt2, Tt2, ke2, h2, g2, Ke2, j2, Oe2, ye2, At2, Mt2, jt2]);
5305
+ return (0, import_jsx_runtime.jsx)(Gy.Provider, { value: Vt2, children: u2 });
5306
+ }
5307
+ function gb({ pathname: e2, initialServiceId: t2, refreshSignal: n2, editingSurface: r2, children: i2 }) {
5308
+ lf(Qd.SERVICE);
5309
+ let a2 = f_(), { getParsedUrl: o2 } = Oa(), [s2] = (0, import_react.useState)(() => r2 ? null : xy(o2().searchParams)), [c2] = (0, import_react.useState)(() => {
5310
+ let r3 = Jy(Md(e2), s2 ? null : ey(o2().searchParams), t2);
5311
+ return r3.by === `none` ? Aa(ob) : r3.by === `multi` ? Ma(A_({ key: g_(r3.serviceIds), refresh: n2 !== 0, warmupData: a2, fetchData: () => ha(`service-context-load-multi-service`, { feature: fa.service }, Ld(r3.serviceIds)) }), sb, cb) : Ma(A_({ key: h_(r3.by, r3.value), refresh: n2 !== 0, warmupData: a2, fetchData: () => ha(`service-context-load`, { feature: fa.service }, r3.by === `slug` ? Fd(r3.value) : Id(r3.value)) }), ib, ab);
5325
5312
  });
5326
- return (0, import_jsx_runtime.jsx)(gb, { servicePromise: c2, refreshSignal: n2, rescheduleRequest: s2, children: i2 });
5313
+ return (0, import_jsx_runtime.jsx)(db, { servicePromise: c2, refreshSignal: n2, rescheduleRequest: s2, children: i2 });
5327
5314
  }
5328
- function Sb({ serviceData: e2, servicePicker: t2, refreshSignal: n2 = 0, editingSurface: r2 = false, children: i2 }) {
5329
- let { pathname: a2 } = Oa(), o2 = t2?.serviceId?.$eq, c2 = e2?.service ?? null, l2 = (0, import_react.useMemo)(() => c2 ? { service: c2, masterEvents: e2?.masterEvents ?? ab, serviceOptionsAndVariants: e2?.serviceOptionsAndVariants ?? null, bookingsSettings: e2?.bookingsSettings } : null, [c2, e2?.masterEvents, e2?.serviceOptionsAndVariants, e2?.bookingsSettings]);
5330
- return l2 ? (0, import_jsx_runtime.jsx)(gb, { injected: l2, bookingsSettings: l2.bookingsSettings, children: i2 }, `injected:${n2}`) : e2 ? (0, import_jsx_runtime.jsx)(gb, { bookingsSettings: e2.bookingsSettings, children: i2 }) : (0, import_jsx_runtime.jsx)(xb, { pathname: a2, initialServiceId: o2, refreshSignal: n2, editingSurface: r2, children: i2 }, `fetch:${a2}:${o2 ?? ``}:${n2}:${r2}`);
5315
+ function _b({ serviceData: e2, servicePicker: t2, refreshSignal: n2 = 0, editingSurface: r2 = false, children: i2 }) {
5316
+ let { pathname: a2 } = Oa(), o2 = t2?.serviceId?.$eq, c2 = e2?.service ?? null, l2 = (0, import_react.useMemo)(() => c2 ? { service: c2, masterEvents: e2?.masterEvents ?? eb, serviceOptionsAndVariants: e2?.serviceOptionsAndVariants ?? null, bookingsSettings: e2?.bookingsSettings } : null, [c2, e2?.masterEvents, e2?.serviceOptionsAndVariants, e2?.bookingsSettings]);
5317
+ return l2 ? (0, import_jsx_runtime.jsx)(db, { injected: l2, bookingsSettings: l2.bookingsSettings, children: i2 }, `injected:${n2}`) : e2 ? (0, import_jsx_runtime.jsx)(db, { bookingsSettings: e2.bookingsSettings, children: i2 }) : (0, import_jsx_runtime.jsx)(gb, { pathname: a2, initialServiceId: o2, refreshSignal: n2, editingSurface: r2, children: i2 }, `fetch:${a2}:${o2 ?? ``}:${n2}:${r2}`);
5331
5318
  }
5332
- var Cb = ea;
5319
+ var vb = ea;
5333
5320
  // Annotate the CommonJS export names for ESM import in node:
5334
5321
  0 && (module.exports = {
5335
5322
  SERVICE_CONTEXT_MISSING_PROVIDER_ERROR,
@@ -5339,4 +5326,4 @@ var Cb = ea;
5339
5326
  serviceContext,
5340
5327
  useServiceContext
5341
5328
  });
5342
- //# sourceMappingURL=context-service-context.js.map
5329
+ //# sourceMappingURL=context-service.js.map