@wix/blog 1.0.708 → 1.0.709
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 +4 -4
- package/_sdk-exports/context-post/runtime.d.ts +36 -1
- package/_sdk-exports/context-post-by-id/runtime.js +4 -4
- package/_sdk-exports/context-post-by-slug/runtime.js +4 -4
- 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 +972 -944
- package/build/cjs/context-blog-feed.js.map +1 -1
- package/build/cjs/context-post-by-id.js +1060 -1032
- package/build/cjs/context-post-by-id.js.map +1 -1
- package/build/cjs/context-post-by-slug.js +266 -238
- package/build/cjs/context-post-by-slug.js.map +1 -1
- package/build/cjs/context-post-list-item.js +260 -232
- package/build/cjs/context-post-list-item.js.map +1 -1
- package/build/cjs/context-post.d.ts +36 -1
- package/build/cjs/context-related-posts.js +263 -235
- package/build/cjs/context-related-posts.js.map +1 -1
- package/build/es/context-blog-feed.mjs +972 -944
- package/build/es/context-blog-feed.mjs.map +1 -1
- package/build/es/context-post-by-id.mjs +1060 -1032
- package/build/es/context-post-by-id.mjs.map +1 -1
- package/build/es/context-post-by-slug.mjs +266 -238
- package/build/es/context-post-by-slug.mjs.map +1 -1
- package/build/es/context-post-list-item.mjs +260 -232
- package/build/es/context-post-list-item.mjs.map +1 -1
- package/build/es/context-post.d.mts +36 -1
- package/build/es/context-related-posts.mjs +263 -235
- package/build/es/context-related-posts.mjs.map +1 -1
- package/build/internal/cjs/context-post.d.ts +36 -1
- package/build/internal/es/context-post.d.mts +36 -1
- package/package.json +2 -2
|
@@ -826,21 +826,21 @@ function ln(e6, t2) {
|
|
|
826
826
|
function un(e6) {
|
|
827
827
|
return isFinite(e6) ? e6 : e6.toString();
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function F(e6) {
|
|
830
830
|
return e6 === `NaN` ? NaN : e6 === `Infinity` ? 1 / 0 : e6 === `-Infinity` ? -1 / 0 : e6;
|
|
831
831
|
}
|
|
832
|
-
function
|
|
832
|
+
function dn(e6) {
|
|
833
833
|
return Uint8Array.from(atob(e6), (e7) => e7.charCodeAt(0));
|
|
834
834
|
}
|
|
835
|
-
var
|
|
836
|
-
var
|
|
835
|
+
var fn = `modulepreload`;
|
|
836
|
+
var pn = function(e6, t2) {
|
|
837
837
|
return new URL(e6, t2).href;
|
|
838
838
|
};
|
|
839
|
-
var
|
|
840
|
-
var
|
|
839
|
+
var mn = {};
|
|
840
|
+
var hn = function(e6) {
|
|
841
841
|
return e6.pathname.endsWith(`.css`);
|
|
842
842
|
};
|
|
843
|
-
var
|
|
843
|
+
var gn = function(e6, t2, n2) {
|
|
844
844
|
if (t2 in e6) return e6[t2];
|
|
845
845
|
let r2 = n2();
|
|
846
846
|
if (!r2) {
|
|
@@ -854,7 +854,7 @@ var _n = function(e6, t2, n2) {
|
|
|
854
854
|
});
|
|
855
855
|
return e6[t2] = i2, i2;
|
|
856
856
|
};
|
|
857
|
-
var
|
|
857
|
+
var _n = function(e6, t2, n2) {
|
|
858
858
|
let r2 = Promise.resolve();
|
|
859
859
|
if (t2 && t2.length > 0) {
|
|
860
860
|
let o3 = function(e8) {
|
|
@@ -865,9 +865,9 @@ var vn = function(e6, t2, n2) {
|
|
|
865
865
|
var o2 = o3, s2 = s3;
|
|
866
866
|
let e7, i3 = document.querySelector(`meta[property=csp-nonce]`), a2 = i3?.nonce || i3?.getAttribute(`nonce`);
|
|
867
867
|
r2 = o3(t2.map((t3) => {
|
|
868
|
-
t3 =
|
|
869
|
-
let r3 = s3(t3), i4 =
|
|
870
|
-
return
|
|
868
|
+
t3 = pn(t3, n2);
|
|
869
|
+
let r3 = s3(t3), i4 = hn(r3);
|
|
870
|
+
return gn(mn, r3.href, () => {
|
|
871
871
|
if (e7 === void 0) {
|
|
872
872
|
e7 = { all: /* @__PURE__ */ new Set(), styles: /* @__PURE__ */ new Set() };
|
|
873
873
|
let t5 = document.getElementsByTagName(`link`);
|
|
@@ -878,7 +878,7 @@ var vn = function(e6, t2, n2) {
|
|
|
878
878
|
}
|
|
879
879
|
if ((i4 ? e7.styles : e7.all).has(r3.href)) return;
|
|
880
880
|
let t4 = document.createElement(`link`);
|
|
881
|
-
if (t4.rel = i4 ? `stylesheet` :
|
|
881
|
+
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) => {
|
|
882
882
|
t4.addEventListener(`load`, e8), t4.addEventListener(`error`, () => n3(Error(`Unable to preload CSS for ${r3}`)));
|
|
883
883
|
});
|
|
884
884
|
});
|
|
@@ -893,30 +893,30 @@ var vn = function(e6, t2, n2) {
|
|
|
893
893
|
return e6().catch(i2);
|
|
894
894
|
});
|
|
895
895
|
};
|
|
896
|
-
var
|
|
897
|
-
var
|
|
898
|
-
var
|
|
899
|
-
var
|
|
900
|
-
let e6 =
|
|
901
|
-
if (e6) return { [
|
|
896
|
+
var vn = `x-wix-linguist`;
|
|
897
|
+
var yn = `00000000-0000-0000-0000-000000000000`;
|
|
898
|
+
var bn = `false`;
|
|
899
|
+
var xn = () => {
|
|
900
|
+
let e6 = wn(`language`), t2 = wn(`locale`);
|
|
901
|
+
if (e6) return { [vn]: [e6, t2 || e6, bn, yn].join(`|`) };
|
|
902
902
|
};
|
|
903
|
-
function
|
|
903
|
+
function Sn() {
|
|
904
904
|
let e6 = null, t2 = null;
|
|
905
905
|
return { promise: new Promise((n2, r2) => {
|
|
906
906
|
e6 = n2, t2 = r2;
|
|
907
907
|
}), resolve: e6, reject: t2 };
|
|
908
908
|
}
|
|
909
|
-
var
|
|
910
|
-
var
|
|
911
|
-
var
|
|
912
|
-
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 =
|
|
913
|
-
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language:
|
|
914
|
-
return
|
|
909
|
+
var Cn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
|
|
910
|
+
var wn = (e6) => Cn()?.[e6];
|
|
911
|
+
var Tn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
|
|
912
|
+
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = Dn();
|
|
913
|
+
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: wn(`language`), locale: wn(`locale`), get passThroughHeaders() {
|
|
914
|
+
return xn();
|
|
915
915
|
} } };
|
|
916
916
|
}, auth: (e7) => {
|
|
917
917
|
let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
|
|
918
|
-
!e7 &&
|
|
919
|
-
let n2 = false, { resolve: r2, promise: i2 } =
|
|
918
|
+
!e7 && En() && (e7 = t2?.getAccessTokenFunction?.());
|
|
919
|
+
let n2 = false, { resolve: r2, promise: i2 } = Sn();
|
|
920
920
|
return { getAuthHeaders: async () => {
|
|
921
921
|
if (!e7 && n2 && (e7 = await i2), !e7) throw Error(`Failed to resolve auth token`);
|
|
922
922
|
return { headers: { Authorization: await e7() } };
|
|
@@ -924,37 +924,37 @@ var En = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host:
|
|
|
924
924
|
r2(e8);
|
|
925
925
|
}) };
|
|
926
926
|
} });
|
|
927
|
-
function
|
|
927
|
+
function En() {
|
|
928
928
|
return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function Dn() {
|
|
931
931
|
let e6 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
|
|
932
932
|
if (!e6) return;
|
|
933
933
|
let t2 = new URL(e6);
|
|
934
934
|
return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
|
|
935
935
|
}
|
|
936
|
-
var
|
|
936
|
+
var On = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
|
|
937
937
|
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`);
|
|
938
938
|
return e6.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
|
|
939
939
|
}, getAccessToken: () => {
|
|
940
940
|
throw Error(`Not implemented`);
|
|
941
941
|
}, observeState: () => ({ disconnect: () => {
|
|
942
942
|
} }) });
|
|
943
|
-
var
|
|
943
|
+
var kn = Tn({ createHost: function(e6) {
|
|
944
944
|
let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e6?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e6 || {};
|
|
945
945
|
if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
|
|
946
|
-
return { channel:
|
|
946
|
+
return { channel: On({ clientSdk: t2, applicationId: n2 }), close: () => {
|
|
947
947
|
} };
|
|
948
948
|
} });
|
|
949
|
-
var
|
|
950
|
-
let n2 =
|
|
949
|
+
var An = (e6, t2) => {
|
|
950
|
+
let n2 = kn.host({ applicationId: e6, componentId: t2 }), r2 = kn.auth();
|
|
951
951
|
return Je({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
952
952
|
};
|
|
953
|
-
var
|
|
954
|
-
function
|
|
953
|
+
var jn = (e6) => An(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
|
|
954
|
+
function Mn() {
|
|
955
955
|
let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
956
956
|
if (e6) return { initWixModules(t3, n3) {
|
|
957
|
-
return
|
|
957
|
+
return Nn(() => e6(t3, n3));
|
|
958
958
|
}, fetchWithAuth() {
|
|
959
959
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
960
960
|
}, graphql() {
|
|
@@ -964,10 +964,10 @@ function Nn() {
|
|
|
964
964
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
965
965
|
if (r2) {
|
|
966
966
|
if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
|
|
967
|
-
return
|
|
967
|
+
return Nn(() => n2.use(e7));
|
|
968
968
|
}
|
|
969
969
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
970
|
-
return
|
|
970
|
+
return Nn(() => t2.use(e7));
|
|
971
971
|
}, fetchWithAuth: (e7, n3) => {
|
|
972
972
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
973
973
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -979,7 +979,7 @@ function Nn() {
|
|
|
979
979
|
return t2.graphql(e7, n3, r2);
|
|
980
980
|
} };
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function Nn(e6) {
|
|
983
983
|
let t2 = globalThis.__wix_context__, n2 = { client: y.client, elevatedClient: y.elevatedClient }, r2;
|
|
984
984
|
globalThis.__wix_context__ = void 0, y.client = void 0, y.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
985
985
|
try {
|
|
@@ -988,17 +988,17 @@ function Pn(e6) {
|
|
|
988
988
|
globalThis.__wix_context__ = t2, y.client = n2.client, y.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
989
989
|
}
|
|
990
990
|
}
|
|
991
|
-
function
|
|
991
|
+
function Pn(e6, t2) {
|
|
992
992
|
return { ...e6, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
|
|
993
|
-
let r2 =
|
|
993
|
+
let r2 = Mn();
|
|
994
994
|
if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
995
995
|
return r2.initWixModules(e6)[t3].apply(void 0, n2);
|
|
996
996
|
}])) };
|
|
997
997
|
}
|
|
998
|
-
function
|
|
999
|
-
return
|
|
998
|
+
function Fn(e6) {
|
|
999
|
+
return Pn({ __type: `host`, create: (t2) => Object.entries(e6).reduce((e7, [n2, r2]) => ({ ...e7, [n2]: r2(t2) }), {}) }, Object.keys(e6));
|
|
1000
1000
|
}
|
|
1001
|
-
var
|
|
1001
|
+
var In = class {
|
|
1002
1002
|
constructor(e6) {
|
|
1003
1003
|
this.message = e6, this.captureException = () => {
|
|
1004
1004
|
console.error(this.message);
|
|
@@ -1013,13 +1013,13 @@ var Ln = class {
|
|
|
1013
1013
|
};
|
|
1014
1014
|
}
|
|
1015
1015
|
};
|
|
1016
|
-
var
|
|
1017
|
-
var
|
|
1018
|
-
function
|
|
1016
|
+
var Ln = (e6) => new In(e6);
|
|
1017
|
+
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.`) });
|
|
1018
|
+
function zn(e6) {
|
|
1019
1019
|
let t2 = Promise.resolve(e6);
|
|
1020
1020
|
return t2.status = `fulfilled`, t2.value = e6, t2;
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function Bn(e6) {
|
|
1023
1023
|
if (e6.status === `fulfilled`) return e6.value;
|
|
1024
1024
|
throw e6.status === `rejected` ? e6.reason : (e6.status === `pending` || (e6.status = `pending`, e6.then((t2) => {
|
|
1025
1025
|
e6.status = `fulfilled`, e6.value = t2;
|
|
@@ -1027,17 +1027,17 @@ function Vn(e6) {
|
|
|
1027
1027
|
e6.status = `rejected`, e6.reason = t2;
|
|
1028
1028
|
})), e6);
|
|
1029
1029
|
}
|
|
1030
|
-
var
|
|
1031
|
-
function
|
|
1032
|
-
let r2 =
|
|
1033
|
-
r2 || (r2 = /* @__PURE__ */ new WeakMap(),
|
|
1030
|
+
var Vn = /* @__PURE__ */ new WeakMap();
|
|
1031
|
+
function Hn(e6, t2, n2) {
|
|
1032
|
+
let r2 = Vn.get(e6);
|
|
1033
|
+
r2 || (r2 = /* @__PURE__ */ new WeakMap(), Vn.set(e6, r2));
|
|
1034
1034
|
let i2 = r2.get(t2);
|
|
1035
1035
|
i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
|
|
1036
1036
|
let a2 = i2.get(n2);
|
|
1037
1037
|
if (!a2) {
|
|
1038
|
-
if (e6.status === `fulfilled`) a2 =
|
|
1038
|
+
if (e6.status === `fulfilled`) a2 = zn(t2(e6.value));
|
|
1039
1039
|
else if (e6.status === `rejected`) try {
|
|
1040
|
-
a2 =
|
|
1040
|
+
a2 = zn(n2(e6.reason));
|
|
1041
1041
|
} catch {
|
|
1042
1042
|
a2 = e6.then(t2, n2);
|
|
1043
1043
|
}
|
|
@@ -1046,36 +1046,36 @@ function Un(e6, t2, n2) {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
return a2;
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function I(e6) {
|
|
1050
1050
|
return e6;
|
|
1051
1051
|
}
|
|
1052
|
-
var
|
|
1053
|
-
var
|
|
1052
|
+
var Un = I(`@wix/site-service-rendering-context`);
|
|
1053
|
+
var Wn = () => {
|
|
1054
1054
|
try {
|
|
1055
|
-
return (0, import_services_manager_react.useService)(
|
|
1055
|
+
return (0, import_services_manager_react.useService)(Un).SSR;
|
|
1056
1056
|
} catch {
|
|
1057
1057
|
return false;
|
|
1058
1058
|
}
|
|
1059
1059
|
};
|
|
1060
|
-
var
|
|
1061
|
-
function
|
|
1060
|
+
var Gn = (e6, t2) => e6.length === t2.length && e6.every((e7, n2) => Object.is(e7, t2[n2]));
|
|
1061
|
+
function Kn(e6, t2) {
|
|
1062
1062
|
let [n2, r2] = (0, import_react.useState)(() => ({ deps: t2, value: e6() }));
|
|
1063
1063
|
return (0, import_react.useEffect)(() => {
|
|
1064
|
-
if (
|
|
1064
|
+
if (Gn(n2.deps, t2)) return;
|
|
1065
1065
|
let i2 = e6();
|
|
1066
1066
|
(0, import_react.startTransition)(() => r2({ deps: t2, value: i2 }));
|
|
1067
1067
|
}, t2), n2.value;
|
|
1068
1068
|
}
|
|
1069
|
-
var
|
|
1070
|
-
var
|
|
1069
|
+
var qn = I(`@wix/viewer-service-site-members`);
|
|
1070
|
+
var Jn = () => {
|
|
1071
1071
|
try {
|
|
1072
|
-
return (0, import_services_manager_react.useService)(
|
|
1072
|
+
return (0, import_services_manager_react.useService)(qn);
|
|
1073
1073
|
} catch {
|
|
1074
1074
|
return;
|
|
1075
1075
|
}
|
|
1076
1076
|
};
|
|
1077
|
-
var
|
|
1078
|
-
let n2 =
|
|
1077
|
+
var Yn = (e6, t2) => {
|
|
1078
|
+
let n2 = Jn(), [r2, i2] = (0, import_react.useState)(), a2 = !!e6.post?.preview;
|
|
1079
1079
|
return (0, import_react.useEffect)(() => {
|
|
1080
1080
|
if (!a2) return;
|
|
1081
1081
|
let e7 = true, r3 = () => {
|
|
@@ -1093,18 +1093,18 @@ var Xn = (e6, t2) => {
|
|
|
1093
1093
|
};
|
|
1094
1094
|
}, [a2, t2, n2]), (0, import_react.useMemo)(() => a2 && r2 && r2._id === e6.post?._id ? { ...e6, post: r2, paywall: void 0 } : e6, [a2, r2, e6]);
|
|
1095
1095
|
};
|
|
1096
|
-
var
|
|
1097
|
-
var
|
|
1098
|
-
var
|
|
1099
|
-
var
|
|
1100
|
-
var
|
|
1101
|
-
var
|
|
1102
|
-
var
|
|
1096
|
+
var Xn = I(`@wix/site-service-url`);
|
|
1097
|
+
var Zn = `14bcded7-0066-7c35-14d7-466cb3f09103`;
|
|
1098
|
+
var Qn = `post`;
|
|
1099
|
+
var $n = `category`;
|
|
1100
|
+
var er = `builder-post`;
|
|
1101
|
+
var tr = `__blog_unknown_section__`;
|
|
1102
|
+
var nr = (e6) => {
|
|
1103
1103
|
let t2;
|
|
1104
1104
|
try {
|
|
1105
|
-
let n3 = e6.appSectionRelativeUrl(
|
|
1106
|
-
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`,
|
|
1107
|
-
t2 = e6.appSectionRelativeUrl(
|
|
1105
|
+
let n3 = e6.appSectionRelativeUrl(Zn, er);
|
|
1106
|
+
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, tr) && !n3?.endsWith(`/post-page`)) return;
|
|
1107
|
+
t2 = e6.appSectionRelativeUrl(Zn, er, true);
|
|
1108
1108
|
} catch {
|
|
1109
1109
|
return;
|
|
1110
1110
|
}
|
|
@@ -1112,12 +1112,12 @@ var rr = (e6) => {
|
|
|
1112
1112
|
let n2 = t2.split(`/`).filter(Boolean);
|
|
1113
1113
|
return n2[n2.length - 1] === `post-page` && n2.pop(), n2.length > 0 ? n2.join(`/`) : void 0;
|
|
1114
1114
|
};
|
|
1115
|
-
var
|
|
1116
|
-
var
|
|
1117
|
-
let t2 =
|
|
1118
|
-
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${
|
|
1115
|
+
var rr = (e6) => `${e6}/${Qn}`;
|
|
1116
|
+
var ir = (e6) => {
|
|
1117
|
+
let t2 = nr(e6);
|
|
1118
|
+
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${rr(t2)}`;
|
|
1119
1119
|
};
|
|
1120
|
-
var
|
|
1120
|
+
var ar = (e6, t2) => {
|
|
1121
1121
|
if (!e6 || !t2) return;
|
|
1122
1122
|
let n2;
|
|
1123
1123
|
try {
|
|
@@ -1131,14 +1131,14 @@ var or = (e6, t2) => {
|
|
|
1131
1131
|
if (r2.endsWith(t3) && i2.endsWith(`/post`)) return `${n2.origin}${i2}`;
|
|
1132
1132
|
}
|
|
1133
1133
|
};
|
|
1134
|
-
var
|
|
1134
|
+
var or = (e6) => {
|
|
1135
1135
|
if (!e6) return;
|
|
1136
1136
|
if (typeof e6 == `string`) return e6;
|
|
1137
1137
|
let { base: t2, path: n2 } = e6;
|
|
1138
1138
|
return t2 ? `${t2.replace(/\/+$/, ``)}${n2 ?? ``}` : void 0;
|
|
1139
1139
|
};
|
|
1140
|
-
var
|
|
1141
|
-
let n2 =
|
|
1140
|
+
var sr = (e6, t2) => {
|
|
1141
|
+
let n2 = or(e6.url), r2 = `/${Qn}`;
|
|
1142
1142
|
if (!n2 || !t2?.endsWith(r2)) return;
|
|
1143
1143
|
let i2, a2;
|
|
1144
1144
|
try {
|
|
@@ -1149,41 +1149,41 @@ var cr = (e6, t2) => {
|
|
|
1149
1149
|
let o2 = a2.slice(0, -r2.length);
|
|
1150
1150
|
return o2 && i2.startsWith(`${o2}/`) && !i2.startsWith(`${a2}/`) ? n2 : void 0;
|
|
1151
1151
|
};
|
|
1152
|
-
var
|
|
1153
|
-
let n2 =
|
|
1152
|
+
var cr = (e6, t2) => {
|
|
1153
|
+
let n2 = sr(e6, t2);
|
|
1154
1154
|
if (n2) return { href: n2, target: `_self` };
|
|
1155
1155
|
if (t2 && e6.slug) return { href: `${t2}/${encodeURIComponent(e6.slug)}`, target: `_self` };
|
|
1156
|
-
let r2 =
|
|
1156
|
+
let r2 = or(e6.url);
|
|
1157
1157
|
return r2 ? { href: r2, target: `_self` } : void 0;
|
|
1158
1158
|
};
|
|
1159
|
-
var
|
|
1160
|
-
let n2 =
|
|
1159
|
+
var lr = (e6, t2) => {
|
|
1160
|
+
let n2 = nr(e6);
|
|
1161
1161
|
if (n2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${n2}/${t2}`;
|
|
1162
1162
|
};
|
|
1163
|
-
var
|
|
1163
|
+
var ur = (e6) => {
|
|
1164
1164
|
let t2;
|
|
1165
1165
|
try {
|
|
1166
|
-
t2 = (0, import_services_manager_react.useService)(
|
|
1166
|
+
t2 = (0, import_services_manager_react.useService)(Xn);
|
|
1167
1167
|
} catch {
|
|
1168
1168
|
return;
|
|
1169
1169
|
}
|
|
1170
|
-
return
|
|
1170
|
+
return ir(t2) ?? ar(t2.currentUrl, e6);
|
|
1171
1171
|
};
|
|
1172
|
-
var
|
|
1173
|
-
var
|
|
1174
|
-
var
|
|
1172
|
+
var dr = { 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` };
|
|
1173
|
+
var fr = (e6) => `${e6} rendered`;
|
|
1174
|
+
var pr = (e6, t2, n2) => {
|
|
1175
1175
|
(0, import_react.useEffect)(() => {
|
|
1176
1176
|
if (t2 !== `loading` && typeof performance < `u` && typeof performance.mark == `function`) try {
|
|
1177
|
-
performance.mark(
|
|
1177
|
+
performance.mark(fr(e6), { detail: { state: t2, compId: n2 } });
|
|
1178
1178
|
} catch {
|
|
1179
1179
|
}
|
|
1180
1180
|
}, [e6, t2, n2]);
|
|
1181
1181
|
};
|
|
1182
|
-
var
|
|
1183
|
-
function
|
|
1184
|
-
let e6 =
|
|
1182
|
+
var mr = I(`@wix/site-service-warmup-data`);
|
|
1183
|
+
function hr() {
|
|
1184
|
+
let e6 = Wn(), t2 = null;
|
|
1185
1185
|
try {
|
|
1186
|
-
t2 = (0, import_services_manager_react.useGetService)()(
|
|
1186
|
+
t2 = (0, import_services_manager_react.useGetService)()(mr);
|
|
1187
1187
|
} catch {
|
|
1188
1188
|
}
|
|
1189
1189
|
return (0, import_react.useMemo)(() => ({ isServer: e6, scope: t2 ?? void 0, get: async (n2) => {
|
|
@@ -1200,13 +1200,13 @@ function gr() {
|
|
|
1200
1200
|
}
|
|
1201
1201
|
} }), [e6, t2]);
|
|
1202
1202
|
}
|
|
1203
|
-
var
|
|
1203
|
+
var gr = () => {
|
|
1204
1204
|
let e6 = /* @__PURE__ */ new Map();
|
|
1205
1205
|
return { getOrInsert: (t2, n2) => (e6.has(t2) || e6.set(t2, n2().finally(() => {
|
|
1206
1206
|
e6.delete(t2);
|
|
1207
1207
|
})), e6.get(t2)) };
|
|
1208
1208
|
};
|
|
1209
|
-
var
|
|
1209
|
+
var _r = async (e6) => {
|
|
1210
1210
|
try {
|
|
1211
1211
|
let { default: t2 } = await e6();
|
|
1212
1212
|
return t2;
|
|
@@ -1214,9 +1214,9 @@ var vr = async (e6) => {
|
|
|
1214
1214
|
return;
|
|
1215
1215
|
}
|
|
1216
1216
|
};
|
|
1217
|
-
var
|
|
1218
|
-
let r2 =
|
|
1219
|
-
let [i3, a2] = await Promise.all([
|
|
1217
|
+
var vr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
1218
|
+
let r2 = gr(), i2 = async (r3) => {
|
|
1219
|
+
let [i3, a2] = await Promise.all([_r(() => t2(r3)), !e6 || !n2 ? void 0 : _r(() => n2(r3))]);
|
|
1220
1220
|
if (i3 && a2) return { ...i3, ...a2 };
|
|
1221
1221
|
if (i3) return i3;
|
|
1222
1222
|
if (a2) return a2;
|
|
@@ -1224,61 +1224,61 @@ var yr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
|
1224
1224
|
};
|
|
1225
1225
|
return (e7) => r2.getOrInsert(e7, () => i2(e7));
|
|
1226
1226
|
};
|
|
1227
|
-
var
|
|
1228
|
-
var
|
|
1227
|
+
var L = (e6) => typeof e6 == `string`;
|
|
1228
|
+
var R = () => {
|
|
1229
1229
|
let e6, t2, n2 = new Promise((n3, r2) => {
|
|
1230
1230
|
e6 = n3, t2 = r2;
|
|
1231
1231
|
});
|
|
1232
1232
|
return n2.resolve = e6, n2.reject = t2, n2;
|
|
1233
1233
|
};
|
|
1234
|
-
var
|
|
1235
|
-
var
|
|
1234
|
+
var yr = (e6) => e6 == null ? `` : String(e6);
|
|
1235
|
+
var br = (e6, t2, n2) => {
|
|
1236
1236
|
e6.forEach((e7) => {
|
|
1237
1237
|
t2[e7] && (n2[e7] = t2[e7]);
|
|
1238
1238
|
});
|
|
1239
1239
|
};
|
|
1240
|
-
var
|
|
1241
|
-
var
|
|
1242
|
-
var
|
|
1243
|
-
var
|
|
1244
|
-
let r2 =
|
|
1240
|
+
var xr = /###/g;
|
|
1241
|
+
var Sr = (e6) => e6 && e6.includes(`###`) ? e6.replace(xr, `.`) : e6;
|
|
1242
|
+
var Cr = (e6) => !e6 || L(e6);
|
|
1243
|
+
var z = (e6, t2, n2) => {
|
|
1244
|
+
let r2 = L(t2) ? t2.split(`.`) : t2, i2 = 0;
|
|
1245
1245
|
for (; i2 < r2.length - 1; ) {
|
|
1246
|
-
if (
|
|
1247
|
-
let t3 =
|
|
1246
|
+
if (Cr(e6)) return {};
|
|
1247
|
+
let t3 = Sr(r2[i2]);
|
|
1248
1248
|
!e6[t3] && n2 && (e6[t3] = new n2()), e6 = Object.prototype.hasOwnProperty.call(e6, t3) ? e6[t3] : {}, ++i2;
|
|
1249
1249
|
}
|
|
1250
|
-
return
|
|
1250
|
+
return Cr(e6) ? {} : { obj: e6, k: Sr(r2[i2]) };
|
|
1251
1251
|
};
|
|
1252
|
-
var
|
|
1253
|
-
let { obj: r2, k: i2 } =
|
|
1252
|
+
var wr = (e6, t2, n2) => {
|
|
1253
|
+
let { obj: r2, k: i2 } = z(e6, t2, Object);
|
|
1254
1254
|
if (r2 !== void 0 || t2.length === 1) {
|
|
1255
1255
|
r2[i2] = n2;
|
|
1256
1256
|
return;
|
|
1257
1257
|
}
|
|
1258
|
-
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 =
|
|
1259
|
-
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 =
|
|
1258
|
+
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = z(e6, o2, Object);
|
|
1259
|
+
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = z(e6, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
|
|
1260
1260
|
s2.obj[`${s2.k}.${a2}`] = n2;
|
|
1261
1261
|
};
|
|
1262
|
-
var
|
|
1263
|
-
let { obj: i2, k: a2 } =
|
|
1262
|
+
var Tr = (e6, t2, n2, r2) => {
|
|
1263
|
+
let { obj: i2, k: a2 } = z(e6, t2, Object);
|
|
1264
1264
|
i2[a2] = i2[a2] || [], i2[a2].push(n2);
|
|
1265
1265
|
};
|
|
1266
|
-
var
|
|
1267
|
-
let { obj: n2, k: r2 } =
|
|
1266
|
+
var Er = (e6, t2) => {
|
|
1267
|
+
let { obj: n2, k: r2 } = z(e6, t2);
|
|
1268
1268
|
if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
|
|
1269
1269
|
};
|
|
1270
|
-
var
|
|
1271
|
-
let r2 =
|
|
1272
|
-
return r2 === void 0 ?
|
|
1270
|
+
var Dr = (e6, t2, n2) => {
|
|
1271
|
+
let r2 = Er(e6, n2);
|
|
1272
|
+
return r2 === void 0 ? Er(t2, n2) : r2;
|
|
1273
1273
|
};
|
|
1274
|
-
var
|
|
1275
|
-
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ?
|
|
1274
|
+
var Or = (e6, t2, n2) => {
|
|
1275
|
+
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ? L(e6[r2]) || e6[r2] instanceof String || L(t2[r2]) || t2[r2] instanceof String ? n2 && (e6[r2] = t2[r2]) : Or(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
|
|
1276
1276
|
return e6;
|
|
1277
1277
|
};
|
|
1278
|
-
var
|
|
1279
|
-
var
|
|
1280
|
-
var
|
|
1281
|
-
var
|
|
1278
|
+
var B = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
|
|
1279
|
+
var kr = { "&": `&`, "<": `<`, ">": `>`, '"': `"`, "'": `'`, "/": `/` };
|
|
1280
|
+
var Ar = (e6) => L(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => kr[e7]) : e6;
|
|
1281
|
+
var jr = class {
|
|
1282
1282
|
constructor(e6) {
|
|
1283
1283
|
this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
1284
1284
|
}
|
|
@@ -1289,20 +1289,20 @@ var Mr = class {
|
|
|
1289
1289
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e6, n2), this.regExpQueue.push(e6), n2;
|
|
1290
1290
|
}
|
|
1291
1291
|
};
|
|
1292
|
-
var
|
|
1293
|
-
var
|
|
1294
|
-
var
|
|
1292
|
+
var Mr = [` `, `,`, `?`, `!`, `;`];
|
|
1293
|
+
var Nr = new jr(20);
|
|
1294
|
+
var Pr = (e6, t2, n2) => {
|
|
1295
1295
|
t2 ||= ``, n2 ||= ``;
|
|
1296
|
-
let r2 =
|
|
1296
|
+
let r2 = Mr.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
|
|
1297
1297
|
if (r2.length === 0) return true;
|
|
1298
|
-
let i2 =
|
|
1298
|
+
let i2 = Nr.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
|
|
1299
1299
|
if (!a2) {
|
|
1300
1300
|
let t3 = e6.indexOf(n2);
|
|
1301
1301
|
t3 > 0 && !i2.test(e6.substring(0, t3)) && (a2 = true);
|
|
1302
1302
|
}
|
|
1303
1303
|
return a2;
|
|
1304
1304
|
};
|
|
1305
|
-
var
|
|
1305
|
+
var Fr = (e6, t2, n2 = `.`) => {
|
|
1306
1306
|
if (!e6) return;
|
|
1307
1307
|
if (e6[t2]) return Object.prototype.hasOwnProperty.call(e6, t2) ? e6[t2] : void 0;
|
|
1308
1308
|
let r2 = t2.split(n2), i2 = e6;
|
|
@@ -1318,8 +1318,8 @@ var Ir = (e6, t2, n2 = `.`) => {
|
|
|
1318
1318
|
}
|
|
1319
1319
|
return i2;
|
|
1320
1320
|
};
|
|
1321
|
-
var
|
|
1322
|
-
var
|
|
1321
|
+
var V = (e6) => e6?.replace(/_/g, `-`);
|
|
1322
|
+
var Ir = { type: `logger`, log(e6) {
|
|
1323
1323
|
this.output(`log`, e6);
|
|
1324
1324
|
}, warn(e6) {
|
|
1325
1325
|
this.output(`warn`, e6);
|
|
@@ -1328,12 +1328,12 @@ var Lr = { type: `logger`, log(e6) {
|
|
|
1328
1328
|
}, output(e6, t2) {
|
|
1329
1329
|
console?.[e6]?.apply?.(console, t2);
|
|
1330
1330
|
} };
|
|
1331
|
-
var
|
|
1331
|
+
var H = new class e2 {
|
|
1332
1332
|
constructor(e6, t2 = {}) {
|
|
1333
1333
|
this.init(e6, t2);
|
|
1334
1334
|
}
|
|
1335
1335
|
init(e6, t2 = {}) {
|
|
1336
|
-
this.prefix = t2.prefix || `i18next:`, this.logger = e6 ||
|
|
1336
|
+
this.prefix = t2.prefix || `i18next:`, this.logger = e6 || Ir, this.options = t2, this.debug = t2.debug;
|
|
1337
1337
|
}
|
|
1338
1338
|
log(...e6) {
|
|
1339
1339
|
return this.forward(e6, `log`, ``, true);
|
|
@@ -1348,7 +1348,7 @@ var V = new class e2 {
|
|
|
1348
1348
|
return this.forward(e6, `warn`, `WARNING DEPRECATED: `, true);
|
|
1349
1349
|
}
|
|
1350
1350
|
forward(e6, t2, n2, r2) {
|
|
1351
|
-
return r2 && !this.debug ? null : (e6 = e6.map((e7) =>
|
|
1351
|
+
return r2 && !this.debug ? null : (e6 = e6.map((e7) => L(e7) ? e7.replace(/[\r\n\x00-\x1F\x7F]/g, ` `) : e7), L(e6[0]) && (e6[0] = `${n2}${this.prefix} ${e6[0]}`), this.logger[t2](e6));
|
|
1352
1352
|
}
|
|
1353
1353
|
create(t2) {
|
|
1354
1354
|
return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
|
|
@@ -1357,7 +1357,7 @@ var V = new class e2 {
|
|
|
1357
1357
|
return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
|
|
1358
1358
|
}
|
|
1359
1359
|
}();
|
|
1360
|
-
var
|
|
1360
|
+
var Lr = class {
|
|
1361
1361
|
constructor() {
|
|
1362
1362
|
this.observers = {};
|
|
1363
1363
|
}
|
|
@@ -1385,8 +1385,8 @@ var Rr = class {
|
|
|
1385
1385
|
});
|
|
1386
1386
|
}
|
|
1387
1387
|
};
|
|
1388
|
-
var
|
|
1389
|
-
var
|
|
1388
|
+
var Rr = /* @__PURE__ */ new WeakSet();
|
|
1389
|
+
var zr = class extends Lr {
|
|
1390
1390
|
constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
|
|
1391
1391
|
super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
|
|
1392
1392
|
}
|
|
@@ -1399,23 +1399,23 @@ var Br = class extends Rr {
|
|
|
1399
1399
|
}
|
|
1400
1400
|
getResource(e6, t2, n2, r2 = {}) {
|
|
1401
1401
|
let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
|
|
1402
|
-
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) :
|
|
1403
|
-
let s2 =
|
|
1404
|
-
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !
|
|
1402
|
+
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : L(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
|
|
1403
|
+
let s2 = Er(this.data, o2);
|
|
1404
|
+
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !L(n2) ? s2 : Fr(this.data?.[e6]?.[t2], n2, i2);
|
|
1405
1405
|
}
|
|
1406
1406
|
addResource(e6, t2, n2, r2, i2 = { silent: false }) {
|
|
1407
1407
|
let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
|
|
1408
|
-
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2),
|
|
1408
|
+
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), wr(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
|
|
1409
1409
|
}
|
|
1410
1410
|
addResources(e6, t2, n2, r2 = { silent: false }) {
|
|
1411
|
-
for (let r3 in n2) (
|
|
1411
|
+
for (let r3 in n2) (L(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
|
|
1412
1412
|
r2.silent || this.emit(`added`, e6, t2, n2);
|
|
1413
1413
|
}
|
|
1414
1414
|
addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
|
|
1415
1415
|
let o2 = [e6, t2];
|
|
1416
1416
|
e6.includes(`.`) && (o2 = e6.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
|
|
1417
|
-
let s2 =
|
|
1418
|
-
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ?
|
|
1417
|
+
let s2 = Er(this.data, o2) || {};
|
|
1418
|
+
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Or(s2, n2, i2) : s2 = { ...s2, ...n2 }, wr(this.data, o2, s2), a2.silent || this.emit(`added`, e6, t2, n2);
|
|
1419
1419
|
}
|
|
1420
1420
|
removeResourceBundle(e6, t2) {
|
|
1421
1421
|
this.hasResourceBundle(e6, t2) && delete this.data[e6][t2], this.removeNamespaces(t2), this.emit(`removed`, e6, t2);
|
|
@@ -1433,37 +1433,37 @@ var Br = class extends Rr {
|
|
|
1433
1433
|
let t2 = this.getDataByLanguage(e6);
|
|
1434
1434
|
return !!(t2 && Object.keys(t2) || []).find((e7) => {
|
|
1435
1435
|
let n2 = t2[e7];
|
|
1436
|
-
return
|
|
1436
|
+
return Rr.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && Rr.add(n2), true);
|
|
1437
1437
|
});
|
|
1438
1438
|
}
|
|
1439
1439
|
toJSON() {
|
|
1440
1440
|
return this.data;
|
|
1441
1441
|
}
|
|
1442
1442
|
};
|
|
1443
|
-
var
|
|
1443
|
+
var Br = { processors: {}, addPostProcessor(e6) {
|
|
1444
1444
|
this.processors[e6.name] = e6;
|
|
1445
1445
|
}, handle(e6, t2, n2, r2, i2) {
|
|
1446
1446
|
return e6.forEach((e7) => {
|
|
1447
1447
|
t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
|
|
1448
1448
|
}), t2;
|
|
1449
1449
|
} };
|
|
1450
|
-
var
|
|
1451
|
-
function
|
|
1450
|
+
var Vr = Symbol(`i18next/PATH_KEY`);
|
|
1451
|
+
function Hr() {
|
|
1452
1452
|
let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
1453
|
-
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 ===
|
|
1453
|
+
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Vr ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1456
|
-
let { [
|
|
1455
|
+
function U(e6, t2) {
|
|
1456
|
+
let { [Vr]: n2 } = e6(Hr()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
|
|
1457
1457
|
if (n2.length > 1 && i2) {
|
|
1458
1458
|
let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
|
|
1459
1459
|
if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
|
|
1460
1460
|
}
|
|
1461
1461
|
return n2.join(r2);
|
|
1462
1462
|
}
|
|
1463
|
-
var
|
|
1464
|
-
var
|
|
1463
|
+
var Ur = (e6) => !L(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
|
|
1464
|
+
var Wr = class e3 extends Lr {
|
|
1465
1465
|
constructor(e6, t2 = {}) {
|
|
1466
|
-
super(),
|
|
1466
|
+
super(), br([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = H.create(`translator`), this.checkedLoadedFor = {};
|
|
1467
1467
|
}
|
|
1468
1468
|
changeLanguage(e6) {
|
|
1469
1469
|
e6 && (this.language = e6);
|
|
@@ -1473,33 +1473,33 @@ var Gr = class e3 extends Rr {
|
|
|
1473
1473
|
if (e6 == null) return false;
|
|
1474
1474
|
let r2 = this.resolve(e6, n2);
|
|
1475
1475
|
if (r2?.res === void 0) return false;
|
|
1476
|
-
let i2 =
|
|
1476
|
+
let i2 = Ur(r2.res);
|
|
1477
1477
|
return !(n2.returnObjects === false && i2);
|
|
1478
1478
|
}
|
|
1479
1479
|
extractFromKey(e6, t2) {
|
|
1480
1480
|
let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
|
|
1481
1481
|
n2 === void 0 && (n2 = `:`);
|
|
1482
|
-
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 && !
|
|
1482
|
+
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 && !Pr(e6, n2, r2);
|
|
1483
1483
|
if (a2 && !o2) {
|
|
1484
1484
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1485
|
-
if (t3 && t3.length > 0) return { key: e6, namespaces:
|
|
1485
|
+
if (t3 && t3.length > 0) return { key: e6, namespaces: L(i2) ? [i2] : i2 };
|
|
1486
1486
|
let a3 = e6.split(n2);
|
|
1487
1487
|
(n2 !== r2 || n2 === r2 && this.options.ns.includes(a3[0])) && (i2 = a3.shift()), e6 = a3.join(r2);
|
|
1488
1488
|
}
|
|
1489
|
-
return { key: e6, namespaces:
|
|
1489
|
+
return { key: e6, namespaces: L(i2) ? [i2] : i2 };
|
|
1490
1490
|
}
|
|
1491
1491
|
translate(t2, n2, r2) {
|
|
1492
1492
|
let i2 = typeof n2 == `object` ? { ...n2 } : n2;
|
|
1493
1493
|
if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
|
|
1494
|
-
typeof t2 == `function` && (t2 =
|
|
1494
|
+
typeof t2 == `function` && (t2 = U(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? U(e6, { ...this.options, ...i2 }) : String(e6));
|
|
1495
1495
|
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;
|
|
1496
1496
|
u2 === void 0 && (u2 = `:`);
|
|
1497
1497
|
let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
1498
1498
|
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;
|
|
1499
|
-
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 && !
|
|
1499
|
+
let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !L(i2.count), x2 = e3.hasDefaultValue(i2), 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;
|
|
1500
1500
|
y2 && !m2 && x2 && (T2 = w2);
|
|
1501
|
-
let te2 =
|
|
1502
|
-
if (y2 && T2 && te2 && !_2.includes(ne2) && !(
|
|
1501
|
+
let te2 = Ur(T2), ne2 = Object.prototype.toString.apply(T2);
|
|
1502
|
+
if (y2 && T2 && te2 && !_2.includes(ne2) && !(L(v2) && Array.isArray(T2))) {
|
|
1503
1503
|
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
1504
1504
|
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
1505
1505
|
let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
|
|
@@ -1509,11 +1509,11 @@ var Gr = class e3 extends Rr {
|
|
|
1509
1509
|
let e6 = Array.isArray(T2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
|
|
1510
1510
|
for (let e7 in T2) if (Object.prototype.hasOwnProperty.call(T2, e7)) {
|
|
1511
1511
|
let r3 = `${n3}${o2}${e7}`;
|
|
1512
|
-
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue:
|
|
1512
|
+
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Ur(w2) ? w2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = T2[e7]);
|
|
1513
1513
|
}
|
|
1514
1514
|
m2 = t3;
|
|
1515
1515
|
}
|
|
1516
|
-
} else if (y2 &&
|
|
1516
|
+
} else if (y2 && L(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
|
|
1517
1517
|
else {
|
|
1518
1518
|
let e6 = false, n3 = false;
|
|
1519
1519
|
!this.isValidLookup(m2) && x2 && (e6 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
|
|
@@ -1545,30 +1545,30 @@ var Gr = class e3 extends Rr {
|
|
|
1545
1545
|
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 });
|
|
1546
1546
|
else if (!n2.skipInterpolation) {
|
|
1547
1547
|
n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
|
|
1548
|
-
let a3 =
|
|
1548
|
+
let a3 = L(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
|
|
1549
1549
|
if (a3) {
|
|
1550
1550
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1551
1551
|
o3 = t3 && t3.length;
|
|
1552
1552
|
}
|
|
1553
|
-
let s2 = n2.replace && !
|
|
1553
|
+
let s2 = n2.replace && !L(n2.replace) ? n2.replace : n2;
|
|
1554
1554
|
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) {
|
|
1555
1555
|
let t3 = e6.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
|
|
1556
1556
|
o3 < r3 && (n2.nest = false);
|
|
1557
1557
|
}
|
|
1558
1558
|
!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();
|
|
1559
1559
|
}
|
|
1560
|
-
let a2 = n2.postProcess || this.options.postProcess, o2 =
|
|
1561
|
-
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 =
|
|
1560
|
+
let a2 = n2.postProcess || this.options.postProcess, o2 = L(a2) ? [a2] : a2;
|
|
1561
|
+
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = Br.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
|
|
1562
1562
|
}
|
|
1563
1563
|
resolve(e6, t2 = {}) {
|
|
1564
1564
|
let n2, r2, i2, a2, o2;
|
|
1565
|
-
return
|
|
1565
|
+
return L(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? U(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
|
|
1566
1566
|
if (this.isValidLookup(n2)) return;
|
|
1567
1567
|
let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
|
|
1568
1568
|
r2 = c2;
|
|
1569
1569
|
let l2 = s2.namespaces;
|
|
1570
1570
|
this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
|
|
1571
|
-
let u2 = t2.count !== void 0 && !
|
|
1571
|
+
let u2 = t2.count !== void 0 && !L(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (L(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
|
|
1572
1572
|
l2.forEach((e8) => {
|
|
1573
1573
|
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) => {
|
|
1574
1574
|
if (this.isValidLookup(n2)) return;
|
|
@@ -1597,7 +1597,7 @@ var Gr = class e3 extends Rr {
|
|
|
1597
1597
|
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e6, t2, n2, r2) : this.resourceStore.getResource(e6, t2, n2, r2);
|
|
1598
1598
|
}
|
|
1599
1599
|
getUsedParamsDetails(e6 = {}) {
|
|
1600
|
-
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !
|
|
1600
|
+
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !L(e6.replace), r2 = n2 ? e6.replace : e6;
|
|
1601
1601
|
if (n2 && e6.count !== void 0 && (r2 = { ...r2, count: e6.count }), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
|
|
1602
1602
|
r2 = { ...r2 };
|
|
1603
1603
|
for (let e7 of t2) delete r2[e7];
|
|
@@ -1609,25 +1609,25 @@ var Gr = class e3 extends Rr {
|
|
|
1609
1609
|
return false;
|
|
1610
1610
|
}
|
|
1611
1611
|
};
|
|
1612
|
-
var
|
|
1612
|
+
var Gr = class {
|
|
1613
1613
|
constructor(e6) {
|
|
1614
|
-
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger =
|
|
1614
|
+
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = H.create(`languageUtils`), this.resolveHierarchyCache = {};
|
|
1615
1615
|
}
|
|
1616
1616
|
clearCache() {
|
|
1617
1617
|
this.resolveHierarchyCache = {};
|
|
1618
1618
|
}
|
|
1619
1619
|
getScriptPartFromCode(e6) {
|
|
1620
|
-
if (e6 =
|
|
1620
|
+
if (e6 = V(e6), !e6 || !e6.includes(`-`)) return null;
|
|
1621
1621
|
let t2 = e6.split(`-`);
|
|
1622
1622
|
return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
|
|
1623
1623
|
}
|
|
1624
1624
|
getLanguagePartFromCode(e6) {
|
|
1625
|
-
if (e6 =
|
|
1625
|
+
if (e6 = V(e6), !e6 || !e6.includes(`-`)) return e6;
|
|
1626
1626
|
let t2 = e6.split(`-`);
|
|
1627
1627
|
return this.formatLanguageCode(t2[0]);
|
|
1628
1628
|
}
|
|
1629
1629
|
formatLanguageCode(e6) {
|
|
1630
|
-
if (
|
|
1630
|
+
if (L(e6) && e6.includes(`-`)) {
|
|
1631
1631
|
let t2;
|
|
1632
1632
|
try {
|
|
1633
1633
|
t2 = Intl.getCanonicalLocales(e6)[0];
|
|
@@ -1658,7 +1658,7 @@ var Kr = class {
|
|
|
1658
1658
|
}
|
|
1659
1659
|
getFallbackCodes(e6, t2) {
|
|
1660
1660
|
if (!e6) return [];
|
|
1661
|
-
if (typeof e6 == `function` && (e6 = e6(t2)),
|
|
1661
|
+
if (typeof e6 == `function` && (e6 = e6(t2)), L(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
|
|
1662
1662
|
if (!t2) return e6.default || [];
|
|
1663
1663
|
let n2 = e6[t2];
|
|
1664
1664
|
return n2 ||= e6[this.getScriptPartFromCode(t2)], n2 ||= e6[this.formatLanguageCode(t2)], n2 ||= e6[this.getLanguagePartFromCode(t2)], n2 ||= e6.default, n2 || [];
|
|
@@ -1666,7 +1666,7 @@ var Kr = class {
|
|
|
1666
1666
|
toResolveHierarchy(e6, t2) {
|
|
1667
1667
|
let n2 = this.options.fallbackLng, r2 = Array.isArray(n2) ? n2.join(`|`) : n2;
|
|
1668
1668
|
r2 !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r2);
|
|
1669
|
-
let i2 = t2 === void 0 || t2 === false ||
|
|
1669
|
+
let i2 = t2 === void 0 || t2 === false || L(t2), a2 = t2 === void 0 && typeof this.options.fallbackLng == `function`, o2 = L(e6) && i2 && !a2, s2 = null;
|
|
1670
1670
|
if (o2) {
|
|
1671
1671
|
let n3;
|
|
1672
1672
|
n3 = t2 === void 0 ? `undefined` : t2 === false ? `boolean:false` : `string:${t2}`, s2 = `${e6.length}:${e6}|${n3}`;
|
|
@@ -1678,29 +1678,30 @@ var Kr = class {
|
|
|
1678
1678
|
let c2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e6), l2 = [], u2 = (e7) => {
|
|
1679
1679
|
e7 && (this.isSupportedCode(e7) ? l2.push(e7) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e7}`));
|
|
1680
1680
|
};
|
|
1681
|
-
return
|
|
1682
|
-
|
|
1681
|
+
return L(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))) : L(e6) && u2(this.formatLanguageCode(e6)), c2.forEach((e7) => {
|
|
1682
|
+
let t3 = this.formatLanguageCode(e7);
|
|
1683
|
+
l2.includes(t3) || u2(t3);
|
|
1683
1684
|
}), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
|
|
1684
1685
|
}
|
|
1685
1686
|
};
|
|
1686
|
-
var
|
|
1687
|
-
var
|
|
1688
|
-
var
|
|
1687
|
+
var Kr = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
1688
|
+
var qr = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
1689
|
+
var Jr = class {
|
|
1689
1690
|
constructor(e6, t2 = {}) {
|
|
1690
|
-
this.languageUtils = e6, this.options = t2, this.logger =
|
|
1691
|
+
this.languageUtils = e6, this.options = t2, this.logger = H.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
1691
1692
|
}
|
|
1692
1693
|
clearCache() {
|
|
1693
1694
|
this.pluralRulesCache = {};
|
|
1694
1695
|
}
|
|
1695
1696
|
getRule(e6, t2 = {}) {
|
|
1696
|
-
let n2 =
|
|
1697
|
+
let n2 = V(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
|
|
1697
1698
|
if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
|
|
1698
1699
|
let a2;
|
|
1699
1700
|
try {
|
|
1700
1701
|
a2 = new Intl.PluralRules(n2, { type: r2 });
|
|
1701
1702
|
} catch {
|
|
1702
|
-
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`),
|
|
1703
|
-
if (!e6.match(/-|_/)) return
|
|
1703
|
+
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), qr;
|
|
1704
|
+
if (!e6.match(/-|_/)) return qr;
|
|
1704
1705
|
let n3 = this.languageUtils.getLanguagePartFromCode(e6);
|
|
1705
1706
|
a2 = this.getRule(n3, t2);
|
|
1706
1707
|
}
|
|
@@ -1715,26 +1716,26 @@ var Yr = class {
|
|
|
1715
1716
|
}
|
|
1716
1717
|
getSuffixes(e6, t2 = {}) {
|
|
1717
1718
|
let n2 = this.getRule(e6, t2);
|
|
1718
|
-
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) =>
|
|
1719
|
+
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) => Kr[e7] - Kr[t3]).map((e7) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e7}`) : [];
|
|
1719
1720
|
}
|
|
1720
1721
|
getSuffix(e6, t2, n2 = {}) {
|
|
1721
1722
|
let r2 = this.getRule(e6, n2);
|
|
1722
1723
|
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));
|
|
1723
1724
|
}
|
|
1724
1725
|
};
|
|
1725
|
-
var
|
|
1726
|
-
let a2 =
|
|
1727
|
-
return !a2 && i2 &&
|
|
1726
|
+
var Yr = (e6, t2, n2, r2 = `.`, i2 = true) => {
|
|
1727
|
+
let a2 = Dr(e6, t2, n2);
|
|
1728
|
+
return !a2 && i2 && L(n2) && (a2 = Fr(e6, n2, r2), a2 === void 0 && (a2 = Fr(t2, n2, r2))), a2;
|
|
1728
1729
|
};
|
|
1729
|
-
var
|
|
1730
|
-
var
|
|
1730
|
+
var Xr = (e6) => e6.replace(/\$/g, `$$$$`);
|
|
1731
|
+
var Zr = class {
|
|
1731
1732
|
constructor(e6 = {}) {
|
|
1732
|
-
this.logger =
|
|
1733
|
+
this.logger = H.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
|
|
1733
1734
|
}
|
|
1734
1735
|
init(e6 = {}) {
|
|
1735
1736
|
e6.interpolation ||= { escapeValue: true };
|
|
1736
1737
|
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;
|
|
1737
|
-
this.escape = t2 === void 0 ?
|
|
1738
|
+
this.escape = t2 === void 0 ? Ar : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? B(i2) : a2 || `{{`, this.suffix = o2 ? B(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 ? B(u2) : `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 ? B(l2) : ``, this.nestingPrefix = d2 ? B(d2) : f2 || B(`$t(`), this.nestingSuffix = p2 ? B(p2) : m2 || B(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
|
|
1738
1739
|
}
|
|
1739
1740
|
reset() {
|
|
1740
1741
|
this.options && this.init(this.options);
|
|
@@ -1746,11 +1747,11 @@ var Qr = class {
|
|
|
1746
1747
|
interpolate(e6, t2, n2, r2) {
|
|
1747
1748
|
let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
|
|
1748
1749
|
if (!e7.includes(this.formatSeparator)) {
|
|
1749
|
-
let i4 =
|
|
1750
|
+
let i4 = Yr(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1750
1751
|
return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
|
|
1751
1752
|
}
|
|
1752
1753
|
let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
|
|
1753
|
-
return this.format(
|
|
1754
|
+
return this.format(Yr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
|
|
1754
1755
|
};
|
|
1755
1756
|
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.`);
|
|
1756
1757
|
let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
|
|
@@ -1760,15 +1761,15 @@ var Qr = class {
|
|
|
1760
1761
|
if (a2 = c2(n3), a2 === void 0) {
|
|
1761
1762
|
if (typeof l2 == `function`) {
|
|
1762
1763
|
let t4 = l2(e6, i2, r2);
|
|
1763
|
-
a2 =
|
|
1764
|
+
a2 = L(t4) ? t4 : ``;
|
|
1764
1765
|
} else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
|
|
1765
1766
|
else if (u2) {
|
|
1766
1767
|
a2 = i2[0];
|
|
1767
1768
|
continue;
|
|
1768
1769
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
|
|
1769
|
-
} else !
|
|
1770
|
+
} else !L(a2) && !this.useRawValueToEscape && (a2 = yr(a2));
|
|
1770
1771
|
let s3 = t3.safeValue(a2);
|
|
1771
|
-
if (e6 = e6.replace(i2[0],
|
|
1772
|
+
if (e6 = e6.replace(i2[0], Xr(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
|
|
1772
1773
|
}
|
|
1773
1774
|
}), e6;
|
|
1774
1775
|
}
|
|
@@ -1776,7 +1777,7 @@ var Qr = class {
|
|
|
1776
1777
|
let r2, i2, a2, o2 = (e7, t3) => {
|
|
1777
1778
|
let n3 = this.nestingOptionsSeparator;
|
|
1778
1779
|
if (!e7.includes(n3)) return e7;
|
|
1779
|
-
let r3 = e7.split(RegExp(`${
|
|
1780
|
+
let r3 = e7.split(RegExp(`${B(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
|
|
1780
1781
|
e7 = r3[0], i3 = this.interpolate(i3, a2);
|
|
1781
1782
|
let o3 = i3.match(/'/g), s3 = i3.match(/"/g);
|
|
1782
1783
|
((o3?.length ?? 0) % 2 == 0 && !s3 || (s3?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
|
|
@@ -1789,15 +1790,15 @@ var Qr = class {
|
|
|
1789
1790
|
}, s2 = new RegExp(this.nestingRegexp), c2 = ``, l2 = 0;
|
|
1790
1791
|
for (; r2 = s2.exec(e6); ) {
|
|
1791
1792
|
let u2 = [];
|
|
1792
|
-
a2 = { ...n2 }, a2 = a2.replace && !
|
|
1793
|
+
a2 = { ...n2 }, a2 = a2.replace && !L(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
|
|
1793
1794
|
let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
|
|
1794
|
-
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 && !
|
|
1795
|
-
|
|
1795
|
+
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 && !L(i2)) return i2;
|
|
1796
|
+
L(i2) || (i2 = yr(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) + yr(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
|
|
1796
1797
|
}
|
|
1797
1798
|
return l2 ? c2 + e6.slice(l2) : e6;
|
|
1798
1799
|
}
|
|
1799
1800
|
};
|
|
1800
|
-
var
|
|
1801
|
+
var Qr = (e6) => {
|
|
1801
1802
|
let t2 = e6.toLowerCase().trim(), n2 = {};
|
|
1802
1803
|
if (e6.includes(`(`)) {
|
|
1803
1804
|
let r2 = e6.split(`(`);
|
|
@@ -1812,23 +1813,23 @@ var $r = (e6) => {
|
|
|
1812
1813
|
}
|
|
1813
1814
|
return { formatName: t2, formatOptions: n2 };
|
|
1814
1815
|
};
|
|
1815
|
-
var
|
|
1816
|
+
var $r = (e6) => {
|
|
1816
1817
|
let t2 = {};
|
|
1817
1818
|
return (n2, r2, i2) => {
|
|
1818
1819
|
let a2 = i2;
|
|
1819
1820
|
i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
|
|
1820
1821
|
let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
|
|
1821
|
-
return s2 || (s2 = e6(
|
|
1822
|
+
return s2 || (s2 = e6(V(r2), i2), t2[o2] = s2), s2(n2);
|
|
1822
1823
|
};
|
|
1823
1824
|
};
|
|
1824
|
-
var
|
|
1825
|
-
var
|
|
1825
|
+
var ei = (e6) => (t2, n2, r2) => e6(V(n2), r2)(t2);
|
|
1826
|
+
var ti = class {
|
|
1826
1827
|
constructor(e6 = {}) {
|
|
1827
|
-
this.logger =
|
|
1828
|
+
this.logger = H.create(`formatter`), this.options = e6, this.init(e6);
|
|
1828
1829
|
}
|
|
1829
1830
|
init(e6, t2 = { interpolation: {} }) {
|
|
1830
1831
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
1831
|
-
let n2 = t2.cacheInBuiltFormats ?
|
|
1832
|
+
let n2 = t2.cacheInBuiltFormats ? $r : ei;
|
|
1832
1833
|
this.formats = { number: n2((e7, t3) => {
|
|
1833
1834
|
let n3 = new Intl.NumberFormat(e7, { ...t3 });
|
|
1834
1835
|
return (e8) => n3.format(e8);
|
|
@@ -1850,7 +1851,7 @@ var ni = class {
|
|
|
1850
1851
|
this.formats[e6.toLowerCase().trim()] = t2;
|
|
1851
1852
|
}
|
|
1852
1853
|
addCached(e6, t2) {
|
|
1853
|
-
this.formats[e6.toLowerCase().trim()] =
|
|
1854
|
+
this.formats[e6.toLowerCase().trim()] = $r(t2);
|
|
1854
1855
|
}
|
|
1855
1856
|
format(e6, t2, n2, r2 = {}) {
|
|
1856
1857
|
if (!t2 || e6 == null) return e6;
|
|
@@ -1861,7 +1862,7 @@ var ni = class {
|
|
|
1861
1862
|
a2.push(t3);
|
|
1862
1863
|
}
|
|
1863
1864
|
return a2.reduce((e7, t3) => {
|
|
1864
|
-
let { formatName: i3, formatOptions: a3 } =
|
|
1865
|
+
let { formatName: i3, formatOptions: a3 } = Qr(t3);
|
|
1865
1866
|
if (this.formats[i3]) {
|
|
1866
1867
|
let t4 = e7;
|
|
1867
1868
|
try {
|
|
@@ -1876,12 +1877,12 @@ var ni = class {
|
|
|
1876
1877
|
}, e6);
|
|
1877
1878
|
}
|
|
1878
1879
|
};
|
|
1879
|
-
var
|
|
1880
|
+
var ni = (e6, t2) => {
|
|
1880
1881
|
e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
|
|
1881
1882
|
};
|
|
1882
|
-
var
|
|
1883
|
+
var ri = class extends Lr {
|
|
1883
1884
|
constructor(e6, t2, n2, r2 = {}) {
|
|
1884
|
-
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger =
|
|
1885
|
+
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = H.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
|
|
1885
1886
|
}
|
|
1886
1887
|
queueLoad(e6, t2, n2, r2) {
|
|
1887
1888
|
let i2 = {}, a2 = {}, o2 = {}, s2 = {};
|
|
@@ -1898,7 +1899,7 @@ var ii = class extends Rr {
|
|
|
1898
1899
|
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);
|
|
1899
1900
|
let o2 = {};
|
|
1900
1901
|
this.queue.forEach((n3) => {
|
|
1901
|
-
|
|
1902
|
+
Tr(n3.loaded, [i2], a2), ni(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
|
|
1902
1903
|
o2[e7] || (o2[e7] = {});
|
|
1903
1904
|
let t3 = n3.loaded[e7];
|
|
1904
1905
|
t3.length && t3.forEach((t4) => {
|
|
@@ -1933,7 +1934,7 @@ var ii = class extends Rr {
|
|
|
1933
1934
|
}
|
|
1934
1935
|
prepareLoading(e6, t2, n2 = {}, r2) {
|
|
1935
1936
|
if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
|
|
1936
|
-
|
|
1937
|
+
L(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), L(t2) && (t2 = [t2]);
|
|
1937
1938
|
let i2 = this.queueLoad(e6, t2, n2, r2);
|
|
1938
1939
|
if (!i2.toLoad.length) return i2.pending.length || r2(), null;
|
|
1939
1940
|
i2.toLoad.forEach((e7) => {
|
|
@@ -1970,9 +1971,9 @@ var ii = class extends Rr {
|
|
|
1970
1971
|
}
|
|
1971
1972
|
}
|
|
1972
1973
|
};
|
|
1973
|
-
var
|
|
1974
|
+
var ii = () => ({ 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) => {
|
|
1974
1975
|
let t2 = {};
|
|
1975
|
-
if (typeof e6[1] == `object` && (t2 = e6[1]),
|
|
1976
|
+
if (typeof e6[1] == `object` && (t2 = e6[1]), L(e6[1]) && (t2.defaultValue = e6[1]), L(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
|
|
1976
1977
|
let n2 = e6[3] || e6[2];
|
|
1977
1978
|
Object.keys(n2).forEach((e7) => {
|
|
1978
1979
|
t2[e7] = n2[e7];
|
|
@@ -1980,17 +1981,17 @@ var ai = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
1980
1981
|
}
|
|
1981
1982
|
return t2;
|
|
1982
1983
|
}, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
1983
|
-
var
|
|
1984
|
-
var
|
|
1984
|
+
var ai = (e6) => (L(e6.ns) && (e6.ns = [e6.ns]), L(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), L(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
|
|
1985
|
+
var oi = () => {
|
|
1985
1986
|
};
|
|
1986
|
-
var
|
|
1987
|
+
var si = (e6) => {
|
|
1987
1988
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
|
|
1988
1989
|
typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
|
|
1989
1990
|
});
|
|
1990
1991
|
};
|
|
1991
|
-
var
|
|
1992
|
+
var W = class e4 extends Lr {
|
|
1992
1993
|
constructor(e6 = {}, t2) {
|
|
1993
|
-
if (super(), this.options =
|
|
1994
|
+
if (super(), this.options = ai(e6), this.services = {}, this.logger = H, this.modules = { external: [] }, si(this), t2 && !this.isInitialized && !e6.isClone) {
|
|
1994
1995
|
if (!this.options.initAsync) return this.init(e6, t2), this;
|
|
1995
1996
|
setTimeout(() => {
|
|
1996
1997
|
this.init(e6, t2);
|
|
@@ -1998,26 +1999,26 @@ var U = class e4 extends Rr {
|
|
|
1998
1999
|
}
|
|
1999
2000
|
}
|
|
2000
2001
|
init(e6 = {}, t2) {
|
|
2001
|
-
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (
|
|
2002
|
-
let n2 =
|
|
2003
|
-
this.options = { ...n2, ...this.options, ...
|
|
2002
|
+
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (L(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
|
|
2003
|
+
let n2 = ii();
|
|
2004
|
+
this.options = { ...n2, ...this.options, ...ai(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);
|
|
2004
2005
|
let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
|
|
2005
2006
|
if (!this.options.isClone) {
|
|
2006
|
-
this.modules.logger ?
|
|
2007
|
+
this.modules.logger ? H.init(r2(this.modules.logger), this.options) : H.init(null, this.options);
|
|
2007
2008
|
let e7;
|
|
2008
|
-
e7 = this.modules.formatter ? this.modules.formatter :
|
|
2009
|
-
let t3 = new
|
|
2010
|
-
this.store = new
|
|
2009
|
+
e7 = this.modules.formatter ? this.modules.formatter : ti;
|
|
2010
|
+
let t3 = new Gr(this.options);
|
|
2011
|
+
this.store = new zr(this.options.resources, this.options);
|
|
2011
2012
|
let n3 = this.services;
|
|
2012
|
-
n3.logger =
|
|
2013
|
+
n3.logger = H, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new Jr(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 Zr(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new ri(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
|
|
2013
2014
|
this.emit(e8, ...t4);
|
|
2014
|
-
}), 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
|
|
2015
|
+
}), 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 Wr(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
|
|
2015
2016
|
this.emit(e8, ...t4);
|
|
2016
2017
|
}), this.modules.external.forEach((e8) => {
|
|
2017
2018
|
e8.init && e8.init(this);
|
|
2018
2019
|
});
|
|
2019
2020
|
}
|
|
2020
|
-
if (this.format = this.options.interpolation.format, t2 ||=
|
|
2021
|
+
if (this.format = this.options.interpolation.format, t2 ||= oi, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
2021
2022
|
let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
2022
2023
|
e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
|
|
2023
2024
|
}
|
|
@@ -2026,7 +2027,7 @@ var U = class e4 extends Rr {
|
|
|
2026
2027
|
}), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e7) => {
|
|
2027
2028
|
this[e7] = (...t3) => (this.store[e7](...t3), this);
|
|
2028
2029
|
});
|
|
2029
|
-
let i2 =
|
|
2030
|
+
let i2 = R(), a2 = () => {
|
|
2030
2031
|
let e7 = (e8, n3) => {
|
|
2031
2032
|
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);
|
|
2032
2033
|
};
|
|
@@ -2035,8 +2036,8 @@ var U = class e4 extends Rr {
|
|
|
2035
2036
|
};
|
|
2036
2037
|
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
2037
2038
|
}
|
|
2038
|
-
loadResources(e6, t2 =
|
|
2039
|
-
let n2 = t2, r2 =
|
|
2039
|
+
loadResources(e6, t2 = oi) {
|
|
2040
|
+
let n2 = t2, r2 = L(e6) ? e6 : this.language;
|
|
2040
2041
|
if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2041
2042
|
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
2042
2043
|
let e7 = [], t3 = (t4) => {
|
|
@@ -2050,15 +2051,15 @@ var U = class e4 extends Rr {
|
|
|
2050
2051
|
} else n2(null);
|
|
2051
2052
|
}
|
|
2052
2053
|
reloadResources(e6, t2, n2) {
|
|
2053
|
-
let r2 =
|
|
2054
|
-
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 ||=
|
|
2054
|
+
let r2 = R();
|
|
2055
|
+
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 ||= oi, this.services.backendConnector.reload(e6, t2, (e7) => {
|
|
2055
2056
|
r2.resolve(), n2(e7);
|
|
2056
2057
|
}), r2;
|
|
2057
2058
|
}
|
|
2058
2059
|
use(e6) {
|
|
2059
2060
|
if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
|
|
2060
2061
|
if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
|
|
2061
|
-
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` &&
|
|
2062
|
+
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` && Br.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
|
|
2062
2063
|
}
|
|
2063
2064
|
setResolvedLanguage(e6) {
|
|
2064
2065
|
if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
|
|
@@ -2074,7 +2075,7 @@ var U = class e4 extends Rr {
|
|
|
2074
2075
|
}
|
|
2075
2076
|
changeLanguage(e6, t2) {
|
|
2076
2077
|
this.isLanguageChangingTo = e6;
|
|
2077
|
-
let n2 =
|
|
2078
|
+
let n2 = R();
|
|
2078
2079
|
this.emit(`languageChanging`, e6);
|
|
2079
2080
|
let r2 = (e7) => {
|
|
2080
2081
|
this.language = e7, this.languages = this.services.languageUtils.toResolveHierarchy(e7), this.resolvedLanguage = void 0, this.setResolvedLanguage(e7);
|
|
@@ -2082,7 +2083,7 @@ var U = class e4 extends Rr {
|
|
|
2082
2083
|
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));
|
|
2083
2084
|
}, a2 = (t3) => {
|
|
2084
2085
|
!e6 && !t3 && this.services.languageDetector && (t3 = []);
|
|
2085
|
-
let n3 =
|
|
2086
|
+
let n3 = L(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(L(t3) ? [t3] : t3);
|
|
2086
2087
|
a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e7) => {
|
|
2087
2088
|
i2(e7, a3);
|
|
2088
2089
|
});
|
|
@@ -2096,11 +2097,11 @@ var U = class e4 extends Rr {
|
|
|
2096
2097
|
let s2 = o2.ns !== void 0 && o2.ns !== null;
|
|
2097
2098
|
o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
|
|
2098
2099
|
let c2 = { ...this.options, ...o2 };
|
|
2099
|
-
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix =
|
|
2100
|
+
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = U(o2.keyPrefix, c2));
|
|
2100
2101
|
let l2 = this.options.keySeparator || `.`, u2;
|
|
2101
|
-
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 =
|
|
2102
|
+
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = U(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = U(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
|
|
2102
2103
|
};
|
|
2103
|
-
return
|
|
2104
|
+
return L(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
|
|
2104
2105
|
}
|
|
2105
2106
|
t(...e6) {
|
|
2106
2107
|
return this.translator?.translate(...e6);
|
|
@@ -2124,19 +2125,21 @@ var U = class e4 extends Rr {
|
|
|
2124
2125
|
let e7 = t2.precheck(this, a2);
|
|
2125
2126
|
if (e7 !== void 0) return e7;
|
|
2126
2127
|
}
|
|
2127
|
-
|
|
2128
|
+
if (this.hasResourceBundle(n2, e6) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;
|
|
2129
|
+
let { languageUtils: o2 } = this.services, s2 = t2.lng ? o2.isSupportedCode(n2) && o2.toResolveHierarchy(n2, false)[0] : n2;
|
|
2130
|
+
return !(s2 && !a2(s2, e6) || r2 && !a2(i2, e6));
|
|
2128
2131
|
}
|
|
2129
2132
|
loadNamespaces(e6, t2) {
|
|
2130
|
-
let n2 =
|
|
2131
|
-
return this.options.ns ? (
|
|
2133
|
+
let n2 = R();
|
|
2134
|
+
return this.options.ns ? (L(e6) && (e6 = [e6]), e6.forEach((e7) => {
|
|
2132
2135
|
this.options.ns.includes(e7) || this.options.ns.push(e7);
|
|
2133
2136
|
}), this.loadResources((e7) => {
|
|
2134
2137
|
n2.resolve(), t2 && t2(e7);
|
|
2135
2138
|
}), n2) : (t2 && t2(), Promise.resolve());
|
|
2136
2139
|
}
|
|
2137
2140
|
loadLanguages(e6, t2) {
|
|
2138
|
-
let n2 =
|
|
2139
|
-
|
|
2141
|
+
let n2 = R();
|
|
2142
|
+
L(e6) && (e6 = [e6]);
|
|
2140
2143
|
let r2 = this.options.preload || [], i2 = e6.filter((e7) => !r2.includes(e7) && this.services.languageUtils.isSupportedCode(e7));
|
|
2141
2144
|
return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e7) => {
|
|
2142
2145
|
n2.resolve(), t2 && t2(e7);
|
|
@@ -2152,24 +2155,24 @@ var U = class e4 extends Rr {
|
|
|
2152
2155
|
}
|
|
2153
2156
|
} catch {
|
|
2154
2157
|
}
|
|
2155
|
-
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
|
|
2158
|
+
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 Gr(ii());
|
|
2156
2159
|
return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
|
|
2157
2160
|
}
|
|
2158
2161
|
static createInstance(t2 = {}, n2) {
|
|
2159
2162
|
let r2 = new e4(t2, n2);
|
|
2160
2163
|
return r2.createInstance = e4.createInstance, r2;
|
|
2161
2164
|
}
|
|
2162
|
-
cloneInstance(t2 = {}, n2 =
|
|
2165
|
+
cloneInstance(t2 = {}, n2 = oi) {
|
|
2163
2166
|
let r2 = t2.forkResourceStore;
|
|
2164
2167
|
r2 && delete t2.forkResourceStore;
|
|
2165
|
-
let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2168
|
+
let i2 = { ...this.options, preload: false, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2166
2169
|
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
|
|
2167
2170
|
a2[e6] = this[e6];
|
|
2168
|
-
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new
|
|
2169
|
-
let e6 = { ...
|
|
2170
|
-
a2.services.interpolator = new
|
|
2171
|
+
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new zr(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) {
|
|
2172
|
+
let e6 = { ...ii().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
|
|
2173
|
+
a2.services.interpolator = new Zr(n3);
|
|
2171
2174
|
}
|
|
2172
|
-
return a2.translator = new
|
|
2175
|
+
return a2.translator = new Wr(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
|
|
2173
2176
|
a2.emit(e6, ...t3);
|
|
2174
2177
|
}), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
|
|
2175
2178
|
}
|
|
@@ -2177,9 +2180,9 @@ var U = class e4 extends Rr {
|
|
|
2177
2180
|
return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
|
|
2178
2181
|
}
|
|
2179
2182
|
}.createInstance();
|
|
2180
|
-
|
|
2181
|
-
var
|
|
2182
|
-
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 =
|
|
2183
|
+
W.createInstance, W.dir, W.init, W.loadResources, W.reloadResources, W.use, W.changeLanguage, W.getFixedT, W.t, W.exists, W.setDefaultNamespace, W.hasLoadedNamespace, W.loadNamespaces, W.loadLanguages;
|
|
2184
|
+
var ci = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
|
|
2185
|
+
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = W.createInstance(i2 ? s2 : void 0);
|
|
2183
2186
|
return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
|
|
2184
2187
|
try {
|
|
2185
2188
|
return r3(null, await t2(e7));
|
|
@@ -2188,75 +2191,38 @@ var li = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
|
|
|
2188
2191
|
}
|
|
2189
2192
|
} }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
|
|
2190
2193
|
};
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
2195
|
-
}
|
|
2196
|
-
function i2() {
|
|
2197
|
-
return !e6 || typeof e6 == `string`;
|
|
2198
|
-
}
|
|
2199
|
-
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
2200
|
-
if (i2()) return {};
|
|
2201
|
-
var o2 = r2(a2.shift());
|
|
2202
|
-
if (ui.indexOf(o2) > -1) return {};
|
|
2203
|
-
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
2204
|
-
}
|
|
2205
|
-
if (i2()) return {};
|
|
2206
|
-
var s2 = r2(a2.shift());
|
|
2207
|
-
return ui.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
2208
|
-
}
|
|
2209
|
-
function fi(e6, t2, n2) {
|
|
2210
|
-
var r2 = di(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
2211
|
-
i2 !== void 0 && (i2[a2] = n2);
|
|
2212
|
-
}
|
|
2213
|
-
function pi(e6, t2) {
|
|
2214
|
-
var n2 = di(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
2215
|
-
if (r2) return r2[i2];
|
|
2216
|
-
}
|
|
2217
|
-
var mi = [];
|
|
2218
|
-
var hi = mi.forEach;
|
|
2219
|
-
var gi = mi.slice;
|
|
2220
|
-
function _i(e6) {
|
|
2221
|
-
return hi.call(gi.call(arguments, 1), function(t2) {
|
|
2222
|
-
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
2223
|
-
var i2 = r2[n2];
|
|
2224
|
-
ui.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
2225
|
-
}
|
|
2226
|
-
}), e6;
|
|
2227
|
-
}
|
|
2228
|
-
function vi(e6, t2) {
|
|
2229
|
-
let n2 = t2 && t2.cache ? t2.cache : Oi, r2 = t2 && t2.serializer ? t2.serializer : Ei;
|
|
2230
|
-
return (t2 && t2.strategy ? t2.strategy : Ci)(e6, { cache: n2, serializer: r2 });
|
|
2194
|
+
function li(e6, t2) {
|
|
2195
|
+
let n2 = t2 && t2.cache ? t2.cache : yi, r2 = t2 && t2.serializer ? t2.serializer : _i;
|
|
2196
|
+
return (t2 && t2.strategy ? t2.strategy : mi)(e6, { cache: n2, serializer: r2 });
|
|
2231
2197
|
}
|
|
2232
|
-
function
|
|
2198
|
+
function ui(e6) {
|
|
2233
2199
|
return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
|
|
2234
2200
|
}
|
|
2235
|
-
function
|
|
2236
|
-
let i2 =
|
|
2201
|
+
function di(e6, t2, n2, r2) {
|
|
2202
|
+
let i2 = ui(r2) ? r2 : n2(r2), a2 = t2.get(i2);
|
|
2237
2203
|
return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
|
|
2238
2204
|
}
|
|
2239
|
-
function
|
|
2205
|
+
function fi(e6, t2, n2) {
|
|
2240
2206
|
let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
|
|
2241
2207
|
return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
|
|
2242
2208
|
}
|
|
2243
|
-
function
|
|
2209
|
+
function pi(e6, t2, n2, r2, i2) {
|
|
2244
2210
|
return n2.bind(t2, e6, r2, i2);
|
|
2245
2211
|
}
|
|
2246
|
-
function
|
|
2247
|
-
let n2 = e6.length === 1 ?
|
|
2248
|
-
return
|
|
2212
|
+
function mi(e6, t2) {
|
|
2213
|
+
let n2 = e6.length === 1 ? di : fi;
|
|
2214
|
+
return pi(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2249
2215
|
}
|
|
2250
|
-
function
|
|
2251
|
-
return
|
|
2216
|
+
function hi(e6, t2) {
|
|
2217
|
+
return pi(e6, this, fi, t2.cache.create(), t2.serializer);
|
|
2252
2218
|
}
|
|
2253
|
-
function
|
|
2254
|
-
return
|
|
2219
|
+
function gi(e6, t2) {
|
|
2220
|
+
return pi(e6, this, di, t2.cache.create(), t2.serializer);
|
|
2255
2221
|
}
|
|
2256
|
-
var
|
|
2222
|
+
var _i = function() {
|
|
2257
2223
|
return JSON.stringify(arguments);
|
|
2258
2224
|
};
|
|
2259
|
-
var
|
|
2225
|
+
var vi = class {
|
|
2260
2226
|
constructor() {
|
|
2261
2227
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2262
2228
|
}
|
|
@@ -2267,14 +2233,14 @@ var Di = class {
|
|
|
2267
2233
|
this.cache[e6] = t2;
|
|
2268
2234
|
}
|
|
2269
2235
|
};
|
|
2270
|
-
var
|
|
2271
|
-
return new
|
|
2236
|
+
var yi = { create: function() {
|
|
2237
|
+
return new vi();
|
|
2272
2238
|
} };
|
|
2273
|
-
var
|
|
2274
|
-
var
|
|
2275
|
-
function
|
|
2239
|
+
var bi = { variadic: hi, monadic: gi };
|
|
2240
|
+
var xi = /(?:[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;
|
|
2241
|
+
function Si(e6) {
|
|
2276
2242
|
let t2 = {};
|
|
2277
|
-
return e6.replace(
|
|
2243
|
+
return e6.replace(xi, (e7) => {
|
|
2278
2244
|
let n2 = e7.length;
|
|
2279
2245
|
switch (e7[0]) {
|
|
2280
2246
|
case `G`:
|
|
@@ -2361,10 +2327,10 @@ function ji(e6) {
|
|
|
2361
2327
|
return ``;
|
|
2362
2328
|
}), t2;
|
|
2363
2329
|
}
|
|
2364
|
-
var
|
|
2365
|
-
function
|
|
2330
|
+
var Ci = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
2331
|
+
function wi(e6) {
|
|
2366
2332
|
if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
|
|
2367
|
-
let t2 = e6.split(
|
|
2333
|
+
let t2 = e6.split(Ci).filter((e7) => e7.length > 0), n2 = [];
|
|
2368
2334
|
for (let e7 of t2) {
|
|
2369
2335
|
let t3 = e7.split(`/`);
|
|
2370
2336
|
if (t3.length === 0) throw Error(`Invalid number skeleton`);
|
|
@@ -2374,20 +2340,20 @@ function Ni(e6) {
|
|
|
2374
2340
|
}
|
|
2375
2341
|
return n2;
|
|
2376
2342
|
}
|
|
2377
|
-
function
|
|
2343
|
+
function Ti(e6) {
|
|
2378
2344
|
return e6.replace(/^(.*?)-/, ``);
|
|
2379
2345
|
}
|
|
2380
|
-
var
|
|
2381
|
-
var
|
|
2382
|
-
var
|
|
2383
|
-
var
|
|
2384
|
-
function
|
|
2346
|
+
var Ei = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
2347
|
+
var Di = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
2348
|
+
var Oi = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
2349
|
+
var ki = /^(0+)$/;
|
|
2350
|
+
function Ai(e6) {
|
|
2385
2351
|
let t2 = {};
|
|
2386
|
-
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(
|
|
2352
|
+
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Di, function(e7, n2, r2) {
|
|
2387
2353
|
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), ``;
|
|
2388
2354
|
}), t2;
|
|
2389
2355
|
}
|
|
2390
|
-
function
|
|
2356
|
+
function ji(e6) {
|
|
2391
2357
|
switch (e6) {
|
|
2392
2358
|
case `sign-auto`:
|
|
2393
2359
|
return { signDisplay: `auto` };
|
|
@@ -2411,19 +2377,19 @@ function Bi(e6) {
|
|
|
2411
2377
|
return { signDisplay: `never` };
|
|
2412
2378
|
}
|
|
2413
2379
|
}
|
|
2414
|
-
function
|
|
2380
|
+
function Mi(e6) {
|
|
2415
2381
|
let t2;
|
|
2416
2382
|
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) {
|
|
2417
2383
|
let n2 = e6.slice(0, 2);
|
|
2418
|
-
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !
|
|
2384
|
+
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !ki.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
|
|
2419
2385
|
t2.minimumIntegerDigits = e6.length;
|
|
2420
2386
|
}
|
|
2421
2387
|
return t2;
|
|
2422
2388
|
}
|
|
2423
|
-
function
|
|
2424
|
-
return
|
|
2389
|
+
function Ni(e6) {
|
|
2390
|
+
return ji(e6) || {};
|
|
2425
2391
|
}
|
|
2426
|
-
function
|
|
2392
|
+
function Pi(e6) {
|
|
2427
2393
|
let t2 = {};
|
|
2428
2394
|
for (let n2 of e6) {
|
|
2429
2395
|
switch (n2.stem) {
|
|
@@ -2447,7 +2413,7 @@ function Ui(e6) {
|
|
|
2447
2413
|
continue;
|
|
2448
2414
|
case `measure-unit`:
|
|
2449
2415
|
case `unit`:
|
|
2450
|
-
t2.style = `unit`, t2.unit =
|
|
2416
|
+
t2.style = `unit`, t2.unit = Ti(n2.options[0]);
|
|
2451
2417
|
continue;
|
|
2452
2418
|
case `compact-short`:
|
|
2453
2419
|
case `K`:
|
|
@@ -2458,10 +2424,10 @@ function Ui(e6) {
|
|
|
2458
2424
|
t2.notation = `compact`, t2.compactDisplay = `long`;
|
|
2459
2425
|
continue;
|
|
2460
2426
|
case `scientific`:
|
|
2461
|
-
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2427
|
+
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Ni(t3) }), {}) };
|
|
2462
2428
|
continue;
|
|
2463
2429
|
case `engineering`:
|
|
2464
|
-
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2430
|
+
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Ni(t3) }), {}) };
|
|
2465
2431
|
continue;
|
|
2466
2432
|
case `notation-simple`:
|
|
2467
2433
|
t2.notation = `standard`;
|
|
@@ -2504,7 +2470,7 @@ function Ui(e6) {
|
|
|
2504
2470
|
continue;
|
|
2505
2471
|
case `integer-width`:
|
|
2506
2472
|
if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
|
|
2507
|
-
n2.options[0].replace(
|
|
2473
|
+
n2.options[0].replace(Oi, function(e8, n3, r3, i2, a2, o2) {
|
|
2508
2474
|
if (n3) t2.minimumIntegerDigits = r3.length;
|
|
2509
2475
|
else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
|
|
2510
2476
|
else if (o2) throw Error(`We currently do not support exact integer digits`);
|
|
@@ -2512,83 +2478,83 @@ function Ui(e6) {
|
|
|
2512
2478
|
});
|
|
2513
2479
|
continue;
|
|
2514
2480
|
}
|
|
2515
|
-
if (
|
|
2481
|
+
if (ki.test(n2.stem)) {
|
|
2516
2482
|
t2.minimumIntegerDigits = n2.stem.length;
|
|
2517
2483
|
continue;
|
|
2518
2484
|
}
|
|
2519
|
-
if (
|
|
2485
|
+
if (Ei.test(n2.stem)) {
|
|
2520
2486
|
if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
|
|
2521
|
-
n2.stem.replace(
|
|
2487
|
+
n2.stem.replace(Ei, function(e9, n3, r3, i2, a2, o2) {
|
|
2522
2488
|
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), ``;
|
|
2523
2489
|
});
|
|
2524
2490
|
let e8 = n2.options[0];
|
|
2525
|
-
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...
|
|
2491
|
+
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...Ai(e8) });
|
|
2526
2492
|
continue;
|
|
2527
2493
|
}
|
|
2528
|
-
if (
|
|
2529
|
-
t2 = { ...t2, ...
|
|
2494
|
+
if (Di.test(n2.stem)) {
|
|
2495
|
+
t2 = { ...t2, ...Ai(n2.stem) };
|
|
2530
2496
|
continue;
|
|
2531
2497
|
}
|
|
2532
|
-
let e7 =
|
|
2498
|
+
let e7 = ji(n2.stem);
|
|
2533
2499
|
e7 && (t2 = { ...t2, ...e7 });
|
|
2534
|
-
let r2 =
|
|
2500
|
+
let r2 = Mi(n2.stem);
|
|
2535
2501
|
r2 && (t2 = { ...t2, ...r2 });
|
|
2536
2502
|
}
|
|
2537
2503
|
return t2;
|
|
2538
2504
|
}
|
|
2539
|
-
var
|
|
2505
|
+
var Fi = function(e6) {
|
|
2540
2506
|
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;
|
|
2541
2507
|
}({});
|
|
2542
|
-
function
|
|
2508
|
+
function Ii(e6) {
|
|
2543
2509
|
return e6.type === 0;
|
|
2544
2510
|
}
|
|
2545
|
-
function
|
|
2511
|
+
function Li(e6) {
|
|
2546
2512
|
return e6.type === 1;
|
|
2547
2513
|
}
|
|
2548
|
-
function
|
|
2514
|
+
function Ri(e6) {
|
|
2549
2515
|
return e6.type === 2;
|
|
2550
2516
|
}
|
|
2551
|
-
function
|
|
2517
|
+
function zi(e6) {
|
|
2552
2518
|
return e6.type === 3;
|
|
2553
2519
|
}
|
|
2554
|
-
function
|
|
2520
|
+
function Bi(e6) {
|
|
2555
2521
|
return e6.type === 4;
|
|
2556
2522
|
}
|
|
2557
|
-
function
|
|
2523
|
+
function Vi(e6) {
|
|
2558
2524
|
return e6.type === 5;
|
|
2559
2525
|
}
|
|
2560
|
-
function
|
|
2526
|
+
function Hi(e6) {
|
|
2561
2527
|
return e6.type === 6;
|
|
2562
2528
|
}
|
|
2563
|
-
function
|
|
2529
|
+
function Ui(e6) {
|
|
2564
2530
|
return e6.type === 7;
|
|
2565
2531
|
}
|
|
2566
|
-
function
|
|
2532
|
+
function Wi(e6) {
|
|
2567
2533
|
return e6.type === 8;
|
|
2568
2534
|
}
|
|
2569
|
-
function
|
|
2535
|
+
function Gi(e6) {
|
|
2570
2536
|
return !!(e6 && typeof e6 == `object` && e6.type === 0);
|
|
2571
2537
|
}
|
|
2572
|
-
function
|
|
2538
|
+
function Ki(e6) {
|
|
2573
2539
|
return !!(e6 && typeof e6 == `object` && e6.type === 1);
|
|
2574
2540
|
}
|
|
2575
|
-
var
|
|
2576
|
-
var
|
|
2577
|
-
function
|
|
2541
|
+
var qi = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
2542
|
+
var G = { "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`] };
|
|
2543
|
+
function Ji(e6, t2) {
|
|
2578
2544
|
let n2 = ``;
|
|
2579
2545
|
for (let r2 = 0; r2 < e6.length; r2++) {
|
|
2580
2546
|
let i2 = e6.charAt(r2);
|
|
2581
2547
|
if (i2 === `j`) {
|
|
2582
2548
|
let a2 = 0;
|
|
2583
2549
|
for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
|
|
2584
|
-
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 =
|
|
2550
|
+
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = Yi(t2);
|
|
2585
2551
|
for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
|
|
2586
2552
|
for (; o2-- > 0; ) n2 = c2 + n2;
|
|
2587
2553
|
} else n2 += i2 === `J` ? `H` : i2;
|
|
2588
2554
|
}
|
|
2589
2555
|
return n2;
|
|
2590
2556
|
}
|
|
2591
|
-
function
|
|
2557
|
+
function Yi(e6) {
|
|
2592
2558
|
let t2 = e6.hourCycle;
|
|
2593
2559
|
if (t2 === void 0) {
|
|
2594
2560
|
let n3 = e6;
|
|
@@ -2607,36 +2573,36 @@ function ia(e6) {
|
|
|
2607
2573
|
throw Error(`Invalid hourCycle`);
|
|
2608
2574
|
}
|
|
2609
2575
|
let n2 = e6.language, r2;
|
|
2610
|
-
return n2 !== `root` && (r2 = e6.maximize().region), (
|
|
2576
|
+
return n2 !== `root` && (r2 = e6.maximize().region), (G[`${n2}-${r2}`] || G[r2 || ``] || G[n2 || ``] || G[`${n2}-001`] || G[`001`])[0].charAt(0);
|
|
2611
2577
|
}
|
|
2612
|
-
var
|
|
2613
|
-
var
|
|
2614
|
-
function
|
|
2578
|
+
var Xi = RegExp(`^${qi.source}*`);
|
|
2579
|
+
var Zi = RegExp(`${qi.source}*$`);
|
|
2580
|
+
function K(e6, t2) {
|
|
2615
2581
|
return { start: e6, end: t2 };
|
|
2616
2582
|
}
|
|
2617
|
-
var
|
|
2618
|
-
var
|
|
2619
|
-
var
|
|
2620
|
-
var
|
|
2583
|
+
var Qi = !!Object.fromEntries;
|
|
2584
|
+
var $i = !!String.prototype.trimStart;
|
|
2585
|
+
var ea = !!String.prototype.trimEnd;
|
|
2586
|
+
var ta = Qi ? Object.fromEntries : function(e6) {
|
|
2621
2587
|
let t2 = {};
|
|
2622
2588
|
for (let [n2, r2] of e6) t2[n2] = r2;
|
|
2623
2589
|
return t2;
|
|
2624
2590
|
};
|
|
2625
|
-
var
|
|
2591
|
+
var na = $i ? function(e6) {
|
|
2626
2592
|
return e6.trimStart();
|
|
2627
2593
|
} : function(e6) {
|
|
2628
|
-
return e6.replace(
|
|
2594
|
+
return e6.replace(Xi, ``);
|
|
2629
2595
|
};
|
|
2630
|
-
var
|
|
2596
|
+
var ra = ea ? function(e6) {
|
|
2631
2597
|
return e6.trimEnd();
|
|
2632
2598
|
} : function(e6) {
|
|
2633
|
-
return e6.replace(
|
|
2599
|
+
return e6.replace(Zi, ``);
|
|
2634
2600
|
};
|
|
2635
|
-
var
|
|
2636
|
-
function
|
|
2637
|
-
return
|
|
2601
|
+
var ia = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
|
|
2602
|
+
function aa(e6, t2) {
|
|
2603
|
+
return ia.lastIndex = t2, ia.exec(e6)[1] ?? ``;
|
|
2638
2604
|
}
|
|
2639
|
-
function
|
|
2605
|
+
function oa(e6) {
|
|
2640
2606
|
if (e6.length === 0) return null;
|
|
2641
2607
|
let t2 = 1, n2 = 1;
|
|
2642
2608
|
for (let r2 = 0; r2 < e6.length; ) {
|
|
@@ -2657,7 +2623,7 @@ function ha(e6) {
|
|
|
2657
2623
|
}
|
|
2658
2624
|
return { offset: e6.length, line: t2, column: n2 };
|
|
2659
2625
|
}
|
|
2660
|
-
var
|
|
2626
|
+
var sa = class {
|
|
2661
2627
|
constructor(e6, t2 = {}) {
|
|
2662
2628
|
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;
|
|
2663
2629
|
}
|
|
@@ -2666,10 +2632,10 @@ var ga = class {
|
|
|
2666
2632
|
if (this.message.length > 0) {
|
|
2667
2633
|
let e6 = this.message.charCodeAt(0);
|
|
2668
2634
|
if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
|
|
2669
|
-
let e7 =
|
|
2635
|
+
let e7 = oa(this.message);
|
|
2670
2636
|
if (e7) {
|
|
2671
2637
|
let t2 = this.clonePosition();
|
|
2672
|
-
return this.position = e7, { val: [{ type: 0, value: this.message, location:
|
|
2638
|
+
return this.position = e7, { val: [{ type: 0, value: this.message, location: K(t2, this.clonePosition()) }], err: null };
|
|
2673
2639
|
}
|
|
2674
2640
|
}
|
|
2675
2641
|
}
|
|
@@ -2686,11 +2652,11 @@ var ga = class {
|
|
|
2686
2652
|
} else if (i2 === 125 && e6 > 0) break;
|
|
2687
2653
|
else if (i2 === 35 && (t2 === `plural` || t2 === `selectordinal`)) {
|
|
2688
2654
|
let e7 = this.clonePosition();
|
|
2689
|
-
this.bump(), r2.push({ type: 7, location:
|
|
2655
|
+
this.bump(), r2.push({ type: 7, location: K(e7, this.clonePosition()) });
|
|
2690
2656
|
} else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
2691
2657
|
if (n2) break;
|
|
2692
|
-
return this.error(26,
|
|
2693
|
-
} else if (i2 === 60 && !this.ignoreTag &&
|
|
2658
|
+
return this.error(26, K(this.clonePosition(), this.clonePosition()));
|
|
2659
|
+
} else if (i2 === 60 && !this.ignoreTag && ca(this.peek() || 0)) {
|
|
2694
2660
|
let n3 = this.parseTag(e6, t2);
|
|
2695
2661
|
if (n3.err) return n3;
|
|
2696
2662
|
r2.push(n3.val);
|
|
@@ -2706,23 +2672,23 @@ var ga = class {
|
|
|
2706
2672
|
let n2 = this.clonePosition();
|
|
2707
2673
|
this.bump();
|
|
2708
2674
|
let r2 = this.parseTagName();
|
|
2709
|
-
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location:
|
|
2675
|
+
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: K(n2, this.clonePosition()) }, err: null };
|
|
2710
2676
|
if (this.bumpIf(`>`)) {
|
|
2711
2677
|
let i2 = this.parseMessage(e6 + 1, t2, true);
|
|
2712
2678
|
if (i2.err) return i2;
|
|
2713
2679
|
let a2 = i2.val, o2 = this.clonePosition();
|
|
2714
2680
|
if (this.bumpIf(`</`)) {
|
|
2715
|
-
if (this.isEOF() || !
|
|
2681
|
+
if (this.isEOF() || !ca(this.char())) return this.error(23, K(o2, this.clonePosition()));
|
|
2716
2682
|
let e7 = this.clonePosition();
|
|
2717
|
-
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location:
|
|
2683
|
+
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location: K(n2, this.clonePosition()) }, err: null } : this.error(23, K(o2, this.clonePosition()))) : this.error(26, K(e7, this.clonePosition()));
|
|
2718
2684
|
}
|
|
2719
|
-
return this.error(27,
|
|
2685
|
+
return this.error(27, K(n2, this.clonePosition()));
|
|
2720
2686
|
}
|
|
2721
|
-
return this.error(23,
|
|
2687
|
+
return this.error(23, K(n2, this.clonePosition()));
|
|
2722
2688
|
}
|
|
2723
2689
|
parseTagName() {
|
|
2724
2690
|
let e6 = this.offset();
|
|
2725
|
-
for (this.bump(); !this.isEOF() &&
|
|
2691
|
+
for (this.bump(); !this.isEOF() && ua(this.char()); ) this.bump();
|
|
2726
2692
|
return this.message.slice(e6, this.offset());
|
|
2727
2693
|
}
|
|
2728
2694
|
parseLiteral(e6, t2) {
|
|
@@ -2742,11 +2708,11 @@ var ga = class {
|
|
|
2742
2708
|
if (a2) r2 += a2;
|
|
2743
2709
|
else break;
|
|
2744
2710
|
}
|
|
2745
|
-
let i2 =
|
|
2711
|
+
let i2 = K(n2, this.clonePosition());
|
|
2746
2712
|
return { val: { type: 0, value: r2, location: i2 }, err: null };
|
|
2747
2713
|
}
|
|
2748
2714
|
tryParseLeftAngleBracket() {
|
|
2749
|
-
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !
|
|
2715
|
+
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !la(this.peek() || 0)) ? (this.bump(), `<`) : null;
|
|
2750
2716
|
}
|
|
2751
2717
|
tryParseQuote(e6) {
|
|
2752
2718
|
if (this.isEOF() || this.char() !== 39) return null;
|
|
@@ -2786,29 +2752,29 @@ var ga = class {
|
|
|
2786
2752
|
}
|
|
2787
2753
|
parseArgument(e6, t2) {
|
|
2788
2754
|
let n2 = this.clonePosition();
|
|
2789
|
-
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2790
|
-
if (this.char() === 125) return this.bump(), this.error(2,
|
|
2755
|
+
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, K(n2, this.clonePosition()));
|
|
2756
|
+
if (this.char() === 125) return this.bump(), this.error(2, K(n2, this.clonePosition()));
|
|
2791
2757
|
let r2 = this.parseIdentifierIfPossible().value;
|
|
2792
|
-
if (!r2) return this.error(3,
|
|
2793
|
-
if (this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2758
|
+
if (!r2) return this.error(3, K(n2, this.clonePosition()));
|
|
2759
|
+
if (this.bumpSpace(), this.isEOF()) return this.error(1, K(n2, this.clonePosition()));
|
|
2794
2760
|
switch (this.char()) {
|
|
2795
2761
|
case 125:
|
|
2796
|
-
return this.bump(), { val: { type: 1, value: r2, location:
|
|
2762
|
+
return this.bump(), { val: { type: 1, value: r2, location: K(n2, this.clonePosition()) }, err: null };
|
|
2797
2763
|
case 44:
|
|
2798
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1,
|
|
2764
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, K(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
|
|
2799
2765
|
default:
|
|
2800
|
-
return this.error(3,
|
|
2766
|
+
return this.error(3, K(n2, this.clonePosition()));
|
|
2801
2767
|
}
|
|
2802
2768
|
}
|
|
2803
2769
|
parseIdentifierIfPossible() {
|
|
2804
|
-
let e6 = this.clonePosition(), t2 = this.offset(), n2 =
|
|
2805
|
-
return this.bumpTo(r2), { value: n2, location:
|
|
2770
|
+
let e6 = this.clonePosition(), t2 = this.offset(), n2 = aa(this.message, t2), r2 = t2 + n2.length;
|
|
2771
|
+
return this.bumpTo(r2), { value: n2, location: K(e6, this.clonePosition()) };
|
|
2806
2772
|
}
|
|
2807
2773
|
parseArgumentOptions(e6, t2, n2, r2) {
|
|
2808
2774
|
let i2 = this.clonePosition(), a2 = this.parseIdentifierIfPossible().value, o2 = this.clonePosition();
|
|
2809
2775
|
switch (a2) {
|
|
2810
2776
|
case ``:
|
|
2811
|
-
return this.error(4,
|
|
2777
|
+
return this.error(4, K(i2, o2));
|
|
2812
2778
|
case `number`:
|
|
2813
2779
|
case `date`:
|
|
2814
2780
|
case `time`: {
|
|
@@ -2818,15 +2784,15 @@ var ga = class {
|
|
|
2818
2784
|
this.bumpSpace();
|
|
2819
2785
|
let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
|
|
2820
2786
|
if (n3.err) return n3;
|
|
2821
|
-
let r3 =
|
|
2822
|
-
if (r3.length === 0) return this.error(6,
|
|
2823
|
-
e7 = { style: r3, styleLocation:
|
|
2787
|
+
let r3 = ra(n3.val);
|
|
2788
|
+
if (r3.length === 0) return this.error(6, K(this.clonePosition(), this.clonePosition()));
|
|
2789
|
+
e7 = { style: r3, styleLocation: K(t4, this.clonePosition()) };
|
|
2824
2790
|
}
|
|
2825
2791
|
let t3 = this.tryParseArgumentClose(r2);
|
|
2826
2792
|
if (t3.err) return t3;
|
|
2827
|
-
let i3 =
|
|
2793
|
+
let i3 = K(r2, this.clonePosition());
|
|
2828
2794
|
if (e7 && e7.style.startsWith(`::`)) {
|
|
2829
|
-
let t4 =
|
|
2795
|
+
let t4 = na(e7.style.slice(2));
|
|
2830
2796
|
if (a2 === `number`) {
|
|
2831
2797
|
let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
|
|
2832
2798
|
return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
|
|
@@ -2834,8 +2800,8 @@ var ga = class {
|
|
|
2834
2800
|
{
|
|
2835
2801
|
if (t4.length === 0) return this.error(10, i3);
|
|
2836
2802
|
let r3 = t4;
|
|
2837
|
-
this.locale && (r3 =
|
|
2838
|
-
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ?
|
|
2803
|
+
this.locale && (r3 = Ji(t4, this.locale));
|
|
2804
|
+
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Si(r3) : {} };
|
|
2839
2805
|
return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
|
|
2840
2806
|
}
|
|
2841
2807
|
}
|
|
@@ -2845,11 +2811,11 @@ var ga = class {
|
|
|
2845
2811
|
case `selectordinal`:
|
|
2846
2812
|
case `select`: {
|
|
2847
2813
|
let i3 = this.clonePosition();
|
|
2848
|
-
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12,
|
|
2814
|
+
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, K(i3, { ...i3 }));
|
|
2849
2815
|
this.bumpSpace();
|
|
2850
2816
|
let o3 = this.parseIdentifierIfPossible(), s2 = 0;
|
|
2851
2817
|
if (a2 !== `select` && o3.value === `offset`) {
|
|
2852
|
-
if (!this.bumpIf(`:`)) return this.error(13,
|
|
2818
|
+
if (!this.bumpIf(`:`)) return this.error(13, K(this.clonePosition(), this.clonePosition()));
|
|
2853
2819
|
this.bumpSpace();
|
|
2854
2820
|
let e7 = this.tryParseDecimalInteger(13, 14);
|
|
2855
2821
|
if (e7.err) return e7;
|
|
@@ -2859,15 +2825,15 @@ var ga = class {
|
|
|
2859
2825
|
if (c2.err) return c2;
|
|
2860
2826
|
let l2 = this.tryParseArgumentClose(r2);
|
|
2861
2827
|
if (l2.err) return l2;
|
|
2862
|
-
let u2 =
|
|
2863
|
-
return a2 === `select` ? { val: { type: 5, value: n2, options:
|
|
2828
|
+
let u2 = K(r2, this.clonePosition());
|
|
2829
|
+
return a2 === `select` ? { val: { type: 5, value: n2, options: ta(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: ta(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
|
|
2864
2830
|
}
|
|
2865
2831
|
default:
|
|
2866
|
-
return this.error(5,
|
|
2832
|
+
return this.error(5, K(i2, o2));
|
|
2867
2833
|
}
|
|
2868
2834
|
}
|
|
2869
2835
|
tryParseArgumentClose(e6) {
|
|
2870
|
-
return this.isEOF() || this.char() !== 125 ? this.error(1,
|
|
2836
|
+
return this.isEOF() || this.char() !== 125 ? this.error(1, K(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
|
|
2871
2837
|
}
|
|
2872
2838
|
parseSimpleArgStyleIfPossible() {
|
|
2873
2839
|
let e6 = 0, t2 = this.clonePosition();
|
|
@@ -2875,7 +2841,7 @@ var ga = class {
|
|
|
2875
2841
|
case 39: {
|
|
2876
2842
|
this.bump();
|
|
2877
2843
|
let e7 = this.clonePosition();
|
|
2878
|
-
if (!this.bumpUntil(`'`)) return this.error(11,
|
|
2844
|
+
if (!this.bumpUntil(`'`)) return this.error(11, K(e7, this.clonePosition()));
|
|
2879
2845
|
this.bump();
|
|
2880
2846
|
break;
|
|
2881
2847
|
}
|
|
@@ -2894,11 +2860,11 @@ var ga = class {
|
|
|
2894
2860
|
parseNumberSkeletonFromString(e6, t2) {
|
|
2895
2861
|
let n2 = [];
|
|
2896
2862
|
try {
|
|
2897
|
-
n2 =
|
|
2863
|
+
n2 = wi(e6);
|
|
2898
2864
|
} catch {
|
|
2899
2865
|
return this.error(7, t2);
|
|
2900
2866
|
}
|
|
2901
|
-
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ?
|
|
2867
|
+
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? Pi(n2) : {} }, err: null };
|
|
2902
2868
|
}
|
|
2903
2869
|
tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
|
|
2904
2870
|
let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
|
|
@@ -2908,20 +2874,20 @@ var ga = class {
|
|
|
2908
2874
|
if (t2 !== `select` && this.bumpIf(`=`)) {
|
|
2909
2875
|
let t3 = this.tryParseDecimalInteger(16, 19);
|
|
2910
2876
|
if (t3.err) return t3;
|
|
2911
|
-
c2 =
|
|
2877
|
+
c2 = K(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
|
|
2912
2878
|
} else break;
|
|
2913
2879
|
}
|
|
2914
2880
|
if (o2.has(s2)) return this.error(t2 === `select` ? 21 : 20, c2);
|
|
2915
2881
|
s2 === `other` && (i2 = true), this.bumpSpace();
|
|
2916
2882
|
let r3 = this.clonePosition();
|
|
2917
|
-
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18,
|
|
2883
|
+
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, K(this.clonePosition(), this.clonePosition()));
|
|
2918
2884
|
let l2 = this.parseMessage(e6 + 1, t2, n2);
|
|
2919
2885
|
if (l2.err) return l2;
|
|
2920
2886
|
let u2 = this.tryParseArgumentClose(r3);
|
|
2921
2887
|
if (u2.err) return u2;
|
|
2922
|
-
a2.push([s2, { value: l2.val, location:
|
|
2888
|
+
a2.push([s2, { value: l2.val, location: K(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
|
|
2923
2889
|
}
|
|
2924
|
-
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16,
|
|
2890
|
+
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16, K(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !i2 ? this.error(22, K(this.clonePosition(), this.clonePosition())) : { val: a2, err: null };
|
|
2925
2891
|
}
|
|
2926
2892
|
tryParseDecimalInteger(e6, t2) {
|
|
2927
2893
|
let n2 = 1, r2 = this.clonePosition();
|
|
@@ -2932,7 +2898,7 @@ var ga = class {
|
|
|
2932
2898
|
if (e7 >= 48 && e7 <= 57) i2 = true, a2 = a2 * 10 + (e7 - 48), this.bump();
|
|
2933
2899
|
else break;
|
|
2934
2900
|
}
|
|
2935
|
-
let o2 =
|
|
2901
|
+
let o2 = K(r2, this.clonePosition());
|
|
2936
2902
|
return i2 ? (a2 *= n2, Number.isSafeInteger(a2) ? { val: a2, err: null } : this.error(t2, o2)) : this.error(e6, o2);
|
|
2937
2903
|
}
|
|
2938
2904
|
offset() {
|
|
@@ -2980,7 +2946,7 @@ var ga = class {
|
|
|
2980
2946
|
}
|
|
2981
2947
|
}
|
|
2982
2948
|
bumpSpace() {
|
|
2983
|
-
for (; !this.isEOF() &&
|
|
2949
|
+
for (; !this.isEOF() && da(this.char()); ) this.bump();
|
|
2984
2950
|
}
|
|
2985
2951
|
peek() {
|
|
2986
2952
|
if (this.isEOF()) return null;
|
|
@@ -2988,34 +2954,34 @@ var ga = class {
|
|
|
2988
2954
|
return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
|
|
2989
2955
|
}
|
|
2990
2956
|
};
|
|
2991
|
-
function
|
|
2957
|
+
function ca(e6) {
|
|
2992
2958
|
return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
|
|
2993
2959
|
}
|
|
2994
|
-
function
|
|
2995
|
-
return
|
|
2960
|
+
function la(e6) {
|
|
2961
|
+
return ca(e6) || e6 === 47;
|
|
2996
2962
|
}
|
|
2997
|
-
function
|
|
2963
|
+
function ua(e6) {
|
|
2998
2964
|
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;
|
|
2999
2965
|
}
|
|
3000
|
-
function
|
|
2966
|
+
function da(e6) {
|
|
3001
2967
|
return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
|
|
3002
2968
|
}
|
|
3003
|
-
function
|
|
2969
|
+
function fa(e6) {
|
|
3004
2970
|
e6.forEach((e7) => {
|
|
3005
|
-
if (delete e7.location,
|
|
3006
|
-
else
|
|
2971
|
+
if (delete e7.location, Vi(e7) || Hi(e7)) for (let t2 in e7.options) delete e7.options[t2].location, fa(e7.options[t2].value);
|
|
2972
|
+
else Ri(e7) && Gi(e7.style) || (zi(e7) || Bi(e7)) && Ki(e7.style) ? delete e7.style.location : Wi(e7) && fa(e7.children);
|
|
3007
2973
|
});
|
|
3008
2974
|
}
|
|
3009
|
-
function
|
|
2975
|
+
function pa(e6, t2 = {}) {
|
|
3010
2976
|
t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
|
|
3011
|
-
let n2 = new
|
|
2977
|
+
let n2 = new sa(e6, t2).parse();
|
|
3012
2978
|
if (n2.err) {
|
|
3013
|
-
let e7 = SyntaxError(
|
|
2979
|
+
let e7 = SyntaxError(Fi[n2.err.kind]);
|
|
3014
2980
|
throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
|
|
3015
2981
|
}
|
|
3016
|
-
return t2?.captureLocation ||
|
|
2982
|
+
return t2?.captureLocation || fa(n2.val), n2.val;
|
|
3017
2983
|
}
|
|
3018
|
-
var
|
|
2984
|
+
var ma = class extends Error {
|
|
3019
2985
|
constructor(e6, t2, n2) {
|
|
3020
2986
|
super(e6), this.code = t2, this.originalMessage = n2;
|
|
3021
2987
|
}
|
|
@@ -3023,54 +2989,54 @@ var Ca = class extends Error {
|
|
|
3023
2989
|
return `[formatjs Error: ${this.code}] ${this.message}`;
|
|
3024
2990
|
}
|
|
3025
2991
|
};
|
|
3026
|
-
var
|
|
2992
|
+
var ha = class extends ma {
|
|
3027
2993
|
constructor(e6, t2, n2, r2) {
|
|
3028
2994
|
super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
|
|
3029
2995
|
}
|
|
3030
2996
|
};
|
|
3031
|
-
var
|
|
2997
|
+
var ga = class extends ma {
|
|
3032
2998
|
constructor(e6, t2, n2) {
|
|
3033
2999
|
super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
|
|
3034
3000
|
}
|
|
3035
3001
|
};
|
|
3036
|
-
var
|
|
3002
|
+
var _a = class extends ma {
|
|
3037
3003
|
constructor(e6, t2) {
|
|
3038
3004
|
super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
|
|
3039
3005
|
}
|
|
3040
3006
|
};
|
|
3041
|
-
function
|
|
3007
|
+
function va(e6) {
|
|
3042
3008
|
return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
|
|
3043
3009
|
let n2 = e7[e7.length - 1];
|
|
3044
3010
|
return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
|
|
3045
3011
|
}, []);
|
|
3046
3012
|
}
|
|
3047
|
-
function
|
|
3013
|
+
function ya(e6) {
|
|
3048
3014
|
return typeof e6 == `function`;
|
|
3049
3015
|
}
|
|
3050
|
-
function
|
|
3051
|
-
if (e6.length === 1 &&
|
|
3016
|
+
function ba(e6, t2, n2, r2, i2, a2, o2) {
|
|
3017
|
+
if (e6.length === 1 && Ii(e6[0])) return [{ type: 0, value: e6[0].value }];
|
|
3052
3018
|
let s2 = [];
|
|
3053
3019
|
for (let c2 of e6) {
|
|
3054
|
-
if (
|
|
3020
|
+
if (Ii(c2)) {
|
|
3055
3021
|
s2.push({ type: 0, value: c2.value });
|
|
3056
3022
|
continue;
|
|
3057
3023
|
}
|
|
3058
|
-
if (
|
|
3024
|
+
if (Ui(c2)) {
|
|
3059
3025
|
typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
|
|
3060
3026
|
continue;
|
|
3061
3027
|
}
|
|
3062
3028
|
let { value: e7 } = c2;
|
|
3063
|
-
if (!(i2 && e7 in i2)) throw new
|
|
3029
|
+
if (!(i2 && e7 in i2)) throw new _a(e7, o2);
|
|
3064
3030
|
let l2 = i2[e7];
|
|
3065
|
-
if (
|
|
3066
|
-
else if (
|
|
3067
|
-
let e8 = typeof c2.style == `string` ? r2.date[c2.style] :
|
|
3031
|
+
if (Li(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 });
|
|
3032
|
+
else if (zi(c2)) {
|
|
3033
|
+
let e8 = typeof c2.style == `string` ? r2.date[c2.style] : Ki(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3068
3034
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3069
|
-
} else if (
|
|
3070
|
-
let e8 = typeof c2.style == `string` ? r2.time[c2.style] :
|
|
3035
|
+
} else if (Bi(c2)) {
|
|
3036
|
+
let e8 = typeof c2.style == `string` ? r2.time[c2.style] : Ki(c2.style) ? c2.style.parsedOptions : r2.time.medium;
|
|
3071
3037
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3072
|
-
} else if (
|
|
3073
|
-
let e8 = typeof c2.style == `string` ? r2.number[c2.style] :
|
|
3038
|
+
} else if (Ri(c2)) {
|
|
3039
|
+
let e8 = typeof c2.style == `string` ? r2.number[c2.style] : Gi(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3074
3040
|
if (e8 && e8.scale) {
|
|
3075
3041
|
let t3 = e8.scale || 1;
|
|
3076
3042
|
if (typeof l2 == `bigint`) {
|
|
@@ -3080,40 +3046,40 @@ function ka(e6, t2, n2, r2, i2, a2, o2) {
|
|
|
3080
3046
|
}
|
|
3081
3047
|
s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
|
|
3082
3048
|
} else {
|
|
3083
|
-
if (
|
|
3049
|
+
if (Wi(c2)) {
|
|
3084
3050
|
let { children: e8, value: l3 } = c2, u2 = i2[l3];
|
|
3085
|
-
if (!
|
|
3086
|
-
let d2 = u2(
|
|
3051
|
+
if (!ya(u2)) throw new ga(l3, `function`, o2);
|
|
3052
|
+
let d2 = u2(ba(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
|
|
3087
3053
|
Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
|
|
3088
3054
|
}
|
|
3089
|
-
if (
|
|
3055
|
+
if (Vi(c2)) {
|
|
3090
3056
|
let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
|
|
3091
|
-
if (!a3) throw new
|
|
3092
|
-
s2.push(...
|
|
3093
|
-
} else if (
|
|
3057
|
+
if (!a3) throw new ha(c2.value, l2, Object.keys(c2.options), o2);
|
|
3058
|
+
s2.push(...ba(a3.value, t2, n2, r2, i2));
|
|
3059
|
+
} else if (Hi(c2)) {
|
|
3094
3060
|
let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
|
|
3095
3061
|
if (!a3) {
|
|
3096
|
-
if (!Intl.PluralRules) throw new
|
|
3062
|
+
if (!Intl.PluralRules) throw new ma(`Intl.PluralRules is not available in this environment.
|
|
3097
3063
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3098
3064
|
`, `MISSING_INTL_API`, o2);
|
|
3099
3065
|
let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
|
|
3100
3066
|
a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
|
|
3101
3067
|
}
|
|
3102
|
-
if (!a3) throw new
|
|
3068
|
+
if (!a3) throw new ha(c2.value, l2, Object.keys(c2.options), o2);
|
|
3103
3069
|
let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
|
|
3104
|
-
s2.push(...
|
|
3070
|
+
s2.push(...ba(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
|
|
3105
3071
|
}
|
|
3106
3072
|
}
|
|
3107
3073
|
}
|
|
3108
|
-
return
|
|
3074
|
+
return va(s2);
|
|
3109
3075
|
}
|
|
3110
|
-
function
|
|
3076
|
+
function xa(e6, t2) {
|
|
3111
3077
|
return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
|
|
3112
3078
|
}
|
|
3113
|
-
function
|
|
3114
|
-
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] =
|
|
3079
|
+
function Sa(e6, t2) {
|
|
3080
|
+
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = xa(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
|
|
3115
3081
|
}
|
|
3116
|
-
function
|
|
3082
|
+
function Ca(e6) {
|
|
3117
3083
|
return { create() {
|
|
3118
3084
|
return { get(t2) {
|
|
3119
3085
|
return e6[t2];
|
|
@@ -3122,23 +3088,23 @@ function Ma(e6) {
|
|
|
3122
3088
|
} };
|
|
3123
3089
|
} };
|
|
3124
3090
|
}
|
|
3125
|
-
function
|
|
3126
|
-
return { getNumberFormat:
|
|
3091
|
+
function wa(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
|
|
3092
|
+
return { getNumberFormat: li((...e7) => new Intl.NumberFormat(...e7), { cache: Ca(e6.number), strategy: bi.variadic }), getDateTimeFormat: li((...e7) => new Intl.DateTimeFormat(...e7), { cache: Ca(e6.dateTime), strategy: bi.variadic }), getPluralRules: li((...e7) => new Intl.PluralRules(...e7), { cache: Ca(e6.pluralRules), strategy: bi.variadic }) };
|
|
3127
3093
|
}
|
|
3128
|
-
var
|
|
3094
|
+
var Ta = class e5 {
|
|
3129
3095
|
constructor(t2, n2 = e5.defaultLocale, r2, i2) {
|
|
3130
3096
|
if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
|
|
3131
3097
|
let t3 = this.formatToParts(e6);
|
|
3132
3098
|
if (t3.length === 1) return t3[0].value;
|
|
3133
3099
|
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), []);
|
|
3134
3100
|
return n3.length <= 1 ? n3[0] || `` : n3;
|
|
3135
|
-
}, this.formatToParts = (e6) =>
|
|
3101
|
+
}, this.formatToParts = (e6) => ba(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`) {
|
|
3136
3102
|
if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
3137
3103
|
let { ...n3 } = i2 || {};
|
|
3138
3104
|
this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
|
|
3139
3105
|
} else this.ast = t2;
|
|
3140
3106
|
if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
|
|
3141
|
-
this.formats =
|
|
3107
|
+
this.formats = Sa(e5.formats, r2), this.formatters = i2 && i2.formatters || wa(this.formatterCache);
|
|
3142
3108
|
}
|
|
3143
3109
|
static {
|
|
3144
3110
|
this.memoizedDefaultLocale = null;
|
|
@@ -3154,32 +3120,66 @@ var Pa = class e5 {
|
|
|
3154
3120
|
};
|
|
3155
3121
|
}
|
|
3156
3122
|
static {
|
|
3157
|
-
this.__parse =
|
|
3123
|
+
this.__parse = pa;
|
|
3158
3124
|
}
|
|
3159
3125
|
static {
|
|
3160
3126
|
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` } } };
|
|
3161
3127
|
}
|
|
3162
3128
|
};
|
|
3163
|
-
|
|
3164
|
-
|
|
3129
|
+
var Ea = [`__proto__`, `constructor`, `prototype`];
|
|
3130
|
+
function Da(e6, t2, n2) {
|
|
3131
|
+
function r2(e7) {
|
|
3132
|
+
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
3133
|
+
}
|
|
3134
|
+
function i2() {
|
|
3135
|
+
return !e6 || typeof e6 == `string`;
|
|
3136
|
+
}
|
|
3137
|
+
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
3138
|
+
if (i2()) return {};
|
|
3139
|
+
var o2 = r2(a2.shift());
|
|
3140
|
+
if (Ea.indexOf(o2) > -1) return {};
|
|
3141
|
+
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
3142
|
+
}
|
|
3143
|
+
if (i2()) return {};
|
|
3144
|
+
var s2 = r2(a2.shift());
|
|
3145
|
+
return Ea.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
3146
|
+
}
|
|
3147
|
+
function Oa(e6, t2, n2) {
|
|
3148
|
+
var r2 = Da(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
3149
|
+
i2 !== void 0 && (i2[a2] = n2);
|
|
3150
|
+
}
|
|
3151
|
+
function ka(e6, t2) {
|
|
3152
|
+
var n2 = Da(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
3153
|
+
if (r2) return r2[i2];
|
|
3165
3154
|
}
|
|
3166
|
-
function
|
|
3155
|
+
function Aa(e6) {
|
|
3156
|
+
return [...arguments].slice(1).forEach(function(t2) {
|
|
3157
|
+
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
3158
|
+
var i2 = r2[n2];
|
|
3159
|
+
Ea.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
3160
|
+
}
|
|
3161
|
+
}), e6;
|
|
3162
|
+
}
|
|
3163
|
+
function ja(e6, t2) {
|
|
3164
|
+
return Ia(e6) || Fa(e6, t2) || Na(e6, t2) || Ma();
|
|
3165
|
+
}
|
|
3166
|
+
function Ma() {
|
|
3167
3167
|
throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3168
3168
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3169
3169
|
}
|
|
3170
|
-
function
|
|
3170
|
+
function Na(e6, t2) {
|
|
3171
3171
|
if (e6) {
|
|
3172
|
-
if (typeof e6 == `string`) return
|
|
3172
|
+
if (typeof e6 == `string`) return Pa(e6, t2);
|
|
3173
3173
|
var n2 = {}.toString.call(e6).slice(8, -1);
|
|
3174
|
-
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) ?
|
|
3174
|
+
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) ? Pa(e6, t2) : void 0;
|
|
3175
3175
|
}
|
|
3176
3176
|
}
|
|
3177
|
-
function
|
|
3177
|
+
function Pa(e6, t2) {
|
|
3178
3178
|
(t2 == null || t2 > e6.length) && (t2 = e6.length);
|
|
3179
3179
|
for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
|
|
3180
3180
|
return r2;
|
|
3181
3181
|
}
|
|
3182
|
-
function
|
|
3182
|
+
function Fa(e6, t2) {
|
|
3183
3183
|
var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
|
|
3184
3184
|
if (n2 != null) {
|
|
3185
3185
|
var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
|
|
@@ -3200,18 +3200,10 @@ function za(e6, t2) {
|
|
|
3200
3200
|
return s2;
|
|
3201
3201
|
}
|
|
3202
3202
|
}
|
|
3203
|
-
function
|
|
3203
|
+
function Ia(e6) {
|
|
3204
3204
|
if (Array.isArray(e6)) return e6;
|
|
3205
3205
|
}
|
|
3206
|
-
function
|
|
3207
|
-
"@babel/helpers - typeof";
|
|
3208
|
-
return K = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3209
|
-
return typeof e7;
|
|
3210
|
-
} : function(e7) {
|
|
3211
|
-
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3212
|
-
}, K(e6);
|
|
3213
|
-
}
|
|
3214
|
-
function Va(e6, t2) {
|
|
3206
|
+
function La(e6, t2) {
|
|
3215
3207
|
var n2 = Object.keys(e6);
|
|
3216
3208
|
if (Object.getOwnPropertySymbols) {
|
|
3217
3209
|
var r2 = Object.getOwnPropertySymbols(e6);
|
|
@@ -3221,105 +3213,141 @@ function Va(e6, t2) {
|
|
|
3221
3213
|
}
|
|
3222
3214
|
return n2;
|
|
3223
3215
|
}
|
|
3224
|
-
function
|
|
3216
|
+
function Ra(e6) {
|
|
3225
3217
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
3226
3218
|
var n2 = arguments[t2] == null ? {} : arguments[t2];
|
|
3227
|
-
t2 % 2 ?
|
|
3228
|
-
|
|
3229
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) :
|
|
3219
|
+
t2 % 2 ? La(Object(n2), true).forEach(function(t3) {
|
|
3220
|
+
za(e6, t3, n2[t3]);
|
|
3221
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : La(Object(n2)).forEach(function(t3) {
|
|
3230
3222
|
Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
|
|
3231
3223
|
});
|
|
3232
3224
|
}
|
|
3233
3225
|
return e6;
|
|
3234
3226
|
}
|
|
3235
|
-
function
|
|
3236
|
-
return (t2 =
|
|
3227
|
+
function za(e6, t2, n2) {
|
|
3228
|
+
return (t2 = Ua(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
|
|
3237
3229
|
}
|
|
3238
|
-
function
|
|
3230
|
+
function Ba(e6, t2) {
|
|
3239
3231
|
if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
|
|
3240
3232
|
}
|
|
3241
|
-
function
|
|
3233
|
+
function Va(e6, t2) {
|
|
3242
3234
|
for (var n2 = 0; n2 < t2.length; n2++) {
|
|
3243
3235
|
var r2 = t2[n2];
|
|
3244
|
-
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6,
|
|
3236
|
+
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, Ua(r2.key), r2);
|
|
3245
3237
|
}
|
|
3246
3238
|
}
|
|
3247
|
-
function
|
|
3248
|
-
return t2 &&
|
|
3239
|
+
function Ha(e6, t2, n2) {
|
|
3240
|
+
return t2 && Va(e6.prototype, t2), n2 && Va(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
|
|
3249
3241
|
}
|
|
3250
|
-
function
|
|
3251
|
-
var t2 =
|
|
3252
|
-
return
|
|
3242
|
+
function Ua(e6) {
|
|
3243
|
+
var t2 = Wa(e6, `string`);
|
|
3244
|
+
return q(t2) == `symbol` ? t2 : t2 + ``;
|
|
3253
3245
|
}
|
|
3254
|
-
function
|
|
3255
|
-
if (
|
|
3246
|
+
function Wa(e6, t2) {
|
|
3247
|
+
if (q(e6) != `object` || !e6) return e6;
|
|
3256
3248
|
var n2 = e6[Symbol.toPrimitive];
|
|
3257
3249
|
if (n2 !== void 0) {
|
|
3258
3250
|
var r2 = n2.call(e6, t2 || `default`);
|
|
3259
|
-
if (
|
|
3251
|
+
if (q(r2) != `object`) return r2;
|
|
3260
3252
|
throw TypeError(`@@toPrimitive must return a primitive value.`);
|
|
3261
3253
|
}
|
|
3262
3254
|
return (t2 === `string` ? String : Number)(e6);
|
|
3263
3255
|
}
|
|
3264
|
-
function
|
|
3256
|
+
function q(e6) {
|
|
3257
|
+
"@babel/helpers - typeof";
|
|
3258
|
+
return q = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3259
|
+
return typeof e7;
|
|
3260
|
+
} : function(e7) {
|
|
3261
|
+
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3262
|
+
}, q(e6);
|
|
3263
|
+
}
|
|
3264
|
+
var Ga = `https://www.i18next.com/how-to/using-icu-or-mf2`;
|
|
3265
|
+
var Ka = [`zero`, `one`, `two`, `few`, `many`, `other`];
|
|
3266
|
+
function qa() {
|
|
3265
3267
|
return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
|
|
3266
3268
|
return n2;
|
|
3267
3269
|
}, parseLngForICU: function(e6) {
|
|
3268
3270
|
return e6;
|
|
3269
3271
|
}, escapeVariables: false };
|
|
3270
3272
|
}
|
|
3271
|
-
|
|
3273
|
+
function Ja(e6, t2, n2, r2) {
|
|
3274
|
+
return n2 && t2 && q(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}`;
|
|
3275
|
+
}
|
|
3276
|
+
var Ya = function() {
|
|
3272
3277
|
function e6(t2) {
|
|
3273
|
-
|
|
3278
|
+
Ba(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
|
|
3274
3279
|
}
|
|
3275
|
-
return
|
|
3280
|
+
return Ha(e6, [{ key: `init`, value: function(e7, t2) {
|
|
3276
3281
|
var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
|
|
3277
|
-
if (this.options =
|
|
3282
|
+
if (this.options = Aa(r2, t2, this.options || {}, qa()), this.formats = this.options.formats, e7) {
|
|
3278
3283
|
var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
|
|
3279
|
-
e7.IntlMessageFormat =
|
|
3284
|
+
e7.IntlMessageFormat = Ta, 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() {
|
|
3280
3285
|
return n2.clearCache();
|
|
3281
3286
|
}), o2 && e7.store.on(o2, function() {
|
|
3282
3287
|
return n2.clearCache();
|
|
3283
3288
|
}));
|
|
3284
3289
|
}
|
|
3285
3290
|
} }, { key: `addUserDefinedFormats`, value: function(e7) {
|
|
3286
|
-
this.formats = this.formats ?
|
|
3291
|
+
this.formats = this.formats ? Ra(Ra({}, this.formats), e7) : e7, this.clearCache();
|
|
3287
3292
|
} }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
|
|
3288
|
-
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize &&
|
|
3289
|
-
this.options.memoize
|
|
3293
|
+
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && [n2, r2, i2], c2;
|
|
3294
|
+
if (this.options.memoize) {
|
|
3295
|
+
var l2 = ka(this.mem, s2);
|
|
3296
|
+
l2 && l2.res === e7 && (c2 = l2.fc);
|
|
3297
|
+
}
|
|
3290
3298
|
try {
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
return this.
|
|
3299
|
+
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 Ta(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && Oa(this.mem, s2, { res: e7, fc: c2 }));
|
|
3300
|
+
var u2 = t2 && t2.replace && q(t2.replace) === `object` ? Ra(Ra({}, t2), t2.replace) : t2;
|
|
3301
|
+
return c2.format(this.escapeVariableValues(u2));
|
|
3302
|
+
} catch (a3) {
|
|
3303
|
+
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(Ja(a3, e7, !c2, `key "${i2}" (${n2}/${r2})`)), this.options.parseErrorHandler(a3, i2, e7, t2);
|
|
3294
3304
|
}
|
|
3295
3305
|
} }, { key: `addLookupKeys`, value: function(e7, t2, n2, r2, i2) {
|
|
3296
|
-
return e7;
|
|
3306
|
+
return this.debug && i2 && this.checkSuffixKeys(t2, n2, r2, i2), e7;
|
|
3307
|
+
} }, { key: `checkSuffixKeys`, value: function(e7, t2, n2, r2) {
|
|
3308
|
+
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})`;
|
|
3309
|
+
if (i2 !== void 0 && this.firstTime(`plural ${t2} ${n2} ${e7}`)) {
|
|
3310
|
+
var p2 = Ka.concat(Ka.map(function(e8) {
|
|
3311
|
+
return `ordinal${c2}${e8}`;
|
|
3312
|
+
})).map(function(t3) {
|
|
3313
|
+
return `${e7}${c2}${t3}`;
|
|
3314
|
+
}).filter(function(e8) {
|
|
3315
|
+
return d2.getResource(t2, n2, e8) !== void 0;
|
|
3316
|
+
});
|
|
3317
|
+
p2.length && this.warn(`${f2} was called with count, but i18next-icu does not look up plural suffix keys (${p2.join(`, `)}). Put the plural into the message: {count, plural, one {# item} other {# items}}.`);
|
|
3318
|
+
}
|
|
3319
|
+
var m2 = `${e7}${u2}${a2}`;
|
|
3320
|
+
a2 !== void 0 && a2 !== `` && this.firstTime(`context ${t2} ${n2} ${m2}`) && d2.getResource(t2, n2, m2) !== void 0 && this.warn(`${f2} was called with context "${a2}", but i18next-icu does not look up context keys (${m2}). Use a select in the message: {context, select, ${a2} {...} other {...}}.`);
|
|
3321
|
+
} }, { key: `firstTime`, value: function(e7) {
|
|
3322
|
+
return !this.warned.has(e7) && (this.warned.add(e7), true);
|
|
3323
|
+
} }, { key: `warn`, value: function(e7) {
|
|
3324
|
+
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${Ga}`);
|
|
3297
3325
|
} }, { key: `clearCache`, value: function() {
|
|
3298
3326
|
this.mem = {};
|
|
3299
3327
|
} }, { key: `escapeVariableValues`, value: function(e7) {
|
|
3300
|
-
if (!this.options.escapeVariables || !e7 ||
|
|
3328
|
+
if (!this.options.escapeVariables || !e7 || q(e7) !== `object`) return e7;
|
|
3301
3329
|
for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
|
|
3302
|
-
var i2 =
|
|
3330
|
+
var i2 = ja(r2[n2], 2), a2 = i2[0], o2 = i2[1];
|
|
3303
3331
|
t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`) : o2;
|
|
3304
3332
|
}
|
|
3305
3333
|
return t2;
|
|
3306
3334
|
} }]), e6;
|
|
3307
3335
|
}();
|
|
3308
|
-
|
|
3309
|
-
function
|
|
3336
|
+
Ya.type = `i18nFormat`;
|
|
3337
|
+
function Xa({ icuOptions: e6 = {}, ...t2 }) {
|
|
3310
3338
|
let { parseErrorHandler: n2 = void 0 } = t2;
|
|
3311
|
-
return
|
|
3339
|
+
return ci(t2, { icu: new Ya({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
|
|
3312
3340
|
}
|
|
3313
|
-
var
|
|
3341
|
+
var Za = (e6, t2, n2, r2) => {
|
|
3314
3342
|
let i2 = [n2, { code: t2, ...r2 || {} }];
|
|
3315
3343
|
if (e6?.services?.logger?.forward) return e6.services.logger.forward(i2, `warn`, `react-i18next::`, true);
|
|
3316
|
-
|
|
3344
|
+
J(i2[0]) && (i2[0] = `react-i18next:: ${i2[0]}`), e6?.services?.logger?.warn ? e6.services.logger.warn(...i2) : console?.warn && console.warn(...i2);
|
|
3317
3345
|
};
|
|
3318
|
-
var
|
|
3319
|
-
var
|
|
3320
|
-
|
|
3346
|
+
var Qa = {};
|
|
3347
|
+
var $a = (e6, t2, n2, r2) => {
|
|
3348
|
+
J(n2) && Qa[n2] || (J(n2) && (Qa[n2] = /* @__PURE__ */ new Date()), Za(e6, t2, n2, r2));
|
|
3321
3349
|
};
|
|
3322
|
-
var
|
|
3350
|
+
var eo = (e6, t2) => () => {
|
|
3323
3351
|
if (e6.isInitialized) t2();
|
|
3324
3352
|
else {
|
|
3325
3353
|
let n2 = () => {
|
|
@@ -3330,29 +3358,29 @@ var to = (e6, t2) => () => {
|
|
|
3330
3358
|
e6.on(`initialized`, n2);
|
|
3331
3359
|
}
|
|
3332
3360
|
};
|
|
3333
|
-
var
|
|
3334
|
-
e6.loadNamespaces(t2,
|
|
3361
|
+
var to = (e6, t2, n2) => {
|
|
3362
|
+
e6.loadNamespaces(t2, eo(e6, n2));
|
|
3335
3363
|
};
|
|
3336
|
-
var
|
|
3337
|
-
if (
|
|
3364
|
+
var no = (e6, t2, n2, r2) => {
|
|
3365
|
+
if (J(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return to(e6, n2, r2);
|
|
3338
3366
|
n2.forEach((t3) => {
|
|
3339
3367
|
e6.options.ns.indexOf(t3) < 0 && e6.options.ns.push(t3);
|
|
3340
|
-
}), e6.loadLanguages(t2,
|
|
3368
|
+
}), e6.loadLanguages(t2, eo(e6, r2));
|
|
3341
3369
|
};
|
|
3342
|
-
var
|
|
3370
|
+
var ro = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? ($a(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
|
|
3343
3371
|
if (n2.bindI18n && n2.bindI18n.indexOf(`languageChanging`) > -1 && t3.services.backendConnector.backend && t3.isLanguageChangingTo && !r2(t3.isLanguageChangingTo, e6)) return false;
|
|
3344
3372
|
} });
|
|
3345
|
-
var
|
|
3346
|
-
var
|
|
3347
|
-
var
|
|
3348
|
-
var
|
|
3349
|
-
var
|
|
3350
|
-
var
|
|
3351
|
-
var
|
|
3352
|
-
var
|
|
3353
|
-
var
|
|
3354
|
-
var
|
|
3355
|
-
var
|
|
3373
|
+
var J = (e6) => typeof e6 == `string`;
|
|
3374
|
+
var io = (e6) => typeof e6 == `object` && !!e6;
|
|
3375
|
+
var ao = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
3376
|
+
var oo = { "&": `&`, "&": `&`, "<": `<`, "<": `<`, ">": `>`, ">": `>`, "'": `'`, "'": `'`, """: `"`, """: `"`, " ": ` `, " ": ` `, "©": `\xA9`, "©": `\xA9`, "®": `\xAE`, "®": `\xAE`, "…": `\u2026`, "…": `\u2026`, "/": `/`, "/": `/` };
|
|
3377
|
+
var so = (e6) => oo[e6];
|
|
3378
|
+
var co = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(ao, so) };
|
|
3379
|
+
var lo = () => co;
|
|
3380
|
+
var uo;
|
|
3381
|
+
var fo = () => uo;
|
|
3382
|
+
var po = (0, import_react.createContext)();
|
|
3383
|
+
var mo = class {
|
|
3356
3384
|
constructor() {
|
|
3357
3385
|
this.usedNamespaces = {};
|
|
3358
3386
|
}
|
|
@@ -3365,32 +3393,32 @@ var ho = class {
|
|
|
3365
3393
|
return Object.keys(this.usedNamespaces);
|
|
3366
3394
|
}
|
|
3367
3395
|
};
|
|
3368
|
-
var
|
|
3396
|
+
var ho = (e6, t2) => {
|
|
3369
3397
|
let n2 = (0, import_react.useRef)();
|
|
3370
3398
|
return (0, import_react.useEffect)(() => {
|
|
3371
3399
|
n2.current = t2 ? n2.current : e6;
|
|
3372
3400
|
}, [e6, t2]), n2.current;
|
|
3373
3401
|
};
|
|
3374
|
-
var
|
|
3375
|
-
var
|
|
3376
|
-
var
|
|
3377
|
-
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = (0, import_react.useContext)(
|
|
3378
|
-
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new
|
|
3379
|
-
|
|
3380
|
-
let e7 = (e8, t4) =>
|
|
3402
|
+
var go = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
|
|
3403
|
+
var _o = (e6, t2, n2, r2) => (0, import_react.useCallback)(go(e6, t2, n2, r2), [e6, t2, n2, r2]);
|
|
3404
|
+
var vo = (e6, t2 = {}) => {
|
|
3405
|
+
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = (0, import_react.useContext)(po) || {}, a2 = n2 || r2 || fo();
|
|
3406
|
+
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new mo()), !a2) {
|
|
3407
|
+
$a(a2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
|
|
3408
|
+
let e7 = (e8, t4) => J(t4) ? t4 : io(t4) && J(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
|
|
3381
3409
|
return t3.t = e7, t3.i18n = {}, t3.ready = false, t3;
|
|
3382
3410
|
}
|
|
3383
|
-
a2.options.react?.wait &&
|
|
3384
|
-
let o2 = { ...
|
|
3385
|
-
p2 =
|
|
3386
|
-
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) =>
|
|
3411
|
+
a2.options.react?.wait && $a(a2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
|
|
3412
|
+
let o2 = { ...lo(), ...a2.options.react, ...t2 }, { useSuspense: s2, keyPrefix: u2 } = o2, p2 = e6 || i2 || a2.options?.defaultNS;
|
|
3413
|
+
p2 = J(p2) ? [p2] : p2 || [`translation`], a2.reportNamespaces.addUsedNamespaces?.(p2);
|
|
3414
|
+
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) => ro(e7, a2, o2)), h2 = _o(a2, t2.lng || null, o2.nsMode === `fallback` ? p2 : p2[0], u2), g2 = () => h2, _2 = () => go(a2, t2.lng || null, o2.nsMode === `fallback` ? p2 : p2[0], u2), [v2, y2] = (0, import_react.useState)(g2), b2 = p2.join();
|
|
3387
3415
|
t2.lng && (b2 = `${t2.lng}${b2}`);
|
|
3388
|
-
let x2 =
|
|
3416
|
+
let x2 = ho(b2), S2 = (0, import_react.useRef)(true);
|
|
3389
3417
|
(0, import_react.useEffect)(() => {
|
|
3390
3418
|
let { bindI18n: e7, bindI18nStore: n3 } = o2;
|
|
3391
|
-
S2.current = true, !m2 && !s2 && (t2.lng ?
|
|
3419
|
+
S2.current = true, !m2 && !s2 && (t2.lng ? no(a2, t2.lng, p2, () => {
|
|
3392
3420
|
S2.current && y2(_2);
|
|
3393
|
-
}) :
|
|
3421
|
+
}) : to(a2, p2, () => {
|
|
3394
3422
|
S2.current && y2(_2);
|
|
3395
3423
|
})), m2 && x2 && x2 !== b2 && S2.current && y2(_2);
|
|
3396
3424
|
let r3 = () => {
|
|
@@ -3405,134 +3433,134 @@ var yo = (e6, t2 = {}) => {
|
|
|
3405
3433
|
let C2 = [v2, a2, m2];
|
|
3406
3434
|
if (C2.t = v2, C2.i18n = a2, C2.ready = m2, m2 || !m2 && !s2) return C2;
|
|
3407
3435
|
throw new Promise((e7) => {
|
|
3408
|
-
t2.lng ?
|
|
3436
|
+
t2.lng ? no(a2, t2.lng, p2, () => e7()) : to(a2, p2, () => e7());
|
|
3409
3437
|
});
|
|
3410
3438
|
};
|
|
3411
|
-
function
|
|
3439
|
+
function yo({ i18n: e6, defaultNS: t2, children: n2 }) {
|
|
3412
3440
|
let r2 = (0, import_react.useMemo)(() => ({ i18n: e6, defaultNS: t2 }), [e6, t2]);
|
|
3413
|
-
return (0, import_react.createElement)(
|
|
3441
|
+
return (0, import_react.createElement)(po.Provider, { value: r2 }, n2);
|
|
3414
3442
|
}
|
|
3415
|
-
var
|
|
3416
|
-
var
|
|
3417
|
-
var
|
|
3443
|
+
var bo = I(`@wix/site-service-locale`);
|
|
3444
|
+
var xo = I(`@wix/site-service-renderer-configuration`);
|
|
3445
|
+
var So = () => {
|
|
3418
3446
|
let e6, t2;
|
|
3419
3447
|
try {
|
|
3420
|
-
e6 = (0, import_services_manager_react.useService)(
|
|
3448
|
+
e6 = (0, import_services_manager_react.useService)(xo).languageCode;
|
|
3421
3449
|
} catch {
|
|
3422
3450
|
}
|
|
3423
3451
|
try {
|
|
3424
|
-
t2 = (0, import_services_manager_react.useService)(
|
|
3452
|
+
t2 = (0, import_services_manager_react.useService)(bo).language;
|
|
3425
3453
|
} catch {
|
|
3426
3454
|
}
|
|
3427
3455
|
return e6 || t2;
|
|
3428
3456
|
};
|
|
3429
|
-
var
|
|
3430
|
-
var
|
|
3431
|
-
function
|
|
3457
|
+
var Co = `wix-warmup-data`;
|
|
3458
|
+
var wo = null;
|
|
3459
|
+
function To(e6) {
|
|
3432
3460
|
if (typeof document < `u`) try {
|
|
3433
|
-
let t2 = document.getElementById(
|
|
3434
|
-
return t2 ? (
|
|
3461
|
+
let t2 = document.getElementById(Co)?.textContent;
|
|
3462
|
+
return t2 ? (wo?.text !== t2 && (wo = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), wo.data[e6] ?? void 0) : void 0;
|
|
3435
3463
|
} catch {
|
|
3436
3464
|
return;
|
|
3437
3465
|
}
|
|
3438
3466
|
}
|
|
3439
|
-
var
|
|
3440
|
-
var
|
|
3441
|
-
var
|
|
3442
|
-
var
|
|
3443
|
-
var
|
|
3444
|
-
let t2 = e6.scope ??
|
|
3445
|
-
return n2 || (n2 = /* @__PURE__ */ new Map(),
|
|
3467
|
+
var Eo = 5e3;
|
|
3468
|
+
var Do = 100;
|
|
3469
|
+
var Oo = {};
|
|
3470
|
+
var ko = /* @__PURE__ */ new WeakMap();
|
|
3471
|
+
var Ao = (e6) => {
|
|
3472
|
+
let t2 = e6.scope ?? Oo, n2 = ko.get(t2);
|
|
3473
|
+
return n2 || (n2 = /* @__PURE__ */ new Map(), ko.set(t2, n2)), n2;
|
|
3446
3474
|
};
|
|
3447
|
-
function
|
|
3475
|
+
function jo({ key: e6, warmupData: t2, fetchData: n2 }) {
|
|
3448
3476
|
if (e6 === null) return n2();
|
|
3449
3477
|
if (t2.isServer) return n2().then((n3) => (t2.set(e6, n3), n3));
|
|
3450
|
-
let r2 =
|
|
3478
|
+
let r2 = Ao(t2), i2 = Date.now();
|
|
3451
3479
|
for (let [e7, t3] of r2) t3.expiresAt <= i2 && r2.delete(e7);
|
|
3452
3480
|
let a2 = r2.get(e6);
|
|
3453
3481
|
if (a2) return a2.promise;
|
|
3454
|
-
let o2 =
|
|
3482
|
+
let o2 = To(e6);
|
|
3455
3483
|
if (o2 !== void 0) {
|
|
3456
|
-
let t3 =
|
|
3457
|
-
return r2.set(e6, { promise: t3, expiresAt: i2 +
|
|
3484
|
+
let t3 = zn(o2);
|
|
3485
|
+
return r2.set(e6, { promise: t3, expiresAt: i2 + Eo }), t3;
|
|
3458
3486
|
}
|
|
3459
3487
|
let s2 = (async () => await t2.get(e6) ?? n2())();
|
|
3460
|
-
r2.size >=
|
|
3488
|
+
r2.size >= Do && r2.delete(r2.keys().next().value);
|
|
3461
3489
|
let c2 = { promise: s2, expiresAt: 1 / 0 };
|
|
3462
3490
|
return r2.set(e6, c2), s2.then(() => {
|
|
3463
|
-
c2.expiresAt = Date.now() +
|
|
3491
|
+
c2.expiresAt = Date.now() + Eo;
|
|
3464
3492
|
}, () => {
|
|
3465
3493
|
r2.get(e6) === c2 && r2.delete(e6);
|
|
3466
3494
|
}), s2;
|
|
3467
3495
|
}
|
|
3468
|
-
var
|
|
3469
|
-
var
|
|
3470
|
-
var
|
|
3471
|
-
var
|
|
3472
|
-
function
|
|
3473
|
-
let n2 =
|
|
3496
|
+
var Mo = `blog-builder:i18n`;
|
|
3497
|
+
var No = `translation`;
|
|
3498
|
+
var Po = () => To(Mo);
|
|
3499
|
+
var Fo = /* @__PURE__ */ new Map();
|
|
3500
|
+
function Io(e6, t2) {
|
|
3501
|
+
let n2 = Fo.get(e6);
|
|
3474
3502
|
if (n2) return n2;
|
|
3475
|
-
let r2 =
|
|
3476
|
-
return
|
|
3503
|
+
let r2 = Po(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = Xa({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
|
|
3504
|
+
return Fo.set(e6, a2), a2;
|
|
3477
3505
|
}
|
|
3478
|
-
function
|
|
3479
|
-
let t2 = () => e6.loadNamespaces(
|
|
3506
|
+
function Lo(e6) {
|
|
3507
|
+
let t2 = () => e6.loadNamespaces(No).then(() => void 0, () => void 0);
|
|
3480
3508
|
return e6.isInitialized ? t2() : new Promise((n2) => {
|
|
3481
3509
|
e6.on(`initialized`, () => void t2().then(n2));
|
|
3482
3510
|
});
|
|
3483
3511
|
}
|
|
3484
|
-
function
|
|
3512
|
+
function Ro(e6, t2) {
|
|
3485
3513
|
return e6.getResourceBundle(t2, `translation`) ?? e6.getResourceBundle(`en`, `translation`);
|
|
3486
3514
|
}
|
|
3487
|
-
var
|
|
3515
|
+
var zo = (e6, t2, n2) => {
|
|
3488
3516
|
let r2 = t2.lastIndexOf(`?`), i2 = e6[r2 === -1 || r2 < t2.lastIndexOf(`/`) ? t2 : t2.slice(0, r2)];
|
|
3489
3517
|
return i2 ? typeof i2 == `function` ? i2() : Promise.resolve(i2) : new Promise((e7, r3) => {
|
|
3490
3518
|
(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.`))));
|
|
3491
3519
|
});
|
|
3492
3520
|
};
|
|
3493
|
-
var
|
|
3494
|
-
|
|
3495
|
-
var
|
|
3496
|
-
function
|
|
3497
|
-
let t2 =
|
|
3498
|
-
return t2 || (t2 =
|
|
3521
|
+
var Bo = (e6) => e6.split(`-`)[0] ?? e6;
|
|
3522
|
+
vr({ isDev: false, loadMessages: (e6) => zo(Object.assign({ "../assets/locale/messages_en.dev.json": () => _n(() => Promise.resolve().then(() => Go), void 0, import_meta.url), "../assets/locale/messages_en.json": () => _n(() => Promise.resolve().then(() => qo), void 0, import_meta.url) }), `../assets/locale/messages_${Bo(e6)}.json`, 4), loadDevMessages: (e6) => zo(Object.assign({ "../assets/locale/messages_en.dev.json": () => _n(() => Promise.resolve().then(() => Go), void 0, import_meta.url) }), `../assets/locale/messages_${Bo(e6)}.dev.json`, 4) });
|
|
3523
|
+
var Vo = /* @__PURE__ */ new WeakMap();
|
|
3524
|
+
function Ho(e6) {
|
|
3525
|
+
let t2 = Vo.get(e6);
|
|
3526
|
+
return t2 || (t2 = Lo(e6).finally(() => Vo.delete(e6)), Vo.set(e6, t2)), t2;
|
|
3499
3527
|
}
|
|
3500
|
-
function
|
|
3501
|
-
let n2 =
|
|
3528
|
+
function Uo({ i18n: e6, locale: t2 }) {
|
|
3529
|
+
let n2 = Wn(), r2 = hr();
|
|
3502
3530
|
if (!n2) return null;
|
|
3503
|
-
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw
|
|
3504
|
-
let i2 =
|
|
3505
|
-
return i2 && r2.set(
|
|
3506
|
-
}
|
|
3507
|
-
function
|
|
3508
|
-
let t2 =
|
|
3509
|
-
return { i18n:
|
|
3510
|
-
}
|
|
3511
|
-
var
|
|
3512
|
-
var
|
|
3513
|
-
var
|
|
3514
|
-
var
|
|
3515
|
-
var
|
|
3516
|
-
var
|
|
3517
|
-
var
|
|
3518
|
-
let n2 =
|
|
3531
|
+
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw Ho(e6);
|
|
3532
|
+
let i2 = Ro(e6, t2);
|
|
3533
|
+
return i2 && r2.set(Mo, { locale: t2, messages: i2 }), null;
|
|
3534
|
+
}
|
|
3535
|
+
function Wo(e6) {
|
|
3536
|
+
let t2 = So(), n2 = Po()?.locale ?? t2 ?? `en`;
|
|
3537
|
+
return { i18n: Io(n2, e6), locale: n2 };
|
|
3538
|
+
}
|
|
3539
|
+
var Go = v({ default: () => Ko });
|
|
3540
|
+
var Ko = { "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` };
|
|
3541
|
+
var qo = v({ default: () => Yo, title: () => Jo });
|
|
3542
|
+
var Jo = `My App`;
|
|
3543
|
+
var Yo = { "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: Jo, "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.` };
|
|
3544
|
+
var Xo = Object.assign({ "../assets/locale/messages_en.dev.json": Go, "../assets/locale/messages_en.json": qo });
|
|
3545
|
+
var Zo = (e6, t2) => {
|
|
3546
|
+
let n2 = Xo[`../assets/locale/messages_${Bo(e6)}${t2}.json`];
|
|
3519
3547
|
return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
|
|
3520
3548
|
};
|
|
3521
|
-
var
|
|
3522
|
-
var
|
|
3523
|
-
var
|
|
3524
|
-
function
|
|
3549
|
+
var Qo = vr({ isDev: false, loadMessages: (e6) => Zo(e6, ``), loadDevMessages: (e6) => Zo(e6, `.dev`) });
|
|
3550
|
+
var $o = [{ path: `richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `richContent.nodes.galleryData.items.image.media.duration` }, { path: `richContent.nodes.galleryData.items.video.media.duration` }, { path: `richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `richContent.nodes.galleryData.options.item.ratio` }, { path: `richContent.nodes.imageData.image.duration` }, { path: `richContent.nodes.imageData.crop.x` }, { path: `richContent.nodes.imageData.crop.y` }, { path: `richContent.nodes.imageData.crop.width` }, { path: `richContent.nodes.imageData.crop.height` }, { path: `richContent.nodes.mapData.mapSettings.lat` }, { path: `richContent.nodes.mapData.mapSettings.lng` }, { path: `richContent.nodes.pollData.poll.image.duration` }, { path: `richContent.nodes.pollData.poll.options.image.duration` }, { path: `richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.nodes.appEmbedData.image.duration` }, { path: `richContent.nodes.videoData.video.duration` }, { path: `richContent.nodes.videoData.thumbnail.duration` }, { path: `richContent.nodes.audioData.audio.duration` }, { path: `richContent.nodes.audioData.coverImage.duration` }, { path: `richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `richContent.nodes.layoutData.background.gradient.centerX` }, { path: `richContent.nodes.layoutData.background.gradient.centerY` }, { path: `richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `richContent.nodes.shapeData.shape.duration` }, { path: `richContent.nodes.cardData.background.gradient.centerX` }, { path: `richContent.nodes.cardData.background.gradient.centerY` }, { path: `richContent.nodes.cardData.background.gradient.stops.position` }, { path: `richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `richContent.nodes.tocData.fontSize` }, { path: `richContent.nodes.tocData.itemSpacing` }, { path: `richContent.nodes.smartBlockCellData.shape.duration` }, { path: `richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3551
|
+
var es = [{ path: `richContent.metadata.createdTimestamp` }, { path: `richContent.metadata.updatedTimestamp` }];
|
|
3552
|
+
function ts(e6) {
|
|
3525
3553
|
return P(Object.assign(e6, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/blog-paywall-service`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/blog-paywall-service`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/blog-paywall-service`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/blog-paywall-service`, destPath: `` }], _: [{ srcPath: `/_api/blog-paywall-service`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/blog-paywall-service/v1/post-paywalls`, destPath: `/v1/post-paywalls` }] } }));
|
|
3526
3554
|
}
|
|
3527
|
-
var
|
|
3528
|
-
function
|
|
3555
|
+
var ns = `@wix/auto_sdk_blog_post-paywalls`;
|
|
3556
|
+
function rs(e6) {
|
|
3529
3557
|
function t2({ host: t3 }) {
|
|
3530
|
-
return { entityFqdn: `wix.blog.blog_paywall_service.v1.post_paywall`, method: `GET`, methodFqn: `wix.blog.blog_paywall_service.v1.PostPaywallService.GetPostPaywall`, packageName:
|
|
3558
|
+
return { entityFqdn: `wix.blog.blog_paywall_service.v1.post_paywall`, method: `GET`, methodFqn: `wix.blog.blog_paywall_service.v1.PostPaywallService.GetPostPaywall`, packageName: ns, migrationOptions: { optInTransformResponse: true }, url: ts({ protoPath: `/v1/post-paywalls/{postFqdn}/{postId}`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: F, paths: $o }, { transformFn: k, paths: es }]) };
|
|
3531
3559
|
}
|
|
3532
3560
|
return t2;
|
|
3533
3561
|
}
|
|
3534
|
-
async function
|
|
3535
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3562
|
+
async function is(e6, t2) {
|
|
3563
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = rs(D({ postFqdn: e6?.postFqdn, postId: e6?.postId, language: t2?.language }, []));
|
|
3536
3564
|
r2?.onSiteCall?.();
|
|
3537
3565
|
try {
|
|
3538
3566
|
let e7 = await n2.request(i2);
|
|
@@ -3542,29 +3570,29 @@ async function as(e6, t2) {
|
|
|
3542
3570
|
throw r2?.onError?.(e7), t3;
|
|
3543
3571
|
}
|
|
3544
3572
|
}
|
|
3545
|
-
function
|
|
3546
|
-
return (t2, n2) =>
|
|
3573
|
+
function as(e6) {
|
|
3574
|
+
return (t2, n2) => is(t2, n2, { httpClient: e6 });
|
|
3547
3575
|
}
|
|
3548
|
-
var
|
|
3549
|
-
function
|
|
3576
|
+
var os = M(as);
|
|
3577
|
+
function ss(e6) {
|
|
3550
3578
|
return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
|
|
3551
3579
|
}
|
|
3552
|
-
function
|
|
3580
|
+
function cs(e6) {
|
|
3553
3581
|
return Object.keys(e6).length === 1 && `$or` in e6 && Array.isArray(e6.$or);
|
|
3554
3582
|
}
|
|
3555
|
-
function
|
|
3583
|
+
function ls(e6) {
|
|
3556
3584
|
return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
|
|
3557
3585
|
}
|
|
3558
|
-
function
|
|
3559
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...
|
|
3586
|
+
function Y(e6, t2) {
|
|
3587
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...ss(e6) ? e6.$and : [e6], ...ss(t2) ? t2.$and : [t2]] };
|
|
3560
3588
|
}
|
|
3561
|
-
function
|
|
3562
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...
|
|
3589
|
+
function us(e6, t2) {
|
|
3590
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...cs(e6) ? e6.$or : [e6], ...cs(t2) ? t2.$or : [t2]] };
|
|
3563
3591
|
}
|
|
3564
|
-
function
|
|
3565
|
-
if (e6 !== void 0 && Object.keys(e6).length !== 0) return
|
|
3592
|
+
function ds(e6) {
|
|
3593
|
+
if (e6 !== void 0 && Object.keys(e6).length !== 0) return ls(e6) ? e6.$not : { $not: e6 };
|
|
3566
3594
|
}
|
|
3567
|
-
var
|
|
3595
|
+
var fs = class {
|
|
3568
3596
|
_items;
|
|
3569
3597
|
_fetchNextPage;
|
|
3570
3598
|
_fetchPrevPage;
|
|
@@ -3594,7 +3622,7 @@ var ps = class {
|
|
|
3594
3622
|
return await this._fetchPrevPage();
|
|
3595
3623
|
}
|
|
3596
3624
|
};
|
|
3597
|
-
var
|
|
3625
|
+
var ps = class extends fs {
|
|
3598
3626
|
_nextCursor;
|
|
3599
3627
|
_prevCursor;
|
|
3600
3628
|
cursors;
|
|
@@ -3608,7 +3636,7 @@ var ms = class extends ps {
|
|
|
3608
3636
|
return !!this._prevCursor;
|
|
3609
3637
|
}
|
|
3610
3638
|
};
|
|
3611
|
-
var
|
|
3639
|
+
var ms = class extends fs {
|
|
3612
3640
|
_totalCount;
|
|
3613
3641
|
_offset;
|
|
3614
3642
|
_tooManyToCount;
|
|
@@ -3631,76 +3659,76 @@ var hs = class extends ps {
|
|
|
3631
3659
|
return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
|
|
3632
3660
|
}
|
|
3633
3661
|
};
|
|
3634
|
-
function
|
|
3662
|
+
function hs(e6) {
|
|
3635
3663
|
let t2 = (n2) => ({ query: n2, async find() {
|
|
3636
3664
|
try {
|
|
3637
3665
|
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [Qe]: a2, [$e]: o2 } = e6.responseTransformer(i2);
|
|
3638
3666
|
if (e6.pagingMethod === `OFFSET`) {
|
|
3639
3667
|
let e7 = n2;
|
|
3640
|
-
return new
|
|
3668
|
+
return new ms({ 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 });
|
|
3641
3669
|
}
|
|
3642
3670
|
let s2 = n2.cursorPaging;
|
|
3643
|
-
return new
|
|
3671
|
+
return new ps({ 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 });
|
|
3644
3672
|
} catch (t3) {
|
|
3645
3673
|
throw e6.errorTransformer(t3);
|
|
3646
3674
|
}
|
|
3647
3675
|
}, skipTo(e7) {
|
|
3648
3676
|
return t2({ ...n2, cursorPaging: { cursor: e7, limit: n2.cursorPaging.limit } });
|
|
3649
3677
|
}, eq(r2, i2) {
|
|
3650
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3651
|
-
return t2({ ...n2, filter:
|
|
3678
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [X(e6.transformationPaths, r2)]: a2 };
|
|
3679
|
+
return t2({ ...n2, filter: Y(n2.filter, o2) });
|
|
3652
3680
|
}, ne(r2, i2) {
|
|
3653
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3654
|
-
return t2({ ...n2, filter:
|
|
3681
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [X(e6.transformationPaths, r2)]: { $ne: a2 } };
|
|
3682
|
+
return t2({ ...n2, filter: Y(n2.filter, o2) });
|
|
3655
3683
|
}, ge(r2, i2) {
|
|
3656
|
-
let a2 = { [
|
|
3657
|
-
return t2({ ...n2, filter:
|
|
3684
|
+
let a2 = { [X(e6.transformationPaths, r2)]: { $gte: i2 } };
|
|
3685
|
+
return t2({ ...n2, filter: Y(n2.filter, a2) });
|
|
3658
3686
|
}, gt(r2, i2) {
|
|
3659
|
-
let a2 = { [
|
|
3660
|
-
return t2({ ...n2, filter:
|
|
3687
|
+
let a2 = { [X(e6.transformationPaths, r2)]: { $gt: i2 } };
|
|
3688
|
+
return t2({ ...n2, filter: Y(n2.filter, a2) });
|
|
3661
3689
|
}, le(r2, i2) {
|
|
3662
|
-
let a2 = { [
|
|
3663
|
-
return t2({ ...n2, filter:
|
|
3690
|
+
let a2 = { [X(e6.transformationPaths, r2)]: { $lte: i2 } };
|
|
3691
|
+
return t2({ ...n2, filter: Y(n2.filter, a2) });
|
|
3664
3692
|
}, lt(r2, i2) {
|
|
3665
|
-
let a2 = { [
|
|
3666
|
-
return t2({ ...n2, filter:
|
|
3693
|
+
let a2 = { [X(e6.transformationPaths, r2)]: { $lt: i2 } };
|
|
3694
|
+
return t2({ ...n2, filter: Y(n2.filter, a2) });
|
|
3667
3695
|
}, isNotEmpty(e7) {
|
|
3668
3696
|
return this.ne(e7, null);
|
|
3669
3697
|
}, isEmpty(e7) {
|
|
3670
3698
|
return this.eq(e7, null);
|
|
3671
3699
|
}, startsWith(r2, i2) {
|
|
3672
|
-
let a2 = { [
|
|
3673
|
-
return t2({ ...n2, filter:
|
|
3700
|
+
let a2 = { [X(e6.transformationPaths, r2)]: { $startsWith: i2 } };
|
|
3701
|
+
return t2({ ...n2, filter: Y(n2.filter, a2) });
|
|
3674
3702
|
}, endsWith(r2, i2) {
|
|
3675
|
-
let a2 = { [
|
|
3676
|
-
return t2({ ...n2, filter:
|
|
3703
|
+
let a2 = { [X(e6.transformationPaths, r2)]: { $endsWith: i2 } };
|
|
3704
|
+
return t2({ ...n2, filter: Y(n2.filter, a2) });
|
|
3677
3705
|
}, contains(r2, i2) {
|
|
3678
|
-
let a2 = { [
|
|
3679
|
-
return t2({ ...n2, filter:
|
|
3706
|
+
let a2 = { [X(e6.transformationPaths, r2)]: { $contains: i2 } };
|
|
3707
|
+
return t2({ ...n2, filter: Y(n2.filter, a2) });
|
|
3680
3708
|
}, hasSome(r2, ...i2) {
|
|
3681
|
-
let a2 = { [
|
|
3682
|
-
return t2({ ...n2, filter:
|
|
3709
|
+
let a2 = { [X(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3710
|
+
return t2({ ...n2, filter: Y(n2.filter, a2) });
|
|
3683
3711
|
}, hasAll(r2, ...i2) {
|
|
3684
|
-
let a2 = { [
|
|
3685
|
-
return t2({ ...n2, filter:
|
|
3712
|
+
let a2 = { [X(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3713
|
+
return t2({ ...n2, filter: Y(n2.filter, a2) });
|
|
3686
3714
|
}, between(e7, t3, n3) {
|
|
3687
3715
|
return this.ge(e7, t3).lt(e7, n3);
|
|
3688
3716
|
}, in(r2, i2) {
|
|
3689
|
-
let a2 = { [
|
|
3690
|
-
return t2({ ...n2, filter:
|
|
3717
|
+
let a2 = { [X(e6.transformationPaths, r2)]: { $in: i2 } };
|
|
3718
|
+
return t2({ ...n2, filter: Y(n2.filter, a2) });
|
|
3691
3719
|
}, exists(r2, i2 = true) {
|
|
3692
|
-
let a2 = { [
|
|
3693
|
-
return t2({ ...n2, filter:
|
|
3720
|
+
let a2 = { [X(e6.transformationPaths, r2)]: { $exists: i2 } };
|
|
3721
|
+
return t2({ ...n2, filter: Y(n2.filter, a2) });
|
|
3694
3722
|
}, or(e7) {
|
|
3695
|
-
return t2({ ...n2, filter:
|
|
3723
|
+
return t2({ ...n2, filter: us(n2.filter, e7.query.filter) });
|
|
3696
3724
|
}, and(e7) {
|
|
3697
|
-
return t2({ ...n2, filter:
|
|
3725
|
+
return t2({ ...n2, filter: Y(n2.filter, e7.query.filter) });
|
|
3698
3726
|
}, not(e7) {
|
|
3699
|
-
return t2({ ...n2, filter:
|
|
3727
|
+
return t2({ ...n2, filter: ds(e7.query.filter) });
|
|
3700
3728
|
}, ascending(...r2) {
|
|
3701
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3729
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: X(e6.transformationPaths, t3), order: `ASC` }))] });
|
|
3702
3730
|
}, descending(...r2) {
|
|
3703
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3731
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: X(e6.transformationPaths, t3), order: `DESC` }))] });
|
|
3704
3732
|
}, skip(e7) {
|
|
3705
3733
|
return t2({ ...n2, paging: { offset: e7, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
|
|
3706
3734
|
}, limit(r2) {
|
|
@@ -3713,71 +3741,71 @@ function gs(e6) {
|
|
|
3713
3741
|
} });
|
|
3714
3742
|
return t2({ filter: {}, ...e6.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
|
|
3715
3743
|
}
|
|
3716
|
-
function
|
|
3744
|
+
function X(e6, t2) {
|
|
3717
3745
|
let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
|
|
3718
3746
|
return n2 ? t2.replace(n2, e6[n2]) : tt(t2, { ...e6, ...et });
|
|
3719
3747
|
}
|
|
3720
|
-
var
|
|
3721
|
-
var
|
|
3722
|
-
var
|
|
3723
|
-
var
|
|
3724
|
-
var
|
|
3725
|
-
var
|
|
3726
|
-
function
|
|
3748
|
+
var gs = `filter`;
|
|
3749
|
+
var _s = `sort`;
|
|
3750
|
+
var vs = `cursorPaging`;
|
|
3751
|
+
var ys = `paging`;
|
|
3752
|
+
var bs = [gs, _s, vs];
|
|
3753
|
+
var xs = [gs, _s, ys];
|
|
3754
|
+
function Ss(e6, t2) {
|
|
3727
3755
|
return !e6 || typeof e6 != `object` ? false : t2.some((t3) => e6.hasOwnProperty(t3));
|
|
3728
3756
|
}
|
|
3757
|
+
function Cs(e6) {
|
|
3758
|
+
return Ss(e6, bs);
|
|
3759
|
+
}
|
|
3729
3760
|
function ws(e6) {
|
|
3730
|
-
return
|
|
3761
|
+
return Ss(e6, xs);
|
|
3731
3762
|
}
|
|
3732
3763
|
function Ts(e6) {
|
|
3733
|
-
return Cs(e6, Ss);
|
|
3734
|
-
}
|
|
3735
|
-
function Es(e6) {
|
|
3736
3764
|
let { hasOptionsParameter: t2 } = e6;
|
|
3737
3765
|
return function(...n2) {
|
|
3738
|
-
return t2 ?
|
|
3766
|
+
return t2 ? Ds(n2, e6) : Es(n2, e6);
|
|
3739
3767
|
};
|
|
3740
3768
|
}
|
|
3741
|
-
function
|
|
3769
|
+
function Es(e6, t2) {
|
|
3742
3770
|
return e6.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e6[0]);
|
|
3743
3771
|
}
|
|
3744
|
-
function
|
|
3772
|
+
function Ds(e6, t2) {
|
|
3745
3773
|
switch (e6.length) {
|
|
3746
3774
|
case 0:
|
|
3747
3775
|
return t2.builderQueryFunction();
|
|
3748
3776
|
case 1:
|
|
3749
|
-
return
|
|
3777
|
+
return Cs(e6[0]) || ws(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
|
|
3750
3778
|
default:
|
|
3751
3779
|
return t2.typedQueryFunction(e6[0], e6[1]);
|
|
3752
3780
|
}
|
|
3753
3781
|
}
|
|
3754
|
-
var
|
|
3755
|
-
var
|
|
3756
|
-
function
|
|
3782
|
+
var Os = [{ path: `like.createdDate` }];
|
|
3783
|
+
var ks = [{ path: `likes.createdDate` }];
|
|
3784
|
+
function As(e6) {
|
|
3757
3785
|
return P(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/blog-like-service`, destPath: `` }], "api._api_base_domain_": [{ srcPath: `/blog-like-service`, destPath: `` }], "social-blog._base_domain_": [{ srcPath: `/_api/blog-like-service`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/blog-like-service`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/blog-like-service`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/blog/v1/likes`, destPath: `/v1/likes` }], "*.dev.wix-code.com": [{ srcPath: `/blog/v1/likes`, destPath: `/v1/likes` }] } }));
|
|
3758
3786
|
}
|
|
3759
|
-
var
|
|
3760
|
-
function
|
|
3787
|
+
var js = `@wix/auto_sdk_blog_likes`;
|
|
3788
|
+
function Ms(e6) {
|
|
3761
3789
|
function t2({ host: t3 }) {
|
|
3762
|
-
let n2 = A(e6, [{ transformFn: ot, paths:
|
|
3763
|
-
return { entityFqdn: `wix.blog.v1.like`, method: `POST`, methodFqn: `wix.blog.v1.LikeService.CreateLike`, packageName:
|
|
3790
|
+
let n2 = A(e6, [{ transformFn: ot, paths: Os }]);
|
|
3791
|
+
return { entityFqdn: `wix.blog.v1.like`, method: `POST`, methodFqn: `wix.blog.v1.LikeService.CreateLike`, packageName: js, migrationOptions: { optInTransformResponse: true }, url: As({ protoPath: `/v1/likes`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Os }]) };
|
|
3764
3792
|
}
|
|
3765
3793
|
return t2;
|
|
3766
3794
|
}
|
|
3767
|
-
function
|
|
3795
|
+
function Ns(e6) {
|
|
3768
3796
|
function t2({ host: t3 }) {
|
|
3769
|
-
return { entityFqdn: `wix.blog.v1.like`, method: `POST`, methodFqn: `wix.blog.v1.LikeService.QueryLikes`, packageName:
|
|
3797
|
+
return { entityFqdn: `wix.blog.v1.like`, method: `POST`, methodFqn: `wix.blog.v1.LikeService.QueryLikes`, packageName: js, migrationOptions: { optInTransformResponse: true }, url: As({ protoPath: `/v1/likes/query`, data: e6, host: t3 }), data: e6, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: ks }]) };
|
|
3770
3798
|
}
|
|
3771
3799
|
return t2;
|
|
3772
3800
|
}
|
|
3773
|
-
function
|
|
3801
|
+
function Ps(e6) {
|
|
3774
3802
|
function t2({ host: t3 }) {
|
|
3775
|
-
return { entityFqdn: `wix.blog.v1.like`, method: `DELETE`, methodFqn: `wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId`, packageName:
|
|
3803
|
+
return { entityFqdn: `wix.blog.v1.like`, method: `DELETE`, methodFqn: `wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId`, packageName: js, migrationOptions: { optInTransformResponse: true }, url: As({ protoPath: `/v1/likes/fqdn/{fqdn}/entity-id/{entityId}`, data: e6, host: t3 }), params: N(e6) };
|
|
3776
3804
|
}
|
|
3777
3805
|
return t2;
|
|
3778
3806
|
}
|
|
3779
|
-
async function
|
|
3780
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3807
|
+
async function Fs(e6) {
|
|
3808
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Ms(D({ like: e6?.like }));
|
|
3781
3809
|
n2?.onSiteCall?.();
|
|
3782
3810
|
try {
|
|
3783
3811
|
let e7 = await t2.request(r2);
|
|
@@ -3787,10 +3815,10 @@ async function Is(e6) {
|
|
|
3787
3815
|
throw n2?.onError?.(e7), t3;
|
|
3788
3816
|
}
|
|
3789
3817
|
}
|
|
3790
|
-
function
|
|
3818
|
+
function Is() {
|
|
3791
3819
|
let { httpClient: e6, sideEffects: t2 } = arguments[0];
|
|
3792
|
-
return
|
|
3793
|
-
let r2 =
|
|
3820
|
+
return hs({ func: async (n2) => {
|
|
3821
|
+
let r2 = Ns(n2);
|
|
3794
3822
|
t2?.onSiteCall?.();
|
|
3795
3823
|
try {
|
|
3796
3824
|
let n3 = await e6.request(r2);
|
|
@@ -3808,8 +3836,8 @@ function Ls() {
|
|
|
3808
3836
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3809
3837
|
}, pagingMethod: `CURSOR`, transformationPaths: {} });
|
|
3810
3838
|
}
|
|
3811
|
-
async function
|
|
3812
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3839
|
+
async function Ls(e6) {
|
|
3840
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Ns(D({ query: e6 }));
|
|
3813
3841
|
n2?.onSiteCall?.();
|
|
3814
3842
|
try {
|
|
3815
3843
|
let e7 = await t2.request(r2);
|
|
@@ -3819,8 +3847,8 @@ async function Rs(e6) {
|
|
|
3819
3847
|
throw n2?.onError?.(e7), t3;
|
|
3820
3848
|
}
|
|
3821
3849
|
}
|
|
3822
|
-
async function
|
|
3823
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3850
|
+
async function Rs(e6) {
|
|
3851
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Ps(D({ fqdn: e6?.fqdn, entityId: e6?.entityId }));
|
|
3824
3852
|
n2?.onSiteCall?.();
|
|
3825
3853
|
try {
|
|
3826
3854
|
let e7 = await t2.request(r2);
|
|
@@ -3830,66 +3858,66 @@ async function zs(e6) {
|
|
|
3830
3858
|
throw n2?.onError?.(e7), t3;
|
|
3831
3859
|
}
|
|
3832
3860
|
}
|
|
3861
|
+
function zs(e6) {
|
|
3862
|
+
return (t2) => Fs(t2, { httpClient: e6 });
|
|
3863
|
+
}
|
|
3833
3864
|
function Bs(e6) {
|
|
3834
|
-
return (
|
|
3865
|
+
return () => Is({ httpClient: e6 });
|
|
3835
3866
|
}
|
|
3836
3867
|
function Vs(e6) {
|
|
3837
|
-
return () => Ls({ httpClient: e6 });
|
|
3868
|
+
return (t2) => Ls(t2, { httpClient: e6 });
|
|
3838
3869
|
}
|
|
3839
3870
|
function Hs(e6) {
|
|
3840
3871
|
return (t2) => Rs(t2, { httpClient: e6 });
|
|
3841
3872
|
}
|
|
3842
3873
|
function Us(e6) {
|
|
3843
|
-
|
|
3844
|
-
}
|
|
3845
|
-
function Ws(e6) {
|
|
3846
|
-
let t2 = Es({ builderQueryFunction: () => Vs(e6)(), typedQueryFunction: (t3) => Hs(e6)(t3), hasOptionsParameter: false });
|
|
3874
|
+
let t2 = Ts({ builderQueryFunction: () => Bs(e6)(), typedQueryFunction: (t3) => Vs(e6)(t3), hasOptionsParameter: false });
|
|
3847
3875
|
function n2(e7) {
|
|
3848
3876
|
return t2(...arguments);
|
|
3849
3877
|
}
|
|
3850
3878
|
return n2;
|
|
3851
3879
|
}
|
|
3852
|
-
var
|
|
3880
|
+
var Ws = M(zs);
|
|
3881
|
+
var Gs = M(Hs);
|
|
3853
3882
|
var Ks = M(Us);
|
|
3854
|
-
|
|
3855
|
-
function Js(e6) {
|
|
3883
|
+
function qs(e6) {
|
|
3856
3884
|
if (!e6) return;
|
|
3857
3885
|
let t2 = ``;
|
|
3858
3886
|
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;
|
|
3859
3887
|
}
|
|
3860
|
-
function
|
|
3888
|
+
function Js(e6) {
|
|
3861
3889
|
if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
|
|
3862
3890
|
}
|
|
3863
|
-
var
|
|
3864
|
-
var
|
|
3865
|
-
function
|
|
3891
|
+
var Ys = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
|
|
3892
|
+
var Xs = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
|
|
3893
|
+
function Zs(e6) {
|
|
3866
3894
|
return P(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: `` }] } }));
|
|
3867
3895
|
}
|
|
3868
|
-
var
|
|
3869
|
-
function
|
|
3896
|
+
var Qs = `@wix/auto_sdk_blog_categories`;
|
|
3897
|
+
function $s(e6) {
|
|
3870
3898
|
function t2({ host: t3 }) {
|
|
3871
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName:
|
|
3899
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: Qs, migrationOptions: { optInTransformResponse: true }, url: Zs({ protoPath: `/v3/categories`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ys }, { transformFn: F, paths: Xs }]) };
|
|
3872
3900
|
}
|
|
3873
3901
|
return t2;
|
|
3874
3902
|
}
|
|
3875
|
-
var
|
|
3876
|
-
var
|
|
3877
|
-
async function
|
|
3878
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3903
|
+
var ec = [{ path: `categories.url` }, { path: `categories.translations.url` }];
|
|
3904
|
+
var tc = [{ path: `categories.coverImage` }];
|
|
3905
|
+
async function nc(e6) {
|
|
3906
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = $s(D({ paging: e6?.paging, fieldsets: e6?.fieldsets, language: e6?.language }));
|
|
3879
3907
|
n2?.onSiteCall?.();
|
|
3880
3908
|
try {
|
|
3881
3909
|
let e7 = await t2.request(r2);
|
|
3882
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3910
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Js, paths: ec }, { transformFn: qs, paths: tc }]));
|
|
3883
3911
|
} catch (e7) {
|
|
3884
3912
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3885
3913
|
throw n2?.onError?.(e7), t3;
|
|
3886
3914
|
}
|
|
3887
3915
|
}
|
|
3888
|
-
function
|
|
3889
|
-
return (t2) =>
|
|
3916
|
+
function rc(e6) {
|
|
3917
|
+
return (t2) => nc(t2, { httpClient: e6 });
|
|
3890
3918
|
}
|
|
3891
|
-
var
|
|
3892
|
-
function
|
|
3919
|
+
var ic = M(rc);
|
|
3920
|
+
function ac(e6) {
|
|
3893
3921
|
if (!e6) return;
|
|
3894
3922
|
let t2 = ``;
|
|
3895
3923
|
e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
|
|
@@ -3904,43 +3932,43 @@ function oc(e6) {
|
|
|
3904
3932
|
}
|
|
3905
3933
|
return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
|
|
3906
3934
|
}
|
|
3907
|
-
var
|
|
3908
|
-
var
|
|
3909
|
-
var lc = [{ 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` }];
|
|
3910
|
-
var
|
|
3911
|
-
function
|
|
3935
|
+
var oc = [{ 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` }];
|
|
3936
|
+
var sc = [{ path: `post.richContentCompressed` }];
|
|
3937
|
+
var cc = [{ 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` }];
|
|
3938
|
+
var lc = [{ path: `metrics.averageRating` }];
|
|
3939
|
+
function uc(e6) {
|
|
3912
3940
|
return P(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` }] } }));
|
|
3913
3941
|
}
|
|
3914
|
-
var
|
|
3915
|
-
function
|
|
3942
|
+
var dc = `@wix/auto_sdk_blog_posts`;
|
|
3943
|
+
function fc(e6) {
|
|
3916
3944
|
function t2({ host: t3 }) {
|
|
3917
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost`, packageName:
|
|
3945
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost`, packageName: dc, migrationOptions: { optInTransformResponse: true }, url: uc({ protoPath: `/v3/posts/{postId}`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: oc }, { transformFn: dn, paths: sc }, { transformFn: F, paths: cc }]) };
|
|
3918
3946
|
}
|
|
3919
3947
|
return t2;
|
|
3920
3948
|
}
|
|
3921
|
-
function
|
|
3949
|
+
function pc(e6) {
|
|
3922
3950
|
function t2({ host: t3 }) {
|
|
3923
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics`, packageName:
|
|
3951
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics`, packageName: dc, migrationOptions: { optInTransformResponse: true }, url: uc({ protoPath: `/v3/posts/{postId}/metrics`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: F, paths: lc }]) };
|
|
3924
3952
|
}
|
|
3925
3953
|
return t2;
|
|
3926
3954
|
}
|
|
3927
|
-
var
|
|
3928
|
-
var
|
|
3929
|
-
var
|
|
3930
|
-
var
|
|
3931
|
-
async function
|
|
3932
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3955
|
+
var mc = [{ path: `post.url` }, { path: `post.translations.url` }];
|
|
3956
|
+
var hc = [{ path: `post.heroImage` }, { path: `post.media.wixMedia.image` }];
|
|
3957
|
+
var gc = [{ path: `post.media.wixMedia.videoV2` }];
|
|
3958
|
+
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 || {});
|
|
3959
|
+
async function _c(e6, t2) {
|
|
3960
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = fc(D({ postId: e6, fieldsets: t2?.fieldsets }, []));
|
|
3933
3961
|
r2?.onSiteCall?.();
|
|
3934
3962
|
try {
|
|
3935
3963
|
let e7 = await n2.request(i2);
|
|
3936
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3964
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Js, paths: mc }, { transformFn: qs, paths: hc }, { transformFn: ac, paths: gc }]), [`post.richContent`, `post.rich_content`]);
|
|
3937
3965
|
} catch (e7) {
|
|
3938
3966
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { postId: `$[0]`, fieldsets: `$[1].fieldsets` }, singleArgumentUnchanged: false }, [`postId`, `options`]);
|
|
3939
3967
|
throw r2?.onError?.(e7), t3;
|
|
3940
3968
|
}
|
|
3941
3969
|
}
|
|
3942
|
-
async function
|
|
3943
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3970
|
+
async function vc(e6) {
|
|
3971
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = pc(D({ postId: e6 }, []));
|
|
3944
3972
|
n2?.onSiteCall?.();
|
|
3945
3973
|
try {
|
|
3946
3974
|
let e7 = await t2.request(r2);
|
|
@@ -3950,32 +3978,32 @@ async function yc(e6) {
|
|
|
3950
3978
|
throw n2?.onError?.(e7), t3;
|
|
3951
3979
|
}
|
|
3952
3980
|
}
|
|
3953
|
-
function
|
|
3954
|
-
return (t2, n2) =>
|
|
3981
|
+
function yc(e6) {
|
|
3982
|
+
return (t2, n2) => _c(t2, n2, { httpClient: e6 });
|
|
3955
3983
|
}
|
|
3956
|
-
function
|
|
3957
|
-
return (t2) =>
|
|
3984
|
+
function bc(e6) {
|
|
3985
|
+
return (t2) => vc(t2, { httpClient: e6 });
|
|
3958
3986
|
}
|
|
3987
|
+
var xc = M(yc);
|
|
3959
3988
|
var Sc = M(bc);
|
|
3960
|
-
var Cc =
|
|
3961
|
-
var wc = [{ path: `
|
|
3962
|
-
|
|
3963
|
-
function Ec(e6) {
|
|
3989
|
+
var Cc = [{ path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3990
|
+
var wc = [{ path: `tags.createdDate` }, { path: `tags.updatedDate` }];
|
|
3991
|
+
function Tc(e6) {
|
|
3964
3992
|
return P(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "www.wixapis.com": [{ srcPath: `/v3/tags`, destPath: `/v3/tags` }, { srcPath: `/blog/v3/tags`, destPath: `/v3/tags` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v2/tags`, destPath: `/v2/tags` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/tag`, destPath: `/v3/bulk/tag` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/tags`, destPath: `/v3/bulk/tags` }, { srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "bo._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "wixbo.ai": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "wix-bo.com": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "social-blog._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }] } }));
|
|
3965
3993
|
}
|
|
3966
|
-
var
|
|
3967
|
-
function
|
|
3994
|
+
var Ec = `@wix/auto_sdk_blog_tags`;
|
|
3995
|
+
function Dc(e6) {
|
|
3968
3996
|
function t2({ host: t3 }) {
|
|
3969
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3970
|
-
return { entityFqdn: `wix.blog.v3.tag`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.TagService.QueryTags`, packageName:
|
|
3997
|
+
let n2 = A(e6, [{ transformFn: un, paths: Cc }]);
|
|
3998
|
+
return { entityFqdn: `wix.blog.v3.tag`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.TagService.QueryTags`, packageName: Ec, migrationOptions: { optInTransformResponse: true }, url: Tc({ protoPath: `/v3/tags/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: wc }]) };
|
|
3971
3999
|
}
|
|
3972
4000
|
return t2;
|
|
3973
4001
|
}
|
|
3974
|
-
var
|
|
3975
|
-
function
|
|
4002
|
+
var Oc = [{ path: `tags.url` }];
|
|
4003
|
+
function kc(e6) {
|
|
3976
4004
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3977
|
-
return
|
|
3978
|
-
let i2 =
|
|
4005
|
+
return hs({ func: async (r2) => {
|
|
4006
|
+
let i2 = Dc({ ...r2, ...e6 ?? {} });
|
|
3979
4007
|
n2?.onSiteCall?.();
|
|
3980
4008
|
try {
|
|
3981
4009
|
let e7 = await t2.request(i2);
|
|
@@ -3987,57 +4015,57 @@ function Ac(e6) {
|
|
|
3987
4015
|
let n3 = [t3, e6];
|
|
3988
4016
|
return D({ ...n3?.[1], query: n3?.[0] });
|
|
3989
4017
|
}, responseTransformer: ({ data: e7 }) => {
|
|
3990
|
-
let t3 = O(A(e7, [{ transformFn:
|
|
4018
|
+
let t3 = O(A(e7, [{ transformFn: Js, paths: Oc }]));
|
|
3991
4019
|
return { items: t3?.tags, pagingMetadata: t3?.pagingMetadata };
|
|
3992
4020
|
}, errorTransformer: (e7) => {
|
|
3993
4021
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3994
4022
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
3995
4023
|
}
|
|
3996
|
-
async function
|
|
3997
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
4024
|
+
async function Ac(e6, t2) {
|
|
4025
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Dc(D({ query: e6, ...t2 }));
|
|
3998
4026
|
r2?.onSiteCall?.();
|
|
3999
4027
|
try {
|
|
4000
4028
|
let e7 = await n2.request(i2);
|
|
4001
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
4029
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Js, paths: Oc }]));
|
|
4002
4030
|
} catch (e7) {
|
|
4003
4031
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
4004
4032
|
throw r2?.onError?.(e7), t3;
|
|
4005
4033
|
}
|
|
4006
4034
|
}
|
|
4035
|
+
function jc(e6) {
|
|
4036
|
+
return (t2) => kc(t2, { httpClient: e6 });
|
|
4037
|
+
}
|
|
4007
4038
|
function Mc(e6) {
|
|
4008
|
-
return (t2) => Ac(t2, { httpClient: e6 });
|
|
4039
|
+
return (t2, n2) => Ac(t2, n2, { httpClient: e6 });
|
|
4009
4040
|
}
|
|
4010
4041
|
function Nc(e6) {
|
|
4011
|
-
|
|
4012
|
-
}
|
|
4013
|
-
function Pc(e6) {
|
|
4014
|
-
let t2 = Es({ builderQueryFunction: (t3) => Mc(e6)(t3), typedQueryFunction: (t3, n3) => Nc(e6)(t3, n3), hasOptionsParameter: true });
|
|
4042
|
+
let t2 = Ts({ builderQueryFunction: (t3) => jc(e6)(t3), typedQueryFunction: (t3, n3) => Mc(e6)(t3, n3), hasOptionsParameter: true });
|
|
4015
4043
|
function n2(e7, n3) {
|
|
4016
4044
|
return t2(...arguments);
|
|
4017
4045
|
}
|
|
4018
4046
|
return n2;
|
|
4019
4047
|
}
|
|
4020
|
-
var
|
|
4021
|
-
var
|
|
4022
|
-
var
|
|
4048
|
+
var Pc = M(Nc);
|
|
4049
|
+
var Fc = (e6) => O(A(e6, [{ transformFn: Js, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: qs, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: ac, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
|
|
4050
|
+
var Ic = `https://blog.wixsite.com/blog-demo-posts`;
|
|
4023
4051
|
M((e6) => async (t2) => {
|
|
4024
4052
|
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${N(t2)}`);
|
|
4025
4053
|
if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
|
|
4026
|
-
return
|
|
4054
|
+
return Fc(await n2.json()).filter((e7) => !e7.url?.startsWith(Ic));
|
|
4027
4055
|
});
|
|
4028
|
-
var
|
|
4029
|
-
function
|
|
4056
|
+
var Lc = [{ path: `member.createdDate` }, { path: `member.updatedDate` }, { path: `member.lastLoginDate` }];
|
|
4057
|
+
function Rc(e6) {
|
|
4030
4058
|
return P(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` }] } }));
|
|
4031
4059
|
}
|
|
4032
|
-
var
|
|
4033
|
-
function
|
|
4060
|
+
var zc = `@wix/auto_sdk_members_members`;
|
|
4061
|
+
function Bc(e6) {
|
|
4034
4062
|
function t2({ host: t3 }) {
|
|
4035
|
-
return { entityFqdn: `wix.members.v1.member`, method: `GET`, methodFqn: `com.wixpress.members.api.Members.GetMember`, packageName:
|
|
4063
|
+
return { entityFqdn: `wix.members.v1.member`, method: `GET`, methodFqn: `com.wixpress.members.api.Members.GetMember`, packageName: zc, migrationOptions: { optInTransformResponse: true }, url: Rc({ protoPath: `/v1/members/{id}`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Lc }]) };
|
|
4036
4064
|
}
|
|
4037
4065
|
return t2;
|
|
4038
4066
|
}
|
|
4039
|
-
async function
|
|
4040
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
4067
|
+
async function Vc(e6, t2) {
|
|
4068
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Bc(D({ id: e6, fieldsets: t2?.fieldsets }));
|
|
4041
4069
|
r2?.onSiteCall?.();
|
|
4042
4070
|
try {
|
|
4043
4071
|
let e7 = await n2.request(i2);
|
|
@@ -4047,70 +4075,70 @@ async function Hc(e6, t2) {
|
|
|
4047
4075
|
throw r2?.onError?.(e7), t3;
|
|
4048
4076
|
}
|
|
4049
4077
|
}
|
|
4050
|
-
function
|
|
4051
|
-
return (t2, n2) =>
|
|
4078
|
+
function Hc(e6) {
|
|
4079
|
+
return (t2, n2) => Vc(t2, n2, { httpClient: e6 });
|
|
4052
4080
|
}
|
|
4053
|
-
var
|
|
4054
|
-
var
|
|
4081
|
+
var Uc = M(Hc);
|
|
4082
|
+
var Wc = async (e6) => {
|
|
4055
4083
|
try {
|
|
4056
|
-
return await
|
|
4084
|
+
return await Uc(e6, { fieldsets: [`PUBLIC`] });
|
|
4057
4085
|
} catch {
|
|
4058
4086
|
return;
|
|
4059
4087
|
}
|
|
4060
4088
|
};
|
|
4061
|
-
var
|
|
4062
|
-
var
|
|
4063
|
-
let n2 = await
|
|
4089
|
+
var Gc = `wix.blog.v4.post`;
|
|
4090
|
+
var Kc = async (e6, t2) => {
|
|
4091
|
+
let n2 = await os({ postFqdn: Gc, postId: e6 }, t2 ? { language: t2 } : void 0);
|
|
4064
4092
|
if (typeof n2 != `object` || !n2) throw Error(`No Wix SDK context for the post paywall read`);
|
|
4065
4093
|
let { richContent: r2 } = n2;
|
|
4066
4094
|
return D(r2);
|
|
4067
4095
|
};
|
|
4068
|
-
var
|
|
4069
|
-
var
|
|
4070
|
-
var
|
|
4096
|
+
var qc = `1522827f-c56c-a5c9-2ac9-00f9e6ae12d3`;
|
|
4097
|
+
var Jc = `membership_plan_picker_tpa`;
|
|
4098
|
+
var Yc = (e6) => {
|
|
4071
4099
|
let t2;
|
|
4072
4100
|
try {
|
|
4073
|
-
t2 = e6.appSectionRelativeUrl(
|
|
4101
|
+
t2 = e6.appSectionRelativeUrl(qc, Jc);
|
|
4074
4102
|
} catch {
|
|
4075
4103
|
return;
|
|
4076
4104
|
}
|
|
4077
4105
|
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${t2.replace(/^\/+/, ``)}`;
|
|
4078
4106
|
};
|
|
4079
|
-
var
|
|
4080
|
-
let n2 = e7.nodes ? { ...e7, nodes:
|
|
4107
|
+
var Xc = (e6, t2) => e6.flatMap((e7) => {
|
|
4108
|
+
let n2 = e7.nodes ? { ...e7, nodes: Xc(e7.nodes, t2) } : e7;
|
|
4081
4109
|
return e7.type !== `BUTTON` || e7.buttonData?.type !== `ACTION` ? [n2] : t2 ? [{ ...n2, buttonData: { ...e7.buttonData, type: `LINK`, link: { url: t2, target: `SELF`, rel: { nofollow: true } } } }] : [];
|
|
4082
4110
|
});
|
|
4083
|
-
var
|
|
4111
|
+
var Zc = (e6, t2, n2) => {
|
|
4084
4112
|
if (!t2?.nodes?.length) return e6;
|
|
4085
|
-
let r2 =
|
|
4113
|
+
let r2 = Xc(t2.nodes.map((e7) => e7.layoutData ? { ...e7, layoutData: { ...e7.layoutData, banner: void 0 } } : e7), n2);
|
|
4086
4114
|
return { ...e6, nodes: [...e6.nodes ?? [], ...r2] };
|
|
4087
4115
|
};
|
|
4088
|
-
var
|
|
4089
|
-
var
|
|
4090
|
-
var tl = [{ 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` }];
|
|
4091
|
-
var
|
|
4092
|
-
function
|
|
4116
|
+
var Qc = [{ 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` }];
|
|
4117
|
+
var $c = [{ path: `posts.richContentCompressed` }];
|
|
4118
|
+
var el = [{ 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` }];
|
|
4119
|
+
var tl = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
4120
|
+
function nl(e6) {
|
|
4093
4121
|
return P(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` }] } }));
|
|
4094
4122
|
}
|
|
4095
|
-
var
|
|
4096
|
-
function
|
|
4123
|
+
var rl = `@wix/auto_sdk_blog_posts`;
|
|
4124
|
+
function il(e6) {
|
|
4097
4125
|
function t2({ host: t3 }) {
|
|
4098
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
4099
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
4126
|
+
let n2 = A(e6, [{ transformFn: un, paths: tl }]);
|
|
4127
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: rl, migrationOptions: { optInTransformResponse: true }, url: nl({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Qc }, { transformFn: dn, paths: $c }, { transformFn: F, paths: el }]) };
|
|
4100
4128
|
}
|
|
4101
4129
|
return t2;
|
|
4102
4130
|
}
|
|
4103
|
-
function
|
|
4104
|
-
let e6 =
|
|
4131
|
+
function al() {
|
|
4132
|
+
let e6 = il({});
|
|
4105
4133
|
return { getUrl: (t2) => {
|
|
4106
4134
|
let { url: n2 } = e6(t2);
|
|
4107
4135
|
return n2;
|
|
4108
4136
|
}, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
|
|
4109
4137
|
}
|
|
4110
|
-
var
|
|
4111
|
-
var
|
|
4112
|
-
var
|
|
4113
|
-
let { data: n2 } = await e6.request(
|
|
4138
|
+
var ol = al();
|
|
4139
|
+
var sl = (e6) => (t2) => ({ method: `POST`, url: ol.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
|
|
4140
|
+
var cl = M((e6) => async (t2) => {
|
|
4141
|
+
let { data: n2 } = await e6.request(sl(t2)), r2 = {};
|
|
4114
4142
|
for (let e7 of n2.posts ?? []) {
|
|
4115
4143
|
let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
|
|
4116
4144
|
if (!t3 || !n3?.length) continue;
|
|
@@ -4119,125 +4147,125 @@ var ll = M((e6) => async (t2) => {
|
|
|
4119
4147
|
}
|
|
4120
4148
|
return r2;
|
|
4121
4149
|
});
|
|
4122
|
-
var
|
|
4150
|
+
var ll = async (e6) => {
|
|
4123
4151
|
if (e6.length === 0) return {};
|
|
4124
4152
|
try {
|
|
4125
|
-
return await
|
|
4153
|
+
return await cl(e6);
|
|
4126
4154
|
} catch {
|
|
4127
4155
|
return {};
|
|
4128
4156
|
}
|
|
4129
4157
|
};
|
|
4130
|
-
var
|
|
4158
|
+
var ul = class extends Error {
|
|
4131
4159
|
constructor(e6, t2) {
|
|
4132
4160
|
super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
|
|
4133
4161
|
}
|
|
4134
4162
|
};
|
|
4135
|
-
var
|
|
4163
|
+
var dl = (e6, t2, n2) => {
|
|
4136
4164
|
let r2, i2 = new Promise((e7, i3) => {
|
|
4137
|
-
r2 = setTimeout(() => i3(new
|
|
4165
|
+
r2 = setTimeout(() => i3(new ul(n2, t2)), t2);
|
|
4138
4166
|
});
|
|
4139
4167
|
return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
|
|
4140
4168
|
};
|
|
4141
|
-
|
|
4142
|
-
var
|
|
4143
|
-
|
|
4144
|
-
var
|
|
4169
|
+
Z.RICH_CONTENT, Z.SEO, Z.URL, Z.CONTENT_TEXT;
|
|
4170
|
+
var fl = [Z.RICH_CONTENT, Z.URL];
|
|
4171
|
+
Z.URL, Z.METRICS;
|
|
4172
|
+
var pl = (e6) => {
|
|
4145
4173
|
let { status: t2, details: n2 } = e6 ?? {};
|
|
4146
4174
|
return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
|
|
4147
4175
|
};
|
|
4148
|
-
var
|
|
4149
|
-
if (t2 && !
|
|
4176
|
+
var ml = (e6, t2) => {
|
|
4177
|
+
if (t2 && !pl(e6)) throw e6;
|
|
4150
4178
|
};
|
|
4151
|
-
var
|
|
4152
|
-
var
|
|
4179
|
+
var hl = (e6) => ll(e6.filter((e7) => e7.media?.wixMedia?.videoV2).map(({ _id: e7 }) => e7).filter((e7) => !!e7));
|
|
4180
|
+
var gl = async (e6) => {
|
|
4153
4181
|
try {
|
|
4154
|
-
let { metrics: t2 } = await
|
|
4182
|
+
let { metrics: t2 } = await Sc(e6);
|
|
4155
4183
|
return t2;
|
|
4156
4184
|
} catch {
|
|
4157
4185
|
return;
|
|
4158
4186
|
}
|
|
4159
4187
|
};
|
|
4160
|
-
var
|
|
4161
|
-
var
|
|
4188
|
+
var _l = 100;
|
|
4189
|
+
var vl = async () => {
|
|
4162
4190
|
try {
|
|
4163
|
-
let { categories: e6 } = await
|
|
4191
|
+
let { categories: e6 } = await ic({ paging: { limit: _l } });
|
|
4164
4192
|
return e6 ?? [];
|
|
4165
4193
|
} catch {
|
|
4166
4194
|
return [];
|
|
4167
4195
|
}
|
|
4168
4196
|
};
|
|
4169
|
-
var
|
|
4197
|
+
var yl = (e6, t2) => {
|
|
4170
4198
|
let { categoryIds: n2 } = e6 ?? {};
|
|
4171
4199
|
if (!n2?.length) return [];
|
|
4172
4200
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4173
4201
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4174
4202
|
};
|
|
4175
|
-
var
|
|
4176
|
-
var
|
|
4203
|
+
var bl = 30;
|
|
4204
|
+
var xl = async (e6) => {
|
|
4177
4205
|
if (!e6?.length) return [];
|
|
4178
4206
|
try {
|
|
4179
|
-
let { items: t2 } = await
|
|
4207
|
+
let { items: t2 } = await Pc().in(`_id`, e6).limit(bl).find();
|
|
4180
4208
|
return t2 ?? [];
|
|
4181
4209
|
} catch {
|
|
4182
4210
|
return [];
|
|
4183
4211
|
}
|
|
4184
4212
|
};
|
|
4185
|
-
var
|
|
4213
|
+
var Sl = (e6, t2) => {
|
|
4186
4214
|
let { tagIds: n2 } = e6 ?? {};
|
|
4187
4215
|
if (!n2?.length) return [];
|
|
4188
4216
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4189
4217
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4190
4218
|
};
|
|
4219
|
+
var Cl = 1e3;
|
|
4191
4220
|
var wl = 1e3;
|
|
4192
|
-
var Tl =
|
|
4193
|
-
var El = async (e6, t2 = false) => {
|
|
4221
|
+
var Tl = async (e6, t2 = false) => {
|
|
4194
4222
|
try {
|
|
4195
|
-
return (await
|
|
4223
|
+
return (await xc(e6, { fieldsets: fl })).post;
|
|
4196
4224
|
} catch (e7) {
|
|
4197
|
-
|
|
4225
|
+
ml(e7, t2);
|
|
4198
4226
|
return;
|
|
4199
4227
|
}
|
|
4200
4228
|
};
|
|
4201
|
-
var
|
|
4202
|
-
let n2 =
|
|
4203
|
-
return
|
|
4229
|
+
var El = async (e6, t2 = false) => {
|
|
4230
|
+
let n2 = vl();
|
|
4231
|
+
return Dl(await Tl(e6, t2), n2);
|
|
4204
4232
|
};
|
|
4205
|
-
var
|
|
4206
|
-
let { _id: n2, memberId: r2, tagIds: i2, preview: a2 } = e6 ?? {}, [o2, s2, c2, l2, u2, d2] = await Promise.all([r2 ?
|
|
4207
|
-
return { post: e6, author: o2, metrics: s2, categories:
|
|
4233
|
+
var Dl = async (e6, t2) => {
|
|
4234
|
+
let { _id: n2, memberId: r2, tagIds: i2, preview: a2 } = e6 ?? {}, [o2, s2, c2, l2, u2, d2] = await Promise.all([r2 ? Wc(r2) : void 0, n2 ? gl(n2) : void 0, t2, xl(i2), a2 && n2 ? dl(Kc(n2, e6?.language ?? void 0), Cl, `post-paywall`).catch(() => void 0) : void 0, dl(hl(e6 ? [e6] : []), wl, `post-video`).catch(() => ({}))]), f2 = n2 ? d2[n2] : void 0;
|
|
4235
|
+
return { post: e6, author: o2, metrics: s2, categories: yl(e6, c2), tags: Sl(e6, l2), ...u2 && { paywall: u2 }, ...f2 && { videoSources: f2 } };
|
|
4208
4236
|
};
|
|
4209
|
-
var
|
|
4237
|
+
var Ol = (e6) => {
|
|
4210
4238
|
let { _id: t2, categoryIds: n2, relatedPostIds: r2 } = e6 ?? {};
|
|
4211
4239
|
return { currentPostId: t2 ?? void 0, categoryIds: n2, relatedPostIds: r2 };
|
|
4212
4240
|
};
|
|
4213
|
-
var
|
|
4214
|
-
var
|
|
4241
|
+
var kl = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
|
|
4242
|
+
var Al = (e6) => {
|
|
4215
4243
|
try {
|
|
4216
4244
|
return e6.getMonitoringClient?.() ?? null;
|
|
4217
4245
|
} catch {
|
|
4218
4246
|
return null;
|
|
4219
4247
|
}
|
|
4220
4248
|
};
|
|
4221
|
-
var
|
|
4222
|
-
function
|
|
4223
|
-
let o2 =
|
|
4249
|
+
var jl = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
|
|
4250
|
+
function Ml(e6, t2, { feature: n2, action: r2, level: i2 = `error`, contexts: a2 }) {
|
|
4251
|
+
let o2 = jl(e6, `captureException`);
|
|
4224
4252
|
if (!o2) return;
|
|
4225
4253
|
let s2 = t2 instanceof Error ? t2 : Error(String(t2));
|
|
4226
4254
|
o2.captureException(s2, { level: i2, tags: { feature: n2, action: r2 }, ...a2 ? { contexts: a2 } : {} });
|
|
4227
4255
|
}
|
|
4228
|
-
function
|
|
4229
|
-
let a2 =
|
|
4256
|
+
function Nl(e6, t2, { feature: n2, tags: r2 }, i2) {
|
|
4257
|
+
let a2 = jl(e6, `startSpanManual`);
|
|
4230
4258
|
if (!a2) return i2;
|
|
4231
4259
|
let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
|
|
4232
4260
|
return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
|
|
4233
4261
|
}
|
|
4234
|
-
var
|
|
4262
|
+
var Pl = class extends import_react.Component {
|
|
4235
4263
|
state = { error: void 0 };
|
|
4236
4264
|
static getDerivedStateFromError(e6) {
|
|
4237
4265
|
return { error: e6 ?? Error(`Unknown render error`) };
|
|
4238
4266
|
}
|
|
4239
4267
|
componentDidCatch(e6, t2) {
|
|
4240
|
-
|
|
4268
|
+
Ml(this.props.monitoringClient, e6, { feature: this.props.feature, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
|
|
4241
4269
|
}
|
|
4242
4270
|
render() {
|
|
4243
4271
|
if (this.state.error === void 0) return this.props.children;
|
|
@@ -4245,64 +4273,64 @@ var Fl = class extends import_react.Component {
|
|
|
4245
4273
|
return this.props.fallback;
|
|
4246
4274
|
}
|
|
4247
4275
|
};
|
|
4248
|
-
var
|
|
4249
|
-
var
|
|
4276
|
+
var Fl = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
|
|
4277
|
+
var Il = (e6) => {
|
|
4250
4278
|
if (e6 && typeof e6 == `object`) return (typeof e6.$eq == `string` ? e6.$eq : Array.isArray(e6.$in) ? e6.$in.find((e7) => typeof e7 == `string` && e7.trim() !== ``) : void 0)?.trim() || void 0;
|
|
4251
4279
|
};
|
|
4252
|
-
var
|
|
4253
|
-
var
|
|
4254
|
-
var
|
|
4280
|
+
var Ll = `postId`;
|
|
4281
|
+
var Rl = (e6) => Il(e6?.[Ll]);
|
|
4282
|
+
var zl = (e6) => {
|
|
4255
4283
|
let t2;
|
|
4256
4284
|
try {
|
|
4257
|
-
t2 = (0, import_services_manager_react.useService)(
|
|
4285
|
+
t2 = (0, import_services_manager_react.useService)(Xn);
|
|
4258
4286
|
} catch {
|
|
4259
4287
|
return;
|
|
4260
4288
|
}
|
|
4261
|
-
return
|
|
4289
|
+
return lr(t2, e6);
|
|
4262
4290
|
};
|
|
4263
|
-
var
|
|
4264
|
-
function
|
|
4291
|
+
var Bl = 1e4;
|
|
4292
|
+
function Vl(e6) {
|
|
4265
4293
|
let [t2, n2] = (0, import_react.useState)(void 0);
|
|
4266
4294
|
return (0, import_react.useEffect)(() => {
|
|
4267
4295
|
let t3 = Date.now();
|
|
4268
|
-
t3 - e6 >
|
|
4296
|
+
t3 - e6 > Bl && (0, import_react.startTransition)(() => n2(t3));
|
|
4269
4297
|
}, []), t2 ?? e6;
|
|
4270
4298
|
}
|
|
4271
|
-
var
|
|
4272
|
-
var
|
|
4273
|
-
await
|
|
4299
|
+
var Hl = `wix.blog.v3.post`;
|
|
4300
|
+
var Ul = async (e6) => {
|
|
4301
|
+
await Ws({ like: { entityId: e6, fqdn: Hl } });
|
|
4274
4302
|
};
|
|
4275
|
-
var
|
|
4276
|
-
await
|
|
4303
|
+
var Wl = async (e6) => {
|
|
4304
|
+
await Gs({ fqdn: Hl, entityId: e6 });
|
|
4277
4305
|
};
|
|
4278
|
-
var
|
|
4279
|
-
var
|
|
4280
|
-
let [t2, n2] = await Promise.allSettled([
|
|
4281
|
-
return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount:
|
|
4306
|
+
var Gl = (e6) => typeof e6 == `number` ? e6 : void 0;
|
|
4307
|
+
var Kl = async (e6) => {
|
|
4308
|
+
let [t2, n2] = await Promise.allSettled([Ks().eq(`fqdn`, Hl).eq(`entityId`, e6).limit(1).find(), Sc(e6)]), r2 = n2.status === `fulfilled` ? n2.value.metrics : void 0;
|
|
4309
|
+
return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount: Gl(r2?.likes), viewCount: Gl(r2?.views), commentCount: Gl(r2?.comments) };
|
|
4282
4310
|
};
|
|
4283
|
-
var
|
|
4284
|
-
var
|
|
4311
|
+
var ql = I(`@wix/site-service-editor-context`);
|
|
4312
|
+
var Jl = () => {
|
|
4285
4313
|
try {
|
|
4286
|
-
return !!(0, import_services_manager_react.useService)(
|
|
4314
|
+
return !!(0, import_services_manager_react.useService)(ql).previewMode;
|
|
4287
4315
|
} catch {
|
|
4288
4316
|
return false;
|
|
4289
4317
|
}
|
|
4290
4318
|
};
|
|
4291
|
-
var
|
|
4292
|
-
var
|
|
4293
|
-
var
|
|
4319
|
+
var Yl = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
|
|
4320
|
+
var Xl = `wix-blog:post-like-toggled`;
|
|
4321
|
+
var Zl = () => {
|
|
4294
4322
|
let e6 = window;
|
|
4295
|
-
return e6[
|
|
4323
|
+
return e6[Xl] ??= /* @__PURE__ */ new Map();
|
|
4296
4324
|
};
|
|
4297
|
-
var
|
|
4298
|
-
|
|
4325
|
+
var Ql = (e6) => {
|
|
4326
|
+
Zl().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(Xl, { detail: e6 }));
|
|
4299
4327
|
};
|
|
4300
|
-
var
|
|
4301
|
-
var
|
|
4302
|
-
let i2 =
|
|
4328
|
+
var $l = (e6, t2) => ({ isLiked: e6.liked, likeCount: Math.max(0, (e6.freshLikeCount ?? t2) + Number(e6.liked) - Number(e6.baselineLiked)), isLikeCountLoaded: e6.isLikeCountLoaded, viewCount: e6.viewCount, commentCount: e6.commentCount });
|
|
4329
|
+
var eu = (e6, t2, n2 = false, r2) => {
|
|
4330
|
+
let i2 = Jl() || n2, [a2, c2] = (0, import_react.useState)(Yl), p2 = (0, import_react.useRef)(Yl), m2 = (0, import_react.useRef)(t2), h2 = (0, import_react.useRef)(/* @__PURE__ */ new Set()), g2 = (0, import_react.useRef)(false), _2 = (0, import_react.useRef)(false), v2 = (0, import_react.useRef)(void 0), y2 = Jn(), [b2, x2] = (0, import_react.useState)(0);
|
|
4303
4331
|
(0, import_react.useEffect)(() => {
|
|
4304
4332
|
let e7 = y2?.addMemberLoginListener?.(() => {
|
|
4305
|
-
|
|
4333
|
+
Zl().clear(), x2((e8) => e8 + 1);
|
|
4306
4334
|
});
|
|
4307
4335
|
return () => {
|
|
4308
4336
|
e7 !== void 0 && y2?.removeMemberLoginListener?.(e7);
|
|
@@ -4311,21 +4339,21 @@ var tu = (e6, t2, n2 = false, r2) => {
|
|
|
4311
4339
|
let S2 = (0, import_react.useCallback)((e7) => {
|
|
4312
4340
|
let t3 = p2.current, n3 = { ...t3, ...e7 };
|
|
4313
4341
|
Object.keys(n3).every((e8) => n3[e8] === t3[e8]) || (p2.current = n3, h2.current.forEach((e8) => e8()), (0, import_react.startTransition)(() => c2(n3)));
|
|
4314
|
-
}, []), C2 = (0, import_react.useMemo)(() => ({ get: () =>
|
|
4342
|
+
}, []), C2 = (0, import_react.useMemo)(() => ({ get: () => $l(p2.current, m2.current), subscribe: (e7) => (h2.current.add(e7), () => {
|
|
4315
4343
|
h2.current.delete(e7);
|
|
4316
4344
|
}) }), []);
|
|
4317
4345
|
(0, import_react.useEffect)(() => {
|
|
4318
4346
|
m2.current !== t2 && (m2.current = t2, h2.current.forEach((e7) => e7()));
|
|
4319
4347
|
}, [t2]), (0, import_react.useEffect)(() => {
|
|
4320
|
-
if (v2.current !== e6 && (v2.current = e6, S2(
|
|
4348
|
+
if (v2.current !== e6 && (v2.current = e6, S2(Yl)), _2.current = false, !e6 || i2) {
|
|
4321
4349
|
S2({ isLikeCountLoaded: true });
|
|
4322
4350
|
return;
|
|
4323
4351
|
}
|
|
4324
4352
|
let t3 = false;
|
|
4325
|
-
return
|
|
4353
|
+
return Kl(e6).then(({ liked: e7, likeCount: n3, viewCount: r3, commentCount: i3 }) => {
|
|
4326
4354
|
t3 || S2({ isLikeCountLoaded: true, viewCount: r3, commentCount: i3, baselineLiked: e7, freshLikeCount: n3, ...!_2.current && { liked: e7 } });
|
|
4327
4355
|
}).catch((n3) => {
|
|
4328
|
-
t3 || S2({ isLikeCountLoaded: true }),
|
|
4356
|
+
t3 || S2({ isLikeCountLoaded: true }), Ml(r2, n3, { feature: kl.likes, action: `read-like-state`, level: `warning`, contexts: { likes: { postId: e6 } } });
|
|
4329
4357
|
}), () => {
|
|
4330
4358
|
t3 = true;
|
|
4331
4359
|
};
|
|
@@ -4333,216 +4361,216 @@ var tu = (e6, t2, n2 = false, r2) => {
|
|
|
4333
4361
|
if (!e6) return;
|
|
4334
4362
|
let t3 = (e7) => {
|
|
4335
4363
|
_2.current = true, S2({ liked: e7 });
|
|
4336
|
-
}, n3 =
|
|
4364
|
+
}, n3 = Zl().get(e6);
|
|
4337
4365
|
n3 !== void 0 && t3(n3);
|
|
4338
4366
|
let r3 = (n4) => {
|
|
4339
4367
|
let { detail: r4 } = n4;
|
|
4340
4368
|
r4.postId === e6 && t3(r4.liked);
|
|
4341
4369
|
};
|
|
4342
|
-
return window.addEventListener(
|
|
4370
|
+
return window.addEventListener(Xl, r3), () => window.removeEventListener(Xl, r3);
|
|
4343
4371
|
}, [e6, S2]);
|
|
4344
4372
|
let ee2 = (0, import_react.useCallback)(async (t3) => {
|
|
4345
4373
|
if (!e6 || g2.current) return;
|
|
4346
4374
|
_2.current = true;
|
|
4347
4375
|
let n3 = !p2.current.liked;
|
|
4348
|
-
if (S2({ liked: n3 }),
|
|
4376
|
+
if (S2({ liked: n3 }), Ql({ postId: e6, liked: n3 }), !i2) {
|
|
4349
4377
|
g2.current = true;
|
|
4350
4378
|
try {
|
|
4351
|
-
await (n3 ?
|
|
4379
|
+
await (n3 ? Ul(e6) : Wl(e6));
|
|
4352
4380
|
} catch (t4) {
|
|
4353
|
-
S2({ liked: !n3 }),
|
|
4381
|
+
S2({ liked: !n3 }), Ql({ postId: e6, liked: !n3 }), Ml(r2, t4, { feature: kl.likes, action: n3 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
|
|
4354
4382
|
} finally {
|
|
4355
4383
|
g2.current = false;
|
|
4356
4384
|
}
|
|
4357
4385
|
}
|
|
4358
4386
|
}, [e6, i2, r2, S2]);
|
|
4359
|
-
return {
|
|
4387
|
+
return { ...$l(a2, t2), toggleLike: ee2, liveLikes: C2 };
|
|
4360
4388
|
};
|
|
4361
|
-
var
|
|
4389
|
+
var tu = () => {
|
|
4362
4390
|
try {
|
|
4363
|
-
let { locale: e6, language: t2 } = (0, import_services_manager_react.useService)(
|
|
4391
|
+
let { locale: e6, language: t2 } = (0, import_services_manager_react.useService)(bo);
|
|
4364
4392
|
return e6 || t2;
|
|
4365
4393
|
} catch {
|
|
4366
4394
|
return;
|
|
4367
4395
|
}
|
|
4368
4396
|
};
|
|
4369
|
-
var
|
|
4397
|
+
var nu = () => {
|
|
4370
4398
|
try {
|
|
4371
|
-
return
|
|
4399
|
+
return Yc((0, import_services_manager_react.useService)(Xn));
|
|
4372
4400
|
} catch {
|
|
4373
4401
|
return;
|
|
4374
4402
|
}
|
|
4375
4403
|
};
|
|
4376
|
-
var
|
|
4377
|
-
var
|
|
4378
|
-
var
|
|
4379
|
-
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted:
|
|
4380
|
-
return { timeToRead: (t3) => e6(
|
|
4404
|
+
var ru = (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);
|
|
4405
|
+
var Q = { 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` };
|
|
4406
|
+
var iu = (e6, t2) => {
|
|
4407
|
+
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: ru(r2, `full`, t2) });
|
|
4408
|
+
return { timeToRead: (t3) => e6(Q.timeToRead, { count: t3 }), viewCount: n2(Q.viewCount), commentCount: n2(Q.commentCount), likeCount: n2(Q.likeCount), noPostsEmptyState: () => ({ title: e6(Q.noPostsTitle), description: e6(Q.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6(Q.noRelatedPostsTitle), description: e6(Q.noRelatedPostsDescription) }), canvas: { postTitle: () => e6(Q.canvasPostTitle), authorName: () => e6(Q.canvasAuthorName), excerpt: () => e6(Q.canvasExcerpt), content: () => e6(Q.canvasContent), category: () => e6(Q.canvasCategory), categoryNumbered: (t3) => e6(Q.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6(Q.canvasTagNumbered, { number: t3 }), coverAlt: () => e6(Q.canvasCoverAlt), authorPhotoAlt: () => e6(Q.canvasAuthorPhotoAlt) } };
|
|
4381
4409
|
};
|
|
4382
|
-
var
|
|
4383
|
-
var
|
|
4384
|
-
var
|
|
4385
|
-
var
|
|
4410
|
+
var au = (0, import_react.createContext)({ isEditor: false, isPreview: false });
|
|
4411
|
+
var ou = () => (0, import_react.useContext)(au);
|
|
4412
|
+
var su = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
|
|
4413
|
+
var cu = () => {
|
|
4386
4414
|
try {
|
|
4387
|
-
let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(
|
|
4415
|
+
let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(Un);
|
|
4388
4416
|
return e6 || t2;
|
|
4389
4417
|
} catch {
|
|
4390
4418
|
return false;
|
|
4391
4419
|
}
|
|
4392
4420
|
};
|
|
4393
|
-
var
|
|
4394
|
-
let e6 =
|
|
4395
|
-
return
|
|
4421
|
+
var lu = () => {
|
|
4422
|
+
let e6 = cu();
|
|
4423
|
+
return su(ou()) && !e6;
|
|
4396
4424
|
};
|
|
4397
|
-
var
|
|
4398
|
-
var
|
|
4425
|
+
var uu = (e6) => ({ href: e6 ?? `#`, target: `_self` });
|
|
4426
|
+
var du = (e6) => {
|
|
4399
4427
|
if (!e6) return;
|
|
4400
4428
|
let t2 = e6 instanceof Date ? e6 : new Date(e6);
|
|
4401
4429
|
return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
|
|
4402
4430
|
};
|
|
4403
|
-
var
|
|
4404
|
-
var
|
|
4405
|
-
var
|
|
4406
|
-
var
|
|
4407
|
-
var
|
|
4408
|
-
var
|
|
4409
|
-
var
|
|
4410
|
-
var
|
|
4411
|
-
var
|
|
4431
|
+
var fu = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4432
|
+
var pu = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4433
|
+
var $ = (e6) => ({ text: e6, html: `<p>${pu(e6)}</p>`, linkList: [] });
|
|
4434
|
+
var mu = 6e4;
|
|
4435
|
+
var hu = mu * 60;
|
|
4436
|
+
var gu = hu * 24;
|
|
4437
|
+
var _u = gu * 7;
|
|
4438
|
+
var vu = (e6) => e6 < mu ? [`second`, e6 / 1e3] : e6 < hu ? [`minute`, e6 / mu] : e6 < gu ? [`hour`, e6 / hu] : [`day`, e6 / gu];
|
|
4439
|
+
var yu = (e6, t2, n2 = Date.now()) => {
|
|
4412
4440
|
let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
|
|
4413
|
-
if (i2 >= 0 && i2 <
|
|
4414
|
-
let [e7, n3] =
|
|
4441
|
+
if (i2 >= 0 && i2 < _u) {
|
|
4442
|
+
let [e7, n3] = vu(i2);
|
|
4415
4443
|
return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
|
|
4416
4444
|
}
|
|
4417
4445
|
let a2 = r2.getFullYear() === new Date(n2).getFullYear();
|
|
4418
4446
|
return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
|
|
4419
4447
|
};
|
|
4420
|
-
var
|
|
4421
|
-
var
|
|
4422
|
-
var
|
|
4448
|
+
var bu = `https://static.wixstatic.com/media/`;
|
|
4449
|
+
var xu = 100;
|
|
4450
|
+
var Su = (e6, t2 = ``) => {
|
|
4423
4451
|
let n2 = e6?.profile?.photo;
|
|
4424
4452
|
if (!n2?.url) return;
|
|
4425
|
-
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(
|
|
4426
|
-
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width ||
|
|
4427
|
-
};
|
|
4428
|
-
var
|
|
4429
|
-
var
|
|
4430
|
-
var
|
|
4431
|
-
var
|
|
4432
|
-
var
|
|
4453
|
+
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(bu) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
|
|
4454
|
+
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || xu, height: n2.height || xu, alt: r2 ?? t2 };
|
|
4455
|
+
};
|
|
4456
|
+
var Cu = `https://static.wixstatic.com/media/`;
|
|
4457
|
+
var wu = `wix:image://`;
|
|
4458
|
+
var Tu = 1200;
|
|
4459
|
+
var Eu = 800;
|
|
4460
|
+
var Du = (e6) => {
|
|
4433
4461
|
if (!e6) return;
|
|
4434
4462
|
let t2 = Number.parseInt(e6, 10);
|
|
4435
4463
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4436
4464
|
};
|
|
4437
|
-
var
|
|
4438
|
-
if (!e6.startsWith(
|
|
4465
|
+
var Ou = (e6) => {
|
|
4466
|
+
if (!e6.startsWith(wu)) {
|
|
4439
4467
|
let t3 = e6.split(/[?#]/)[0];
|
|
4440
4468
|
return t3 ? { uri: t3 } : void 0;
|
|
4441
4469
|
}
|
|
4442
4470
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
|
|
4443
4471
|
if (!r2) return;
|
|
4444
4472
|
let a2 = new URLSearchParams(n2 ?? ``);
|
|
4445
|
-
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width:
|
|
4473
|
+
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: Du(a2.get(`originWidth`)), height: Du(a2.get(`originHeight`)) };
|
|
4446
4474
|
};
|
|
4447
|
-
var
|
|
4475
|
+
var ku = (e6, t2) => {
|
|
4448
4476
|
if (!e6) return;
|
|
4449
|
-
let n2 =
|
|
4477
|
+
let n2 = Ou(e6);
|
|
4450
4478
|
if (!n2) return;
|
|
4451
4479
|
let r2 = n2.name ?? n2.uri;
|
|
4452
|
-
return { uri: n2.uri, url: `${
|
|
4480
|
+
return { uri: n2.uri, url: `${Cu}${n2.uri}`, name: r2, width: n2.width ?? Tu, height: n2.height ?? Eu, alt: t2 ?? r2 };
|
|
4453
4481
|
};
|
|
4454
|
-
var
|
|
4482
|
+
var Au = (e6) => {
|
|
4455
4483
|
let t2 = e6?.media?.wixMedia?.image;
|
|
4456
4484
|
if (!t2) return;
|
|
4457
|
-
let n2 =
|
|
4485
|
+
let n2 = Ou(t2);
|
|
4458
4486
|
if (!n2) return;
|
|
4459
4487
|
let r2 = n2.name ?? n2.uri;
|
|
4460
|
-
return { uri: n2.uri, url: `${
|
|
4488
|
+
return { uri: n2.uri, url: `${Cu}${n2.uri}`, name: r2, width: n2.width ?? Tu, height: n2.height ?? Eu, alt: e6?.media?.altText ?? e6?.title ?? r2 };
|
|
4461
4489
|
};
|
|
4462
|
-
var
|
|
4463
|
-
var
|
|
4464
|
-
var
|
|
4490
|
+
var ju = `https://static.wixstatic.com/media/`;
|
|
4491
|
+
var Mu = `wix:video://`;
|
|
4492
|
+
var Nu = (e6) => {
|
|
4465
4493
|
if (!e6) return;
|
|
4466
4494
|
let t2 = Number.parseInt(e6, 10);
|
|
4467
4495
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4468
4496
|
};
|
|
4469
|
-
var
|
|
4470
|
-
if (!e6.startsWith(
|
|
4497
|
+
var Pu = (e6) => {
|
|
4498
|
+
if (!e6.startsWith(Mu)) return;
|
|
4471
4499
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
|
|
4472
4500
|
if (!r2) return;
|
|
4473
4501
|
let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
|
|
4474
|
-
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${
|
|
4502
|
+
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${ju}${a2}` : void 0, posterWidth: Nu(i2.get(`posterWidth`)), posterHeight: Nu(i2.get(`posterHeight`)) };
|
|
4475
4503
|
};
|
|
4476
|
-
var
|
|
4477
|
-
var
|
|
4478
|
-
var
|
|
4504
|
+
var Fu = [/https?:\/\/(?:www\.|m\.)?youtube\.com\/watch\?(?:[^#]*&)?v=([\w-]+)/i, /https?:\/\/(?:www\.)?youtube\.com\/embed\/([\w-]+)/i, /https?:\/\/youtu\.be\/([\w-]+)/i];
|
|
4505
|
+
var Iu = [/https?:\/\/player\.vimeo\.com\/video\/(\d+)/i, /https?:\/\/vimeo\.com\/(\d+)/i];
|
|
4506
|
+
var Lu = (e6, t2) => {
|
|
4479
4507
|
for (let n2 of e6) {
|
|
4480
4508
|
let e7 = n2.exec(t2);
|
|
4481
4509
|
if (e7) return e7[1];
|
|
4482
4510
|
}
|
|
4483
4511
|
};
|
|
4484
|
-
var
|
|
4485
|
-
let t2 =
|
|
4512
|
+
var Ru = (e6) => {
|
|
4513
|
+
let t2 = Lu(Fu, e6);
|
|
4486
4514
|
if (t2) return { provider: `youtube`, embedUrl: `https://www.youtube.com/embed/${t2}?autoplay=1` };
|
|
4487
|
-
let n2 =
|
|
4515
|
+
let n2 = Lu(Iu, e6);
|
|
4488
4516
|
return n2 ? { provider: `vimeo`, embedUrl: `https://player.vimeo.com/video/${n2}?autoplay=1` } : { provider: `unknown` };
|
|
4489
4517
|
};
|
|
4490
|
-
var
|
|
4518
|
+
var zu = (e6, t2 = []) => {
|
|
4491
4519
|
let n2 = e6?.media;
|
|
4492
4520
|
if (!n2 || n2.displayed === false) return;
|
|
4493
|
-
let r2 =
|
|
4521
|
+
let r2 = Au(e6);
|
|
4494
4522
|
if (r2) return { kind: `image`, image: r2 };
|
|
4495
|
-
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ?
|
|
4523
|
+
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? Pu(n2.wixMedia.videoV2) : void 0;
|
|
4496
4524
|
if (a2) return { kind: `wixVideo`, ...a2, sources: t2, altText: i2 };
|
|
4497
4525
|
let o2 = n2.embedMedia?.video?.url;
|
|
4498
4526
|
if (o2) {
|
|
4499
4527
|
let { thumbnail: e7 } = n2.embedMedia ?? {};
|
|
4500
|
-
return { kind: `embed`, videoUrl: o2, ...
|
|
4528
|
+
return { kind: `embed`, videoUrl: o2, ...Ru(o2), thumbnailUrl: e7?.url, thumbnailWidth: e7?.width, thumbnailHeight: e7?.height, altText: i2 };
|
|
4501
4529
|
}
|
|
4502
4530
|
};
|
|
4503
|
-
var
|
|
4504
|
-
let t2 =
|
|
4531
|
+
var Bu = (e6) => {
|
|
4532
|
+
let t2 = Au(e6), n2 = e6?.media?.wixMedia?.videoV2;
|
|
4505
4533
|
if (t2 || !n2) return t2;
|
|
4506
|
-
let r2 =
|
|
4534
|
+
let r2 = Pu(n2), i2 = ku(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
|
|
4507
4535
|
return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
|
|
4508
4536
|
};
|
|
4509
|
-
var
|
|
4510
|
-
var
|
|
4511
|
-
let n2 =
|
|
4537
|
+
var Vu = (e6, t2) => e6 && t2 ? `${e6}/${encodeURIComponent(t2)}` : void 0;
|
|
4538
|
+
var Hu = (e6, t2) => {
|
|
4539
|
+
let n2 = Vu(e6, t2);
|
|
4512
4540
|
return n2 ? { href: n2, target: `_self` } : void 0;
|
|
4513
4541
|
};
|
|
4514
|
-
var
|
|
4515
|
-
var
|
|
4542
|
+
var Uu = { href: `#`, target: `_self` };
|
|
4543
|
+
var Wu = (e6, t2) => {
|
|
4516
4544
|
let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
|
|
4517
|
-
return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel:
|
|
4545
|
+
return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel: $(a2), itemCategoryLink: Hu(t2, i2 ?? ``), categoryItem: { label: a2, slug: i2 ?? `` } };
|
|
4518
4546
|
};
|
|
4519
|
-
var
|
|
4520
|
-
var
|
|
4547
|
+
var Gu = 2;
|
|
4548
|
+
var Ku = (e6) => Array.from({ length: Gu }, (t2, n2) => {
|
|
4521
4549
|
let r2 = e6.canvas.categoryNumbered(n2 + 1);
|
|
4522
|
-
return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel:
|
|
4550
|
+
return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel: $(r2), itemCategoryLink: Uu, categoryItem: { label: r2, slug: `` } };
|
|
4523
4551
|
});
|
|
4524
|
-
var
|
|
4552
|
+
var qu = (e6, t2) => {
|
|
4525
4553
|
let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
|
|
4526
|
-
return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel:
|
|
4554
|
+
return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel: $(a2), itemTagLink: Hu(t2, i2 ?? ``), tagItem: { label: a2, slug: i2 ?? `` } };
|
|
4527
4555
|
};
|
|
4528
|
-
var
|
|
4529
|
-
var
|
|
4556
|
+
var Ju = 3;
|
|
4557
|
+
var Yu = (e6) => Array.from({ length: Ju }, (t2, n2) => {
|
|
4530
4558
|
let r2 = e6.canvas.tagNumbered(n2 + 1);
|
|
4531
|
-
return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel:
|
|
4559
|
+
return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel: $(r2), itemTagLink: Uu, tagItem: { label: r2, slug: `` } };
|
|
4532
4560
|
});
|
|
4533
|
-
var
|
|
4534
|
-
var
|
|
4561
|
+
var Xu = 1;
|
|
4562
|
+
var Zu = { views: 120, comments: 4, likes: 12 };
|
|
4535
4563
|
var Qu = (e6) => ({ nodes: [{ type: `PARAGRAPH`, nodes: [{ type: `TEXT`, nodes: [], textData: { text: e6, decorations: [] } }] }] });
|
|
4536
|
-
var $u = (e6, t2, n2, r2) =>
|
|
4564
|
+
var $u = (e6, t2, n2, r2) => $(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4537
4565
|
var ed = (e6, t2, n2) => e6 ?? (n2 ? t2 : void 0);
|
|
4538
4566
|
var td = { nodes: [] };
|
|
4539
|
-
var nd = () => ({ title:
|
|
4540
|
-
var rd = ({ post: e6, author: t2, metrics: n2, categories: r2, tags: i2, videoSources: a2 }, o2, s2, c2 = false, l2 = Date.now(), u2 = {}) => !e6 && !c2 ? nd() : { title:
|
|
4567
|
+
var nd = () => ({ title: $(``), excerpt: $(``), coverImage: void 0, coverMedia: void 0, richContent: td, authorName: $(``), authorImage: void 0, timeToRead: $(``), publishedDate: $(``), viewCount: $(``), commentCount: $(``), likeCount: $(``), postCategories: [], itemCategoryLabel: $(``), postTags: [], hasCoverImage: false, hasExcerpt: false, hasTags: false, publishedDateValue: void 0, minutesToReadValue: void 0, viewCountValue: void 0, commentCountValue: void 0 });
|
|
4568
|
+
var rd = ({ post: e6, author: t2, metrics: n2, categories: r2, tags: i2, videoSources: a2 }, o2, s2, c2 = false, l2 = Date.now(), u2 = {}) => !e6 && !c2 ? nd() : { title: $(e6?.title ?? o2.canvas.postTitle()), excerpt: $(e6?.excerpt ?? o2.canvas.excerpt()), coverImage: Bu(e6), coverMedia: zu(e6, a2), richContent: e6?.richContent ?? Qu(o2.canvas.content()), authorName: $(t2?.profile?.nickname ?? o2.canvas.authorName()), authorImage: Su(t2, o2.canvas.authorPhotoAlt()), timeToRead: $(typeof e6?.minutesToRead == `number` && e6.minutesToRead > 0 ? o2.timeToRead(e6.minutesToRead) : c2 ? o2.timeToRead(Xu) : ``), publishedDate: $(yu(e6?.firstPublishedDate ?? new Date(l2), s2, l2)), viewCount: $u(n2?.views, Zu.views, c2, o2.viewCount), commentCount: $u(n2?.comments, Zu.comments, c2, o2.commentCount), likeCount: $u(n2?.likes, Zu.likes, c2, o2.likeCount), postCategories: r2.length === 0 && c2 ? Ku(o2) : r2.map((e7) => Wu(e7, u2.category)), itemCategoryLabel: $(r2[0]?.label ?? (c2 ? o2.canvas.category() : ``)), postTags: i2.length === 0 && c2 ? Yu(o2) : i2.map((e7) => qu(e7, u2.tag)), hasCoverImage: !e6 || e6.media?.displayed !== false && Bu(e6) !== void 0, hasExcerpt: !e6 || !!e6.excerpt?.trim(), hasTags: !e6 || i2.length > 0, publishedDateValue: du(e6?.firstPublishedDate) ?? (c2 ? `2026-05-12T12:00:00.000Z` : void 0), minutesToReadValue: fu(e6?.minutesToRead) ?? (c2 ? Xu : void 0), viewCountValue: ed(n2?.views, Zu.views, c2), commentCountValue: ed(n2?.comments, Zu.comments, c2) };
|
|
4541
4569
|
var id = ({ postWithAuthor: e6, hasError: t2, monitoringClient: n2, isPostInPreview: r2, postPageBase: i2 }) => {
|
|
4542
|
-
let { t: a2 } =
|
|
4570
|
+
let { t: a2 } = vo(), o2 = tu(), s2 = (0, import_react.useMemo)(() => iu(a2, o2), [a2, o2]), c2 = Vl(e6.fetchedAt), l2 = lu(), { isLiked: d2, likeCount: f2, isLikeCountLoaded: p2, viewCount: m2, commentCount: h2, toggleLike: g2, liveLikes: _2 } = eu(e6.post?._id ?? void 0, e6.metrics?.likes ?? 0, r2, n2), v2 = zl($n), y2 = zl(`tag`), b2 = (0, import_react.useMemo)(() => Ol(e6.post), [e6]), x2 = nu(), S2 = (0, import_react.useMemo)(() => e6.post?.richContent && e6.paywall ? Zc(e6.post.richContent, e6.paywall, x2) : void 0, [e6, x2]);
|
|
4543
4571
|
return (0, import_react.useMemo)(() => {
|
|
4544
|
-
let n3 = rd(!e6.post && l2 && e6.demoPost ? { ...e6, post: e6.demoPost } : e6, s2, o2, l2, c2, { category: v2, tag: y2 }), a3 = r2 || !e6.post ? void 0 :
|
|
4545
|
-
return { ...n3, ...S2 && { richContent: S2 }, relatedPostsSource: b2, commentingEnabled: e6.post?.commentingEnabled ?? void 0, viewCountValue: m2 ?? n3.viewCountValue, commentCountValue: h2 ?? n3.commentCountValue, itemLink: u2, postUrl: a3?.href, ...e6.post && (e6.metrics?.likes !== void 0 || p2) ? { likeCount:
|
|
4572
|
+
let n3 = rd(!e6.post && l2 && e6.demoPost ? { ...e6, post: e6.demoPost } : e6, s2, o2, l2, c2, { category: v2, tag: y2 }), a3 = r2 || !e6.post ? void 0 : cr(e6.post, i2), u2 = a3 ?? (l2 ? uu(i2) : void 0);
|
|
4573
|
+
return { ...n3, ...S2 && { richContent: S2 }, relatedPostsSource: b2, commentingEnabled: e6.post?.commentingEnabled ?? void 0, viewCountValue: m2 ?? n3.viewCountValue, commentCountValue: h2 ?? n3.commentCountValue, itemLink: u2, postUrl: a3?.href, ...e6.post && (e6.metrics?.likes !== void 0 || p2) ? { likeCount: $(s2.likeCount(f2)) } : {}, isLiked: d2, likeCountValue: f2, isLikeCountLoaded: p2, toggleLike: g2, liveLikes: _2, clockValue: c2, isLoadingPost: false, hasError: t2, isEmpty: !e6.post && !l2 };
|
|
4546
4574
|
}, [e6, t2, b2, S2, s2, o2, c2, f2, d2, p2, m2, h2, g2, _2, l2, r2, i2, v2, y2]);
|
|
4547
4575
|
};
|
|
4548
4576
|
var ad = (e6) => ({ post: e6, hasError: false });
|
|
@@ -4556,17 +4584,17 @@ var ld = { ...cd, isLoadingPost: false, hasError: true, isEmpty: true };
|
|
|
4556
4584
|
var ud = 2500;
|
|
4557
4585
|
var dd = Promise.resolve(ad({ post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: 0 }));
|
|
4558
4586
|
var fd = ({ children: t2, postId: n2, postLoadPromise: r2, monitoringClient: i2 }) => {
|
|
4559
|
-
let { post: a2, hasError: o2 } =
|
|
4560
|
-
return
|
|
4587
|
+
let { post: a2, hasError: o2 } = Bn(r2), c2 = Yn(a2, (0, import_react.useCallback)(() => n2 ? Tl(n2) : Promise.resolve(void 0), [n2])), l2 = id({ postWithAuthor: c2, hasError: o2, monitoringClient: i2, isPostInPreview: false, postPageBase: ur() });
|
|
4588
|
+
return pr(dr.postByIdProvider, o2 ? `error` : c2.post ? `data` : `empty`), (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: l2, children: t2 });
|
|
4561
4589
|
};
|
|
4562
4590
|
function pd({ children: t2, postPicker: n2 }) {
|
|
4563
|
-
let i2 =
|
|
4564
|
-
let e6 =
|
|
4565
|
-
return
|
|
4591
|
+
let i2 = Rl(n2), a2 = Wn(), o2 = hr(), s2 = (0, import_react.useMemo)(() => Al(Rn), []), { i18n: c2, locale: l2 } = Wo(Qo), d2 = Kn(() => i2 ? Hn(jo({ key: `blog-builder:post-by-id:${i2}`, warmupData: o2, fetchData: () => {
|
|
4592
|
+
let e6 = El(i2, a2);
|
|
4593
|
+
return Fl(Nl(s2, `post-by-id-read`, { feature: kl.post }, a2 ? dl(e6, ud, `post-by-id`) : e6));
|
|
4566
4594
|
} }), ad, a2 ? sd : od) : dd, [i2, a2, o2, s2]);
|
|
4567
|
-
return (0, import_jsx_runtime.jsx)(
|
|
4595
|
+
return (0, import_jsx_runtime.jsx)(yo, { i18n: c2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: cd, children: t2 }), children: [(0, import_jsx_runtime.jsx)(Uo, { i18n: c2, locale: l2 }), (0, import_jsx_runtime.jsx)(Pl, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: ld, children: t2 }), feature: kl.post, monitoringClient: s2, rethrow: a2, children: (0, import_jsx_runtime.jsx)(fd, { postId: i2, postLoadPromise: d2, monitoringClient: s2, children: t2 }, i2 ?? ``) })] }) });
|
|
4568
4596
|
}
|
|
4569
|
-
var md =
|
|
4597
|
+
var md = jn(`474ee948-702b-4c0f-970e-b5319eff6d8b`);
|
|
4570
4598
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4571
4599
|
0 && (module.exports = {
|
|
4572
4600
|
PostByIdProvider,
|