@wix/bookings 1.0.1776 → 1.0.1778

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/build/cjs/context-booking-checkout.d.ts +243 -108
  2. package/build/cjs/context-booking-checkout.js +177 -183
  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 +412 -412
  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 +336 -336
  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-addons.js +1 -1
  12. package/build/cjs/context-service-addons.js.map +1 -1
  13. package/build/cjs/context-service.d.ts +71 -33
  14. package/build/cjs/context-service.js +98 -96
  15. package/build/cjs/context-service.js.map +1 -1
  16. package/build/cjs/context-services.js +1 -1
  17. package/build/cjs/context-services.js.map +1 -1
  18. package/build/cjs/context-time-slots.d.ts +10 -0
  19. package/build/cjs/context-time-slots.js +2 -2
  20. package/build/cjs/context-time-slots.js.map +1 -1
  21. package/build/es/context-booking-checkout.d.mts +243 -108
  22. package/build/es/context-booking-checkout.mjs +177 -180
  23. package/build/es/context-booking-checkout.mjs.map +1 -1
  24. package/build/es/context-categories.d.mts +16 -143
  25. package/build/es/context-categories.mjs +412 -412
  26. package/build/es/context-categories.mjs.map +1 -1
  27. package/build/es/context-locations.d.mts +16 -287
  28. package/build/es/context-locations.mjs +336 -336
  29. package/build/es/context-locations.mjs.map +1 -1
  30. package/build/es/context-service-addons.d.mts +2 -2
  31. package/build/es/context-service-addons.mjs +1 -1
  32. package/build/es/context-service-addons.mjs.map +1 -1
  33. package/build/es/context-service.d.mts +71 -33
  34. package/build/es/context-service.mjs +98 -96
  35. package/build/es/context-service.mjs.map +1 -1
  36. package/build/es/context-services.mjs +1 -1
  37. package/build/es/context-services.mjs.map +1 -1
  38. package/build/es/context-time-slots.d.mts +10 -0
  39. package/build/es/context-time-slots.mjs +2 -2
  40. package/build/es/context-time-slots.mjs.map +1 -1
  41. package/build/internal/cjs/context-booking-checkout.d.ts +243 -108
  42. package/build/internal/cjs/context-categories.d.ts +16 -143
  43. package/build/internal/cjs/context-locations.d.ts +16 -287
  44. package/build/internal/cjs/context-service-addons.d.ts +2 -2
  45. package/build/internal/cjs/context-service.d.ts +71 -33
  46. package/build/internal/cjs/context-time-slots.d.ts +10 -0
  47. package/build/internal/es/context-booking-checkout.d.mts +243 -108
  48. package/build/internal/es/context-categories.d.mts +16 -143
  49. package/build/internal/es/context-locations.d.mts +16 -287
  50. package/build/internal/es/context-service-addons.d.mts +2 -2
  51. package/build/internal/es/context-service.d.mts +71 -33
  52. package/build/internal/es/context-time-slots.d.mts +10 -0
  53. package/{_sdk-exports → context-runtime}/context-booking-checkout/runtime.d.ts +243 -108
  54. package/context-runtime/context-booking-checkout/runtime.js +3 -0
  55. package/{_sdk-exports → context-runtime}/context-categories/runtime.d.ts +16 -143
  56. package/context-runtime/context-categories/runtime.js +2 -0
  57. package/context-runtime/context-locations/runtime.d.ts +195 -0
  58. package/context-runtime/context-locations/runtime.js +2 -0
  59. package/{_sdk-exports → context-runtime}/context-service/runtime.d.ts +71 -33
  60. package/{_sdk-exports → context-runtime}/context-service/runtime.js +3 -3
  61. package/{_sdk-exports → context-runtime}/context-service-addons/runtime.d.ts +2 -2
  62. package/{_sdk-exports → context-runtime}/context-time-slots/runtime.d.ts +10 -0
  63. package/{_sdk-exports → context-runtime}/context-time-slots/runtime.js +2 -2
  64. package/package.json +8 -8
  65. package/_sdk-exports/context-booking-checkout/runtime.js +0 -3
  66. package/_sdk-exports/context-categories/runtime.js +0 -2
  67. package/_sdk-exports/context-locations/runtime.d.ts +0 -466
  68. package/_sdk-exports/context-locations/runtime.js +0 -2
  69. /package/{_sdk-exports → context-runtime}/context-service-addons/runtime.js +0 -0
  70. /package/{_sdk-exports → context-runtime}/context-services/runtime.d.ts +0 -0
  71. /package/{_sdk-exports → context-runtime}/context-services/runtime.js +0 -0
@@ -1,4 +1,4 @@
1
- // _sdk-exports/context-locations/runtime.js
1
+ // context-runtime/context-locations/runtime.js
2
2
  import { Component as e, Suspense as t, createContext as n, useCallback as r, useContext as i, useEffect as a, useMemo as o, useRef as s, useState as c, useSyncExternalStore as l } from "react";
3
3
  import { useGetService as u, useService as d } from "@wix/services-manager-react";
4
4
  import { jsx as f } from "react/jsx-runtime";
