@wix/blog 1.0.713 → 1.0.715
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/_sdk-exports/context-blog-feed/runtime.js +2 -2
- package/_sdk-exports/context-post-by-id/runtime.js +3 -3
- package/_sdk-exports/context-post-by-slug/runtime.js +3 -3
- package/_sdk-exports/context-post-list-item/runtime.js +4 -4
- package/_sdk-exports/context-related-posts/runtime.js +4 -4
- package/build/cjs/context-blog-feed.js +10 -5
- package/build/cjs/context-blog-feed.js.map +1 -1
- package/build/cjs/context-post-by-id.js +119 -113
- package/build/cjs/context-post-by-id.js.map +1 -1
- package/build/cjs/context-post-by-slug.js +10 -5
- package/build/cjs/context-post-by-slug.js.map +1 -1
- package/build/cjs/context-post-list-item.js +596 -589
- package/build/cjs/context-post-list-item.js.map +1 -1
- package/build/cjs/context-related-posts.js +940 -934
- package/build/cjs/context-related-posts.js.map +1 -1
- package/build/es/context-blog-feed.mjs +10 -5
- package/build/es/context-blog-feed.mjs.map +1 -1
- package/build/es/context-post-by-id.mjs +119 -113
- package/build/es/context-post-by-id.mjs.map +1 -1
- package/build/es/context-post-by-slug.mjs +10 -5
- package/build/es/context-post-by-slug.mjs.map +1 -1
- package/build/es/context-post-list-item.mjs +596 -589
- package/build/es/context-post-list-item.mjs.map +1 -1
- package/build/es/context-related-posts.mjs +940 -934
- package/build/es/context-related-posts.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -20,10 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// context-related-posts.ts
|
|
21
21
|
var context_related_posts_exports = {};
|
|
22
22
|
__export(context_related_posts_exports, {
|
|
23
|
-
RelatedPostsProvider: () =>
|
|
24
|
-
default: () =>
|
|
25
|
-
injectAccessTokenGetter: () =>
|
|
26
|
-
useRelatedPostsContext: () =>
|
|
23
|
+
RelatedPostsProvider: () => xu,
|
|
24
|
+
default: () => xu,
|
|
25
|
+
injectAccessTokenGetter: () => Su,
|
|
26
|
+
useRelatedPostsContext: () => lu
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(context_related_posts_exports);
|
|
29
29
|
|
|
@@ -813,21 +813,21 @@ function ln(e6, t2) {
|
|
|
813
813
|
function un(e6) {
|
|
814
814
|
return isFinite(e6) ? e6 : e6.toString();
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function N(e6) {
|
|
817
817
|
return e6 === `NaN` ? NaN : e6 === `Infinity` ? 1 / 0 : e6 === `-Infinity` ? -1 / 0 : e6;
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function dn(e6) {
|
|
820
820
|
return Uint8Array.from(atob(e6), (e7) => e7.charCodeAt(0));
|
|
821
821
|
}
|
|
822
|
-
var
|
|
823
|
-
var
|
|
822
|
+
var fn = `modulepreload`;
|
|
823
|
+
var pn = function(e6, t2) {
|
|
824
824
|
return new URL(e6, t2).href;
|
|
825
825
|
};
|
|
826
|
-
var
|
|
827
|
-
var
|
|
826
|
+
var mn = {};
|
|
827
|
+
var hn = function(e6) {
|
|
828
828
|
return e6.pathname.endsWith(`.css`);
|
|
829
829
|
};
|
|
830
|
-
var
|
|
830
|
+
var gn = function(e6, t2, n2) {
|
|
831
831
|
if (t2 in e6) return e6[t2];
|
|
832
832
|
let r2 = n2();
|
|
833
833
|
if (!r2) {
|
|
@@ -841,7 +841,7 @@ var _n = function(e6, t2, n2) {
|
|
|
841
841
|
});
|
|
842
842
|
return e6[t2] = i2, i2;
|
|
843
843
|
};
|
|
844
|
-
var
|
|
844
|
+
var _n = function(e6, t2, n2) {
|
|
845
845
|
let r2 = Promise.resolve();
|
|
846
846
|
if (t2 && t2.length > 0) {
|
|
847
847
|
let o3 = function(e8) {
|
|
@@ -852,9 +852,9 @@ var vn = function(e6, t2, n2) {
|
|
|
852
852
|
var o2 = o3, s2 = s3;
|
|
853
853
|
let e7, i3 = document.querySelector(`meta[property=csp-nonce]`), a2 = i3?.nonce || i3?.getAttribute(`nonce`);
|
|
854
854
|
r2 = o3(t2.map((t3) => {
|
|
855
|
-
t3 =
|
|
856
|
-
let r3 = s3(t3), i4 =
|
|
857
|
-
return
|
|
855
|
+
t3 = pn(t3, n2);
|
|
856
|
+
let r3 = s3(t3), i4 = hn(r3);
|
|
857
|
+
return gn(mn, r3.href, () => {
|
|
858
858
|
if (e7 === void 0) {
|
|
859
859
|
e7 = { all: /* @__PURE__ */ new Set(), styles: /* @__PURE__ */ new Set() };
|
|
860
860
|
let t5 = document.getElementsByTagName(`link`);
|
|
@@ -865,7 +865,7 @@ var vn = function(e6, t2, n2) {
|
|
|
865
865
|
}
|
|
866
866
|
if ((i4 ? e7.styles : e7.all).has(r3.href)) return;
|
|
867
867
|
let t4 = document.createElement(`link`);
|
|
868
|
-
if (t4.rel = i4 ? `stylesheet` :
|
|
868
|
+
if (t4.rel = i4 ? `stylesheet` : fn, i4 || (t4.as = `script`), t4.crossOrigin = ``, t4.href = r3.href, a2 && t4.setAttribute(`nonce`, a2), document.head.appendChild(t4), i4) return new Promise((e8, n3) => {
|
|
869
869
|
t4.addEventListener(`load`, e8), t4.addEventListener(`error`, () => n3(Error(`Unable to preload CSS for ${r3}`)));
|
|
870
870
|
});
|
|
871
871
|
});
|
|
@@ -880,30 +880,30 @@ var vn = function(e6, t2, n2) {
|
|
|
880
880
|
return e6().catch(i2);
|
|
881
881
|
});
|
|
882
882
|
};
|
|
883
|
-
var
|
|
884
|
-
var
|
|
885
|
-
var
|
|
886
|
-
var
|
|
887
|
-
let e6 =
|
|
888
|
-
if (e6) return { [
|
|
883
|
+
var vn = `x-wix-linguist`;
|
|
884
|
+
var yn = `00000000-0000-0000-0000-000000000000`;
|
|
885
|
+
var bn = `false`;
|
|
886
|
+
var xn = () => {
|
|
887
|
+
let e6 = wn(`language`), t2 = wn(`locale`);
|
|
888
|
+
if (e6) return { [vn]: [e6, t2 || e6, bn, yn].join(`|`) };
|
|
889
889
|
};
|
|
890
|
-
function
|
|
890
|
+
function Sn() {
|
|
891
891
|
let e6 = null, t2 = null;
|
|
892
892
|
return { promise: new Promise((n2, r2) => {
|
|
893
893
|
e6 = n2, t2 = r2;
|
|
894
894
|
}), resolve: e6, reject: t2 };
|
|
895
895
|
}
|
|
896
|
-
var
|
|
897
|
-
var
|
|
898
|
-
var
|
|
899
|
-
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 =
|
|
900
|
-
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language:
|
|
901
|
-
return
|
|
896
|
+
var Cn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
|
|
897
|
+
var wn = (e6) => Cn()?.[e6];
|
|
898
|
+
var Tn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
|
|
899
|
+
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = Dn();
|
|
900
|
+
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: wn(`language`), locale: wn(`locale`), get passThroughHeaders() {
|
|
901
|
+
return xn();
|
|
902
902
|
} } };
|
|
903
903
|
}, auth: (e7) => {
|
|
904
904
|
let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
|
|
905
|
-
!e7 &&
|
|
906
|
-
let n2 = false, { resolve: r2, promise: i2 } =
|
|
905
|
+
!e7 && En() && (e7 = t2?.getAccessTokenFunction?.());
|
|
906
|
+
let n2 = false, { resolve: r2, promise: i2 } = Sn();
|
|
907
907
|
return { getAuthHeaders: async () => {
|
|
908
908
|
if (!e7 && n2 && (e7 = await i2), !e7) throw Error(`Failed to resolve auth token`);
|
|
909
909
|
return { headers: { Authorization: await e7() } };
|
|
@@ -911,37 +911,37 @@ var En = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host:
|
|
|
911
911
|
r2(e8);
|
|
912
912
|
}) };
|
|
913
913
|
} });
|
|
914
|
-
function
|
|
914
|
+
function En() {
|
|
915
915
|
return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function Dn() {
|
|
918
918
|
let e6 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
|
|
919
919
|
if (!e6) return;
|
|
920
920
|
let t2 = new URL(e6);
|
|
921
921
|
return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
|
|
922
922
|
}
|
|
923
|
-
var
|
|
923
|
+
var On = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
|
|
924
924
|
if (!e6) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
|
|
925
925
|
return e6.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
|
|
926
926
|
}, getAccessToken: () => {
|
|
927
927
|
throw Error(`Not implemented`);
|
|
928
928
|
}, observeState: () => ({ disconnect: () => {
|
|
929
929
|
} }) });
|
|
930
|
-
var
|
|
930
|
+
var kn = Tn({ createHost: function(e6) {
|
|
931
931
|
let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e6?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e6 || {};
|
|
932
932
|
if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
|
|
933
|
-
return { channel:
|
|
933
|
+
return { channel: On({ clientSdk: t2, applicationId: n2 }), close: () => {
|
|
934
934
|
} };
|
|
935
935
|
} });
|
|
936
|
-
var
|
|
937
|
-
let n2 =
|
|
936
|
+
var An = (e6, t2) => {
|
|
937
|
+
let n2 = kn.host({ applicationId: e6, componentId: t2 }), r2 = kn.auth();
|
|
938
938
|
return qe({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
939
939
|
};
|
|
940
|
-
var
|
|
941
|
-
function
|
|
940
|
+
var jn = (e6) => An(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
|
|
941
|
+
function Mn() {
|
|
942
942
|
let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
943
943
|
if (e6) return { initWixModules(t3, n3) {
|
|
944
|
-
return
|
|
944
|
+
return Nn(() => e6(t3, n3));
|
|
945
945
|
}, fetchWithAuth() {
|
|
946
946
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
947
947
|
}, graphql() {
|
|
@@ -951,10 +951,10 @@ function Nn() {
|
|
|
951
951
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
952
952
|
if (r2) {
|
|
953
953
|
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`);
|
|
954
|
-
return
|
|
954
|
+
return Nn(() => n2.use(e7));
|
|
955
955
|
}
|
|
956
956
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
957
|
-
return
|
|
957
|
+
return Nn(() => t2.use(e7));
|
|
958
958
|
}, fetchWithAuth: (e7, n3) => {
|
|
959
959
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
960
960
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -966,7 +966,7 @@ function Nn() {
|
|
|
966
966
|
return t2.graphql(e7, n3, r2);
|
|
967
967
|
} };
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function Nn(e6) {
|
|
970
970
|
let t2 = globalThis.__wix_context__, n2 = { client: v.client, elevatedClient: v.elevatedClient }, r2;
|
|
971
971
|
globalThis.__wix_context__ = void 0, v.client = void 0, v.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
972
972
|
try {
|
|
@@ -975,17 +975,17 @@ function Pn(e6) {
|
|
|
975
975
|
globalThis.__wix_context__ = t2, v.client = n2.client, v.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Pn(e6, t2) {
|
|
979
979
|
return { ...e6, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
|
|
980
|
-
let r2 =
|
|
980
|
+
let r2 = Mn();
|
|
981
981
|
if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
982
982
|
return r2.initWixModules(e6)[t3].apply(void 0, n2);
|
|
983
983
|
}])) };
|
|
984
984
|
}
|
|
985
|
-
function
|
|
986
|
-
return
|
|
985
|
+
function Fn(e6) {
|
|
986
|
+
return Pn({ __type: `host`, create: (t2) => Object.entries(e6).reduce((e7, [n2, r2]) => ({ ...e7, [n2]: r2(t2) }), {}) }, Object.keys(e6));
|
|
987
987
|
}
|
|
988
|
-
var
|
|
988
|
+
var In = class {
|
|
989
989
|
constructor(e6) {
|
|
990
990
|
this.message = e6, this.captureException = () => {
|
|
991
991
|
console.error(this.message);
|
|
@@ -1000,13 +1000,13 @@ var Ln = class {
|
|
|
1000
1000
|
};
|
|
1001
1001
|
}
|
|
1002
1002
|
};
|
|
1003
|
-
var
|
|
1004
|
-
var
|
|
1005
|
-
function
|
|
1003
|
+
var Ln = (e6) => new In(e6);
|
|
1004
|
+
var Rn = Fn({ getMonitoringClient: (e6) => () => e6.getMonitoringClient ? e6.getMonitoringClient() : Ln(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
|
|
1005
|
+
function zn(e6) {
|
|
1006
1006
|
let t2 = Promise.resolve(e6);
|
|
1007
1007
|
return t2.status = `fulfilled`, t2.value = e6, t2;
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function Bn(e6) {
|
|
1010
1010
|
if (e6.status === `fulfilled`) return e6.value;
|
|
1011
1011
|
throw e6.status === `rejected` ? e6.reason : (e6.status === `pending` || (e6.status = `pending`, e6.then((t2) => {
|
|
1012
1012
|
e6.status = `fulfilled`, e6.value = t2;
|
|
@@ -1014,17 +1014,17 @@ function Vn(e6) {
|
|
|
1014
1014
|
e6.status = `rejected`, e6.reason = t2;
|
|
1015
1015
|
})), e6);
|
|
1016
1016
|
}
|
|
1017
|
-
var
|
|
1018
|
-
function
|
|
1019
|
-
let r2 =
|
|
1020
|
-
r2 || (r2 = /* @__PURE__ */ new WeakMap(),
|
|
1017
|
+
var Vn = /* @__PURE__ */ new WeakMap();
|
|
1018
|
+
function Hn(e6, t2, n2) {
|
|
1019
|
+
let r2 = Vn.get(e6);
|
|
1020
|
+
r2 || (r2 = /* @__PURE__ */ new WeakMap(), Vn.set(e6, r2));
|
|
1021
1021
|
let i2 = r2.get(t2);
|
|
1022
1022
|
i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
|
|
1023
1023
|
let a2 = i2.get(n2);
|
|
1024
1024
|
if (!a2) {
|
|
1025
|
-
if (e6.status === `fulfilled`) a2 =
|
|
1025
|
+
if (e6.status === `fulfilled`) a2 = zn(t2(e6.value));
|
|
1026
1026
|
else if (e6.status === `rejected`) try {
|
|
1027
|
-
a2 =
|
|
1027
|
+
a2 = zn(n2(e6.reason));
|
|
1028
1028
|
} catch {
|
|
1029
1029
|
a2 = e6.then(t2, n2);
|
|
1030
1030
|
}
|
|
@@ -1033,45 +1033,44 @@ function Un(e6, t2, n2) {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
return a2;
|
|
1035
1035
|
}
|
|
1036
|
-
var
|
|
1037
|
-
function
|
|
1036
|
+
var Un = 1e4;
|
|
1037
|
+
function Wn(e6) {
|
|
1038
1038
|
let [t2, n2] = (0, import_react.useState)(void 0);
|
|
1039
1039
|
return (0, import_react.useEffect)(() => {
|
|
1040
1040
|
let t3 = Date.now();
|
|
1041
|
-
t3 - e6 >
|
|
1041
|
+
t3 - e6 > Un && (0, import_react.startTransition)(() => n2(t3));
|
|
1042
1042
|
}, []), t2 ?? e6;
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function P(e6) {
|
|
1045
1045
|
return e6;
|
|
1046
1046
|
}
|
|
1047
|
-
var
|
|
1048
|
-
var
|
|
1047
|
+
var Gn = P(`@wix/site-service-rendering-context`);
|
|
1048
|
+
var Kn = () => {
|
|
1049
1049
|
try {
|
|
1050
|
-
return (0, import_services_manager_react.useService)(
|
|
1050
|
+
return (0, import_services_manager_react.useService)(Gn).SSR;
|
|
1051
1051
|
} catch {
|
|
1052
1052
|
return false;
|
|
1053
1053
|
}
|
|
1054
1054
|
};
|
|
1055
|
-
var
|
|
1056
|
-
function
|
|
1055
|
+
var qn = (e6, t2) => e6.length === t2.length && e6.every((e7, n2) => Object.is(e7, t2[n2]));
|
|
1056
|
+
function Jn(e6, t2) {
|
|
1057
1057
|
let [n2, r2] = (0, import_react.useState)(() => ({ deps: t2, value: e6() }));
|
|
1058
1058
|
return (0, import_react.useEffect)(() => {
|
|
1059
|
-
if (
|
|
1059
|
+
if (qn(n2.deps, t2)) return;
|
|
1060
1060
|
let a2 = e6();
|
|
1061
1061
|
(0, import_react.startTransition)(() => r2({ deps: t2, value: a2 }));
|
|
1062
1062
|
}, t2), n2.value;
|
|
1063
1063
|
}
|
|
1064
|
-
var
|
|
1065
|
-
var
|
|
1066
|
-
var
|
|
1067
|
-
var
|
|
1068
|
-
var
|
|
1069
|
-
var
|
|
1064
|
+
var Yn = P(`@wix/site-service-url`);
|
|
1065
|
+
var Xn = `14bcded7-0066-7c35-14d7-466cb3f09103`;
|
|
1066
|
+
var Zn = `post`;
|
|
1067
|
+
var Qn = `builder-post`;
|
|
1068
|
+
var $n = `__blog_unknown_section__`;
|
|
1069
|
+
var er = (e6) => {
|
|
1070
1070
|
let t2;
|
|
1071
1071
|
try {
|
|
1072
|
-
let n3 = e6.appSectionRelativeUrl(
|
|
1073
|
-
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`,
|
|
1074
|
-
t2 = e6.appSectionRelativeUrl(Zn, $n, true);
|
|
1072
|
+
let n3 = e6.appSectionRelativeUrl(Xn, Qn);
|
|
1073
|
+
if (t2 = e6.appSectionRelativeUrl(Xn, Qn, true), n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, $n) && !n3?.endsWith(`/post-page`) && t2 === n3) return;
|
|
1075
1074
|
} catch {
|
|
1076
1075
|
return;
|
|
1077
1076
|
}
|
|
@@ -1079,12 +1078,12 @@ var tr = (e6) => {
|
|
|
1079
1078
|
let n2 = t2.split(`/`).filter(Boolean);
|
|
1080
1079
|
return n2[n2.length - 1] === `post-page` && n2.pop(), n2.length > 0 ? n2.join(`/`) : void 0;
|
|
1081
1080
|
};
|
|
1082
|
-
var
|
|
1083
|
-
var
|
|
1084
|
-
let t2 =
|
|
1085
|
-
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${
|
|
1081
|
+
var tr = (e6) => `${e6}/${Zn}`;
|
|
1082
|
+
var nr = (e6) => {
|
|
1083
|
+
let t2 = er(e6);
|
|
1084
|
+
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${tr(t2)}`;
|
|
1086
1085
|
};
|
|
1087
|
-
var
|
|
1086
|
+
var rr = (e6, t2) => {
|
|
1088
1087
|
if (!e6 || !t2) return;
|
|
1089
1088
|
let n2;
|
|
1090
1089
|
try {
|
|
@@ -1098,14 +1097,14 @@ var ir = (e6, t2) => {
|
|
|
1098
1097
|
if (r2.endsWith(t3) && i2.endsWith(`/post`)) return `${n2.origin}${i2}`;
|
|
1099
1098
|
}
|
|
1100
1099
|
};
|
|
1101
|
-
var
|
|
1100
|
+
var ir = (e6) => {
|
|
1102
1101
|
if (!e6) return;
|
|
1103
1102
|
if (typeof e6 == `string`) return e6;
|
|
1104
1103
|
let { base: t2, path: n2 } = e6;
|
|
1105
1104
|
return t2 ? `${t2.replace(/\/+$/, ``)}${n2 ?? ``}` : void 0;
|
|
1106
1105
|
};
|
|
1107
|
-
var
|
|
1108
|
-
let n2 =
|
|
1106
|
+
var ar = (e6, t2) => {
|
|
1107
|
+
let n2 = ir(e6.url), r2 = `/${Zn}`;
|
|
1109
1108
|
if (!n2 || !t2?.endsWith(r2)) return;
|
|
1110
1109
|
let i2, a2;
|
|
1111
1110
|
try {
|
|
@@ -1116,23 +1115,23 @@ var or = (e6, t2) => {
|
|
|
1116
1115
|
let o2 = a2.slice(0, -r2.length);
|
|
1117
1116
|
return o2 && i2.startsWith(`${o2}/`) && !i2.startsWith(`${a2}/`) ? n2 : void 0;
|
|
1118
1117
|
};
|
|
1119
|
-
var
|
|
1120
|
-
let n2 =
|
|
1118
|
+
var or = (e6, t2) => {
|
|
1119
|
+
let n2 = ar(e6, t2);
|
|
1121
1120
|
if (n2) return { href: n2, target: `_self` };
|
|
1122
1121
|
if (t2 && e6.slug) return { href: `${t2}/${encodeURIComponent(e6.slug)}`, target: `_self` };
|
|
1123
|
-
let r2 =
|
|
1122
|
+
let r2 = ir(e6.url);
|
|
1124
1123
|
return r2 ? { href: r2, target: `_self` } : void 0;
|
|
1125
1124
|
};
|
|
1126
|
-
var
|
|
1125
|
+
var sr = (e6) => {
|
|
1127
1126
|
let t2;
|
|
1128
1127
|
try {
|
|
1129
|
-
t2 = (0, import_services_manager_react.useService)(
|
|
1128
|
+
t2 = (0, import_services_manager_react.useService)(Yn);
|
|
1130
1129
|
} catch {
|
|
1131
1130
|
return;
|
|
1132
1131
|
}
|
|
1133
|
-
return
|
|
1132
|
+
return nr(t2) ?? rr(t2.currentUrl, e6);
|
|
1134
1133
|
};
|
|
1135
|
-
var
|
|
1134
|
+
var cr = (e6, t2) => {
|
|
1136
1135
|
let n2;
|
|
1137
1136
|
try {
|
|
1138
1137
|
n2 = new URL(e6).pathname.split(`/`).filter(Boolean);
|
|
@@ -1152,52 +1151,59 @@ var lr = (e6, t2) => {
|
|
|
1152
1151
|
return i2;
|
|
1153
1152
|
}
|
|
1154
1153
|
};
|
|
1155
|
-
var
|
|
1154
|
+
var lr = () => {
|
|
1156
1155
|
let e6;
|
|
1157
1156
|
try {
|
|
1158
|
-
e6 = (0, import_services_manager_react.useService)(
|
|
1157
|
+
e6 = (0, import_services_manager_react.useService)(Yn);
|
|
1159
1158
|
} catch {
|
|
1160
1159
|
return;
|
|
1161
1160
|
}
|
|
1162
1161
|
if (!e6.currentUrl) return;
|
|
1163
|
-
let t2 =
|
|
1164
|
-
return
|
|
1162
|
+
let t2 = er(e6);
|
|
1163
|
+
return cr(e6.currentUrl, t2 && tr(t2));
|
|
1165
1164
|
};
|
|
1166
|
-
var
|
|
1167
|
-
var
|
|
1168
|
-
var
|
|
1165
|
+
var ur = { categoryHeader: `WixBlog.CategoryHeader`, coverMedia: `WixBlog.PostCoverMedia`, postActions: `WixBlog.PostActionBar`, postCategories: `WixBlog.PostCategoryList`, postCounters: `WixBlog.PostCounterBar`, postMetadata: `WixBlog.PostMetadataBar`, postTags: `WixBlog.PostTagList`, feedProvider: `WixBlog.BlogFeedContextProvider`, postBySlugProvider: `WixBlog.PostBySlugContextProvider`, postByIdProvider: `WixBlog.PostByIdContextProvider`, relatedPostsProvider: `WixBlog.RelatedPostsContextProvider` };
|
|
1166
|
+
var dr = (e6) => `${e6} rendered`;
|
|
1167
|
+
var fr = (e6, t2, n2) => {
|
|
1169
1168
|
(0, import_react.useEffect)(() => {
|
|
1170
1169
|
if (t2 !== `loading` && typeof performance < `u` && typeof performance.mark == `function`) try {
|
|
1171
|
-
performance.mark(
|
|
1170
|
+
performance.mark(dr(e6), { detail: { state: t2, compId: n2 } });
|
|
1172
1171
|
} catch {
|
|
1173
1172
|
}
|
|
1174
1173
|
}, [e6, t2, n2]);
|
|
1175
1174
|
};
|
|
1176
|
-
var
|
|
1177
|
-
var
|
|
1178
|
-
var
|
|
1175
|
+
var pr = P(`@wix/site-service-locale`);
|
|
1176
|
+
var mr = P(`@wix/site-service-renderer-configuration`);
|
|
1177
|
+
var hr = () => {
|
|
1179
1178
|
let e6, t2;
|
|
1180
1179
|
try {
|
|
1181
|
-
e6 = (0, import_services_manager_react.useService)(
|
|
1180
|
+
e6 = (0, import_services_manager_react.useService)(mr).languageCode;
|
|
1182
1181
|
} catch {
|
|
1183
1182
|
}
|
|
1184
1183
|
try {
|
|
1185
|
-
t2 = (0, import_services_manager_react.useService)(
|
|
1184
|
+
t2 = (0, import_services_manager_react.useService)(pr).language;
|
|
1186
1185
|
} catch {
|
|
1187
1186
|
}
|
|
1188
1187
|
return e6 || t2;
|
|
1189
1188
|
};
|
|
1189
|
+
var gr = P(`@wix/viewer-service-multilingual`);
|
|
1190
1190
|
var _r = () => {
|
|
1191
|
+
let e6;
|
|
1191
1192
|
try {
|
|
1192
|
-
let {
|
|
1193
|
-
|
|
1193
|
+
let { multilingualEnabled: t3, currentLocale: n3 } = (0, import_services_manager_react.useService)(gr);
|
|
1194
|
+
t3 && n3 && !n3.primaryLocale && (e6 = n3.regionalFormat);
|
|
1194
1195
|
} catch {
|
|
1195
|
-
return;
|
|
1196
1196
|
}
|
|
1197
|
+
let t2, n2;
|
|
1198
|
+
try {
|
|
1199
|
+
({ locale: t2, language: n2 } = (0, import_services_manager_react.useService)(pr));
|
|
1200
|
+
} catch {
|
|
1201
|
+
}
|
|
1202
|
+
return e6 || t2 || n2;
|
|
1197
1203
|
};
|
|
1198
|
-
var vr =
|
|
1204
|
+
var vr = P(`@wix/site-service-warmup-data`);
|
|
1199
1205
|
function yr() {
|
|
1200
|
-
let e6 =
|
|
1206
|
+
let e6 = Kn(), t2 = null;
|
|
1201
1207
|
try {
|
|
1202
1208
|
t2 = (0, import_services_manager_react.useGetService)()(vr);
|
|
1203
1209
|
} catch {
|
|
@@ -1240,8 +1246,8 @@ var Sr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
|
1240
1246
|
};
|
|
1241
1247
|
return (e7) => r2.getOrInsert(e7, () => i2(e7));
|
|
1242
1248
|
};
|
|
1243
|
-
var
|
|
1244
|
-
var
|
|
1249
|
+
var F = (e6) => typeof e6 == `string`;
|
|
1250
|
+
var I = () => {
|
|
1245
1251
|
let e6, t2, n2 = new Promise((n3, r2) => {
|
|
1246
1252
|
e6 = n3, t2 = r2;
|
|
1247
1253
|
});
|
|
@@ -1255,9 +1261,9 @@ var wr = (e6, t2, n2) => {
|
|
|
1255
1261
|
};
|
|
1256
1262
|
var Tr = /###/g;
|
|
1257
1263
|
var Er = (e6) => e6 && e6.includes(`###`) ? e6.replace(Tr, `.`) : e6;
|
|
1258
|
-
var Dr = (e6) => !e6 ||
|
|
1259
|
-
var
|
|
1260
|
-
let r2 =
|
|
1264
|
+
var Dr = (e6) => !e6 || F(e6);
|
|
1265
|
+
var Or = (e6, t2, n2) => {
|
|
1266
|
+
let r2 = F(t2) ? t2.split(`.`) : t2, i2 = 0;
|
|
1261
1267
|
for (; i2 < r2.length - 1; ) {
|
|
1262
1268
|
if (Dr(e6)) return {};
|
|
1263
1269
|
let t3 = Er(r2[i2]);
|
|
@@ -1265,36 +1271,36 @@ var I = (e6, t2, n2) => {
|
|
|
1265
1271
|
}
|
|
1266
1272
|
return Dr(e6) ? {} : { obj: e6, k: Er(r2[i2]) };
|
|
1267
1273
|
};
|
|
1268
|
-
var
|
|
1269
|
-
let { obj: r2, k: i2 } =
|
|
1274
|
+
var kr = (e6, t2, n2) => {
|
|
1275
|
+
let { obj: r2, k: i2 } = Or(e6, t2, Object);
|
|
1270
1276
|
if (r2 !== void 0 || t2.length === 1) {
|
|
1271
1277
|
r2[i2] = n2;
|
|
1272
1278
|
return;
|
|
1273
1279
|
}
|
|
1274
|
-
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 =
|
|
1275
|
-
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 =
|
|
1280
|
+
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = Or(e6, o2, Object);
|
|
1281
|
+
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = Or(e6, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
|
|
1276
1282
|
s2.obj[`${s2.k}.${a2}`] = n2;
|
|
1277
1283
|
};
|
|
1278
|
-
var
|
|
1279
|
-
let { obj: i2, k: a2 } =
|
|
1284
|
+
var Ar = (e6, t2, n2, r2) => {
|
|
1285
|
+
let { obj: i2, k: a2 } = Or(e6, t2, Object);
|
|
1280
1286
|
i2[a2] = i2[a2] || [], i2[a2].push(n2);
|
|
1281
1287
|
};
|
|
1282
|
-
var
|
|
1283
|
-
let { obj: n2, k: r2 } =
|
|
1288
|
+
var jr = (e6, t2) => {
|
|
1289
|
+
let { obj: n2, k: r2 } = Or(e6, t2);
|
|
1284
1290
|
if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
|
|
1285
1291
|
};
|
|
1286
|
-
var jr = (e6, t2, n2) => {
|
|
1287
|
-
let r2 = Ar(e6, n2);
|
|
1288
|
-
return r2 === void 0 ? Ar(t2, n2) : r2;
|
|
1289
|
-
};
|
|
1290
1292
|
var Mr = (e6, t2, n2) => {
|
|
1291
|
-
|
|
1293
|
+
let r2 = jr(e6, n2);
|
|
1294
|
+
return r2 === void 0 ? jr(t2, n2) : r2;
|
|
1295
|
+
};
|
|
1296
|
+
var Nr = (e6, t2, n2) => {
|
|
1297
|
+
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ? F(e6[r2]) || e6[r2] instanceof String || F(t2[r2]) || t2[r2] instanceof String ? n2 && (e6[r2] = t2[r2]) : Nr(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
|
|
1292
1298
|
return e6;
|
|
1293
1299
|
};
|
|
1294
1300
|
var L = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
|
|
1295
|
-
var
|
|
1296
|
-
var
|
|
1297
|
-
var
|
|
1301
|
+
var Pr = { "&": `&`, "<": `<`, ">": `>`, '"': `"`, "'": `'`, "/": `/` };
|
|
1302
|
+
var Fr = (e6) => F(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => Pr[e7]) : e6;
|
|
1303
|
+
var Ir = class {
|
|
1298
1304
|
constructor(e6) {
|
|
1299
1305
|
this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
1300
1306
|
}
|
|
@@ -1305,20 +1311,20 @@ var Fr = class {
|
|
|
1305
1311
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e6, n2), this.regExpQueue.push(e6), n2;
|
|
1306
1312
|
}
|
|
1307
1313
|
};
|
|
1308
|
-
var
|
|
1309
|
-
var
|
|
1310
|
-
var
|
|
1314
|
+
var Lr = [` `, `,`, `?`, `!`, `;`];
|
|
1315
|
+
var Rr = new Ir(20);
|
|
1316
|
+
var zr = (e6, t2, n2) => {
|
|
1311
1317
|
t2 ||= ``, n2 ||= ``;
|
|
1312
|
-
let r2 =
|
|
1318
|
+
let r2 = Lr.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
|
|
1313
1319
|
if (r2.length === 0) return true;
|
|
1314
|
-
let i2 =
|
|
1320
|
+
let i2 = Rr.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
|
|
1315
1321
|
if (!a2) {
|
|
1316
1322
|
let t3 = e6.indexOf(n2);
|
|
1317
1323
|
t3 > 0 && !i2.test(e6.substring(0, t3)) && (a2 = true);
|
|
1318
1324
|
}
|
|
1319
1325
|
return a2;
|
|
1320
1326
|
};
|
|
1321
|
-
var
|
|
1327
|
+
var Br = (e6, t2, n2 = `.`) => {
|
|
1322
1328
|
if (!e6) return;
|
|
1323
1329
|
if (e6[t2]) return Object.prototype.hasOwnProperty.call(e6, t2) ? e6[t2] : void 0;
|
|
1324
1330
|
let r2 = t2.split(n2), i2 = e6;
|
|
@@ -1334,8 +1340,8 @@ var zr = (e6, t2, n2 = `.`) => {
|
|
|
1334
1340
|
}
|
|
1335
1341
|
return i2;
|
|
1336
1342
|
};
|
|
1337
|
-
var
|
|
1338
|
-
var
|
|
1343
|
+
var Vr = (e6) => e6?.replace(/_/g, `-`);
|
|
1344
|
+
var Hr = { type: `logger`, log(e6) {
|
|
1339
1345
|
this.output(`log`, e6);
|
|
1340
1346
|
}, warn(e6) {
|
|
1341
1347
|
this.output(`warn`, e6);
|
|
@@ -1344,12 +1350,12 @@ var Br = { type: `logger`, log(e6) {
|
|
|
1344
1350
|
}, output(e6, t2) {
|
|
1345
1351
|
console?.[e6]?.apply?.(console, t2);
|
|
1346
1352
|
} };
|
|
1347
|
-
var
|
|
1353
|
+
var R = new class e2 {
|
|
1348
1354
|
constructor(e6, t2 = {}) {
|
|
1349
1355
|
this.init(e6, t2);
|
|
1350
1356
|
}
|
|
1351
1357
|
init(e6, t2 = {}) {
|
|
1352
|
-
this.prefix = t2.prefix || `i18next:`, this.logger = e6 ||
|
|
1358
|
+
this.prefix = t2.prefix || `i18next:`, this.logger = e6 || Hr, this.options = t2, this.debug = t2.debug;
|
|
1353
1359
|
}
|
|
1354
1360
|
log(...e6) {
|
|
1355
1361
|
return this.forward(e6, `log`, ``, true);
|
|
@@ -1364,7 +1370,7 @@ var z = new class e2 {
|
|
|
1364
1370
|
return this.forward(e6, `warn`, `WARNING DEPRECATED: `, true);
|
|
1365
1371
|
}
|
|
1366
1372
|
forward(e6, t2, n2, r2) {
|
|
1367
|
-
return r2 && !this.debug ? null : (e6 = e6.map((e7) =>
|
|
1373
|
+
return r2 && !this.debug ? null : (e6 = e6.map((e7) => F(e7) ? e7.replace(/[\r\n\x00-\x1F\x7F]/g, ` `) : e7), F(e6[0]) && (e6[0] = `${n2}${this.prefix} ${e6[0]}`), this.logger[t2](e6));
|
|
1368
1374
|
}
|
|
1369
1375
|
create(t2) {
|
|
1370
1376
|
return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
|
|
@@ -1373,7 +1379,7 @@ var z = new class e2 {
|
|
|
1373
1379
|
return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
|
|
1374
1380
|
}
|
|
1375
1381
|
}();
|
|
1376
|
-
var
|
|
1382
|
+
var Ur = class {
|
|
1377
1383
|
constructor() {
|
|
1378
1384
|
this.observers = {};
|
|
1379
1385
|
}
|
|
@@ -1401,8 +1407,8 @@ var Vr = class {
|
|
|
1401
1407
|
});
|
|
1402
1408
|
}
|
|
1403
1409
|
};
|
|
1404
|
-
var
|
|
1405
|
-
var
|
|
1410
|
+
var Wr = /* @__PURE__ */ new WeakSet();
|
|
1411
|
+
var Gr = class extends Ur {
|
|
1406
1412
|
constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
|
|
1407
1413
|
super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
|
|
1408
1414
|
}
|
|
@@ -1415,23 +1421,23 @@ var Ur = class extends Vr {
|
|
|
1415
1421
|
}
|
|
1416
1422
|
getResource(e6, t2, n2, r2 = {}) {
|
|
1417
1423
|
let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
|
|
1418
|
-
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) :
|
|
1419
|
-
let s2 =
|
|
1420
|
-
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !
|
|
1424
|
+
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : F(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
|
|
1425
|
+
let s2 = jr(this.data, o2);
|
|
1426
|
+
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !F(n2) ? s2 : Br(this.data?.[e6]?.[t2], n2, i2);
|
|
1421
1427
|
}
|
|
1422
1428
|
addResource(e6, t2, n2, r2, i2 = { silent: false }) {
|
|
1423
1429
|
let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
|
|
1424
|
-
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2),
|
|
1430
|
+
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), kr(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
|
|
1425
1431
|
}
|
|
1426
1432
|
addResources(e6, t2, n2, r2 = { silent: false }) {
|
|
1427
|
-
for (let r3 in n2) (
|
|
1433
|
+
for (let r3 in n2) (F(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
|
|
1428
1434
|
r2.silent || this.emit(`added`, e6, t2, n2);
|
|
1429
1435
|
}
|
|
1430
1436
|
addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
|
|
1431
1437
|
let o2 = [e6, t2];
|
|
1432
1438
|
e6.includes(`.`) && (o2 = e6.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
|
|
1433
|
-
let s2 =
|
|
1434
|
-
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ?
|
|
1439
|
+
let s2 = jr(this.data, o2) || {};
|
|
1440
|
+
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Nr(s2, n2, i2) : s2 = { ...s2, ...n2 }, kr(this.data, o2, s2), a2.silent || this.emit(`added`, e6, t2, n2);
|
|
1435
1441
|
}
|
|
1436
1442
|
removeResourceBundle(e6, t2) {
|
|
1437
1443
|
this.hasResourceBundle(e6, t2) && delete this.data[e6][t2], this.removeNamespaces(t2), this.emit(`removed`, e6, t2);
|
|
@@ -1449,37 +1455,37 @@ var Ur = class extends Vr {
|
|
|
1449
1455
|
let t2 = this.getDataByLanguage(e6);
|
|
1450
1456
|
return !!(t2 && Object.keys(t2) || []).find((e7) => {
|
|
1451
1457
|
let n2 = t2[e7];
|
|
1452
|
-
return
|
|
1458
|
+
return Wr.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && Wr.add(n2), true);
|
|
1453
1459
|
});
|
|
1454
1460
|
}
|
|
1455
1461
|
toJSON() {
|
|
1456
1462
|
return this.data;
|
|
1457
1463
|
}
|
|
1458
1464
|
};
|
|
1459
|
-
var
|
|
1465
|
+
var Kr = { processors: {}, addPostProcessor(e6) {
|
|
1460
1466
|
this.processors[e6.name] = e6;
|
|
1461
1467
|
}, handle(e6, t2, n2, r2, i2) {
|
|
1462
1468
|
return e6.forEach((e7) => {
|
|
1463
1469
|
t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
|
|
1464
1470
|
}), t2;
|
|
1465
1471
|
} };
|
|
1466
|
-
var
|
|
1467
|
-
function
|
|
1472
|
+
var qr = Symbol(`i18next/PATH_KEY`);
|
|
1473
|
+
function Jr() {
|
|
1468
1474
|
let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
1469
|
-
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 ===
|
|
1475
|
+
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === qr ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
1470
1476
|
}
|
|
1471
|
-
function
|
|
1472
|
-
let { [
|
|
1477
|
+
function z(e6, t2) {
|
|
1478
|
+
let { [qr]: n2 } = e6(Jr()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
|
|
1473
1479
|
if (n2.length > 1 && i2) {
|
|
1474
1480
|
let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
|
|
1475
1481
|
if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
|
|
1476
1482
|
}
|
|
1477
1483
|
return n2.join(r2);
|
|
1478
1484
|
}
|
|
1479
|
-
var
|
|
1480
|
-
var
|
|
1485
|
+
var Yr = (e6) => !F(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
|
|
1486
|
+
var Xr = class e3 extends Ur {
|
|
1481
1487
|
constructor(e6, t2 = {}) {
|
|
1482
|
-
super(), wr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger =
|
|
1488
|
+
super(), wr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = R.create(`translator`), this.checkedLoadedFor = {};
|
|
1483
1489
|
}
|
|
1484
1490
|
changeLanguage(e6) {
|
|
1485
1491
|
e6 && (this.language = e6);
|
|
@@ -1489,33 +1495,33 @@ var Jr = class e3 extends Vr {
|
|
|
1489
1495
|
if (e6 == null) return false;
|
|
1490
1496
|
let r2 = this.resolve(e6, n2);
|
|
1491
1497
|
if (r2?.res === void 0) return false;
|
|
1492
|
-
let i2 =
|
|
1498
|
+
let i2 = Yr(r2.res);
|
|
1493
1499
|
return !(n2.returnObjects === false && i2);
|
|
1494
1500
|
}
|
|
1495
1501
|
extractFromKey(e6, t2) {
|
|
1496
1502
|
let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
|
|
1497
1503
|
n2 === void 0 && (n2 = `:`);
|
|
1498
|
-
let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e6.includes(n2), o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !
|
|
1504
|
+
let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e6.includes(n2), o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !zr(e6, n2, r2);
|
|
1499
1505
|
if (a2 && !o2) {
|
|
1500
1506
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1501
|
-
if (t3 && t3.length > 0) return { key: e6, namespaces:
|
|
1507
|
+
if (t3 && t3.length > 0) return { key: e6, namespaces: F(i2) ? [i2] : i2 };
|
|
1502
1508
|
let a3 = e6.split(n2);
|
|
1503
1509
|
(n2 !== r2 || n2 === r2 && this.options.ns.includes(a3[0])) && (i2 = a3.shift()), e6 = a3.join(r2);
|
|
1504
1510
|
}
|
|
1505
|
-
return { key: e6, namespaces:
|
|
1511
|
+
return { key: e6, namespaces: F(i2) ? [i2] : i2 };
|
|
1506
1512
|
}
|
|
1507
1513
|
translate(t2, n2, r2) {
|
|
1508
1514
|
let i2 = typeof n2 == `object` ? { ...n2 } : n2;
|
|
1509
1515
|
if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
|
|
1510
|
-
typeof t2 == `function` && (t2 =
|
|
1516
|
+
typeof t2 == `function` && (t2 = z(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? z(e6, { ...this.options, ...i2 }) : String(e6));
|
|
1511
1517
|
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;
|
|
1512
1518
|
u2 === void 0 && (u2 = `:`);
|
|
1513
1519
|
let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
1514
1520
|
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;
|
|
1515
|
-
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 && !
|
|
1521
|
+
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 && !F(i2.count), x2 = e3.hasDefaultValue(i2), S2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, C2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, ee2 = b2 && !i2.ordinal && i2.count === 0, w2 = ee2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${S2}`] || i2[`defaultValue${C2}`] || i2.defaultValue, T2 = m2;
|
|
1516
1522
|
y2 && !m2 && x2 && (T2 = w2);
|
|
1517
|
-
let te2 =
|
|
1518
|
-
if (y2 && T2 && te2 && !_2.includes(ne2) && !(
|
|
1523
|
+
let te2 = Yr(T2), ne2 = Object.prototype.toString.apply(T2);
|
|
1524
|
+
if (y2 && T2 && te2 && !_2.includes(ne2) && !(F(v2) && Array.isArray(T2))) {
|
|
1519
1525
|
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
1520
1526
|
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
1521
1527
|
let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
|
|
@@ -1525,11 +1531,11 @@ var Jr = class e3 extends Vr {
|
|
|
1525
1531
|
let e6 = Array.isArray(T2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
|
|
1526
1532
|
for (let e7 in T2) if (Object.prototype.hasOwnProperty.call(T2, e7)) {
|
|
1527
1533
|
let r3 = `${n3}${o2}${e7}`;
|
|
1528
|
-
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue:
|
|
1534
|
+
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Yr(w2) ? w2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = T2[e7]);
|
|
1529
1535
|
}
|
|
1530
1536
|
m2 = t3;
|
|
1531
1537
|
}
|
|
1532
|
-
} else if (y2 &&
|
|
1538
|
+
} else if (y2 && F(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
|
|
1533
1539
|
else {
|
|
1534
1540
|
let e6 = false, n3 = false;
|
|
1535
1541
|
!this.isValidLookup(m2) && x2 && (e6 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
|
|
@@ -1561,30 +1567,30 @@ var Jr = class e3 extends Vr {
|
|
|
1561
1567
|
if (this.i18nFormat?.parse) e6 = this.i18nFormat.parse(e6, { ...this.options.interpolation.defaultVariables, ...n2 }, n2.lng || this.language || r2.usedLng, r2.usedNS, r2.usedKey, { resolved: r2 });
|
|
1562
1568
|
else if (!n2.skipInterpolation) {
|
|
1563
1569
|
n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
|
|
1564
|
-
let a3 =
|
|
1570
|
+
let a3 = F(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
|
|
1565
1571
|
if (a3) {
|
|
1566
1572
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1567
1573
|
o3 = t3 && t3.length;
|
|
1568
1574
|
}
|
|
1569
|
-
let s2 = n2.replace && !
|
|
1575
|
+
let s2 = n2.replace && !F(n2.replace) ? n2.replace : n2;
|
|
1570
1576
|
if (this.options.interpolation.defaultVariables && (s2 = { ...this.options.interpolation.defaultVariables, ...s2 }), e6 = this.interpolator.interpolate(e6, s2, n2.lng || this.language || r2.usedLng, n2), a3) {
|
|
1571
1577
|
let t3 = e6.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
|
|
1572
1578
|
o3 < r3 && (n2.nest = false);
|
|
1573
1579
|
}
|
|
1574
1580
|
!n2.lng && r2 && r2.res && (n2.lng = this.language || r2.usedLng), n2.nest !== false && (e6 = this.interpolator.nest(e6, (...e7) => i2?.[0] === e7[0] && !n2.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e7[0]} in key: ${t2[0]}`), null) : this.translate(...e7, t2), n2)), n2.interpolation && this.interpolator.reset();
|
|
1575
1581
|
}
|
|
1576
|
-
let a2 = n2.postProcess || this.options.postProcess, o2 =
|
|
1577
|
-
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 =
|
|
1582
|
+
let a2 = n2.postProcess || this.options.postProcess, o2 = F(a2) ? [a2] : a2;
|
|
1583
|
+
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = Kr.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
|
|
1578
1584
|
}
|
|
1579
1585
|
resolve(e6, t2 = {}) {
|
|
1580
1586
|
let n2, r2, i2, a2, o2;
|
|
1581
|
-
return
|
|
1587
|
+
return F(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? z(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
|
|
1582
1588
|
if (this.isValidLookup(n2)) return;
|
|
1583
1589
|
let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
|
|
1584
1590
|
r2 = c2;
|
|
1585
1591
|
let l2 = s2.namespaces;
|
|
1586
1592
|
this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
|
|
1587
|
-
let u2 = t2.count !== void 0 && !
|
|
1593
|
+
let u2 = t2.count !== void 0 && !F(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (F(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
|
|
1588
1594
|
l2.forEach((e8) => {
|
|
1589
1595
|
this.isValidLookup(n2) || (o2 = e8, !this.checkedLoadedFor[`${p2[0]}-${e8}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (this.checkedLoadedFor[`${p2[0]}-${e8}`] = 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) => {
|
|
1590
1596
|
if (this.isValidLookup(n2)) return;
|
|
@@ -1613,7 +1619,7 @@ var Jr = class e3 extends Vr {
|
|
|
1613
1619
|
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e6, t2, n2, r2) : this.resourceStore.getResource(e6, t2, n2, r2);
|
|
1614
1620
|
}
|
|
1615
1621
|
getUsedParamsDetails(e6 = {}) {
|
|
1616
|
-
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !
|
|
1622
|
+
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !F(e6.replace), r2 = n2 ? e6.replace : e6;
|
|
1617
1623
|
if (n2 && e6.count !== void 0 && (r2 = { ...r2, count: e6.count }), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
|
|
1618
1624
|
r2 = { ...r2 };
|
|
1619
1625
|
for (let e7 of t2) delete r2[e7];
|
|
@@ -1625,25 +1631,25 @@ var Jr = class e3 extends Vr {
|
|
|
1625
1631
|
return false;
|
|
1626
1632
|
}
|
|
1627
1633
|
};
|
|
1628
|
-
var
|
|
1634
|
+
var Zr = class {
|
|
1629
1635
|
constructor(e6) {
|
|
1630
|
-
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger =
|
|
1636
|
+
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = R.create(`languageUtils`), this.resolveHierarchyCache = {};
|
|
1631
1637
|
}
|
|
1632
1638
|
clearCache() {
|
|
1633
1639
|
this.resolveHierarchyCache = {};
|
|
1634
1640
|
}
|
|
1635
1641
|
getScriptPartFromCode(e6) {
|
|
1636
|
-
if (e6 =
|
|
1642
|
+
if (e6 = Vr(e6), !e6 || !e6.includes(`-`)) return null;
|
|
1637
1643
|
let t2 = e6.split(`-`);
|
|
1638
1644
|
return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
|
|
1639
1645
|
}
|
|
1640
1646
|
getLanguagePartFromCode(e6) {
|
|
1641
|
-
if (e6 =
|
|
1647
|
+
if (e6 = Vr(e6), !e6 || !e6.includes(`-`)) return e6;
|
|
1642
1648
|
let t2 = e6.split(`-`);
|
|
1643
1649
|
return this.formatLanguageCode(t2[0]);
|
|
1644
1650
|
}
|
|
1645
1651
|
formatLanguageCode(e6) {
|
|
1646
|
-
if (
|
|
1652
|
+
if (F(e6) && e6.includes(`-`)) {
|
|
1647
1653
|
let t2;
|
|
1648
1654
|
try {
|
|
1649
1655
|
t2 = Intl.getCanonicalLocales(e6)[0];
|
|
@@ -1674,7 +1680,7 @@ var Yr = class {
|
|
|
1674
1680
|
}
|
|
1675
1681
|
getFallbackCodes(e6, t2) {
|
|
1676
1682
|
if (!e6) return [];
|
|
1677
|
-
if (typeof e6 == `function` && (e6 = e6(t2)),
|
|
1683
|
+
if (typeof e6 == `function` && (e6 = e6(t2)), F(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
|
|
1678
1684
|
if (!t2) return e6.default || [];
|
|
1679
1685
|
let n2 = e6[t2];
|
|
1680
1686
|
return n2 ||= e6[this.getScriptPartFromCode(t2)], n2 ||= e6[this.formatLanguageCode(t2)], n2 ||= e6[this.getLanguagePartFromCode(t2)], n2 ||= e6.default, n2 || [];
|
|
@@ -1682,7 +1688,7 @@ var Yr = class {
|
|
|
1682
1688
|
toResolveHierarchy(e6, t2) {
|
|
1683
1689
|
let n2 = this.options.fallbackLng, r2 = Array.isArray(n2) ? n2.join(`|`) : n2;
|
|
1684
1690
|
r2 !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r2);
|
|
1685
|
-
let i2 = t2 === void 0 || t2 === false ||
|
|
1691
|
+
let i2 = t2 === void 0 || t2 === false || F(t2), a2 = t2 === void 0 && typeof this.options.fallbackLng == `function`, o2 = F(e6) && i2 && !a2, s2 = null;
|
|
1686
1692
|
if (o2) {
|
|
1687
1693
|
let n3;
|
|
1688
1694
|
n3 = t2 === void 0 ? `undefined` : t2 === false ? `boolean:false` : `string:${t2}`, s2 = `${e6.length}:${e6}|${n3}`;
|
|
@@ -1694,30 +1700,30 @@ var Yr = class {
|
|
|
1694
1700
|
let c2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e6), l2 = [], u2 = (e7) => {
|
|
1695
1701
|
e7 && (this.isSupportedCode(e7) ? l2.push(e7) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e7}`));
|
|
1696
1702
|
};
|
|
1697
|
-
return
|
|
1703
|
+
return F(e6) && (e6.includes(`-`) || e6.includes(`_`)) ? (this.options.load !== `languageOnly` && u2(this.formatLanguageCode(e6)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && u2(this.getScriptPartFromCode(e6)), this.options.load !== `currentOnly` && u2(this.getLanguagePartFromCode(e6))) : F(e6) && u2(this.formatLanguageCode(e6)), c2.forEach((e7) => {
|
|
1698
1704
|
let t3 = this.formatLanguageCode(e7);
|
|
1699
1705
|
l2.includes(t3) || u2(t3);
|
|
1700
1706
|
}), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
|
|
1701
1707
|
}
|
|
1702
1708
|
};
|
|
1703
|
-
var
|
|
1704
|
-
var
|
|
1705
|
-
var
|
|
1709
|
+
var Qr = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
1710
|
+
var $r = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
1711
|
+
var ei = class {
|
|
1706
1712
|
constructor(e6, t2 = {}) {
|
|
1707
|
-
this.languageUtils = e6, this.options = t2, this.logger =
|
|
1713
|
+
this.languageUtils = e6, this.options = t2, this.logger = R.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
1708
1714
|
}
|
|
1709
1715
|
clearCache() {
|
|
1710
1716
|
this.pluralRulesCache = {};
|
|
1711
1717
|
}
|
|
1712
1718
|
getRule(e6, t2 = {}) {
|
|
1713
|
-
let n2 =
|
|
1719
|
+
let n2 = Vr(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
|
|
1714
1720
|
if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
|
|
1715
1721
|
let a2;
|
|
1716
1722
|
try {
|
|
1717
1723
|
a2 = new Intl.PluralRules(n2, { type: r2 });
|
|
1718
1724
|
} catch {
|
|
1719
|
-
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`),
|
|
1720
|
-
if (!e6.match(/-|_/)) return
|
|
1725
|
+
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), $r;
|
|
1726
|
+
if (!e6.match(/-|_/)) return $r;
|
|
1721
1727
|
let n3 = this.languageUtils.getLanguagePartFromCode(e6);
|
|
1722
1728
|
a2 = this.getRule(n3, t2);
|
|
1723
1729
|
}
|
|
@@ -1732,26 +1738,26 @@ var Qr = class {
|
|
|
1732
1738
|
}
|
|
1733
1739
|
getSuffixes(e6, t2 = {}) {
|
|
1734
1740
|
let n2 = this.getRule(e6, t2);
|
|
1735
|
-
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) =>
|
|
1741
|
+
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) => Qr[e7] - Qr[t3]).map((e7) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e7}`) : [];
|
|
1736
1742
|
}
|
|
1737
1743
|
getSuffix(e6, t2, n2 = {}) {
|
|
1738
1744
|
let r2 = this.getRule(e6, n2);
|
|
1739
1745
|
return r2 ? `${this.options.prepend}${n2.ordinal ? `ordinal${this.options.prepend}` : ``}${r2.select(t2)}` : (this.logger.warn(`no plural rule found for: ${e6}`), this.getSuffix(`dev`, t2, n2));
|
|
1740
1746
|
}
|
|
1741
1747
|
};
|
|
1742
|
-
var
|
|
1743
|
-
let a2 =
|
|
1744
|
-
return !a2 && i2 &&
|
|
1748
|
+
var ti = (e6, t2, n2, r2 = `.`, i2 = true) => {
|
|
1749
|
+
let a2 = Mr(e6, t2, n2);
|
|
1750
|
+
return !a2 && i2 && F(n2) && (a2 = Br(e6, n2, r2), a2 === void 0 && (a2 = Br(t2, n2, r2))), a2;
|
|
1745
1751
|
};
|
|
1746
|
-
var
|
|
1747
|
-
var
|
|
1752
|
+
var ni = (e6) => e6.replace(/\$/g, `$$$$`);
|
|
1753
|
+
var ri = class {
|
|
1748
1754
|
constructor(e6 = {}) {
|
|
1749
|
-
this.logger =
|
|
1755
|
+
this.logger = R.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
|
|
1750
1756
|
}
|
|
1751
1757
|
init(e6 = {}) {
|
|
1752
1758
|
e6.interpolation ||= { escapeValue: true };
|
|
1753
1759
|
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 } = e6.interpolation;
|
|
1754
|
-
this.escape = t2 === void 0 ?
|
|
1760
|
+
this.escape = t2 === void 0 ? Fr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? L(i2) : a2 || `{{`, this.suffix = o2 ? L(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 ? L(u2) : `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 ? L(l2) : ``, this.nestingPrefix = d2 ? L(d2) : f2 || L(`$t(`), this.nestingSuffix = p2 ? L(p2) : m2 || L(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
|
|
1755
1761
|
}
|
|
1756
1762
|
reset() {
|
|
1757
1763
|
this.options && this.init(this.options);
|
|
@@ -1763,11 +1769,11 @@ var ti = class {
|
|
|
1763
1769
|
interpolate(e6, t2, n2, r2) {
|
|
1764
1770
|
let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
|
|
1765
1771
|
if (!e7.includes(this.formatSeparator)) {
|
|
1766
|
-
let i4 =
|
|
1772
|
+
let i4 = ti(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1767
1773
|
return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
|
|
1768
1774
|
}
|
|
1769
1775
|
let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
|
|
1770
|
-
return this.format(
|
|
1776
|
+
return this.format(ti(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
|
|
1771
1777
|
};
|
|
1772
1778
|
this.resetRegExp(), !this.escapeValue && typeof e6 == `string` && /\$t\([^)]*\{[^}]*\{\{/.test(e6) && this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false \u2014 if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);
|
|
1773
1779
|
let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
|
|
@@ -1777,15 +1783,15 @@ var ti = class {
|
|
|
1777
1783
|
if (a2 = c2(n3), a2 === void 0) {
|
|
1778
1784
|
if (typeof l2 == `function`) {
|
|
1779
1785
|
let t4 = l2(e6, i2, r2);
|
|
1780
|
-
a2 =
|
|
1786
|
+
a2 = F(t4) ? t4 : ``;
|
|
1781
1787
|
} else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
|
|
1782
1788
|
else if (u2) {
|
|
1783
1789
|
a2 = i2[0];
|
|
1784
1790
|
continue;
|
|
1785
1791
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
|
|
1786
|
-
} else !
|
|
1792
|
+
} else !F(a2) && !this.useRawValueToEscape && (a2 = Cr(a2));
|
|
1787
1793
|
let s3 = t3.safeValue(a2);
|
|
1788
|
-
if (e6 = e6.replace(i2[0],
|
|
1794
|
+
if (e6 = e6.replace(i2[0], ni(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
|
|
1789
1795
|
}
|
|
1790
1796
|
}), e6;
|
|
1791
1797
|
}
|
|
@@ -1806,15 +1812,15 @@ var ti = class {
|
|
|
1806
1812
|
}, s2 = new RegExp(this.nestingRegexp), c2 = ``, l2 = 0;
|
|
1807
1813
|
for (; r2 = s2.exec(e6); ) {
|
|
1808
1814
|
let u2 = [];
|
|
1809
|
-
a2 = { ...n2 }, a2 = a2.replace && !
|
|
1815
|
+
a2 = { ...n2 }, a2 = a2.replace && !F(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
|
|
1810
1816
|
let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
|
|
1811
|
-
if (d2 !== -1 && (u2 = r2[1].slice(d2).split(this.formatSeparator).map((e7) => e7.trim()).filter(Boolean), r2[1] = r2[1].slice(0, d2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e6 && !
|
|
1812
|
-
|
|
1817
|
+
if (d2 !== -1 && (u2 = r2[1].slice(d2).split(this.formatSeparator).map((e7) => e7.trim()).filter(Boolean), r2[1] = r2[1].slice(0, d2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e6 && !F(i2)) return i2;
|
|
1818
|
+
F(i2) || (i2 = Cr(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e6}`), ``), u2.length && (i2 = u2.reduce((e7, t3) => this.format(e7, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), c2 += e6.slice(l2, r2.index) + Cr(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
|
|
1813
1819
|
}
|
|
1814
1820
|
return l2 ? c2 + e6.slice(l2) : e6;
|
|
1815
1821
|
}
|
|
1816
1822
|
};
|
|
1817
|
-
var
|
|
1823
|
+
var ii = (e6) => {
|
|
1818
1824
|
let t2 = e6.toLowerCase().trim(), n2 = {};
|
|
1819
1825
|
if (e6.includes(`(`)) {
|
|
1820
1826
|
let r2 = e6.split(`(`);
|
|
@@ -1829,23 +1835,23 @@ var ni = (e6) => {
|
|
|
1829
1835
|
}
|
|
1830
1836
|
return { formatName: t2, formatOptions: n2 };
|
|
1831
1837
|
};
|
|
1832
|
-
var
|
|
1838
|
+
var ai = (e6) => {
|
|
1833
1839
|
let t2 = {};
|
|
1834
1840
|
return (n2, r2, i2) => {
|
|
1835
1841
|
let a2 = i2;
|
|
1836
1842
|
i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
|
|
1837
1843
|
let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
|
|
1838
|
-
return s2 || (s2 = e6(
|
|
1844
|
+
return s2 || (s2 = e6(Vr(r2), i2), t2[o2] = s2), s2(n2);
|
|
1839
1845
|
};
|
|
1840
1846
|
};
|
|
1841
|
-
var
|
|
1842
|
-
var
|
|
1847
|
+
var oi = (e6) => (t2, n2, r2) => e6(Vr(n2), r2)(t2);
|
|
1848
|
+
var si = class {
|
|
1843
1849
|
constructor(e6 = {}) {
|
|
1844
|
-
this.logger =
|
|
1850
|
+
this.logger = R.create(`formatter`), this.options = e6, this.init(e6);
|
|
1845
1851
|
}
|
|
1846
1852
|
init(e6, t2 = { interpolation: {} }) {
|
|
1847
1853
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
1848
|
-
let n2 = t2.cacheInBuiltFormats ?
|
|
1854
|
+
let n2 = t2.cacheInBuiltFormats ? ai : oi;
|
|
1849
1855
|
this.formats = { number: n2((e7, t3) => {
|
|
1850
1856
|
let n3 = new Intl.NumberFormat(e7, { ...t3 });
|
|
1851
1857
|
return (e8) => n3.format(e8);
|
|
@@ -1867,7 +1873,7 @@ var ai = class {
|
|
|
1867
1873
|
this.formats[e6.toLowerCase().trim()] = t2;
|
|
1868
1874
|
}
|
|
1869
1875
|
addCached(e6, t2) {
|
|
1870
|
-
this.formats[e6.toLowerCase().trim()] =
|
|
1876
|
+
this.formats[e6.toLowerCase().trim()] = ai(t2);
|
|
1871
1877
|
}
|
|
1872
1878
|
format(e6, t2, n2, r2 = {}) {
|
|
1873
1879
|
if (!t2 || e6 == null) return e6;
|
|
@@ -1878,7 +1884,7 @@ var ai = class {
|
|
|
1878
1884
|
a2.push(t3);
|
|
1879
1885
|
}
|
|
1880
1886
|
return a2.reduce((e7, t3) => {
|
|
1881
|
-
let { formatName: i3, formatOptions: a3 } =
|
|
1887
|
+
let { formatName: i3, formatOptions: a3 } = ii(t3);
|
|
1882
1888
|
if (this.formats[i3]) {
|
|
1883
1889
|
let t4 = e7;
|
|
1884
1890
|
try {
|
|
@@ -1893,12 +1899,12 @@ var ai = class {
|
|
|
1893
1899
|
}, e6);
|
|
1894
1900
|
}
|
|
1895
1901
|
};
|
|
1896
|
-
var
|
|
1902
|
+
var ci = (e6, t2) => {
|
|
1897
1903
|
e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
|
|
1898
1904
|
};
|
|
1899
|
-
var
|
|
1905
|
+
var li = class extends Ur {
|
|
1900
1906
|
constructor(e6, t2, n2, r2 = {}) {
|
|
1901
|
-
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger =
|
|
1907
|
+
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = R.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);
|
|
1902
1908
|
}
|
|
1903
1909
|
queueLoad(e6, t2, n2, r2) {
|
|
1904
1910
|
let i2 = {}, a2 = {}, o2 = {}, s2 = {};
|
|
@@ -1915,7 +1921,7 @@ var si = class extends Vr {
|
|
|
1915
1921
|
t2 && this.emit(`failedLoading`, i2, a2, t2), !t2 && n2 && this.store.addResourceBundle(i2, a2, n2, void 0, void 0, { skipCopy: true }), this.state[e6] = t2 ? -1 : 2, t2 && n2 && (this.state[e6] = 0);
|
|
1916
1922
|
let o2 = {};
|
|
1917
1923
|
this.queue.forEach((n3) => {
|
|
1918
|
-
|
|
1924
|
+
Ar(n3.loaded, [i2], a2), ci(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
|
|
1919
1925
|
o2[e7] || (o2[e7] = {});
|
|
1920
1926
|
let t3 = n3.loaded[e7];
|
|
1921
1927
|
t3.length && t3.forEach((t4) => {
|
|
@@ -1950,7 +1956,7 @@ var si = class extends Vr {
|
|
|
1950
1956
|
}
|
|
1951
1957
|
prepareLoading(e6, t2, n2 = {}, r2) {
|
|
1952
1958
|
if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
|
|
1953
|
-
|
|
1959
|
+
F(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), F(t2) && (t2 = [t2]);
|
|
1954
1960
|
let i2 = this.queueLoad(e6, t2, n2, r2);
|
|
1955
1961
|
if (!i2.toLoad.length) return i2.pending.length || r2(), null;
|
|
1956
1962
|
i2.toLoad.forEach((e7) => {
|
|
@@ -1987,9 +1993,9 @@ var si = class extends Vr {
|
|
|
1987
1993
|
}
|
|
1988
1994
|
}
|
|
1989
1995
|
};
|
|
1990
|
-
var
|
|
1996
|
+
var ui = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, enableSelector: false, 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: (e6) => {
|
|
1991
1997
|
let t2 = {};
|
|
1992
|
-
if (typeof e6[1] == `object` && (t2 = e6[1]),
|
|
1998
|
+
if (typeof e6[1] == `object` && (t2 = e6[1]), F(e6[1]) && (t2.defaultValue = e6[1]), F(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
|
|
1993
1999
|
let n2 = e6[3] || e6[2];
|
|
1994
2000
|
Object.keys(n2).forEach((e7) => {
|
|
1995
2001
|
t2[e7] = n2[e7];
|
|
@@ -1997,17 +2003,17 @@ var ci = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
1997
2003
|
}
|
|
1998
2004
|
return t2;
|
|
1999
2005
|
}, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
2000
|
-
var
|
|
2001
|
-
var
|
|
2006
|
+
var di = (e6) => (F(e6.ns) && (e6.ns = [e6.ns]), F(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), F(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
|
|
2007
|
+
var fi = () => {
|
|
2002
2008
|
};
|
|
2003
|
-
var
|
|
2009
|
+
var pi = (e6) => {
|
|
2004
2010
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
|
|
2005
2011
|
typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
|
|
2006
2012
|
});
|
|
2007
2013
|
};
|
|
2008
|
-
var
|
|
2014
|
+
var B = class e4 extends Ur {
|
|
2009
2015
|
constructor(e6 = {}, t2) {
|
|
2010
|
-
if (super(), this.options =
|
|
2016
|
+
if (super(), this.options = di(e6), this.services = {}, this.logger = R, this.modules = { external: [] }, pi(this), t2 && !this.isInitialized && !e6.isClone) {
|
|
2011
2017
|
if (!this.options.initAsync) return this.init(e6, t2), this;
|
|
2012
2018
|
setTimeout(() => {
|
|
2013
2019
|
this.init(e6, t2);
|
|
@@ -2015,26 +2021,26 @@ var V = class e4 extends Vr {
|
|
|
2015
2021
|
}
|
|
2016
2022
|
}
|
|
2017
2023
|
init(e6 = {}, t2) {
|
|
2018
|
-
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (
|
|
2019
|
-
let n2 =
|
|
2020
|
-
this.options = { ...n2, ...this.options, ...
|
|
2024
|
+
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (F(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
|
|
2025
|
+
let n2 = ui();
|
|
2026
|
+
this.options = { ...n2, ...this.options, ...di(e6) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e6.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e6.keySeparator), e6.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e6.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler);
|
|
2021
2027
|
let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
|
|
2022
2028
|
if (!this.options.isClone) {
|
|
2023
|
-
this.modules.logger ?
|
|
2029
|
+
this.modules.logger ? R.init(r2(this.modules.logger), this.options) : R.init(null, this.options);
|
|
2024
2030
|
let e7;
|
|
2025
|
-
e7 = this.modules.formatter ? this.modules.formatter :
|
|
2026
|
-
let t3 = new
|
|
2027
|
-
this.store = new
|
|
2031
|
+
e7 = this.modules.formatter ? this.modules.formatter : si;
|
|
2032
|
+
let t3 = new Zr(this.options);
|
|
2033
|
+
this.store = new Gr(this.options.resources, this.options);
|
|
2028
2034
|
let n3 = this.services;
|
|
2029
|
-
n3.logger =
|
|
2035
|
+
n3.logger = R, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new ei(t3, { prepend: this.options.pluralSeparator }), e7 && (n3.formatter = r2(e7), n3.formatter.init && n3.formatter.init(n3, this.options), this.options.interpolation.format = n3.formatter.format.bind(n3.formatter)), n3.interpolator = new ri(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new li(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
|
|
2030
2036
|
this.emit(e8, ...t4);
|
|
2031
|
-
}), this.modules.languageDetector && (n3.languageDetector = r2(this.modules.languageDetector), n3.languageDetector.init && n3.languageDetector.init(n3, this.options.detection, this.options)), this.modules.i18nFormat && (n3.i18nFormat = r2(this.modules.i18nFormat), n3.i18nFormat.init && n3.i18nFormat.init(this)), this.translator = new
|
|
2037
|
+
}), this.modules.languageDetector && (n3.languageDetector = r2(this.modules.languageDetector), n3.languageDetector.init && n3.languageDetector.init(n3, this.options.detection, this.options)), this.modules.i18nFormat && (n3.i18nFormat = r2(this.modules.i18nFormat), n3.i18nFormat.init && n3.i18nFormat.init(this)), this.translator = new Xr(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
|
|
2032
2038
|
this.emit(e8, ...t4);
|
|
2033
2039
|
}), this.modules.external.forEach((e8) => {
|
|
2034
2040
|
e8.init && e8.init(this);
|
|
2035
2041
|
});
|
|
2036
2042
|
}
|
|
2037
|
-
if (this.format = this.options.interpolation.format, t2 ||=
|
|
2043
|
+
if (this.format = this.options.interpolation.format, t2 ||= fi, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
2038
2044
|
let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
2039
2045
|
e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
|
|
2040
2046
|
}
|
|
@@ -2043,7 +2049,7 @@ var V = class e4 extends Vr {
|
|
|
2043
2049
|
}), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e7) => {
|
|
2044
2050
|
this[e7] = (...t3) => (this.store[e7](...t3), this);
|
|
2045
2051
|
});
|
|
2046
|
-
let i2 =
|
|
2052
|
+
let i2 = I(), a2 = () => {
|
|
2047
2053
|
let e7 = (e8, n3) => {
|
|
2048
2054
|
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(e8, n3);
|
|
2049
2055
|
};
|
|
@@ -2052,8 +2058,8 @@ var V = class e4 extends Vr {
|
|
|
2052
2058
|
};
|
|
2053
2059
|
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
2054
2060
|
}
|
|
2055
|
-
loadResources(e6, t2 =
|
|
2056
|
-
let n2 = t2, r2 =
|
|
2061
|
+
loadResources(e6, t2 = fi) {
|
|
2062
|
+
let n2 = t2, r2 = F(e6) ? e6 : this.language;
|
|
2057
2063
|
if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2058
2064
|
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
2059
2065
|
let e7 = [], t3 = (t4) => {
|
|
@@ -2067,15 +2073,15 @@ var V = class e4 extends Vr {
|
|
|
2067
2073
|
} else n2(null);
|
|
2068
2074
|
}
|
|
2069
2075
|
reloadResources(e6, t2, n2) {
|
|
2070
|
-
let r2 =
|
|
2071
|
-
return typeof e6 == `function` && (n2 = e6, e6 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e6 ||= this.languages, t2 ||= this.options.ns, n2 ||=
|
|
2076
|
+
let r2 = I();
|
|
2077
|
+
return typeof e6 == `function` && (n2 = e6, e6 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e6 ||= this.languages, t2 ||= this.options.ns, n2 ||= fi, this.services.backendConnector.reload(e6, t2, (e7) => {
|
|
2072
2078
|
r2.resolve(), n2(e7);
|
|
2073
2079
|
}), r2;
|
|
2074
2080
|
}
|
|
2075
2081
|
use(e6) {
|
|
2076
2082
|
if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
|
|
2077
2083
|
if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
|
|
2078
|
-
return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` &&
|
|
2084
|
+
return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` && Kr.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
|
|
2079
2085
|
}
|
|
2080
2086
|
setResolvedLanguage(e6) {
|
|
2081
2087
|
if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
|
|
@@ -2091,7 +2097,7 @@ var V = class e4 extends Vr {
|
|
|
2091
2097
|
}
|
|
2092
2098
|
changeLanguage(e6, t2) {
|
|
2093
2099
|
this.isLanguageChangingTo = e6;
|
|
2094
|
-
let n2 =
|
|
2100
|
+
let n2 = I();
|
|
2095
2101
|
this.emit(`languageChanging`, e6);
|
|
2096
2102
|
let r2 = (e7) => {
|
|
2097
2103
|
this.language = e7, this.languages = this.services.languageUtils.toResolveHierarchy(e7), this.resolvedLanguage = void 0, this.setResolvedLanguage(e7);
|
|
@@ -2099,7 +2105,7 @@ var V = class e4 extends Vr {
|
|
|
2099
2105
|
a3 ? this.isLanguageChangingTo === e6 && (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((...e7) => this.t(...e7)), t2 && t2(i3, (...e7) => this.t(...e7));
|
|
2100
2106
|
}, a2 = (t3) => {
|
|
2101
2107
|
!e6 && !t3 && this.services.languageDetector && (t3 = []);
|
|
2102
|
-
let n3 =
|
|
2108
|
+
let n3 = F(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(F(t3) ? [t3] : t3);
|
|
2103
2109
|
a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e7) => {
|
|
2104
2110
|
i2(e7, a3);
|
|
2105
2111
|
});
|
|
@@ -2113,11 +2119,11 @@ var V = class e4 extends Vr {
|
|
|
2113
2119
|
let s2 = o2.ns !== void 0 && o2.ns !== null;
|
|
2114
2120
|
o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
|
|
2115
2121
|
let c2 = { ...this.options, ...o2 };
|
|
2116
|
-
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix =
|
|
2122
|
+
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = z(o2.keyPrefix, c2));
|
|
2117
2123
|
let l2 = this.options.keySeparator || `.`, u2;
|
|
2118
|
-
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 =
|
|
2124
|
+
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = z(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = z(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
|
|
2119
2125
|
};
|
|
2120
|
-
return
|
|
2126
|
+
return F(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
|
|
2121
2127
|
}
|
|
2122
2128
|
t(...e6) {
|
|
2123
2129
|
return this.translator?.translate(...e6);
|
|
@@ -2146,16 +2152,16 @@ var V = class e4 extends Vr {
|
|
|
2146
2152
|
return !(s2 && !a2(s2, e6) || r2 && !a2(i2, e6));
|
|
2147
2153
|
}
|
|
2148
2154
|
loadNamespaces(e6, t2) {
|
|
2149
|
-
let n2 =
|
|
2150
|
-
return this.options.ns ? (
|
|
2155
|
+
let n2 = I();
|
|
2156
|
+
return this.options.ns ? (F(e6) && (e6 = [e6]), e6.forEach((e7) => {
|
|
2151
2157
|
this.options.ns.includes(e7) || this.options.ns.push(e7);
|
|
2152
2158
|
}), this.loadResources((e7) => {
|
|
2153
2159
|
n2.resolve(), t2 && t2(e7);
|
|
2154
2160
|
}), n2) : (t2 && t2(), Promise.resolve());
|
|
2155
2161
|
}
|
|
2156
2162
|
loadLanguages(e6, t2) {
|
|
2157
|
-
let n2 =
|
|
2158
|
-
|
|
2163
|
+
let n2 = I();
|
|
2164
|
+
F(e6) && (e6 = [e6]);
|
|
2159
2165
|
let r2 = this.options.preload || [], i2 = e6.filter((e7) => !r2.includes(e7) && this.services.languageUtils.isSupportedCode(e7));
|
|
2160
2166
|
return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e7) => {
|
|
2161
2167
|
n2.resolve(), t2 && t2(e7);
|
|
@@ -2171,24 +2177,24 @@ var V = class e4 extends Vr {
|
|
|
2171
2177
|
}
|
|
2172
2178
|
} catch {
|
|
2173
2179
|
}
|
|
2174
|
-
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
|
|
2180
|
+
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 Zr(ui());
|
|
2175
2181
|
return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
|
|
2176
2182
|
}
|
|
2177
2183
|
static createInstance(t2 = {}, n2) {
|
|
2178
2184
|
let r2 = new e4(t2, n2);
|
|
2179
2185
|
return r2.createInstance = e4.createInstance, r2;
|
|
2180
2186
|
}
|
|
2181
|
-
cloneInstance(t2 = {}, n2 =
|
|
2187
|
+
cloneInstance(t2 = {}, n2 = fi) {
|
|
2182
2188
|
let r2 = t2.forkResourceStore;
|
|
2183
2189
|
r2 && delete t2.forkResourceStore;
|
|
2184
2190
|
let i2 = { ...this.options, preload: false, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2185
2191
|
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
|
|
2186
2192
|
a2[e6] = this[e6];
|
|
2187
|
-
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new
|
|
2188
|
-
let e6 = { ...
|
|
2189
|
-
a2.services.interpolator = new
|
|
2193
|
+
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Gr(Object.keys(this.store.data).reduce((e6, t3) => (e6[t3] = { ...this.store.data[t3] }, e6[t3] = Object.keys(e6[t3]).reduce((n3, r3) => (n3[r3] = { ...e6[t3][r3] }, n3), e6[t3]), e6), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
|
|
2194
|
+
let e6 = { ...ui().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
|
|
2195
|
+
a2.services.interpolator = new ri(n3);
|
|
2190
2196
|
}
|
|
2191
|
-
return a2.translator = new
|
|
2197
|
+
return a2.translator = new Xr(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
|
|
2192
2198
|
a2.emit(e6, ...t3);
|
|
2193
2199
|
}), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
|
|
2194
2200
|
}
|
|
@@ -2196,9 +2202,9 @@ var V = class e4 extends Vr {
|
|
|
2196
2202
|
return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
|
|
2197
2203
|
}
|
|
2198
2204
|
}.createInstance();
|
|
2199
|
-
|
|
2200
|
-
var
|
|
2201
|
-
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 =
|
|
2205
|
+
B.createInstance, B.dir, B.init, B.loadResources, B.reloadResources, B.use, B.changeLanguage, B.getFixedT, B.t, B.exists, B.setDefaultNamespace, B.hasLoadedNamespace, B.loadNamespaces, B.loadLanguages;
|
|
2206
|
+
var mi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
|
|
2207
|
+
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = B.createInstance(i2 ? s2 : void 0);
|
|
2202
2208
|
return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
|
|
2203
2209
|
try {
|
|
2204
2210
|
return r3(null, await t2(e7));
|
|
@@ -2207,38 +2213,38 @@ var fi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
|
|
|
2207
2213
|
}
|
|
2208
2214
|
} }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
|
|
2209
2215
|
};
|
|
2210
|
-
function
|
|
2211
|
-
let n2 = t2 && t2.cache ? t2.cache :
|
|
2212
|
-
return (t2 && t2.strategy ? t2.strategy :
|
|
2216
|
+
function hi(e6, t2) {
|
|
2217
|
+
let n2 = t2 && t2.cache ? t2.cache : Ti, r2 = t2 && t2.serializer ? t2.serializer : Ci;
|
|
2218
|
+
return (t2 && t2.strategy ? t2.strategy : bi)(e6, { cache: n2, serializer: r2 });
|
|
2213
2219
|
}
|
|
2214
|
-
function
|
|
2220
|
+
function gi(e6) {
|
|
2215
2221
|
return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
|
|
2216
2222
|
}
|
|
2217
|
-
function
|
|
2218
|
-
let i2 =
|
|
2223
|
+
function _i(e6, t2, n2, r2) {
|
|
2224
|
+
let i2 = gi(r2) ? r2 : n2(r2), a2 = t2.get(i2);
|
|
2219
2225
|
return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
|
|
2220
2226
|
}
|
|
2221
|
-
function
|
|
2227
|
+
function vi(e6, t2, n2) {
|
|
2222
2228
|
let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
|
|
2223
2229
|
return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
|
|
2224
2230
|
}
|
|
2225
|
-
function
|
|
2231
|
+
function yi(e6, t2, n2, r2, i2) {
|
|
2226
2232
|
return n2.bind(t2, e6, r2, i2);
|
|
2227
2233
|
}
|
|
2228
|
-
function
|
|
2229
|
-
let n2 = e6.length === 1 ?
|
|
2230
|
-
return
|
|
2234
|
+
function bi(e6, t2) {
|
|
2235
|
+
let n2 = e6.length === 1 ? _i : vi;
|
|
2236
|
+
return yi(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2231
2237
|
}
|
|
2232
|
-
function
|
|
2233
|
-
return
|
|
2238
|
+
function xi(e6, t2) {
|
|
2239
|
+
return yi(e6, this, vi, t2.cache.create(), t2.serializer);
|
|
2234
2240
|
}
|
|
2235
|
-
function
|
|
2236
|
-
return
|
|
2241
|
+
function Si(e6, t2) {
|
|
2242
|
+
return yi(e6, this, _i, t2.cache.create(), t2.serializer);
|
|
2237
2243
|
}
|
|
2238
|
-
var
|
|
2244
|
+
var Ci = function() {
|
|
2239
2245
|
return JSON.stringify(arguments);
|
|
2240
2246
|
};
|
|
2241
|
-
var
|
|
2247
|
+
var wi = class {
|
|
2242
2248
|
constructor() {
|
|
2243
2249
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2244
2250
|
}
|
|
@@ -2249,14 +2255,14 @@ var Si = class {
|
|
|
2249
2255
|
this.cache[e6] = t2;
|
|
2250
2256
|
}
|
|
2251
2257
|
};
|
|
2252
|
-
var
|
|
2253
|
-
return new
|
|
2258
|
+
var Ti = { create: function() {
|
|
2259
|
+
return new wi();
|
|
2254
2260
|
} };
|
|
2255
|
-
var
|
|
2256
|
-
var
|
|
2257
|
-
function
|
|
2261
|
+
var Ei = { variadic: xi, monadic: Si };
|
|
2262
|
+
var Di = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
2263
|
+
function Oi(e6) {
|
|
2258
2264
|
let t2 = {};
|
|
2259
|
-
return e6.replace(
|
|
2265
|
+
return e6.replace(Di, (e7) => {
|
|
2260
2266
|
let n2 = e7.length;
|
|
2261
2267
|
switch (e7[0]) {
|
|
2262
2268
|
case `G`:
|
|
@@ -2343,10 +2349,10 @@ function Ei(e6) {
|
|
|
2343
2349
|
return ``;
|
|
2344
2350
|
}), t2;
|
|
2345
2351
|
}
|
|
2346
|
-
var
|
|
2347
|
-
function
|
|
2352
|
+
var ki = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
2353
|
+
function Ai(e6) {
|
|
2348
2354
|
if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
|
|
2349
|
-
let t2 = e6.split(
|
|
2355
|
+
let t2 = e6.split(ki).filter((e7) => e7.length > 0), n2 = [];
|
|
2350
2356
|
for (let e7 of t2) {
|
|
2351
2357
|
let t3 = e7.split(`/`);
|
|
2352
2358
|
if (t3.length === 0) throw Error(`Invalid number skeleton`);
|
|
@@ -2356,20 +2362,20 @@ function Oi(e6) {
|
|
|
2356
2362
|
}
|
|
2357
2363
|
return n2;
|
|
2358
2364
|
}
|
|
2359
|
-
function
|
|
2365
|
+
function ji(e6) {
|
|
2360
2366
|
return e6.replace(/^(.*?)-/, ``);
|
|
2361
2367
|
}
|
|
2362
|
-
var
|
|
2363
|
-
var
|
|
2364
|
-
var
|
|
2365
|
-
var
|
|
2366
|
-
function
|
|
2368
|
+
var Mi = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
2369
|
+
var Ni = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
2370
|
+
var Pi = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
2371
|
+
var Fi = /^(0+)$/;
|
|
2372
|
+
function Ii(e6) {
|
|
2367
2373
|
let t2 = {};
|
|
2368
|
-
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(
|
|
2374
|
+
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Ni, function(e7, n2, r2) {
|
|
2369
2375
|
return typeof r2 == `string` ? r2 === `+` ? t2.minimumSignificantDigits = n2.length : n2[0] === `#` ? t2.maximumSignificantDigits = n2.length : (t2.minimumSignificantDigits = n2.length, t2.maximumSignificantDigits = n2.length + (typeof r2 == `string` ? r2.length : 0)) : (t2.minimumSignificantDigits = n2.length, t2.maximumSignificantDigits = n2.length), ``;
|
|
2370
2376
|
}), t2;
|
|
2371
2377
|
}
|
|
2372
|
-
function
|
|
2378
|
+
function Li(e6) {
|
|
2373
2379
|
switch (e6) {
|
|
2374
2380
|
case `sign-auto`:
|
|
2375
2381
|
return { signDisplay: `auto` };
|
|
@@ -2393,19 +2399,19 @@ function Fi(e6) {
|
|
|
2393
2399
|
return { signDisplay: `never` };
|
|
2394
2400
|
}
|
|
2395
2401
|
}
|
|
2396
|
-
function
|
|
2402
|
+
function Ri(e6) {
|
|
2397
2403
|
let t2;
|
|
2398
2404
|
if (e6[0] === `E` && e6[1] === `E` ? (t2 = { notation: `engineering` }, e6 = e6.slice(2)) : e6[0] === `E` && (t2 = { notation: `scientific` }, e6 = e6.slice(1)), t2) {
|
|
2399
2405
|
let n2 = e6.slice(0, 2);
|
|
2400
|
-
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !
|
|
2406
|
+
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !Fi.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
|
|
2401
2407
|
t2.minimumIntegerDigits = e6.length;
|
|
2402
2408
|
}
|
|
2403
2409
|
return t2;
|
|
2404
2410
|
}
|
|
2405
|
-
function
|
|
2406
|
-
return
|
|
2411
|
+
function zi(e6) {
|
|
2412
|
+
return Li(e6) || {};
|
|
2407
2413
|
}
|
|
2408
|
-
function
|
|
2414
|
+
function Bi(e6) {
|
|
2409
2415
|
let t2 = {};
|
|
2410
2416
|
for (let n2 of e6) {
|
|
2411
2417
|
switch (n2.stem) {
|
|
@@ -2429,7 +2435,7 @@ function Ri(e6) {
|
|
|
2429
2435
|
continue;
|
|
2430
2436
|
case `measure-unit`:
|
|
2431
2437
|
case `unit`:
|
|
2432
|
-
t2.style = `unit`, t2.unit =
|
|
2438
|
+
t2.style = `unit`, t2.unit = ji(n2.options[0]);
|
|
2433
2439
|
continue;
|
|
2434
2440
|
case `compact-short`:
|
|
2435
2441
|
case `K`:
|
|
@@ -2440,10 +2446,10 @@ function Ri(e6) {
|
|
|
2440
2446
|
t2.notation = `compact`, t2.compactDisplay = `long`;
|
|
2441
2447
|
continue;
|
|
2442
2448
|
case `scientific`:
|
|
2443
|
-
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2449
|
+
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...zi(t3) }), {}) };
|
|
2444
2450
|
continue;
|
|
2445
2451
|
case `engineering`:
|
|
2446
|
-
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2452
|
+
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...zi(t3) }), {}) };
|
|
2447
2453
|
continue;
|
|
2448
2454
|
case `notation-simple`:
|
|
2449
2455
|
t2.notation = `standard`;
|
|
@@ -2486,7 +2492,7 @@ function Ri(e6) {
|
|
|
2486
2492
|
continue;
|
|
2487
2493
|
case `integer-width`:
|
|
2488
2494
|
if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
|
|
2489
|
-
n2.options[0].replace(
|
|
2495
|
+
n2.options[0].replace(Pi, function(e8, n3, r3, i2, a2, o2) {
|
|
2490
2496
|
if (n3) t2.minimumIntegerDigits = r3.length;
|
|
2491
2497
|
else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
|
|
2492
2498
|
else if (o2) throw Error(`We currently do not support exact integer digits`);
|
|
@@ -2494,83 +2500,83 @@ function Ri(e6) {
|
|
|
2494
2500
|
});
|
|
2495
2501
|
continue;
|
|
2496
2502
|
}
|
|
2497
|
-
if (
|
|
2503
|
+
if (Fi.test(n2.stem)) {
|
|
2498
2504
|
t2.minimumIntegerDigits = n2.stem.length;
|
|
2499
2505
|
continue;
|
|
2500
2506
|
}
|
|
2501
|
-
if (
|
|
2507
|
+
if (Mi.test(n2.stem)) {
|
|
2502
2508
|
if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
|
|
2503
|
-
n2.stem.replace(
|
|
2509
|
+
n2.stem.replace(Mi, function(e9, n3, r3, i2, a2, o2) {
|
|
2504
2510
|
return r3 === `*` ? t2.minimumFractionDigits = n3.length : i2 && i2[0] === `#` ? t2.maximumFractionDigits = i2.length : a2 && o2 ? (t2.minimumFractionDigits = a2.length, t2.maximumFractionDigits = a2.length + o2.length) : (t2.minimumFractionDigits = n3.length, t2.maximumFractionDigits = n3.length), ``;
|
|
2505
2511
|
});
|
|
2506
2512
|
let e8 = n2.options[0];
|
|
2507
|
-
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...
|
|
2513
|
+
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...Ii(e8) });
|
|
2508
2514
|
continue;
|
|
2509
2515
|
}
|
|
2510
|
-
if (
|
|
2511
|
-
t2 = { ...t2, ...
|
|
2516
|
+
if (Ni.test(n2.stem)) {
|
|
2517
|
+
t2 = { ...t2, ...Ii(n2.stem) };
|
|
2512
2518
|
continue;
|
|
2513
2519
|
}
|
|
2514
|
-
let e7 =
|
|
2520
|
+
let e7 = Li(n2.stem);
|
|
2515
2521
|
e7 && (t2 = { ...t2, ...e7 });
|
|
2516
|
-
let r2 =
|
|
2522
|
+
let r2 = Ri(n2.stem);
|
|
2517
2523
|
r2 && (t2 = { ...t2, ...r2 });
|
|
2518
2524
|
}
|
|
2519
2525
|
return t2;
|
|
2520
2526
|
}
|
|
2521
|
-
var
|
|
2527
|
+
var Vi = function(e6) {
|
|
2522
2528
|
return e6[e6.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = `EXPECT_ARGUMENT_CLOSING_BRACE`, e6[e6.EMPTY_ARGUMENT = 2] = `EMPTY_ARGUMENT`, e6[e6.MALFORMED_ARGUMENT = 3] = `MALFORMED_ARGUMENT`, e6[e6.EXPECT_ARGUMENT_TYPE = 4] = `EXPECT_ARGUMENT_TYPE`, e6[e6.INVALID_ARGUMENT_TYPE = 5] = `INVALID_ARGUMENT_TYPE`, e6[e6.EXPECT_ARGUMENT_STYLE = 6] = `EXPECT_ARGUMENT_STYLE`, e6[e6.INVALID_NUMBER_SKELETON = 7] = `INVALID_NUMBER_SKELETON`, e6[e6.INVALID_DATE_TIME_SKELETON = 8] = `INVALID_DATE_TIME_SKELETON`, e6[e6.EXPECT_NUMBER_SKELETON = 9] = `EXPECT_NUMBER_SKELETON`, e6[e6.EXPECT_DATE_TIME_SKELETON = 10] = `EXPECT_DATE_TIME_SKELETON`, e6[e6.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = `UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`, e6[e6.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = `EXPECT_SELECT_ARGUMENT_OPTIONS`, e6[e6.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = `EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`, e6[e6.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = `INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`, e6[e6.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = `EXPECT_SELECT_ARGUMENT_SELECTOR`, e6[e6.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = `EXPECT_PLURAL_ARGUMENT_SELECTOR`, e6[e6.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = `EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`, e6[e6.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = `EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`, e6[e6.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = `INVALID_PLURAL_ARGUMENT_SELECTOR`, e6[e6.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = `DUPLICATE_PLURAL_ARGUMENT_SELECTOR`, e6[e6.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = `DUPLICATE_SELECT_ARGUMENT_SELECTOR`, e6[e6.MISSING_OTHER_CLAUSE = 22] = `MISSING_OTHER_CLAUSE`, e6[e6.INVALID_TAG = 23] = `INVALID_TAG`, e6[e6.INVALID_TAG_NAME = 25] = `INVALID_TAG_NAME`, e6[e6.UNMATCHED_CLOSING_TAG = 26] = `UNMATCHED_CLOSING_TAG`, e6[e6.UNCLOSED_TAG = 27] = `UNCLOSED_TAG`, e6;
|
|
2523
2529
|
}({});
|
|
2524
|
-
function
|
|
2530
|
+
function Hi(e6) {
|
|
2525
2531
|
return e6.type === 0;
|
|
2526
2532
|
}
|
|
2527
|
-
function
|
|
2533
|
+
function Ui(e6) {
|
|
2528
2534
|
return e6.type === 1;
|
|
2529
2535
|
}
|
|
2530
|
-
function
|
|
2536
|
+
function Wi(e6) {
|
|
2531
2537
|
return e6.type === 2;
|
|
2532
2538
|
}
|
|
2533
|
-
function
|
|
2539
|
+
function Gi(e6) {
|
|
2534
2540
|
return e6.type === 3;
|
|
2535
2541
|
}
|
|
2536
|
-
function
|
|
2542
|
+
function Ki(e6) {
|
|
2537
2543
|
return e6.type === 4;
|
|
2538
2544
|
}
|
|
2539
|
-
function
|
|
2545
|
+
function qi(e6) {
|
|
2540
2546
|
return e6.type === 5;
|
|
2541
2547
|
}
|
|
2542
|
-
function
|
|
2548
|
+
function Ji(e6) {
|
|
2543
2549
|
return e6.type === 6;
|
|
2544
2550
|
}
|
|
2545
|
-
function
|
|
2551
|
+
function Yi(e6) {
|
|
2546
2552
|
return e6.type === 7;
|
|
2547
2553
|
}
|
|
2548
|
-
function
|
|
2554
|
+
function Xi(e6) {
|
|
2549
2555
|
return e6.type === 8;
|
|
2550
2556
|
}
|
|
2551
|
-
function
|
|
2557
|
+
function Zi(e6) {
|
|
2552
2558
|
return !!(e6 && typeof e6 == `object` && e6.type === 0);
|
|
2553
2559
|
}
|
|
2554
|
-
function
|
|
2560
|
+
function Qi(e6) {
|
|
2555
2561
|
return !!(e6 && typeof e6 == `object` && e6.type === 1);
|
|
2556
2562
|
}
|
|
2557
|
-
var
|
|
2558
|
-
var
|
|
2559
|
-
function
|
|
2563
|
+
var $i = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
2564
|
+
var V = { "001": [`H`, `h`], 419: [`h`, `H`, `hB`, `hb`], AC: [`H`, `h`, `hb`, `hB`], AD: [`H`, `hB`], AE: [`h`, `hB`, `hb`, `H`], AF: [`H`, `hb`, `hB`, `h`], AG: [`h`, `hb`, `H`, `hB`], AI: [`H`, `h`, `hb`, `hB`], AL: [`h`, `H`, `hB`], AM: [`H`, `hB`], AO: [`H`, `hB`], AR: [`h`, `H`, `hB`, `hb`], AS: [`h`, `H`], AT: [`H`, `hB`], AU: [`h`, `hb`, `H`, `hB`], AW: [`H`, `hB`], AX: [`H`], AZ: [`H`, `hB`, `h`], BA: [`H`, `hB`, `h`], BB: [`h`, `hb`, `H`, `hB`], BD: [`h`, `hB`, `H`], BE: [`H`, `hB`], BF: [`H`, `hB`], BG: [`H`, `hB`, `h`], BH: [`h`, `hB`, `hb`, `H`], BI: [`H`, `h`], BJ: [`H`, `hB`], BL: [`H`, `hB`], BM: [`h`, `hb`, `H`, `hB`], BN: [`hb`, `hB`, `h`, `H`], BO: [`h`, `H`, `hB`, `hb`], BQ: [`H`], BR: [`H`, `hB`], BS: [`h`, `hb`, `H`, `hB`], BT: [`h`, `H`], BW: [`H`, `h`, `hb`, `hB`], BY: [`H`, `h`], BZ: [`H`, `h`, `hb`, `hB`], CA: [`h`, `hb`, `H`, `hB`], CC: [`H`, `h`, `hb`, `hB`], CD: [`hB`, `H`], CF: [`H`, `h`, `hB`], CG: [`H`, `hB`], CH: [`H`, `hB`, `h`], CI: [`H`, `hB`], CK: [`H`, `h`, `hb`, `hB`], CL: [`h`, `H`, `hB`, `hb`], CM: [`H`, `h`, `hB`], CN: [`H`, `hB`, `hb`, `h`], CO: [`h`, `H`, `hB`, `hb`], CP: [`H`], CR: [`h`, `H`, `hB`, `hb`], CU: [`h`, `H`, `hB`, `hb`], CV: [`H`, `hB`], CW: [`H`, `hB`], CX: [`H`, `h`, `hb`, `hB`], CY: [`h`, `H`, `hb`, `hB`], CZ: [`H`], DE: [`H`, `hB`], DG: [`H`, `h`, `hb`, `hB`], DJ: [`h`, `H`], DK: [`H`], DM: [`h`, `hb`, `H`, `hB`], DO: [`h`, `H`, `hB`, `hb`], DZ: [`h`, `hB`, `hb`, `H`], EA: [`H`, `h`, `hB`, `hb`], EC: [`h`, `H`, `hB`, `hb`], EE: [`H`, `hB`], EG: [`h`, `hB`, `hb`, `H`], EH: [`h`, `hB`, `hb`, `H`], ER: [`h`, `H`], ES: [`H`, `hB`, `h`, `hb`], ET: [`hB`, `hb`, `h`, `H`], FI: [`H`], FJ: [`h`, `hb`, `H`, `hB`], FK: [`H`, `h`, `hb`, `hB`], FM: [`h`, `hb`, `H`, `hB`], FO: [`H`, `h`], FR: [`H`, `hB`], GA: [`H`, `hB`], GB: [`H`, `h`, `hb`, `hB`], GD: [`h`, `hb`, `H`, `hB`], GE: [`H`, `hB`, `h`], GF: [`H`, `hB`], GG: [`H`, `h`, `hb`, `hB`], GH: [`h`, `H`], GI: [`H`, `h`, `hb`, `hB`], GL: [`H`, `h`], GM: [`h`, `hb`, `H`, `hB`], GN: [`H`, `hB`], GP: [`H`, `hB`], GQ: [`H`, `hB`, `h`, `hb`], GR: [`h`, `H`, `hb`, `hB`], GS: [`H`, `h`, `hb`, `hB`], GT: [`h`, `H`, `hB`, `hb`], GU: [`h`, `hb`, `H`, `hB`], GW: [`H`, `hB`], GY: [`h`, `hb`, `H`, `hB`], HK: [`h`, `hB`, `hb`, `H`], HN: [`h`, `H`, `hB`, `hb`], HR: [`H`, `hB`], HU: [`H`, `h`], IC: [`H`, `h`, `hB`, `hb`], ID: [`H`], IE: [`H`, `h`, `hb`, `hB`], IL: [`H`, `hB`], IM: [`H`, `h`, `hb`, `hB`], IN: [`h`, `H`], IO: [`H`, `h`, `hb`, `hB`], IQ: [`h`, `hB`, `hb`, `H`], IR: [`hB`, `H`], IS: [`H`], IT: [`H`, `hB`], JE: [`H`, `h`, `hb`, `hB`], JM: [`h`, `hb`, `H`, `hB`], JO: [`h`, `hB`, `hb`, `H`], JP: [`H`, `K`, `h`], KE: [`hB`, `hb`, `H`, `h`], KG: [`H`, `h`, `hB`, `hb`], KH: [`hB`, `h`, `H`, `hb`], KI: [`h`, `hb`, `H`, `hB`], KM: [`H`, `h`, `hB`, `hb`], KN: [`h`, `hb`, `H`, `hB`], KP: [`h`, `H`, `hB`, `hb`], KR: [`h`, `H`, `hB`, `hb`], KW: [`h`, `hB`, `hb`, `H`], KY: [`h`, `hb`, `H`, `hB`], KZ: [`H`, `hB`], LA: [`H`, `hb`, `hB`, `h`], LB: [`h`, `hB`, `hb`, `H`], LC: [`h`, `hb`, `H`, `hB`], LI: [`H`, `hB`, `h`], LK: [`H`, `h`, `hB`, `hb`], LR: [`h`, `hb`, `H`, `hB`], LS: [`h`, `H`], LT: [`H`, `h`, `hb`, `hB`], LU: [`H`, `h`, `hB`], LV: [`H`, `hB`, `hb`, `h`], LY: [`h`, `hB`, `hb`, `H`], MA: [`H`, `h`, `hB`, `hb`], MC: [`H`, `hB`], MD: [`H`, `hB`], ME: [`H`, `hB`, `h`], MF: [`H`, `hB`], MG: [`H`, `h`], MH: [`h`, `hb`, `H`, `hB`], MK: [`H`, `h`, `hb`, `hB`], ML: [`H`], MM: [`hB`, `hb`, `H`, `h`], MN: [`H`, `h`, `hb`, `hB`], MO: [`h`, `hB`, `hb`, `H`], MP: [`h`, `hb`, `H`, `hB`], MQ: [`H`, `hB`], MR: [`h`, `hB`, `hb`, `H`], MS: [`H`, `h`, `hb`, `hB`], MT: [`H`, `h`], MU: [`H`, `h`], MV: [`H`, `h`], MW: [`h`, `hb`, `H`, `hB`], MX: [`h`, `H`, `hB`, `hb`], MY: [`hb`, `hB`, `h`, `H`], MZ: [`H`, `hB`], NA: [`h`, `H`, `hB`, `hb`], NC: [`H`, `hB`], NE: [`H`], NF: [`H`, `h`, `hb`, `hB`], NG: [`H`, `h`, `hb`, `hB`], NI: [`h`, `H`, `hB`, `hb`], NL: [`H`, `hB`], NO: [`H`, `h`], NP: [`H`, `h`, `hB`], NR: [`H`, `h`, `hb`, `hB`], NU: [`H`, `h`, `hb`, `hB`], NZ: [`h`, `hb`, `H`, `hB`], OM: [`h`, `hB`, `hb`, `H`], PA: [`h`, `H`, `hB`, `hb`], PE: [`h`, `H`, `hB`, `hb`], PF: [`H`, `h`, `hB`], PG: [`h`, `H`], PH: [`h`, `hB`, `hb`, `H`], PK: [`h`, `hB`, `H`], PL: [`H`, `h`], PM: [`H`, `hB`], PN: [`H`, `h`, `hb`, `hB`], PR: [`h`, `H`, `hB`, `hb`], PS: [`h`, `hB`, `hb`, `H`], PT: [`H`, `hB`], PW: [`h`, `H`], PY: [`h`, `H`, `hB`, `hb`], QA: [`h`, `hB`, `hb`, `H`], RE: [`H`, `hB`], RO: [`H`, `hB`], RS: [`H`, `hB`, `h`], RU: [`H`], RW: [`H`, `h`], SA: [`h`, `hB`, `hb`, `H`], SB: [`h`, `hb`, `H`, `hB`], SC: [`H`, `h`, `hB`], SD: [`h`, `hB`, `hb`, `H`], SE: [`H`], SG: [`h`, `hb`, `H`, `hB`], SH: [`H`, `h`, `hb`, `hB`], SI: [`H`, `hB`], SJ: [`H`], SK: [`H`], SL: [`h`, `hb`, `H`, `hB`], SM: [`H`, `h`, `hB`], SN: [`H`, `h`, `hB`], SO: [`h`, `H`], SR: [`H`, `hB`], SS: [`h`, `hb`, `H`, `hB`], ST: [`H`, `hB`], SV: [`h`, `H`, `hB`, `hb`], SX: [`H`, `h`, `hb`, `hB`], SY: [`h`, `hB`, `hb`, `H`], SZ: [`h`, `hb`, `H`, `hB`], TA: [`H`, `h`, `hb`, `hB`], TC: [`h`, `hb`, `H`, `hB`], TD: [`h`, `H`, `hB`], TF: [`H`, `h`, `hB`], TG: [`H`, `hB`], TH: [`H`, `h`], TJ: [`H`, `h`], TL: [`H`, `hB`, `hb`, `h`], TM: [`H`, `h`], TN: [`h`, `hB`, `hb`, `H`], TO: [`h`, `H`], TR: [`H`, `hB`], TT: [`h`, `hb`, `H`, `hB`], TW: [`hB`, `hb`, `h`, `H`], TZ: [`hB`, `hb`, `H`, `h`], UA: [`H`, `hB`, `h`], UG: [`hB`, `hb`, `H`, `h`], UM: [`h`, `hb`, `H`, `hB`], US: [`h`, `hb`, `H`, `hB`], UY: [`h`, `H`, `hB`, `hb`], UZ: [`H`, `hB`, `h`], VA: [`H`, `h`, `hB`], VC: [`h`, `hb`, `H`, `hB`], VE: [`h`, `H`, `hB`, `hb`], VG: [`h`, `hb`, `H`, `hB`], VI: [`h`, `hb`, `H`, `hB`], VN: [`H`, `h`], VU: [`h`, `H`], WF: [`H`, `hB`], WS: [`h`, `H`], XK: [`H`, `hB`, `h`], YE: [`h`, `hB`, `hb`, `H`], YT: [`H`, `hB`], ZA: [`H`, `h`, `hb`, `hB`], ZM: [`h`, `hb`, `H`, `hB`], ZW: [`H`, `h`], "af-ZA": [`H`, `h`, `hB`, `hb`], "ar-001": [`h`, `hB`, `hb`, `H`], "ca-ES": [`H`, `h`, `hB`], "en-001": [`h`, `hb`, `H`, `hB`], "en-HK": [`h`, `hb`, `H`, `hB`], "en-IL": [`H`, `h`, `hb`, `hB`], "en-MY": [`h`, `hb`, `H`, `hB`], "es-BR": [`H`, `h`, `hB`, `hb`], "es-ES": [`H`, `h`, `hB`, `hb`], "es-GQ": [`H`, `h`, `hB`, `hb`], "fr-CA": [`H`, `h`, `hB`], "gl-ES": [`H`, `h`, `hB`], "gu-IN": [`hB`, `hb`, `h`, `H`], "hi-IN": [`hB`, `h`, `H`], "it-CH": [`H`, `h`, `hB`], "it-IT": [`H`, `h`, `hB`], "kn-IN": [`hB`, `h`, `H`], "ku-SY": [`H`, `hB`], "ml-IN": [`hB`, `h`, `H`], "mr-IN": [`hB`, `hb`, `h`, `H`], "pa-IN": [`hB`, `hb`, `h`, `H`], "ta-IN": [`hB`, `h`, `hb`, `H`], "te-IN": [`hB`, `h`, `H`], "zu-ZA": [`H`, `hB`, `hb`, `h`] };
|
|
2565
|
+
function ea(e6, t2) {
|
|
2560
2566
|
let n2 = ``;
|
|
2561
2567
|
for (let r2 = 0; r2 < e6.length; r2++) {
|
|
2562
2568
|
let i2 = e6.charAt(r2);
|
|
2563
2569
|
if (i2 === `j`) {
|
|
2564
2570
|
let a2 = 0;
|
|
2565
2571
|
for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
|
|
2566
|
-
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 =
|
|
2572
|
+
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = ta(t2);
|
|
2567
2573
|
for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
|
|
2568
2574
|
for (; o2-- > 0; ) n2 = c2 + n2;
|
|
2569
2575
|
} else n2 += i2 === `J` ? `H` : i2;
|
|
2570
2576
|
}
|
|
2571
2577
|
return n2;
|
|
2572
2578
|
}
|
|
2573
|
-
function
|
|
2579
|
+
function ta(e6) {
|
|
2574
2580
|
let t2 = e6.hourCycle;
|
|
2575
2581
|
if (t2 === void 0) {
|
|
2576
2582
|
let n3 = e6;
|
|
@@ -2589,36 +2595,36 @@ function $i(e6) {
|
|
|
2589
2595
|
throw Error(`Invalid hourCycle`);
|
|
2590
2596
|
}
|
|
2591
2597
|
let n2 = e6.language, r2;
|
|
2592
|
-
return n2 !== `root` && (r2 = e6.maximize().region), (
|
|
2598
|
+
return n2 !== `root` && (r2 = e6.maximize().region), (V[`${n2}-${r2}`] || V[r2 || ``] || V[n2 || ``] || V[`${n2}-001`] || V[`001`])[0].charAt(0);
|
|
2593
2599
|
}
|
|
2594
|
-
var
|
|
2595
|
-
var
|
|
2596
|
-
function
|
|
2600
|
+
var na = RegExp(`^${$i.source}*`);
|
|
2601
|
+
var ra = RegExp(`${$i.source}*$`);
|
|
2602
|
+
function H(e6, t2) {
|
|
2597
2603
|
return { start: e6, end: t2 };
|
|
2598
2604
|
}
|
|
2599
|
-
var
|
|
2600
|
-
var
|
|
2601
|
-
var
|
|
2602
|
-
var
|
|
2605
|
+
var ia = !!Object.fromEntries;
|
|
2606
|
+
var aa = !!String.prototype.trimStart;
|
|
2607
|
+
var oa = !!String.prototype.trimEnd;
|
|
2608
|
+
var sa = ia ? Object.fromEntries : function(e6) {
|
|
2603
2609
|
let t2 = {};
|
|
2604
2610
|
for (let [n2, r2] of e6) t2[n2] = r2;
|
|
2605
2611
|
return t2;
|
|
2606
2612
|
};
|
|
2607
|
-
var
|
|
2613
|
+
var ca = aa ? function(e6) {
|
|
2608
2614
|
return e6.trimStart();
|
|
2609
2615
|
} : function(e6) {
|
|
2610
|
-
return e6.replace(
|
|
2616
|
+
return e6.replace(na, ``);
|
|
2611
2617
|
};
|
|
2612
|
-
var
|
|
2618
|
+
var la = oa ? function(e6) {
|
|
2613
2619
|
return e6.trimEnd();
|
|
2614
2620
|
} : function(e6) {
|
|
2615
|
-
return e6.replace(
|
|
2621
|
+
return e6.replace(ra, ``);
|
|
2616
2622
|
};
|
|
2617
|
-
var
|
|
2618
|
-
function
|
|
2619
|
-
return
|
|
2623
|
+
var ua = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
|
|
2624
|
+
function da(e6, t2) {
|
|
2625
|
+
return ua.lastIndex = t2, ua.exec(e6)[1] ?? ``;
|
|
2620
2626
|
}
|
|
2621
|
-
function
|
|
2627
|
+
function fa(e6) {
|
|
2622
2628
|
if (e6.length === 0) return null;
|
|
2623
2629
|
let t2 = 1, n2 = 1;
|
|
2624
2630
|
for (let r2 = 0; r2 < e6.length; ) {
|
|
@@ -2639,7 +2645,7 @@ function ua(e6) {
|
|
|
2639
2645
|
}
|
|
2640
2646
|
return { offset: e6.length, line: t2, column: n2 };
|
|
2641
2647
|
}
|
|
2642
|
-
var
|
|
2648
|
+
var pa = class {
|
|
2643
2649
|
constructor(e6, t2 = {}) {
|
|
2644
2650
|
this.message = e6, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!t2.ignoreTag, this.locale = t2.locale, this.requiresOtherClause = !!t2.requiresOtherClause, this.shouldParseSkeletons = !!t2.shouldParseSkeletons;
|
|
2645
2651
|
}
|
|
@@ -2648,10 +2654,10 @@ var da = class {
|
|
|
2648
2654
|
if (this.message.length > 0) {
|
|
2649
2655
|
let e6 = this.message.charCodeAt(0);
|
|
2650
2656
|
if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
|
|
2651
|
-
let e7 =
|
|
2657
|
+
let e7 = fa(this.message);
|
|
2652
2658
|
if (e7) {
|
|
2653
2659
|
let t2 = this.clonePosition();
|
|
2654
|
-
return this.position = e7, { val: [{ type: 0, value: this.message, location:
|
|
2660
|
+
return this.position = e7, { val: [{ type: 0, value: this.message, location: H(t2, this.clonePosition()) }], err: null };
|
|
2655
2661
|
}
|
|
2656
2662
|
}
|
|
2657
2663
|
}
|
|
@@ -2668,11 +2674,11 @@ var da = class {
|
|
|
2668
2674
|
} else if (i2 === 125 && e6 > 0) break;
|
|
2669
2675
|
else if (i2 === 35 && (t2 === `plural` || t2 === `selectordinal`)) {
|
|
2670
2676
|
let e7 = this.clonePosition();
|
|
2671
|
-
this.bump(), r2.push({ type: 7, location:
|
|
2677
|
+
this.bump(), r2.push({ type: 7, location: H(e7, this.clonePosition()) });
|
|
2672
2678
|
} else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
2673
2679
|
if (n2) break;
|
|
2674
|
-
return this.error(26,
|
|
2675
|
-
} else if (i2 === 60 && !this.ignoreTag &&
|
|
2680
|
+
return this.error(26, H(this.clonePosition(), this.clonePosition()));
|
|
2681
|
+
} else if (i2 === 60 && !this.ignoreTag && ma(this.peek() || 0)) {
|
|
2676
2682
|
let n3 = this.parseTag(e6, t2);
|
|
2677
2683
|
if (n3.err) return n3;
|
|
2678
2684
|
r2.push(n3.val);
|
|
@@ -2688,23 +2694,23 @@ var da = class {
|
|
|
2688
2694
|
let n2 = this.clonePosition();
|
|
2689
2695
|
this.bump();
|
|
2690
2696
|
let r2 = this.parseTagName();
|
|
2691
|
-
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location:
|
|
2697
|
+
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: H(n2, this.clonePosition()) }, err: null };
|
|
2692
2698
|
if (this.bumpIf(`>`)) {
|
|
2693
2699
|
let i2 = this.parseMessage(e6 + 1, t2, true);
|
|
2694
2700
|
if (i2.err) return i2;
|
|
2695
2701
|
let a2 = i2.val, o2 = this.clonePosition();
|
|
2696
2702
|
if (this.bumpIf(`</`)) {
|
|
2697
|
-
if (this.isEOF() || !
|
|
2703
|
+
if (this.isEOF() || !ma(this.char())) return this.error(23, H(o2, this.clonePosition()));
|
|
2698
2704
|
let e7 = this.clonePosition();
|
|
2699
|
-
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location:
|
|
2705
|
+
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location: H(n2, this.clonePosition()) }, err: null } : this.error(23, H(o2, this.clonePosition()))) : this.error(26, H(e7, this.clonePosition()));
|
|
2700
2706
|
}
|
|
2701
|
-
return this.error(27,
|
|
2707
|
+
return this.error(27, H(n2, this.clonePosition()));
|
|
2702
2708
|
}
|
|
2703
|
-
return this.error(23,
|
|
2709
|
+
return this.error(23, H(n2, this.clonePosition()));
|
|
2704
2710
|
}
|
|
2705
2711
|
parseTagName() {
|
|
2706
2712
|
let e6 = this.offset();
|
|
2707
|
-
for (this.bump(); !this.isEOF() &&
|
|
2713
|
+
for (this.bump(); !this.isEOF() && ga(this.char()); ) this.bump();
|
|
2708
2714
|
return this.message.slice(e6, this.offset());
|
|
2709
2715
|
}
|
|
2710
2716
|
parseLiteral(e6, t2) {
|
|
@@ -2724,11 +2730,11 @@ var da = class {
|
|
|
2724
2730
|
if (a2) r2 += a2;
|
|
2725
2731
|
else break;
|
|
2726
2732
|
}
|
|
2727
|
-
let i2 =
|
|
2733
|
+
let i2 = H(n2, this.clonePosition());
|
|
2728
2734
|
return { val: { type: 0, value: r2, location: i2 }, err: null };
|
|
2729
2735
|
}
|
|
2730
2736
|
tryParseLeftAngleBracket() {
|
|
2731
|
-
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !
|
|
2737
|
+
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !ha(this.peek() || 0)) ? (this.bump(), `<`) : null;
|
|
2732
2738
|
}
|
|
2733
2739
|
tryParseQuote(e6) {
|
|
2734
2740
|
if (this.isEOF() || this.char() !== 39) return null;
|
|
@@ -2768,29 +2774,29 @@ var da = class {
|
|
|
2768
2774
|
}
|
|
2769
2775
|
parseArgument(e6, t2) {
|
|
2770
2776
|
let n2 = this.clonePosition();
|
|
2771
|
-
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2772
|
-
if (this.char() === 125) return this.bump(), this.error(2,
|
|
2777
|
+
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, H(n2, this.clonePosition()));
|
|
2778
|
+
if (this.char() === 125) return this.bump(), this.error(2, H(n2, this.clonePosition()));
|
|
2773
2779
|
let r2 = this.parseIdentifierIfPossible().value;
|
|
2774
|
-
if (!r2) return this.error(3,
|
|
2775
|
-
if (this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2780
|
+
if (!r2) return this.error(3, H(n2, this.clonePosition()));
|
|
2781
|
+
if (this.bumpSpace(), this.isEOF()) return this.error(1, H(n2, this.clonePosition()));
|
|
2776
2782
|
switch (this.char()) {
|
|
2777
2783
|
case 125:
|
|
2778
|
-
return this.bump(), { val: { type: 1, value: r2, location:
|
|
2784
|
+
return this.bump(), { val: { type: 1, value: r2, location: H(n2, this.clonePosition()) }, err: null };
|
|
2779
2785
|
case 44:
|
|
2780
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1,
|
|
2786
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, H(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
|
|
2781
2787
|
default:
|
|
2782
|
-
return this.error(3,
|
|
2788
|
+
return this.error(3, H(n2, this.clonePosition()));
|
|
2783
2789
|
}
|
|
2784
2790
|
}
|
|
2785
2791
|
parseIdentifierIfPossible() {
|
|
2786
|
-
let e6 = this.clonePosition(), t2 = this.offset(), n2 =
|
|
2787
|
-
return this.bumpTo(r2), { value: n2, location:
|
|
2792
|
+
let e6 = this.clonePosition(), t2 = this.offset(), n2 = da(this.message, t2), r2 = t2 + n2.length;
|
|
2793
|
+
return this.bumpTo(r2), { value: n2, location: H(e6, this.clonePosition()) };
|
|
2788
2794
|
}
|
|
2789
2795
|
parseArgumentOptions(e6, t2, n2, r2) {
|
|
2790
2796
|
let i2 = this.clonePosition(), a2 = this.parseIdentifierIfPossible().value, o2 = this.clonePosition();
|
|
2791
2797
|
switch (a2) {
|
|
2792
2798
|
case ``:
|
|
2793
|
-
return this.error(4,
|
|
2799
|
+
return this.error(4, H(i2, o2));
|
|
2794
2800
|
case `number`:
|
|
2795
2801
|
case `date`:
|
|
2796
2802
|
case `time`: {
|
|
@@ -2800,15 +2806,15 @@ var da = class {
|
|
|
2800
2806
|
this.bumpSpace();
|
|
2801
2807
|
let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
|
|
2802
2808
|
if (n3.err) return n3;
|
|
2803
|
-
let r3 =
|
|
2804
|
-
if (r3.length === 0) return this.error(6,
|
|
2805
|
-
e7 = { style: r3, styleLocation:
|
|
2809
|
+
let r3 = la(n3.val);
|
|
2810
|
+
if (r3.length === 0) return this.error(6, H(this.clonePosition(), this.clonePosition()));
|
|
2811
|
+
e7 = { style: r3, styleLocation: H(t4, this.clonePosition()) };
|
|
2806
2812
|
}
|
|
2807
2813
|
let t3 = this.tryParseArgumentClose(r2);
|
|
2808
2814
|
if (t3.err) return t3;
|
|
2809
|
-
let i3 =
|
|
2815
|
+
let i3 = H(r2, this.clonePosition());
|
|
2810
2816
|
if (e7 && e7.style.startsWith(`::`)) {
|
|
2811
|
-
let t4 =
|
|
2817
|
+
let t4 = ca(e7.style.slice(2));
|
|
2812
2818
|
if (a2 === `number`) {
|
|
2813
2819
|
let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
|
|
2814
2820
|
return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
|
|
@@ -2816,8 +2822,8 @@ var da = class {
|
|
|
2816
2822
|
{
|
|
2817
2823
|
if (t4.length === 0) return this.error(10, i3);
|
|
2818
2824
|
let r3 = t4;
|
|
2819
|
-
this.locale && (r3 =
|
|
2820
|
-
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ?
|
|
2825
|
+
this.locale && (r3 = ea(t4, this.locale));
|
|
2826
|
+
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Oi(r3) : {} };
|
|
2821
2827
|
return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
|
|
2822
2828
|
}
|
|
2823
2829
|
}
|
|
@@ -2827,11 +2833,11 @@ var da = class {
|
|
|
2827
2833
|
case `selectordinal`:
|
|
2828
2834
|
case `select`: {
|
|
2829
2835
|
let i3 = this.clonePosition();
|
|
2830
|
-
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12,
|
|
2836
|
+
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, H(i3, { ...i3 }));
|
|
2831
2837
|
this.bumpSpace();
|
|
2832
2838
|
let o3 = this.parseIdentifierIfPossible(), s2 = 0;
|
|
2833
2839
|
if (a2 !== `select` && o3.value === `offset`) {
|
|
2834
|
-
if (!this.bumpIf(`:`)) return this.error(13,
|
|
2840
|
+
if (!this.bumpIf(`:`)) return this.error(13, H(this.clonePosition(), this.clonePosition()));
|
|
2835
2841
|
this.bumpSpace();
|
|
2836
2842
|
let e7 = this.tryParseDecimalInteger(13, 14);
|
|
2837
2843
|
if (e7.err) return e7;
|
|
@@ -2841,15 +2847,15 @@ var da = class {
|
|
|
2841
2847
|
if (c2.err) return c2;
|
|
2842
2848
|
let l2 = this.tryParseArgumentClose(r2);
|
|
2843
2849
|
if (l2.err) return l2;
|
|
2844
|
-
let u2 =
|
|
2845
|
-
return a2 === `select` ? { val: { type: 5, value: n2, options:
|
|
2850
|
+
let u2 = H(r2, this.clonePosition());
|
|
2851
|
+
return a2 === `select` ? { val: { type: 5, value: n2, options: sa(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: sa(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
|
|
2846
2852
|
}
|
|
2847
2853
|
default:
|
|
2848
|
-
return this.error(5,
|
|
2854
|
+
return this.error(5, H(i2, o2));
|
|
2849
2855
|
}
|
|
2850
2856
|
}
|
|
2851
2857
|
tryParseArgumentClose(e6) {
|
|
2852
|
-
return this.isEOF() || this.char() !== 125 ? this.error(1,
|
|
2858
|
+
return this.isEOF() || this.char() !== 125 ? this.error(1, H(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
|
|
2853
2859
|
}
|
|
2854
2860
|
parseSimpleArgStyleIfPossible() {
|
|
2855
2861
|
let e6 = 0, t2 = this.clonePosition();
|
|
@@ -2857,7 +2863,7 @@ var da = class {
|
|
|
2857
2863
|
case 39: {
|
|
2858
2864
|
this.bump();
|
|
2859
2865
|
let e7 = this.clonePosition();
|
|
2860
|
-
if (!this.bumpUntil(`'`)) return this.error(11,
|
|
2866
|
+
if (!this.bumpUntil(`'`)) return this.error(11, H(e7, this.clonePosition()));
|
|
2861
2867
|
this.bump();
|
|
2862
2868
|
break;
|
|
2863
2869
|
}
|
|
@@ -2876,11 +2882,11 @@ var da = class {
|
|
|
2876
2882
|
parseNumberSkeletonFromString(e6, t2) {
|
|
2877
2883
|
let n2 = [];
|
|
2878
2884
|
try {
|
|
2879
|
-
n2 =
|
|
2885
|
+
n2 = Ai(e6);
|
|
2880
2886
|
} catch {
|
|
2881
2887
|
return this.error(7, t2);
|
|
2882
2888
|
}
|
|
2883
|
-
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ?
|
|
2889
|
+
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? Bi(n2) : {} }, err: null };
|
|
2884
2890
|
}
|
|
2885
2891
|
tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
|
|
2886
2892
|
let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
|
|
@@ -2890,20 +2896,20 @@ var da = class {
|
|
|
2890
2896
|
if (t2 !== `select` && this.bumpIf(`=`)) {
|
|
2891
2897
|
let t3 = this.tryParseDecimalInteger(16, 19);
|
|
2892
2898
|
if (t3.err) return t3;
|
|
2893
|
-
c2 =
|
|
2899
|
+
c2 = H(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
|
|
2894
2900
|
} else break;
|
|
2895
2901
|
}
|
|
2896
2902
|
if (o2.has(s2)) return this.error(t2 === `select` ? 21 : 20, c2);
|
|
2897
2903
|
s2 === `other` && (i2 = true), this.bumpSpace();
|
|
2898
2904
|
let r3 = this.clonePosition();
|
|
2899
|
-
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18,
|
|
2905
|
+
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, H(this.clonePosition(), this.clonePosition()));
|
|
2900
2906
|
let l2 = this.parseMessage(e6 + 1, t2, n2);
|
|
2901
2907
|
if (l2.err) return l2;
|
|
2902
2908
|
let u2 = this.tryParseArgumentClose(r3);
|
|
2903
2909
|
if (u2.err) return u2;
|
|
2904
|
-
a2.push([s2, { value: l2.val, location:
|
|
2910
|
+
a2.push([s2, { value: l2.val, location: H(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
|
|
2905
2911
|
}
|
|
2906
|
-
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16,
|
|
2912
|
+
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16, H(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !i2 ? this.error(22, H(this.clonePosition(), this.clonePosition())) : { val: a2, err: null };
|
|
2907
2913
|
}
|
|
2908
2914
|
tryParseDecimalInteger(e6, t2) {
|
|
2909
2915
|
let n2 = 1, r2 = this.clonePosition();
|
|
@@ -2914,7 +2920,7 @@ var da = class {
|
|
|
2914
2920
|
if (e7 >= 48 && e7 <= 57) i2 = true, a2 = a2 * 10 + (e7 - 48), this.bump();
|
|
2915
2921
|
else break;
|
|
2916
2922
|
}
|
|
2917
|
-
let o2 =
|
|
2923
|
+
let o2 = H(r2, this.clonePosition());
|
|
2918
2924
|
return i2 ? (a2 *= n2, Number.isSafeInteger(a2) ? { val: a2, err: null } : this.error(t2, o2)) : this.error(e6, o2);
|
|
2919
2925
|
}
|
|
2920
2926
|
offset() {
|
|
@@ -2962,7 +2968,7 @@ var da = class {
|
|
|
2962
2968
|
}
|
|
2963
2969
|
}
|
|
2964
2970
|
bumpSpace() {
|
|
2965
|
-
for (; !this.isEOF() &&
|
|
2971
|
+
for (; !this.isEOF() && _a(this.char()); ) this.bump();
|
|
2966
2972
|
}
|
|
2967
2973
|
peek() {
|
|
2968
2974
|
if (this.isEOF()) return null;
|
|
@@ -2970,34 +2976,34 @@ var da = class {
|
|
|
2970
2976
|
return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
|
|
2971
2977
|
}
|
|
2972
2978
|
};
|
|
2973
|
-
function
|
|
2979
|
+
function ma(e6) {
|
|
2974
2980
|
return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
|
|
2975
2981
|
}
|
|
2976
|
-
function
|
|
2977
|
-
return
|
|
2982
|
+
function ha(e6) {
|
|
2983
|
+
return ma(e6) || e6 === 47;
|
|
2978
2984
|
}
|
|
2979
|
-
function
|
|
2985
|
+
function ga(e6) {
|
|
2980
2986
|
return e6 === 45 || e6 === 46 || e6 >= 48 && e6 <= 57 || e6 === 95 || e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90 || e6 == 183 || e6 >= 192 && e6 <= 214 || e6 >= 216 && e6 <= 246 || e6 >= 248 && e6 <= 893 || e6 >= 895 && e6 <= 8191 || e6 >= 8204 && e6 <= 8205 || e6 >= 8255 && e6 <= 8256 || e6 >= 8304 && e6 <= 8591 || e6 >= 11264 && e6 <= 12271 || e6 >= 12289 && e6 <= 55295 || e6 >= 63744 && e6 <= 64975 || e6 >= 65008 && e6 <= 65533 || e6 >= 65536 && e6 <= 983039;
|
|
2981
2987
|
}
|
|
2982
|
-
function
|
|
2988
|
+
function _a(e6) {
|
|
2983
2989
|
return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
|
|
2984
2990
|
}
|
|
2985
|
-
function
|
|
2991
|
+
function va(e6) {
|
|
2986
2992
|
e6.forEach((e7) => {
|
|
2987
|
-
if (delete e7.location,
|
|
2988
|
-
else
|
|
2993
|
+
if (delete e7.location, qi(e7) || Ji(e7)) for (let t2 in e7.options) delete e7.options[t2].location, va(e7.options[t2].value);
|
|
2994
|
+
else Wi(e7) && Zi(e7.style) || (Gi(e7) || Ki(e7)) && Qi(e7.style) ? delete e7.style.location : Xi(e7) && va(e7.children);
|
|
2989
2995
|
});
|
|
2990
2996
|
}
|
|
2991
|
-
function
|
|
2997
|
+
function ya(e6, t2 = {}) {
|
|
2992
2998
|
t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
|
|
2993
|
-
let n2 = new
|
|
2999
|
+
let n2 = new pa(e6, t2).parse();
|
|
2994
3000
|
if (n2.err) {
|
|
2995
|
-
let e7 = SyntaxError(
|
|
3001
|
+
let e7 = SyntaxError(Vi[n2.err.kind]);
|
|
2996
3002
|
throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
|
|
2997
3003
|
}
|
|
2998
|
-
return t2?.captureLocation ||
|
|
3004
|
+
return t2?.captureLocation || va(n2.val), n2.val;
|
|
2999
3005
|
}
|
|
3000
|
-
var
|
|
3006
|
+
var ba = class extends Error {
|
|
3001
3007
|
constructor(e6, t2, n2) {
|
|
3002
3008
|
super(e6), this.code = t2, this.originalMessage = n2;
|
|
3003
3009
|
}
|
|
@@ -3005,54 +3011,54 @@ var va = class extends Error {
|
|
|
3005
3011
|
return `[formatjs Error: ${this.code}] ${this.message}`;
|
|
3006
3012
|
}
|
|
3007
3013
|
};
|
|
3008
|
-
var
|
|
3014
|
+
var xa = class extends ba {
|
|
3009
3015
|
constructor(e6, t2, n2, r2) {
|
|
3010
3016
|
super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
|
|
3011
3017
|
}
|
|
3012
3018
|
};
|
|
3013
|
-
var
|
|
3019
|
+
var Sa = class extends ba {
|
|
3014
3020
|
constructor(e6, t2, n2) {
|
|
3015
3021
|
super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
|
|
3016
3022
|
}
|
|
3017
3023
|
};
|
|
3018
|
-
var
|
|
3024
|
+
var Ca = class extends ba {
|
|
3019
3025
|
constructor(e6, t2) {
|
|
3020
3026
|
super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
|
|
3021
3027
|
}
|
|
3022
3028
|
};
|
|
3023
|
-
function
|
|
3029
|
+
function wa(e6) {
|
|
3024
3030
|
return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
|
|
3025
3031
|
let n2 = e7[e7.length - 1];
|
|
3026
3032
|
return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
|
|
3027
3033
|
}, []);
|
|
3028
3034
|
}
|
|
3029
|
-
function
|
|
3035
|
+
function Ta(e6) {
|
|
3030
3036
|
return typeof e6 == `function`;
|
|
3031
3037
|
}
|
|
3032
|
-
function
|
|
3033
|
-
if (e6.length === 1 &&
|
|
3038
|
+
function Ea(e6, t2, n2, r2, i2, a2, o2) {
|
|
3039
|
+
if (e6.length === 1 && Hi(e6[0])) return [{ type: 0, value: e6[0].value }];
|
|
3034
3040
|
let s2 = [];
|
|
3035
3041
|
for (let c2 of e6) {
|
|
3036
|
-
if (
|
|
3042
|
+
if (Hi(c2)) {
|
|
3037
3043
|
s2.push({ type: 0, value: c2.value });
|
|
3038
3044
|
continue;
|
|
3039
3045
|
}
|
|
3040
|
-
if (
|
|
3046
|
+
if (Yi(c2)) {
|
|
3041
3047
|
typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
|
|
3042
3048
|
continue;
|
|
3043
3049
|
}
|
|
3044
3050
|
let { value: e7 } = c2;
|
|
3045
|
-
if (!(i2 && e7 in i2)) throw new
|
|
3051
|
+
if (!(i2 && e7 in i2)) throw new Ca(e7, o2);
|
|
3046
3052
|
let l2 = i2[e7];
|
|
3047
|
-
if (
|
|
3048
|
-
else if (
|
|
3049
|
-
let e8 = typeof c2.style == `string` ? r2.date[c2.style] :
|
|
3053
|
+
if (Ui(c2)) (!l2 || typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint`) && (l2 = typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint` ? String(l2) : ``), s2.push({ type: typeof l2 == `string` ? 0 : 1, value: l2 });
|
|
3054
|
+
else if (Gi(c2)) {
|
|
3055
|
+
let e8 = typeof c2.style == `string` ? r2.date[c2.style] : Qi(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3050
3056
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3051
|
-
} else if (
|
|
3052
|
-
let e8 = typeof c2.style == `string` ? r2.time[c2.style] :
|
|
3057
|
+
} else if (Ki(c2)) {
|
|
3058
|
+
let e8 = typeof c2.style == `string` ? r2.time[c2.style] : Qi(c2.style) ? c2.style.parsedOptions : r2.time.medium;
|
|
3053
3059
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3054
|
-
} else if (
|
|
3055
|
-
let e8 = typeof c2.style == `string` ? r2.number[c2.style] :
|
|
3060
|
+
} else if (Wi(c2)) {
|
|
3061
|
+
let e8 = typeof c2.style == `string` ? r2.number[c2.style] : Zi(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3056
3062
|
if (e8 && e8.scale) {
|
|
3057
3063
|
let t3 = e8.scale || 1;
|
|
3058
3064
|
if (typeof l2 == `bigint`) {
|
|
@@ -3062,40 +3068,40 @@ function wa(e6, t2, n2, r2, i2, a2, o2) {
|
|
|
3062
3068
|
}
|
|
3063
3069
|
s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
|
|
3064
3070
|
} else {
|
|
3065
|
-
if (
|
|
3071
|
+
if (Xi(c2)) {
|
|
3066
3072
|
let { children: e8, value: l3 } = c2, u2 = i2[l3];
|
|
3067
|
-
if (!
|
|
3068
|
-
let d2 = u2(
|
|
3073
|
+
if (!Ta(u2)) throw new Sa(l3, `function`, o2);
|
|
3074
|
+
let d2 = u2(Ea(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
|
|
3069
3075
|
Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
|
|
3070
3076
|
}
|
|
3071
|
-
if (
|
|
3077
|
+
if (qi(c2)) {
|
|
3072
3078
|
let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
|
|
3073
|
-
if (!a3) throw new
|
|
3074
|
-
s2.push(...
|
|
3075
|
-
} else if (
|
|
3079
|
+
if (!a3) throw new xa(c2.value, l2, Object.keys(c2.options), o2);
|
|
3080
|
+
s2.push(...Ea(a3.value, t2, n2, r2, i2));
|
|
3081
|
+
} else if (Ji(c2)) {
|
|
3076
3082
|
let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
|
|
3077
3083
|
if (!a3) {
|
|
3078
|
-
if (!Intl.PluralRules) throw new
|
|
3084
|
+
if (!Intl.PluralRules) throw new ba(`Intl.PluralRules is not available in this environment.
|
|
3079
3085
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3080
3086
|
`, `MISSING_INTL_API`, o2);
|
|
3081
3087
|
let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
|
|
3082
3088
|
a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
|
|
3083
3089
|
}
|
|
3084
|
-
if (!a3) throw new
|
|
3090
|
+
if (!a3) throw new xa(c2.value, l2, Object.keys(c2.options), o2);
|
|
3085
3091
|
let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
|
|
3086
|
-
s2.push(...
|
|
3092
|
+
s2.push(...Ea(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
|
|
3087
3093
|
}
|
|
3088
3094
|
}
|
|
3089
3095
|
}
|
|
3090
|
-
return
|
|
3096
|
+
return wa(s2);
|
|
3091
3097
|
}
|
|
3092
|
-
function
|
|
3098
|
+
function Da(e6, t2) {
|
|
3093
3099
|
return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
|
|
3094
3100
|
}
|
|
3095
|
-
function
|
|
3096
|
-
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] =
|
|
3101
|
+
function Oa(e6, t2) {
|
|
3102
|
+
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Da(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
|
|
3097
3103
|
}
|
|
3098
|
-
function
|
|
3104
|
+
function ka(e6) {
|
|
3099
3105
|
return { create() {
|
|
3100
3106
|
return { get(t2) {
|
|
3101
3107
|
return e6[t2];
|
|
@@ -3104,23 +3110,23 @@ function Da(e6) {
|
|
|
3104
3110
|
} };
|
|
3105
3111
|
} };
|
|
3106
3112
|
}
|
|
3107
|
-
function
|
|
3108
|
-
return { getNumberFormat:
|
|
3113
|
+
function Aa(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
|
|
3114
|
+
return { getNumberFormat: hi((...e7) => new Intl.NumberFormat(...e7), { cache: ka(e6.number), strategy: Ei.variadic }), getDateTimeFormat: hi((...e7) => new Intl.DateTimeFormat(...e7), { cache: ka(e6.dateTime), strategy: Ei.variadic }), getPluralRules: hi((...e7) => new Intl.PluralRules(...e7), { cache: ka(e6.pluralRules), strategy: Ei.variadic }) };
|
|
3109
3115
|
}
|
|
3110
|
-
var
|
|
3116
|
+
var ja = class e5 {
|
|
3111
3117
|
constructor(t2, n2 = e5.defaultLocale, r2, i2) {
|
|
3112
3118
|
if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
|
|
3113
3119
|
let t3 = this.formatToParts(e6);
|
|
3114
3120
|
if (t3.length === 1) return t3[0].value;
|
|
3115
3121
|
let n3 = t3.reduce((e7, t4) => (!e7.length || t4.type !== 0 || typeof e7[e7.length - 1] != `string` ? e7.push(t4.value) : e7[e7.length - 1] += t4.value, e7), []);
|
|
3116
3122
|
return n3.length <= 1 ? n3[0] || `` : n3;
|
|
3117
|
-
}, this.formatToParts = (e6) =>
|
|
3123
|
+
}, this.formatToParts = (e6) => Ea(this.ast, this.locales, this.formatters, this.formats, e6, void 0, this.message), this.resolvedOptions = () => ({ locale: this.resolvedLocale?.toString() || Intl.NumberFormat.supportedLocalesOf(this.locales)[0] }), this.getAst = () => this.ast, this.locales = n2, this.resolvedLocale = e5.resolveLocale(n2), typeof t2 == `string`) {
|
|
3118
3124
|
if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
3119
3125
|
let { ...n3 } = i2 || {};
|
|
3120
3126
|
this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
|
|
3121
3127
|
} else this.ast = t2;
|
|
3122
3128
|
if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
|
|
3123
|
-
this.formats =
|
|
3129
|
+
this.formats = Oa(e5.formats, r2), this.formatters = i2 && i2.formatters || Aa(this.formatterCache);
|
|
3124
3130
|
}
|
|
3125
3131
|
static {
|
|
3126
3132
|
this.memoizedDefaultLocale = null;
|
|
@@ -3136,14 +3142,14 @@ var ka = class e5 {
|
|
|
3136
3142
|
};
|
|
3137
3143
|
}
|
|
3138
3144
|
static {
|
|
3139
|
-
this.__parse =
|
|
3145
|
+
this.__parse = ya;
|
|
3140
3146
|
}
|
|
3141
3147
|
static {
|
|
3142
3148
|
this.formats = { number: { integer: { maximumFractionDigits: 0 }, currency: { style: `currency` }, percent: { style: `percent` } }, date: { short: { month: `numeric`, day: `numeric`, year: `2-digit` }, medium: { month: `short`, day: `numeric`, year: `numeric` }, long: { month: `long`, day: `numeric`, year: `numeric` }, full: { weekday: `long`, month: `long`, day: `numeric`, year: `numeric` } }, time: { short: { hour: `numeric`, minute: `numeric` }, medium: { hour: `numeric`, minute: `numeric`, second: `numeric` }, long: { hour: `numeric`, minute: `numeric`, second: `numeric`, timeZoneName: `short` }, full: { hour: `numeric`, minute: `numeric`, second: `numeric`, timeZoneName: `short` } } };
|
|
3143
3149
|
}
|
|
3144
3150
|
};
|
|
3145
|
-
var
|
|
3146
|
-
function
|
|
3151
|
+
var Ma = [`__proto__`, `constructor`, `prototype`];
|
|
3152
|
+
function Na(e6, t2, n2) {
|
|
3147
3153
|
function r2(e7) {
|
|
3148
3154
|
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
3149
3155
|
}
|
|
@@ -3153,49 +3159,49 @@ function ja(e6, t2, n2) {
|
|
|
3153
3159
|
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
3154
3160
|
if (i2()) return {};
|
|
3155
3161
|
var o2 = r2(a2.shift());
|
|
3156
|
-
if (
|
|
3162
|
+
if (Ma.indexOf(o2) > -1) return {};
|
|
3157
3163
|
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
3158
3164
|
}
|
|
3159
3165
|
if (i2()) return {};
|
|
3160
3166
|
var s2 = r2(a2.shift());
|
|
3161
|
-
return
|
|
3167
|
+
return Ma.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
3162
3168
|
}
|
|
3163
|
-
function
|
|
3164
|
-
var r2 =
|
|
3169
|
+
function Pa(e6, t2, n2) {
|
|
3170
|
+
var r2 = Na(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
3165
3171
|
i2 !== void 0 && (i2[a2] = n2);
|
|
3166
3172
|
}
|
|
3167
|
-
function
|
|
3168
|
-
var n2 =
|
|
3173
|
+
function Fa(e6, t2) {
|
|
3174
|
+
var n2 = Na(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
3169
3175
|
if (r2) return r2[i2];
|
|
3170
3176
|
}
|
|
3171
|
-
function
|
|
3177
|
+
function Ia(e6) {
|
|
3172
3178
|
return [...arguments].slice(1).forEach(function(t2) {
|
|
3173
3179
|
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
3174
3180
|
var i2 = r2[n2];
|
|
3175
|
-
|
|
3181
|
+
Ma.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
3176
3182
|
}
|
|
3177
3183
|
}), e6;
|
|
3178
3184
|
}
|
|
3179
|
-
function
|
|
3180
|
-
return
|
|
3185
|
+
function La(e6, t2) {
|
|
3186
|
+
return Ha(e6) || Va(e6, t2) || za(e6, t2) || Ra();
|
|
3181
3187
|
}
|
|
3182
|
-
function
|
|
3188
|
+
function Ra() {
|
|
3183
3189
|
throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3184
3190
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3185
3191
|
}
|
|
3186
|
-
function
|
|
3192
|
+
function za(e6, t2) {
|
|
3187
3193
|
if (e6) {
|
|
3188
|
-
if (typeof e6 == `string`) return
|
|
3194
|
+
if (typeof e6 == `string`) return Ba(e6, t2);
|
|
3189
3195
|
var n2 = {}.toString.call(e6).slice(8, -1);
|
|
3190
|
-
return n2 === `Object` && e6.constructor && (n2 = e6.constructor.name), n2 === `Map` || n2 === `Set` ? Array.from(e6) : n2 === `Arguments` || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ?
|
|
3196
|
+
return n2 === `Object` && e6.constructor && (n2 = e6.constructor.name), n2 === `Map` || n2 === `Set` ? Array.from(e6) : n2 === `Arguments` || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ? Ba(e6, t2) : void 0;
|
|
3191
3197
|
}
|
|
3192
3198
|
}
|
|
3193
|
-
function
|
|
3199
|
+
function Ba(e6, t2) {
|
|
3194
3200
|
(t2 == null || t2 > e6.length) && (t2 = e6.length);
|
|
3195
3201
|
for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
|
|
3196
3202
|
return r2;
|
|
3197
3203
|
}
|
|
3198
|
-
function
|
|
3204
|
+
function Va(e6, t2) {
|
|
3199
3205
|
var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
|
|
3200
3206
|
if (n2 != null) {
|
|
3201
3207
|
var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
|
|
@@ -3216,10 +3222,10 @@ function za(e6, t2) {
|
|
|
3216
3222
|
return s2;
|
|
3217
3223
|
}
|
|
3218
3224
|
}
|
|
3219
|
-
function
|
|
3225
|
+
function Ha(e6) {
|
|
3220
3226
|
if (Array.isArray(e6)) return e6;
|
|
3221
3227
|
}
|
|
3222
|
-
function
|
|
3228
|
+
function Ua(e6, t2) {
|
|
3223
3229
|
var n2 = Object.keys(e6);
|
|
3224
3230
|
if (Object.getOwnPropertySymbols) {
|
|
3225
3231
|
var r2 = Object.getOwnPropertySymbols(e6);
|
|
@@ -3229,101 +3235,101 @@ function Va(e6, t2) {
|
|
|
3229
3235
|
}
|
|
3230
3236
|
return n2;
|
|
3231
3237
|
}
|
|
3232
|
-
function
|
|
3238
|
+
function Wa(e6) {
|
|
3233
3239
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
3234
3240
|
var n2 = arguments[t2] == null ? {} : arguments[t2];
|
|
3235
|
-
t2 % 2 ?
|
|
3236
|
-
|
|
3237
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) :
|
|
3241
|
+
t2 % 2 ? Ua(Object(n2), true).forEach(function(t3) {
|
|
3242
|
+
Ga(e6, t3, n2[t3]);
|
|
3243
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : Ua(Object(n2)).forEach(function(t3) {
|
|
3238
3244
|
Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
|
|
3239
3245
|
});
|
|
3240
3246
|
}
|
|
3241
3247
|
return e6;
|
|
3242
3248
|
}
|
|
3243
|
-
function
|
|
3244
|
-
return (t2 =
|
|
3249
|
+
function Ga(e6, t2, n2) {
|
|
3250
|
+
return (t2 = Ya(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
|
|
3245
3251
|
}
|
|
3246
|
-
function
|
|
3252
|
+
function Ka(e6, t2) {
|
|
3247
3253
|
if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
|
|
3248
3254
|
}
|
|
3249
|
-
function
|
|
3255
|
+
function qa(e6, t2) {
|
|
3250
3256
|
for (var n2 = 0; n2 < t2.length; n2++) {
|
|
3251
3257
|
var r2 = t2[n2];
|
|
3252
|
-
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6,
|
|
3258
|
+
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, Ya(r2.key), r2);
|
|
3253
3259
|
}
|
|
3254
3260
|
}
|
|
3255
|
-
function
|
|
3256
|
-
return t2 &&
|
|
3261
|
+
function Ja(e6, t2, n2) {
|
|
3262
|
+
return t2 && qa(e6.prototype, t2), n2 && qa(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
|
|
3257
3263
|
}
|
|
3258
|
-
function
|
|
3259
|
-
var t2 =
|
|
3260
|
-
return
|
|
3264
|
+
function Ya(e6) {
|
|
3265
|
+
var t2 = Xa(e6, `string`);
|
|
3266
|
+
return U(t2) == `symbol` ? t2 : t2 + ``;
|
|
3261
3267
|
}
|
|
3262
|
-
function
|
|
3263
|
-
if (
|
|
3268
|
+
function Xa(e6, t2) {
|
|
3269
|
+
if (U(e6) != `object` || !e6) return e6;
|
|
3264
3270
|
var n2 = e6[Symbol.toPrimitive];
|
|
3265
3271
|
if (n2 !== void 0) {
|
|
3266
3272
|
var r2 = n2.call(e6, t2 || `default`);
|
|
3267
|
-
if (
|
|
3273
|
+
if (U(r2) != `object`) return r2;
|
|
3268
3274
|
throw TypeError(`@@toPrimitive must return a primitive value.`);
|
|
3269
3275
|
}
|
|
3270
3276
|
return (t2 === `string` ? String : Number)(e6);
|
|
3271
3277
|
}
|
|
3272
|
-
function
|
|
3278
|
+
function U(e6) {
|
|
3273
3279
|
"@babel/helpers - typeof";
|
|
3274
|
-
return
|
|
3280
|
+
return U = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3275
3281
|
return typeof e7;
|
|
3276
3282
|
} : function(e7) {
|
|
3277
3283
|
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3278
|
-
},
|
|
3284
|
+
}, U(e6);
|
|
3279
3285
|
}
|
|
3280
|
-
var
|
|
3281
|
-
var
|
|
3282
|
-
function
|
|
3286
|
+
var Za = `https://www.i18next.com/how-to/using-icu-or-mf2`;
|
|
3287
|
+
var Qa = [`zero`, `one`, `two`, `few`, `many`, `other`];
|
|
3288
|
+
function $a() {
|
|
3283
3289
|
return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
|
|
3284
3290
|
return n2;
|
|
3285
3291
|
}, parseLngForICU: function(e6) {
|
|
3286
3292
|
return e6;
|
|
3287
3293
|
}, escapeVariables: false };
|
|
3288
3294
|
}
|
|
3289
|
-
function
|
|
3290
|
-
return n2 && t2 &&
|
|
3295
|
+
function eo(e6, t2, n2, r2) {
|
|
3296
|
+
return n2 && t2 && U(t2) === `object` ? `${r2} resolved to an object or array, but i18next-icu does not support returnObjects or joinArrays and returns the raw value unformatted.` : n2 && typeof t2 == `string` && t2.indexOf(`{{`) > -1 ? `${r2} could not be parsed (${e6.message}). It contains "{{": i18next interpolation like {{name}} does not work with ICU, use {name}.` : `${r2} could not be ${n2 ? `parsed` : `formatted`}: ${e6.message}`;
|
|
3291
3297
|
}
|
|
3292
|
-
var
|
|
3298
|
+
var to = function() {
|
|
3293
3299
|
function e6(t2) {
|
|
3294
|
-
|
|
3300
|
+
Ka(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
|
|
3295
3301
|
}
|
|
3296
|
-
return
|
|
3302
|
+
return Ja(e6, [{ key: `init`, value: function(e7, t2) {
|
|
3297
3303
|
var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
|
|
3298
|
-
if (this.options =
|
|
3304
|
+
if (this.options = Ia(r2, t2, this.options || {}, $a()), this.formats = this.options.formats, e7) {
|
|
3299
3305
|
var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
|
|
3300
|
-
e7.IntlMessageFormat =
|
|
3306
|
+
e7.IntlMessageFormat = ja, e7.ICU = this, this.i18next = e7, this.debug = !!(e7.options && e7.options.debug), this.debug && e7.options.interpolation && e7.options.interpolation.escapeValue !== false && !this.options.escapeVariables && this.warn(`interpolation.escapeValue is not applied, values are inserted without HTML escaping. Set the i18next-icu option escapeVariables: true to escape them, or interpolation.escapeValue: false if your output is escaped elsewhere (e.g. by React).`), s2 && (a2 && e7.on(a2, function() {
|
|
3301
3307
|
return n2.clearCache();
|
|
3302
3308
|
}), o2 && e7.store.on(o2, function() {
|
|
3303
3309
|
return n2.clearCache();
|
|
3304
3310
|
}));
|
|
3305
3311
|
}
|
|
3306
3312
|
} }, { key: `addUserDefinedFormats`, value: function(e7) {
|
|
3307
|
-
this.formats = this.formats ?
|
|
3313
|
+
this.formats = this.formats ? Wa(Wa({}, this.formats), e7) : e7, this.clearCache();
|
|
3308
3314
|
} }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
|
|
3309
3315
|
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && [n2, r2, i2], c2;
|
|
3310
3316
|
if (this.options.memoize) {
|
|
3311
|
-
var l2 =
|
|
3317
|
+
var l2 = Fa(this.mem, s2);
|
|
3312
3318
|
l2 && l2.res === e7 && (c2 = l2.fc);
|
|
3313
3319
|
}
|
|
3314
3320
|
try {
|
|
3315
|
-
c2 || (this.debug && typeof e7 == `string` && e7.indexOf(`$t(`) > -1 && this.firstTime(`nesting ${n2} ${r2} ${i2}`) && this.warn(`key "${i2}" (${n2}/${r2}) contains "$t(", but i18next-icu does not support nesting, the text is output as is.`), c2 = new
|
|
3316
|
-
var u2 = t2 && t2.replace &&
|
|
3321
|
+
c2 || (this.debug && typeof e7 == `string` && e7.indexOf(`$t(`) > -1 && this.firstTime(`nesting ${n2} ${r2} ${i2}`) && this.warn(`key "${i2}" (${n2}/${r2}) contains "$t(", but i18next-icu does not support nesting, the text is output as is.`), c2 = new ja(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && Pa(this.mem, s2, { res: e7, fc: c2 }));
|
|
3322
|
+
var u2 = t2 && t2.replace && U(t2.replace) === `object` ? Wa(Wa({}, t2), t2.replace) : t2;
|
|
3317
3323
|
return c2.format(this.escapeVariableValues(u2));
|
|
3318
3324
|
} catch (a3) {
|
|
3319
|
-
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(
|
|
3325
|
+
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(eo(a3, e7, !c2, `key "${i2}" (${n2}/${r2})`)), this.options.parseErrorHandler(a3, i2, e7, t2);
|
|
3320
3326
|
}
|
|
3321
3327
|
} }, { key: `addLookupKeys`, value: function(e7, t2, n2, r2, i2) {
|
|
3322
3328
|
return this.debug && i2 && this.checkSuffixKeys(t2, n2, r2, i2), e7;
|
|
3323
3329
|
} }, { key: `checkSuffixKeys`, value: function(e7, t2, n2, r2) {
|
|
3324
3330
|
var i2 = r2.count, a2 = r2.context, o2 = this.i18next.options, s2 = o2.pluralSeparator, c2 = s2 === void 0 ? `_` : s2, l2 = o2.contextSeparator, u2 = l2 === void 0 ? `_` : l2, d2 = this.i18next.services.resourceStore, f2 = `key "${e7}" (${t2}/${n2})`;
|
|
3325
3331
|
if (i2 !== void 0 && this.firstTime(`plural ${t2} ${n2} ${e7}`)) {
|
|
3326
|
-
var p2 =
|
|
3332
|
+
var p2 = Qa.concat(Qa.map(function(e8) {
|
|
3327
3333
|
return `ordinal${c2}${e8}`;
|
|
3328
3334
|
})).map(function(t3) {
|
|
3329
3335
|
return `${e7}${c2}${t3}`;
|
|
@@ -3337,33 +3343,33 @@ var $a = function() {
|
|
|
3337
3343
|
} }, { key: `firstTime`, value: function(e7) {
|
|
3338
3344
|
return !this.warned.has(e7) && (this.warned.add(e7), true);
|
|
3339
3345
|
} }, { key: `warn`, value: function(e7) {
|
|
3340
|
-
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${
|
|
3346
|
+
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${Za}`);
|
|
3341
3347
|
} }, { key: `clearCache`, value: function() {
|
|
3342
3348
|
this.mem = {};
|
|
3343
3349
|
} }, { key: `escapeVariableValues`, value: function(e7) {
|
|
3344
|
-
if (!this.options.escapeVariables || !e7 ||
|
|
3350
|
+
if (!this.options.escapeVariables || !e7 || U(e7) !== `object`) return e7;
|
|
3345
3351
|
for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
|
|
3346
|
-
var i2 =
|
|
3352
|
+
var i2 = La(r2[n2], 2), a2 = i2[0], o2 = i2[1];
|
|
3347
3353
|
t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`) : o2;
|
|
3348
3354
|
}
|
|
3349
3355
|
return t2;
|
|
3350
3356
|
} }]), e6;
|
|
3351
3357
|
}();
|
|
3352
|
-
|
|
3353
|
-
function
|
|
3358
|
+
to.type = `i18nFormat`;
|
|
3359
|
+
function no({ icuOptions: e6 = {}, ...t2 }) {
|
|
3354
3360
|
let { parseErrorHandler: n2 = void 0 } = t2;
|
|
3355
|
-
return
|
|
3361
|
+
return mi(t2, { icu: new to({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
|
|
3356
3362
|
}
|
|
3357
|
-
var
|
|
3363
|
+
var ro = (e6, t2, n2, r2) => {
|
|
3358
3364
|
let i2 = [n2, { code: t2, ...r2 || {} }];
|
|
3359
3365
|
if (e6?.services?.logger?.forward) return e6.services.logger.forward(i2, `warn`, `react-i18next::`, true);
|
|
3360
|
-
|
|
3366
|
+
W(i2[0]) && (i2[0] = `react-i18next:: ${i2[0]}`), e6?.services?.logger?.warn ? e6.services.logger.warn(...i2) : console?.warn && console.warn(...i2);
|
|
3361
3367
|
};
|
|
3362
|
-
var
|
|
3363
|
-
var
|
|
3364
|
-
|
|
3368
|
+
var io = {};
|
|
3369
|
+
var ao = (e6, t2, n2, r2) => {
|
|
3370
|
+
W(n2) && io[n2] || (W(n2) && (io[n2] = /* @__PURE__ */ new Date()), ro(e6, t2, n2, r2));
|
|
3365
3371
|
};
|
|
3366
|
-
var
|
|
3372
|
+
var oo = (e6, t2) => () => {
|
|
3367
3373
|
if (e6.isInitialized) t2();
|
|
3368
3374
|
else {
|
|
3369
3375
|
let n2 = () => {
|
|
@@ -3374,29 +3380,29 @@ var io = (e6, t2) => () => {
|
|
|
3374
3380
|
e6.on(`initialized`, n2);
|
|
3375
3381
|
}
|
|
3376
3382
|
};
|
|
3377
|
-
var
|
|
3378
|
-
e6.loadNamespaces(t2,
|
|
3383
|
+
var so = (e6, t2, n2) => {
|
|
3384
|
+
e6.loadNamespaces(t2, oo(e6, n2));
|
|
3379
3385
|
};
|
|
3380
|
-
var
|
|
3381
|
-
if (
|
|
3386
|
+
var co = (e6, t2, n2, r2) => {
|
|
3387
|
+
if (W(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return so(e6, n2, r2);
|
|
3382
3388
|
n2.forEach((t3) => {
|
|
3383
3389
|
e6.options.ns.indexOf(t3) < 0 && e6.options.ns.push(t3);
|
|
3384
|
-
}), e6.loadLanguages(t2,
|
|
3390
|
+
}), e6.loadLanguages(t2, oo(e6, r2));
|
|
3385
3391
|
};
|
|
3386
|
-
var
|
|
3392
|
+
var lo = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? (ao(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
|
|
3387
3393
|
if (n2.bindI18n && n2.bindI18n.indexOf(`languageChanging`) > -1 && t3.services.backendConnector.backend && t3.isLanguageChangingTo && !r2(t3.isLanguageChangingTo, e6)) return false;
|
|
3388
3394
|
} });
|
|
3389
|
-
var
|
|
3390
|
-
var
|
|
3391
|
-
var
|
|
3392
|
-
var
|
|
3393
|
-
var
|
|
3394
|
-
var
|
|
3395
|
-
var mo = () => po;
|
|
3396
|
-
var ho;
|
|
3395
|
+
var W = (e6) => typeof e6 == `string`;
|
|
3396
|
+
var uo = (e6) => typeof e6 == `object` && !!e6;
|
|
3397
|
+
var fo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
3398
|
+
var po = { "&": `&`, "&": `&`, "<": `<`, "<": `<`, ">": `>`, ">": `>`, "'": `'`, "'": `'`, """: `"`, """: `"`, " ": ` `, " ": ` `, "©": `\xA9`, "©": `\xA9`, "®": `\xAE`, "®": `\xAE`, "…": `\u2026`, "…": `\u2026`, "/": `/`, "/": `/` };
|
|
3399
|
+
var mo = (e6) => po[e6];
|
|
3400
|
+
var ho = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(fo, mo) };
|
|
3397
3401
|
var go = () => ho;
|
|
3398
|
-
var _o
|
|
3399
|
-
var vo =
|
|
3402
|
+
var _o;
|
|
3403
|
+
var vo = () => _o;
|
|
3404
|
+
var yo = (0, import_react.createContext)();
|
|
3405
|
+
var bo = class {
|
|
3400
3406
|
constructor() {
|
|
3401
3407
|
this.usedNamespaces = {};
|
|
3402
3408
|
}
|
|
@@ -3409,32 +3415,32 @@ var vo = class {
|
|
|
3409
3415
|
return Object.keys(this.usedNamespaces);
|
|
3410
3416
|
}
|
|
3411
3417
|
};
|
|
3412
|
-
var
|
|
3418
|
+
var xo = (e6, t2) => {
|
|
3413
3419
|
let n2 = (0, import_react.useRef)();
|
|
3414
3420
|
return (0, import_react.useEffect)(() => {
|
|
3415
3421
|
n2.current = t2 ? n2.current : e6;
|
|
3416
3422
|
}, [e6, t2]), n2.current;
|
|
3417
3423
|
};
|
|
3418
|
-
var
|
|
3419
|
-
var
|
|
3420
|
-
var
|
|
3421
|
-
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = (0, import_react.useContext)(
|
|
3422
|
-
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new
|
|
3423
|
-
|
|
3424
|
-
let e7 = (e8, t4) =>
|
|
3424
|
+
var So = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
|
|
3425
|
+
var Co = (e6, t2, n2, r2) => (0, import_react.useCallback)(So(e6, t2, n2, r2), [e6, t2, n2, r2]);
|
|
3426
|
+
var wo = (e6, t2 = {}) => {
|
|
3427
|
+
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = (0, import_react.useContext)(yo) || {}, a2 = n2 || r2 || vo();
|
|
3428
|
+
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new bo()), !a2) {
|
|
3429
|
+
ao(a2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
|
|
3430
|
+
let e7 = (e8, t4) => W(t4) ? t4 : uo(t4) && W(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
|
|
3425
3431
|
return t3.t = e7, t3.i18n = {}, t3.ready = false, t3;
|
|
3426
3432
|
}
|
|
3427
|
-
a2.options.react?.wait &&
|
|
3428
|
-
let c2 = { ...
|
|
3429
|
-
p2 =
|
|
3430
|
-
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) =>
|
|
3433
|
+
a2.options.react?.wait && ao(a2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
|
|
3434
|
+
let c2 = { ...go(), ...a2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = c2, p2 = e6 || i2 || a2.options?.defaultNS;
|
|
3435
|
+
p2 = W(p2) ? [p2] : p2 || [`translation`], a2.reportNamespaces.addUsedNamespaces?.(p2);
|
|
3436
|
+
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) => lo(e7, a2, c2)), h2 = Co(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), g2 = () => h2, _2 = () => So(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), [v2, y2] = (0, import_react.useState)(g2), b2 = p2.join();
|
|
3431
3437
|
t2.lng && (b2 = `${t2.lng}${b2}`);
|
|
3432
|
-
let x2 =
|
|
3438
|
+
let x2 = xo(b2), S2 = (0, import_react.useRef)(true);
|
|
3433
3439
|
(0, import_react.useEffect)(() => {
|
|
3434
3440
|
let { bindI18n: e7, bindI18nStore: n3 } = c2;
|
|
3435
|
-
S2.current = true, !m2 && !d2 && (t2.lng ?
|
|
3441
|
+
S2.current = true, !m2 && !d2 && (t2.lng ? co(a2, t2.lng, p2, () => {
|
|
3436
3442
|
S2.current && y2(_2);
|
|
3437
|
-
}) :
|
|
3443
|
+
}) : so(a2, p2, () => {
|
|
3438
3444
|
S2.current && y2(_2);
|
|
3439
3445
|
})), m2 && x2 && x2 !== b2 && S2.current && y2(_2);
|
|
3440
3446
|
let r3 = () => {
|
|
@@ -3449,131 +3455,131 @@ var So = (e6, t2 = {}) => {
|
|
|
3449
3455
|
let C2 = [v2, a2, m2];
|
|
3450
3456
|
if (C2.t = v2, C2.i18n = a2, C2.ready = m2, m2 || !m2 && !d2) return C2;
|
|
3451
3457
|
throw new Promise((e7) => {
|
|
3452
|
-
t2.lng ?
|
|
3458
|
+
t2.lng ? co(a2, t2.lng, p2, () => e7()) : so(a2, p2, () => e7());
|
|
3453
3459
|
});
|
|
3454
3460
|
};
|
|
3455
|
-
function
|
|
3461
|
+
function To({ i18n: e6, defaultNS: t2, children: n2 }) {
|
|
3456
3462
|
let i2 = (0, import_react.useMemo)(() => ({ i18n: e6, defaultNS: t2 }), [e6, t2]);
|
|
3457
|
-
return (0, import_react.createElement)(
|
|
3463
|
+
return (0, import_react.createElement)(yo.Provider, { value: i2 }, n2);
|
|
3458
3464
|
}
|
|
3459
|
-
var
|
|
3460
|
-
var
|
|
3461
|
-
function
|
|
3465
|
+
var Eo = `wix-warmup-data`;
|
|
3466
|
+
var Do = null;
|
|
3467
|
+
function Oo(e6) {
|
|
3462
3468
|
if (typeof document < `u`) try {
|
|
3463
|
-
let t2 = document.getElementById(
|
|
3464
|
-
return t2 ? (
|
|
3469
|
+
let t2 = document.getElementById(Eo)?.textContent;
|
|
3470
|
+
return t2 ? (Do?.text !== t2 && (Do = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Do.data[e6] ?? void 0) : void 0;
|
|
3465
3471
|
} catch {
|
|
3466
3472
|
return;
|
|
3467
3473
|
}
|
|
3468
3474
|
}
|
|
3469
|
-
var
|
|
3470
|
-
var
|
|
3471
|
-
var
|
|
3472
|
-
var
|
|
3473
|
-
var
|
|
3474
|
-
let t2 = e6.scope ??
|
|
3475
|
-
return n2 || (n2 = /* @__PURE__ */ new Map(),
|
|
3475
|
+
var ko = 5e3;
|
|
3476
|
+
var Ao = 100;
|
|
3477
|
+
var jo = {};
|
|
3478
|
+
var Mo = /* @__PURE__ */ new WeakMap();
|
|
3479
|
+
var No = (e6) => {
|
|
3480
|
+
let t2 = e6.scope ?? jo, n2 = Mo.get(t2);
|
|
3481
|
+
return n2 || (n2 = /* @__PURE__ */ new Map(), Mo.set(t2, n2)), n2;
|
|
3476
3482
|
};
|
|
3477
|
-
function
|
|
3483
|
+
function Po({ key: e6, warmupData: t2, fetchData: n2 }) {
|
|
3478
3484
|
if (e6 === null) return n2();
|
|
3479
3485
|
if (t2.isServer) return n2().then((n3) => (t2.set(e6, n3), n3));
|
|
3480
|
-
let r2 =
|
|
3486
|
+
let r2 = No(t2), i2 = Date.now();
|
|
3481
3487
|
for (let [e7, t3] of r2) t3.expiresAt <= i2 && r2.delete(e7);
|
|
3482
3488
|
let a2 = r2.get(e6);
|
|
3483
3489
|
if (a2) return a2.promise;
|
|
3484
|
-
let o2 =
|
|
3490
|
+
let o2 = Oo(e6);
|
|
3485
3491
|
if (o2 !== void 0) {
|
|
3486
|
-
let t3 =
|
|
3487
|
-
return r2.set(e6, { promise: t3, expiresAt: i2 +
|
|
3492
|
+
let t3 = zn(o2);
|
|
3493
|
+
return r2.set(e6, { promise: t3, expiresAt: i2 + ko }), t3;
|
|
3488
3494
|
}
|
|
3489
3495
|
let s2 = (async () => await t2.get(e6) ?? n2())();
|
|
3490
|
-
r2.size >=
|
|
3496
|
+
r2.size >= Ao && r2.delete(r2.keys().next().value);
|
|
3491
3497
|
let c2 = { promise: s2, expiresAt: 1 / 0 };
|
|
3492
3498
|
return r2.set(e6, c2), s2.then(() => {
|
|
3493
|
-
c2.expiresAt = Date.now() +
|
|
3499
|
+
c2.expiresAt = Date.now() + ko;
|
|
3494
3500
|
}, () => {
|
|
3495
3501
|
r2.get(e6) === c2 && r2.delete(e6);
|
|
3496
3502
|
}), s2;
|
|
3497
3503
|
}
|
|
3498
|
-
var
|
|
3499
|
-
var
|
|
3500
|
-
var
|
|
3501
|
-
var
|
|
3502
|
-
function
|
|
3503
|
-
let n2 =
|
|
3504
|
+
var Fo = `blog-builder:i18n`;
|
|
3505
|
+
var Io = `translation`;
|
|
3506
|
+
var Lo = () => Oo(Fo);
|
|
3507
|
+
var Ro = /* @__PURE__ */ new Map();
|
|
3508
|
+
function zo(e6, t2) {
|
|
3509
|
+
let n2 = Ro.get(e6);
|
|
3504
3510
|
if (n2) return n2;
|
|
3505
|
-
let r2 =
|
|
3506
|
-
return
|
|
3511
|
+
let r2 = Lo(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = no({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
|
|
3512
|
+
return Ro.set(e6, a2), a2;
|
|
3507
3513
|
}
|
|
3508
|
-
function
|
|
3509
|
-
let t2 = () => e6.loadNamespaces(
|
|
3514
|
+
function Bo(e6) {
|
|
3515
|
+
let t2 = () => e6.loadNamespaces(Io).then(() => void 0, () => void 0);
|
|
3510
3516
|
return e6.isInitialized ? t2() : new Promise((n2) => {
|
|
3511
3517
|
e6.on(`initialized`, () => void t2().then(n2));
|
|
3512
3518
|
});
|
|
3513
3519
|
}
|
|
3514
|
-
function
|
|
3520
|
+
function Vo(e6, t2) {
|
|
3515
3521
|
return e6.getResourceBundle(t2, `translation`) ?? e6.getResourceBundle(`en`, `translation`);
|
|
3516
3522
|
}
|
|
3517
|
-
var
|
|
3523
|
+
var Ho = (e6, t2, n2) => {
|
|
3518
3524
|
let r2 = t2.lastIndexOf(`?`), i2 = e6[r2 === -1 || r2 < t2.lastIndexOf(`/`) ? t2 : t2.slice(0, r2)];
|
|
3519
3525
|
return i2 ? typeof i2 == `function` ? i2() : Promise.resolve(i2) : new Promise((e7, r3) => {
|
|
3520
3526
|
(typeof queueMicrotask == `function` ? queueMicrotask : setTimeout)(r3.bind(null, Error(`Unknown variable dynamic import: ` + t2 + (t2.split(`/`).length === n2 ? `` : `. Note that variables only represent file names one level deep.`))));
|
|
3521
3527
|
});
|
|
3522
3528
|
};
|
|
3523
|
-
var
|
|
3524
|
-
Sr({ isDev: false, loadMessages: (e6) =>
|
|
3525
|
-
var
|
|
3526
|
-
function
|
|
3527
|
-
let t2 =
|
|
3528
|
-
return t2 || (t2 =
|
|
3529
|
+
var Uo = (e6) => e6.split(`-`)[0] ?? e6;
|
|
3530
|
+
Sr({ isDev: false, loadMessages: (e6) => Ho(Object.assign({ "../assets/locale/messages_en.dev.json": () => _n(() => Promise.resolve().then(() => Jo), void 0, import_meta.url), "../assets/locale/messages_en.json": () => _n(() => Promise.resolve().then(() => Xo), void 0, import_meta.url) }), `../assets/locale/messages_${Uo(e6)}.json`, 4), loadDevMessages: (e6) => Ho(Object.assign({ "../assets/locale/messages_en.dev.json": () => _n(() => Promise.resolve().then(() => Jo), void 0, import_meta.url) }), `../assets/locale/messages_${Uo(e6)}.dev.json`, 4) });
|
|
3531
|
+
var Wo = /* @__PURE__ */ new WeakMap();
|
|
3532
|
+
function Go(e6) {
|
|
3533
|
+
let t2 = Wo.get(e6);
|
|
3534
|
+
return t2 || (t2 = Bo(e6).finally(() => Wo.delete(e6)), Wo.set(e6, t2)), t2;
|
|
3529
3535
|
}
|
|
3530
|
-
function
|
|
3531
|
-
let n2 =
|
|
3536
|
+
function Ko({ i18n: e6, locale: t2 }) {
|
|
3537
|
+
let n2 = Kn(), r2 = yr();
|
|
3532
3538
|
if (!n2) return null;
|
|
3533
|
-
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw
|
|
3534
|
-
let i2 =
|
|
3535
|
-
return i2 && r2.set(
|
|
3536
|
-
}
|
|
3537
|
-
function
|
|
3538
|
-
let t2 =
|
|
3539
|
-
return { i18n:
|
|
3540
|
-
}
|
|
3541
|
-
var
|
|
3542
|
-
var
|
|
3543
|
-
var
|
|
3544
|
-
var
|
|
3545
|
-
var
|
|
3546
|
-
var
|
|
3547
|
-
var
|
|
3548
|
-
let n2 =
|
|
3539
|
+
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw Go(e6);
|
|
3540
|
+
let i2 = Vo(e6, t2);
|
|
3541
|
+
return i2 && r2.set(Fo, { locale: t2, messages: i2 }), null;
|
|
3542
|
+
}
|
|
3543
|
+
function qo(e6) {
|
|
3544
|
+
let t2 = hr(), n2 = Lo()?.locale ?? t2 ?? `en`;
|
|
3545
|
+
return { i18n: zo(n2, e6), locale: n2 };
|
|
3546
|
+
}
|
|
3547
|
+
var Jo = _({ default: () => Yo });
|
|
3548
|
+
var Yo = { "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "post-list.empty-state.title": `No posts yet`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "related-posts.empty-state.title": `No related posts yet`, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "post-actions.like": `Like post`, "post-actions.unlike": `Unlike post`, "post-actions.share": `Share post`, "post-actions.share-dialog": `Share post`, "post-actions.link-copied": `Link copied`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.link-label": `Post link`, "post-actions.copy-link": `Copy link`, "post-actions.close": `Close`, "post-counters.loading-likes": `Loading likes`, "cover-media.play": `Play video`, "cover-media.placeholder-alt": `Post cover image`, "post-comments.loading": `Loading comments\u2026`, "post-comments.no-post": `No post resolved for this URL yet.`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, "canvas.post-title": `Post Title`, "canvas.author-name": `Author Name`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "canvas.category": `Category`, "canvas.category-numbered": `Category {number}`, "canvas.tag-numbered": `Tag {number}`, "canvas.author-photo-alt": `Author photo`, "category-header.all-posts": `All Posts` };
|
|
3549
|
+
var Xo = _({ default: () => Qo, title: () => Zo });
|
|
3550
|
+
var Zo = `My App`;
|
|
3551
|
+
var Qo = { "canvas.category": `Category`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "canvas.tag-numbered": `Tag {number}`, "cover-media.play": `Play video`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-counters.loading-likes": `Loading likes`, "post-comments.loading": `Loading comments\u2026`, "post-actions.like": `Like post`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "related-posts.empty-state.title": `No related posts yet`, "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post-actions.link-copied": `Link copied`, "category-header.all-posts": `All Posts`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.copy-link": `Copy link`, "cover-media.placeholder-alt": `Post cover image`, "post-actions.link-label": `Post link`, "post-list.empty-state.title": `No posts yet`, "post-actions.share-dialog": `Share post`, "canvas.post-title": `Post Title`, "post-actions.unlike": `Unlike post`, "post-comments.no-post": `No post resolved for this URL yet.`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "canvas.category-numbered": `Category {number}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post-actions.share": `Share post`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post-actions.close": `Close`, "canvas.category-description": `Add a short description of this category so readers know what they will find here. It shows under the category title, above the posts.`, "canvas.author-photo-alt": `Author photo`, "canvas.author-name": `Author Name`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, title: Zo, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.` };
|
|
3552
|
+
var $o = Object.assign({ "../assets/locale/messages_en.dev.json": Jo, "../assets/locale/messages_en.json": Xo });
|
|
3553
|
+
var es = (e6, t2) => {
|
|
3554
|
+
let n2 = $o[`../assets/locale/messages_${Uo(e6)}${t2}.json`];
|
|
3549
3555
|
return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
|
|
3550
3556
|
};
|
|
3551
|
-
var
|
|
3552
|
-
var
|
|
3553
|
-
var
|
|
3554
|
-
var
|
|
3555
|
-
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted:
|
|
3556
|
-
return { timeToRead: (t3) => e6(
|
|
3557
|
+
var ts = Sr({ isDev: false, loadMessages: (e6) => es(e6, ``), loadDevMessages: (e6) => es(e6, `.dev`) });
|
|
3558
|
+
var ns = (e6, t2, n2) => typeof e6 != `number` || !Number.isFinite(e6) || e6 < 0 ? `` : new Intl.NumberFormat(n2, t2 === `compact` ? { notation: `compact`, maximumFractionDigits: 1 } : void 0).format(e6);
|
|
3559
|
+
var G = { timeToRead: `post.time-to-read`, viewCount: `post.view-count`, commentCount: `post.comment-count`, likeCount: `post.like-count`, noPostsTitle: `post-list.empty-state.title`, noPostsDescription: `post-list.empty-state.description`, noRelatedPostsTitle: `related-posts.empty-state.title`, noRelatedPostsDescription: `related-posts.empty-state.description`, canvasPostTitle: `canvas.post-title`, canvasAuthorName: `canvas.author-name`, canvasExcerpt: `canvas.excerpt`, canvasContent: `canvas.content`, canvasCategory: `canvas.category`, canvasCategoryNumbered: `canvas.category-numbered`, canvasTagNumbered: `canvas.tag-numbered`, canvasCoverAlt: `cover-media.placeholder-alt`, canvasAuthorPhotoAlt: `canvas.author-photo-alt` };
|
|
3560
|
+
var rs = (e6, t2) => {
|
|
3561
|
+
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: ns(r2, `full`, t2) });
|
|
3562
|
+
return { timeToRead: (t3) => e6(G.timeToRead, { count: t3 }), viewCount: n2(G.viewCount), commentCount: n2(G.commentCount), likeCount: n2(G.likeCount), noPostsEmptyState: () => ({ title: e6(G.noPostsTitle), description: e6(G.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6(G.noRelatedPostsTitle), description: e6(G.noRelatedPostsDescription) }), canvas: { postTitle: () => e6(G.canvasPostTitle), authorName: () => e6(G.canvasAuthorName), excerpt: () => e6(G.canvasExcerpt), content: () => e6(G.canvasContent), category: () => e6(G.canvasCategory), categoryNumbered: (t3) => e6(G.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6(G.canvasTagNumbered, { number: t3 }), coverAlt: () => e6(G.canvasCoverAlt), authorPhotoAlt: () => e6(G.canvasAuthorPhotoAlt) } };
|
|
3557
3563
|
};
|
|
3558
|
-
function
|
|
3564
|
+
function is(e6) {
|
|
3559
3565
|
return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
|
|
3560
3566
|
}
|
|
3561
|
-
function
|
|
3567
|
+
function as(e6) {
|
|
3562
3568
|
return Object.keys(e6).length === 1 && `$or` in e6 && Array.isArray(e6.$or);
|
|
3563
3569
|
}
|
|
3564
|
-
function
|
|
3570
|
+
function os(e6) {
|
|
3565
3571
|
return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
|
|
3566
3572
|
}
|
|
3567
|
-
function
|
|
3568
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...
|
|
3573
|
+
function K(e6, t2) {
|
|
3574
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...is(e6) ? e6.$and : [e6], ...is(t2) ? t2.$and : [t2]] };
|
|
3569
3575
|
}
|
|
3570
|
-
function
|
|
3571
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...
|
|
3576
|
+
function ss(e6, t2) {
|
|
3577
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...as(e6) ? e6.$or : [e6], ...as(t2) ? t2.$or : [t2]] };
|
|
3572
3578
|
}
|
|
3573
|
-
function
|
|
3574
|
-
if (e6 !== void 0 && Object.keys(e6).length !== 0) return
|
|
3579
|
+
function cs(e6) {
|
|
3580
|
+
if (e6 !== void 0 && Object.keys(e6).length !== 0) return os(e6) ? e6.$not : { $not: e6 };
|
|
3575
3581
|
}
|
|
3576
|
-
var
|
|
3582
|
+
var ls = class {
|
|
3577
3583
|
_items;
|
|
3578
3584
|
_fetchNextPage;
|
|
3579
3585
|
_fetchPrevPage;
|
|
@@ -3603,7 +3609,7 @@ var ss = class {
|
|
|
3603
3609
|
return await this._fetchPrevPage();
|
|
3604
3610
|
}
|
|
3605
3611
|
};
|
|
3606
|
-
var
|
|
3612
|
+
var us = class extends ls {
|
|
3607
3613
|
_nextCursor;
|
|
3608
3614
|
_prevCursor;
|
|
3609
3615
|
cursors;
|
|
@@ -3617,7 +3623,7 @@ var cs = class extends ss {
|
|
|
3617
3623
|
return !!this._prevCursor;
|
|
3618
3624
|
}
|
|
3619
3625
|
};
|
|
3620
|
-
var
|
|
3626
|
+
var ds = class extends ls {
|
|
3621
3627
|
_totalCount;
|
|
3622
3628
|
_offset;
|
|
3623
3629
|
_tooManyToCount;
|
|
@@ -3640,76 +3646,76 @@ var ls = class extends ss {
|
|
|
3640
3646
|
return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
|
|
3641
3647
|
}
|
|
3642
3648
|
};
|
|
3643
|
-
function
|
|
3649
|
+
function fs(e6) {
|
|
3644
3650
|
let t2 = (n2) => ({ query: n2, async find() {
|
|
3645
3651
|
try {
|
|
3646
3652
|
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [Ze]: a2, [Qe]: o2 } = e6.responseTransformer(i2);
|
|
3647
3653
|
if (e6.pagingMethod === `OFFSET`) {
|
|
3648
3654
|
let e7 = n2;
|
|
3649
|
-
return new
|
|
3655
|
+
return new ds({ items: a2 ?? [], fetchNextPage: () => t2({ ...e7, paging: { offset: e7.paging.offset + e7.paging.limit, limit: e7.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e7.paging.offset - e7.paging.limit, 0), limit: e7.paging.limit } }).find(), offset: e7.paging.offset, limit: e7.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
|
|
3650
3656
|
}
|
|
3651
3657
|
let s2 = n2.cursorPaging;
|
|
3652
|
-
return new
|
|
3658
|
+
return new us({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
|
|
3653
3659
|
} catch (t3) {
|
|
3654
3660
|
throw e6.errorTransformer(t3);
|
|
3655
3661
|
}
|
|
3656
3662
|
}, skipTo(e7) {
|
|
3657
3663
|
return t2({ ...n2, cursorPaging: { cursor: e7, limit: n2.cursorPaging.limit } });
|
|
3658
3664
|
}, eq(r2, i2) {
|
|
3659
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3660
|
-
return t2({ ...n2, filter:
|
|
3665
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [q(e6.transformationPaths, r2)]: a2 };
|
|
3666
|
+
return t2({ ...n2, filter: K(n2.filter, o2) });
|
|
3661
3667
|
}, ne(r2, i2) {
|
|
3662
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3663
|
-
return t2({ ...n2, filter:
|
|
3668
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [q(e6.transformationPaths, r2)]: { $ne: a2 } };
|
|
3669
|
+
return t2({ ...n2, filter: K(n2.filter, o2) });
|
|
3664
3670
|
}, ge(r2, i2) {
|
|
3665
|
-
let a2 = { [
|
|
3666
|
-
return t2({ ...n2, filter:
|
|
3671
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $gte: i2 } };
|
|
3672
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3667
3673
|
}, gt(r2, i2) {
|
|
3668
|
-
let a2 = { [
|
|
3669
|
-
return t2({ ...n2, filter:
|
|
3674
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $gt: i2 } };
|
|
3675
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3670
3676
|
}, le(r2, i2) {
|
|
3671
|
-
let a2 = { [
|
|
3672
|
-
return t2({ ...n2, filter:
|
|
3677
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $lte: i2 } };
|
|
3678
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3673
3679
|
}, lt(r2, i2) {
|
|
3674
|
-
let a2 = { [
|
|
3675
|
-
return t2({ ...n2, filter:
|
|
3680
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $lt: i2 } };
|
|
3681
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3676
3682
|
}, isNotEmpty(e7) {
|
|
3677
3683
|
return this.ne(e7, null);
|
|
3678
3684
|
}, isEmpty(e7) {
|
|
3679
3685
|
return this.eq(e7, null);
|
|
3680
3686
|
}, startsWith(r2, i2) {
|
|
3681
|
-
let a2 = { [
|
|
3682
|
-
return t2({ ...n2, filter:
|
|
3687
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $startsWith: i2 } };
|
|
3688
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3683
3689
|
}, endsWith(r2, i2) {
|
|
3684
|
-
let a2 = { [
|
|
3685
|
-
return t2({ ...n2, filter:
|
|
3690
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $endsWith: i2 } };
|
|
3691
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3686
3692
|
}, contains(r2, i2) {
|
|
3687
|
-
let a2 = { [
|
|
3688
|
-
return t2({ ...n2, filter:
|
|
3693
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $contains: i2 } };
|
|
3694
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3689
3695
|
}, hasSome(r2, ...i2) {
|
|
3690
|
-
let a2 = { [
|
|
3691
|
-
return t2({ ...n2, filter:
|
|
3696
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3697
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3692
3698
|
}, hasAll(r2, ...i2) {
|
|
3693
|
-
let a2 = { [
|
|
3694
|
-
return t2({ ...n2, filter:
|
|
3699
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3700
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3695
3701
|
}, between(e7, t3, n3) {
|
|
3696
3702
|
return this.ge(e7, t3).lt(e7, n3);
|
|
3697
3703
|
}, in(r2, i2) {
|
|
3698
|
-
let a2 = { [
|
|
3699
|
-
return t2({ ...n2, filter:
|
|
3704
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $in: i2 } };
|
|
3705
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3700
3706
|
}, exists(r2, i2 = true) {
|
|
3701
|
-
let a2 = { [
|
|
3702
|
-
return t2({ ...n2, filter:
|
|
3707
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $exists: i2 } };
|
|
3708
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3703
3709
|
}, or(e7) {
|
|
3704
|
-
return t2({ ...n2, filter:
|
|
3710
|
+
return t2({ ...n2, filter: ss(n2.filter, e7.query.filter) });
|
|
3705
3711
|
}, and(e7) {
|
|
3706
|
-
return t2({ ...n2, filter:
|
|
3712
|
+
return t2({ ...n2, filter: K(n2.filter, e7.query.filter) });
|
|
3707
3713
|
}, not(e7) {
|
|
3708
|
-
return t2({ ...n2, filter:
|
|
3714
|
+
return t2({ ...n2, filter: cs(e7.query.filter) });
|
|
3709
3715
|
}, ascending(...r2) {
|
|
3710
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3716
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: q(e6.transformationPaths, t3), order: `ASC` }))] });
|
|
3711
3717
|
}, descending(...r2) {
|
|
3712
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3718
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: q(e6.transformationPaths, t3), order: `DESC` }))] });
|
|
3713
3719
|
}, skip(e7) {
|
|
3714
3720
|
return t2({ ...n2, paging: { offset: e7, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
|
|
3715
3721
|
}, limit(r2) {
|
|
@@ -3722,82 +3728,82 @@ function us(e6) {
|
|
|
3722
3728
|
} });
|
|
3723
3729
|
return t2({ filter: {}, ...e6.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
|
|
3724
3730
|
}
|
|
3725
|
-
function
|
|
3731
|
+
function q(e6, t2) {
|
|
3726
3732
|
let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
|
|
3727
3733
|
return n2 ? t2.replace(n2, e6[n2]) : et(t2, { ...e6, ...$e });
|
|
3728
3734
|
}
|
|
3729
|
-
var
|
|
3730
|
-
var
|
|
3731
|
-
var
|
|
3732
|
-
var
|
|
3733
|
-
var
|
|
3734
|
-
var
|
|
3735
|
-
function
|
|
3735
|
+
var ps = `filter`;
|
|
3736
|
+
var ms = `sort`;
|
|
3737
|
+
var hs = `cursorPaging`;
|
|
3738
|
+
var gs = `paging`;
|
|
3739
|
+
var _s = [ps, ms, hs];
|
|
3740
|
+
var vs = [ps, ms, gs];
|
|
3741
|
+
function ys(e6, t2) {
|
|
3736
3742
|
return !e6 || typeof e6 != `object` ? false : t2.some((t3) => e6.hasOwnProperty(t3));
|
|
3737
3743
|
}
|
|
3738
|
-
function
|
|
3739
|
-
return
|
|
3744
|
+
function bs(e6) {
|
|
3745
|
+
return ys(e6, _s);
|
|
3740
3746
|
}
|
|
3741
|
-
function
|
|
3742
|
-
return
|
|
3747
|
+
function xs(e6) {
|
|
3748
|
+
return ys(e6, vs);
|
|
3743
3749
|
}
|
|
3744
|
-
function
|
|
3750
|
+
function Ss(e6) {
|
|
3745
3751
|
let { hasOptionsParameter: t2 } = e6;
|
|
3746
3752
|
return function(...n2) {
|
|
3747
|
-
return t2 ?
|
|
3753
|
+
return t2 ? ws(n2, e6) : Cs(n2, e6);
|
|
3748
3754
|
};
|
|
3749
3755
|
}
|
|
3750
|
-
function
|
|
3756
|
+
function Cs(e6, t2) {
|
|
3751
3757
|
return e6.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e6[0]);
|
|
3752
3758
|
}
|
|
3753
|
-
function
|
|
3759
|
+
function ws(e6, t2) {
|
|
3754
3760
|
switch (e6.length) {
|
|
3755
3761
|
case 0:
|
|
3756
3762
|
return t2.builderQueryFunction();
|
|
3757
3763
|
case 1:
|
|
3758
|
-
return
|
|
3764
|
+
return bs(e6[0]) || xs(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
|
|
3759
3765
|
default:
|
|
3760
3766
|
return t2.typedQueryFunction(e6[0], e6[1]);
|
|
3761
3767
|
}
|
|
3762
3768
|
}
|
|
3763
|
-
function
|
|
3769
|
+
function J(e6) {
|
|
3764
3770
|
if (!e6) return;
|
|
3765
3771
|
let t2 = ``;
|
|
3766
3772
|
return (e6.filename || e6.altText) && (t2 = `/${encodeURIComponent(e6.filename || e6.altText)}`), e6.id ? `wix:image://v1/${e6.id}${t2}#originWidth=${e6.width}&originHeight=${e6.height}` : e6.url;
|
|
3767
3773
|
}
|
|
3768
|
-
function
|
|
3774
|
+
function Y(e6) {
|
|
3769
3775
|
if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
|
|
3770
3776
|
}
|
|
3771
|
-
var
|
|
3772
|
-
var
|
|
3773
|
-
function
|
|
3777
|
+
var Ts = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
|
|
3778
|
+
var Es = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
|
|
3779
|
+
function Ds(e6) {
|
|
3774
3780
|
return Lt(Object.assign(e6, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/category`, destPath: `/v3/bulk/category` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/categories`, destPath: `/v3/bulk/categories` }], "*.pub.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "bo._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wixbo.ai": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wix-bo.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "social-blog._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], _: [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www.wixapis.com": [{ srcPath: `/blog/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/v3/categories`, destPath: `/v3/categories` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "api._api_base_domain_": [{ srcPath: `/category-service-api-proxy`, destPath: `` }] } }));
|
|
3775
3781
|
}
|
|
3776
|
-
var
|
|
3777
|
-
function
|
|
3782
|
+
var Os = `@wix/auto_sdk_blog_categories`;
|
|
3783
|
+
function ks(e6) {
|
|
3778
3784
|
function t2({ host: t3 }) {
|
|
3779
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName:
|
|
3785
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: Os, migrationOptions: { optInTransformResponse: true }, url: Ds({ protoPath: `/v3/categories`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ts }, { transformFn: N, paths: Es }]) };
|
|
3780
3786
|
}
|
|
3781
3787
|
return t2;
|
|
3782
3788
|
}
|
|
3783
|
-
var
|
|
3784
|
-
var
|
|
3785
|
-
async function
|
|
3786
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3789
|
+
var As = [{ path: `categories.url` }, { path: `categories.translations.url` }];
|
|
3790
|
+
var js = [{ path: `categories.coverImage` }];
|
|
3791
|
+
async function Ms(e6) {
|
|
3792
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ks(D({ paging: e6?.paging, fieldsets: e6?.fieldsets, language: e6?.language }));
|
|
3787
3793
|
n2?.onSiteCall?.();
|
|
3788
3794
|
try {
|
|
3789
3795
|
let e7 = await t2.request(r2);
|
|
3790
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3796
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: As }, { transformFn: J, paths: js }]));
|
|
3791
3797
|
} catch (e7) {
|
|
3792
3798
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3793
3799
|
throw n2?.onError?.(e7), t3;
|
|
3794
3800
|
}
|
|
3795
3801
|
}
|
|
3796
|
-
function js(e6) {
|
|
3797
|
-
return (t2) => As(t2, { httpClient: e6 });
|
|
3798
|
-
}
|
|
3799
|
-
var Ms = M(js);
|
|
3800
3802
|
function Ns(e6) {
|
|
3803
|
+
return (t2) => Ms(t2, { httpClient: e6 });
|
|
3804
|
+
}
|
|
3805
|
+
var Ps = M(Ns);
|
|
3806
|
+
function X(e6) {
|
|
3801
3807
|
if (!e6) return;
|
|
3802
3808
|
let t2 = ``;
|
|
3803
3809
|
e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
|
|
@@ -3812,69 +3818,69 @@ function Ns(e6) {
|
|
|
3812
3818
|
}
|
|
3813
3819
|
return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
|
|
3814
3820
|
}
|
|
3815
|
-
var
|
|
3816
|
-
var
|
|
3817
|
-
var Is = [{ path: `post.heroImage.focalPoint.x` }, { path: `post.heroImage.focalPoint.y` }, { path: `post.media.wixMedia.image.focalPoint.x` }, { path: `post.media.wixMedia.image.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `post.metrics.averageRating` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `post.richContent.nodes.galleryData.items.image.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `post.richContent.nodes.galleryData.options.item.ratio` }, { path: `post.richContent.nodes.imageData.image.duration` }, { path: `post.richContent.nodes.imageData.crop.x` }, { path: `post.richContent.nodes.imageData.crop.y` }, { path: `post.richContent.nodes.imageData.crop.width` }, { path: `post.richContent.nodes.imageData.crop.height` }, { path: `post.richContent.nodes.mapData.mapSettings.lat` }, { path: `post.richContent.nodes.mapData.mapSettings.lng` }, { path: `post.richContent.nodes.pollData.poll.image.duration` }, { path: `post.richContent.nodes.pollData.poll.options.image.duration` }, { path: `post.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.appEmbedData.image.duration` }, { path: `post.richContent.nodes.videoData.video.duration` }, { path: `post.richContent.nodes.videoData.thumbnail.duration` }, { path: `post.richContent.nodes.audioData.audio.duration` }, { path: `post.richContent.nodes.audioData.coverImage.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `post.richContent.nodes.shapeData.shape.duration` }, { path: `post.richContent.nodes.cardData.background.gradient.centerX` }, { path: `post.richContent.nodes.cardData.background.gradient.centerY` }, { path: `post.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `post.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.tocData.fontSize` }, { path: `post.richContent.nodes.tocData.itemSpacing` }, { path: `post.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3818
|
-
var
|
|
3819
|
-
var
|
|
3820
|
-
var zs = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3821
|
-
var
|
|
3822
|
-
function
|
|
3821
|
+
var Fs = [{ path: `post.firstPublishedDate` }, { path: `post.lastPublishedDate` }, { path: `post.expirationDate` }, { path: `post.heroImage.urlExpirationDate` }, { path: `post.richContent.metadata.createdTimestamp` }, { path: `post.richContent.metadata.updatedTimestamp` }, { path: `post.moderationDetails.submittedDate` }, { path: `post.moderationDetails.moderationDate` }, { path: `post.media.wixMedia.image.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
3822
|
+
var Is = [{ path: `post.richContentCompressed` }];
|
|
3823
|
+
var Ls = [{ path: `post.heroImage.focalPoint.x` }, { path: `post.heroImage.focalPoint.y` }, { path: `post.media.wixMedia.image.focalPoint.x` }, { path: `post.media.wixMedia.image.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `post.metrics.averageRating` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `post.richContent.nodes.galleryData.items.image.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `post.richContent.nodes.galleryData.options.item.ratio` }, { path: `post.richContent.nodes.imageData.image.duration` }, { path: `post.richContent.nodes.imageData.crop.x` }, { path: `post.richContent.nodes.imageData.crop.y` }, { path: `post.richContent.nodes.imageData.crop.width` }, { path: `post.richContent.nodes.imageData.crop.height` }, { path: `post.richContent.nodes.mapData.mapSettings.lat` }, { path: `post.richContent.nodes.mapData.mapSettings.lng` }, { path: `post.richContent.nodes.pollData.poll.image.duration` }, { path: `post.richContent.nodes.pollData.poll.options.image.duration` }, { path: `post.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.appEmbedData.image.duration` }, { path: `post.richContent.nodes.videoData.video.duration` }, { path: `post.richContent.nodes.videoData.thumbnail.duration` }, { path: `post.richContent.nodes.audioData.audio.duration` }, { path: `post.richContent.nodes.audioData.coverImage.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `post.richContent.nodes.shapeData.shape.duration` }, { path: `post.richContent.nodes.cardData.background.gradient.centerX` }, { path: `post.richContent.nodes.cardData.background.gradient.centerY` }, { path: `post.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `post.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.tocData.fontSize` }, { path: `post.richContent.nodes.tocData.itemSpacing` }, { path: `post.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3824
|
+
var Rs = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.expirationDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
3825
|
+
var zs = [{ path: `posts.richContentCompressed` }];
|
|
3826
|
+
var Bs = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3827
|
+
var Vs = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3828
|
+
function Hs(e6) {
|
|
3823
3829
|
return Lt(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
|
|
3824
3830
|
}
|
|
3825
|
-
var
|
|
3826
|
-
function
|
|
3831
|
+
var Us = `@wix/auto_sdk_blog_posts`;
|
|
3832
|
+
function Ws(e6) {
|
|
3827
3833
|
function t2({ host: t3 }) {
|
|
3828
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName:
|
|
3834
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName: Us, migrationOptions: { optInTransformResponse: true }, url: Hs({ protoPath: `/v3/posts/slugs/{slug}`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Fs }, { transformFn: dn, paths: Is }, { transformFn: N, paths: Ls }]) };
|
|
3829
3835
|
}
|
|
3830
3836
|
return t2;
|
|
3831
3837
|
}
|
|
3832
|
-
function
|
|
3838
|
+
function Gs(e6) {
|
|
3833
3839
|
function t2({ host: t3 }) {
|
|
3834
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName:
|
|
3840
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName: Us, migrationOptions: { optInTransformResponse: true }, url: Hs({ protoPath: `/v3/posts`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Rs }, { transformFn: dn, paths: zs }, { transformFn: N, paths: Bs }]) };
|
|
3835
3841
|
}
|
|
3836
3842
|
return t2;
|
|
3837
3843
|
}
|
|
3838
|
-
function
|
|
3844
|
+
function Ks(e6) {
|
|
3839
3845
|
function t2({ host: t3 }) {
|
|
3840
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3841
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
3846
|
+
let n2 = A(e6, [{ transformFn: un, paths: Vs }]);
|
|
3847
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Us, migrationOptions: { optInTransformResponse: true }, url: Hs({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Rs }, { transformFn: dn, paths: zs }, { transformFn: N, paths: Bs }]) };
|
|
3842
3848
|
}
|
|
3843
3849
|
return t2;
|
|
3844
3850
|
}
|
|
3845
|
-
var
|
|
3846
|
-
var
|
|
3847
|
-
var
|
|
3848
|
-
var
|
|
3849
|
-
var
|
|
3850
|
-
var
|
|
3851
|
+
var qs = [{ path: `post.url` }, { path: `post.translations.url` }];
|
|
3852
|
+
var Js = [{ path: `post.heroImage` }, { path: `post.media.wixMedia.image` }];
|
|
3853
|
+
var Ys = [{ path: `post.media.wixMedia.videoV2` }];
|
|
3854
|
+
var Xs = [{ path: `posts.url` }, { path: `posts.translations.url` }];
|
|
3855
|
+
var Zs = [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }];
|
|
3856
|
+
var Qs = [{ path: `posts.media.wixMedia.videoV2` }];
|
|
3851
3857
|
var Z = ((e6) => (e6.UNKNOWN = `UNKNOWN`, e6.COUNTERS = `COUNTERS`, e6.URL = `URL`, e6.CONTENT_TEXT = `CONTENT_TEXT`, e6.METRICS = `METRICS`, e6.SEO = `SEO`, e6.CONTENT = `CONTENT`, e6.INTERNAL_ID = `INTERNAL_ID`, e6.CONTACT_ID = `CONTACT_ID`, e6.RICH_CONTENT = `RICH_CONTENT`, e6.RICH_CONTENT_STRING = `RICH_CONTENT_STRING`, e6.RICH_CONTENT_COMPRESSED = `RICH_CONTENT_COMPRESSED`, e6.TRANSLATIONS = `TRANSLATIONS`, e6.REFERENCE_ID = `REFERENCE_ID`, e6.EXCLUDE_PAID_CONTENT = `EXCLUDE_PAID_CONTENT`, e6.SEO_DATA = `SEO_DATA`, e6.OWNER = `OWNER`, e6.HAS_UNPUBLISHED_CHANGES = `HAS_UNPUBLISHED_CHANGES`, e6.HEADING = `HEADING`, e6.IMAGE = `IMAGE`, e6))(Z || {});
|
|
3852
|
-
async function
|
|
3853
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3858
|
+
async function $s(e6, t2) {
|
|
3859
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ws(D({ slug: e6, fieldsets: t2?.fieldsets, language: t2?.language }, []));
|
|
3854
3860
|
r2?.onSiteCall?.();
|
|
3855
3861
|
try {
|
|
3856
3862
|
let e7 = await n2.request(i2);
|
|
3857
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3863
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: qs }, { transformFn: J, paths: Js }, { transformFn: X, paths: Ys }]), [`post.richContent`, `post.rich_content`]);
|
|
3858
3864
|
} catch (e7) {
|
|
3859
3865
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fieldsets: `$[1].fieldsets`, language: `$[1].language` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
|
|
3860
3866
|
throw r2?.onError?.(e7), t3;
|
|
3861
3867
|
}
|
|
3862
3868
|
}
|
|
3863
|
-
async function
|
|
3864
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3869
|
+
async function ec(e6) {
|
|
3870
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Gs(D({ featured: e6?.featured, hashtags: e6?.hashtags, categoryIds: e6?.categoryIds, tagIds: e6?.tagIds, sort: e6?.sort, paging: e6?.paging, language: e6?.language, memberId: e6?.memberId, fieldsets: e6?.fieldsets }, []));
|
|
3865
3871
|
n2?.onSiteCall?.();
|
|
3866
3872
|
try {
|
|
3867
3873
|
let e7 = await t2.request(r2);
|
|
3868
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3874
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: Xs }, { transformFn: J, paths: Zs }, { transformFn: X, paths: Qs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3869
3875
|
} catch (e7) {
|
|
3870
3876
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { featured: `$[0].featured`, hashtags: `$[0].hashtags`, categoryIds: `$[0].categoryIds`, tagIds: `$[0].tagIds`, sort: `$[0].sort`, paging: `$[0].paging`, language: `$[0].language`, memberId: `$[0].memberId`, fieldsets: `$[0].fieldsets` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3871
3877
|
throw n2?.onError?.(e7), t3;
|
|
3872
3878
|
}
|
|
3873
3879
|
}
|
|
3874
|
-
function
|
|
3880
|
+
function tc(e6) {
|
|
3875
3881
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3876
|
-
return
|
|
3877
|
-
let i2 =
|
|
3882
|
+
return fs({ func: async (r2) => {
|
|
3883
|
+
let i2 = Ks({ ...r2, ...e6 ?? {} });
|
|
3878
3884
|
n2?.onSiteCall?.();
|
|
3879
3885
|
try {
|
|
3880
3886
|
let e7 = await t2.request(i2);
|
|
@@ -3886,76 +3892,76 @@ function ec(e6) {
|
|
|
3886
3892
|
let n3 = [t3, e6];
|
|
3887
3893
|
return D({ ...n3?.[1], query: n3?.[0] }, []);
|
|
3888
3894
|
}, responseTransformer: ({ data: e7 }) => {
|
|
3889
|
-
let t3 = O(A(e7, [{ transformFn:
|
|
3895
|
+
let t3 = O(A(e7, [{ transformFn: Y, paths: Xs }, { transformFn: J, paths: Zs }, { transformFn: X, paths: Qs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3890
3896
|
return { items: t3?.posts, pagingMetadata: t3?.pagingMetadata };
|
|
3891
3897
|
}, errorTransformer: (e7) => {
|
|
3892
3898
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3893
3899
|
}, pagingMethod: `CURSOR`, transformationPaths: {} });
|
|
3894
3900
|
}
|
|
3895
|
-
async function
|
|
3896
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3901
|
+
async function nc(e6, t2) {
|
|
3902
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ks(D({ query: e6, ...t2 }, []));
|
|
3897
3903
|
r2?.onSiteCall?.();
|
|
3898
3904
|
try {
|
|
3899
3905
|
let e7 = await n2.request(i2);
|
|
3900
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3906
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: Xs }, { transformFn: J, paths: Zs }, { transformFn: X, paths: Qs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3901
3907
|
} catch (e7) {
|
|
3902
3908
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
3903
3909
|
throw r2?.onError?.(e7), t3;
|
|
3904
3910
|
}
|
|
3905
3911
|
}
|
|
3906
|
-
function nc(e6) {
|
|
3907
|
-
return (t2, n2) => Qs(t2, n2, { httpClient: e6 });
|
|
3908
|
-
}
|
|
3909
3912
|
function rc(e6) {
|
|
3910
|
-
return (t2) => $s(t2, { httpClient: e6 });
|
|
3913
|
+
return (t2, n2) => $s(t2, n2, { httpClient: e6 });
|
|
3911
3914
|
}
|
|
3912
3915
|
function ic(e6) {
|
|
3913
3916
|
return (t2) => ec(t2, { httpClient: e6 });
|
|
3914
3917
|
}
|
|
3915
3918
|
function ac(e6) {
|
|
3916
|
-
return (t2
|
|
3919
|
+
return (t2) => tc(t2, { httpClient: e6 });
|
|
3917
3920
|
}
|
|
3918
3921
|
function oc(e6) {
|
|
3919
|
-
|
|
3922
|
+
return (t2, n2) => nc(t2, n2, { httpClient: e6 });
|
|
3923
|
+
}
|
|
3924
|
+
function sc(e6) {
|
|
3925
|
+
let t2 = Ss({ builderQueryFunction: (t3) => ac(e6)(t3), typedQueryFunction: (t3, n3) => oc(e6)(t3, n3), hasOptionsParameter: true });
|
|
3920
3926
|
function n2(e7, n3) {
|
|
3921
3927
|
return t2(...arguments);
|
|
3922
3928
|
}
|
|
3923
3929
|
return n2;
|
|
3924
3930
|
}
|
|
3925
|
-
var sc = M(nc);
|
|
3926
3931
|
var cc = M(rc);
|
|
3927
|
-
var lc = M(
|
|
3928
|
-
var uc = (
|
|
3929
|
-
var dc = `
|
|
3930
|
-
var fc =
|
|
3932
|
+
var lc = M(ic);
|
|
3933
|
+
var uc = M(sc);
|
|
3934
|
+
var dc = (e6) => O(A(e6, [{ transformFn: Y, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: J, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: X, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
|
|
3935
|
+
var fc = `https://blog.wixsite.com/blog-demo-posts`;
|
|
3936
|
+
var pc = M((e6) => async (t2) => {
|
|
3931
3937
|
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${It(t2)}`);
|
|
3932
3938
|
if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
|
|
3933
|
-
return
|
|
3939
|
+
return dc(await n2.json()).filter((e7) => !e7.url?.startsWith(fc));
|
|
3934
3940
|
});
|
|
3935
|
-
var
|
|
3941
|
+
var mc = async (e6) => {
|
|
3936
3942
|
try {
|
|
3937
|
-
return await
|
|
3943
|
+
return await pc(e6);
|
|
3938
3944
|
} catch (e7) {
|
|
3939
3945
|
return console.info(`[blog demo posts]`, `read failed`, e7), [];
|
|
3940
3946
|
}
|
|
3941
3947
|
};
|
|
3942
|
-
var
|
|
3943
|
-
var
|
|
3944
|
-
function
|
|
3948
|
+
var hc = [{ path: `members.createdDate` }, { path: `members.updatedDate` }, { path: `members.lastLoginDate` }];
|
|
3949
|
+
var gc = [{ path: `query.sorting.origin.latitude` }, { path: `query.sorting.origin.longitude` }];
|
|
3950
|
+
function _c(e6) {
|
|
3945
3951
|
return Lt(Object.assign(e6, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/members/v1/members`, destPath: `/v1/members` }], "api._api_base_domain_": [{ srcPath: `/members-ng-api`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "manage._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "blocks._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "create.editorx": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "*.dev.wix-code.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "bo._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wixbo.ai": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wix-bo.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], _: [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "members.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }] } }));
|
|
3946
3952
|
}
|
|
3947
|
-
var
|
|
3948
|
-
function
|
|
3953
|
+
var vc = `@wix/auto_sdk_members_members`;
|
|
3954
|
+
function yc(e6) {
|
|
3949
3955
|
function t2({ host: t3 }) {
|
|
3950
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3951
|
-
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName:
|
|
3956
|
+
let n2 = A(e6, [{ transformFn: un, paths: gc }]);
|
|
3957
|
+
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName: vc, migrationOptions: { optInTransformResponse: true }, url: _c({ protoPath: `/v1/members/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: hc }]) };
|
|
3952
3958
|
}
|
|
3953
3959
|
return t2;
|
|
3954
3960
|
}
|
|
3955
|
-
function
|
|
3961
|
+
function bc(e6) {
|
|
3956
3962
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3957
|
-
return
|
|
3958
|
-
let i2 =
|
|
3963
|
+
return fs({ func: async (r2) => {
|
|
3964
|
+
let i2 = yc({ ...r2, ...e6 ?? {} });
|
|
3959
3965
|
n2?.onSiteCall?.();
|
|
3960
3966
|
try {
|
|
3961
3967
|
let e7 = await t2.request(i2);
|
|
@@ -3973,8 +3979,8 @@ function yc(e6) {
|
|
|
3973
3979
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3974
3980
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
3975
3981
|
}
|
|
3976
|
-
async function
|
|
3977
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3982
|
+
async function xc(e6, t2) {
|
|
3983
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = yc(D({ query: e6, ...t2 }));
|
|
3978
3984
|
r2?.onSiteCall?.();
|
|
3979
3985
|
try {
|
|
3980
3986
|
let e7 = await n2.request(i2);
|
|
@@ -3984,25 +3990,25 @@ async function bc(e6, t2) {
|
|
|
3984
3990
|
throw r2?.onError?.(e7), t3;
|
|
3985
3991
|
}
|
|
3986
3992
|
}
|
|
3987
|
-
function xc(e6) {
|
|
3988
|
-
return (t2) => yc(t2, { httpClient: e6 });
|
|
3989
|
-
}
|
|
3990
3993
|
function Sc(e6) {
|
|
3991
|
-
return (t2
|
|
3994
|
+
return (t2) => bc(t2, { httpClient: e6 });
|
|
3992
3995
|
}
|
|
3993
3996
|
function Cc(e6) {
|
|
3994
|
-
|
|
3997
|
+
return (t2, n2) => xc(t2, n2, { httpClient: e6 });
|
|
3998
|
+
}
|
|
3999
|
+
function wc(e6) {
|
|
4000
|
+
let t2 = Ss({ builderQueryFunction: (t3) => Sc(e6)(t3), typedQueryFunction: (t3, n3) => Cc(e6)(t3, n3), hasOptionsParameter: true });
|
|
3995
4001
|
function n2(e7, n3) {
|
|
3996
4002
|
return t2(...arguments);
|
|
3997
4003
|
}
|
|
3998
4004
|
return n2;
|
|
3999
4005
|
}
|
|
4000
|
-
var
|
|
4001
|
-
var
|
|
4006
|
+
var Tc = M(wc);
|
|
4007
|
+
var Ec = async (e6) => {
|
|
4002
4008
|
let t2 = [...new Set(e6.filter((e7) => !!e7))];
|
|
4003
4009
|
if (t2.length === 0) return {};
|
|
4004
4010
|
try {
|
|
4005
|
-
let { items: e7 } = await
|
|
4011
|
+
let { items: e7 } = await Tc({ fieldsets: [`PUBLIC`] }).in(`_id`, t2).limit(t2.length).find();
|
|
4006
4012
|
return Object.fromEntries(e7.flatMap((e8) => {
|
|
4007
4013
|
let { _id: t3 } = e8;
|
|
4008
4014
|
return t3 ? [[t3, e8]] : [];
|
|
@@ -4011,32 +4017,32 @@ var Tc = async (e6) => {
|
|
|
4011
4017
|
return {};
|
|
4012
4018
|
}
|
|
4013
4019
|
};
|
|
4014
|
-
var
|
|
4015
|
-
var
|
|
4016
|
-
var Oc = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
4017
|
-
var
|
|
4018
|
-
function
|
|
4020
|
+
var Dc = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.expirationDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
4021
|
+
var Oc = [{ path: `posts.richContentCompressed` }];
|
|
4022
|
+
var kc = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
4023
|
+
var Ac = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
4024
|
+
function jc(e6) {
|
|
4019
4025
|
return Lt(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
|
|
4020
4026
|
}
|
|
4021
|
-
var
|
|
4022
|
-
function
|
|
4027
|
+
var Mc = `@wix/auto_sdk_blog_posts`;
|
|
4028
|
+
function Nc(e6) {
|
|
4023
4029
|
function t2({ host: t3 }) {
|
|
4024
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
4025
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
4030
|
+
let n2 = A(e6, [{ transformFn: un, paths: Ac }]);
|
|
4031
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Mc, migrationOptions: { optInTransformResponse: true }, url: jc({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Dc }, { transformFn: dn, paths: Oc }, { transformFn: N, paths: kc }]) };
|
|
4026
4032
|
}
|
|
4027
4033
|
return t2;
|
|
4028
4034
|
}
|
|
4029
|
-
function
|
|
4030
|
-
let e6 =
|
|
4035
|
+
function Pc() {
|
|
4036
|
+
let e6 = Nc({});
|
|
4031
4037
|
return { getUrl: (t2) => {
|
|
4032
4038
|
let { url: n2 } = e6(t2);
|
|
4033
4039
|
return n2;
|
|
4034
4040
|
}, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
|
|
4035
4041
|
}
|
|
4036
|
-
var
|
|
4037
|
-
var
|
|
4038
|
-
var
|
|
4039
|
-
let { data: n2 } = await e6.request(
|
|
4042
|
+
var Fc = Pc();
|
|
4043
|
+
var Ic = (e6) => (t2) => ({ method: `POST`, url: Fc.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
|
|
4044
|
+
var Lc = M((e6) => async (t2) => {
|
|
4045
|
+
let { data: n2 } = await e6.request(Ic(t2)), r2 = {};
|
|
4040
4046
|
for (let e7 of n2.posts ?? []) {
|
|
4041
4047
|
let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
|
|
4042
4048
|
if (!t3 || !n3?.length) continue;
|
|
@@ -4045,128 +4051,128 @@ var Ic = M((e6) => async (t2) => {
|
|
|
4045
4051
|
}
|
|
4046
4052
|
return r2;
|
|
4047
4053
|
});
|
|
4048
|
-
var
|
|
4054
|
+
var Rc = async (e6) => {
|
|
4049
4055
|
if (e6.length === 0) return {};
|
|
4050
4056
|
try {
|
|
4051
|
-
return await
|
|
4057
|
+
return await Lc(e6);
|
|
4052
4058
|
} catch {
|
|
4053
4059
|
return {};
|
|
4054
4060
|
}
|
|
4055
4061
|
};
|
|
4056
|
-
var
|
|
4062
|
+
var zc = class extends Error {
|
|
4057
4063
|
constructor(e6, t2) {
|
|
4058
4064
|
super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
|
|
4059
4065
|
}
|
|
4060
4066
|
};
|
|
4061
|
-
var
|
|
4067
|
+
var Bc = (e6, t2, n2) => {
|
|
4062
4068
|
let r2, i2 = new Promise((e7, i3) => {
|
|
4063
|
-
r2 = setTimeout(() => i3(new
|
|
4069
|
+
r2 = setTimeout(() => i3(new zc(n2, t2)), t2);
|
|
4064
4070
|
});
|
|
4065
4071
|
return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
|
|
4066
4072
|
};
|
|
4067
4073
|
Z.RICH_CONTENT, Z.SEO, Z.URL, Z.CONTENT_TEXT, Z.RICH_CONTENT, Z.URL;
|
|
4068
|
-
var
|
|
4069
|
-
var
|
|
4074
|
+
var Vc = [Z.URL, Z.METRICS];
|
|
4075
|
+
var Hc = (e6) => {
|
|
4070
4076
|
let { status: t2, details: n2 } = e6 ?? {};
|
|
4071
4077
|
return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
|
|
4072
4078
|
};
|
|
4073
|
-
var
|
|
4074
|
-
if (t2 && !
|
|
4079
|
+
var Uc = (e6, t2) => {
|
|
4080
|
+
if (t2 && !Hc(e6)) throw e6;
|
|
4075
4081
|
};
|
|
4076
|
-
var
|
|
4077
|
-
var
|
|
4078
|
-
var
|
|
4082
|
+
var Wc = (e6) => Ec(e6.map(({ memberId: e7 }) => e7));
|
|
4083
|
+
var Gc = (e6) => Rc(e6.filter((e7) => e7.media?.wixMedia?.videoV2).map(({ _id: e7 }) => e7).filter((e7) => !!e7));
|
|
4084
|
+
var Kc = async (e6, t2, n2 = false, r2) => {
|
|
4079
4085
|
try {
|
|
4080
|
-
let { post: n3 } = await
|
|
4086
|
+
let { post: n3 } = await cc(e6, { ...t2 && { fieldsets: t2 }, ...r2 && { language: r2 } });
|
|
4081
4087
|
if (n3) return n3;
|
|
4082
4088
|
} catch (e7) {
|
|
4083
|
-
|
|
4089
|
+
Uc(e7, n2);
|
|
4084
4090
|
}
|
|
4085
4091
|
try {
|
|
4086
|
-
let { items: n3 } = await
|
|
4092
|
+
let { items: n3 } = await uc(t2 ? { fieldsets: t2 } : void 0).eq(`slug`, e6).limit(1).find();
|
|
4087
4093
|
return n3[0];
|
|
4088
4094
|
} catch (e7) {
|
|
4089
|
-
|
|
4095
|
+
Uc(e7, n2);
|
|
4090
4096
|
return;
|
|
4091
4097
|
}
|
|
4092
4098
|
};
|
|
4093
|
-
var
|
|
4099
|
+
var qc = async (e6, t2 = false, n2) => {
|
|
4094
4100
|
try {
|
|
4095
4101
|
let t3 = async (t4) => {
|
|
4096
|
-
let { posts: r2 } = await
|
|
4102
|
+
let { posts: r2 } = await lc({ paging: { limit: 1 }, ...e6 && { fieldsets: e6 }, ...t4 && n2 && { language: n2 } });
|
|
4097
4103
|
return r2?.[0];
|
|
4098
4104
|
};
|
|
4099
4105
|
return await t3(true) ?? (n2 ? await t3(false) : void 0);
|
|
4100
4106
|
} catch (e7) {
|
|
4101
|
-
|
|
4107
|
+
Uc(e7, t2);
|
|
4102
4108
|
return;
|
|
4103
4109
|
}
|
|
4104
4110
|
};
|
|
4105
|
-
var
|
|
4106
|
-
var
|
|
4111
|
+
var Jc = 100;
|
|
4112
|
+
var Yc = async () => {
|
|
4107
4113
|
try {
|
|
4108
|
-
let { categories: e6 } = await
|
|
4114
|
+
let { categories: e6 } = await Ps({ paging: { limit: Jc } });
|
|
4109
4115
|
return e6 ?? [];
|
|
4110
4116
|
} catch {
|
|
4111
4117
|
return [];
|
|
4112
4118
|
}
|
|
4113
4119
|
};
|
|
4114
|
-
var
|
|
4120
|
+
var Xc = (e6, t2) => {
|
|
4115
4121
|
let { categoryIds: n2 } = e6 ?? {};
|
|
4116
4122
|
if (!n2?.length) return [];
|
|
4117
4123
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4118
4124
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4119
4125
|
};
|
|
4120
|
-
var
|
|
4126
|
+
var Zc = (e6, t2) => {
|
|
4121
4127
|
let n2 = {};
|
|
4122
|
-
for (let r2 of e6) for (let { _id: e7, label: i2 } of
|
|
4128
|
+
for (let r2 of e6) for (let { _id: e7, label: i2 } of Xc(r2, t2)) e7 && (n2[e7] = i2 ?? ``);
|
|
4123
4129
|
return n2;
|
|
4124
4130
|
};
|
|
4125
|
-
var
|
|
4126
|
-
let n2 = e6 ? await
|
|
4131
|
+
var Qc = async (e6, t2) => {
|
|
4132
|
+
let n2 = e6 ? await Kc(e6, void 0, false, t2) : void 0, { _id: r2, categoryIds: i2, relatedPostIds: a2 } = n2 ?? await qc(void 0, false, t2) ?? {};
|
|
4127
4133
|
return { currentPostId: r2 ?? void 0, categoryIds: i2, relatedPostIds: n2 ? a2 : void 0 };
|
|
4128
4134
|
};
|
|
4129
|
-
var
|
|
4130
|
-
let { items: r2 } = await
|
|
4135
|
+
var $c = async ({ ids: e6, currentPostId: t2, limit: n2 }) => {
|
|
4136
|
+
let { items: r2 } = await uc({ fieldsets: Vc }).in(`_id`, e6).limit(n2).find(), i2 = new Map(r2.map((e7) => {
|
|
4131
4137
|
let { _id: t3 } = e7;
|
|
4132
4138
|
return [t3, e7];
|
|
4133
4139
|
}));
|
|
4134
4140
|
return e6.filter((e7) => e7 !== t2).map((e7) => i2.get(e7)).filter((e7) => e7 !== void 0).slice(0, n2);
|
|
4135
4141
|
};
|
|
4136
|
-
var
|
|
4137
|
-
let i2 =
|
|
4142
|
+
var el = async ({ currentPostId: e6, categoryIds: t2, language: n2, limit: r2 }) => {
|
|
4143
|
+
let i2 = uc({ fieldsets: Vc }).ne(`_id`, e6).descending(`firstPublishedDate`).limit(r2);
|
|
4138
4144
|
t2?.length && (i2 = i2.hasSome(`categoryIds`, t2)), n2 && (i2 = i2.eq(`language`, n2));
|
|
4139
4145
|
let { items: a2 } = await i2.find();
|
|
4140
4146
|
return a2;
|
|
4141
4147
|
};
|
|
4142
|
-
var
|
|
4143
|
-
let o2 =
|
|
4148
|
+
var tl = async ({ slug: e6, language: t2, limit: n2 = 3, propagateErrors: r2 = false, source: i2, sourcePromise: a2 }) => {
|
|
4149
|
+
let o2 = Yc();
|
|
4144
4150
|
try {
|
|
4145
|
-
let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await
|
|
4151
|
+
let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await Qc(e6, t2));
|
|
4146
4152
|
if (!r3) return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
|
|
4147
|
-
let l2 = c2?.length ? await
|
|
4148
|
-
return { posts: u2, authorsByMemberId: d2, categoryLabelsById:
|
|
4153
|
+
let l2 = c2?.length ? await $c({ ids: c2, currentPostId: r3, limit: n2 }) : [], u2 = l2.length > 0 ? l2 : await el({ currentPostId: r3, categoryIds: s2, language: t2, limit: n2 }), [d2, f2, p2] = await Promise.all([Wc(u2), o2, Gc(u2)]);
|
|
4154
|
+
return { posts: u2, authorsByMemberId: d2, categoryLabelsById: Zc(u2, f2), videoSourcesByPostId: p2 };
|
|
4149
4155
|
} catch (e7) {
|
|
4150
4156
|
if (r2) throw e7;
|
|
4151
4157
|
return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
|
|
4152
4158
|
}
|
|
4153
4159
|
};
|
|
4154
|
-
var
|
|
4155
|
-
var
|
|
4156
|
-
var
|
|
4157
|
-
var
|
|
4158
|
-
var
|
|
4159
|
-
var
|
|
4160
|
+
var nl = { newest: `FEED`, oldest: `PUBLISHED_DATE_ASC`, titleAsc: `TITLE_ASC`, titleDesc: `TITLE_DESC`, mostViewed: `VIEW_COUNT`, mostLiked: `LIKE_COUNT` };
|
|
4161
|
+
var rl = async (e6, { limit: t2, offset: n2 = 0, language: r2, sortOrder: i2 }) => e6.posts.length > 0 ? e6 : { ...e6, demoPosts: await mc({ paging: { limit: t2, offset: n2 }, fieldsets: Vc, ...r2 && { language: r2 }, ...i2 && { sort: nl[i2] } }) };
|
|
4162
|
+
var il = (0, import_react.createContext)({ isEditor: false, isPreview: false });
|
|
4163
|
+
var al = () => (0, import_react.useContext)(il);
|
|
4164
|
+
var ol = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
|
|
4165
|
+
var sl = () => {
|
|
4160
4166
|
try {
|
|
4161
|
-
let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(
|
|
4167
|
+
let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(Gn);
|
|
4162
4168
|
return e6 || t2;
|
|
4163
4169
|
} catch {
|
|
4164
4170
|
return false;
|
|
4165
4171
|
}
|
|
4166
4172
|
};
|
|
4167
|
-
var
|
|
4168
|
-
let e6 =
|
|
4169
|
-
return al(
|
|
4173
|
+
var cl = () => {
|
|
4174
|
+
let e6 = sl();
|
|
4175
|
+
return ol(al()) && !e6;
|
|
4170
4176
|
};
|
|
4171
4177
|
g((e6, t2) => {
|
|
4172
4178
|
(function() {
|
|
@@ -4195,34 +4201,34 @@ g((e6, t2) => {
|
|
|
4195
4201
|
}) : window.classNames = n2;
|
|
4196
4202
|
})();
|
|
4197
4203
|
})();
|
|
4198
|
-
var
|
|
4199
|
-
var
|
|
4204
|
+
var ll = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
|
|
4205
|
+
var ul = (e6) => {
|
|
4200
4206
|
try {
|
|
4201
4207
|
return e6.getMonitoringClient?.() ?? null;
|
|
4202
4208
|
} catch {
|
|
4203
4209
|
return null;
|
|
4204
4210
|
}
|
|
4205
4211
|
};
|
|
4206
|
-
var
|
|
4207
|
-
function
|
|
4208
|
-
let s2 =
|
|
4212
|
+
var dl = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
|
|
4213
|
+
function fl(e6, t2, { feature: n2, action: r2, level: i2 = `error`, tags: a2, contexts: o2 }) {
|
|
4214
|
+
let s2 = dl(e6, `captureException`);
|
|
4209
4215
|
if (!s2) return;
|
|
4210
4216
|
let c2 = t2 instanceof Error ? t2 : Error(String(t2));
|
|
4211
4217
|
s2.captureException(c2, { level: i2, tags: { feature: n2, action: r2, ...a2 }, ...o2 ? { contexts: o2 } : {} });
|
|
4212
4218
|
}
|
|
4213
|
-
function
|
|
4214
|
-
let a2 =
|
|
4219
|
+
function pl(e6, t2, { feature: n2, tags: r2 }, i2) {
|
|
4220
|
+
let a2 = dl(e6, `startSpanManual`);
|
|
4215
4221
|
if (!a2) return i2;
|
|
4216
4222
|
let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
|
|
4217
4223
|
return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
|
|
4218
4224
|
}
|
|
4219
|
-
var
|
|
4225
|
+
var ml = class extends import_react.Component {
|
|
4220
4226
|
state = { error: void 0 };
|
|
4221
4227
|
static getDerivedStateFromError(e6) {
|
|
4222
4228
|
return { error: e6 ?? Error(`Unknown render error`) };
|
|
4223
4229
|
}
|
|
4224
4230
|
componentDidCatch(e6, t2) {
|
|
4225
|
-
|
|
4231
|
+
fl(this.props.monitoringClient, e6, { feature: this.props.feature, action: `render`, tags: this.props.component ? { component: this.props.component } : void 0, contexts: { react: { componentStack: t2.componentStack } } });
|
|
4226
4232
|
}
|
|
4227
4233
|
render() {
|
|
4228
4234
|
if (this.state.error === void 0) return this.props.children;
|
|
@@ -4230,201 +4236,201 @@ var pl = class extends import_react.Component {
|
|
|
4230
4236
|
return this.props.fallback;
|
|
4231
4237
|
}
|
|
4232
4238
|
};
|
|
4233
|
-
var
|
|
4234
|
-
var
|
|
4235
|
-
function
|
|
4236
|
-
return (0, import_react.useContext)(
|
|
4239
|
+
var hl = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
|
|
4240
|
+
var gl = (0, import_react.createContext)(void 0);
|
|
4241
|
+
function _l() {
|
|
4242
|
+
return (0, import_react.useContext)(gl);
|
|
4237
4243
|
}
|
|
4238
|
-
var
|
|
4239
|
-
function
|
|
4240
|
-
return (0, import_react.useContext)(
|
|
4244
|
+
var vl = (0, import_react.createContext)(void 0);
|
|
4245
|
+
function yl() {
|
|
4246
|
+
return (0, import_react.useContext)(vl);
|
|
4241
4247
|
}
|
|
4242
|
-
var
|
|
4243
|
-
var
|
|
4244
|
-
var
|
|
4245
|
-
var
|
|
4246
|
-
var
|
|
4247
|
-
var
|
|
4248
|
+
var bl = 6e4;
|
|
4249
|
+
var xl = bl * 60;
|
|
4250
|
+
var Sl = xl * 24;
|
|
4251
|
+
var Cl = Sl * 7;
|
|
4252
|
+
var wl = (e6) => e6 < bl ? [`second`, e6 / 1e3] : e6 < xl ? [`minute`, e6 / bl] : e6 < Sl ? [`hour`, e6 / xl] : [`day`, e6 / Sl];
|
|
4253
|
+
var Tl = (e6, t2, n2 = Date.now()) => {
|
|
4248
4254
|
let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
|
|
4249
|
-
if (i2 >= 0 && i2 <
|
|
4250
|
-
let [e7, n3] =
|
|
4255
|
+
if (i2 >= 0 && i2 < Cl) {
|
|
4256
|
+
let [e7, n3] = wl(i2);
|
|
4251
4257
|
return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
|
|
4252
4258
|
}
|
|
4253
4259
|
let a2 = r2.getFullYear() === new Date(n2).getFullYear();
|
|
4254
4260
|
return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
|
|
4255
4261
|
};
|
|
4256
|
-
var
|
|
4257
|
-
var
|
|
4258
|
-
var
|
|
4262
|
+
var El = `https://static.wixstatic.com/media/`;
|
|
4263
|
+
var Dl = 100;
|
|
4264
|
+
var Ol = (e6, t2 = ``) => {
|
|
4259
4265
|
let n2 = e6?.profile?.photo;
|
|
4260
4266
|
if (!n2?.url) return;
|
|
4261
|
-
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(
|
|
4262
|
-
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width ||
|
|
4263
|
-
};
|
|
4264
|
-
var
|
|
4265
|
-
var
|
|
4266
|
-
var
|
|
4267
|
-
var
|
|
4268
|
-
var
|
|
4267
|
+
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(El) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
|
|
4268
|
+
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || Dl, height: n2.height || Dl, alt: r2 ?? t2 };
|
|
4269
|
+
};
|
|
4270
|
+
var kl = `https://static.wixstatic.com/media/`;
|
|
4271
|
+
var Al = `wix:image://`;
|
|
4272
|
+
var jl = 1200;
|
|
4273
|
+
var Ml = 800;
|
|
4274
|
+
var Nl = (e6) => {
|
|
4269
4275
|
if (!e6) return;
|
|
4270
4276
|
let t2 = Number.parseInt(e6, 10);
|
|
4271
4277
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4272
4278
|
};
|
|
4273
|
-
var
|
|
4274
|
-
if (!e6.startsWith(
|
|
4279
|
+
var Pl = (e6) => {
|
|
4280
|
+
if (!e6.startsWith(Al)) {
|
|
4275
4281
|
let t3 = e6.split(/[?#]/)[0];
|
|
4276
4282
|
return t3 ? { uri: t3 } : void 0;
|
|
4277
4283
|
}
|
|
4278
4284
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
|
|
4279
4285
|
if (!r2) return;
|
|
4280
4286
|
let a2 = new URLSearchParams(n2 ?? ``);
|
|
4281
|
-
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width:
|
|
4287
|
+
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: Nl(a2.get(`originWidth`)), height: Nl(a2.get(`originHeight`)) };
|
|
4282
4288
|
};
|
|
4283
|
-
var
|
|
4289
|
+
var Fl = (e6, t2) => {
|
|
4284
4290
|
if (!e6) return;
|
|
4285
|
-
let n2 =
|
|
4291
|
+
let n2 = Pl(e6);
|
|
4286
4292
|
if (!n2) return;
|
|
4287
4293
|
let r2 = n2.name ?? n2.uri;
|
|
4288
|
-
return { uri: n2.uri, url: `${
|
|
4294
|
+
return { uri: n2.uri, url: `${kl}${n2.uri}`, name: r2, width: n2.width ?? jl, height: n2.height ?? Ml, alt: t2 ?? r2 };
|
|
4289
4295
|
};
|
|
4290
|
-
var
|
|
4296
|
+
var Il = (e6) => {
|
|
4291
4297
|
let t2 = e6?.media?.wixMedia?.image;
|
|
4292
4298
|
if (!t2) return;
|
|
4293
|
-
let n2 =
|
|
4299
|
+
let n2 = Pl(t2);
|
|
4294
4300
|
if (!n2) return;
|
|
4295
4301
|
let r2 = n2.name ?? n2.uri;
|
|
4296
|
-
return { uri: n2.uri, url: `${
|
|
4302
|
+
return { uri: n2.uri, url: `${kl}${n2.uri}`, name: r2, width: n2.width ?? jl, height: n2.height ?? Ml, alt: e6?.media?.altText ?? e6?.title ?? r2 };
|
|
4297
4303
|
};
|
|
4298
|
-
var
|
|
4299
|
-
var
|
|
4300
|
-
var
|
|
4304
|
+
var Ll = `https://static.wixstatic.com/media/`;
|
|
4305
|
+
var Rl = `wix:video://`;
|
|
4306
|
+
var zl = (e6) => {
|
|
4301
4307
|
if (!e6) return;
|
|
4302
4308
|
let t2 = Number.parseInt(e6, 10);
|
|
4303
4309
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4304
4310
|
};
|
|
4305
|
-
var
|
|
4306
|
-
if (!e6.startsWith(
|
|
4311
|
+
var Bl = (e6) => {
|
|
4312
|
+
if (!e6.startsWith(Rl)) return;
|
|
4307
4313
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
|
|
4308
4314
|
if (!r2) return;
|
|
4309
4315
|
let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
|
|
4310
|
-
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${
|
|
4316
|
+
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${Ll}${a2}` : void 0, posterWidth: zl(i2.get(`posterWidth`)), posterHeight: zl(i2.get(`posterHeight`)) };
|
|
4311
4317
|
};
|
|
4312
|
-
var
|
|
4313
|
-
var
|
|
4314
|
-
var
|
|
4318
|
+
var Vl = [/https?:\/\/(?:www\.|m\.)?youtube\.com\/watch\?(?:[^#]*&)?v=([\w-]+)/i, /https?:\/\/(?:www\.)?youtube\.com\/embed\/([\w-]+)/i, /https?:\/\/youtu\.be\/([\w-]+)/i];
|
|
4319
|
+
var Hl = [/https?:\/\/player\.vimeo\.com\/video\/(\d+)/i, /https?:\/\/vimeo\.com\/(\d+)/i];
|
|
4320
|
+
var Ul = (e6, t2) => {
|
|
4315
4321
|
for (let n2 of e6) {
|
|
4316
4322
|
let e7 = n2.exec(t2);
|
|
4317
4323
|
if (e7) return e7[1];
|
|
4318
4324
|
}
|
|
4319
4325
|
};
|
|
4320
|
-
var
|
|
4321
|
-
let t2 =
|
|
4326
|
+
var Wl = (e6) => {
|
|
4327
|
+
let t2 = Ul(Vl, e6);
|
|
4322
4328
|
if (t2) return { provider: `youtube`, embedUrl: `https://www.youtube.com/embed/${t2}?autoplay=1` };
|
|
4323
|
-
let n2 = Hl
|
|
4329
|
+
let n2 = Ul(Hl, e6);
|
|
4324
4330
|
return n2 ? { provider: `vimeo`, embedUrl: `https://player.vimeo.com/video/${n2}?autoplay=1` } : { provider: `unknown` };
|
|
4325
4331
|
};
|
|
4326
|
-
var
|
|
4332
|
+
var Gl = (e6, t2 = []) => {
|
|
4327
4333
|
let n2 = e6?.media;
|
|
4328
4334
|
if (!n2 || n2.displayed === false) return;
|
|
4329
|
-
let r2 =
|
|
4335
|
+
let r2 = Il(e6);
|
|
4330
4336
|
if (r2) return { kind: `image`, image: r2 };
|
|
4331
|
-
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ?
|
|
4337
|
+
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? Bl(n2.wixMedia.videoV2) : void 0;
|
|
4332
4338
|
if (a2) return { kind: `wixVideo`, ...a2, sources: t2, altText: i2 };
|
|
4333
4339
|
let o2 = n2.embedMedia?.video?.url;
|
|
4334
4340
|
if (o2) {
|
|
4335
4341
|
let { thumbnail: e7 } = n2.embedMedia ?? {};
|
|
4336
|
-
return { kind: `embed`, videoUrl: o2, ...
|
|
4342
|
+
return { kind: `embed`, videoUrl: o2, ...Wl(o2), thumbnailUrl: e7?.url, thumbnailWidth: e7?.width, thumbnailHeight: e7?.height, altText: i2 };
|
|
4337
4343
|
}
|
|
4338
4344
|
};
|
|
4339
|
-
var
|
|
4340
|
-
let t2 =
|
|
4345
|
+
var Kl = (e6) => {
|
|
4346
|
+
let t2 = Il(e6), n2 = e6?.media?.wixMedia?.videoV2;
|
|
4341
4347
|
if (t2 || !n2) return t2;
|
|
4342
|
-
let r2 =
|
|
4348
|
+
let r2 = Bl(n2), i2 = Fl(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
|
|
4343
4349
|
return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
|
|
4344
4350
|
};
|
|
4345
|
-
var
|
|
4346
|
-
var
|
|
4347
|
-
var
|
|
4348
|
-
var
|
|
4351
|
+
var ql = `2026-05-12T12:00:00.000Z`;
|
|
4352
|
+
var Jl = (e6) => ({ href: e6 ?? `#`, target: `_self` });
|
|
4353
|
+
var Yl = (e6) => `https://static.wixstatic.com/media/${e6}/v1/fit/w_1200,h_1200,al_c,q_85/cover.jpg`;
|
|
4354
|
+
var Xl = (e6) => {
|
|
4349
4355
|
if (!e6) return;
|
|
4350
4356
|
let t2 = e6 instanceof Date ? e6 : new Date(e6);
|
|
4351
4357
|
return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
|
|
4352
4358
|
};
|
|
4353
|
-
var
|
|
4354
|
-
var
|
|
4355
|
-
var Q = (e6) => ({ text: e6, html: `<p>${
|
|
4359
|
+
var Zl = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4360
|
+
var Ql = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4361
|
+
var Q = (e6) => ({ text: e6, html: `<p>${Ql(e6)}</p>`, linkList: [] });
|
|
4356
4362
|
var $ = { minutesToRead: 5, views: 120, comments: 4 };
|
|
4357
|
-
var
|
|
4363
|
+
var $l = (e6) => {
|
|
4358
4364
|
let { metrics: t2 } = e6;
|
|
4359
4365
|
return { views: typeof t2?.views == `number` ? t2.views : void 0, comments: typeof t2?.comments == `number` ? t2.comments : void 0 };
|
|
4360
4366
|
};
|
|
4361
|
-
var
|
|
4362
|
-
var
|
|
4367
|
+
var eu = (e6, t2, n2, r2) => Q(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4368
|
+
var tu = (e6, t2, n2, r2) => {
|
|
4363
4369
|
let i2 = e6.categoryIds?.map((e7) => t2[e7]).find(Boolean);
|
|
4364
4370
|
return Q(i2 ?? (n2 ? r2.canvas.category() : ``));
|
|
4365
4371
|
};
|
|
4366
|
-
var
|
|
4367
|
-
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 =
|
|
4368
|
-
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage:
|
|
4369
|
-
};
|
|
4370
|
-
var nu = 3;
|
|
4371
|
-
var ru = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
4372
|
-
var iu = (e6, t2) => {
|
|
4373
|
-
let { uri: n2, width: r2, height: i2 } = ru[e6 % ru.length];
|
|
4374
|
-
return { uri: n2, url: Jl(n2), name: n2, width: r2, height: i2, alt: t2 };
|
|
4372
|
+
var nu = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
|
|
4373
|
+
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = $l(e6);
|
|
4374
|
+
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Kl(e6), itemCoverMedia: Gl(e6, s2[l2 ?? ``] ?? []), itemLink: or(e6, r2), itemPublishedDate: Q(Tl(e6.firstPublishedDate ?? new Date(c2), n2, c2)), publishedDateValue: Xl(e6.firstPublishedDate), clockValue: c2, minutesToReadValue: Zl(e6.minutesToRead), initialViewCount: f2.views ?? (o2 ? $.views : void 0), initialCommentCount: f2.comments ?? (o2 ? $.comments : void 0), authorName: Q(d2?.profile?.nickname ?? ``), authorImage: Ol(d2, t2.canvas.authorPhotoAlt()), timeToRead: Q(typeof e6.minutesToRead == `number` && e6.minutesToRead > 0 ? t2.timeToRead(e6.minutesToRead) : ``), viewCount: eu(f2.views, $.views, o2, t2.viewCount), commentCount: eu(f2.comments, $.comments, o2, t2.commentCount), itemCategoryLabel: tu(e6, a2, o2, t2), recentPostItem: { title: e6.title ?? ``, slug: e6.slug ?? `` }, commentingEnabled: e6.commentingEnabled };
|
|
4375
4375
|
};
|
|
4376
|
+
var ru = 3;
|
|
4377
|
+
var iu = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
4376
4378
|
var au = (e6, t2) => {
|
|
4377
|
-
let { uri: n2 } =
|
|
4378
|
-
return { uri: n2, url:
|
|
4379
|
+
let { uri: n2, width: r2, height: i2 } = iu[e6 % iu.length];
|
|
4380
|
+
return { uri: n2, url: Yl(n2), name: n2, width: r2, height: i2, alt: t2 };
|
|
4381
|
+
};
|
|
4382
|
+
var ou = (e6, t2) => {
|
|
4383
|
+
let { uri: n2 } = iu[(e6 + 1) % iu.length];
|
|
4384
|
+
return { uri: n2, url: Yl(n2), name: n2, width: 100, height: 100, alt: t2 };
|
|
4379
4385
|
};
|
|
4380
|
-
var
|
|
4381
|
-
let o2 = e6.canvas.postTitle(), s2 =
|
|
4382
|
-
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink:
|
|
4386
|
+
var su = (e6, t2, n2, r2 = Date.now()) => Array.from({ length: ru }, (i2, a2) => {
|
|
4387
|
+
let o2 = e6.canvas.postTitle(), s2 = au(a2, e6.canvas.coverAlt());
|
|
4388
|
+
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink: Jl(n2), itemPublishedDate: Q(Tl(new Date(r2), t2, r2)), publishedDateValue: ql, clockValue: r2, minutesToReadValue: $.minutesToRead, initialViewCount: $.views, initialCommentCount: $.comments, authorName: Q(e6.canvas.authorName()), authorImage: ou(a2, e6.canvas.authorPhotoAlt()), timeToRead: Q(e6.timeToRead($.minutesToRead)), viewCount: Q(e6.viewCount($.views)), commentCount: Q(e6.commentCount($.comments)), itemCategoryLabel: Q(e6.canvas.category()), recentPostItem: { title: o2, slug: `` }, commentingEnabled: void 0 };
|
|
4383
4389
|
});
|
|
4384
|
-
var
|
|
4385
|
-
function
|
|
4386
|
-
let e6 = (0, import_react.useContext)(
|
|
4390
|
+
var cu = (0, import_react.createContext)(void 0);
|
|
4391
|
+
function lu() {
|
|
4392
|
+
let e6 = (0, import_react.useContext)(cu);
|
|
4387
4393
|
if (!e6) throw Error(`useRelatedPostsContext must be used within a RelatedPostsProvider`);
|
|
4388
4394
|
return e6;
|
|
4389
4395
|
}
|
|
4390
|
-
var
|
|
4391
|
-
var
|
|
4392
|
-
var
|
|
4393
|
-
var
|
|
4394
|
-
var
|
|
4396
|
+
var uu = 3;
|
|
4397
|
+
var du = (e6) => typeof e6 == `number` && Number.isFinite(e6) && e6 >= 1 ? Math.min(Math.floor(e6), 12) : uu;
|
|
4398
|
+
var fu = 2e3;
|
|
4399
|
+
var pu = /* @__PURE__ */ new WeakMap();
|
|
4400
|
+
var mu = (e6, t2, n2) => {
|
|
4395
4401
|
if (!e6) return n2();
|
|
4396
|
-
let r2 =
|
|
4397
|
-
r2 || (r2 = /* @__PURE__ */ new Map(),
|
|
4402
|
+
let r2 = pu.get(e6);
|
|
4403
|
+
r2 || (r2 = /* @__PURE__ */ new Map(), pu.set(e6, r2));
|
|
4398
4404
|
let i2 = r2.get(t2);
|
|
4399
4405
|
if (i2) return i2;
|
|
4400
4406
|
let a2 = n2();
|
|
4401
4407
|
return r2.set(t2, a2), a2;
|
|
4402
4408
|
};
|
|
4403
|
-
var
|
|
4404
|
-
var
|
|
4405
|
-
var
|
|
4406
|
-
var
|
|
4407
|
-
var
|
|
4409
|
+
var hu = { relatedPosts: [], emptyState: null, isLoadingRelatedPosts: true, hasError: false, hasRelatedPosts: false };
|
|
4410
|
+
var gu = { ...hu, isLoadingRelatedPosts: false, hasError: true };
|
|
4411
|
+
var _u = (e6) => ({ strip: e6, hasError: false });
|
|
4412
|
+
var vu = () => ({ strip: { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {}, fetchedAt: Date.now() }, hasError: true });
|
|
4413
|
+
var yu = (e6) => {
|
|
4408
4414
|
throw e6;
|
|
4409
4415
|
};
|
|
4410
|
-
var
|
|
4411
|
-
let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2, demoPosts: u2 }, hasError: d2 } =
|
|
4412
|
-
let e7 = (i2.length === 0 && m2 ? u2 ?? [] : i2).map((e8) =>
|
|
4416
|
+
var bu = ({ children: e6, stripLoadPromise: t2, slug: n2, language: r2 }) => {
|
|
4417
|
+
let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2, demoPosts: u2 }, hasError: d2 } = Bn(t2), f2 = Wn(l2), m2 = cl(), h2 = sr(n2), { t: g2 } = wo(), _2 = _r(), v2 = (0, import_react.useMemo)(() => rs(g2, _2), [g2, _2]), y2 = (0, import_react.useMemo)(() => {
|
|
4418
|
+
let e7 = (i2.length === 0 && m2 ? u2 ?? [] : i2).map((e8) => nu(e8, v2, _2, h2, a2, o2, m2, s2, f2)), t3 = e7.length === 0 && m2 ? su(v2, _2, h2, f2) : e7;
|
|
4413
4419
|
return { relatedPosts: t3, emptyState: i2.length === 0 && !d2 ? v2.noRelatedPostsEmptyState() : null, isLoadingRelatedPosts: false, hasError: d2, hasRelatedPosts: t3.length > 0 };
|
|
4414
4420
|
}, [i2, u2, a2, o2, s2, v2, _2, r2, h2, m2, f2, d2]);
|
|
4415
|
-
return
|
|
4421
|
+
return fr(ur.relatedPostsProvider, d2 ? `error` : i2.length > 0 ? `data` : `empty`), (0, import_jsx_runtime.jsx)(cu.Provider, { value: y2, children: e6 });
|
|
4416
4422
|
};
|
|
4417
|
-
function
|
|
4418
|
-
let r2 =
|
|
4423
|
+
function xu({ children: e6, postsCount: n2 }) {
|
|
4424
|
+
let r2 = lr(), i2 = hr(), a2 = Kn(), o2 = du(n2), s2 = cl(), l2 = _l(), u2 = yl(), d2 = yr(), f2 = (0, import_react.useMemo)(() => ul(Rn), []), { i18n: h2, locale: g2 } = qo(ts), _2 = Jn(() => {
|
|
4419
4425
|
let e7 = `blog-builder:related:${JSON.stringify({ slug: r2 ?? ``, language: i2 ?? ``, limit: o2, ...u2 && { postId: u2 } })}`;
|
|
4420
|
-
return { slug: r2, language: i2, stripLoadPromise:
|
|
4421
|
-
let e8 =
|
|
4422
|
-
return
|
|
4423
|
-
} })),
|
|
4426
|
+
return { slug: r2, language: i2, stripLoadPromise: Hn(mu(l2, e7, () => Po({ key: e7, warmupData: d2, fetchData: () => {
|
|
4427
|
+
let e8 = tl({ slug: r2, language: i2, limit: o2, propagateErrors: true, sourcePromise: l2 }).then((e9) => s2 ? rl(e9, { limit: o2, language: i2 }) : e9);
|
|
4428
|
+
return hl(pl(f2, `related-posts-read`, { feature: ll.relatedPosts, tags: { limit: o2 } }, a2 ? Bc(e8, fu, `related-posts`) : e8));
|
|
4429
|
+
} })), _u, a2 ? yu : vu) };
|
|
4424
4430
|
}, [r2, i2, a2, s2, l2, d2, o2, f2, u2]);
|
|
4425
|
-
return (0, import_jsx_runtime.jsx)(
|
|
4431
|
+
return (0, import_jsx_runtime.jsx)(To, { i18n: h2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(cu.Provider, { value: hu, children: e6 }), children: [(0, import_jsx_runtime.jsx)(Ko, { i18n: h2, locale: g2 }), (0, import_jsx_runtime.jsx)(ml, { fallback: (0, import_jsx_runtime.jsx)(cu.Provider, { value: gu, children: e6 }), feature: ll.relatedPosts, monitoringClient: f2, rethrow: a2, children: (0, import_jsx_runtime.jsx)(bu, { stripLoadPromise: _2.stripLoadPromise, slug: _2.slug, language: _2.language, children: e6 }, `${_2.language ?? ``}|${_2.slug ?? ``}`) })] }) });
|
|
4426
4432
|
}
|
|
4427
|
-
var
|
|
4433
|
+
var Su = jn(`7d10ae29-fb0a-4361-8bc0-c3b8a3b96e34`);
|
|
4428
4434
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4429
4435
|
0 && (module.exports = {
|
|
4430
4436
|
RelatedPostsProvider,
|