@wix/bookings 1.0.1786 → 1.0.1787
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.
- package/build/cjs/context-booking-checkout.d.ts +22 -6
- package/build/cjs/context-booking-checkout.js +2296 -2253
- package/build/cjs/context-booking-checkout.js.map +1 -1
- package/build/cjs/context-categories.js +285 -275
- package/build/cjs/context-categories.js.map +1 -1
- package/build/cjs/context-locations.js +465 -455
- package/build/cjs/context-locations.js.map +1 -1
- package/build/cjs/context-service-addons.js +964 -917
- package/build/cjs/context-service-addons.js.map +1 -1
- package/build/cjs/context-service.d.ts +14 -5
- package/build/cjs/context-service.js +3514 -3337
- package/build/cjs/context-service.js.map +1 -1
- package/build/cjs/context-services.js +878 -832
- package/build/cjs/context-services.js.map +1 -1
- package/build/cjs/context-time-slots.d.ts +10 -0
- package/build/cjs/context-time-slots.js +1202 -1159
- package/build/cjs/context-time-slots.js.map +1 -1
- package/build/es/context-booking-checkout.d.mts +22 -6
- package/build/es/context-booking-checkout.mjs +2304 -2261
- package/build/es/context-booking-checkout.mjs.map +1 -1
- package/build/es/context-categories.mjs +285 -275
- package/build/es/context-categories.mjs.map +1 -1
- package/build/es/context-locations.mjs +465 -455
- package/build/es/context-locations.mjs.map +1 -1
- package/build/es/context-service-addons.mjs +971 -924
- package/build/es/context-service-addons.mjs.map +1 -1
- package/build/es/context-service.d.mts +14 -5
- package/build/es/context-service.mjs +3383 -3206
- package/build/es/context-service.mjs.map +1 -1
- package/build/es/context-services.mjs +878 -832
- package/build/es/context-services.mjs.map +1 -1
- package/build/es/context-time-slots.d.mts +10 -0
- package/build/es/context-time-slots.mjs +1222 -1179
- package/build/es/context-time-slots.mjs.map +1 -1
- package/build/internal/cjs/context-booking-checkout.d.ts +22 -6
- package/build/internal/cjs/context-service.d.ts +14 -5
- package/build/internal/cjs/context-time-slots.d.ts +10 -0
- package/build/internal/es/context-booking-checkout.d.mts +22 -6
- package/build/internal/es/context-service.d.mts +14 -5
- package/build/internal/es/context-time-slots.d.mts +10 -0
- package/context-runtime/context-booking-checkout/runtime.d.ts +22 -6
- package/context-runtime/context-booking-checkout/runtime.js +3 -3
- package/context-runtime/context-categories/runtime.js +2 -2
- package/context-runtime/context-locations/runtime.js +2 -2
- package/context-runtime/context-service/runtime.d.ts +14 -5
- package/context-runtime/context-service/runtime.js +3 -3
- package/context-runtime/context-service-addons/runtime.js +2 -2
- package/context-runtime/context-services/runtime.js +3 -3
- package/context-runtime/context-time-slots/runtime.d.ts +10 -0
- package/context-runtime/context-time-slots/runtime.js +3 -3
- package/package.json +2 -2
|
@@ -799,30 +799,36 @@ function Zt(e5) {
|
|
|
799
799
|
return console.warn(`[Multilingual Manager] cleanCurrentUrl failed`, e6), t2;
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
|
-
var Qt = `x-wix-
|
|
803
|
-
var $t =
|
|
804
|
-
|
|
805
|
-
|
|
802
|
+
var Qt = `x-wix-currency`;
|
|
803
|
+
var $t = () => {
|
|
804
|
+
let e5 = M(`currency`);
|
|
805
|
+
if (e5) return { [Qt]: e5 };
|
|
806
|
+
};
|
|
807
|
+
var en = `x-wix-linguist`;
|
|
808
|
+
var tn = `00000000-0000-0000-0000-000000000000`;
|
|
809
|
+
var nn = `false`;
|
|
810
|
+
var rn = () => {
|
|
806
811
|
let e5 = M(`language`), t2 = M(`locale`);
|
|
807
|
-
if (e5) return { [
|
|
812
|
+
if (e5) return { [en]: [e5, t2 || e5, nn, tn].join(`|`) };
|
|
808
813
|
};
|
|
809
|
-
function
|
|
814
|
+
function an() {
|
|
810
815
|
let e5 = null, t2 = null;
|
|
811
816
|
return { promise: new Promise((n2, r2) => {
|
|
812
817
|
e5 = n2, t2 = r2;
|
|
813
818
|
}), resolve: e5, reject: t2 };
|
|
814
819
|
}
|
|
815
|
-
var
|
|
816
|
-
var M = (e5) =>
|
|
817
|
-
var
|
|
818
|
-
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 =
|
|
820
|
+
var on = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
|
|
821
|
+
var M = (e5) => on()?.[e5];
|
|
822
|
+
var sn = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host: (t2) => {
|
|
823
|
+
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 = ln();
|
|
819
824
|
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: M(`language`), locale: M(`locale`), get passThroughHeaders() {
|
|
820
|
-
|
|
825
|
+
let e6 = { ...rn(), ...$t() };
|
|
826
|
+
return Object.keys(e6).length > 0 ? e6 : void 0;
|
|
821
827
|
} } };
|
|
822
828
|
}, auth: (e6) => {
|
|
823
829
|
let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
|
|
824
|
-
!e6 &&
|
|
825
|
-
let n2 = false, { resolve: r2, promise: i2 } =
|
|
830
|
+
!e6 && cn() && (e6 = t2?.getAccessTokenFunction?.());
|
|
831
|
+
let n2 = false, { resolve: r2, promise: i2 } = an();
|
|
826
832
|
return { getAuthHeaders: async () => {
|
|
827
833
|
if (!e6 && n2 && (e6 = await i2), !e6) throw Error(`Failed to resolve auth token`);
|
|
828
834
|
return { headers: { Authorization: await e6() } };
|
|
@@ -830,34 +836,34 @@ var an = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host:
|
|
|
830
836
|
r2(e7);
|
|
831
837
|
}) };
|
|
832
838
|
} });
|
|
833
|
-
function
|
|
839
|
+
function cn() {
|
|
834
840
|
return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
|
|
835
841
|
}
|
|
836
|
-
function
|
|
842
|
+
function ln() {
|
|
837
843
|
let e5 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
|
|
838
844
|
if (!e5) return;
|
|
839
845
|
let t2 = new URL(e5);
|
|
840
846
|
return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
|
|
841
847
|
}
|
|
842
|
-
var
|
|
848
|
+
var un = ({ clientSdk: e5, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
|
|
843
849
|
if (!e5) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
|
|
844
850
|
return e5.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
|
|
845
851
|
}, getAccessToken: () => {
|
|
846
852
|
throw Error(`Not implemented`);
|
|
847
853
|
}, observeState: () => ({ disconnect: () => {
|
|
848
854
|
} }) });
|
|
849
|
-
var
|
|
855
|
+
var dn = sn({ createHost: function(e5) {
|
|
850
856
|
let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e5?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e5 || {};
|
|
851
857
|
if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
|
|
852
|
-
return { channel:
|
|
858
|
+
return { channel: un({ clientSdk: t2, applicationId: n2 }), close: () => {
|
|
853
859
|
} };
|
|
854
860
|
} });
|
|
855
|
-
var
|
|
856
|
-
let n2 =
|
|
861
|
+
var fn = (e5, t2) => {
|
|
862
|
+
let n2 = dn.host({ applicationId: e5, componentId: t2 }), r2 = dn.auth();
|
|
857
863
|
return He({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
858
864
|
};
|
|
859
|
-
var
|
|
860
|
-
function
|
|
865
|
+
var pn = (e5) => fn(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
|
|
866
|
+
function mn() {
|
|
861
867
|
let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
862
868
|
if (e5) return { initWixModules(t3, n3) {
|
|
863
869
|
return N(() => e5(t3, n3));
|
|
@@ -894,15 +900,15 @@ function N(e5) {
|
|
|
894
900
|
globalThis.__wix_context__ = t2, p.client = n2.client, p.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
895
901
|
}
|
|
896
902
|
}
|
|
897
|
-
function
|
|
903
|
+
function hn(e5, t2) {
|
|
898
904
|
return { ...e5, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
|
|
899
|
-
let r2 =
|
|
905
|
+
let r2 = mn();
|
|
900
906
|
if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
901
907
|
return r2.initWixModules(e5)[t3].apply(void 0, n2);
|
|
902
908
|
}])) };
|
|
903
909
|
}
|
|
904
|
-
function
|
|
905
|
-
return
|
|
910
|
+
function gn(e5) {
|
|
911
|
+
return hn({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
|
|
906
912
|
}
|
|
907
913
|
var P = (e5) => typeof e5 == `string`;
|
|
908
914
|
var F = () => {
|
|
@@ -911,25 +917,25 @@ var F = () => {
|
|
|
911
917
|
});
|
|
912
918
|
return n2.resolve = e5, n2.reject = t2, n2;
|
|
913
919
|
};
|
|
914
|
-
var
|
|
915
|
-
var
|
|
920
|
+
var _n = (e5) => e5 == null ? `` : `` + e5;
|
|
921
|
+
var vn = (e5, t2, n2) => {
|
|
916
922
|
e5.forEach((e6) => {
|
|
917
923
|
t2[e6] && (n2[e6] = t2[e6]);
|
|
918
924
|
});
|
|
919
925
|
};
|
|
920
|
-
var
|
|
921
|
-
var
|
|
922
|
-
var
|
|
926
|
+
var yn = /###/g;
|
|
927
|
+
var bn = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(yn, `.`) : e5;
|
|
928
|
+
var xn = (e5) => !e5 || P(e5);
|
|
923
929
|
var I = (e5, t2, n2) => {
|
|
924
930
|
let r2 = P(t2) ? t2.split(`.`) : t2, i2 = 0;
|
|
925
931
|
for (; i2 < r2.length - 1; ) {
|
|
926
|
-
if (
|
|
927
|
-
let t3 =
|
|
932
|
+
if (xn(e5)) return {};
|
|
933
|
+
let t3 = bn(r2[i2]);
|
|
928
934
|
!e5[t3] && n2 && (e5[t3] = new n2()), e5 = Object.prototype.hasOwnProperty.call(e5, t3) ? e5[t3] : {}, ++i2;
|
|
929
935
|
}
|
|
930
|
-
return
|
|
936
|
+
return xn(e5) ? {} : { obj: e5, k: bn(r2[i2]) };
|
|
931
937
|
};
|
|
932
|
-
var
|
|
938
|
+
var Sn = (e5, t2, n2) => {
|
|
933
939
|
let { obj: r2, k: i2 } = I(e5, t2, Object);
|
|
934
940
|
if (r2 !== void 0 || t2.length === 1) {
|
|
935
941
|
r2[i2] = n2;
|
|
@@ -939,7 +945,7 @@ var bn = (e5, t2, n2) => {
|
|
|
939
945
|
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = I(e5, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
|
|
940
946
|
s2.obj[`${s2.k}.${a2}`] = n2;
|
|
941
947
|
};
|
|
942
|
-
var
|
|
948
|
+
var Cn = (e5, t2, n2, r2) => {
|
|
943
949
|
let { obj: i2, k: a2 } = I(e5, t2, Object);
|
|
944
950
|
i2[a2] = i2[a2] || [], i2[a2].push(n2);
|
|
945
951
|
};
|
|
@@ -947,18 +953,18 @@ var L = (e5, t2) => {
|
|
|
947
953
|
let { obj: n2, k: r2 } = I(e5, t2);
|
|
948
954
|
if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
|
|
949
955
|
};
|
|
950
|
-
var
|
|
956
|
+
var wn = (e5, t2, n2) => {
|
|
951
957
|
let r2 = L(e5, n2);
|
|
952
958
|
return r2 === void 0 ? L(t2, n2) : r2;
|
|
953
959
|
};
|
|
954
|
-
var
|
|
955
|
-
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? P(e5[r2]) || e5[r2] instanceof String || P(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) :
|
|
960
|
+
var Tn = (e5, t2, n2) => {
|
|
961
|
+
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? P(e5[r2]) || e5[r2] instanceof String || P(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : Tn(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
|
|
956
962
|
return e5;
|
|
957
963
|
};
|
|
958
964
|
var R = (e5) => e5.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
|
|
959
|
-
var
|
|
960
|
-
var
|
|
961
|
-
var
|
|
965
|
+
var En = { "&": `&`, "<": `<`, ">": `>`, '"': `"`, "'": `'`, "/": `/` };
|
|
966
|
+
var Dn = (e5) => P(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => En[e6]) : e5;
|
|
967
|
+
var On = class {
|
|
962
968
|
constructor(e5) {
|
|
963
969
|
this.capacity = e5, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
964
970
|
}
|
|
@@ -969,13 +975,13 @@ var En = class {
|
|
|
969
975
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e5, n2), this.regExpQueue.push(e5), n2;
|
|
970
976
|
}
|
|
971
977
|
};
|
|
972
|
-
var
|
|
973
|
-
var
|
|
974
|
-
var
|
|
978
|
+
var kn = [` `, `,`, `?`, `!`, `;`];
|
|
979
|
+
var An = new On(20);
|
|
980
|
+
var jn = (e5, t2, n2) => {
|
|
975
981
|
t2 ||= ``, n2 ||= ``;
|
|
976
|
-
let r2 =
|
|
982
|
+
let r2 = kn.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
|
|
977
983
|
if (r2.length === 0) return true;
|
|
978
|
-
let i2 =
|
|
984
|
+
let i2 = An.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
|
|
979
985
|
if (!a2) {
|
|
980
986
|
let t3 = e5.indexOf(n2);
|
|
981
987
|
t3 > 0 && !i2.test(e5.substring(0, t3)) && (a2 = true);
|
|
@@ -999,7 +1005,7 @@ var z = (e5, t2, n2 = `.`) => {
|
|
|
999
1005
|
return i2;
|
|
1000
1006
|
};
|
|
1001
1007
|
var B = (e5) => e5?.replace(/_/g, `-`);
|
|
1002
|
-
var
|
|
1008
|
+
var Mn = { type: `logger`, log(e5) {
|
|
1003
1009
|
this.output(`log`, e5);
|
|
1004
1010
|
}, warn(e5) {
|
|
1005
1011
|
this.output(`warn`, e5);
|
|
@@ -1013,7 +1019,7 @@ var V = new class e2 {
|
|
|
1013
1019
|
this.init(e5, t2);
|
|
1014
1020
|
}
|
|
1015
1021
|
init(e5, t2 = {}) {
|
|
1016
|
-
this.prefix = t2.prefix || `i18next:`, this.logger = e5 ||
|
|
1022
|
+
this.prefix = t2.prefix || `i18next:`, this.logger = e5 || Mn, this.options = t2, this.debug = t2.debug;
|
|
1017
1023
|
}
|
|
1018
1024
|
log(...e5) {
|
|
1019
1025
|
return this.forward(e5, `log`, ``, true);
|
|
@@ -1065,7 +1071,7 @@ var H = class {
|
|
|
1065
1071
|
});
|
|
1066
1072
|
}
|
|
1067
1073
|
};
|
|
1068
|
-
var
|
|
1074
|
+
var Nn = class extends H {
|
|
1069
1075
|
constructor(e5, t2 = { ns: [`translation`], defaultNS: `translation` }) {
|
|
1070
1076
|
super(), this.data = e5 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
|
|
1071
1077
|
}
|
|
@@ -1084,7 +1090,7 @@ var jn = class extends H {
|
|
|
1084
1090
|
}
|
|
1085
1091
|
addResource(e5, t2, n2, r2, i2 = { silent: false }) {
|
|
1086
1092
|
let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e5, t2];
|
|
1087
|
-
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2),
|
|
1093
|
+
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Sn(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
|
|
1088
1094
|
}
|
|
1089
1095
|
addResources(e5, t2, n2, r2 = { silent: false }) {
|
|
1090
1096
|
for (let r3 in n2) (P(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
|
|
@@ -1094,7 +1100,7 @@ var jn = class extends H {
|
|
|
1094
1100
|
let o2 = [e5, t2];
|
|
1095
1101
|
e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
|
|
1096
1102
|
let s2 = L(this.data, o2) || {};
|
|
1097
|
-
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ?
|
|
1103
|
+
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Tn(s2, n2, i2) : s2 = { ...s2, ...n2 }, Sn(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
|
|
1098
1104
|
}
|
|
1099
1105
|
removeResourceBundle(e5, t2) {
|
|
1100
1106
|
this.hasResourceBundle(e5, t2) && delete this.data[e5][t2], this.removeNamespaces(t2), this.emit(`removed`, e5, t2);
|
|
@@ -1116,31 +1122,31 @@ var jn = class extends H {
|
|
|
1116
1122
|
return this.data;
|
|
1117
1123
|
}
|
|
1118
1124
|
};
|
|
1119
|
-
var
|
|
1125
|
+
var Pn = { processors: {}, addPostProcessor(e5) {
|
|
1120
1126
|
this.processors[e5.name] = e5;
|
|
1121
1127
|
}, handle(e5, t2, n2, r2, i2) {
|
|
1122
1128
|
return e5.forEach((e6) => {
|
|
1123
1129
|
t2 = this.processors[e6]?.process(t2, n2, r2, i2) ?? t2;
|
|
1124
1130
|
}), t2;
|
|
1125
1131
|
} };
|
|
1126
|
-
var
|
|
1127
|
-
function
|
|
1132
|
+
var Fn = Symbol(`i18next/PATH_KEY`);
|
|
1133
|
+
function In() {
|
|
1128
1134
|
let e5 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
1129
|
-
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 ===
|
|
1135
|
+
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Fn ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
1130
1136
|
}
|
|
1131
1137
|
function U(e5, t2) {
|
|
1132
|
-
let { [
|
|
1138
|
+
let { [Fn]: n2 } = e5(In()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
|
|
1133
1139
|
if (n2.length > 1 && i2) {
|
|
1134
1140
|
let e6 = t2?.ns, a2 = Array.isArray(e6) ? e6 : null;
|
|
1135
1141
|
if (a2 && a2.length > 1 && a2.slice(1).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
|
|
1136
1142
|
}
|
|
1137
1143
|
return n2.join(r2);
|
|
1138
1144
|
}
|
|
1139
|
-
var
|
|
1145
|
+
var Ln = {};
|
|
1140
1146
|
var W = (e5) => !P(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
|
|
1141
|
-
var
|
|
1147
|
+
var Rn = class e3 extends H {
|
|
1142
1148
|
constructor(e5, t2 = {}) {
|
|
1143
|
-
super(),
|
|
1149
|
+
super(), vn([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = V.create(`translator`);
|
|
1144
1150
|
}
|
|
1145
1151
|
changeLanguage(e5) {
|
|
1146
1152
|
e5 && (this.language = e5);
|
|
@@ -1156,7 +1162,7 @@ var In = class e3 extends H {
|
|
|
1156
1162
|
extractFromKey(e5, t2) {
|
|
1157
1163
|
let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
|
|
1158
1164
|
n2 === void 0 && (n2 = `:`);
|
|
1159
|
-
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 && !
|
|
1165
|
+
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 && !jn(e5, n2, r2);
|
|
1160
1166
|
if (a2 && !o2) {
|
|
1161
1167
|
let t3 = e5.match(this.interpolator.nestingRegexp);
|
|
1162
1168
|
if (t3 && t3.length > 0) return { key: e5, namespaces: P(i2) ? [i2] : i2 };
|
|
@@ -1235,7 +1241,7 @@ var In = class e3 extends H {
|
|
|
1235
1241
|
!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();
|
|
1236
1242
|
}
|
|
1237
1243
|
let a2 = n2.postProcess || this.options.postProcess, o2 = P(a2) ? [a2] : a2;
|
|
1238
|
-
return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 =
|
|
1244
|
+
return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = Pn.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
|
|
1239
1245
|
}
|
|
1240
1246
|
resolve(e5, t2 = {}) {
|
|
1241
1247
|
let n2, r2, i2, a2, o2;
|
|
@@ -1247,7 +1253,7 @@ var In = class e3 extends H {
|
|
|
1247
1253
|
this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
|
|
1248
1254
|
let u2 = t2.count !== void 0 && !P(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (P(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
|
|
1249
1255
|
l2.forEach((e7) => {
|
|
1250
|
-
this.isValidLookup(n2) || (o2 = e7, !
|
|
1256
|
+
this.isValidLookup(n2) || (o2 = e7, !Ln[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (Ln[`${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) => {
|
|
1251
1257
|
if (this.isValidLookup(n2)) return;
|
|
1252
1258
|
a2 = r3;
|
|
1253
1259
|
let o3 = [c2];
|
|
@@ -1286,7 +1292,7 @@ var In = class e3 extends H {
|
|
|
1286
1292
|
return false;
|
|
1287
1293
|
}
|
|
1288
1294
|
};
|
|
1289
|
-
var
|
|
1295
|
+
var zn = class {
|
|
1290
1296
|
constructor(e5) {
|
|
1291
1297
|
this.options = e5, this.supportedLngs = this.options.supportedLngs || false, this.logger = V.create(`languageUtils`);
|
|
1292
1298
|
}
|
|
@@ -1348,9 +1354,9 @@ var Ln = class {
|
|
|
1348
1354
|
}), r2;
|
|
1349
1355
|
}
|
|
1350
1356
|
};
|
|
1351
|
-
var
|
|
1352
|
-
var
|
|
1353
|
-
var
|
|
1357
|
+
var Bn = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
1358
|
+
var Vn = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
1359
|
+
var Hn = class {
|
|
1354
1360
|
constructor(e5, t2 = {}) {
|
|
1355
1361
|
this.languageUtils = e5, this.options = t2, this.logger = V.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
1356
1362
|
}
|
|
@@ -1364,8 +1370,8 @@ var Bn = class {
|
|
|
1364
1370
|
try {
|
|
1365
1371
|
a2 = new Intl.PluralRules(n2, { type: r2 });
|
|
1366
1372
|
} catch {
|
|
1367
|
-
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`),
|
|
1368
|
-
if (!e5.match(/-|_/)) return
|
|
1373
|
+
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), Vn;
|
|
1374
|
+
if (!e5.match(/-|_/)) return Vn;
|
|
1369
1375
|
let n3 = this.languageUtils.getLanguagePartFromCode(e5);
|
|
1370
1376
|
a2 = this.getRule(n3, t2);
|
|
1371
1377
|
}
|
|
@@ -1380,26 +1386,26 @@ var Bn = class {
|
|
|
1380
1386
|
}
|
|
1381
1387
|
getSuffixes(e5, t2 = {}) {
|
|
1382
1388
|
let n2 = this.getRule(e5, t2);
|
|
1383
|
-
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) =>
|
|
1389
|
+
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => Bn[e6] - Bn[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
|
|
1384
1390
|
}
|
|
1385
1391
|
getSuffix(e5, t2, n2 = {}) {
|
|
1386
1392
|
let r2 = this.getRule(e5, n2);
|
|
1387
1393
|
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));
|
|
1388
1394
|
}
|
|
1389
1395
|
};
|
|
1390
|
-
var
|
|
1391
|
-
let a2 =
|
|
1396
|
+
var Un = (e5, t2, n2, r2 = `.`, i2 = true) => {
|
|
1397
|
+
let a2 = wn(e5, t2, n2);
|
|
1392
1398
|
return !a2 && i2 && P(n2) && (a2 = z(e5, n2, r2), a2 === void 0 && (a2 = z(t2, n2, r2))), a2;
|
|
1393
1399
|
};
|
|
1394
1400
|
var G = (e5) => e5.replace(/\$/g, `$$$$`);
|
|
1395
|
-
var
|
|
1401
|
+
var Wn = class {
|
|
1396
1402
|
constructor(e5 = {}) {
|
|
1397
1403
|
this.logger = V.create(`interpolator`), this.options = e5, this.format = e5?.interpolation?.format || ((e6) => e6), this.init(e5);
|
|
1398
1404
|
}
|
|
1399
1405
|
init(e5 = {}) {
|
|
1400
1406
|
e5.interpolation ||= { escapeValue: true };
|
|
1401
1407
|
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;
|
|
1402
|
-
this.escape = t2 === void 0 ?
|
|
1408
|
+
this.escape = t2 === void 0 ? Dn : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? R(i2) : a2 || `{{`, this.suffix = o2 ? R(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? R(d2) : f2 || R(`$t(`), this.nestingSuffix = p2 ? R(p2) : m2 || R(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
|
|
1403
1409
|
}
|
|
1404
1410
|
reset() {
|
|
1405
1411
|
this.options && this.init(this.options);
|
|
@@ -1411,11 +1417,11 @@ var Hn = class {
|
|
|
1411
1417
|
interpolate(e5, t2, n2, r2) {
|
|
1412
1418
|
let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e6) => {
|
|
1413
1419
|
if (e6.indexOf(this.formatSeparator) < 0) {
|
|
1414
|
-
let i4 =
|
|
1420
|
+
let i4 = Un(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1415
1421
|
return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e6 }) : i4;
|
|
1416
1422
|
}
|
|
1417
1423
|
let i3 = e6.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
|
|
1418
|
-
return this.format(
|
|
1424
|
+
return this.format(Un(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
|
|
1419
1425
|
};
|
|
1420
1426
|
this.resetRegExp();
|
|
1421
1427
|
let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
|
|
@@ -1431,7 +1437,7 @@ var Hn = class {
|
|
|
1431
1437
|
a2 = i2[0];
|
|
1432
1438
|
continue;
|
|
1433
1439
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e5}`), a2 = ``;
|
|
1434
|
-
} else !P(a2) && !this.useRawValueToEscape && (a2 =
|
|
1440
|
+
} else !P(a2) && !this.useRawValueToEscape && (a2 = _n(a2));
|
|
1435
1441
|
let s3 = t3.safeValue(a2);
|
|
1436
1442
|
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;
|
|
1437
1443
|
}
|
|
@@ -1457,12 +1463,12 @@ var Hn = class {
|
|
|
1457
1463
|
a2 = { ...n2 }, a2 = a2.replace && !P(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
|
|
1458
1464
|
let c2 = /{.*}/.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
|
|
1459
1465
|
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 && !P(i2)) return i2;
|
|
1460
|
-
P(i2) || (i2 =
|
|
1466
|
+
P(i2) || (i2 = _n(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;
|
|
1461
1467
|
}
|
|
1462
1468
|
return e5;
|
|
1463
1469
|
}
|
|
1464
1470
|
};
|
|
1465
|
-
var
|
|
1471
|
+
var Gn = (e5) => {
|
|
1466
1472
|
let t2 = e5.toLowerCase().trim(), n2 = {};
|
|
1467
1473
|
if (e5.indexOf(`(`) > -1) {
|
|
1468
1474
|
let r2 = e5.split(`(`);
|
|
@@ -1477,7 +1483,7 @@ var Un = (e5) => {
|
|
|
1477
1483
|
}
|
|
1478
1484
|
return { formatName: t2, formatOptions: n2 };
|
|
1479
1485
|
};
|
|
1480
|
-
var
|
|
1486
|
+
var Kn = (e5) => {
|
|
1481
1487
|
let t2 = {};
|
|
1482
1488
|
return (n2, r2, i2) => {
|
|
1483
1489
|
let a2 = i2;
|
|
@@ -1486,14 +1492,14 @@ var Wn = (e5) => {
|
|
|
1486
1492
|
return s2 || (s2 = e5(B(r2), i2), t2[o2] = s2), s2(n2);
|
|
1487
1493
|
};
|
|
1488
1494
|
};
|
|
1489
|
-
var
|
|
1490
|
-
var
|
|
1495
|
+
var qn = (e5) => (t2, n2, r2) => e5(B(n2), r2)(t2);
|
|
1496
|
+
var Jn = class {
|
|
1491
1497
|
constructor(e5 = {}) {
|
|
1492
1498
|
this.logger = V.create(`formatter`), this.options = e5, this.init(e5);
|
|
1493
1499
|
}
|
|
1494
1500
|
init(e5, t2 = { interpolation: {} }) {
|
|
1495
1501
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
1496
|
-
let n2 = t2.cacheInBuiltFormats ?
|
|
1502
|
+
let n2 = t2.cacheInBuiltFormats ? Kn : qn;
|
|
1497
1503
|
this.formats = { number: n2((e6, t3) => {
|
|
1498
1504
|
let n3 = new Intl.NumberFormat(e6, { ...t3 });
|
|
1499
1505
|
return (e7) => n3.format(e7);
|
|
@@ -1515,7 +1521,7 @@ var Kn = class {
|
|
|
1515
1521
|
this.formats[e5.toLowerCase().trim()] = t2;
|
|
1516
1522
|
}
|
|
1517
1523
|
addCached(e5, t2) {
|
|
1518
|
-
this.formats[e5.toLowerCase().trim()] =
|
|
1524
|
+
this.formats[e5.toLowerCase().trim()] = Kn(t2);
|
|
1519
1525
|
}
|
|
1520
1526
|
format(e5, t2, n2, r2 = {}) {
|
|
1521
1527
|
let i2 = t2.split(this.formatSeparator);
|
|
@@ -1524,7 +1530,7 @@ var Kn = class {
|
|
|
1524
1530
|
i2[0] = [i2[0], ...i2.splice(1, e6)].join(this.formatSeparator);
|
|
1525
1531
|
}
|
|
1526
1532
|
return i2.reduce((e6, t3) => {
|
|
1527
|
-
let { formatName: i3, formatOptions: a2 } =
|
|
1533
|
+
let { formatName: i3, formatOptions: a2 } = Gn(t3);
|
|
1528
1534
|
if (this.formats[i3]) {
|
|
1529
1535
|
let t4 = e6;
|
|
1530
1536
|
try {
|
|
@@ -1539,10 +1545,10 @@ var Kn = class {
|
|
|
1539
1545
|
}, e5);
|
|
1540
1546
|
}
|
|
1541
1547
|
};
|
|
1542
|
-
var
|
|
1548
|
+
var Yn = (e5, t2) => {
|
|
1543
1549
|
e5.pending[t2] !== void 0 && (delete e5.pending[t2], e5.pendingCount--);
|
|
1544
1550
|
};
|
|
1545
|
-
var
|
|
1551
|
+
var Xn = class extends H {
|
|
1546
1552
|
constructor(e5, t2, n2, r2 = {}) {
|
|
1547
1553
|
super(), this.backend = e5, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = V.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);
|
|
1548
1554
|
}
|
|
@@ -1561,7 +1567,7 @@ var Jn = class extends H {
|
|
|
1561
1567
|
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);
|
|
1562
1568
|
let o2 = {};
|
|
1563
1569
|
this.queue.forEach((n3) => {
|
|
1564
|
-
|
|
1570
|
+
Cn(n3.loaded, [i2], a2), Yn(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
|
|
1565
1571
|
o2[e6] || (o2[e6] = {});
|
|
1566
1572
|
let t3 = n3.loaded[e6];
|
|
1567
1573
|
t3.length && t3.forEach((t4) => {
|
|
@@ -1653,23 +1659,23 @@ var K = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
1653
1659
|
}
|
|
1654
1660
|
return t2;
|
|
1655
1661
|
}, interpolation: { escapeValue: true, format: (e5) => e5, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
1656
|
-
var
|
|
1662
|
+
var Zn = (e5) => (P(e5.ns) && (e5.ns = [e5.ns]), P(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), P(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);
|
|
1657
1663
|
var q = () => {
|
|
1658
1664
|
};
|
|
1659
|
-
var
|
|
1665
|
+
var Qn = (e5) => {
|
|
1660
1666
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e5)).forEach((t2) => {
|
|
1661
1667
|
typeof e5[t2] == `function` && (e5[t2] = e5[t2].bind(e5));
|
|
1662
1668
|
});
|
|
1663
1669
|
};
|
|
1664
|
-
var
|
|
1665
|
-
var
|
|
1666
|
-
var
|
|
1667
|
-
typeof globalThis < `u` && (globalThis[
|
|
1670
|
+
var $n = `__i18next_supportNoticeShown`;
|
|
1671
|
+
var er = () => !!(typeof globalThis < `u` && globalThis[$n] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
|
|
1672
|
+
var tr = () => {
|
|
1673
|
+
typeof globalThis < `u` && (globalThis[$n] = true);
|
|
1668
1674
|
};
|
|
1669
|
-
var
|
|
1675
|
+
var nr = (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));
|
|
1670
1676
|
var J = class e4 extends H {
|
|
1671
1677
|
constructor(e5 = {}, t2) {
|
|
1672
|
-
if (super(), this.options =
|
|
1678
|
+
if (super(), this.options = Zn(e5), this.services = {}, this.logger = V, this.modules = { external: [] }, Qn(this), t2 && !this.isInitialized && !e5.isClone) {
|
|
1673
1679
|
if (!this.options.initAsync) return this.init(e5, t2), this;
|
|
1674
1680
|
setTimeout(() => {
|
|
1675
1681
|
this.init(e5, t2);
|
|
@@ -1679,18 +1685,18 @@ var J = class e4 extends H {
|
|
|
1679
1685
|
init(e5 = {}, t2) {
|
|
1680
1686
|
this.isInitializing = true, typeof e5 == `function` && (t2 = e5, e5 = {}), e5.defaultNS == null && e5.ns && (P(e5.ns) ? e5.defaultNS = e5.ns : e5.ns.indexOf(`translation`) < 0 && (e5.defaultNS = e5.ns[0]));
|
|
1681
1687
|
let n2 = K();
|
|
1682
|
-
this.options = { ...n2, ...this.options, ...
|
|
1688
|
+
this.options = { ...n2, ...this.options, ...Zn(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 && !nr(this) && !er() && (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}`), tr());
|
|
1683
1689
|
let r2 = (e6) => e6 ? typeof e6 == `function` ? new e6() : e6 : null;
|
|
1684
1690
|
if (!this.options.isClone) {
|
|
1685
1691
|
this.modules.logger ? V.init(r2(this.modules.logger), this.options) : V.init(null, this.options);
|
|
1686
1692
|
let e6;
|
|
1687
|
-
e6 = this.modules.formatter ? this.modules.formatter :
|
|
1688
|
-
let t3 = new
|
|
1689
|
-
this.store = new
|
|
1693
|
+
e6 = this.modules.formatter ? this.modules.formatter : Jn;
|
|
1694
|
+
let t3 = new zn(this.options);
|
|
1695
|
+
this.store = new Nn(this.options.resources, this.options);
|
|
1690
1696
|
let i3 = this.services;
|
|
1691
|
-
i3.logger = V, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new
|
|
1697
|
+
i3.logger = V, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new Hn(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 Wn(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new Xn(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
|
|
1692
1698
|
this.emit(e7, ...t4);
|
|
1693
|
-
}), 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
|
|
1699
|
+
}), 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 Rn(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
|
|
1694
1700
|
this.emit(e7, ...t4);
|
|
1695
1701
|
}), this.modules.external.forEach((e7) => {
|
|
1696
1702
|
e7.init && e7.init(this);
|
|
@@ -1737,7 +1743,7 @@ var J = class e4 extends H {
|
|
|
1737
1743
|
use(e5) {
|
|
1738
1744
|
if (!e5) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
|
|
1739
1745
|
if (!e5.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
|
|
1740
|
-
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` &&
|
|
1746
|
+
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` && Pn.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
|
|
1741
1747
|
}
|
|
1742
1748
|
setResolvedLanguage(e5) {
|
|
1743
1749
|
if (e5 && this.languages && !([`cimode`, `dev`].indexOf(e5) > -1)) {
|
|
@@ -1829,7 +1835,7 @@ var J = class e4 extends H {
|
|
|
1829
1835
|
}
|
|
1830
1836
|
} catch {
|
|
1831
1837
|
}
|
|
1832
|
-
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
|
|
1838
|
+
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(K());
|
|
1833
1839
|
return e5.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.indexOf(n2.getLanguagePartFromCode(e5)) > -1 || e5.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
|
|
1834
1840
|
}
|
|
1835
1841
|
static createInstance(t2 = {}, n2) {
|
|
@@ -1842,11 +1848,11 @@ var J = class e4 extends H {
|
|
|
1842
1848
|
let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
|
|
1843
1849
|
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e5) => {
|
|
1844
1850
|
a2[e5] = this[e5];
|
|
1845
|
-
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new
|
|
1851
|
+
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Nn(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) {
|
|
1846
1852
|
let e5 = { ...K().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
|
|
1847
|
-
a2.services.interpolator = new
|
|
1853
|
+
a2.services.interpolator = new Wn(n3);
|
|
1848
1854
|
}
|
|
1849
|
-
return a2.translator = new
|
|
1855
|
+
return a2.translator = new Rn(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
|
|
1850
1856
|
a2.emit(e5, ...t3);
|
|
1851
1857
|
}), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
|
|
1852
1858
|
}
|
|
@@ -1855,20 +1861,20 @@ var J = class e4 extends H {
|
|
|
1855
1861
|
}
|
|
1856
1862
|
}.createInstance();
|
|
1857
1863
|
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;
|
|
1858
|
-
var
|
|
1859
|
-
var
|
|
1860
|
-
var
|
|
1861
|
-
var
|
|
1862
|
-
var
|
|
1863
|
-
|
|
1864
|
+
var rr = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
1865
|
+
var ir = { "&": `&`, "&": `&`, "<": `<`, "<": `<`, ">": `>`, ">": `>`, "'": `'`, "'": `'`, """: `"`, """: `"`, " ": ` `, " ": ` `, "©": `\xA9`, "©": `\xA9`, "®": `\xAE`, "®": `\xAE`, "…": `\u2026`, "…": `\u2026`, "/": `/`, "/": `/` };
|
|
1866
|
+
var ar = (e5) => ir[e5];
|
|
1867
|
+
var or = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(rr, ar), transDefaultProps: void 0 };
|
|
1868
|
+
var sr = (e5 = {}) => {
|
|
1869
|
+
or = { ...or, ...e5 };
|
|
1864
1870
|
};
|
|
1865
|
-
var
|
|
1866
|
-
|
|
1871
|
+
var cr = { type: `3rdParty`, init(e5) {
|
|
1872
|
+
sr(e5.options.react);
|
|
1867
1873
|
} };
|
|
1868
1874
|
var Y = /* @__PURE__ */ new Map();
|
|
1869
|
-
var
|
|
1875
|
+
var lr = 500;
|
|
1870
1876
|
var X;
|
|
1871
|
-
function
|
|
1877
|
+
function ur() {
|
|
1872
1878
|
if (X === void 0) try {
|
|
1873
1879
|
X = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
|
|
1874
1880
|
} catch {
|
|
@@ -1876,32 +1882,32 @@ function cr() {
|
|
|
1876
1882
|
}
|
|
1877
1883
|
return X;
|
|
1878
1884
|
}
|
|
1879
|
-
var
|
|
1880
|
-
function
|
|
1881
|
-
if (!(typeof e5 != `string` ||
|
|
1885
|
+
var dr = 15;
|
|
1886
|
+
function fr(e5) {
|
|
1887
|
+
if (!(typeof e5 != `string` || ur()) && 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.`);
|
|
1882
1888
|
}
|
|
1883
|
-
function
|
|
1889
|
+
function pr(e5, t2, n2) {
|
|
1884
1890
|
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(`&`)}`;
|
|
1885
1891
|
}
|
|
1886
|
-
function
|
|
1887
|
-
let r2 =
|
|
1888
|
-
return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), Y.size >=
|
|
1892
|
+
function mr(e5, t2, n2) {
|
|
1893
|
+
let r2 = pr(e5, t2, n2), i2 = Y.get(r2);
|
|
1894
|
+
return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), Y.size >= lr && Y.clear(), Y.set(r2, i2)), i2;
|
|
1889
1895
|
}
|
|
1890
|
-
function
|
|
1891
|
-
return
|
|
1896
|
+
function hr(e5, { value: t2, currency: n2 }, r2 = {}) {
|
|
1897
|
+
return fr(t2), mr(e5, n2, r2).format(t2);
|
|
1892
1898
|
}
|
|
1893
|
-
function
|
|
1894
|
-
return
|
|
1899
|
+
function gr(e5, { value: t2, currency: n2 }, r2 = {}) {
|
|
1900
|
+
return fr(t2), mr(e5, n2, r2).formatToParts(t2);
|
|
1895
1901
|
}
|
|
1896
|
-
function
|
|
1902
|
+
function _r(e5) {
|
|
1897
1903
|
return Gt().find((e6) => e6.primary)?.id ?? e5;
|
|
1898
1904
|
}
|
|
1899
|
-
function
|
|
1905
|
+
function vr(e5, t2) {
|
|
1900
1906
|
let { locale: n2, ...r2 } = t2 ?? {}, i2 = n2 ?? e5.essentials?.locale;
|
|
1901
1907
|
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.`);
|
|
1902
1908
|
return { locale: i2, formatOptions: r2 };
|
|
1903
1909
|
}
|
|
1904
|
-
var
|
|
1910
|
+
var yr = gn({ getLanguage: (e5) => () => {
|
|
1905
1911
|
let t2 = e5.essentials?.language;
|
|
1906
1912
|
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.`);
|
|
1907
1913
|
return t2;
|
|
@@ -1910,20 +1916,20 @@ var _r = mn({ getLanguage: (e5) => () => {
|
|
|
1910
1916
|
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.`);
|
|
1911
1917
|
return t2;
|
|
1912
1918
|
}, formatCurrency: (e5) => (t2, n2) => {
|
|
1913
|
-
let { locale: r2, formatOptions: i2 } =
|
|
1914
|
-
return
|
|
1919
|
+
let { locale: r2, formatOptions: i2 } = vr(e5, n2);
|
|
1920
|
+
return hr(r2, t2, i2);
|
|
1915
1921
|
}, formatCurrencyToParts: (e5) => (t2, n2) => {
|
|
1916
|
-
let { locale: r2, formatOptions: i2 } =
|
|
1917
|
-
return
|
|
1922
|
+
let { locale: r2, formatOptions: i2 } = vr(e5, n2);
|
|
1923
|
+
return gr(r2, t2, i2);
|
|
1918
1924
|
}, getTranslationFunction: (e5) => () => {
|
|
1919
1925
|
let t2 = e5.translations?.();
|
|
1920
1926
|
if (!t2) throw Error(`Host translation resources are not available.`);
|
|
1921
|
-
let n2 = J.createInstance(), r2 =
|
|
1922
|
-
return n2.use(
|
|
1927
|
+
let n2 = J.createInstance(), r2 = _r(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
|
|
1928
|
+
return n2.use(cr).init(i2, (e6) => {
|
|
1923
1929
|
if (e6) throw e6;
|
|
1924
1930
|
}), n2.t.bind(n2);
|
|
1925
1931
|
} });
|
|
1926
|
-
var
|
|
1932
|
+
var br = class {
|
|
1927
1933
|
constructor(e5) {
|
|
1928
1934
|
this.message = e5, this.captureException = () => {
|
|
1929
1935
|
console.error(this.message);
|
|
@@ -1938,81 +1944,85 @@ var vr = class {
|
|
|
1938
1944
|
};
|
|
1939
1945
|
}
|
|
1940
1946
|
};
|
|
1941
|
-
var
|
|
1942
|
-
var
|
|
1943
|
-
var
|
|
1944
|
-
function
|
|
1947
|
+
var xr = (e5) => new br(e5);
|
|
1948
|
+
var Sr = gn({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : xr(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
|
|
1949
|
+
var Cr = { 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` };
|
|
1950
|
+
function wr(e5) {
|
|
1945
1951
|
try {
|
|
1946
|
-
let t2 =
|
|
1952
|
+
let t2 = Sr.getMonitoringClient?.();
|
|
1947
1953
|
return t2 && typeof t2[e5] == `function` ? t2 : null;
|
|
1948
1954
|
} catch {
|
|
1949
1955
|
return null;
|
|
1950
1956
|
}
|
|
1951
1957
|
}
|
|
1952
|
-
function
|
|
1953
|
-
let a2 =
|
|
1958
|
+
function Tr(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
|
|
1959
|
+
let a2 = wr(`captureException`);
|
|
1954
1960
|
if (!a2) return;
|
|
1955
1961
|
let o2 = e5 instanceof Error ? e5 : Error(String(e5));
|
|
1956
1962
|
a2.captureException(o2, { level: r2, tags: { feature: t2, action: n2 }, ...i2 ? { contexts: i2 } : {} });
|
|
1957
1963
|
}
|
|
1958
|
-
function
|
|
1959
|
-
let i2 =
|
|
1964
|
+
function Er(e5, { feature: t2, tags: n2 }, r2) {
|
|
1965
|
+
let i2 = wr(`startSpanManual`);
|
|
1960
1966
|
if (!i2) return r2;
|
|
1961
1967
|
let a2 = i2.startSpanManual({ name: e5, tags: { feature: t2, ...n2 } });
|
|
1962
1968
|
return r2.then(() => a2.end(), (e6) => a2.fail(e6)), r2;
|
|
1963
1969
|
}
|
|
1964
|
-
var
|
|
1970
|
+
var Dr = class extends e {
|
|
1965
1971
|
state = { hasError: false };
|
|
1966
1972
|
static getDerivedStateFromError() {
|
|
1967
1973
|
return { hasError: true };
|
|
1968
1974
|
}
|
|
1969
1975
|
componentDidCatch(e5, t2) {
|
|
1970
|
-
|
|
1976
|
+
Tr(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
|
|
1971
1977
|
}
|
|
1972
1978
|
render() {
|
|
1973
1979
|
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
1974
1980
|
}
|
|
1975
1981
|
};
|
|
1976
|
-
function
|
|
1982
|
+
function Or(e5) {
|
|
1977
1983
|
let t2 = e5;
|
|
1978
|
-
|
|
1984
|
+
return t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
|
|
1979
1985
|
t2.__state = { status: `fulfilled`, value: e6 };
|
|
1980
1986
|
}, (e6) => {
|
|
1981
1987
|
t2.__state = { status: `rejected`, reason: e6 };
|
|
1982
|
-
})), t2.__state
|
|
1983
|
-
|
|
1988
|
+
})), t2.__state;
|
|
1989
|
+
}
|
|
1990
|
+
function kr(e5) {
|
|
1991
|
+
let t2 = Or(e5);
|
|
1992
|
+
if (t2.status === `fulfilled`) return t2.value;
|
|
1993
|
+
throw t2.status === `rejected` ? t2.reason : e5;
|
|
1984
1994
|
}
|
|
1985
|
-
function
|
|
1995
|
+
function Ar(e5) {
|
|
1986
1996
|
let t2 = Promise.resolve(e5);
|
|
1987
1997
|
return t2.__state = { status: `fulfilled`, value: e5 }, t2;
|
|
1988
1998
|
}
|
|
1989
|
-
var
|
|
1990
|
-
function
|
|
1991
|
-
let r2 =
|
|
1992
|
-
r2 || (r2 = /* @__PURE__ */ new WeakMap(),
|
|
1999
|
+
var jr = /* @__PURE__ */ new WeakMap();
|
|
2000
|
+
function Mr(e5, t2, n2) {
|
|
2001
|
+
let r2 = jr.get(e5);
|
|
2002
|
+
r2 || (r2 = /* @__PURE__ */ new WeakMap(), jr.set(e5, r2));
|
|
1993
2003
|
let i2 = r2.get(t2);
|
|
1994
2004
|
i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
|
|
1995
2005
|
let a2 = i2.get(n2);
|
|
1996
2006
|
if (!a2) {
|
|
1997
2007
|
let r3 = e5;
|
|
1998
|
-
a2 = r3.__state?.status === `fulfilled` ?
|
|
2008
|
+
a2 = r3.__state?.status === `fulfilled` ? Ar(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? Ar(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
|
|
1999
2009
|
}
|
|
2000
2010
|
return a2;
|
|
2001
2011
|
}
|
|
2002
2012
|
function Z(e5) {
|
|
2003
2013
|
return e5;
|
|
2004
2014
|
}
|
|
2005
|
-
var
|
|
2006
|
-
var
|
|
2007
|
-
function
|
|
2008
|
-
let t2 = e5.searchParams.get(
|
|
2015
|
+
var Nr = Z(`@wix/site-service-url`);
|
|
2016
|
+
var Pr = `appSectionParams`;
|
|
2017
|
+
function Fr(e5) {
|
|
2018
|
+
let t2 = e5.searchParams.get(Pr);
|
|
2009
2019
|
if (t2 === null) return e5;
|
|
2010
2020
|
let n2 = new URL(e5);
|
|
2011
|
-
n2.searchParams.delete(
|
|
2012
|
-
for (let [e6, r2] of Object.entries(
|
|
2021
|
+
n2.searchParams.delete(Pr);
|
|
2022
|
+
for (let [e6, r2] of Object.entries(Ir(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
|
|
2013
2023
|
return n2;
|
|
2014
2024
|
}
|
|
2015
|
-
function
|
|
2025
|
+
function Ir(e5) {
|
|
2016
2026
|
try {
|
|
2017
2027
|
let t2 = JSON.parse(e5);
|
|
2018
2028
|
return t2 && typeof t2 == `object` && !Array.isArray(t2) ? t2 : {};
|
|
@@ -2020,16 +2030,16 @@ function Nr(e5) {
|
|
|
2020
2030
|
return {};
|
|
2021
2031
|
}
|
|
2022
2032
|
}
|
|
2023
|
-
var
|
|
2024
|
-
var
|
|
2033
|
+
var Lr = `bookings-uou:url-change`;
|
|
2034
|
+
var Rr = (e5) => {
|
|
2025
2035
|
let t2 = new URL(e5);
|
|
2026
2036
|
return t2.searchParams.sort(), t2.href;
|
|
2027
2037
|
};
|
|
2028
|
-
function
|
|
2038
|
+
function zr(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
|
|
2029
2039
|
let r2 = globalThis.window;
|
|
2030
2040
|
if (!r2?.history) return;
|
|
2031
2041
|
let i2 = new URL(r2.location.href);
|
|
2032
|
-
if (
|
|
2042
|
+
if (Rr(i2) === Rr(e5)) return;
|
|
2033
2043
|
let a2 = { scrollY: r2.scrollY };
|
|
2034
2044
|
if (n2) r2.history.replaceState(a2, ``, e5.href);
|
|
2035
2045
|
else {
|
|
@@ -2040,54 +2050,54 @@ function Ir(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
|
|
|
2040
2050
|
return;
|
|
2041
2051
|
}
|
|
2042
2052
|
}
|
|
2043
|
-
r2.dispatchEvent(new Event(
|
|
2053
|
+
r2.dispatchEvent(new Event(Lr));
|
|
2044
2054
|
}
|
|
2045
|
-
function
|
|
2055
|
+
function Br(e5) {
|
|
2046
2056
|
let t2 = globalThis.window;
|
|
2047
|
-
return t2 ? (t2.addEventListener(
|
|
2048
|
-
t2.removeEventListener(
|
|
2057
|
+
return t2 ? (t2.addEventListener(Lr, e5), t2.addEventListener(`popstate`, e5), () => {
|
|
2058
|
+
t2.removeEventListener(Lr, e5), t2.removeEventListener(`popstate`, e5);
|
|
2049
2059
|
}) : () => {
|
|
2050
2060
|
};
|
|
2051
2061
|
}
|
|
2052
|
-
var
|
|
2062
|
+
var Vr = (e5) => {
|
|
2053
2063
|
try {
|
|
2054
2064
|
return decodeURIComponent(e5);
|
|
2055
2065
|
} catch {
|
|
2056
2066
|
return e5;
|
|
2057
2067
|
}
|
|
2058
2068
|
};
|
|
2059
|
-
function
|
|
2069
|
+
function Hr(e5, t2) {
|
|
2060
2070
|
let n2 = t2 ? new URL(t2).pathname : `/`;
|
|
2061
|
-
return `./${
|
|
2071
|
+
return `./${Vr(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
|
|
2062
2072
|
}
|
|
2063
|
-
function
|
|
2064
|
-
let e5 = d(
|
|
2065
|
-
return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () =>
|
|
2073
|
+
function Ur() {
|
|
2074
|
+
let e5 = d(Nr), t2 = r(() => e5.currentUrl, [e5]), n2 = l(Br, t2, t2), i2 = o(() => Fr(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
|
|
2075
|
+
return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => Fr(new URL(e5.currentUrl)), getRelativeUrl: () => Hr(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: zr };
|
|
2066
2076
|
}
|
|
2067
|
-
var Q = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
|
|
2068
|
-
var
|
|
2069
|
-
function
|
|
2077
|
+
var Q = { category: `category`, location: `location`, page: `page`, blob: `bookingSelection`, legacyBlob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
|
|
2078
|
+
var Wr = Z(`@wix/site-service-warmup-data`);
|
|
2079
|
+
function Gr() {
|
|
2070
2080
|
try {
|
|
2071
2081
|
return u();
|
|
2072
2082
|
} catch {
|
|
2073
2083
|
return null;
|
|
2074
2084
|
}
|
|
2075
2085
|
}
|
|
2076
|
-
function
|
|
2086
|
+
function Kr(e5) {
|
|
2077
2087
|
try {
|
|
2078
|
-
return e5 ? e5(
|
|
2088
|
+
return e5 ? e5(Wr) : null;
|
|
2079
2089
|
} catch {
|
|
2080
2090
|
return null;
|
|
2081
2091
|
}
|
|
2082
2092
|
}
|
|
2083
|
-
function
|
|
2084
|
-
let e5 =
|
|
2093
|
+
function qr() {
|
|
2094
|
+
let e5 = Kr(Gr()), t2 = typeof window > `u`;
|
|
2085
2095
|
return { scope: e5 ?? void 0, get: async (n2) => {
|
|
2086
2096
|
if (t2 || !e5) return null;
|
|
2087
2097
|
try {
|
|
2088
2098
|
return await e5.get(n2);
|
|
2089
2099
|
} catch (e6) {
|
|
2090
|
-
return
|
|
2100
|
+
return Tr(e6, { feature: Cr.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
|
|
2091
2101
|
}
|
|
2092
2102
|
}, set: (n2, r2) => {
|
|
2093
2103
|
if (t2 && e5) try {
|
|
@@ -2096,75 +2106,75 @@ function Wr() {
|
|
|
2096
2106
|
}
|
|
2097
2107
|
} };
|
|
2098
2108
|
}
|
|
2099
|
-
var
|
|
2100
|
-
var
|
|
2101
|
-
var
|
|
2102
|
-
function
|
|
2109
|
+
var Jr = Z(`@wix/site-service-locale`);
|
|
2110
|
+
var Yr = Z;
|
|
2111
|
+
var Xr = Yr(`@wix/viewer-service-multilingual`);
|
|
2112
|
+
function Zr() {
|
|
2103
2113
|
try {
|
|
2104
|
-
return
|
|
2114
|
+
return yr.getLanguage() ?? `en`;
|
|
2105
2115
|
} catch {
|
|
2106
2116
|
return `en`;
|
|
2107
2117
|
}
|
|
2108
2118
|
}
|
|
2109
|
-
function
|
|
2119
|
+
function Qr(e5) {
|
|
2110
2120
|
try {
|
|
2111
2121
|
return d(e5);
|
|
2112
2122
|
} catch {
|
|
2113
2123
|
return null;
|
|
2114
2124
|
}
|
|
2115
2125
|
}
|
|
2116
|
-
function
|
|
2117
|
-
let e5 =
|
|
2118
|
-
return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language ||
|
|
2126
|
+
function $r() {
|
|
2127
|
+
let e5 = Qr(Jr), t2 = Qr(Xr);
|
|
2128
|
+
return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || Zr();
|
|
2119
2129
|
}
|
|
2120
|
-
var
|
|
2121
|
-
function
|
|
2122
|
-
return `${
|
|
2130
|
+
var ei = `bookings-uou`;
|
|
2131
|
+
function ti(e5) {
|
|
2132
|
+
return `${ei}:${e5}:categories:all`;
|
|
2123
2133
|
}
|
|
2124
|
-
var
|
|
2125
|
-
var
|
|
2126
|
-
var
|
|
2127
|
-
var
|
|
2128
|
-
function
|
|
2134
|
+
var ni = 5e3;
|
|
2135
|
+
var ri = 100;
|
|
2136
|
+
var ii = `wix-warmup-data`;
|
|
2137
|
+
var ai = null;
|
|
2138
|
+
function oi(e5) {
|
|
2129
2139
|
if (typeof document < `u`) try {
|
|
2130
|
-
let t2 = document.getElementById(
|
|
2131
|
-
return t2 ? (
|
|
2140
|
+
let t2 = document.getElementById(ii)?.textContent;
|
|
2141
|
+
return t2 ? (ai?.text !== t2 && (ai = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), ai.data[e5] ?? void 0) : void 0;
|
|
2132
2142
|
} catch {
|
|
2133
2143
|
return;
|
|
2134
2144
|
}
|
|
2135
2145
|
}
|
|
2136
|
-
var
|
|
2137
|
-
var
|
|
2138
|
-
var
|
|
2139
|
-
var
|
|
2140
|
-
function
|
|
2141
|
-
if (!e5) return
|
|
2142
|
-
let t2 =
|
|
2143
|
-
return t2 || (t2 =
|
|
2146
|
+
var si = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
|
|
2147
|
+
var ci = si();
|
|
2148
|
+
var li = /* @__PURE__ */ new WeakMap();
|
|
2149
|
+
var ui = /* @__PURE__ */ new WeakMap();
|
|
2150
|
+
function di(e5) {
|
|
2151
|
+
if (!e5) return ci;
|
|
2152
|
+
let t2 = li.get(e5);
|
|
2153
|
+
return t2 || (t2 = si(), li.set(e5, t2)), t2;
|
|
2144
2154
|
}
|
|
2145
|
-
function
|
|
2155
|
+
function fi({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
|
|
2146
2156
|
if (e5 === null) return n2();
|
|
2147
2157
|
if (typeof window > `u`) {
|
|
2148
2158
|
let r3 = () => n2().then((n3) => (t2.set(e5, n3), n3)), { scope: i3 } = t2;
|
|
2149
2159
|
if (!i3) return r3();
|
|
2150
|
-
let a3 =
|
|
2151
|
-
a3 || (a3 = /* @__PURE__ */ new Map(),
|
|
2160
|
+
let a3 = ui.get(i3);
|
|
2161
|
+
a3 || (a3 = /* @__PURE__ */ new Map(), ui.set(i3, a3));
|
|
2152
2162
|
let o3 = a3.get(e5);
|
|
2153
2163
|
if (o3) return o3;
|
|
2154
2164
|
let s3 = r3();
|
|
2155
2165
|
return a3.set(e5, s3), s3.catch(() => a3.delete(e5)), s3;
|
|
2156
2166
|
}
|
|
2157
|
-
let i2 =
|
|
2167
|
+
let i2 = di(t2.scope), a2 = Date.now();
|
|
2158
2168
|
for (let [e6, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e6);
|
|
2159
2169
|
let o2 = i2.promises.get(e5);
|
|
2160
2170
|
if (o2 && !r2) return o2.promise;
|
|
2161
2171
|
r2 && i2.invalidatedWarmup.add(e5);
|
|
2162
2172
|
let s2 = !i2.invalidatedWarmup.has(e5);
|
|
2163
2173
|
if (s2) {
|
|
2164
|
-
let t3 =
|
|
2174
|
+
let t3 = oi(e5);
|
|
2165
2175
|
if (t3 !== void 0) {
|
|
2166
|
-
let n3 =
|
|
2167
|
-
return i2.promises.set(e5, { promise: n3, expiresAt: a2 +
|
|
2176
|
+
let n3 = Ar(t3);
|
|
2177
|
+
return i2.promises.set(e5, { promise: n3, expiresAt: a2 + ni }), n3;
|
|
2168
2178
|
}
|
|
2169
2179
|
}
|
|
2170
2180
|
let c2 = (async () => {
|
|
@@ -2174,26 +2184,26 @@ function li({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
|
|
|
2174
2184
|
}
|
|
2175
2185
|
return n2();
|
|
2176
2186
|
})();
|
|
2177
|
-
i2.promises.size >=
|
|
2187
|
+
i2.promises.size >= ri && i2.promises.delete(i2.promises.keys().next().value);
|
|
2178
2188
|
let l2 = { promise: c2, expiresAt: 1 / 0 };
|
|
2179
2189
|
return i2.promises.set(e5, l2), c2.then(() => {
|
|
2180
|
-
l2.expiresAt = Date.now() +
|
|
2190
|
+
l2.expiresAt = Date.now() + ni;
|
|
2181
2191
|
}, () => {
|
|
2182
2192
|
i2.promises.get(e5) === l2 && i2.promises.delete(e5);
|
|
2183
2193
|
}), c2;
|
|
2184
2194
|
}
|
|
2185
|
-
function
|
|
2195
|
+
function pi(e5) {
|
|
2186
2196
|
return gt(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: `` }] } }));
|
|
2187
2197
|
}
|
|
2188
|
-
var
|
|
2189
|
-
function
|
|
2198
|
+
var mi = `@wix/auto_sdk_bookings_services`;
|
|
2199
|
+
function hi(e5) {
|
|
2190
2200
|
function t2({ host: t3 }) {
|
|
2191
|
-
return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryCategories`, packageName:
|
|
2201
|
+
return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryCategories`, packageName: mi, migrationOptions: { optInTransformResponse: true }, url: pi({ protoPath: `/v2/services/categories/query`, data: e5, host: t3 }), data: e5 };
|
|
2192
2202
|
}
|
|
2193
2203
|
return t2;
|
|
2194
2204
|
}
|
|
2195
|
-
async function
|
|
2196
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
2205
|
+
async function gi(e5) {
|
|
2206
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = hi(Xe({ filter: e5?.filter }));
|
|
2197
2207
|
n2?.onSiteCall?.();
|
|
2198
2208
|
try {
|
|
2199
2209
|
let e6 = await t2.request(r2);
|
|
@@ -2203,70 +2213,70 @@ async function pi(e5) {
|
|
|
2203
2213
|
throw n2?.onError?.(e6), t3;
|
|
2204
2214
|
}
|
|
2205
2215
|
}
|
|
2206
|
-
function
|
|
2207
|
-
return (t2) =>
|
|
2216
|
+
function _i(e5) {
|
|
2217
|
+
return (t2) => gi(t2, { httpClient: e5 });
|
|
2208
2218
|
}
|
|
2209
|
-
var
|
|
2210
|
-
async function
|
|
2211
|
-
return [...(await
|
|
2219
|
+
var vi = ht(_i);
|
|
2220
|
+
async function yi() {
|
|
2221
|
+
return [...(await vi({ filter: { services: {} } })).categories ?? []].sort((e5, t2) => (e5.sortOrder ?? 0) - (t2.sortOrder ?? 0));
|
|
2212
2222
|
}
|
|
2213
|
-
function
|
|
2223
|
+
function bi({ isLoading: e5, hasError: t2, refetch: n2, children: r2 }) {
|
|
2214
2224
|
let i2 = { categoryItems: [], hasMultipleCategories: false, isLoading: e5, hasError: t2, refetch: n2, selectCategory: () => {
|
|
2215
2225
|
} };
|
|
2216
2226
|
return f($.Provider, { value: i2, children: r2 });
|
|
2217
2227
|
}
|
|
2218
|
-
function
|
|
2219
|
-
return f(
|
|
2228
|
+
function xi({ refetch: e5, children: t2 }) {
|
|
2229
|
+
return f(bi, { isLoading: true, hasError: false, refetch: e5, children: t2 });
|
|
2220
2230
|
}
|
|
2221
|
-
function
|
|
2222
|
-
return f(
|
|
2231
|
+
function Si({ refetch: e5, children: t2 }) {
|
|
2232
|
+
return f(bi, { isLoading: false, hasError: true, refetch: e5, children: t2 });
|
|
2223
2233
|
}
|
|
2224
|
-
function
|
|
2234
|
+
function Ci(e5) {
|
|
2225
2235
|
let t2 = e5?.$in ?? (e5?.$eq == null ? [] : [e5.$eq]);
|
|
2226
2236
|
return [...new Set(t2.filter((e6) => typeof e6 == `string` && e6 !== ``))].sort().join(`,`);
|
|
2227
2237
|
}
|
|
2228
|
-
function
|
|
2238
|
+
function wi(e5) {
|
|
2229
2239
|
return e5 ? e5.split(`,`) : null;
|
|
2230
2240
|
}
|
|
2231
|
-
var
|
|
2232
|
-
function
|
|
2241
|
+
var Ti = Yr(`@wix/site-service-business-logger`);
|
|
2242
|
+
function Ei(e5) {
|
|
2233
2243
|
return { evid: 32, src: 16, endpoint: ``, params: e5 };
|
|
2234
2244
|
}
|
|
2235
|
-
var
|
|
2245
|
+
var Di = function(e5) {
|
|
2236
2246
|
return e5.BOOK_ONLINE = `bookingsBookOnline`, e5.SERVICE_PAGE = `bookingsServicePage`, e5.CALENDAR_PAGE = `bookingsCalendar`, e5.FORM_PAGE = `bookingsForm`, e5;
|
|
2237
2247
|
}({});
|
|
2238
|
-
var
|
|
2239
|
-
|
|
2240
|
-
var
|
|
2241
|
-
var
|
|
2242
|
-
let { reportBi: t2 } = d(
|
|
2248
|
+
var Oi = { 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` };
|
|
2249
|
+
Di.BOOK_ONLINE;
|
|
2250
|
+
var ki = `new_bookings_server`;
|
|
2251
|
+
var Ai = (e5) => {
|
|
2252
|
+
let { reportBi: t2 } = d(Ti);
|
|
2243
2253
|
return r((n2) => {
|
|
2244
|
-
t2({ widget_name: e5, bookingsPlatform:
|
|
2254
|
+
t2({ widget_name: e5, bookingsPlatform: ki, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
|
|
2245
2255
|
}, [t2, e5]);
|
|
2246
2256
|
};
|
|
2247
|
-
var
|
|
2248
|
-
let n2 =
|
|
2257
|
+
var ji = (e5, t2 = true) => {
|
|
2258
|
+
let n2 = Ai(e5), { getParsedUrl: r2 } = Ur(), i2 = s(false);
|
|
2249
2259
|
a(() => {
|
|
2250
|
-
t2 && !i2.current && (i2.current = true, n2(
|
|
2260
|
+
t2 && !i2.current && (i2.current = true, n2(Ei({ referralInfo: r2().searchParams.get(Q.referral) ?? void 0 })));
|
|
2251
2261
|
}, [t2, n2, r2]);
|
|
2252
2262
|
};
|
|
2253
2263
|
var $ = n(null);
|
|
2254
|
-
var
|
|
2255
|
-
function
|
|
2264
|
+
var Mi = `useCategoriesContext must be used within CategoriesContextProvider`;
|
|
2265
|
+
function Ni() {
|
|
2256
2266
|
let e5 = i($);
|
|
2257
|
-
if (!e5) throw Error(
|
|
2267
|
+
if (!e5) throw Error(Mi);
|
|
2258
2268
|
return e5;
|
|
2259
2269
|
}
|
|
2260
|
-
function
|
|
2270
|
+
function Pi(e5, t2) {
|
|
2261
2271
|
return { categoryId: e5._id ?? null, categoryName: e5.name ?? null, isSelected: e5._id != null && e5._id === t2 };
|
|
2262
2272
|
}
|
|
2263
|
-
var
|
|
2264
|
-
var
|
|
2265
|
-
function
|
|
2266
|
-
let { categories: s2, hasError: c2 } =
|
|
2267
|
-
let e6 =
|
|
2273
|
+
var Fi = (e5) => ({ categories: e5, hasError: false });
|
|
2274
|
+
var Ii = () => ({ categories: [], hasError: true });
|
|
2275
|
+
function Li({ categoriesPromise: e5, categoryIdsKey: t2, refetch: n2, children: i2 }) {
|
|
2276
|
+
let { categories: s2, hasError: c2 } = kr(e5), l2 = o(() => {
|
|
2277
|
+
let e6 = wi(t2);
|
|
2268
2278
|
return e6 ? s2.filter((t3) => t3._id && e6.includes(t3._id)) : s2;
|
|
2269
|
-
}, [s2, t2]), { pathname: u2, searchParams: d2, pushUrl: p2, getExternalBaseUrl: m2 } =
|
|
2279
|
+
}, [s2, t2]), { pathname: u2, searchParams: d2, pushUrl: p2, getExternalBaseUrl: m2 } = Ur(), h2 = d2.get(Q.category), g2 = r((e6, t3) => {
|
|
2270
2280
|
let n3 = new URLSearchParams(d2);
|
|
2271
2281
|
e6 ? n3.set(Q.category, e6) : n3.delete(Q.category), n3.delete(Q.page);
|
|
2272
2282
|
let r2 = n3.toString(), i3 = r2 ? `${u2}?${r2}` : u2;
|
|
@@ -2275,21 +2285,21 @@ function Pi({ categoriesPromise: e5, categoryIdsKey: t2, refetch: n2, children:
|
|
|
2275
2285
|
a(() => {
|
|
2276
2286
|
v2 && g2(null, true);
|
|
2277
2287
|
}, [v2, g2]);
|
|
2278
|
-
let y2 = l2.filter((e6) => e6._id).length > 1, b2 = o(() => ({ categoryItems: l2.map((e6) =>
|
|
2288
|
+
let y2 = l2.filter((e6) => e6._id).length > 1, b2 = o(() => ({ categoryItems: l2.map((e6) => Pi(e6, h2)), hasMultipleCategories: y2, isLoading: false, hasError: c2, refetch: n2, selectCategory: _2 }), [l2, h2, y2, c2, n2, _2]);
|
|
2279
2289
|
return f($.Provider, { value: b2, children: i2 });
|
|
2280
2290
|
}
|
|
2281
|
-
function
|
|
2282
|
-
Oi
|
|
2283
|
-
let a2 =
|
|
2284
|
-
return f(
|
|
2291
|
+
function Ri({ categoriesPicker: e5, refreshSignal: n2 = 0, children: i2 }) {
|
|
2292
|
+
ji(Oi.CATEGORIES);
|
|
2293
|
+
let a2 = qr(), s2 = $r(), l2 = Ci(e5?.categoryId), [u2, d2] = c(0), p2 = o(() => Mr(fi({ key: ti(s2), refresh: u2 !== 0 || n2 !== 0, warmupData: a2, fetchData: () => Er(`categories-context-load`, { feature: Cr.categories }, yi()) }), Fi, Ii), [u2, n2, s2]), m2 = r(() => d2((e6) => e6 + 1), []);
|
|
2294
|
+
return f(Dr, { fallback: f(Si, { refetch: m2, children: i2 }), feature: Cr.categories, children: f(t, { fallback: f(xi, { refetch: m2, children: i2 }), children: f(Li, { categoriesPromise: p2, categoryIdsKey: l2, refetch: m2, children: i2 }) }) });
|
|
2285
2295
|
}
|
|
2286
|
-
var
|
|
2296
|
+
var zi = pn(`73a358c8-c2c8-4342-bf64-9079e92178fc`);
|
|
2287
2297
|
export {
|
|
2288
|
-
|
|
2289
|
-
|
|
2298
|
+
Mi as CATEGORIES_CONTEXT_MISSING_PROVIDER_ERROR,
|
|
2299
|
+
Ri as CategoriesContextProvider,
|
|
2290
2300
|
$ as categoriesContext,
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2301
|
+
Ri as default,
|
|
2302
|
+
zi as injectAccessTokenGetter,
|
|
2303
|
+
Ni as useCategoriesContext
|
|
2294
2304
|
};
|
|
2295
2305
|
//# sourceMappingURL=context-categories.mjs.map
|