@@ -923,7 +923,7 @@ var wn = (e5) => Cn(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
923
923
  function Tn() {
924
924
  let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
925
925
  if (e5) return { initWixModules(t3, n3) {
926
- return En(() => e5(t3, n3));
926
+ return I(() => e5(t3, n3));
927
927
  }, fetchWithAuth() {
928
928
  throw Error(`fetchWithAuth is not available in this context`);
929
929
  }, graphql() {
@@ -933,10 +933,10 @@ function Tn() {
933
933
  if (t2 || n2) return { initWixModules(e6, r2) {
934
934
  if (r2) {
935
935
  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`);
936
- return En(() => n2.use(e6));
936
+ return I(() => n2.use(e6));
937
937
  }
938
938
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
939
- return En(() => t2.use(e6));
939
+ return I(() => t2.use(e6));
940
940
  }, fetchWithAuth: (e6, n3) => {
941
941
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
942
942
  return t2.fetchWithAuth(e6, n3);
@@ -948,7 +948,7 @@ function Tn() {
948
948
  return t2.graphql(e6, n3, r2);
949
949
  } };
950
950
  }
951
- function En(e5) {
951
+ function I(e5) {
952
952
  let t2 = globalThis.__wix_context__, n2 = { client: p.client, elevatedClient: p.elevatedClient }, r2;
953
953
  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);
954
954
  try {
@@ -957,71 +957,71 @@ function En(e5) {
957
957
  globalThis.__wix_context__ = t2, p.client = n2.client, p.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
958
958
  }
959
959
  }
960
- function Dn(e5, t2) {
960
+ function En(e5, t2) {
961
961
  return { ...e5, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
962
962
  let r2 = Tn();
963
963
  if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
964
964
  return r2.initWixModules(e5)[t3].apply(void 0, n2);
965
965
  }])) };
966
966
  }
967
- function On(e5) {
968
- return Dn({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
967
+ function Dn(e5) {
968
+ return En({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
969
969
  }
970
- var I = (e5) => typeof e5 == `string`;
971
- var L = () => {
970
+ var L = (e5) => typeof e5 == `string`;
971
+ var R = () => {
972
972
  let e5, t2, n2 = new Promise((n3, r2) => {
973
973
  e5 = n3, t2 = r2;
974
974
  });
975
975
  return n2.resolve = e5, n2.reject = t2, n2;
976
976
  };
977
- var kn = (e5) => e5 == null ? `` : `` + e5;
978
- var An = (e5, t2, n2) => {
977
+ var On = (e5) => e5 == null ? `` : `` + e5;
978
+ var kn = (e5, t2, n2) => {
979
979
  e5.forEach((e6) => {
980
980
  t2[e6] && (n2[e6] = t2[e6]);
981
981
  });
982
982
  };
983
- var jn = /###/g;
984
- var Mn = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(jn, `.`) : e5;
985
- var Nn = (e5) => !e5 || I(e5);
986
- var R = (e5, t2, n2) => {
987
- let r2 = I(t2) ? t2.split(`.`) : t2, i2 = 0;
983
+ var An = /###/g;
984
+ var jn = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(An, `.`) : e5;
985
+ var Mn = (e5) => !e5 || L(e5);
986
+ var z = (e5, t2, n2) => {
987
+ let r2 = L(t2) ? t2.split(`.`) : t2, i2 = 0;
988
988
  for (; i2 < r2.length - 1; ) {
989
- if (Nn(e5)) return {};
990
- let t3 = Mn(r2[i2]);
989
+ if (Mn(e5)) return {};
990
+ let t3 = jn(r2[i2]);
991
991
  !e5[t3] && n2 && (e5[t3] = new n2()), e5 = Object.prototype.hasOwnProperty.call(e5, t3) ? e5[t3] : {}, ++i2;
992
992
  }
993
- return Nn(e5) ? {} : { obj: e5, k: Mn(r2[i2]) };
993
+ return Mn(e5) ? {} : { obj: e5, k: jn(r2[i2]) };
994
994
  };
995
- var Pn = (e5, t2, n2) => {
996
- let { obj: r2, k: i2 } = R(e5, t2, Object);
995
+ var Nn = (e5, t2, n2) => {
996
+ let { obj: r2, k: i2 } = z(e5, t2, Object);
997
997
  if (r2 !== void 0 || t2.length === 1) {
998
998
  r2[i2] = n2;
999
999
  return;
1000
1000
  }
1001
- let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = R(e5, o2, Object);
1002
- 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);
1001
+ let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = z(e5, o2, Object);
1002
+ 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);
1003
1003
  s2.obj[`${s2.k}.${a2}`] = n2;
1004
1004
  };
1005
- var Fn = (e5, t2, n2, r2) => {
1006
- let { obj: i2, k: a2 } = R(e5, t2, Object);
1005
+ var Pn = (e5, t2, n2, r2) => {
1006
+ let { obj: i2, k: a2 } = z(e5, t2, Object);
1007
1007
  i2[a2] = i2[a2] || [], i2[a2].push(n2);
1008
1008
  };
1009
- var z = (e5, t2) => {
1010
- let { obj: n2, k: r2 } = R(e5, t2);
1009
+ var B = (e5, t2) => {
1010
+ let { obj: n2, k: r2 } = z(e5, t2);
1011
1011
  if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
1012
1012
  };
1013
- var In = (e5, t2, n2) => {
1014
- let r2 = z(e5, n2);
1015
- return r2 === void 0 ? z(t2, n2) : r2;
1013
+ var Fn = (e5, t2, n2) => {
1014
+ let r2 = B(e5, n2);
1015
+ return r2 === void 0 ? B(t2, n2) : r2;
1016
1016
  };
1017
- var Ln = (e5, t2, n2) => {
1018
- 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]);
1017
+ var In = (e5, t2, n2) => {
1018
+ 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]);
1019
1019
  return e5;
1020
1020
  };
1021
- var B = (e5) => e5.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1022
- var Rn = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1023
- var zn = (e5) => I(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => Rn[e6]) : e5;
1024
- var Bn = class {
1021
+ var V = (e5) => e5.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1022
+ var Ln = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1023
+ var Rn = (e5) => L(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => Ln[e6]) : e5;
1024
+ var zn = class {
1025
1025
  constructor(e5) {
1026
1026
  this.capacity = e5, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
1027
1027
  }
@@ -1032,20 +1032,20 @@ var Bn = class {
1032
1032
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e5, n2), this.regExpQueue.push(e5), n2;
1033
1033
  }
1034
1034
  };
1035
- var Vn = [` `, `,`, `?`, `!`, `;`];
1036
- var Hn = new Bn(20);
1037
- var Un = (e5, t2, n2) => {
1035
+ var Bn = [` `, `,`, `?`, `!`, `;`];
1036
+ var Vn = new zn(20);
1037
+ var Hn = (e5, t2, n2) => {
1038
1038
  t2 ||= ``, n2 ||= ``;
1039
- let r2 = Vn.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1039
+ let r2 = Bn.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
1040
1040
  if (r2.length === 0) return true;
1041
- let i2 = Hn.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1041
+ let i2 = Vn.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
1042
1042
  if (!a2) {
1043
1043
  let t3 = e5.indexOf(n2);
1044
1044
  t3 > 0 && !i2.test(e5.substring(0, t3)) && (a2 = true);
1045
1045
  }
1046
1046
  return a2;
1047
1047
  };
1048
- var Wn = (e5, t2, n2 = `.`) => {
1048
+ var H = (e5, t2, n2 = `.`) => {
1049
1049
  if (!e5) return;
1050
1050
  if (e5[t2]) return Object.prototype.hasOwnProperty.call(e5, t2) ? e5[t2] : void 0;
1051
1051
  let r2 = t2.split(n2), i2 = e5;
@@ -1061,8 +1061,8 @@ var Wn = (e5, t2, n2 = `.`) => {
1061
1061
  }
1062
1062
  return i2;
1063
1063
  };
1064
- var V = (e5) => e5?.replace(/_/g, `-`);
1065
- var Gn = { type: `logger`, log(e5) {
1064
+ var U = (e5) => e5?.replace(/_/g, `-`);
1065
+ var Un = { type: `logger`, log(e5) {
1066
1066
  this.output(`log`, e5);
1067
1067
  }, warn(e5) {
1068
1068
  this.output(`warn`, e5);
@@ -1071,12 +1071,12 @@ var Gn = { type: `logger`, log(e5) {
1071
1071
  }, output(e5, t2) {
1072
1072
  console?.[e5]?.apply?.(console, t2);
1073
1073
  } };
1074
- var H = new class e2 {
1074
+ var W = new class e2 {
1075
1075
  constructor(e5, t2 = {}) {
1076
1076
  this.init(e5, t2);
1077
1077
  }
1078
1078
  init(e5, t2 = {}) {
1079
- this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Gn, this.options = t2, this.debug = t2.debug;
1079
+ this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Un, this.options = t2, this.debug = t2.debug;
1080
1080
  }
1081
1081
  log(...e5) {
1082
1082
  return this.forward(e5, `log`, ``, true);
@@ -1091,7 +1091,7 @@ var H = new class e2 {
1091
1091
  return this.forward(e5, `warn`, `WARNING DEPRECATED: `, true);
1092
1092
  }
1093
1093
  forward(e5, t2, n2, r2) {
1094
- return r2 && !this.debug ? null : (I(e5[0]) && (e5[0] = `${n2}${this.prefix} ${e5[0]}`), this.logger[t2](e5));
1094
+ return r2 && !this.debug ? null : (L(e5[0]) && (e5[0] = `${n2}${this.prefix} ${e5[0]}`), this.logger[t2](e5));
1095
1095
  }
1096
1096
  create(t2) {
1097
1097
  return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
@@ -1100,7 +1100,7 @@ var H = new class e2 {
1100
1100
  return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
1101
1101
  }
1102
1102
  }();
1103
- var U = class {
1103
+ var G = class {
1104
1104
  constructor() {
1105
1105
  this.observers = {};
1106
1106
  }
@@ -1128,7 +1128,7 @@ var U = class {
1128
1128
  });
1129
1129
  }
1130
1130
  };
1131
- var Kn = class extends U {
1131
+ var Wn = class extends G {
1132
1132
  constructor(e5, t2 = { ns: [`translation`], defaultNS: `translation` }) {
1133
1133
  super(), this.data = e5 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
1134
1134
  }
@@ -1141,23 +1141,23 @@ var Kn = class extends U {
1141
1141
  }
1142
1142
  getResource(e5, t2, n2, r2 = {}) {
1143
1143
  let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
1144
- 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)));
1145
- let s2 = z(this.data, o2);
1146
- 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);
1144
+ 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)));
1145
+ let s2 = B(this.data, o2);
1146
+ 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);
1147
1147
  }
1148
1148
  addResource(e5, t2, n2, r2, i2 = { silent: false }) {
1149
1149
  let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e5, t2];
1150
- 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);
1150
+ 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);
1151
1151
  }
1152
1152
  addResources(e5, t2, n2, r2 = { silent: false }) {
1153
- for (let r3 in n2) (I(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
1153
+ for (let r3 in n2) (L(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
1154
1154
  r2.silent || this.emit(`added`, e5, t2, n2);
1155
1155
  }
1156
1156
  addResourceBundle(e5, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
1157
1157
  let o2 = [e5, t2];
1158
1158
  e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
1159
- let s2 = z(this.data, o2) || {};
1160
- 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);
1159
+ let s2 = B(this.data, o2) || {};
1160
+ 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);
1161
1161
  }
1162
1162
  removeResourceBundle(e5, t2) {
1163
1163
  this.hasResourceBundle(e5, t2) && delete this.data[e5][t2], this.removeNamespaces(t2), this.emit(`removed`, e5, t2);
@@ -1179,31 +1179,31 @@ var Kn = class extends U {
1179
1179
  return this.data;
1180
1180
  }
1181
1181
  };
1182
- var qn = { processors: {}, addPostProcessor(e5) {
1182
+ var Gn = { processors: {}, addPostProcessor(e5) {
1183
1183
  this.processors[e5.name] = e5;
1184
1184
  }, handle(e5, t2, n2, r2, i2) {
1185
1185
  return e5.forEach((e6) => {
1186
1186
  t2 = this.processors[e6]?.process(t2, n2, r2, i2) ?? t2;
1187
1187
  }), t2;
1188
1188
  } };
1189
- var Jn = Symbol(`i18next/PATH_KEY`);
1190
- function Yn() {
1189
+ var Kn = Symbol(`i18next/PATH_KEY`);
1190
+ function qn() {
1191
1191
  let e5 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
1192
- 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;
1192
+ 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;
1193
1193
  }
1194
- function W(e5, t2) {
1195
- let { [Jn]: n2 } = e5(Yn()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1194
+ function K(e5, t2) {
1195
+ let { [Kn]: n2 } = e5(qn()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
1196
1196
  if (n2.length > 1 && i2) {
1197
1197
  let e6 = t2?.ns, a2 = Array.isArray(e6) ? e6 : null;
1198
1198
  if (a2 && a2.length > 1 && a2.slice(1).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
1199
1199
  }
1200
1200
  return n2.join(r2);
1201
1201
  }
1202
- var Xn = {};
1203
- var Zn = (e5) => !I(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1204
- var Qn = class e3 extends U {
1202
+ var Jn = {};
1203
+ var Yn = (e5) => !L(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
1204
+ var Xn = class e3 extends G {
1205
1205
  constructor(e5, t2 = {}) {
1206
- 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`);
1206
+ 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`);
1207
1207
  }
1208
1208
  changeLanguage(e5) {
1209
1209
  e5 && (this.language = e5);
@@ -1213,33 +1213,33 @@ var Qn = class e3 extends U {
1213
1213
  if (e5 == null) return false;
1214
1214
  let r2 = this.resolve(e5, n2);
1215
1215
  if (r2?.res === void 0) return false;
1216
- let i2 = Zn(r2.res);
1216
+ let i2 = Yn(r2.res);
1217
1217
  return !(n2.returnObjects === false && i2);
1218
1218
  }
1219
1219
  extractFromKey(e5, t2) {
1220
1220
  let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
1221
1221
  n2 === void 0 && (n2 = `:`);
1222
- 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);
1222
+ 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);
1223
1223
  if (a2 && !o2) {
1224
1224
  let t3 = e5.match(this.interpolator.nestingRegexp);
1225
- if (t3 && t3.length > 0) return { key: e5, namespaces: I(i2) ? [i2] : i2 };
1225
+ if (t3 && t3.length > 0) return { key: e5, namespaces: L(i2) ? [i2] : i2 };
1226
1226
  let a3 = e5.split(n2);
1227
1227
  (n2 !== r2 || n2 === r2 && this.options.ns.indexOf(a3[0]) > -1) && (i2 = a3.shift()), e5 = a3.join(r2);
1228
1228
  }
1229
- return { key: e5, namespaces: I(i2) ? [i2] : i2 };
1229
+ return { key: e5, namespaces: L(i2) ? [i2] : i2 };
1230
1230
  }
1231
1231
  translate(t2, n2, r2) {
1232
1232
  let i2 = typeof n2 == `object` ? { ...n2 } : n2;
1233
1233
  if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
1234
- 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));
1234
+ 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));
1235
1235
  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;
1236
1236
  u2 === void 0 && (u2 = `:`);
1237
1237
  let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
1238
1238
  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;
1239
- 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;
1239
+ 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;
1240
1240
  y2 && !m2 && x2 && (w2 = C2);
1241
- let ne2 = Zn(w2), re2 = Object.prototype.toString.apply(w2);
1242
- if (y2 && w2 && ne2 && _2.indexOf(re2) < 0 && !(I(v2) && Array.isArray(w2))) {
1241
+ let ne2 = Yn(w2), re2 = Object.prototype.toString.apply(w2);
1242
+ if (y2 && w2 && ne2 && _2.indexOf(re2) < 0 && !(L(v2) && Array.isArray(w2))) {
1243
1243
  if (!i2.returnObjects && !this.options.returnObjects) {
1244
1244
  this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
1245
1245
  let e5 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, w2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
@@ -1249,11 +1249,11 @@ var Qn = class e3 extends U {
1249
1249
  let e5 = Array.isArray(w2), t3 = e5 ? [] : {}, n3 = e5 ? g2 : h2;
1250
1250
  for (let e6 in w2) if (Object.prototype.hasOwnProperty.call(w2, e6)) {
1251
1251
  let r3 = `${n3}${o2}${e6}`;
1252
- 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]);
1252
+ 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]);
1253
1253
  }
1254
1254
  m2 = t3;
1255
1255
  }
1256
- } else if (y2 && I(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1256
+ } else if (y2 && L(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1257
1257
  else {
1258
1258
  let e5 = false, n3 = false;
1259
1259
  !this.isValidLookup(m2) && x2 && (e5 = true, m2 = C2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
@@ -1285,32 +1285,32 @@ var Qn = class e3 extends U {
1285
1285
  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 });
1286
1286
  else if (!n2.skipInterpolation) {
1287
1287
  n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
1288
- let a3 = I(e5) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1288
+ let a3 = L(e5) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1289
1289
  if (a3) {
1290
1290
  let t3 = e5.match(this.interpolator.nestingRegexp);
1291
1291
  o3 = t3 && t3.length;
1292
1292
  }
1293
- let s2 = n2.replace && !I(n2.replace) ? n2.replace : n2;
1293
+ let s2 = n2.replace && !L(n2.replace) ? n2.replace : n2;
1294
1294
  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) {
1295
1295
  let t3 = e5.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
1296
1296
  o3 < r3 && (n2.nest = false);
1297
1297
  }
1298
1298
  !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();
1299
1299
  }
1300
- let a2 = n2.postProcess || this.options.postProcess, o2 = I(a2) ? [a2] : a2;
1301
- 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;
1300
+ let a2 = n2.postProcess || this.options.postProcess, o2 = L(a2) ? [a2] : a2;
1301
+ 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;
1302
1302
  }
1303
1303
  resolve(e5, t2 = {}) {
1304
1304
  let n2, r2, i2, a2, o2;
1305
- return I(e5) && (e5 = [e5]), Array.isArray(e5) && (e5 = e5.map((e6) => typeof e6 == `function` ? W(e6, { ...this.options, ...t2 }) : e6)), e5.forEach((e6) => {
1305
+ return L(e5) && (e5 = [e5]), Array.isArray(e5) && (e5 = e5.map((e6) => typeof e6 == `function` ? K(e6, { ...this.options, ...t2 }) : e6)), e5.forEach((e6) => {
1306
1306
  if (this.isValidLookup(n2)) return;
1307
1307
  let s2 = this.extractFromKey(e6, t2), c2 = s2.key;
1308
1308
  r2 = c2;
1309
1309
  let l2 = s2.namespaces;
1310
1310
  this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
1311
- 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);
1311
+ 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);
1312
1312
  l2.forEach((e7) => {
1313
- 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) => {
1313
+ 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) => {
1314
1314
  if (this.isValidLookup(n2)) return;
1315
1315
  a2 = r3;
1316
1316
  let o3 = [c2];
@@ -1337,7 +1337,7 @@ var Qn = class e3 extends U {
1337
1337
  return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e5, t2, n2, r2) : this.resourceStore.getResource(e5, t2, n2, r2);
1338
1338
  }
1339
1339
  getUsedParamsDetails(e5 = {}) {
1340
- 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;
1340
+ 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;
1341
1341
  if (n2 && e5.count !== void 0 && (r2.count = e5.count), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
1342
1342
  r2 = { ...r2 };
1343
1343
  for (let e6 of t2) delete r2[e6];
@@ -1349,22 +1349,22 @@ var Qn = class e3 extends U {
1349
1349
  return false;
1350
1350
  }
1351
1351
  };
1352
- var $n = class {
1352
+ var Zn = class {
1353
1353
  constructor(e5) {
1354
- this.options = e5, this.supportedLngs = this.options.supportedLngs || false, this.logger = H.create(`languageUtils`);
1354
+ this.options = e5, this.supportedLngs = this.options.supportedLngs || false, this.logger = W.create(`languageUtils`);
1355
1355
  }
1356
1356
  getScriptPartFromCode(e5) {
1357
- if (e5 = V(e5), !e5 || e5.indexOf(`-`) < 0) return null;
1357
+ if (e5 = U(e5), !e5 || e5.indexOf(`-`) < 0) return null;
1358
1358
  let t2 = e5.split(`-`);
1359
1359
  return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
1360
1360
  }
1361
1361
  getLanguagePartFromCode(e5) {
1362
- if (e5 = V(e5), !e5 || e5.indexOf(`-`) < 0) return e5;
1362
+ if (e5 = U(e5), !e5 || e5.indexOf(`-`) < 0) return e5;
1363
1363
  let t2 = e5.split(`-`);
1364
1364
  return this.formatLanguageCode(t2[0]);
1365
1365
  }
1366
1366
  formatLanguageCode(e5) {
1367
- if (I(e5) && e5.indexOf(`-`) > -1) {
1367
+ if (L(e5) && e5.indexOf(`-`) > -1) {
1368
1368
  let t2;
1369
1369
  try {
1370
1370
  t2 = Intl.getCanonicalLocales(e5)[0];
@@ -1397,7 +1397,7 @@ var $n = class {
1397
1397
  }
1398
1398
  getFallbackCodes(e5, t2) {
1399
1399
  if (!e5) return [];
1400
- if (typeof e5 == `function` && (e5 = e5(t2)), I(e5) && (e5 = [e5]), Array.isArray(e5)) return e5;
1400
+ if (typeof e5 == `function` && (e5 = e5(t2)), L(e5) && (e5 = [e5]), Array.isArray(e5)) return e5;
1401
1401
  if (!t2) return e5.default || [];
1402
1402
  let n2 = e5[t2];
1403
1403
  return n2 ||= e5[this.getScriptPartFromCode(t2)], n2 ||= e5[this.formatLanguageCode(t2)], n2 ||= e5[this.getLanguagePartFromCode(t2)], n2 ||= e5.default, n2 || [];
@@ -1406,29 +1406,29 @@ var $n = class {
1406
1406
  let n2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e5), r2 = [], i2 = (e6) => {
1407
1407
  e6 && (this.isSupportedCode(e6) ? r2.push(e6) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e6}`));
1408
1408
  };
1409
- 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) => {
1409
+ 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) => {
1410
1410
  r2.indexOf(e6) < 0 && i2(this.formatLanguageCode(e6));
1411
1411
  }), r2;
1412
1412
  }
1413
1413
  };
1414
- var er = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1415
- var tr = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1416
- var nr = class {
1414
+ var Qn = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1415
+ var $n = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1416
+ var er = class {
1417
1417
  constructor(e5, t2 = {}) {
1418
- this.languageUtils = e5, this.options = t2, this.logger = H.create(`pluralResolver`), this.pluralRulesCache = {};
1418
+ this.languageUtils = e5, this.options = t2, this.logger = W.create(`pluralResolver`), this.pluralRulesCache = {};
1419
1419
  }
1420
1420
  clearCache() {
1421
1421
  this.pluralRulesCache = {};
1422
1422
  }
1423
1423
  getRule(e5, t2 = {}) {
1424
- let n2 = V(e5 === `dev` ? `en` : e5), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
1424
+ let n2 = U(e5 === `dev` ? `en` : e5), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
1425
1425
  if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
1426
1426
  let a2;
1427
1427
  try {
1428
1428
  a2 = new Intl.PluralRules(n2, { type: r2 });
1429
1429
  } catch {
1430
- if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), tr;
1431
- if (!e5.match(/-|_/)) return tr;
1430
+ if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), $n;
1431
+ if (!e5.match(/-|_/)) return $n;
1432
1432
  let n3 = this.languageUtils.getLanguagePartFromCode(e5);
1433
1433
  a2 = this.getRule(n3, t2);
1434
1434
  }
@@ -1443,26 +1443,26 @@ var nr = class {
1443
1443
  }
1444
1444
  getSuffixes(e5, t2 = {}) {
1445
1445
  let n2 = this.getRule(e5, t2);
1446
- 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}`) : [];
1446
+ 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}`) : [];
1447
1447
  }
1448
1448
  getSuffix(e5, t2, n2 = {}) {
1449
1449
  let r2 = this.getRule(e5, n2);
1450
1450
  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));
1451
1451
  }
1452
1452
  };
1453
- var rr = (e5, t2, n2, r2 = `.`, i2 = true) => {
1454
- let a2 = In(e5, t2, n2);
1455
- return !a2 && i2 && I(n2) && (a2 = Wn(e5, n2, r2), a2 === void 0 && (a2 = Wn(t2, n2, r2))), a2;
1453
+ var tr = (e5, t2, n2, r2 = `.`, i2 = true) => {
1454
+ let a2 = Fn(e5, t2, n2);
1455
+ return !a2 && i2 && L(n2) && (a2 = H(e5, n2, r2), a2 === void 0 && (a2 = H(t2, n2, r2))), a2;
1456
1456
  };
1457
- var ir = (e5) => e5.replace(/\$/g, `$$$$`);
1458
- var ar = class {
1457
+ var nr = (e5) => e5.replace(/\$/g, `$$$$`);
1458
+ var rr = class {
1459
1459
  constructor(e5 = {}) {
1460
- this.logger = H.create(`interpolator`), this.options = e5, this.format = e5?.interpolation?.format || ((e6) => e6), this.init(e5);
1460
+ this.logger = W.create(`interpolator`), this.options = e5, this.format = e5?.interpolation?.format || ((e6) => e6), this.init(e5);
1461
1461
  }
1462
1462
  init(e5 = {}) {
1463
1463
  e5.interpolation ||= { escapeValue: true };
1464
1464
  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;
1465
- 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();
1465
+ 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();
1466
1466
  }
1467
1467
  reset() {
1468
1468
  this.options && this.init(this.options);
@@ -1474,27 +1474,27 @@ var ar = class {
1474
1474
  interpolate(e5, t2, n2, r2) {
1475
1475
  let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e6) => {
1476
1476
  if (e6.indexOf(this.formatSeparator) < 0) {
1477
- let i4 = rr(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
1477
+ let i4 = tr(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
1478
1478
  return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e6 }) : i4;
1479
1479
  }
1480
1480
  let i3 = e6.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
1481
- return this.format(rr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1481
+ return this.format(tr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1482
1482
  };
1483
1483
  this.resetRegExp();
1484
1484
  let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
1485
- return [{ regex: this.regexpUnescape, safeValue: (e6) => ir(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? ir(this.escape(e6)) : ir(e6) }].forEach((t3) => {
1485
+ return [{ regex: this.regexpUnescape, safeValue: (e6) => nr(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? nr(this.escape(e6)) : nr(e6) }].forEach((t3) => {
1486
1486
  for (o2 = 0; i2 = t3.regex.exec(e5); ) {
1487
1487
  let n3 = i2[1].trim();
1488
1488
  if (a2 = c2(n3), a2 === void 0) {
1489
1489
  if (typeof l2 == `function`) {
1490
1490
  let t4 = l2(e5, i2, r2);
1491
- a2 = I(t4) ? t4 : ``;
1491
+ a2 = L(t4) ? t4 : ``;
1492
1492
  } else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
1493
1493
  else if (u2) {
1494
1494
  a2 = i2[0];
1495
1495
  continue;
1496
1496
  } else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e5}`), a2 = ``;
1497
- } else !I(a2) && !this.useRawValueToEscape && (a2 = kn(a2));
1497
+ } else !L(a2) && !this.useRawValueToEscape && (a2 = On(a2));
1498
1498
  let s3 = t3.safeValue(a2);
1499
1499
  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;
1500
1500
  }
@@ -1504,7 +1504,7 @@ var ar = class {
1504
1504
  let r2, i2, a2, o2 = (e6, t3) => {
1505
1505
  let n3 = this.nestingOptionsSeparator;
1506
1506
  if (e6.indexOf(n3) < 0) return e6;
1507
- let r3 = e6.split(RegExp(`${B(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
1507
+ let r3 = e6.split(RegExp(`${V(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
1508
1508
  e6 = r3[0], i3 = this.interpolate(i3, a2);
1509
1509
  let o3 = i3.match(/'/g), s2 = i3.match(/"/g);
1510
1510
  ((o3?.length ?? 0) % 2 == 0 && !s2 || (s2?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
@@ -1517,15 +1517,15 @@ var ar = class {
1517
1517
  };
1518
1518
  for (; r2 = this.nestingRegexp.exec(e5); ) {
1519
1519
  let s2 = [];
1520
- a2 = { ...n2 }, a2 = a2.replace && !I(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1520
+ a2 = { ...n2 }, a2 = a2.replace && !L(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1521
1521
  let c2 = /{.*}/.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
1522
- 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;
1523
- 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;
1522
+ 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;
1523
+ 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;
1524
1524
  }
1525
1525
  return e5;
1526
1526
  }
1527
1527
  };
1528
- var or = (e5) => {
1528
+ var ir = (e5) => {
1529
1529
  let t2 = e5.toLowerCase().trim(), n2 = {};
1530
1530
  if (e5.indexOf(`(`) > -1) {
1531
1531
  let r2 = e5.split(`(`);
@@ -1540,23 +1540,23 @@ var or = (e5) => {
1540
1540
  }
1541
1541
  return { formatName: t2, formatOptions: n2 };
1542
1542
  };
1543
- var sr = (e5) => {
1543
+ var ar = (e5) => {
1544
1544
  let t2 = {};
1545
1545
  return (n2, r2, i2) => {
1546
1546
  let a2 = i2;
1547
1547
  i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
1548
1548
  let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
1549
- return s2 || (s2 = e5(V(r2), i2), t2[o2] = s2), s2(n2);
1549
+ return s2 || (s2 = e5(U(r2), i2), t2[o2] = s2), s2(n2);
1550
1550
  };
1551
1551
  };
1552
- var cr = (e5) => (t2, n2, r2) => e5(V(n2), r2)(t2);
1553
- var lr = class {
1552
+ var or = (e5) => (t2, n2, r2) => e5(U(n2), r2)(t2);
1553
+ var sr = class {
1554
1554
  constructor(e5 = {}) {
1555
- this.logger = H.create(`formatter`), this.options = e5, this.init(e5);
1555
+ this.logger = W.create(`formatter`), this.options = e5, this.init(e5);
1556
1556
  }
1557
1557
  init(e5, t2 = { interpolation: {} }) {
1558
1558
  this.formatSeparator = t2.interpolation.formatSeparator || `,`;
1559
- let n2 = t2.cacheInBuiltFormats ? sr : cr;
1559
+ let n2 = t2.cacheInBuiltFormats ? ar : or;
1560
1560
  this.formats = { number: n2((e6, t3) => {
1561
1561
  let n3 = new Intl.NumberFormat(e6, { ...t3 });
1562
1562
  return (e7) => n3.format(e7);
@@ -1578,7 +1578,7 @@ var lr = class {
1578
1578
  this.formats[e5.toLowerCase().trim()] = t2;
1579
1579
  }
1580
1580
  addCached(e5, t2) {
1581
- this.formats[e5.toLowerCase().trim()] = sr(t2);
1581
+ this.formats[e5.toLowerCase().trim()] = ar(t2);
1582
1582
  }
1583
1583
  format(e5, t2, n2, r2 = {}) {
1584
1584
  let i2 = t2.split(this.formatSeparator);
@@ -1587,7 +1587,7 @@ var lr = class {
1587
1587
  i2[0] = [i2[0], ...i2.splice(1, e6)].join(this.formatSeparator);
1588
1588
  }
1589
1589
  return i2.reduce((e6, t3) => {
1590
- let { formatName: i3, formatOptions: a2 } = or(t3);
1590
+ let { formatName: i3, formatOptions: a2 } = ir(t3);
1591
1591
  if (this.formats[i3]) {
1592
1592
  let t4 = e6;
1593
1593
  try {
@@ -1602,12 +1602,12 @@ var lr = class {
1602
1602
  }, e5);
1603
1603
  }
1604
1604
  };
1605
- var ur = (e5, t2) => {
1605
+ var cr = (e5, t2) => {
1606
1606
  e5.pending[t2] !== void 0 && (delete e5.pending[t2], e5.pendingCount--);
1607
1607
  };
1608
- var dr = class extends U {
1608
+ var lr = class extends G {
1609
1609
  constructor(e5, t2, n2, r2 = {}) {
1610
- 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);
1610
+ 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);
1611
1611
  }
1612
1612
  queueLoad(e5, t2, n2, r2) {
1613
1613
  let i2 = {}, a2 = {}, o2 = {}, s2 = {};
@@ -1624,7 +1624,7 @@ var dr = class extends U {
1624
1624
  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);
1625
1625
  let o2 = {};
1626
1626
  this.queue.forEach((n3) => {
1627
- Fn(n3.loaded, [i2], a2), ur(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
1627
+ Pn(n3.loaded, [i2], a2), cr(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
1628
1628
  o2[e6] || (o2[e6] = {});
1629
1629
  let t3 = n3.loaded[e6];
1630
1630
  t3.length && t3.forEach((t4) => {
@@ -1666,7 +1666,7 @@ var dr = class extends U {
1666
1666
  }
1667
1667
  prepareLoading(e5, t2, n2 = {}, r2) {
1668
1668
  if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
1669
- I(e5) && (e5 = this.languageUtils.toResolveHierarchy(e5)), I(t2) && (t2 = [t2]);
1669
+ L(e5) && (e5 = this.languageUtils.toResolveHierarchy(e5)), L(t2) && (t2 = [t2]);
1670
1670
  let i2 = this.queueLoad(e5, t2, n2, r2);
1671
1671
  if (!i2.toLoad.length) return i2.pending.length || r2(), null;
1672
1672
  i2.toLoad.forEach((e6) => {
@@ -1706,9 +1706,9 @@ var dr = class extends U {
1706
1706
  }
1707
1707
  }
1708
1708
  };
1709
- 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) => {
1709
+ 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) => {
1710
1710
  let t2 = {};
1711
- 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`) {
1711
+ 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`) {
1712
1712
  let n2 = e5[3] || e5[2];
1713
1713
  Object.keys(n2).forEach((e6) => {
1714
1714
  t2[e6] = n2[e6];
@@ -1716,23 +1716,23 @@ var fr = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
1716
1716
  }
1717
1717
  return t2;
1718
1718
  }, interpolation: { escapeValue: true, format: (e5) => e5, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
1719
- 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);
1720
- var G = () => {
1719
+ 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);
1720
+ var q = () => {
1721
1721
  };
1722
- var mr = (e5) => {
1722
+ var fr = (e5) => {
1723
1723
  Object.getOwnPropertyNames(Object.getPrototypeOf(e5)).forEach((t2) => {
1724
1724
  typeof e5[t2] == `function` && (e5[t2] = e5[t2].bind(e5));
1725
1725
  });
1726
1726
  };
1727
- var hr = `__i18next_supportNoticeShown`;
1728
- var gr = () => !!(typeof globalThis < `u` && globalThis[hr] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
1729
- var _r = () => {
1730
- typeof globalThis < `u` && (globalThis[hr] = true);
1727
+ var pr = `__i18next_supportNoticeShown`;
1728
+ var mr = () => !!(typeof globalThis < `u` && globalThis[pr] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
1729
+ var hr = () => {
1730
+ typeof globalThis < `u` && (globalThis[pr] = true);
1731
1731
  };
1732
- 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));
1733
- var K = class e4 extends U {
1732
+ 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));
1733
+ var J = class e4 extends G {
1734
1734
  constructor(e5 = {}, t2) {
1735
- if (super(), this.options = pr(e5), this.services = {}, this.logger = H, this.modules = { external: [] }, mr(this), t2 && !this.isInitialized && !e5.isClone) {
1735
+ if (super(), this.options = dr(e5), this.services = {}, this.logger = W, this.modules = { external: [] }, fr(this), t2 && !this.isInitialized && !e5.isClone) {
1736
1736
  if (!this.options.initAsync) return this.init(e5, t2), this;
1737
1737
  setTimeout(() => {
1738
1738
  this.init(e5, t2);
@@ -1740,26 +1740,26 @@ var K = class e4 extends U {
1740
1740
  }
1741
1741
  }
1742
1742
  init(e5 = {}, t2) {
1743
- 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]));
1744
- let n2 = fr();
1745
- 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());
1743
+ 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]));
1744
+ let n2 = ur();
1745
+ 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());
1746
1746
  let r2 = (e6) => e6 ? typeof e6 == `function` ? new e6() : e6 : null;
1747
1747
  if (!this.options.isClone) {
1748
- this.modules.logger ? H.init(r2(this.modules.logger), this.options) : H.init(null, this.options);
1748
+ this.modules.logger ? W.init(r2(this.modules.logger), this.options) : W.init(null, this.options);
1749
1749
  let e6;
1750
- e6 = this.modules.formatter ? this.modules.formatter : lr;
1751
- let t3 = new $n(this.options);
1752
- this.store = new Kn(this.options.resources, this.options);
1750
+ e6 = this.modules.formatter ? this.modules.formatter : sr;
1751
+ let t3 = new Zn(this.options);
1752
+ this.store = new Wn(this.options.resources, this.options);
1753
1753
  let i3 = this.services;
1754
- 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) => {
1754
+ 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) => {
1755
1755
  this.emit(e7, ...t4);
1756
- }), 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) => {
1756
+ }), 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) => {
1757
1757
  this.emit(e7, ...t4);
1758
1758
  }), this.modules.external.forEach((e7) => {
1759
1759
  e7.init && e7.init(this);
1760
1760
  });
1761
1761
  }
1762
- if (this.format = this.options.interpolation.format, t2 ||= G, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1762
+ if (this.format = this.options.interpolation.format, t2 ||= q, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1763
1763
  let e6 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1764
1764
  e6.length > 0 && e6[0] !== `dev` && (this.options.lng = e6[0]);
1765
1765
  }
@@ -1768,7 +1768,7 @@ var K = class e4 extends U {
1768
1768
  }), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e6) => {
1769
1769
  this[e6] = (...t3) => (this.store[e6](...t3), this);
1770
1770
  });
1771
- let i2 = L(), a2 = () => {
1771
+ let i2 = R(), a2 = () => {
1772
1772
  let e6 = (e7, n3) => {
1773
1773
  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);
1774
1774
  };
@@ -1777,8 +1777,8 @@ var K = class e4 extends U {
1777
1777
  };
1778
1778
  return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
1779
1779
  }
1780
- loadResources(e5, t2 = G) {
1781
- let n2 = t2, r2 = I(e5) ? e5 : this.language;
1780
+ loadResources(e5, t2 = q) {
1781
+ let n2 = t2, r2 = L(e5) ? e5 : this.language;
1782
1782
  if (typeof e5 == `function` && (n2 = e5), !this.options.resources || this.options.partialBundledLanguages) {
1783
1783
  if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
1784
1784
  let e6 = [], t3 = (t4) => {
@@ -1792,15 +1792,15 @@ var K = class e4 extends U {
1792
1792
  } else n2(null);
1793
1793
  }
1794
1794
  reloadResources(e5, t2, n2) {
1795
- let r2 = L();
1796
- 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) => {
1795
+ let r2 = R();
1796
+ 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) => {
1797
1797
  r2.resolve(), n2(e6);
1798
1798
  }), r2;
1799
1799
  }
1800
1800
  use(e5) {
1801
1801
  if (!e5) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
1802
1802
  if (!e5.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
1803
- 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;
1803
+ 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;
1804
1804
  }
1805
1805
  setResolvedLanguage(e5) {
1806
1806
  if (e5 && this.languages && !([`cimode`, `dev`].indexOf(e5) > -1)) {
@@ -1816,7 +1816,7 @@ var K = class e4 extends U {
1816
1816
  }
1817
1817
  changeLanguage(e5, t2) {
1818
1818
  this.isLanguageChangingTo = e5;
1819
- let n2 = L();
1819
+ let n2 = R();
1820
1820
  this.emit(`languageChanging`, e5);
1821
1821
  let r2 = (e6) => {
1822
1822
  this.language = e6, this.languages = this.services.languageUtils.toResolveHierarchy(e6), this.resolvedLanguage = void 0, this.setResolvedLanguage(e6);
@@ -1824,7 +1824,7 @@ var K = class e4 extends U {
1824
1824
  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));
1825
1825
  }, a2 = (t3) => {
1826
1826
  !e5 && !t3 && this.services.languageDetector && (t3 = []);
1827
- let n3 = I(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(I(t3) ? [t3] : t3);
1827
+ let n3 = L(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(L(t3) ? [t3] : t3);
1828
1828
  a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e6) => {
1829
1829
  i2(e6, a3);
1830
1830
  });
@@ -1836,11 +1836,11 @@ var K = class e4 extends U {
1836
1836
  let a2;
1837
1837
  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);
1838
1838
  let o2 = { ...this.options, ...a2 };
1839
- typeof a2.keyPrefix == `function` && (a2.keyPrefix = W(a2.keyPrefix, o2));
1839
+ typeof a2.keyPrefix == `function` && (a2.keyPrefix = K(a2.keyPrefix, o2));
1840
1840
  let s2 = this.options.keySeparator || `.`, c2;
1841
- 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);
1841
+ 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);
1842
1842
  };
1843
- return I(e5) ? r2.lng = e5 : r2.lngs = e5, r2.ns = t2, r2.keyPrefix = n2, r2;
1843
+ return L(e5) ? r2.lng = e5 : r2.lngs = e5, r2.ns = t2, r2.keyPrefix = n2, r2;
1844
1844
  }
1845
1845
  t(...e5) {
1846
1846
  return this.translator?.translate(...e5);
@@ -1867,16 +1867,16 @@ var K = class e4 extends U {
1867
1867
  return !!(this.hasResourceBundle(n2, e5) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a2(n2, e5) && (!r2 || a2(i2, e5)));
1868
1868
  }
1869
1869
  loadNamespaces(e5, t2) {
1870
- let n2 = L();
1871
- return this.options.ns ? (I(e5) && (e5 = [e5]), e5.forEach((e6) => {
1870
+ let n2 = R();
1871
+ return this.options.ns ? (L(e5) && (e5 = [e5]), e5.forEach((e6) => {
1872
1872
  this.options.ns.indexOf(e6) < 0 && this.options.ns.push(e6);
1873
1873
  }), this.loadResources((e6) => {
1874
1874
  n2.resolve(), t2 && t2(e6);
1875
1875
  }), n2) : (t2 && t2(), Promise.resolve());
1876
1876
  }
1877
1877
  loadLanguages(e5, t2) {
1878
- let n2 = L();
1879
- I(e5) && (e5 = [e5]);
1878
+ let n2 = R();
1879
+ L(e5) && (e5 = [e5]);
1880
1880
  let r2 = this.options.preload || [], i2 = e5.filter((e6) => r2.indexOf(e6) < 0 && this.services.languageUtils.isSupportedCode(e6));
1881
1881
  return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e6) => {
1882
1882
  n2.resolve(), t2 && t2(e6);
@@ -1892,24 +1892,24 @@ var K = class e4 extends U {
1892
1892
  }
1893
1893
  } catch {
1894
1894
  }
1895
- 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());
1895
+ 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());
1896
1896
  return e5.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.indexOf(n2.getLanguagePartFromCode(e5)) > -1 || e5.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
1897
1897
  }
1898
1898
  static createInstance(t2 = {}, n2) {
1899
1899
  let r2 = new e4(t2, n2);
1900
1900
  return r2.createInstance = e4.createInstance, r2;
1901
1901
  }
1902
- cloneInstance(t2 = {}, n2 = G) {
1902
+ cloneInstance(t2 = {}, n2 = q) {
1903
1903
  let r2 = t2.forkResourceStore;
1904
1904
  r2 && delete t2.forkResourceStore;
1905
1905
  let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
1906
1906
  if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e5) => {
1907
1907
  a2[e5] = this[e5];
1908
- }), 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) {
1909
- let e5 = { ...fr().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
1910
- a2.services.interpolator = new ar(n3);
1908
+ }), 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) {
1909
+ let e5 = { ...ur().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
1910
+ a2.services.interpolator = new rr(n3);
1911
1911
  }
1912
- return a2.translator = new Qn(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
1912
+ return a2.translator = new Xn(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
1913
1913
  a2.emit(e5, ...t3);
1914
1914
  }), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
1915
1915
  }
@@ -1917,54 +1917,54 @@ var K = class e4 extends U {
1917
1917
  return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
1918
1918
  }
1919
1919
  }.createInstance();
1920
- 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;
1921
- var yr = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
1922
- 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;": `/` };
1923
- var xr = (e5) => br[e5];
1924
- 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 };
1925
- var Cr = (e5 = {}) => {
1926
- Sr = { ...Sr, ...e5 };
1920
+ 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;
1921
+ var _r = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
1922
+ 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;": `/` };
1923
+ var yr = (e5) => vr[e5];
1924
+ 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 };
1925
+ var xr = (e5 = {}) => {
1926
+ br = { ...br, ...e5 };
1927
1927
  };
1928
- var wr = { type: `3rdParty`, init(e5) {
1929
- Cr(e5.options.react);
1928
+ var Sr = { type: `3rdParty`, init(e5) {
1929
+ xr(e5.options.react);
1930
1930
  } };
1931
- var q = /* @__PURE__ */ new Map();
1932
- var Tr = 500;
1933
- var J;
1934
- function Er() {
1935
- if (J === void 0) try {
1936
- J = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
1931
+ var Y = /* @__PURE__ */ new Map();
1932
+ var Cr = 500;
1933
+ var X;
1934
+ function wr() {
1935
+ if (X === void 0) try {
1936
+ X = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
1937
1937
  } catch {
1938
- J = false;
1938
+ X = false;
1939
1939
  }
1940
- return J;
1940
+ return X;
1941
1941
  }
1942
- var Dr = 15;
1943
- function Or(e5) {
1944
- 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.`);
1942
+ var Tr = 15;
1943
+ function Er(e5) {
1944
+ 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.`);
1945
1945
  }
1946
- function kr(e5, t2, n2) {
1946
+ function Dr(e5, t2, n2) {
1947
1947
  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(`&`)}`;
1948
1948
  }
1949
- function Ar(e5, t2, n2) {
1950
- let r2 = kr(e5, t2, n2), i2 = q.get(r2);
1951
- return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), q.size >= Tr && q.clear(), q.set(r2, i2)), i2;
1949
+ function Or(e5, t2, n2) {
1950
+ let r2 = Dr(e5, t2, n2), i2 = Y.get(r2);
1951
+ return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), Y.size >= Cr && Y.clear(), Y.set(r2, i2)), i2;
1952
1952
  }
1953
- function jr(e5, { value: t2, currency: n2 }, r2 = {}) {
1954
- return Or(t2), Ar(e5, n2, r2).format(t2);
1953
+ function kr(e5, { value: t2, currency: n2 }, r2 = {}) {
1954
+ return Er(t2), Or(e5, n2, r2).format(t2);
1955
1955
  }
1956
- function Mr(e5, { value: t2, currency: n2 }, r2 = {}) {
1957
- return Or(t2), Ar(e5, n2, r2).formatToParts(t2);
1956
+ function Ar(e5, { value: t2, currency: n2 }, r2 = {}) {
1957
+ return Er(t2), Or(e5, n2, r2).formatToParts(t2);
1958
1958
  }
1959
- function Nr(e5) {
1959
+ function jr(e5) {
1960
1960
  return an().find((e6) => e6.primary)?.id ?? e5;
1961
1961
  }
1962
- function Pr(e5, t2) {
1962
+ function Mr(e5, t2) {
1963
1963
  let { locale: n2, ...r2 } = t2 ?? {}, i2 = n2 ?? e5.essentials?.locale;
1964
1964
  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.`);
1965
1965
  return { locale: i2, formatOptions: r2 };
1966
1966
  }
1967
- var Fr = On({ getLanguage: (e5) => () => {
1967
+ var Nr = Dn({ getLanguage: (e5) => () => {
1968
1968
  let t2 = e5.essentials?.language;
1969
1969
  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.`);
1970
1970
  return t2;
@@ -1973,20 +1973,20 @@ var Fr = On({ getLanguage: (e5) => () => {
1973
1973
  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.`);
1974
1974
  return t2;
1975
1975
  }, formatCurrency: (e5) => (t2, n2) => {
1976
- let { locale: r2, formatOptions: i2 } = Pr(e5, n2);
1977
- return jr(r2, t2, i2);
1976
+ let { locale: r2, formatOptions: i2 } = Mr(e5, n2);
1977
+ return kr(r2, t2, i2);
1978
1978
  }, formatCurrencyToParts: (e5) => (t2, n2) => {
1979
- let { locale: r2, formatOptions: i2 } = Pr(e5, n2);
1980
- return Mr(r2, t2, i2);
1979
+ let { locale: r2, formatOptions: i2 } = Mr(e5, n2);
1980
+ return Ar(r2, t2, i2);
1981
1981
  }, getTranslationFunction: (e5) => () => {
1982
1982
  let t2 = e5.translations?.();
1983
1983
  if (!t2) throw Error(`Host translation resources are not available.`);
1984
- let n2 = K.createInstance(), r2 = Nr(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
1985
- return n2.use(wr).init(i2, (e6) => {
1984
+ let n2 = J.createInstance(), r2 = jr(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
1985
+ return n2.use(Sr).init(i2, (e6) => {
1986
1986
  if (e6) throw e6;
1987
1987
  }), n2.t.bind(n2);
1988
1988
  } });
1989
- var Ir = class {
1989
+ var Pr = class {
1990
1990
  constructor(e5) {
1991
1991
  this.message = e5, this.captureException = () => {
1992
1992
  console.error(this.message);
@@ -2001,42 +2001,42 @@ var Ir = class {
2001
2001
  };
2002
2002
  }
2003
2003
  };
2004
- var Lr = (e5) => new Ir(e5);
2005
- 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.`) });
2006
- 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` };
2007
- function Br(e5) {
2004
+ var Fr = (e5) => new Pr(e5);
2005
+ 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.`) });
2006
+ 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` };
2007
+ function Rr(e5) {
2008
2008
  try {
2009
- let t2 = Rr.getMonitoringClient?.();
2009
+ let t2 = Ir.getMonitoringClient?.();
2010
2010
  return t2 && typeof t2[e5] == `function` ? t2 : null;
2011
2011
  } catch {
2012
2012
  return null;
2013
2013
  }
2014
2014
  }
2015
- function Vr(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2016
- let a2 = Br(`captureException`);
2015
+ function zr(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
2016
+ let a2 = Rr(`captureException`);
2017
2017
  if (!a2) return;
2018
2018
  let o2 = e5 instanceof Error ? e5 : Error(String(e5));
2019
2019
  a2.captureException(o2, { level: r2, tags: { feature: t2, action: n2 }, ...i2 ? { contexts: i2 } : {} });
2020
2020
  }
2021
- function Hr(e5, { feature: t2, tags: n2 }, r2) {
2022
- let i2 = Br(`startSpanManual`);
2021
+ function Br(e5, { feature: t2, tags: n2 }, r2) {
2022
+ let i2 = Rr(`startSpanManual`);
2023
2023
  if (!i2) return r2;
2024
2024
  let a2 = i2.startSpanManual({ name: e5, tags: { feature: t2, ...n2 } });
2025
2025
  return r2.then(() => a2.end(), (e6) => a2.fail(e6)), r2;
2026
2026
  }
2027
- var Ur = class extends e {
2027
+ var Vr = class extends e {
2028
2028
  state = { hasError: false };
2029
2029
  static getDerivedStateFromError() {
2030
2030
  return { hasError: true };
2031
2031
  }
2032
2032
  componentDidCatch(e5, t2) {
2033
- Vr(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2033
+ zr(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2034
2034
  }
2035
2035
  render() {
2036
2036
  return this.state.hasError ? this.props.fallback : this.props.children;
2037
2037
  }
2038
2038
  };
2039
- function Wr(e5) {
2039
+ function Hr(e5) {
2040
2040
  let t2 = e5;
2041
2041
  if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
2042
2042
  t2.__state = { status: `fulfilled`, value: e6 };
@@ -2045,37 +2045,37 @@ function Wr(e5) {
2045
2045
  })), t2.__state.status === `fulfilled`) return t2.__state.value;
2046
2046
  throw t2.__state.status === `rejected` ? t2.__state.reason : t2;
2047
2047
  }
2048
- function Gr(e5) {
2048
+ function Ur(e5) {
2049
2049
  let t2 = Promise.resolve(e5);
2050
2050
  return t2.__state = { status: `fulfilled`, value: e5 }, t2;
2051
2051
  }
2052
- var Kr = /* @__PURE__ */ new WeakMap();
2053
- function qr(e5, t2, n2) {
2054
- let r2 = Kr.get(e5);
2055
- r2 || (r2 = /* @__PURE__ */ new WeakMap(), Kr.set(e5, r2));
2052
+ var Wr = /* @__PURE__ */ new WeakMap();
2053
+ function Gr(e5, t2, n2) {
2054
+ let r2 = Wr.get(e5);
2055
+ r2 || (r2 = /* @__PURE__ */ new WeakMap(), Wr.set(e5, r2));
2056
2056
  let i2 = r2.get(t2);
2057
2057
  i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
2058
2058
  let a2 = i2.get(n2);
2059
2059
  if (!a2) {
2060
2060
  let r3 = e5;
2061
- 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);
2061
+ 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);
2062
2062
  }
2063
2063
  return a2;
2064
2064
  }
2065
- function Y(e5) {
2065
+ function Z(e5) {
2066
2066
  return e5;
2067
2067
  }
2068
- var Jr = Y(`@wix/site-service-url`);
2069
- var Yr = `appSectionParams`;
2070
- function Xr(e5) {
2071
- let t2 = e5.searchParams.get(Yr);
2068
+ var Kr = Z(`@wix/site-service-url`);
2069
+ var qr = `appSectionParams`;
2070
+ function Jr(e5) {
2071
+ let t2 = e5.searchParams.get(qr);
2072
2072
  if (t2 === null) return e5;
2073
2073
  let n2 = new URL(e5);
2074
- n2.searchParams.delete(Yr);
2075
- for (let [e6, r2] of Object.entries(Zr(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
2074
+ n2.searchParams.delete(qr);
2075
+ for (let [e6, r2] of Object.entries(Yr(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
2076
2076
  return n2;
2077
2077
  }
2078
- function Zr(e5) {
2078
+ function Yr(e5) {
2079
2079
  try {
2080
2080
  let t2 = JSON.parse(e5);
2081
2081
  return t2 && typeof t2 == `object` && !Array.isArray(t2) ? t2 : {};
@@ -2083,16 +2083,16 @@ function Zr(e5) {
2083
2083
  return {};
2084
2084
  }
2085
2085
  }
2086
- var Qr = `bookings-uou:url-change`;
2087
- var $r = (e5) => {
2086
+ var Xr = `bookings-uou:url-change`;
2087
+ var Zr = (e5) => {
2088
2088
  let t2 = new URL(e5);
2089
2089
  return t2.searchParams.sort(), t2.href;
2090
2090
  };
2091
- function ei(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2091
+ function Qr(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2092
2092
  let r2 = globalThis.window;
2093
2093
  if (!r2?.history) return;
2094
2094
  let i2 = new URL(r2.location.href);
2095
- if ($r(i2) === $r(e5)) return;
2095
+ if (Zr(i2) === Zr(e5)) return;
2096
2096
  let a2 = { scrollY: r2.scrollY };
2097
2097
  if (n2) r2.history.replaceState(a2, ``, e5.href);
2098
2098
  else {
@@ -2103,54 +2103,54 @@ function ei(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2103
2103
  return;
2104
2104
  }
2105
2105
  }
2106
- r2.dispatchEvent(new Event(Qr));
2106
+ r2.dispatchEvent(new Event(Xr));
2107
2107
  }
2108
- function ti(e5) {
2108
+ function $r(e5) {
2109
2109
  let t2 = globalThis.window;
2110
- return t2 ? (t2.addEventListener(Qr, e5), t2.addEventListener(`popstate`, e5), () => {
2111
- t2.removeEventListener(Qr, e5), t2.removeEventListener(`popstate`, e5);
2110
+ return t2 ? (t2.addEventListener(Xr, e5), t2.addEventListener(`popstate`, e5), () => {
2111
+ t2.removeEventListener(Xr, e5), t2.removeEventListener(`popstate`, e5);
2112
2112
  }) : () => {
2113
2113
  };
2114
2114
  }
2115
- var ni = (e5) => {
2115
+ var ei = (e5) => {
2116
2116
  try {
2117
2117
  return decodeURIComponent(e5);
2118
2118
  } catch {
2119
2119
  return e5;
2120
2120
  }
2121
2121
  };
2122
- function ri(e5, t2) {
2122
+ function ti(e5, t2) {
2123
2123
  let n2 = t2 ? new URL(t2).pathname : `/`;
2124
- return `./${ni(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2124
+ return `./${ei(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2125
2125
  }
2126
- function ii() {
2127
- let e5 = d(Jr), t2 = r(() => e5.currentUrl, [e5]), n2 = l(ti, t2, t2), i2 = o(() => Xr(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2128
- 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 };
2126
+ function ni() {
2127
+ let e5 = d(Kr), t2 = r(() => e5.currentUrl, [e5]), n2 = l($r, t2, t2), i2 = o(() => Jr(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
2128
+ 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 };
2129
2129
  }
2130
- var X = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
2131
- var ai = Y(`@wix/site-service-warmup-data`);
2132
- function oi() {
2130
+ var Q = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
2131
+ var ri = Z(`@wix/site-service-warmup-data`);
2132
+ function ii() {
2133
2133
  try {
2134
2134
  return u();
2135
2135
  } catch {
2136
2136
  return null;
2137
2137
  }
2138
2138
  }
2139
- function si(e5) {
2139
+ function ai(e5) {
2140
2140
  try {
2141
- return e5 ? e5(ai) : null;
2141
+ return e5 ? e5(ri) : null;
2142
2142
  } catch {
2143
2143
  return null;
2144
2144
  }
2145
2145
  }
2146
- function ci() {
2147
- let e5 = si(oi()), t2 = typeof window > `u`;
2146
+ function oi() {
2147
+ let e5 = ai(ii()), t2 = typeof window > `u`;
2148
2148
  return { scope: e5 ?? void 0, get: async (n2) => {
2149
2149
  if (t2 || !e5) return null;
2150
2150
  try {
2151
2151
  return await e5.get(n2);
2152
2152
  } catch (e6) {
2153
- return Vr(e6, { feature: zr.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2153
+ return zr(e6, { feature: Lr.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2154
2154
  }
2155
2155
  }, set: (n2, r2) => {
2156
2156
  if (t2 && e5) try {
@@ -2159,75 +2159,75 @@ function ci() {
2159
2159
  }
2160
2160
  } };
2161
2161
  }
2162
- var li = Y(`@wix/site-service-locale`);
2163
- var ui = Y;
2164
- var di = ui(`@wix/viewer-service-multilingual`);
2165
- function fi() {
2162
+ var si = Z(`@wix/site-service-locale`);
2163
+ var ci = Z;
2164
+ var li = ci(`@wix/viewer-service-multilingual`);
2165
+ function ui() {
2166
2166
  try {
2167
- return Fr.getLanguage() ?? `en`;
2167
+ return Nr.getLanguage() ?? `en`;
2168
2168
  } catch {
2169
2169
  return `en`;
2170
2170
  }
2171
2171
  }
2172
- function pi(e5) {
2172
+ function di(e5) {
2173
2173
  try {
2174
2174
  return d(e5);
2175
2175
  } catch {
2176
2176
  return null;
2177
2177
  }
2178
2178
  }
2179
- function mi() {
2180
- let e5 = pi(li), t2 = pi(di);
2181
- return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || fi();
2182
- }
2183
- var hi = `bookings-uou`;
2184
- function gi(e5) {
2185
- return `${hi}:${e5}:locations:all`;
2186
- }
2187
- var _i = 5e3;
2188
- var vi = 100;
2189
- var yi = `wix-warmup-data`;
2190
- var bi = null;
2191
- function xi(e5) {
2179
+ function fi() {
2180
+ let e5 = di(si), t2 = di(li);
2181
+ return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || ui();
2182
+ }
2183
+ var pi = `bookings-uou`;
2184
+ function mi(e5) {
2185
+ return `${pi}:${e5}:locations:all`;
2186
+ }
2187
+ var hi = 5e3;
2188
+ var gi = 100;
2189
+ var _i = `wix-warmup-data`;
2190
+ var vi = null;
2191
+ function yi(e5) {
2192
2192
  if (typeof document < `u`) try {
2193
- let t2 = document.getElementById(yi)?.textContent;
2194
- return t2 ? (bi?.text !== t2 && (bi = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), bi.data[e5] ?? void 0) : void 0;
2193
+ let t2 = document.getElementById(_i)?.textContent;
2194
+ return t2 ? (vi?.text !== t2 && (vi = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), vi.data[e5] ?? void 0) : void 0;
2195
2195
  } catch {
2196
2196
  return;
2197
2197
  }
2198
2198
  }
2199
- var Si = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2200
- var Ci = Si();
2201
- var wi = /* @__PURE__ */ new WeakMap();
2202
- var Ti = /* @__PURE__ */ new WeakMap();
2203
- function Ei(e5) {
2204
- if (!e5) return Ci;
2205
- let t2 = wi.get(e5);
2206
- return t2 || (t2 = Si(), wi.set(e5, t2)), t2;
2199
+ var bi = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2200
+ var xi = bi();
2201
+ var Si = /* @__PURE__ */ new WeakMap();
2202
+ var Ci = /* @__PURE__ */ new WeakMap();
2203
+ function wi(e5) {
2204
+ if (!e5) return xi;
2205
+ let t2 = Si.get(e5);
2206
+ return t2 || (t2 = bi(), Si.set(e5, t2)), t2;
2207
2207
  }
2208
- function Di({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2208
+ function Ti({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2209
2209
  if (e5 === null) return n2();
2210
2210
  if (typeof window > `u`) {
2211
2211
  let r3 = () => n2().then((n3) => (t2.set(e5, n3), n3)), { scope: i3 } = t2;
2212
2212
  if (!i3) return r3();
2213
- let a3 = Ti.get(i3);
2214
- a3 || (a3 = /* @__PURE__ */ new Map(), Ti.set(i3, a3));
2213
+ let a3 = Ci.get(i3);
2214
+ a3 || (a3 = /* @__PURE__ */ new Map(), Ci.set(i3, a3));
2215
2215
  let o3 = a3.get(e5);
2216
2216
  if (o3) return o3;
2217
2217
  let s3 = r3();
2218
2218
  return a3.set(e5, s3), s3.catch(() => a3.delete(e5)), s3;
2219
2219
  }
2220
- let i2 = Ei(t2.scope), a2 = Date.now();
2220
+ let i2 = wi(t2.scope), a2 = Date.now();
2221
2221
  for (let [e6, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e6);
2222
2222
  let o2 = i2.promises.get(e5);
2223
2223
  if (o2 && !r2) return o2.promise;
2224
2224
  r2 && i2.invalidatedWarmup.add(e5);
2225
2225
  let s2 = !i2.invalidatedWarmup.has(e5);
2226
2226
  if (s2) {
2227
- let t3 = xi(e5);
2227
+ let t3 = yi(e5);
2228
2228
  if (t3 !== void 0) {
2229
- let n3 = Gr(t3);
2230
- return i2.promises.set(e5, { promise: n3, expiresAt: a2 + _i }), n3;
2229
+ let n3 = Ur(t3);
2230
+ return i2.promises.set(e5, { promise: n3, expiresAt: a2 + hi }), n3;
2231
2231
  }
2232
2232
  }
2233
2233
  let c2 = (async () => {
@@ -2237,57 +2237,57 @@ function Di({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2237
2237
  }
2238
2238
  return n2();
2239
2239
  })();
2240
- i2.promises.size >= vi && i2.promises.delete(i2.promises.keys().next().value);
2240
+ i2.promises.size >= gi && i2.promises.delete(i2.promises.keys().next().value);
2241
2241
  let l2 = { promise: c2, expiresAt: 1 / 0 };
2242
2242
  return i2.promises.set(e5, l2), c2.then(() => {
2243
- l2.expiresAt = Date.now() + _i;
2243
+ l2.expiresAt = Date.now() + hi;
2244
2244
  }, () => {
2245
2245
  i2.promises.get(e5) === l2 && i2.promises.delete(e5);
2246
2246
  }), c2;
2247
2247
  }
2248
- 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` }];
2249
- function ki(e5) {
2248
+ 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` }];
2249
+ function Di(e5) {
2250
2250
  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: `` }] } }));
2251
2251
  }
2252
- var Ai = `@wix/auto_sdk_bookings_services`;
2253
- function ji(e5) {
2252
+ var Oi = `@wix/auto_sdk_bookings_services`;
2253
+ function ki(e5) {
2254
2254
  function t2({ host: t3 }) {
2255
- 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 }]) };
2255
+ 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 }]) };
2256
2256
  }
2257
2257
  return t2;
2258
2258
  }
2259
- var Mi = [{ path: `businessLocations.locations.calculatedAddress` }, { path: `businessLocations.locations.business.address` }, { path: `businessLocations.locations.custom.address` }];
2260
- async function Ni(e5) {
2261
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ji(Xe({ filter: e5?.filter }));
2259
+ var Ai = [{ path: `businessLocations.locations.calculatedAddress` }, { path: `businessLocations.locations.business.address` }, { path: `businessLocations.locations.custom.address` }];
2260
+ async function ji(e5) {
2261
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ki(Xe({ filter: e5?.filter }));
2262
2262
  n2?.onSiteCall?.();
2263
2263
  try {
2264
2264
  let e6 = await t2.request(r2);
2265
- return n2?.onSuccess?.(e6), Ze(st(e6.data, [{ transformFn: Zt, paths: Mi }]));
2265
+ return n2?.onSuccess?.(e6), Ze(st(e6.data, [{ transformFn: Zt, paths: Ai }]));
2266
2266
  } catch (e6) {
2267
2267
  let t3 = _t(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { filter: `$[0].filter` }, singleArgumentUnchanged: false }, [`options`]);
2268
2268
  throw n2?.onError?.(e6), t3;
2269
2269
  }
2270
2270
  }
2271
- function Pi(e5) {
2272
- return (t2) => Ni(t2, { httpClient: e5 });
2271
+ function Mi(e5) {
2272
+ return (t2) => ji(t2, { httpClient: e5 });
2273
2273
  }
2274
- var Fi = Et(Pi);
2275
- var Ii = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
2276
- var Li = function(e5) {
2274
+ var Ni = Et(Mi);
2275
+ var Pi = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
2276
+ var Fi = function(e5) {
2277
2277
  return e5.BOOK_ONLINE = `bookingsBookOnline`, e5.SERVICE_PAGE = `bookingsServicePage`, e5.CALENDAR_PAGE = `bookingsCalendar`, e5.FORM_PAGE = `bookingsForm`, e5;
2278
2278
  }({});
2279
- function Z(e5) {
2279
+ function Ii(e5) {
2280
2280
  return e5.business?._id ?? null;
2281
2281
  }
2282
- function Q(e5) {
2282
+ function Li(e5) {
2283
2283
  return e5.business?.name ?? null;
2284
2284
  }
2285
2285
  async function Ri() {
2286
- let e5 = await Fi({ filter: { services: { appId: Ii, hidden: false } } });
2287
- return { locations: [...e5.businessLocations?.locations ?? []].sort((e6, t2) => (Q(e6) ?? ``).localeCompare(Q(t2) ?? ``)), hasOtherLocations: !!(e5.customLocations?.exists || e5.customerLocations?.exists) };
2286
+ let e5 = await Ni({ filter: { services: { appId: Pi, hidden: false } } });
2287
+ return { locations: [...e5.businessLocations?.locations ?? []].sort((e6, t2) => (Li(e6) ?? ``).localeCompare(Li(t2) ?? ``)), hasOtherLocations: !!(e5.customLocations?.exists || e5.customerLocations?.exists) };
2288
2288
  }
2289
2289
  function zi({ isLoading: e5, hasError: t2, refetch: n2, children: r2 }) {
2290
- 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: () => {
2290
+ let { searchParams: i2 } = ni(), a2 = { locationItems: [], selectedLocationId: i2.get(Q.location), hasOtherLocations: false, hasMultipleLocations: false, isLoading: e5, hasError: t2, refetch: n2, selectLocation: () => {
2291
2291
  } };
2292
2292
  return f($.Provider, { value: a2, children: r2 });
2293
2293
  }
@@ -2297,12 +2297,12 @@ function Bi({ refetch: e5, children: t2 }) {
2297
2297
  function Vi({ refetch: e5, children: t2 }) {
2298
2298
  return f(zi, { isLoading: false, hasError: true, refetch: e5, children: t2 });
2299
2299
  }
2300
- var Hi = ui(`@wix/site-service-business-logger`);
2300
+ var Hi = ci(`@wix/site-service-business-logger`);
2301
2301
  function Ui(e5) {
2302
2302
  return { evid: 32, src: 16, endpoint: ``, params: e5 };
2303
2303
  }
2304
2304
  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` };
2305
- Li.BOOK_ONLINE;
2305
+ Fi.BOOK_ONLINE;
2306
2306
  var Gi = `new_bookings_server`;
2307
2307
  var Ki = (e5) => {
2308
2308
  let { reportBi: t2 } = d(Hi);
@@ -2311,9 +2311,9 @@ var Ki = (e5) => {
2311
2311
  }, [t2, e5]);
2312
2312
  };
2313
2313
  var qi = (e5, t2 = true) => {
2314
- let n2 = Ki(e5), { getParsedUrl: r2 } = ii(), i2 = s(false);
2314
+ let n2 = Ki(e5), { getParsedUrl: r2 } = ni(), i2 = s(false);
2315
2315
  a(() => {
2316
- t2 && !i2.current && (i2.current = true, n2(Ui({ referralInfo: r2().searchParams.get(X.referral) ?? void 0 })));
2316
+ t2 && !i2.current && (i2.current = true, n2(Ui({ referralInfo: r2().searchParams.get(Q.referral) ?? void 0 })));
2317
2317
  }, [t2, n2, r2]);
2318
2318
  };
2319
2319
  var $ = n(null);
@@ -2324,28 +2324,28 @@ function Yi() {
2324
2324
  return e5;
2325
2325
  }
2326
2326
  function Xi(e5, t2) {
2327
- let n2 = Z(e5);
2328
- return { locationId: n2, locationName: Q(e5), isSelected: n2 != null && n2 === t2 };
2327
+ let n2 = Ii(e5);
2328
+ return { locationId: n2, locationName: Li(e5), isSelected: n2 != null && n2 === t2 };
2329
2329
  }
2330
2330
  var Zi = (e5) => ({ ...e5, hasError: false });
2331
2331
  var Qi = () => ({ locations: [], hasOtherLocations: false, hasError: true });
2332
- function $i({ locationsPromise: e5, initialLocationId: t2, refetch: n2, children: i2 }) {
2333
- let { locations: c2, hasOtherLocations: l2, hasError: u2 } = Wr(e5), { pathname: d2, searchParams: p2, pushUrl: m2, getExternalBaseUrl: h2 } = ii(), g2 = p2.get(X.location), _2 = r((e6) => {
2334
- let t3 = new URLSearchParams(p2);
2335
- e6 ? t3.set(X.location, e6) : t3.delete(X.location), t3.delete(X.page);
2336
- let n3 = t3.toString(), r2 = n3 ? `${d2}?${n3}` : d2;
2337
- m2(new URL(r2, `${h2()}/`), { disableScrollToTop: true, skipHistory: false });
2338
- }, [d2, p2, m2, h2]), v2 = s(false);
2332
+ function $i({ locationsPromise: e5, refetch: t2, children: n2 }) {
2333
+ let { locations: i2, hasOtherLocations: s2, hasError: c2 } = Hr(e5), { pathname: l2, searchParams: u2, pushUrl: d2, getExternalBaseUrl: p2 } = ni(), m2 = u2.get(Q.location), h2 = r((e6, t3) => {
2334
+ let n3 = new URLSearchParams(u2);
2335
+ e6 ? n3.set(Q.location, e6) : n3.delete(Q.location), n3.delete(Q.page);
2336
+ let r2 = n3.toString(), i3 = r2 ? `${l2}?${r2}` : l2;
2337
+ d2(new URL(i3, `${p2()}/`), { disableScrollToTop: true, skipHistory: t3 });
2338
+ }, [l2, u2, d2, p2]), g2 = r((e6) => h2(e6, false), [h2]), _2 = m2 != null && !c2 && !(m2 === `OTHER_LOCATIONS` && s2) && !i2.some((e6) => Ii(e6) === m2);
2339
2339
  a(() => {
2340
- v2.current || (v2.current = true, t2 && !p2.get(X.location) && _2(t2));
2341
- }, [t2, p2, _2]);
2342
- 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 = o(() => ({ 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]);
2343
- return f($.Provider, { value: ee2, children: i2 });
2340
+ _2 && h2(null, true);
2341
+ }, [_2, h2]);
2342
+ let v2 = i2.filter((e6) => Ii(e6)).length + +!!s2, y2 = o(() => ({ 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]);
2343
+ return f($.Provider, { value: y2, children: n2 });
2344
2344
  }
2345
- function ea({ initialLocationId: e5, children: n2 }) {
2345
+ function ea({ children: e5 }) {
2346
2346
  qi(Wi.LOCATIONS);
2347
- let i2 = ci(), a2 = mi(), [s2, l2] = c(0), u2 = o(() => qr(Di({ key: gi(a2), refresh: s2 !== 0, warmupData: i2, fetchData: () => Hr(`locations-context-load`, { feature: zr.locations }, Ri()) }), Zi, Qi), [s2, a2]), d2 = r(() => l2((e6) => e6 + 1), []);
2348
- return f(Ur, { fallback: f(Vi, { refetch: d2, children: n2 }), feature: zr.locations, children: f(t, { fallback: f(Bi, { refetch: d2, children: n2 }), children: f($i, { locationsPromise: u2, initialLocationId: e5, refetch: d2, children: n2 }) }) });
2347
+ let n2 = oi(), i2 = fi(), [a2, s2] = c(0), l2 = o(() => Gr(Ti({ key: mi(i2), refresh: a2 !== 0, warmupData: n2, fetchData: () => Br(`locations-context-load`, { feature: Lr.locations }, Ri()) }), Zi, Qi), [a2, i2]), u2 = r(() => s2((e6) => e6 + 1), []);
2348
+ return f(Vr, { fallback: f(Vi, { refetch: u2, children: e5 }), feature: Lr.locations, children: f(t, { fallback: f(Bi, { refetch: u2, children: e5 }), children: f($i, { locationsPromise: l2, refetch: u2, children: e5 }) }) });
2349
2349
  }
2350
2350
  var ta = wn(`c151d9f7-1582-407c-bb59-59030f244b47`);
2351
2351
  export {