@wix/bookings 1.0.1777 → 1.0.1779

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 (56) hide show
  1. package/build/cjs/context-booking-checkout.d.ts +243 -108
  2. package/build/cjs/context-booking-checkout.js +176 -182
  3. package/build/cjs/context-booking-checkout.js.map +1 -1
  4. package/build/cjs/context-categories.d.ts +16 -143
  5. package/build/cjs/context-categories.js +411 -411
  6. package/build/cjs/context-categories.js.map +1 -1
  7. package/build/cjs/context-locations.d.ts +16 -287
  8. package/build/cjs/context-locations.js +335 -335
  9. package/build/cjs/context-locations.js.map +1 -1
  10. package/build/cjs/context-service-addons.d.ts +2 -2
  11. package/build/cjs/context-service.d.ts +71 -33
  12. package/build/cjs/context-service.js +97 -95
  13. package/build/cjs/context-service.js.map +1 -1
  14. package/build/cjs/context-time-slots.d.ts +10 -0
  15. package/build/cjs/context-time-slots.js +1 -1
  16. package/build/cjs/context-time-slots.js.map +1 -1
  17. package/build/es/context-booking-checkout.d.mts +243 -108
  18. package/build/es/context-booking-checkout.mjs +176 -179
  19. package/build/es/context-booking-checkout.mjs.map +1 -1
  20. package/build/es/context-categories.d.mts +16 -143
  21. package/build/es/context-categories.mjs +411 -411
  22. package/build/es/context-categories.mjs.map +1 -1
  23. package/build/es/context-locations.d.mts +16 -287
  24. package/build/es/context-locations.mjs +335 -335
  25. package/build/es/context-locations.mjs.map +1 -1
  26. package/build/es/context-service-addons.d.mts +2 -2
  27. package/build/es/context-service.d.mts +71 -33
  28. package/build/es/context-service.mjs +97 -95
  29. package/build/es/context-service.mjs.map +1 -1
  30. package/build/es/context-time-slots.d.mts +10 -0
  31. package/build/es/context-time-slots.mjs +1 -1
  32. package/build/es/context-time-slots.mjs.map +1 -1
  33. package/build/internal/cjs/context-booking-checkout.d.ts +243 -108
  34. package/build/internal/cjs/context-categories.d.ts +16 -143
  35. package/build/internal/cjs/context-locations.d.ts +16 -287
  36. package/build/internal/cjs/context-service-addons.d.ts +2 -2
  37. package/build/internal/cjs/context-service.d.ts +71 -33
  38. package/build/internal/cjs/context-time-slots.d.ts +10 -0
  39. package/build/internal/es/context-booking-checkout.d.mts +243 -108
  40. package/build/internal/es/context-categories.d.mts +16 -143
  41. package/build/internal/es/context-locations.d.mts +16 -287
  42. package/build/internal/es/context-service-addons.d.mts +2 -2
  43. package/build/internal/es/context-service.d.mts +71 -33
  44. package/build/internal/es/context-time-slots.d.mts +10 -0
  45. package/context-runtime/context-booking-checkout/runtime.d.ts +243 -108
  46. package/context-runtime/context-booking-checkout/runtime.js +3 -3
  47. package/context-runtime/context-categories/runtime.d.ts +16 -143
  48. package/context-runtime/context-categories/runtime.js +2 -2
  49. package/context-runtime/context-locations/runtime.d.ts +16 -287
  50. package/context-runtime/context-locations/runtime.js +2 -2
  51. package/context-runtime/context-service/runtime.d.ts +71 -33
  52. package/context-runtime/context-service/runtime.js +3 -3
  53. package/context-runtime/context-service-addons/runtime.d.ts +2 -2
  54. package/context-runtime/context-time-slots/runtime.d.ts +10 -0
  55. package/context-runtime/context-time-slots/runtime.js +2 -2
  56. package/package.json +7 -7
@@ -954,7 +954,7 @@ var wn = (e5) => Cn(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
954
954
  function Tn() {
955
955
  let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
956
956
  if (e5) return { initWixModules(t3, n3) {
957
- return En(() => e5(t3, n3));
957
+ return I(() => e5(t3, n3));
958
958
  }, fetchWithAuth() {
959
959
  throw Error(`fetchWithAuth is not available in this context`);
960
960
  }, graphql() {
@@ -964,10 +964,10 @@ function Tn() {
964
964
  if (t2 || n2) return { initWixModules(e6, r2) {
965
965
  if (r2) {
966
966
  if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
967
- return En(() => n2.use(e6));
967
+ return I(() => n2.use(e6));
968
968
  }
969
969
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
970
- return En(() => t2.use(e6));
970
+ return I(() => t2.use(e6));
971
971
  }, fetchWithAuth: (e6, n3) => {
972
972
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
973
973
  return t2.fetchWithAuth(e6, n3);
@@ -979,7 +979,7 @@ function Tn() {
979
979
  return t2.graphql(e6, n3, r2);
980
980
  } };
981
981
  }
982
- function En(e5) {
982
+ function I(e5) {
983
983
  let t2 = globalThis.__wix_context__, n2 = { client: p.client, elevatedClient: p.elevatedClient }, r2;
984
984
  globalThis.__wix_context__ = void 0, p.client = void 0, p.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
985
985
  try {
@@ -988,71 +988,71 @@ function En(e5) {
988
988
  globalThis.__wix_context__ = t2, p.client = n2.client, p.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
989
989
  }
990
990
  }
991
- function Dn(e5, t2) {
991
+ function En(e5, t2) {
992
992
  return { ...e5, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
993
993
  let r2 = Tn();
994
994
  if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
995
995
  return r2.initWixModules(e5)[t3].apply(void 0, n2);
996
996
  }])) };
997
997
  }
998
- function On(e5) {
999
- return Dn({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
998
+ function Dn(e5) {
999
+ return En({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
1000
1000
  }
1001
- var I = (e5) => typeof e5 == `string`;
1002
- var L = () => {
1001
+ var L = (e5) => typeof e5 == `string`;
1002
+ var R = () => {
1003
1003
  let e5, t2, n2 = new Promise((n3, r2) => {
1004
1004
  e5 = n3, t2 = r2;
1005
1005
  });
1006
1006
  return n2.resolve = e5, n2.reject = t2, n2;
1007
1007
  };
1008
- var kn = (e5) => e5 == null ? `` : `` + e5;
1009
- var An = (e5, t2, n2) => {
1008
+ var On = (e5) => e5 == null ? `` : `` + e5;
1009
+ var kn = (e5, t2, n2) => {
1010
1010
  e5.forEach((e6) => {
1011
1011
  t2[e6] && (n2[e6] = t2[e6]);
1012
1012
  });
1013
1013
  };
1014
- var jn = /###/g;
1015
- var Mn = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(jn, `.`) : e5;
1016
- var Nn = (e5) => !e5 || I(e5);
1017
- var R = (e5, t2, n2) => {
1018
- let r2 = I(t2) ? t2.split(`.`) : t2, i2 = 0;
1014
+ var An = /###/g;
1015
+ var jn = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(An, `.`) : e5;
1016
+ var Mn = (e5) => !e5 || L(e5);
1017
+ var z = (e5, t2, n2) => {
1018
+ let r2 = L(t2) ? t2.split(`.`) : t2, i2 = 0;
1019
1019
  for (; i2 < r2.length - 1; ) {
1020
- if (Nn(e5)) return {};
1021
- let t3 = Mn(r2[i2]);
1020
+ if (Mn(e5)) return {};
1021
+ let t3 = jn(r2[i2]);
1022
1022
  !e5[t3] && n2 && (e5[t3] = new n2()), e5 = Object.prototype.hasOwnProperty.call(e5, t3) ? e5[t3] : {}, ++i2;
1023
1023
  }
1024
- return Nn(e5) ? {} : { obj: e5, k: Mn(r2[i2]) };
1024
+ return Mn(e5) ? {} : { obj: e5, k: jn(r2[i2]) };
1025
1025
  };
1026
- var Pn = (e5, t2, n2) => {
1027
- let { obj: r2, k: i2 } = R(e5, t2, Object);
1026
+ var Nn = (e5, t2, n2) => {
1027
+ let { obj: r2, k: i2 } = z(e5, t2, Object);
1028
1028
  if (r2 !== void 0 || t2.length === 1) {
1029
1029
  r2[i2] = n2;
1030
1030
  return;
1031
1031
  }
1032
- let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = R(e5, o2, Object);
1033
- for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = R(e5, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1032
+ let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = z(e5, o2, Object);
1033
+ for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = z(e5, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1034
1034
  s2.obj[`${s2.k}.${a2}`] = n2;
1035
1035
  };
1036
- var Fn = (e5, t2, n2, r2) => {
1037
- let { obj: i2, k: a2 } = R(e5, t2, Object);
1036
+ var Pn = (e5, t2, n2, r2) => {
1037
+ let { obj: i2, k: a2 } = z(e5, t2, Object);
1038
1038
  i2[a2] = i2[a2] || [], i2[a2].push(n2);
1039
1039
  };
1040
- var z = (e5, t2) => {
1041
- let { obj: n2, k: r2 } = R(e5, t2);
1040
+ var B = (e5, t2) => {
1041
+ let { obj: n2, k: r2 } = z(e5, t2);
1042
1042
  if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
1043
1043
  };
1044
- var In = (e5, t2, n2) => {
1045
- let r2 = z(e5, n2);
1046
- return r2 === void 0 ? z(t2, n2) : r2;
1044
+ var Fn = (e5, t2, n2) => {
1045
+ let r2 = B(e5, n2);
1046
+ return r2 === void 0 ? B(t2, n2) : r2;
1047
1047
  };
1048
- var Ln = (e5, t2, n2) => {
1049
- for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? I(e5[r2]) || e5[r2] instanceof String || I(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : Ln(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
1048
+ var In = (e5, t2, n2) => {
1049
+ for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? L(e5[r2]) || e5[r2] instanceof String || L(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : In(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
1050
1050
  return e5;
1051
1051
  };
1052
- var B = (e5) => e5.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1053
- var Rn = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1054
- var zn = (e5) => I(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => Rn[e6]) : e5;
1055
- var Bn = class {
1052
+ var V = (e5) => e5.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1053
+ var Ln = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1054
+ var Rn = (e5) => L(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => Ln[e6]) : e5;
1055
+ var zn = class {
1056
1056
  constructor(e5) {
1057
1057
  this.capacity = e5, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
1058
1058
  }
@@ -1063,20 +1063,20 @@ var Bn = class {
1063
1063
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e5, n2), this.regExpQueue.push(e5), n2;
1064
1064
  }
1065
1065
  };
1066
- var Vn = [` `, `,`, `?`, `!`, `;`];
1067
- var Hn = new Bn(20);
1068
- var Un = (e5, t2, n2) => {
1066
+ var Bn = [` `, `,`, `?`, `!`, `;`];
1067
+ var Vn = new zn(20);
1068
+ var Hn = (e5, t2, n2) => {
1069
1069
  t2 ||= ``, n2 ||= ``;
1070
- let r2 = Vn.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1070
+ let r2 = Bn.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1071
1071
  if (r2.length === 0) return true;
1072
- let i2 = Hn.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1072
+ let i2 = Vn.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1073
1073
  if (!a2) {
1074
1074
  let t3 = e5.indexOf(n2);
1075
1075
  t3 > 0 && !i2.test(e5.substring(0, t3)) && (a2 = true);
1076
1076
  }
1077
1077
  return a2;
1078
1078
  };
1079
- var Wn = (e5, t2, n2 = `.`) => {
1079
+ var H = (e5, t2, n2 = `.`) => {
1080
1080
  if (!e5) return;
1081
1081
  if (e5[t2]) return Object.prototype.hasOwnProperty.call(e5, t2) ? e5[t2] : void 0;
1082
1082
  let r2 = t2.split(n2), i2 = e5;
@@ -1092,8 +1092,8 @@ var Wn = (e5, t2, n2 = `.`) => {
1092
1092
  }
1093
1093
  return i2;
1094
1094
  };
1095
- var V = (e5) => e5?.replace(/_/g, `-`);
1096
- var Gn = { type: `logger`, log(e5) {
1095
+ var U = (e5) => e5?.replace(/_/g, `-`);
1096
+ var Un = { type: `logger`, log(e5) {
1097
1097
  this.output(`log`, e5);
1098
1098
  }, warn(e5) {
1099
1099
  this.output(`warn`, e5);
@@ -1102,12 +1102,12 @@ var Gn = { type: `logger`, log(e5) {
1102
1102
  }, output(e5, t2) {
1103
1103
  console?.[e5]?.apply?.(console, t2);
1104
1104
  } };
1105
- var H = new class e2 {
1105
+ var W = new class e2 {
1106
1106
  constructor(e5, t2 = {}) {
1107
1107
  this.init(e5, t2);
1108
1108
  }
1109
1109
  init(e5, t2 = {}) {
1110
- this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Gn, this.options = t2, this.debug = t2.debug;
1110
+ this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Un, this.options = t2, this.debug = t2.debug;
1111
1111
  }
1112
1112
  log(...e5) {
1113
1113
  return this.forward(e5, `log`, ``, true);
@@ -1122,7 +1122,7 @@ var H = new class e2 {
1122
1122
  return this.forward(e5, `warn`, `WARNING DEPRECATED: `, true);
1123
1123
  }
1124
1124
  forward(e5, t2, n2, r2) {
1125
- return r2 && !this.debug ? null : (I(e5[0]) && (e5[0] = `${n2}${this.prefix} ${e5[0]}`), this.logger[t2](e5));
1125
+ return r2 && !this.debug ? null : (L(e5[0]) && (e5[0] = `${n2}${this.prefix} ${e5[0]}`), this.logger[t2](e5));
1126
1126
  }
1127
1127
  create(t2) {
1128
1128
  return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
@@ -1131,7 +1131,7 @@ var H = new class e2 {
1131
1131
  return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
1132
1132
  }
1133
1133
  }();
1134
- var U = class {
1134
+ var G = class {
1135
1135
  constructor() {
1136
1136
  this.observers = {};
1137
1137
  }
@@ -1159,7 +1159,7 @@ var U = class {
1159
1159
  });
1160
1160
  }
1161
1161
  };
1162
- var Kn = class extends U {
1162
+ var Wn = class extends G {
1163
1163
  constructor(e5, t2 = { ns: [`translation`], defaultNS: `translation` }) {
1164
1164
  super(), this.data = e5 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
1165
1165
  }
@@ -1172,23 +1172,23 @@ var Kn = class extends U {
1172
1172
  }
1173
1173
  getResource(e5, t2, n2, r2 = {}) {
1174
1174
  let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
1175
- e5.indexOf(`.`) > -1 ? o2 = e5.split(`.`) : (o2 = [e5, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : I(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
1176
- let s2 = z(this.data, o2);
1177
- return !s2 && !t2 && !n2 && e5.indexOf(`.`) > -1 && (e5 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !I(n2) ? s2 : Wn(this.data?.[e5]?.[t2], n2, i2);
1175
+ e5.indexOf(`.`) > -1 ? o2 = e5.split(`.`) : (o2 = [e5, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : L(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
1176
+ let s2 = B(this.data, o2);
1177
+ return !s2 && !t2 && !n2 && e5.indexOf(`.`) > -1 && (e5 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !L(n2) ? s2 : H(this.data?.[e5]?.[t2], n2, i2);
1178
1178
  }
1179
1179
  addResource(e5, t2, n2, r2, i2 = { silent: false }) {
1180
1180
  let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e5, t2];
1181
- n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Pn(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
1181
+ n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Nn(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
1182
1182
  }
1183
1183
  addResources(e5, t2, n2, r2 = { silent: false }) {
1184
- for (let r3 in n2) (I(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
1184
+ for (let r3 in n2) (L(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
1185
1185
  r2.silent || this.emit(`added`, e5, t2, n2);
1186
1186
  }
1187
1187
  addResourceBundle(e5, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
1188
1188
  let o2 = [e5, t2];
1189
1189
  e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
1190
- let s2 = z(this.data, o2) || {};
1191
- a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Ln(s2, n2, i2) : s2 = { ...s2, ...n2 }, Pn(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
1190
+ let s2 = B(this.data, o2) || {};
1191
+ a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? In(s2, n2, i2) : s2 = { ...s2, ...n2 }, Nn(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
1192
1192
  }
1193
1193
  removeResourceBundle(e5, t2) {
1194
1194
  this.hasResourceBundle(e5, t2) && delete this.data[e5][t2], this.removeNamespaces(t2), this.emit(`removed`, e5, t2);
@@ -1210,31 +1210,31 @@ var Kn = class extends U {
1210
1210
  return this.data;
1211
1211
  }
1212
1212
  };
1213
- var qn = { processors: {}, addPostProcessor(e5) {
1213
+ var Gn = { processors: {}, addPostProcessor(e5) {
1214
1214
  this.processors[e5.name] = e5;
1215
1215
  }, handle(e5, t2, n2, r2, i2) {
1216
1216
  return e5.forEach((e6) => {
1217
1217
  t2 = this.processors[e6]?.process(t2, n2, r2, i2) ?? t2;
1218
1218
  }), t2;
1219
1219
  } };
1220
- var Jn = Symbol(`i18next/PATH_KEY`);
1221
- function Yn() {
1220
+ var Kn = Symbol(`i18next/PATH_KEY`);
1221
+ function qn() {
1222
1222
  let e5 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
1223
- return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Jn ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1223
+ return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Kn ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1224
1224
  }
1225
- function W(e5, t2) {
1226
- let { [Jn]: n2 } = e5(Yn()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1225
+ function K(e5, t2) {
1226
+ let { [Kn]: n2 } = e5(qn()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1227
1227
  if (n2.length > 1 && i2) {
1228
1228
  let e6 = t2?.ns, a2 = Array.isArray(e6) ? e6 : null;
1229
1229
  if (a2 && a2.length > 1 && a2.slice(1).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
1230
1230
  }
1231
1231
  return n2.join(r2);
1232
1232
  }
1233
- var Xn = {};
1234
- var Zn = (e5) => !I(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1235
- var Qn = class e3 extends U {
1233
+ var Jn = {};
1234
+ var Yn = (e5) => !L(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1235
+ var Xn = class e3 extends G {
1236
1236
  constructor(e5, t2 = {}) {
1237
- super(), An([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = H.create(`translator`);
1237
+ super(), kn([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = W.create(`translator`);
1238
1238
  }
1239
1239
  changeLanguage(e5) {
1240
1240
  e5 && (this.language = e5);
@@ -1244,33 +1244,33 @@ var Qn = class e3 extends U {
1244
1244
  if (e5 == null) return false;
1245
1245
  let r2 = this.resolve(e5, n2);
1246
1246
  if (r2?.res === void 0) return false;
1247
- let i2 = Zn(r2.res);
1247
+ let i2 = Yn(r2.res);
1248
1248
  return !(n2.returnObjects === false && i2);
1249
1249
  }
1250
1250
  extractFromKey(e5, t2) {
1251
1251
  let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
1252
1252
  n2 === void 0 && (n2 = `:`);
1253
- let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e5.indexOf(n2) > -1, o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !Un(e5, n2, r2);
1253
+ let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e5.indexOf(n2) > -1, o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !Hn(e5, n2, r2);
1254
1254
  if (a2 && !o2) {
1255
1255
  let t3 = e5.match(this.interpolator.nestingRegexp);
1256
- if (t3 && t3.length > 0) return { key: e5, namespaces: I(i2) ? [i2] : i2 };
1256
+ if (t3 && t3.length > 0) return { key: e5, namespaces: L(i2) ? [i2] : i2 };
1257
1257
  let a3 = e5.split(n2);
1258
1258
  (n2 !== r2 || n2 === r2 && this.options.ns.indexOf(a3[0]) > -1) && (i2 = a3.shift()), e5 = a3.join(r2);
1259
1259
  }
1260
- return { key: e5, namespaces: I(i2) ? [i2] : i2 };
1260
+ return { key: e5, namespaces: L(i2) ? [i2] : i2 };
1261
1261
  }
1262
1262
  translate(t2, n2, r2) {
1263
1263
  let i2 = typeof n2 == `object` ? { ...n2 } : n2;
1264
1264
  if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
1265
- typeof t2 == `function` && (t2 = W(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e5) => typeof e5 == `function` ? W(e5, { ...this.options, ...i2 }) : String(e5));
1265
+ typeof t2 == `function` && (t2 = K(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e5) => typeof e5 == `function` ? K(e5, { ...this.options, ...i2 }) : String(e5));
1266
1266
  let a2 = i2.returnDetails === void 0 ? this.options.returnDetails : i2.returnDetails, o2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, { key: s2, namespaces: c2 } = this.extractFromKey(t2[t2.length - 1], i2), l2 = c2[c2.length - 1], u2 = i2.nsSeparator === void 0 ? this.options.nsSeparator : i2.nsSeparator;
1267
1267
  u2 === void 0 && (u2 = `:`);
1268
1268
  let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
1269
1269
  if (d2?.toLowerCase() === `cimode`) return f2 ? a2 ? { res: `${l2}${u2}${s2}`, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : `${l2}${u2}${s2}` : a2 ? { res: s2, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : s2;
1270
- let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !I(i2.count), x2 = e3.hasDefaultValue(i2), ee2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, te2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, S2 = b2 && !i2.ordinal && i2.count === 0, C2 = S2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${ee2}`] || i2[`defaultValue${te2}`] || i2.defaultValue, w2 = m2;
1270
+ let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !L(i2.count), x2 = e3.hasDefaultValue(i2), ee2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, te2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, S2 = b2 && !i2.ordinal && i2.count === 0, C2 = S2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${ee2}`] || i2[`defaultValue${te2}`] || i2.defaultValue, w2 = m2;
1271
1271
  y2 && !m2 && x2 && (w2 = C2);
1272
- let ne2 = Zn(w2), re2 = Object.prototype.toString.apply(w2);
1273
- if (y2 && w2 && ne2 && _2.indexOf(re2) < 0 && !(I(v2) && Array.isArray(w2))) {
1272
+ let ne2 = Yn(w2), re2 = Object.prototype.toString.apply(w2);
1273
+ if (y2 && w2 && ne2 && _2.indexOf(re2) < 0 && !(L(v2) && Array.isArray(w2))) {
1274
1274
  if (!i2.returnObjects && !this.options.returnObjects) {
1275
1275
  this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
1276
1276
  let e5 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, w2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
@@ -1280,11 +1280,11 @@ var Qn = class e3 extends U {
1280
1280
  let e5 = Array.isArray(w2), t3 = e5 ? [] : {}, n3 = e5 ? g2 : h2;
1281
1281
  for (let e6 in w2) if (Object.prototype.hasOwnProperty.call(w2, e6)) {
1282
1282
  let r3 = `${n3}${o2}${e6}`;
1283
- t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Zn(C2) ? C2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = w2[e6]);
1283
+ t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Yn(C2) ? C2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = w2[e6]);
1284
1284
  }
1285
1285
  m2 = t3;
1286
1286
  }
1287
- } else if (y2 && I(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1287
+ } else if (y2 && L(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1288
1288
  else {
1289
1289
  let e5 = false, n3 = false;
1290
1290
  !this.isValidLookup(m2) && x2 && (e5 = true, m2 = C2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
@@ -1316,32 +1316,32 @@ var Qn = class e3 extends U {
1316
1316
  if (this.i18nFormat?.parse) e5 = this.i18nFormat.parse(e5, { ...this.options.interpolation.defaultVariables, ...n2 }, n2.lng || this.language || r2.usedLng, r2.usedNS, r2.usedKey, { resolved: r2 });
1317
1317
  else if (!n2.skipInterpolation) {
1318
1318
  n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
1319
- let a3 = I(e5) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1319
+ let a3 = L(e5) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1320
1320
  if (a3) {
1321
1321
  let t3 = e5.match(this.interpolator.nestingRegexp);
1322
1322
  o3 = t3 && t3.length;
1323
1323
  }
1324
- let s2 = n2.replace && !I(n2.replace) ? n2.replace : n2;
1324
+ let s2 = n2.replace && !L(n2.replace) ? n2.replace : n2;
1325
1325
  if (this.options.interpolation.defaultVariables && (s2 = { ...this.options.interpolation.defaultVariables, ...s2 }), e5 = this.interpolator.interpolate(e5, s2, n2.lng || this.language || r2.usedLng, n2), a3) {
1326
1326
  let t3 = e5.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
1327
1327
  o3 < r3 && (n2.nest = false);
1328
1328
  }
1329
1329
  !n2.lng && r2 && r2.res && (n2.lng = this.language || r2.usedLng), n2.nest !== false && (e5 = this.interpolator.nest(e5, (...e6) => i2?.[0] === e6[0] && !n2.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e6[0]} in key: ${t2[0]}`), null) : this.translate(...e6, t2), n2)), n2.interpolation && this.interpolator.reset();
1330
1330
  }
1331
- let a2 = n2.postProcess || this.options.postProcess, o2 = I(a2) ? [a2] : a2;
1332
- return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = qn.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
1331
+ let a2 = n2.postProcess || this.options.postProcess, o2 = L(a2) ? [a2] : a2;
1332
+ return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = Gn.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
1333
1333
  }
1334
1334
  resolve(e5, t2 = {}) {
1335
1335
  let n2, r2, i2, a2, o2;
1336
- return I(e5) && (e5 = [e5]), Array.isArray(e5) && (e5 = e5.map((e6) => typeof e6 == `function` ? W(e6, { ...this.options, ...t2 }) : e6)), e5.forEach((e6) => {
1336
+ return L(e5) && (e5 = [e5]), Array.isArray(e5) && (e5 = e5.map((e6) => typeof e6 == `function` ? K(e6, { ...this.options, ...t2 }) : e6)), e5.forEach((e6) => {
1337
1337
  if (this.isValidLookup(n2)) return;
1338
1338
  let s2 = this.extractFromKey(e6, t2), c2 = s2.key;
1339
1339
  r2 = c2;
1340
1340
  let l2 = s2.namespaces;
1341
1341
  this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
1342
- let u2 = t2.count !== void 0 && !I(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (I(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1342
+ let u2 = t2.count !== void 0 && !L(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (L(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1343
1343
  l2.forEach((e7) => {
1344
- this.isValidLookup(n2) || (o2 = e7, !Xn[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (Xn[`${p2[0]}-${e7}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)), p2.forEach((r3) => {
1344
+ this.isValidLookup(n2) || (o2 = e7, !Jn[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (Jn[`${p2[0]}-${e7}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)), p2.forEach((r3) => {
1345
1345
  if (this.isValidLookup(n2)) return;
1346
1346
  a2 = r3;
1347
1347
  let o3 = [c2];
@@ -1368,7 +1368,7 @@ var Qn = class e3 extends U {
1368
1368
  return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e5, t2, n2, r2) : this.resourceStore.getResource(e5, t2, n2, r2);
1369
1369
  }
1370
1370
  getUsedParamsDetails(e5 = {}) {
1371
- let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e5.replace && !I(e5.replace), r2 = n2 ? e5.replace : e5;
1371
+ let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e5.replace && !L(e5.replace), r2 = n2 ? e5.replace : e5;
1372
1372
  if (n2 && e5.count !== void 0 && (r2.count = e5.count), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
1373
1373
  r2 = { ...r2 };
1374
1374
  for (let e6 of t2) delete r2[e6];
@@ -1380,22 +1380,22 @@ var Qn = class e3 extends U {
1380
1380
  return false;
1381
1381
  }
1382
1382
  };
1383
- var $n = class {
1383
+ var Zn = class {
1384
1384
  constructor(e5) {
1385
- this.options = e5, this.supportedLngs = this.options.supportedLngs || false, this.logger = H.create(`languageUtils`);
1385
+ this.options = e5, this.supportedLngs = this.options.supportedLngs || false, this.logger = W.create(`languageUtils`);
1386
1386
  }
1387
1387
  getScriptPartFromCode(e5) {
1388
- if (e5 = V(e5), !e5 || e5.indexOf(`-`) < 0) return null;
1388
+ if (e5 = U(e5), !e5 || e5.indexOf(`-`) < 0) return null;
1389
1389
  let t2 = e5.split(`-`);
1390
1390
  return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
1391
1391
  }
1392
1392
  getLanguagePartFromCode(e5) {
1393
- if (e5 = V(e5), !e5 || e5.indexOf(`-`) < 0) return e5;
1393
+ if (e5 = U(e5), !e5 || e5.indexOf(`-`) < 0) return e5;
1394
1394
  let t2 = e5.split(`-`);
1395
1395
  return this.formatLanguageCode(t2[0]);
1396
1396
  }
1397
1397
  formatLanguageCode(e5) {
1398
- if (I(e5) && e5.indexOf(`-`) > -1) {
1398
+ if (L(e5) && e5.indexOf(`-`) > -1) {
1399
1399
  let t2;
1400
1400
  try {
1401
1401
  t2 = Intl.getCanonicalLocales(e5)[0];
@@ -1428,7 +1428,7 @@ var $n = class {
1428
1428
  }
1429
1429
  getFallbackCodes(e5, t2) {
1430
1430
  if (!e5) return [];
1431
- if (typeof e5 == `function` && (e5 = e5(t2)), I(e5) && (e5 = [e5]), Array.isArray(e5)) return e5;
1431
+ if (typeof e5 == `function` && (e5 = e5(t2)), L(e5) && (e5 = [e5]), Array.isArray(e5)) return e5;
1432
1432
  if (!t2) return e5.default || [];
1433
1433
  let n2 = e5[t2];
1434
1434
  return n2 ||= e5[this.getScriptPartFromCode(t2)], n2 ||= e5[this.formatLanguageCode(t2)], n2 ||= e5[this.getLanguagePartFromCode(t2)], n2 ||= e5.default, n2 || [];
@@ -1437,29 +1437,29 @@ var $n = class {
1437
1437
  let n2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e5), r2 = [], i2 = (e6) => {
1438
1438
  e6 && (this.isSupportedCode(e6) ? r2.push(e6) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e6}`));
1439
1439
  };
1440
- return I(e5) && (e5.indexOf(`-`) > -1 || e5.indexOf(`_`) > -1) ? (this.options.load !== `languageOnly` && i2(this.formatLanguageCode(e5)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && i2(this.getScriptPartFromCode(e5)), this.options.load !== `currentOnly` && i2(this.getLanguagePartFromCode(e5))) : I(e5) && i2(this.formatLanguageCode(e5)), n2.forEach((e6) => {
1440
+ return L(e5) && (e5.indexOf(`-`) > -1 || e5.indexOf(`_`) > -1) ? (this.options.load !== `languageOnly` && i2(this.formatLanguageCode(e5)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && i2(this.getScriptPartFromCode(e5)), this.options.load !== `currentOnly` && i2(this.getLanguagePartFromCode(e5))) : L(e5) && i2(this.formatLanguageCode(e5)), n2.forEach((e6) => {
1441
1441
  r2.indexOf(e6) < 0 && i2(this.formatLanguageCode(e6));
1442
1442
  }), r2;
1443
1443
  }
1444
1444
  };
1445
- var er = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1446
- var tr = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1447
- var nr = class {
1445
+ var Qn = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1446
+ var $n = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1447
+ var er = class {
1448
1448
  constructor(e5, t2 = {}) {
1449
- this.languageUtils = e5, this.options = t2, this.logger = H.create(`pluralResolver`), this.pluralRulesCache = {};
1449
+ this.languageUtils = e5, this.options = t2, this.logger = W.create(`pluralResolver`), this.pluralRulesCache = {};
1450
1450
  }
1451
1451
  clearCache() {
1452
1452
  this.pluralRulesCache = {};
1453
1453
  }
1454
1454
  getRule(e5, t2 = {}) {
1455
- let n2 = V(e5 === `dev` ? `en` : e5), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
1455
+ let n2 = U(e5 === `dev` ? `en` : e5), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
1456
1456
  if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
1457
1457
  let a2;
1458
1458
  try {
1459
1459
  a2 = new Intl.PluralRules(n2, { type: r2 });
1460
1460
  } catch {
1461
- if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), tr;
1462
- if (!e5.match(/-|_/)) return tr;
1461
+ if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), $n;
1462
+ if (!e5.match(/-|_/)) return $n;
1463
1463
  let n3 = this.languageUtils.getLanguagePartFromCode(e5);
1464
1464
  a2 = this.getRule(n3, t2);
1465
1465
  }
@@ -1474,26 +1474,26 @@ var nr = class {
1474
1474
  }
1475
1475
  getSuffixes(e5, t2 = {}) {
1476
1476
  let n2 = this.getRule(e5, t2);
1477
- return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => er[e6] - er[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
1477
+ return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => Qn[e6] - Qn[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
1478
1478
  }
1479
1479
  getSuffix(e5, t2, n2 = {}) {
1480
1480
  let r2 = this.getRule(e5, n2);
1481
1481
  return r2 ? `${this.options.prepend}${n2.ordinal ? `ordinal${this.options.prepend}` : ``}${r2.select(t2)}` : (this.logger.warn(`no plural rule found for: ${e5}`), this.getSuffix(`dev`, t2, n2));
1482
1482
  }
1483
1483
  };
1484
- var rr = (e5, t2, n2, r2 = `.`, i2 = true) => {
1485
- let a2 = In(e5, t2, n2);
1486
- return !a2 && i2 && I(n2) && (a2 = Wn(e5, n2, r2), a2 === void 0 && (a2 = Wn(t2, n2, r2))), a2;
1484
+ var tr = (e5, t2, n2, r2 = `.`, i2 = true) => {
1485
+ let a2 = Fn(e5, t2, n2);
1486
+ return !a2 && i2 && L(n2) && (a2 = H(e5, n2, r2), a2 === void 0 && (a2 = H(t2, n2, r2))), a2;
1487
1487
  };
1488
- var ir = (e5) => e5.replace(/\$/g, `$$$$`);
1489
- var ar = class {
1488
+ var nr = (e5) => e5.replace(/\$/g, `$$$$`);
1489
+ var rr = class {
1490
1490
  constructor(e5 = {}) {
1491
- this.logger = H.create(`interpolator`), this.options = e5, this.format = e5?.interpolation?.format || ((e6) => e6), this.init(e5);
1491
+ this.logger = W.create(`interpolator`), this.options = e5, this.format = e5?.interpolation?.format || ((e6) => e6), this.init(e5);
1492
1492
  }
1493
1493
  init(e5 = {}) {
1494
1494
  e5.interpolation ||= { escapeValue: true };
1495
1495
  let { escape: t2, escapeValue: n2, useRawValueToEscape: r2, prefix: i2, prefixEscaped: a2, suffix: o2, suffixEscaped: s2, formatSeparator: c2, unescapeSuffix: l2, unescapePrefix: u2, nestingPrefix: d2, nestingPrefixEscaped: f2, nestingSuffix: p2, nestingSuffixEscaped: m2, nestingOptionsSeparator: h2, maxReplaces: g2, alwaysFormat: _2 } = e5.interpolation;
1496
- this.escape = t2 === void 0 ? zn : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? B(i2) : a2 || `{{`, this.suffix = o2 ? B(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? B(d2) : f2 || B(`$t(`), this.nestingSuffix = p2 ? B(p2) : m2 || B(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1496
+ this.escape = t2 === void 0 ? Rn : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? V(i2) : a2 || `{{`, this.suffix = o2 ? V(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? V(d2) : f2 || V(`$t(`), this.nestingSuffix = p2 ? V(p2) : m2 || V(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1497
1497
  }
1498
1498
  reset() {
1499
1499
  this.options && this.init(this.options);
@@ -1505,27 +1505,27 @@ var ar = class {
1505
1505
  interpolate(e5, t2, n2, r2) {
1506
1506
  let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e6) => {
1507
1507
  if (e6.indexOf(this.formatSeparator) < 0) {
1508
- let i4 = rr(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
1508
+ let i4 = tr(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
1509
1509
  return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e6 }) : i4;
1510
1510
  }
1511
1511
  let i3 = e6.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
1512
- return this.format(rr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1512
+ return this.format(tr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1513
1513
  };
1514
1514
  this.resetRegExp();
1515
1515
  let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
1516
- return [{ regex: this.regexpUnescape, safeValue: (e6) => ir(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? ir(this.escape(e6)) : ir(e6) }].forEach((t3) => {
1516
+ return [{ regex: this.regexpUnescape, safeValue: (e6) => nr(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? nr(this.escape(e6)) : nr(e6) }].forEach((t3) => {
1517
1517
  for (o2 = 0; i2 = t3.regex.exec(e5); ) {
1518
1518
  let n3 = i2[1].trim();
1519
1519
  if (a2 = c2(n3), a2 === void 0) {
1520
1520
  if (typeof l2 == `function`) {
1521
1521
  let t4 = l2(e5, i2, r2);
1522
- a2 = I(t4) ? t4 : ``;
1522
+ a2 = L(t4) ? t4 : ``;
1523
1523
  } else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
1524
1524
  else if (u2) {
1525
1525
  a2 = i2[0];
1526
1526
  continue;
1527
1527
  } else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e5}`), a2 = ``;
1528
- } else !I(a2) && !this.useRawValueToEscape && (a2 = kn(a2));
1528
+ } else !L(a2) && !this.useRawValueToEscape && (a2 = On(a2));
1529
1529
  let s3 = t3.safeValue(a2);
1530
1530
  if (e5 = e5.replace(i2[0], s3), u2 ? (t3.regex.lastIndex += a2.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
1531
1531
  }
@@ -1535,7 +1535,7 @@ var ar = class {
1535
1535
  let r2, i2, a2, o2 = (e6, t3) => {
1536
1536
  let n3 = this.nestingOptionsSeparator;
1537
1537
  if (e6.indexOf(n3) < 0) return e6;
1538
- let r3 = e6.split(RegExp(`${B(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
1538
+ let r3 = e6.split(RegExp(`${V(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
1539
1539
  e6 = r3[0], i3 = this.interpolate(i3, a2);
1540
1540
  let o3 = i3.match(/'/g), s2 = i3.match(/"/g);
1541
1541
  ((o3?.length ?? 0) % 2 == 0 && !s2 || (s2?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
@@ -1548,15 +1548,15 @@ var ar = class {
1548
1548
  };
1549
1549
  for (; r2 = this.nestingRegexp.exec(e5); ) {
1550
1550
  let s2 = [];
1551
- a2 = { ...n2 }, a2 = a2.replace && !I(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1551
+ a2 = { ...n2 }, a2 = a2.replace && !L(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1552
1552
  let c2 = /{.*}/.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
1553
- if (c2 !== -1 && (s2 = r2[1].slice(c2).split(this.formatSeparator).map((e6) => e6.trim()).filter(Boolean), r2[1] = r2[1].slice(0, c2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e5 && !I(i2)) return i2;
1554
- I(i2) || (i2 = kn(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e5}`), ``), s2.length && (i2 = s2.reduce((e6, t3) => this.format(e6, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), e5 = e5.replace(r2[0], i2), this.regexp.lastIndex = 0;
1553
+ if (c2 !== -1 && (s2 = r2[1].slice(c2).split(this.formatSeparator).map((e6) => e6.trim()).filter(Boolean), r2[1] = r2[1].slice(0, c2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e5 && !L(i2)) return i2;
1554
+ L(i2) || (i2 = On(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e5}`), ``), s2.length && (i2 = s2.reduce((e6, t3) => this.format(e6, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), e5 = e5.replace(r2[0], i2), this.regexp.lastIndex = 0;
1555
1555
  }
1556
1556
  return e5;
1557
1557
  }
1558
1558
  };
1559
- var or = (e5) => {
1559
+ var ir = (e5) => {
1560
1560
  let t2 = e5.toLowerCase().trim(), n2 = {};
1561
1561
  if (e5.indexOf(`(`) > -1) {
1562
1562
  let r2 = e5.split(`(`);
@@ -1571,23 +1571,23 @@ var or = (e5) => {
1571
1571
  }
1572
1572
  return { formatName: t2, formatOptions: n2 };
1573
1573
  };
1574
- var sr = (e5) => {
1574
+ var ar = (e5) => {
1575
1575
  let t2 = {};
1576
1576
  return (n2, r2, i2) => {
1577
1577
  let a2 = i2;
1578
1578
  i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
1579
1579
  let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
1580
- return s2 || (s2 = e5(V(r2), i2), t2[o2] = s2), s2(n2);
1580
+ return s2 || (s2 = e5(U(r2), i2), t2[o2] = s2), s2(n2);
1581
1581
  };
1582
1582
  };
1583
- var cr = (e5) => (t2, n2, r2) => e5(V(n2), r2)(t2);
1584
- var lr = class {
1583
+ var or = (e5) => (t2, n2, r2) => e5(U(n2), r2)(t2);
1584
+ var sr = class {
1585
1585
  constructor(e5 = {}) {
1586
- this.logger = H.create(`formatter`), this.options = e5, this.init(e5);
1586
+ this.logger = W.create(`formatter`), this.options = e5, this.init(e5);
1587
1587
  }
1588
1588
  init(e5, t2 = { interpolation: {} }) {
1589
1589
  this.formatSeparator = t2.interpolation.formatSeparator || `,`;
1590
- let n2 = t2.cacheInBuiltFormats ? sr : cr;
1590
+ let n2 = t2.cacheInBuiltFormats ? ar : or;
1591
1591
  this.formats = { number: n2((e6, t3) => {
1592
1592
  let n3 = new Intl.NumberFormat(e6, { ...t3 });
1593
1593
  return (e7) => n3.format(e7);
@@ -1609,7 +1609,7 @@ var lr = class {
1609
1609
  this.formats[e5.toLowerCase().trim()] = t2;
1610
1610
  }
1611
1611
  addCached(e5, t2) {
1612
- this.formats[e5.toLowerCase().trim()] = sr(t2);
1612
+ this.formats[e5.toLowerCase().trim()] = ar(t2);
1613
1613
  }
1614
1614
  format(e5, t2, n2, r2 = {}) {
1615
1615
  let i2 = t2.split(this.formatSeparator);
@@ -1618,7 +1618,7 @@ var lr = class {
1618
1618
  i2[0] = [i2[0], ...i2.splice(1, e6)].join(this.formatSeparator);
1619
1619
  }
1620
1620
  return i2.reduce((e6, t3) => {
1621
- let { formatName: i3, formatOptions: a2 } = or(t3);
1621
+ let { formatName: i3, formatOptions: a2 } = ir(t3);
1622
1622
  if (this.formats[i3]) {
1623
1623
  let t4 = e6;
1624
1624
  try {
@@ -1633,12 +1633,12 @@ var lr = class {
1633
1633
  }, e5);
1634
1634
  }
1635
1635
  };
1636
- var ur = (e5, t2) => {
1636
+ var cr = (e5, t2) => {
1637
1637
  e5.pending[t2] !== void 0 && (delete e5.pending[t2], e5.pendingCount--);
1638
1638
  };
1639
- var dr = class extends U {
1639
+ var lr = class extends G {
1640
1640
  constructor(e5, t2, n2, r2 = {}) {
1641
- super(), this.backend = e5, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = H.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
1641
+ super(), this.backend = e5, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = W.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
1642
1642
  }
1643
1643
  queueLoad(e5, t2, n2, r2) {
1644
1644
  let i2 = {}, a2 = {}, o2 = {}, s2 = {};
@@ -1655,7 +1655,7 @@ var dr = class extends U {
1655
1655
  t2 && this.emit(`failedLoading`, i2, a2, t2), !t2 && n2 && this.store.addResourceBundle(i2, a2, n2, void 0, void 0, { skipCopy: true }), this.state[e5] = t2 ? -1 : 2, t2 && n2 && (this.state[e5] = 0);
1656
1656
  let o2 = {};
1657
1657
  this.queue.forEach((n3) => {
1658
- Fn(n3.loaded, [i2], a2), ur(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
1658
+ Pn(n3.loaded, [i2], a2), cr(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
1659
1659
  o2[e6] || (o2[e6] = {});
1660
1660
  let t3 = n3.loaded[e6];
1661
1661
  t3.length && t3.forEach((t4) => {
@@ -1697,7 +1697,7 @@ var dr = class extends U {
1697
1697
  }
1698
1698
  prepareLoading(e5, t2, n2 = {}, r2) {
1699
1699
  if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
1700
- I(e5) && (e5 = this.languageUtils.toResolveHierarchy(e5)), I(t2) && (t2 = [t2]);
1700
+ L(e5) && (e5 = this.languageUtils.toResolveHierarchy(e5)), L(t2) && (t2 = [t2]);
1701
1701
  let i2 = this.queueLoad(e5, t2, n2, r2);
1702
1702
  if (!i2.toLoad.length) return i2.pending.length || r2(), null;
1703
1703
  i2.toLoad.forEach((e6) => {
@@ -1737,9 +1737,9 @@ var dr = class extends U {
1737
1737
  }
1738
1738
  }
1739
1739
  };
1740
- var fr = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, simplifyPluralSuffix: true, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e5) => {
1740
+ var ur = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, simplifyPluralSuffix: true, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e5) => {
1741
1741
  let t2 = {};
1742
- if (typeof e5[1] == `object` && (t2 = e5[1]), I(e5[1]) && (t2.defaultValue = e5[1]), I(e5[2]) && (t2.tDescription = e5[2]), typeof e5[2] == `object` || typeof e5[3] == `object`) {
1742
+ if (typeof e5[1] == `object` && (t2 = e5[1]), L(e5[1]) && (t2.defaultValue = e5[1]), L(e5[2]) && (t2.tDescription = e5[2]), typeof e5[2] == `object` || typeof e5[3] == `object`) {
1743
1743
  let n2 = e5[3] || e5[2];
1744
1744
  Object.keys(n2).forEach((e6) => {
1745
1745
  t2[e6] = n2[e6];
@@ -1747,23 +1747,23 @@ var fr = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
1747
1747
  }
1748
1748
  return t2;
1749
1749
  }, interpolation: { escapeValue: true, format: (e5) => e5, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
1750
- var pr = (e5) => (I(e5.ns) && (e5.ns = [e5.ns]), I(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), I(e5.fallbackNS) && (e5.fallbackNS = [e5.fallbackNS]), e5.supportedLngs?.indexOf?.(`cimode`) < 0 && (e5.supportedLngs = e5.supportedLngs.concat([`cimode`])), typeof e5.initImmediate == `boolean` && (e5.initAsync = e5.initImmediate), e5);
1751
- var G = () => {
1750
+ var dr = (e5) => (L(e5.ns) && (e5.ns = [e5.ns]), L(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), L(e5.fallbackNS) && (e5.fallbackNS = [e5.fallbackNS]), e5.supportedLngs?.indexOf?.(`cimode`) < 0 && (e5.supportedLngs = e5.supportedLngs.concat([`cimode`])), typeof e5.initImmediate == `boolean` && (e5.initAsync = e5.initImmediate), e5);
1751
+ var q = () => {
1752
1752
  };
1753
- var mr = (e5) => {
1753
+ var fr = (e5) => {
1754
1754
  Object.getOwnPropertyNames(Object.getPrototypeOf(e5)).forEach((t2) => {
1755
1755
  typeof e5[t2] == `function` && (e5[t2] = e5[t2].bind(e5));
1756
1756
  });
1757
1757
  };
1758
- var hr = `__i18next_supportNoticeShown`;
1759
- var gr = () => !!(typeof globalThis < `u` && globalThis[hr] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
1760
- var _r = () => {
1761
- typeof globalThis < `u` && (globalThis[hr] = true);
1758
+ var pr = `__i18next_supportNoticeShown`;
1759
+ var mr = () => !!(typeof globalThis < `u` && globalThis[pr] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
1760
+ var hr = () => {
1761
+ typeof globalThis < `u` && (globalThis[pr] = true);
1762
1762
  };
1763
- var vr = (e5) => !!(e5?.modules?.backend?.name?.indexOf(`Locize`) > 0 || e5?.modules?.backend?.constructor?.name?.indexOf(`Locize`) > 0 || e5?.options?.backend?.backends && e5.options.backend.backends.some((e6) => e6?.name?.indexOf(`Locize`) > 0 || e6?.constructor?.name?.indexOf(`Locize`) > 0) || e5?.options?.backend?.projectId || e5?.options?.backend?.backendOptions && e5.options.backend.backendOptions.some((e6) => e6?.projectId));
1764
- var K = class e4 extends U {
1763
+ var gr = (e5) => !!(e5?.modules?.backend?.name?.indexOf(`Locize`) > 0 || e5?.modules?.backend?.constructor?.name?.indexOf(`Locize`) > 0 || e5?.options?.backend?.backends && e5.options.backend.backends.some((e6) => e6?.name?.indexOf(`Locize`) > 0 || e6?.constructor?.name?.indexOf(`Locize`) > 0) || e5?.options?.backend?.projectId || e5?.options?.backend?.backendOptions && e5.options.backend.backendOptions.some((e6) => e6?.projectId));
1764
+ var J = class e4 extends G {
1765
1765
  constructor(e5 = {}, t2) {
1766
- if (super(), this.options = pr(e5), this.services = {}, this.logger = H, this.modules = { external: [] }, mr(this), t2 && !this.isInitialized && !e5.isClone) {
1766
+ if (super(), this.options = dr(e5), this.services = {}, this.logger = W, this.modules = { external: [] }, fr(this), t2 && !this.isInitialized && !e5.isClone) {
1767
1767
  if (!this.options.initAsync) return this.init(e5, t2), this;
1768
1768
  setTimeout(() => {
1769
1769
  this.init(e5, t2);
@@ -1771,26 +1771,26 @@ var K = class e4 extends U {
1771
1771
  }
1772
1772
  }
1773
1773
  init(e5 = {}, t2) {
1774
- this.isInitializing = true, typeof e5 == `function` && (t2 = e5, e5 = {}), e5.defaultNS == null && e5.ns && (I(e5.ns) ? e5.defaultNS = e5.ns : e5.ns.indexOf(`translation`) < 0 && (e5.defaultNS = e5.ns[0]));
1775
- let n2 = fr();
1776
- this.options = { ...n2, ...this.options, ...pr(e5) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e5.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e5.keySeparator), e5.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e5.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler), this.options.showSupportNotice !== false && !vr(this) && !gr() && (typeof console < `u` && console.info !== void 0 && console.info(`\u{1F310} i18next is made possible by our own product, Locize \u2014 consider powering your project with managed localization (AI, CDN, integrations): https://locize.com \u{1F499}`), _r());
1774
+ this.isInitializing = true, typeof e5 == `function` && (t2 = e5, e5 = {}), e5.defaultNS == null && e5.ns && (L(e5.ns) ? e5.defaultNS = e5.ns : e5.ns.indexOf(`translation`) < 0 && (e5.defaultNS = e5.ns[0]));
1775
+ let n2 = ur();
1776
+ this.options = { ...n2, ...this.options, ...dr(e5) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e5.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e5.keySeparator), e5.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e5.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler), this.options.showSupportNotice !== false && !gr(this) && !mr() && (typeof console < `u` && console.info !== void 0 && console.info(`\u{1F310} i18next is made possible by our own product, Locize \u2014 consider powering your project with managed localization (AI, CDN, integrations): https://locize.com \u{1F499}`), hr());
1777
1777
  let r2 = (e6) => e6 ? typeof e6 == `function` ? new e6() : e6 : null;
1778
1778
  if (!this.options.isClone) {
1779
- this.modules.logger ? H.init(r2(this.modules.logger), this.options) : H.init(null, this.options);
1779
+ this.modules.logger ? W.init(r2(this.modules.logger), this.options) : W.init(null, this.options);
1780
1780
  let e6;
1781
- e6 = this.modules.formatter ? this.modules.formatter : lr;
1782
- let t3 = new $n(this.options);
1783
- this.store = new Kn(this.options.resources, this.options);
1781
+ e6 = this.modules.formatter ? this.modules.formatter : sr;
1782
+ let t3 = new Zn(this.options);
1783
+ this.store = new Wn(this.options.resources, this.options);
1784
1784
  let i3 = this.services;
1785
- i3.logger = H, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new nr(t3, { prepend: this.options.pluralSeparator, simplifyPluralSuffix: this.options.simplifyPluralSuffix }), this.options.interpolation.format && this.options.interpolation.format !== n2.interpolation.format && this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`), e6 && (!this.options.interpolation.format || this.options.interpolation.format === n2.interpolation.format) && (i3.formatter = r2(e6), i3.formatter.init && i3.formatter.init(i3, this.options), this.options.interpolation.format = i3.formatter.format.bind(i3.formatter)), i3.interpolator = new ar(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new dr(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
1785
+ i3.logger = W, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new er(t3, { prepend: this.options.pluralSeparator, simplifyPluralSuffix: this.options.simplifyPluralSuffix }), this.options.interpolation.format && this.options.interpolation.format !== n2.interpolation.format && this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`), e6 && (!this.options.interpolation.format || this.options.interpolation.format === n2.interpolation.format) && (i3.formatter = r2(e6), i3.formatter.init && i3.formatter.init(i3, this.options), this.options.interpolation.format = i3.formatter.format.bind(i3.formatter)), i3.interpolator = new rr(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new lr(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
1786
1786
  this.emit(e7, ...t4);
1787
- }), this.modules.languageDetector && (i3.languageDetector = r2(this.modules.languageDetector), i3.languageDetector.init && i3.languageDetector.init(i3, this.options.detection, this.options)), this.modules.i18nFormat && (i3.i18nFormat = r2(this.modules.i18nFormat), i3.i18nFormat.init && i3.i18nFormat.init(this)), this.translator = new Qn(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
1787
+ }), this.modules.languageDetector && (i3.languageDetector = r2(this.modules.languageDetector), i3.languageDetector.init && i3.languageDetector.init(i3, this.options.detection, this.options)), this.modules.i18nFormat && (i3.i18nFormat = r2(this.modules.i18nFormat), i3.i18nFormat.init && i3.i18nFormat.init(this)), this.translator = new Xn(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
1788
1788
  this.emit(e7, ...t4);
1789
1789
  }), this.modules.external.forEach((e7) => {
1790
1790
  e7.init && e7.init(this);
1791
1791
  });
1792
1792
  }
1793
- if (this.format = this.options.interpolation.format, t2 ||= G, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1793
+ if (this.format = this.options.interpolation.format, t2 ||= q, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1794
1794
  let e6 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1795
1795
  e6.length > 0 && e6[0] !== `dev` && (this.options.lng = e6[0]);
1796
1796
  }
@@ -1799,7 +1799,7 @@ var K = class e4 extends U {
1799
1799
  }), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e6) => {
1800
1800
  this[e6] = (...t3) => (this.store[e6](...t3), this);
1801
1801
  });
1802
- let i2 = L(), a2 = () => {
1802
+ let i2 = R(), a2 = () => {
1803
1803
  let e6 = (e7, n3) => {
1804
1804
  this.isInitializing = false, this.isInitialized && !this.initializedStoreOnce && this.logger.warn(`init: i18next is already initialized. You should call init just once!`), this.isInitialized = true, this.options.isClone || this.logger.log(`initialized`, this.options), this.emit(`initialized`, this.options), i2.resolve(n3), t2(e7, n3);
1805
1805
  };
@@ -1808,8 +1808,8 @@ var K = class e4 extends U {
1808
1808
  };
1809
1809
  return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
1810
1810
  }
1811
- loadResources(e5, t2 = G) {
1812
- let n2 = t2, r2 = I(e5) ? e5 : this.language;
1811
+ loadResources(e5, t2 = q) {
1812
+ let n2 = t2, r2 = L(e5) ? e5 : this.language;
1813
1813
  if (typeof e5 == `function` && (n2 = e5), !this.options.resources || this.options.partialBundledLanguages) {
1814
1814
  if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
1815
1815
  let e6 = [], t3 = (t4) => {
@@ -1823,15 +1823,15 @@ var K = class e4 extends U {
1823
1823
  } else n2(null);
1824
1824
  }
1825
1825
  reloadResources(e5, t2, n2) {
1826
- let r2 = L();
1827
- return typeof e5 == `function` && (n2 = e5, e5 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e5 ||= this.languages, t2 ||= this.options.ns, n2 ||= G, this.services.backendConnector.reload(e5, t2, (e6) => {
1826
+ let r2 = R();
1827
+ return typeof e5 == `function` && (n2 = e5, e5 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e5 ||= this.languages, t2 ||= this.options.ns, n2 ||= q, this.services.backendConnector.reload(e5, t2, (e6) => {
1828
1828
  r2.resolve(), n2(e6);
1829
1829
  }), r2;
1830
1830
  }
1831
1831
  use(e5) {
1832
1832
  if (!e5) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
1833
1833
  if (!e5.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
1834
- return e5.type === `backend` && (this.modules.backend = e5), (e5.type === `logger` || e5.log && e5.warn && e5.error) && (this.modules.logger = e5), e5.type === `languageDetector` && (this.modules.languageDetector = e5), e5.type === `i18nFormat` && (this.modules.i18nFormat = e5), e5.type === `postProcessor` && qn.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
1834
+ return e5.type === `backend` && (this.modules.backend = e5), (e5.type === `logger` || e5.log && e5.warn && e5.error) && (this.modules.logger = e5), e5.type === `languageDetector` && (this.modules.languageDetector = e5), e5.type === `i18nFormat` && (this.modules.i18nFormat = e5), e5.type === `postProcessor` && Gn.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
1835
1835
  }
1836
1836
  setResolvedLanguage(e5) {
1837
1837
  if (e5 && this.languages && !([`cimode`, `dev`].indexOf(e5) > -1)) {
@@ -1847,7 +1847,7 @@ var K = class e4 extends U {
1847
1847
  }
1848
1848
  changeLanguage(e5, t2) {
1849
1849
  this.isLanguageChangingTo = e5;
1850
- let n2 = L();
1850
+ let n2 = R();
1851
1851
  this.emit(`languageChanging`, e5);
1852
1852
  let r2 = (e6) => {
1853
1853
  this.language = e6, this.languages = this.services.languageUtils.toResolveHierarchy(e6), this.resolvedLanguage = void 0, this.setResolvedLanguage(e6);
@@ -1855,7 +1855,7 @@ var K = class e4 extends U {
1855
1855
  a3 ? this.isLanguageChangingTo === e5 && (r2(a3), this.translator.changeLanguage(a3), this.isLanguageChangingTo = void 0, this.emit(`languageChanged`, a3), this.logger.log(`languageChanged`, a3)) : this.isLanguageChangingTo = void 0, n2.resolve((...e6) => this.t(...e6)), t2 && t2(i3, (...e6) => this.t(...e6));
1856
1856
  }, a2 = (t3) => {
1857
1857
  !e5 && !t3 && this.services.languageDetector && (t3 = []);
1858
- let n3 = I(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(I(t3) ? [t3] : t3);
1858
+ let n3 = L(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(L(t3) ? [t3] : t3);
1859
1859
  a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e6) => {
1860
1860
  i2(e6, a3);
1861
1861
  });
@@ -1867,11 +1867,11 @@ var K = class e4 extends U {
1867
1867
  let a2;
1868
1868
  a2 = typeof t3 == `object` ? { ...t3 } : this.options.overloadTranslationOptionHandler([e6, t3].concat(i2)), a2.lng = a2.lng || r2.lng, a2.lngs = a2.lngs || r2.lngs, a2.ns = a2.ns || r2.ns, a2.keyPrefix !== `` && (a2.keyPrefix = a2.keyPrefix || n2 || r2.keyPrefix);
1869
1869
  let o2 = { ...this.options, ...a2 };
1870
- typeof a2.keyPrefix == `function` && (a2.keyPrefix = W(a2.keyPrefix, o2));
1870
+ typeof a2.keyPrefix == `function` && (a2.keyPrefix = K(a2.keyPrefix, o2));
1871
1871
  let s2 = this.options.keySeparator || `.`, c2;
1872
- return a2.keyPrefix && Array.isArray(e6) ? c2 = e6.map((e7) => (typeof e7 == `function` && (e7 = W(e7, o2)), `${a2.keyPrefix}${s2}${e7}`)) : (typeof e6 == `function` && (e6 = W(e6, o2)), c2 = a2.keyPrefix ? `${a2.keyPrefix}${s2}${e6}` : e6), this.t(c2, a2);
1872
+ return a2.keyPrefix && Array.isArray(e6) ? c2 = e6.map((e7) => (typeof e7 == `function` && (e7 = K(e7, o2)), `${a2.keyPrefix}${s2}${e7}`)) : (typeof e6 == `function` && (e6 = K(e6, o2)), c2 = a2.keyPrefix ? `${a2.keyPrefix}${s2}${e6}` : e6), this.t(c2, a2);
1873
1873
  };
1874
- return I(e5) ? r2.lng = e5 : r2.lngs = e5, r2.ns = t2, r2.keyPrefix = n2, r2;
1874
+ return L(e5) ? r2.lng = e5 : r2.lngs = e5, r2.ns = t2, r2.keyPrefix = n2, r2;
1875
1875
  }
1876
1876
  t(...e5) {
1877
1877
  return this.translator?.translate(...e5);
@@ -1898,16 +1898,16 @@ var K = class e4 extends U {
1898
1898
  return !!(this.hasResourceBundle(n2, e5) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a2(n2, e5) && (!r2 || a2(i2, e5)));
1899
1899
  }
1900
1900
  loadNamespaces(e5, t2) {
1901
- let n2 = L();
1902
- return this.options.ns ? (I(e5) && (e5 = [e5]), e5.forEach((e6) => {
1901
+ let n2 = R();
1902
+ return this.options.ns ? (L(e5) && (e5 = [e5]), e5.forEach((e6) => {
1903
1903
  this.options.ns.indexOf(e6) < 0 && this.options.ns.push(e6);
1904
1904
  }), this.loadResources((e6) => {
1905
1905
  n2.resolve(), t2 && t2(e6);
1906
1906
  }), n2) : (t2 && t2(), Promise.resolve());
1907
1907
  }
1908
1908
  loadLanguages(e5, t2) {
1909
- let n2 = L();
1910
- I(e5) && (e5 = [e5]);
1909
+ let n2 = R();
1910
+ L(e5) && (e5 = [e5]);
1911
1911
  let r2 = this.options.preload || [], i2 = e5.filter((e6) => r2.indexOf(e6) < 0 && this.services.languageUtils.isSupportedCode(e6));
1912
1912
  return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e6) => {
1913
1913
  n2.resolve(), t2 && t2(e6);
@@ -1923,24 +1923,24 @@ var K = class e4 extends U {
1923
1923
  }
1924
1924
  } catch {
1925
1925
  }
1926
- let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new $n(fr());
1926
+ let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new Zn(ur());
1927
1927
  return e5.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.indexOf(n2.getLanguagePartFromCode(e5)) > -1 || e5.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
1928
1928
  }
1929
1929
  static createInstance(t2 = {}, n2) {
1930
1930
  let r2 = new e4(t2, n2);
1931
1931
  return r2.createInstance = e4.createInstance, r2;
1932
1932
  }
1933
- cloneInstance(t2 = {}, n2 = G) {
1933
+ cloneInstance(t2 = {}, n2 = q) {
1934
1934
  let r2 = t2.forkResourceStore;
1935
1935
  r2 && delete t2.forkResourceStore;
1936
1936
  let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
1937
1937
  if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e5) => {
1938
1938
  a2[e5] = this[e5];
1939
- }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Kn(Object.keys(this.store.data).reduce((e5, t3) => (e5[t3] = { ...this.store.data[t3] }, e5[t3] = Object.keys(e5[t3]).reduce((n3, r3) => (n3[r3] = { ...e5[t3][r3] }, n3), e5[t3]), e5), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
1940
- let e5 = { ...fr().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
1941
- a2.services.interpolator = new ar(n3);
1939
+ }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Wn(Object.keys(this.store.data).reduce((e5, t3) => (e5[t3] = { ...this.store.data[t3] }, e5[t3] = Object.keys(e5[t3]).reduce((n3, r3) => (n3[r3] = { ...e5[t3][r3] }, n3), e5[t3]), e5), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
1940
+ let e5 = { ...ur().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
1941
+ a2.services.interpolator = new rr(n3);
1942
1942
  }
1943
- return a2.translator = new Qn(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
1943
+ return a2.translator = new Xn(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
1944
1944
  a2.emit(e5, ...t3);
1945
1945
  }), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
1946
1946
  }
@@ -1948,54 +1948,54 @@ var K = class e4 extends U {
1948
1948
  return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
1949
1949
  }
1950
1950
  }.createInstance();
1951
- K.createInstance, K.dir, K.init, K.loadResources, K.reloadResources, K.use, K.changeLanguage, K.getFixedT, K.t, K.exists, K.setDefaultNamespace, K.hasLoadedNamespace, K.loadNamespaces, K.loadLanguages;
1952
- var yr = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
1953
- var br = { "&amp;": `&`, "&#38;": `&`, "&lt;": `<`, "&#60;": `<`, "&gt;": `>`, "&#62;": `>`, "&apos;": `'`, "&#39;": `'`, "&quot;": `"`, "&#34;": `"`, "&nbsp;": ` `, "&#160;": ` `, "&copy;": `\xA9`, "&#169;": `\xA9`, "&reg;": `\xAE`, "&#174;": `\xAE`, "&hellip;": `\u2026`, "&#8230;": `\u2026`, "&#x2F;": `/`, "&#47;": `/` };
1954
- var xr = (e5) => br[e5];
1955
- var Sr = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(yr, xr), transDefaultProps: void 0 };
1956
- var Cr = (e5 = {}) => {
1957
- Sr = { ...Sr, ...e5 };
1951
+ J.createInstance, J.dir, J.init, J.loadResources, J.reloadResources, J.use, J.changeLanguage, J.getFixedT, J.t, J.exists, J.setDefaultNamespace, J.hasLoadedNamespace, J.loadNamespaces, J.loadLanguages;
1952
+ var _r = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
1953
+ var vr = { "&amp;": `&`, "&#38;": `&`, "&lt;": `<`, "&#60;": `<`, "&gt;": `>`, "&#62;": `>`, "&apos;": `'`, "&#39;": `'`, "&quot;": `"`, "&#34;": `"`, "&nbsp;": ` `, "&#160;": ` `, "&copy;": `\xA9`, "&#169;": `\xA9`, "&reg;": `\xAE`, "&#174;": `\xAE`, "&hellip;": `\u2026`, "&#8230;": `\u2026`, "&#x2F;": `/`, "&#47;": `/` };
1954
+ var yr = (e5) => vr[e5];
1955
+ var br = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(_r, yr), transDefaultProps: void 0 };
1956
+ var xr = (e5 = {}) => {
1957
+ br = { ...br, ...e5 };
1958
1958
  };
1959
- var wr = { type: `3rdParty`, init(e5) {
1960
- Cr(e5.options.react);
1959
+ var Sr = { type: `3rdParty`, init(e5) {
1960
+ xr(e5.options.react);
1961
1961
  } };
1962
- var q = /* @__PURE__ */ new Map();
1963
- var Tr = 500;
1964
- var J;
1965
- function Er() {
1966
- if (J === void 0) try {
1967
- J = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
1962
+ var Y = /* @__PURE__ */ new Map();
1963
+ var Cr = 500;
1964
+ var X;
1965
+ function wr() {
1966
+ if (X === void 0) try {
1967
+ X = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
1968
1968
  } catch {
1969
- J = false;
1969
+ X = false;
1970
1970
  }
1971
- return J;
1971
+ return X;
1972
1972
  }
1973
- var Dr = 15;
1974
- function Or(e5) {
1975
- if (!(typeof e5 != `string` || Er()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > Dr) throw Error(`Cannot format the amount '${e5}' exactly: this runtime's Intl implementation predates ES2023 string support and would lose precision. Use a runtime with ES2023 Intl support (for example Node 20+), or pass a value within 15 significant digits.`);
1973
+ var Tr = 15;
1974
+ function Er(e5) {
1975
+ if (!(typeof e5 != `string` || wr()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > Tr) throw Error(`Cannot format the amount '${e5}' exactly: this runtime's Intl implementation predates ES2023 string support and would lose precision. Use a runtime with ES2023 Intl support (for example Node 20+), or pass a value within 15 significant digits.`);
1976
1976
  }
1977
- function kr(e5, t2, n2) {
1977
+ function Dr(e5, t2, n2) {
1978
1978
  return `${e5}|${t2}|${Object.entries(n2).filter(([, e6]) => e6 !== void 0).sort(([e6], [t3]) => e6 < t3 ? -1 : 1).map(([e6, t3]) => `${e6}=${String(t3)}`).join(`&`)}`;
1979
1979
  }
1980
- function Ar(e5, t2, n2) {
1981
- let r2 = kr(e5, t2, n2), i2 = q.get(r2);
1982
- return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), q.size >= Tr && q.clear(), q.set(r2, i2)), i2;
1980
+ function Or(e5, t2, n2) {
1981
+ let r2 = Dr(e5, t2, n2), i2 = Y.get(r2);
1982
+ return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), Y.size >= Cr && Y.clear(), Y.set(r2, i2)), i2;
1983
1983
  }
1984
- function jr(e5, { value: t2, currency: n2 }, r2 = {}) {
1985
- return Or(t2), Ar(e5, n2, r2).format(t2);
1984
+ function kr(e5, { value: t2, currency: n2 }, r2 = {}) {
1985
+ return Er(t2), Or(e5, n2, r2).format(t2);
1986
1986
  }
1987
- function Mr(e5, { value: t2, currency: n2 }, r2 = {}) {
1988
- return Or(t2), Ar(e5, n2, r2).formatToParts(t2);
1987
+ function Ar(e5, { value: t2, currency: n2 }, r2 = {}) {
1988
+ return Er(t2), Or(e5, n2, r2).formatToParts(t2);
1989
1989
  }
1990
- function Nr(e5) {
1990
+ function jr(e5) {
1991
1991
  return an().find((e6) => e6.primary)?.id ?? e5;
1992
1992
  }
1993
- function Pr(e5, t2) {
1993
+ function Mr(e5, t2) {
1994
1994
  let { locale: n2, ...r2 } = t2 ?? {}, i2 = n2 ?? e5.essentials?.locale;
1995
1995
  if (!i2) throw Error(`Host locale is not available on the current host. Make sure to use an updated version of the host initialization package.`);
1996
1996
  return { locale: i2, formatOptions: r2 };
1997
1997
  }
1998
- var Fr = On({ getLanguage: (e5) => () => {
1998
+ var Nr = Dn({ getLanguage: (e5) => () => {
1999
1999
  let t2 = e5.essentials?.language;
2000
2000
  if (!t2) throw Error(`Host language is not available on the current host. Make sure to use an updated version of the host initialization package.`);
2001
2001
  return t2;
@@ -2004,20 +2004,20 @@ var Fr = On({ getLanguage: (e5) => () => {
2004
2004
  if (!t2) throw Error(`Host locale is not available on the current host. Make sure to use an updated version of the host initialization package.`);
2005
2005
  return t2;
2006
2006
  }, formatCurrency: (e5) => (t2, n2) => {
2007
- let { locale: r2, formatOptions: i2 } = Pr(e5, n2);
2008
- return jr(r2, t2, i2);
2007
+ let { locale: r2, formatOptions: i2 } = Mr(e5, n2);
2008
+ return kr(r2, t2, i2);
2009
2009
  }, formatCurrencyToParts: (e5) => (t2, n2) => {
2010
- let { locale: r2, formatOptions: i2 } = Pr(e5, n2);
2011
- return Mr(r2, t2, i2);
2010
+ let { locale: r2, formatOptions: i2 } = Mr(e5, n2);
2011
+ return Ar(r2, t2, i2);
2012
2012
  }, getTranslationFunction: (e5) => () => {
2013
2013
  let t2 = e5.translations?.();
2014
2014
  if (!t2) throw Error(`Host translation resources are not available.`);
2015
- let n2 = K.createInstance(), r2 = Nr(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
2016
- return n2.use(wr).init(i2, (e6) => {
2015
+ let n2 = J.createInstance(), r2 = jr(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
2016
+ return n2.use(Sr).init(i2, (e6) => {
2017
2017
  if (e6) throw e6;
2018
2018
  }), n2.t.bind(n2);
2019
2019
  } });
2020
- var Ir = class {
2020
+ var Pr = class {
2021
2021
  constructor(e5) {
2022
2022
  this.message = e5, this.captureException = () => {
2023
2023
  console.error(this.message);
@@ -2032,42 +2032,42 @@ var Ir = class {
2032
2032
  };
2033
2033
  }
2034
2034
  };
2035
- var Lr = (e5) => new Ir(e5);
2036
- var Rr = On({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : Lr(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
2037
- var zr = { service: `service`, services: `services`, categories: `categories`, locations: `locations`, sessions: `sessions`, timeSlots: `time-slots`, serviceAddOns: `service-addons`, bookingsSettings: `bookings-settings`, serviceCta: `service-cta`, preferences: `preferences`, bookingSummary: `booking-summary`, bookingCheckout: `booking-checkout`, formValues: `form-values`, paymentOptions: `payment-options`, seo: `seo`, warmup: `warmup`, reschedule: `reschedule` };
2038
- function Br(e5) {
2035
+ var Fr = (e5) => new Pr(e5);
2036
+ var Ir = Dn({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : Fr(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
2037
+ var Lr = { service: `service`, services: `services`, categories: `categories`, locations: `locations`, sessions: `sessions`, timeSlots: `time-slots`, serviceAddOns: `service-addons`, bookingsSettings: `bookings-settings`, serviceCta: `service-cta`, preferences: `preferences`, bookingSummary: `booking-summary`, bookingCheckout: `booking-checkout`, formValues: `form-values`, paymentOptions: `payment-options`, seo: `seo`, warmup: `warmup`, reschedule: `reschedule` };
2038
+ function Rr(e5) {
2039
2039
  try {
2040
- let t2 = Rr.getMonitoringClient?.();
2040
+ let t2 = Ir.getMonitoringClient?.();
2041
2041
  return t2 && typeof t2[e5] == `function` ? t2 : null;
2042
2042
  } catch {
2043
2043
  return null;
2044
2044
  }
2045
2045
  }
2046
- function Vr(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2047
- let a2 = Br(`captureException`);
2046
+ function zr(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2047
+ let a2 = Rr(`captureException`);
2048
2048
  if (!a2) return;
2049
2049
  let o2 = e5 instanceof Error ? e5 : Error(String(e5));
2050
2050
  a2.captureException(o2, { level: r2, tags: { feature: t2, action: n2 }, ...i2 ? { contexts: i2 } : {} });
2051
2051
  }
2052
- function Hr(e5, { feature: t2, tags: n2 }, r2) {
2053
- let i2 = Br(`startSpanManual`);
2052
+ function Br(e5, { feature: t2, tags: n2 }, r2) {
2053
+ let i2 = Rr(`startSpanManual`);
2054
2054
  if (!i2) return r2;
2055
2055
  let a2 = i2.startSpanManual({ name: e5, tags: { feature: t2, ...n2 } });
2056
2056
  return r2.then(() => a2.end(), (e6) => a2.fail(e6)), r2;
2057
2057
  }
2058
- var Ur = class extends import_react.Component {
2058
+ var Vr = class extends import_react.Component {
2059
2059
  state = { hasError: false };
2060
2060
  static getDerivedStateFromError() {
2061
2061
  return { hasError: true };
2062
2062
  }
2063
2063
  componentDidCatch(e5, t2) {
2064
- Vr(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2064
+ zr(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2065
2065
  }
2066
2066
  render() {
2067
2067
  return this.state.hasError ? this.props.fallback : this.props.children;
2068
2068
  }
2069
2069
  };
2070
- function Wr(e5) {
2070
+ function Hr(e5) {
2071
2071
  let t2 = e5;
2072
2072
  if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
2073
2073
  t2.__state = { status: `fulfilled`, value: e6 };
@@ -2076,37 +2076,37 @@ function Wr(e5) {
2076
2076
  })), t2.__state.status === `fulfilled`) return t2.__state.value;
2077
2077
  throw t2.__state.status === `rejected` ? t2.__state.reason : t2;
2078
2078
  }
2079
- function Gr(e5) {
2079
+ function Ur(e5) {
2080
2080
  let t2 = Promise.resolve(e5);
2081
2081
  return t2.__state = { status: `fulfilled`, value: e5 }, t2;
2082
2082
  }
2083
- var Kr = /* @__PURE__ */ new WeakMap();
2084
- function qr(e5, t2, n2) {
2085
- let r2 = Kr.get(e5);
2086
- r2 || (r2 = /* @__PURE__ */ new WeakMap(), Kr.set(e5, r2));
2083
+ var Wr = /* @__PURE__ */ new WeakMap();
2084
+ function Gr(e5, t2, n2) {
2085
+ let r2 = Wr.get(e5);
2086
+ r2 || (r2 = /* @__PURE__ */ new WeakMap(), Wr.set(e5, r2));
2087
2087
  let i2 = r2.get(t2);
2088
2088
  i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
2089
2089
  let a2 = i2.get(n2);
2090
2090
  if (!a2) {
2091
2091
  let r3 = e5;
2092
- a2 = r3.__state?.status === `fulfilled` ? Gr(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? Gr(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
2092
+ a2 = r3.__state?.status === `fulfilled` ? Ur(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? Ur(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
2093
2093
  }
2094
2094
  return a2;
2095
2095
  }
2096
- function Y(e5) {
2096
+ function Z(e5) {
2097
2097
  return e5;
2098
2098
  }
2099
- var Jr = Y(`@wix/site-service-url`);
2100
- var Yr = `appSectionParams`;
2101
- function Xr(e5) {
2102
- let t2 = e5.searchParams.get(Yr);
2099
+ var Kr = Z(`@wix/site-service-url`);
2100
+ var qr = `appSectionParams`;
2101
+ function Jr(e5) {
2102
+ let t2 = e5.searchParams.get(qr);
2103
2103
  if (t2 === null) return e5;
2104
2104
  let n2 = new URL(e5);
2105
- n2.searchParams.delete(Yr);
2106
- for (let [e6, r2] of Object.entries(Zr(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
2105
+ n2.searchParams.delete(qr);
2106
+ for (let [e6, r2] of Object.entries(Yr(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
2107
2107
  return n2;
2108
2108
  }
2109
- function Zr(e5) {
2109
+ function Yr(e5) {
2110
2110
  try {
2111
2111
  let t2 = JSON.parse(e5);
2112
2112
  return t2 && typeof t2 == `object` && !Array.isArray(t2) ? t2 : {};
@@ -2114,16 +2114,16 @@ function Zr(e5) {
2114
2114
  return {};
2115
2115
  }
2116
2116
  }
2117
- var Qr = `bookings-uou:url-change`;
2118
- var $r = (e5) => {
2117
+ var Xr = `bookings-uou:url-change`;
2118
+ var Zr = (e5) => {
2119
2119
  let t2 = new URL(e5);
2120
2120
  return t2.searchParams.sort(), t2.href;
2121
2121
  };
2122
- function ei(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2122
+ function Qr(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2123
2123
  let r2 = globalThis.window;
2124
2124
  if (!r2?.history) return;
2125
2125
  let i2 = new URL(r2.location.href);
2126
- if ($r(i2) === $r(e5)) return;
2126
+ if (Zr(i2) === Zr(e5)) return;
2127
2127
  let a2 = { scrollY: r2.scrollY };
2128
2128
  if (n2) r2.history.replaceState(a2, ``, e5.href);
2129
2129
  else {
@@ -2134,54 +2134,54 @@ function ei(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2134
2134
  return;
2135
2135
  }
2136
2136
  }
2137
- r2.dispatchEvent(new Event(Qr));
2137
+ r2.dispatchEvent(new Event(Xr));
2138
2138
  }
2139
- function ti(e5) {
2139
+ function $r(e5) {
2140
2140
  let t2 = globalThis.window;
2141
- return t2 ? (t2.addEventListener(Qr, e5), t2.addEventListener(`popstate`, e5), () => {
2142
- t2.removeEventListener(Qr, e5), t2.removeEventListener(`popstate`, e5);
2141
+ return t2 ? (t2.addEventListener(Xr, e5), t2.addEventListener(`popstate`, e5), () => {
2142
+ t2.removeEventListener(Xr, e5), t2.removeEventListener(`popstate`, e5);
2143
2143
  }) : () => {
2144
2144
  };
2145
2145
  }
2146
- var ni = (e5) => {
2146
+ var ei = (e5) => {
2147
2147
  try {
2148
2148
  return decodeURIComponent(e5);
2149
2149
  } catch {
2150
2150
  return e5;
2151
2151
  }
2152
2152
  };
2153
- function ri(e5, t2) {
2153
+ function ti(e5, t2) {
2154
2154
  let n2 = t2 ? new URL(t2).pathname : `/`;
2155
- return `./${ni(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2155
+ return `./${ei(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2156
2156
  }
2157
- function ii() {
2158
- let e5 = (0, import_services_manager_react.useService)(Jr), t2 = (0, import_react.useCallback)(() => e5.currentUrl, [e5]), n2 = (0, import_react.useSyncExternalStore)(ti, t2, t2), i2 = (0, import_react.useMemo)(() => Xr(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2159
- return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => Xr(new URL(e5.currentUrl)), getRelativeUrl: () => ri(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: ei };
2157
+ function ni() {
2158
+ let e5 = (0, import_services_manager_react.useService)(Kr), t2 = (0, import_react.useCallback)(() => e5.currentUrl, [e5]), n2 = (0, import_react.useSyncExternalStore)($r, t2, t2), i2 = (0, import_react.useMemo)(() => Jr(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2159
+ return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => Jr(new URL(e5.currentUrl)), getRelativeUrl: () => ti(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: Qr };
2160
2160
  }
2161
- var X = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
2162
- var ai = Y(`@wix/site-service-warmup-data`);
2163
- function oi() {
2161
+ var Q = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
2162
+ var ri = Z(`@wix/site-service-warmup-data`);
2163
+ function ii() {
2164
2164
  try {
2165
2165
  return (0, import_services_manager_react.useGetService)();
2166
2166
  } catch {
2167
2167
  return null;
2168
2168
  }
2169
2169
  }
2170
- function si(e5) {
2170
+ function ai(e5) {
2171
2171
  try {
2172
- return e5 ? e5(ai) : null;
2172
+ return e5 ? e5(ri) : null;
2173
2173
  } catch {
2174
2174
  return null;
2175
2175
  }
2176
2176
  }
2177
- function ci() {
2178
- let e5 = si(oi()), t2 = typeof window > `u`;
2177
+ function oi() {
2178
+ let e5 = ai(ii()), t2 = typeof window > `u`;
2179
2179
  return { scope: e5 ?? void 0, get: async (n2) => {
2180
2180
  if (t2 || !e5) return null;
2181
2181
  try {
2182
2182
  return await e5.get(n2);
2183
2183
  } catch (e6) {
2184
- return Vr(e6, { feature: zr.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2184
+ return zr(e6, { feature: Lr.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2185
2185
  }
2186
2186
  }, set: (n2, r2) => {
2187
2187
  if (t2 && e5) try {
@@ -2190,75 +2190,75 @@ function ci() {
2190
2190
  }
2191
2191
  } };
2192
2192
  }
2193
- var li = Y(`@wix/site-service-locale`);
2194
- var ui = Y;
2195
- var di = ui(`@wix/viewer-service-multilingual`);
2196
- function fi() {
2193
+ var si = Z(`@wix/site-service-locale`);
2194
+ var ci = Z;
2195
+ var li = ci(`@wix/viewer-service-multilingual`);
2196
+ function ui() {
2197
2197
  try {
2198
- return Fr.getLanguage() ?? `en`;
2198
+ return Nr.getLanguage() ?? `en`;
2199
2199
  } catch {
2200
2200
  return `en`;
2201
2201
  }
2202
2202
  }
2203
- function pi(e5) {
2203
+ function di(e5) {
2204
2204
  try {
2205
2205
  return (0, import_services_manager_react.useService)(e5);
2206
2206
  } catch {
2207
2207
  return null;
2208
2208
  }
2209
2209
  }
2210
- function mi() {
2211
- let e5 = pi(li), t2 = pi(di);
2212
- return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || fi();
2213
- }
2214
- var hi = `bookings-uou`;
2215
- function gi(e5) {
2216
- return `${hi}:${e5}:locations:all`;
2217
- }
2218
- var _i = 5e3;
2219
- var vi = 100;
2220
- var yi = `wix-warmup-data`;
2221
- var bi = null;
2222
- function xi(e5) {
2210
+ function fi() {
2211
+ let e5 = di(si), t2 = di(li);
2212
+ return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || ui();
2213
+ }
2214
+ var pi = `bookings-uou`;
2215
+ function mi(e5) {
2216
+ return `${pi}:${e5}:locations:all`;
2217
+ }
2218
+ var hi = 5e3;
2219
+ var gi = 100;
2220
+ var _i = `wix-warmup-data`;
2221
+ var vi = null;
2222
+ function yi(e5) {
2223
2223
  if (typeof document < `u`) try {
2224
- let t2 = document.getElementById(yi)?.textContent;
2225
- return t2 ? (bi?.text !== t2 && (bi = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), bi.data[e5] ?? void 0) : void 0;
2224
+ let t2 = document.getElementById(_i)?.textContent;
2225
+ return t2 ? (vi?.text !== t2 && (vi = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), vi.data[e5] ?? void 0) : void 0;
2226
2226
  } catch {
2227
2227
  return;
2228
2228
  }
2229
2229
  }
2230
- var Si = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2231
- var Ci = Si();
2232
- var wi = /* @__PURE__ */ new WeakMap();
2233
- var Ti = /* @__PURE__ */ new WeakMap();
2234
- function Ei(e5) {
2235
- if (!e5) return Ci;
2236
- let t2 = wi.get(e5);
2237
- return t2 || (t2 = Si(), wi.set(e5, t2)), t2;
2230
+ var bi = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2231
+ var xi = bi();
2232
+ var Si = /* @__PURE__ */ new WeakMap();
2233
+ var Ci = /* @__PURE__ */ new WeakMap();
2234
+ function wi(e5) {
2235
+ if (!e5) return xi;
2236
+ let t2 = Si.get(e5);
2237
+ return t2 || (t2 = bi(), Si.set(e5, t2)), t2;
2238
2238
  }
2239
- function Di({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2239
+ function Ti({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2240
2240
  if (e5 === null) return n2();
2241
2241
  if (typeof window > `u`) {
2242
2242
  let r3 = () => n2().then((n3) => (t2.set(e5, n3), n3)), { scope: i3 } = t2;
2243
2243
  if (!i3) return r3();
2244
- let a3 = Ti.get(i3);
2245
- a3 || (a3 = /* @__PURE__ */ new Map(), Ti.set(i3, a3));
2244
+ let a3 = Ci.get(i3);
2245
+ a3 || (a3 = /* @__PURE__ */ new Map(), Ci.set(i3, a3));
2246
2246
  let o3 = a3.get(e5);
2247
2247
  if (o3) return o3;
2248
2248
  let s3 = r3();
2249
2249
  return a3.set(e5, s3), s3.catch(() => a3.delete(e5)), s3;
2250
2250
  }
2251
- let i2 = Ei(t2.scope), a2 = Date.now();
2251
+ let i2 = wi(t2.scope), a2 = Date.now();
2252
2252
  for (let [e6, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e6);
2253
2253
  let o2 = i2.promises.get(e5);
2254
2254
  if (o2 && !r2) return o2.promise;
2255
2255
  r2 && i2.invalidatedWarmup.add(e5);
2256
2256
  let s2 = !i2.invalidatedWarmup.has(e5);
2257
2257
  if (s2) {
2258
- let t3 = xi(e5);
2258
+ let t3 = yi(e5);
2259
2259
  if (t3 !== void 0) {
2260
- let n3 = Gr(t3);
2261
- return i2.promises.set(e5, { promise: n3, expiresAt: a2 + _i }), n3;
2260
+ let n3 = Ur(t3);
2261
+ return i2.promises.set(e5, { promise: n3, expiresAt: a2 + hi }), n3;
2262
2262
  }
2263
2263
  }
2264
2264
  let c2 = (async () => {
@@ -2268,57 +2268,57 @@ function Di({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2268
2268
  }
2269
2269
  return n2();
2270
2270
  })();
2271
- i2.promises.size >= vi && i2.promises.delete(i2.promises.keys().next().value);
2271
+ i2.promises.size >= gi && i2.promises.delete(i2.promises.keys().next().value);
2272
2272
  let l2 = { promise: c2, expiresAt: 1 / 0 };
2273
2273
  return i2.promises.set(e5, l2), c2.then(() => {
2274
- l2.expiresAt = Date.now() + _i;
2274
+ l2.expiresAt = Date.now() + hi;
2275
2275
  }, () => {
2276
2276
  i2.promises.get(e5) === l2 && i2.promises.delete(e5);
2277
2277
  }), c2;
2278
2278
  }
2279
- var Oi = [{ path: `businessLocations.locations.business.address.geocode.latitude` }, { path: `businessLocations.locations.business.address.geocode.longitude` }, { path: `businessLocations.locations.custom.address.geocode.latitude` }, { path: `businessLocations.locations.custom.address.geocode.longitude` }, { path: `businessLocations.locations.calculatedAddress.geocode.latitude` }, { path: `businessLocations.locations.calculatedAddress.geocode.longitude` }];
2280
- function ki(e5) {
2279
+ var Ei = [{ path: `businessLocations.locations.business.address.geocode.latitude` }, { path: `businessLocations.locations.business.address.geocode.longitude` }, { path: `businessLocations.locations.custom.address.geocode.latitude` }, { path: `businessLocations.locations.custom.address.geocode.longitude` }, { path: `businessLocations.locations.calculatedAddress.geocode.latitude` }, { path: `businessLocations.locations.calculatedAddress.geocode.longitude` }];
2280
+ function Di(e5) {
2281
2281
  return Dt(Object.assign(e5, { domainToMappings: { "*.dev.wix-code.com": [{ srcPath: `/_api/services-2`, destPath: `` }, { srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "www.wixapis.com": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }, { srcPath: `/bookings/services/v2/bulk/services`, destPath: `/v2/bulk/services` }], "manage._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], "editor._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], "blocks._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], "create.editorx": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], _: [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "www._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "bo._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "wixbo.ai": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "wix-bo.com": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "editor.wixapps.net": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "api._api_base_domain_": [{ srcPath: `/services-2`, destPath: `` }] } }));
2282
2282
  }
2283
- var Ai = `@wix/auto_sdk_bookings_services`;
2284
- function ji(e5) {
2283
+ var Oi = `@wix/auto_sdk_bookings_services`;
2284
+ function ki(e5) {
2285
2285
  function t2({ host: t3 }) {
2286
- return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryLocations`, packageName: Ai, migrationOptions: { optInTransformResponse: true }, url: ki({ protoPath: `/v2/services/locations/query`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => st(e6, [{ transformFn: Xt, paths: Oi }]) };
2286
+ return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryLocations`, packageName: Oi, migrationOptions: { optInTransformResponse: true }, url: Di({ protoPath: `/v2/services/locations/query`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => st(e6, [{ transformFn: Xt, paths: Ei }]) };
2287
2287
  }
2288
2288
  return t2;
2289
2289
  }
2290
- var Mi = [{ path: `businessLocations.locations.calculatedAddress` }, { path: `businessLocations.locations.business.address` }, { path: `businessLocations.locations.custom.address` }];
2291
- async function Ni(e5) {
2292
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ji(Xe({ filter: e5?.filter }));
2290
+ var Ai = [{ path: `businessLocations.locations.calculatedAddress` }, { path: `businessLocations.locations.business.address` }, { path: `businessLocations.locations.custom.address` }];
2291
+ async function ji(e5) {
2292
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ki(Xe({ filter: e5?.filter }));
2293
2293
  n2?.onSiteCall?.();
2294
2294
  try {
2295
2295
  let e6 = await t2.request(r2);
2296
- return n2?.onSuccess?.(e6), Ze(st(e6.data, [{ transformFn: Zt, paths: Mi }]));
2296
+ return n2?.onSuccess?.(e6), Ze(st(e6.data, [{ transformFn: Zt, paths: Ai }]));
2297
2297
  } catch (e6) {
2298
2298
  let t3 = _t(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { filter: `$[0].filter` }, singleArgumentUnchanged: false }, [`options`]);
2299
2299
  throw n2?.onError?.(e6), t3;
2300
2300
  }
2301
2301
  }
2302
- function Pi(e5) {
2303
- return (t2) => Ni(t2, { httpClient: e5 });
2302
+ function Mi(e5) {
2303
+ return (t2) => ji(t2, { httpClient: e5 });
2304
2304
  }
2305
- var Fi = Et(Pi);
2306
- var Ii = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
2307
- var Li = function(e5) {
2305
+ var Ni = Et(Mi);
2306
+ var Pi = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
2307
+ var Fi = function(e5) {
2308
2308
  return e5.BOOK_ONLINE = `bookingsBookOnline`, e5.SERVICE_PAGE = `bookingsServicePage`, e5.CALENDAR_PAGE = `bookingsCalendar`, e5.FORM_PAGE = `bookingsForm`, e5;
2309
2309
  }({});
2310
- function Z(e5) {
2310
+ function Ii(e5) {
2311
2311
  return e5.business?._id ?? null;
2312
2312
  }
2313
- function Q(e5) {
2313
+ function Li(e5) {
2314
2314
  return e5.business?.name ?? null;
2315
2315
  }
2316
2316
  async function Ri() {
2317
- let e5 = await Fi({ filter: { services: { appId: Ii, hidden: false } } });
2318
- return { locations: [...e5.businessLocations?.locations ?? []].sort((e6, t2) => (Q(e6) ?? ``).localeCompare(Q(t2) ?? ``)), hasOtherLocations: !!(e5.customLocations?.exists || e5.customerLocations?.exists) };
2317
+ let e5 = await Ni({ filter: { services: { appId: Pi, hidden: false } } });
2318
+ return { locations: [...e5.businessLocations?.locations ?? []].sort((e6, t2) => (Li(e6) ?? ``).localeCompare(Li(t2) ?? ``)), hasOtherLocations: !!(e5.customLocations?.exists || e5.customerLocations?.exists) };
2319
2319
  }
2320
2320
  function zi({ isLoading: e5, hasError: t2, refetch: n2, children: r2 }) {
2321
- let { searchParams: i2 } = ii(), a2 = { locations: [], locationItems: [], selectedLocationId: i2.get(X.location), selectedLocationIndex: -1, selectedLocation: null, selectedLocationName: null, hasOtherLocations: false, hasMultipleLocations: false, isLoading: e5, hasError: t2, refetch: n2, selectLocation: () => {
2321
+ let { searchParams: i2 } = ni(), a2 = { locationItems: [], selectedLocationId: i2.get(Q.location), hasOtherLocations: false, hasMultipleLocations: false, isLoading: e5, hasError: t2, refetch: n2, selectLocation: () => {
2322
2322
  } };
2323
2323
  return (0, import_jsx_runtime.jsx)($.Provider, { value: a2, children: r2 });
2324
2324
  }
@@ -2328,12 +2328,12 @@ function Bi({ refetch: e5, children: t2 }) {
2328
2328
  function Vi({ refetch: e5, children: t2 }) {
2329
2329
  return (0, import_jsx_runtime.jsx)(zi, { isLoading: false, hasError: true, refetch: e5, children: t2 });
2330
2330
  }
2331
- var Hi = ui(`@wix/site-service-business-logger`);
2331
+ var Hi = ci(`@wix/site-service-business-logger`);
2332
2332
  function Ui(e5) {
2333
2333
  return { evid: 32, src: 16, endpoint: ``, params: e5 };
2334
2334
  }
2335
2335
  var Wi = { 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` };
2336
- Li.BOOK_ONLINE;
2336
+ Fi.BOOK_ONLINE;
2337
2337
  var Gi = `new_bookings_server`;
2338
2338
  var Ki = (e5) => {
2339
2339
  let { reportBi: t2 } = (0, import_services_manager_react.useService)(Hi);
@@ -2342,9 +2342,9 @@ var Ki = (e5) => {
2342
2342
  }, [t2, e5]);
2343
2343
  };
2344
2344
  var qi = (e5, t2 = true) => {
2345
- let n2 = Ki(e5), { getParsedUrl: r2 } = ii(), i2 = (0, import_react.useRef)(false);
2345
+ let n2 = Ki(e5), { getParsedUrl: r2 } = ni(), i2 = (0, import_react.useRef)(false);
2346
2346
  (0, import_react.useEffect)(() => {
2347
- t2 && !i2.current && (i2.current = true, n2(Ui({ referralInfo: r2().searchParams.get(X.referral) ?? void 0 })));
2347
+ t2 && !i2.current && (i2.current = true, n2(Ui({ referralInfo: r2().searchParams.get(Q.referral) ?? void 0 })));
2348
2348
  }, [t2, n2, r2]);
2349
2349
  };
2350
2350
  var $ = (0, import_react.createContext)(null);
@@ -2355,28 +2355,28 @@ function Yi() {
2355
2355
  return e5;
2356
2356
  }
2357
2357
  function Xi(e5, t2) {
2358
- let n2 = Z(e5);
2359
- return { locationId: n2, locationName: Q(e5), isSelected: n2 != null && n2 === t2 };
2358
+ let n2 = Ii(e5);
2359
+ return { locationId: n2, locationName: Li(e5), isSelected: n2 != null && n2 === t2 };
2360
2360
  }
2361
2361
  var Zi = (e5) => ({ ...e5, hasError: false });
2362
2362
  var Qi = () => ({ locations: [], hasOtherLocations: false, hasError: true });
2363
- function $i({ locationsPromise: e5, initialLocationId: t2, refetch: n2, children: i2 }) {
2364
- let { locations: c2, hasOtherLocations: l2, hasError: u2 } = Wr(e5), { pathname: d2, searchParams: p2, pushUrl: m2, getExternalBaseUrl: h2 } = ii(), g2 = p2.get(X.location), _2 = (0, import_react.useCallback)((e6) => {
2365
- let t3 = new URLSearchParams(p2);
2366
- e6 ? t3.set(X.location, e6) : t3.delete(X.location), t3.delete(X.page);
2367
- let n3 = t3.toString(), r2 = n3 ? `${d2}?${n3}` : d2;
2368
- m2(new URL(r2, `${h2()}/`), { disableScrollToTop: true, skipHistory: false });
2369
- }, [d2, p2, m2, h2]), v2 = (0, import_react.useRef)(false);
2363
+ function $i({ locationsPromise: e5, refetch: t2, children: n2 }) {
2364
+ let { locations: i2, hasOtherLocations: s2, hasError: c2 } = Hr(e5), { pathname: l2, searchParams: u2, pushUrl: d2, getExternalBaseUrl: p2 } = ni(), m2 = u2.get(Q.location), h2 = (0, import_react.useCallback)((e6, t3) => {
2365
+ let n3 = new URLSearchParams(u2);
2366
+ e6 ? n3.set(Q.location, e6) : n3.delete(Q.location), n3.delete(Q.page);
2367
+ let r2 = n3.toString(), i3 = r2 ? `${l2}?${r2}` : l2;
2368
+ d2(new URL(i3, `${p2()}/`), { disableScrollToTop: true, skipHistory: t3 });
2369
+ }, [l2, u2, d2, p2]), g2 = (0, import_react.useCallback)((e6) => h2(e6, false), [h2]), _2 = m2 != null && !c2 && !(m2 === `OTHER_LOCATIONS` && s2) && !i2.some((e6) => Ii(e6) === m2);
2370
2370
  (0, import_react.useEffect)(() => {
2371
- v2.current || (v2.current = true, t2 && !p2.get(X.location) && _2(t2));
2372
- }, [t2, p2, _2]);
2373
- let y2 = c2.findIndex((e6) => Z(e6) === g2), b2 = c2.find((e6) => Z(e6) === g2) ?? null, x2 = c2.filter((e6) => Z(e6)).length + +!!l2, ee2 = (0, import_react.useMemo)(() => ({ locations: c2, locationItems: c2.map((e6) => Xi(e6, g2)), selectedLocationId: g2, selectedLocationIndex: y2, selectedLocation: b2, selectedLocationName: b2 ? Q(b2) : null, hasOtherLocations: l2, hasMultipleLocations: x2 > 1, isLoading: false, hasError: u2, refetch: n2, selectLocation: _2 }), [c2, g2, y2, b2, l2, u2, x2, n2, _2]);
2374
- return (0, import_jsx_runtime.jsx)($.Provider, { value: ee2, children: i2 });
2371
+ _2 && h2(null, true);
2372
+ }, [_2, h2]);
2373
+ let v2 = i2.filter((e6) => Ii(e6)).length + +!!s2, y2 = (0, import_react.useMemo)(() => ({ locationItems: i2.map((e6) => Xi(e6, m2)), selectedLocationId: m2, hasOtherLocations: s2, hasMultipleLocations: v2 > 1, isLoading: false, hasError: c2, refetch: t2, selectLocation: g2 }), [i2, m2, s2, c2, v2, t2, g2]);
2374
+ return (0, import_jsx_runtime.jsx)($.Provider, { value: y2, children: n2 });
2375
2375
  }
2376
- function ea({ initialLocationId: e5, children: n2 }) {
2376
+ function ea({ children: e5 }) {
2377
2377
  qi(Wi.LOCATIONS);
2378
- let i2 = ci(), a2 = mi(), [s2, l2] = (0, import_react.useState)(0), u2 = (0, import_react.useMemo)(() => qr(Di({ key: gi(a2), refresh: s2 !== 0, warmupData: i2, fetchData: () => Hr(`locations-context-load`, { feature: zr.locations }, Ri()) }), Zi, Qi), [s2, a2]), d2 = (0, import_react.useCallback)(() => l2((e6) => e6 + 1), []);
2379
- return (0, import_jsx_runtime.jsx)(Ur, { fallback: (0, import_jsx_runtime.jsx)(Vi, { refetch: d2, children: n2 }), feature: zr.locations, children: (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Bi, { refetch: d2, children: n2 }), children: (0, import_jsx_runtime.jsx)($i, { locationsPromise: u2, initialLocationId: e5, refetch: d2, children: n2 }) }) });
2378
+ let n2 = oi(), i2 = fi(), [a2, s2] = (0, import_react.useState)(0), l2 = (0, import_react.useMemo)(() => Gr(Ti({ key: mi(i2), refresh: a2 !== 0, warmupData: n2, fetchData: () => Br(`locations-context-load`, { feature: Lr.locations }, Ri()) }), Zi, Qi), [a2, i2]), u2 = (0, import_react.useCallback)(() => s2((e6) => e6 + 1), []);
2379
+ return (0, import_jsx_runtime.jsx)(Vr, { fallback: (0, import_jsx_runtime.jsx)(Vi, { refetch: u2, children: e5 }), feature: Lr.locations, children: (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Bi, { refetch: u2, children: e5 }), children: (0, import_jsx_runtime.jsx)($i, { locationsPromise: l2, refetch: u2, children: e5 }) }) });
2380
2380
  }
2381
2381
  var ta = wn(`c151d9f7-1582-407c-bb59-59030f244b47`);
2382
2382
  // Annotate the CommonJS export names for ESM import in node: