@wix/blog 1.0.696 → 1.0.698
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-context-provider/runtime.js +3 -3
- package/_sdk-exports/context-post-by-id-context-provider/runtime.js +4 -4
- package/_sdk-exports/context-post-context-provider/runtime.js +2 -2
- package/_sdk-exports/context-related-posts-context-provider/runtime.js +4 -4
- package/build/cjs/context-blog-feed-context-provider.js +195 -180
- package/build/cjs/context-blog-feed-context-provider.js.map +1 -1
- package/build/cjs/context-post-by-id-context-provider.js +474 -467
- package/build/cjs/context-post-by-id-context-provider.js.map +1 -1
- package/build/cjs/context-post-context-provider.js +208 -192
- package/build/cjs/context-post-context-provider.js.map +1 -1
- package/build/cjs/context-related-posts-context-provider.js +773 -757
- package/build/cjs/context-related-posts-context-provider.js.map +1 -1
- package/build/es/context-blog-feed-context-provider.mjs +195 -180
- package/build/es/context-blog-feed-context-provider.mjs.map +1 -1
- package/build/es/context-post-by-id-context-provider.mjs +474 -467
- package/build/es/context-post-by-id-context-provider.mjs.map +1 -1
- package/build/es/context-post-context-provider.mjs +208 -192
- package/build/es/context-post-context-provider.mjs.map +1 -1
- package/build/es/context-related-posts-context-provider.mjs +773 -757
- package/build/es/context-related-posts-context-provider.mjs.map +1 -1
- package/package.json +11 -11
|
@@ -1278,8 +1278,8 @@ var Fr = (e6, t2, n2 = `.`) => {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
return i2;
|
|
1280
1280
|
};
|
|
1281
|
-
var
|
|
1282
|
-
var
|
|
1281
|
+
var Ir = (e6) => e6?.replace(/_/g, `-`);
|
|
1282
|
+
var Lr = { type: `logger`, log(e6) {
|
|
1283
1283
|
this.output(`log`, e6);
|
|
1284
1284
|
}, warn(e6) {
|
|
1285
1285
|
this.output(`warn`, e6);
|
|
@@ -1288,12 +1288,12 @@ var Ir = { type: `logger`, log(e6) {
|
|
|
1288
1288
|
}, output(e6, t2) {
|
|
1289
1289
|
console?.[e6]?.apply?.(console, t2);
|
|
1290
1290
|
} };
|
|
1291
|
-
var
|
|
1291
|
+
var V = new class e2 {
|
|
1292
1292
|
constructor(e6, t2 = {}) {
|
|
1293
1293
|
this.init(e6, t2);
|
|
1294
1294
|
}
|
|
1295
1295
|
init(e6, t2 = {}) {
|
|
1296
|
-
this.prefix = t2.prefix || `i18next:`, this.logger = e6 ||
|
|
1296
|
+
this.prefix = t2.prefix || `i18next:`, this.logger = e6 || Lr, this.options = t2, this.debug = t2.debug;
|
|
1297
1297
|
}
|
|
1298
1298
|
log(...e6) {
|
|
1299
1299
|
return this.forward(e6, `log`, ``, true);
|
|
@@ -1317,7 +1317,7 @@ var H = new class e2 {
|
|
|
1317
1317
|
return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
|
|
1318
1318
|
}
|
|
1319
1319
|
}();
|
|
1320
|
-
var
|
|
1320
|
+
var Rr = class {
|
|
1321
1321
|
constructor() {
|
|
1322
1322
|
this.observers = {};
|
|
1323
1323
|
}
|
|
@@ -1345,8 +1345,8 @@ var Lr = class {
|
|
|
1345
1345
|
});
|
|
1346
1346
|
}
|
|
1347
1347
|
};
|
|
1348
|
-
var
|
|
1349
|
-
var
|
|
1348
|
+
var zr = /* @__PURE__ */ new WeakSet();
|
|
1349
|
+
var Br = class extends Rr {
|
|
1350
1350
|
constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
|
|
1351
1351
|
super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
|
|
1352
1352
|
}
|
|
@@ -1393,37 +1393,37 @@ var zr = class extends Lr {
|
|
|
1393
1393
|
let t2 = this.getDataByLanguage(e6);
|
|
1394
1394
|
return !!(t2 && Object.keys(t2) || []).find((e7) => {
|
|
1395
1395
|
let n2 = t2[e7];
|
|
1396
|
-
return
|
|
1396
|
+
return zr.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && zr.add(n2), true);
|
|
1397
1397
|
});
|
|
1398
1398
|
}
|
|
1399
1399
|
toJSON() {
|
|
1400
1400
|
return this.data;
|
|
1401
1401
|
}
|
|
1402
1402
|
};
|
|
1403
|
-
var
|
|
1403
|
+
var Vr = { processors: {}, addPostProcessor(e6) {
|
|
1404
1404
|
this.processors[e6.name] = e6;
|
|
1405
1405
|
}, handle(e6, t2, n2, r2, i2) {
|
|
1406
1406
|
return e6.forEach((e7) => {
|
|
1407
1407
|
t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
|
|
1408
1408
|
}), t2;
|
|
1409
1409
|
} };
|
|
1410
|
-
var
|
|
1411
|
-
function
|
|
1410
|
+
var Hr = Symbol(`i18next/PATH_KEY`);
|
|
1411
|
+
function Ur() {
|
|
1412
1412
|
let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
1413
|
-
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 ===
|
|
1413
|
+
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Hr ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1416
|
-
let { [
|
|
1415
|
+
function H(e6, t2) {
|
|
1416
|
+
let { [Hr]: n2 } = e6(Ur()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
|
|
1417
1417
|
if (n2.length > 1 && i2) {
|
|
1418
1418
|
let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
|
|
1419
1419
|
if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
|
|
1420
1420
|
}
|
|
1421
1421
|
return n2.join(r2);
|
|
1422
1422
|
}
|
|
1423
|
-
var
|
|
1424
|
-
var
|
|
1423
|
+
var Wr = (e6) => !L(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
|
|
1424
|
+
var Gr = class e3 extends Rr {
|
|
1425
1425
|
constructor(e6, t2 = {}) {
|
|
1426
|
-
super(), br([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger =
|
|
1426
|
+
super(), br([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = V.create(`translator`), this.checkedLoadedFor = {};
|
|
1427
1427
|
}
|
|
1428
1428
|
changeLanguage(e6) {
|
|
1429
1429
|
e6 && (this.language = e6);
|
|
@@ -1433,7 +1433,7 @@ var Wr = class e3 extends Lr {
|
|
|
1433
1433
|
if (e6 == null) return false;
|
|
1434
1434
|
let r2 = this.resolve(e6, n2);
|
|
1435
1435
|
if (r2?.res === void 0) return false;
|
|
1436
|
-
let i2 =
|
|
1436
|
+
let i2 = Wr(r2.res);
|
|
1437
1437
|
return !(n2.returnObjects === false && i2);
|
|
1438
1438
|
}
|
|
1439
1439
|
extractFromKey(e6, t2) {
|
|
@@ -1451,14 +1451,14 @@ var Wr = class e3 extends Lr {
|
|
|
1451
1451
|
translate(t2, n2, r2) {
|
|
1452
1452
|
let i2 = typeof n2 == `object` ? { ...n2 } : n2;
|
|
1453
1453
|
if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
|
|
1454
|
-
typeof t2 == `function` && (t2 =
|
|
1454
|
+
typeof t2 == `function` && (t2 = H(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? H(e6, { ...this.options, ...i2 }) : String(e6));
|
|
1455
1455
|
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;
|
|
1456
1456
|
u2 === void 0 && (u2 = `:`);
|
|
1457
1457
|
let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
1458
1458
|
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;
|
|
1459
1459
|
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;
|
|
1460
1460
|
y2 && !m2 && x2 && (T2 = w2);
|
|
1461
|
-
let te2 =
|
|
1461
|
+
let te2 = Wr(T2), ne2 = Object.prototype.toString.apply(T2);
|
|
1462
1462
|
if (y2 && T2 && te2 && !_2.includes(ne2) && !(L(v2) && Array.isArray(T2))) {
|
|
1463
1463
|
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
1464
1464
|
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
@@ -1469,7 +1469,7 @@ var Wr = class e3 extends Lr {
|
|
|
1469
1469
|
let e6 = Array.isArray(T2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
|
|
1470
1470
|
for (let e7 in T2) if (Object.prototype.hasOwnProperty.call(T2, e7)) {
|
|
1471
1471
|
let r3 = `${n3}${o2}${e7}`;
|
|
1472
|
-
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue:
|
|
1472
|
+
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Wr(w2) ? w2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = T2[e7]);
|
|
1473
1473
|
}
|
|
1474
1474
|
m2 = t3;
|
|
1475
1475
|
}
|
|
@@ -1518,11 +1518,11 @@ var Wr = class e3 extends Lr {
|
|
|
1518
1518
|
!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();
|
|
1519
1519
|
}
|
|
1520
1520
|
let a2 = n2.postProcess || this.options.postProcess, o2 = L(a2) ? [a2] : a2;
|
|
1521
|
-
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 =
|
|
1521
|
+
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = Vr.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
|
|
1522
1522
|
}
|
|
1523
1523
|
resolve(e6, t2 = {}) {
|
|
1524
1524
|
let n2, r2, i2, a2, o2;
|
|
1525
|
-
return L(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ?
|
|
1525
|
+
return L(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? H(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
|
|
1526
1526
|
if (this.isValidLookup(n2)) return;
|
|
1527
1527
|
let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
|
|
1528
1528
|
r2 = c2;
|
|
@@ -1569,20 +1569,20 @@ var Wr = class e3 extends Lr {
|
|
|
1569
1569
|
return false;
|
|
1570
1570
|
}
|
|
1571
1571
|
};
|
|
1572
|
-
var
|
|
1572
|
+
var Kr = class {
|
|
1573
1573
|
constructor(e6) {
|
|
1574
|
-
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger =
|
|
1574
|
+
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = V.create(`languageUtils`), this.resolveHierarchyCache = {};
|
|
1575
1575
|
}
|
|
1576
1576
|
clearCache() {
|
|
1577
1577
|
this.resolveHierarchyCache = {};
|
|
1578
1578
|
}
|
|
1579
1579
|
getScriptPartFromCode(e6) {
|
|
1580
|
-
if (e6 =
|
|
1580
|
+
if (e6 = Ir(e6), !e6 || !e6.includes(`-`)) return null;
|
|
1581
1581
|
let t2 = e6.split(`-`);
|
|
1582
1582
|
return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
|
|
1583
1583
|
}
|
|
1584
1584
|
getLanguagePartFromCode(e6) {
|
|
1585
|
-
if (e6 =
|
|
1585
|
+
if (e6 = Ir(e6), !e6 || !e6.includes(`-`)) return e6;
|
|
1586
1586
|
let t2 = e6.split(`-`);
|
|
1587
1587
|
return this.formatLanguageCode(t2[0]);
|
|
1588
1588
|
}
|
|
@@ -1643,24 +1643,24 @@ var Gr = class {
|
|
|
1643
1643
|
}), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
|
|
1644
1644
|
}
|
|
1645
1645
|
};
|
|
1646
|
-
var
|
|
1647
|
-
var
|
|
1648
|
-
var
|
|
1646
|
+
var qr = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
1647
|
+
var Jr = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
1648
|
+
var Yr = class {
|
|
1649
1649
|
constructor(e6, t2 = {}) {
|
|
1650
|
-
this.languageUtils = e6, this.options = t2, this.logger =
|
|
1650
|
+
this.languageUtils = e6, this.options = t2, this.logger = V.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
1651
1651
|
}
|
|
1652
1652
|
clearCache() {
|
|
1653
1653
|
this.pluralRulesCache = {};
|
|
1654
1654
|
}
|
|
1655
1655
|
getRule(e6, t2 = {}) {
|
|
1656
|
-
let n2 =
|
|
1656
|
+
let n2 = Ir(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
|
|
1657
1657
|
if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
|
|
1658
1658
|
let a2;
|
|
1659
1659
|
try {
|
|
1660
1660
|
a2 = new Intl.PluralRules(n2, { type: r2 });
|
|
1661
1661
|
} catch {
|
|
1662
|
-
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`),
|
|
1663
|
-
if (!e6.match(/-|_/)) return
|
|
1662
|
+
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), Jr;
|
|
1663
|
+
if (!e6.match(/-|_/)) return Jr;
|
|
1664
1664
|
let n3 = this.languageUtils.getLanguagePartFromCode(e6);
|
|
1665
1665
|
a2 = this.getRule(n3, t2);
|
|
1666
1666
|
}
|
|
@@ -1675,21 +1675,21 @@ var Jr = class {
|
|
|
1675
1675
|
}
|
|
1676
1676
|
getSuffixes(e6, t2 = {}) {
|
|
1677
1677
|
let n2 = this.getRule(e6, t2);
|
|
1678
|
-
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) =>
|
|
1678
|
+
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) => qr[e7] - qr[t3]).map((e7) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e7}`) : [];
|
|
1679
1679
|
}
|
|
1680
1680
|
getSuffix(e6, t2, n2 = {}) {
|
|
1681
1681
|
let r2 = this.getRule(e6, n2);
|
|
1682
1682
|
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));
|
|
1683
1683
|
}
|
|
1684
1684
|
};
|
|
1685
|
-
var
|
|
1685
|
+
var Xr = (e6, t2, n2, r2 = `.`, i2 = true) => {
|
|
1686
1686
|
let a2 = Dr(e6, t2, n2);
|
|
1687
1687
|
return !a2 && i2 && L(n2) && (a2 = Fr(e6, n2, r2), a2 === void 0 && (a2 = Fr(t2, n2, r2))), a2;
|
|
1688
1688
|
};
|
|
1689
|
-
var
|
|
1690
|
-
var
|
|
1689
|
+
var Zr = (e6) => e6.replace(/\$/g, `$$$$`);
|
|
1690
|
+
var Qr = class {
|
|
1691
1691
|
constructor(e6 = {}) {
|
|
1692
|
-
this.logger =
|
|
1692
|
+
this.logger = V.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
|
|
1693
1693
|
}
|
|
1694
1694
|
init(e6 = {}) {
|
|
1695
1695
|
e6.interpolation ||= { escapeValue: true };
|
|
@@ -1706,11 +1706,11 @@ var Zr = class {
|
|
|
1706
1706
|
interpolate(e6, t2, n2, r2) {
|
|
1707
1707
|
let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
|
|
1708
1708
|
if (!e7.includes(this.formatSeparator)) {
|
|
1709
|
-
let i4 =
|
|
1709
|
+
let i4 = Xr(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1710
1710
|
return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
|
|
1711
1711
|
}
|
|
1712
1712
|
let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
|
|
1713
|
-
return this.format(
|
|
1713
|
+
return this.format(Xr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
|
|
1714
1714
|
};
|
|
1715
1715
|
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.`);
|
|
1716
1716
|
let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
|
|
@@ -1728,7 +1728,7 @@ var Zr = class {
|
|
|
1728
1728
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
|
|
1729
1729
|
} else !L(a2) && !this.useRawValueToEscape && (a2 = yr(a2));
|
|
1730
1730
|
let s3 = t3.safeValue(a2);
|
|
1731
|
-
if (e6 = e6.replace(i2[0],
|
|
1731
|
+
if (e6 = e6.replace(i2[0], Zr(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
|
|
1732
1732
|
}
|
|
1733
1733
|
}), e6;
|
|
1734
1734
|
}
|
|
@@ -1757,7 +1757,7 @@ var Zr = class {
|
|
|
1757
1757
|
return l2 ? c2 + e6.slice(l2) : e6;
|
|
1758
1758
|
}
|
|
1759
1759
|
};
|
|
1760
|
-
var
|
|
1760
|
+
var $r = (e6) => {
|
|
1761
1761
|
let t2 = e6.toLowerCase().trim(), n2 = {};
|
|
1762
1762
|
if (e6.includes(`(`)) {
|
|
1763
1763
|
let r2 = e6.split(`(`);
|
|
@@ -1772,23 +1772,23 @@ var Qr = (e6) => {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
return { formatName: t2, formatOptions: n2 };
|
|
1774
1774
|
};
|
|
1775
|
-
var
|
|
1775
|
+
var ei = (e6) => {
|
|
1776
1776
|
let t2 = {};
|
|
1777
1777
|
return (n2, r2, i2) => {
|
|
1778
1778
|
let a2 = i2;
|
|
1779
1779
|
i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
|
|
1780
1780
|
let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
|
|
1781
|
-
return s2 || (s2 = e6(
|
|
1781
|
+
return s2 || (s2 = e6(Ir(r2), i2), t2[o2] = s2), s2(n2);
|
|
1782
1782
|
};
|
|
1783
1783
|
};
|
|
1784
|
-
var
|
|
1785
|
-
var
|
|
1784
|
+
var ti = (e6) => (t2, n2, r2) => e6(Ir(n2), r2)(t2);
|
|
1785
|
+
var ni = class {
|
|
1786
1786
|
constructor(e6 = {}) {
|
|
1787
|
-
this.logger =
|
|
1787
|
+
this.logger = V.create(`formatter`), this.options = e6, this.init(e6);
|
|
1788
1788
|
}
|
|
1789
1789
|
init(e6, t2 = { interpolation: {} }) {
|
|
1790
1790
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
1791
|
-
let n2 = t2.cacheInBuiltFormats ?
|
|
1791
|
+
let n2 = t2.cacheInBuiltFormats ? ei : ti;
|
|
1792
1792
|
this.formats = { number: n2((e7, t3) => {
|
|
1793
1793
|
let n3 = new Intl.NumberFormat(e7, { ...t3 });
|
|
1794
1794
|
return (e8) => n3.format(e8);
|
|
@@ -1810,7 +1810,7 @@ var ti = class {
|
|
|
1810
1810
|
this.formats[e6.toLowerCase().trim()] = t2;
|
|
1811
1811
|
}
|
|
1812
1812
|
addCached(e6, t2) {
|
|
1813
|
-
this.formats[e6.toLowerCase().trim()] =
|
|
1813
|
+
this.formats[e6.toLowerCase().trim()] = ei(t2);
|
|
1814
1814
|
}
|
|
1815
1815
|
format(e6, t2, n2, r2 = {}) {
|
|
1816
1816
|
if (!t2 || e6 == null) return e6;
|
|
@@ -1821,7 +1821,7 @@ var ti = class {
|
|
|
1821
1821
|
a2.push(t3);
|
|
1822
1822
|
}
|
|
1823
1823
|
return a2.reduce((e7, t3) => {
|
|
1824
|
-
let { formatName: i3, formatOptions: a3 } =
|
|
1824
|
+
let { formatName: i3, formatOptions: a3 } = $r(t3);
|
|
1825
1825
|
if (this.formats[i3]) {
|
|
1826
1826
|
let t4 = e7;
|
|
1827
1827
|
try {
|
|
@@ -1836,12 +1836,12 @@ var ti = class {
|
|
|
1836
1836
|
}, e6);
|
|
1837
1837
|
}
|
|
1838
1838
|
};
|
|
1839
|
-
var
|
|
1839
|
+
var ri = (e6, t2) => {
|
|
1840
1840
|
e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
|
|
1841
1841
|
};
|
|
1842
|
-
var
|
|
1842
|
+
var ii = class extends Rr {
|
|
1843
1843
|
constructor(e6, t2, n2, r2 = {}) {
|
|
1844
|
-
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger =
|
|
1844
|
+
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = V.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
|
|
1845
1845
|
}
|
|
1846
1846
|
queueLoad(e6, t2, n2, r2) {
|
|
1847
1847
|
let i2 = {}, a2 = {}, o2 = {}, s2 = {};
|
|
@@ -1858,7 +1858,7 @@ var ri = class extends Lr {
|
|
|
1858
1858
|
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);
|
|
1859
1859
|
let o2 = {};
|
|
1860
1860
|
this.queue.forEach((n3) => {
|
|
1861
|
-
Tr(n3.loaded, [i2], a2),
|
|
1861
|
+
Tr(n3.loaded, [i2], a2), ri(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
|
|
1862
1862
|
o2[e7] || (o2[e7] = {});
|
|
1863
1863
|
let t3 = n3.loaded[e7];
|
|
1864
1864
|
t3.length && t3.forEach((t4) => {
|
|
@@ -1930,7 +1930,7 @@ var ri = class extends Lr {
|
|
|
1930
1930
|
}
|
|
1931
1931
|
}
|
|
1932
1932
|
};
|
|
1933
|
-
var
|
|
1933
|
+
var ai = () => ({ 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) => {
|
|
1934
1934
|
let t2 = {};
|
|
1935
1935
|
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`) {
|
|
1936
1936
|
let n2 = e6[3] || e6[2];
|
|
@@ -1940,17 +1940,17 @@ var ii = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
1940
1940
|
}
|
|
1941
1941
|
return t2;
|
|
1942
1942
|
}, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
1943
|
-
var
|
|
1944
|
-
var
|
|
1943
|
+
var oi = (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);
|
|
1944
|
+
var si = () => {
|
|
1945
1945
|
};
|
|
1946
|
-
var
|
|
1946
|
+
var ci = (e6) => {
|
|
1947
1947
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
|
|
1948
1948
|
typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
|
|
1949
1949
|
});
|
|
1950
1950
|
};
|
|
1951
|
-
var
|
|
1951
|
+
var U = class e4 extends Rr {
|
|
1952
1952
|
constructor(e6 = {}, t2) {
|
|
1953
|
-
if (super(), this.options =
|
|
1953
|
+
if (super(), this.options = oi(e6), this.services = {}, this.logger = V, this.modules = { external: [] }, ci(this), t2 && !this.isInitialized && !e6.isClone) {
|
|
1954
1954
|
if (!this.options.initAsync) return this.init(e6, t2), this;
|
|
1955
1955
|
setTimeout(() => {
|
|
1956
1956
|
this.init(e6, t2);
|
|
@@ -1959,25 +1959,25 @@ var W = class e4 extends Lr {
|
|
|
1959
1959
|
}
|
|
1960
1960
|
init(e6 = {}, t2) {
|
|
1961
1961
|
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]));
|
|
1962
|
-
let n2 =
|
|
1963
|
-
this.options = { ...n2, ...this.options, ...
|
|
1962
|
+
let n2 = ai();
|
|
1963
|
+
this.options = { ...n2, ...this.options, ...oi(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);
|
|
1964
1964
|
let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
|
|
1965
1965
|
if (!this.options.isClone) {
|
|
1966
|
-
this.modules.logger ?
|
|
1966
|
+
this.modules.logger ? V.init(r2(this.modules.logger), this.options) : V.init(null, this.options);
|
|
1967
1967
|
let e7;
|
|
1968
|
-
e7 = this.modules.formatter ? this.modules.formatter :
|
|
1969
|
-
let t3 = new
|
|
1970
|
-
this.store = new
|
|
1968
|
+
e7 = this.modules.formatter ? this.modules.formatter : ni;
|
|
1969
|
+
let t3 = new Kr(this.options);
|
|
1970
|
+
this.store = new Br(this.options.resources, this.options);
|
|
1971
1971
|
let n3 = this.services;
|
|
1972
|
-
n3.logger =
|
|
1972
|
+
n3.logger = V, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new Yr(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 Qr(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new ii(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
|
|
1973
1973
|
this.emit(e8, ...t4);
|
|
1974
|
-
}), 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
|
|
1974
|
+
}), 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 Gr(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
|
|
1975
1975
|
this.emit(e8, ...t4);
|
|
1976
1976
|
}), this.modules.external.forEach((e8) => {
|
|
1977
1977
|
e8.init && e8.init(this);
|
|
1978
1978
|
});
|
|
1979
1979
|
}
|
|
1980
|
-
if (this.format = this.options.interpolation.format, t2 ||=
|
|
1980
|
+
if (this.format = this.options.interpolation.format, t2 ||= si, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1981
1981
|
let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1982
1982
|
e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
|
|
1983
1983
|
}
|
|
@@ -1995,7 +1995,7 @@ var W = class e4 extends Lr {
|
|
|
1995
1995
|
};
|
|
1996
1996
|
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
1997
1997
|
}
|
|
1998
|
-
loadResources(e6, t2 =
|
|
1998
|
+
loadResources(e6, t2 = si) {
|
|
1999
1999
|
let n2 = t2, r2 = L(e6) ? e6 : this.language;
|
|
2000
2000
|
if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2001
2001
|
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
@@ -2011,14 +2011,14 @@ var W = class e4 extends Lr {
|
|
|
2011
2011
|
}
|
|
2012
2012
|
reloadResources(e6, t2, n2) {
|
|
2013
2013
|
let r2 = R();
|
|
2014
|
-
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 ||=
|
|
2014
|
+
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 ||= si, this.services.backendConnector.reload(e6, t2, (e7) => {
|
|
2015
2015
|
r2.resolve(), n2(e7);
|
|
2016
2016
|
}), r2;
|
|
2017
2017
|
}
|
|
2018
2018
|
use(e6) {
|
|
2019
2019
|
if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
|
|
2020
2020
|
if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
|
|
2021
|
-
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` &&
|
|
2021
|
+
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` && Vr.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
|
|
2022
2022
|
}
|
|
2023
2023
|
setResolvedLanguage(e6) {
|
|
2024
2024
|
if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
|
|
@@ -2056,9 +2056,9 @@ var W = class e4 extends Lr {
|
|
|
2056
2056
|
let s2 = o2.ns !== void 0 && o2.ns !== null;
|
|
2057
2057
|
o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
|
|
2058
2058
|
let c2 = { ...this.options, ...o2 };
|
|
2059
|
-
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix =
|
|
2059
|
+
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = H(o2.keyPrefix, c2));
|
|
2060
2060
|
let l2 = this.options.keySeparator || `.`, u2;
|
|
2061
|
-
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 =
|
|
2061
|
+
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = H(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = H(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
|
|
2062
2062
|
};
|
|
2063
2063
|
return L(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
|
|
2064
2064
|
}
|
|
@@ -2112,24 +2112,24 @@ var W = class e4 extends Lr {
|
|
|
2112
2112
|
}
|
|
2113
2113
|
} catch {
|
|
2114
2114
|
}
|
|
2115
|
-
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
|
|
2115
|
+
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 Kr(ai());
|
|
2116
2116
|
return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
|
|
2117
2117
|
}
|
|
2118
2118
|
static createInstance(t2 = {}, n2) {
|
|
2119
2119
|
let r2 = new e4(t2, n2);
|
|
2120
2120
|
return r2.createInstance = e4.createInstance, r2;
|
|
2121
2121
|
}
|
|
2122
|
-
cloneInstance(t2 = {}, n2 =
|
|
2122
|
+
cloneInstance(t2 = {}, n2 = si) {
|
|
2123
2123
|
let r2 = t2.forkResourceStore;
|
|
2124
2124
|
r2 && delete t2.forkResourceStore;
|
|
2125
2125
|
let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2126
2126
|
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
|
|
2127
2127
|
a2[e6] = this[e6];
|
|
2128
|
-
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new
|
|
2129
|
-
let e6 = { ...
|
|
2130
|
-
a2.services.interpolator = new
|
|
2128
|
+
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Br(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) {
|
|
2129
|
+
let e6 = { ...ai().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
|
|
2130
|
+
a2.services.interpolator = new Qr(n3);
|
|
2131
2131
|
}
|
|
2132
|
-
return a2.translator = new
|
|
2132
|
+
return a2.translator = new Gr(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
|
|
2133
2133
|
a2.emit(e6, ...t3);
|
|
2134
2134
|
}), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
|
|
2135
2135
|
}
|
|
@@ -2137,9 +2137,9 @@ var W = class e4 extends Lr {
|
|
|
2137
2137
|
return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
|
|
2138
2138
|
}
|
|
2139
2139
|
}.createInstance();
|
|
2140
|
-
|
|
2141
|
-
var
|
|
2142
|
-
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 =
|
|
2140
|
+
U.createInstance, U.dir, U.init, U.loadResources, U.reloadResources, U.use, U.changeLanguage, U.getFixedT, U.t, U.exists, U.setDefaultNamespace, U.hasLoadedNamespace, U.loadNamespaces, U.loadLanguages;
|
|
2141
|
+
var li = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
|
|
2142
|
+
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = U.createInstance(i2 ? s2 : void 0);
|
|
2143
2143
|
return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
|
|
2144
2144
|
try {
|
|
2145
2145
|
return r3(null, await t2(e7));
|
|
@@ -2148,8 +2148,8 @@ var ci = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
|
|
|
2148
2148
|
}
|
|
2149
2149
|
} }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
|
|
2150
2150
|
};
|
|
2151
|
-
var
|
|
2152
|
-
function
|
|
2151
|
+
var ui = [`__proto__`, `constructor`, `prototype`];
|
|
2152
|
+
function di(e6, t2, n2) {
|
|
2153
2153
|
function r2(e7) {
|
|
2154
2154
|
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
2155
2155
|
}
|
|
@@ -2159,64 +2159,64 @@ function ui(e6, t2, n2) {
|
|
|
2159
2159
|
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
2160
2160
|
if (i2()) return {};
|
|
2161
2161
|
var o2 = r2(a2.shift());
|
|
2162
|
-
if (
|
|
2162
|
+
if (ui.indexOf(o2) > -1) return {};
|
|
2163
2163
|
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
2164
2164
|
}
|
|
2165
2165
|
if (i2()) return {};
|
|
2166
2166
|
var s2 = r2(a2.shift());
|
|
2167
|
-
return
|
|
2167
|
+
return ui.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
2168
2168
|
}
|
|
2169
|
-
function
|
|
2170
|
-
var r2 =
|
|
2169
|
+
function fi(e6, t2, n2) {
|
|
2170
|
+
var r2 = di(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
2171
2171
|
i2 !== void 0 && (i2[a2] = n2);
|
|
2172
2172
|
}
|
|
2173
|
-
function
|
|
2174
|
-
var n2 =
|
|
2173
|
+
function pi(e6, t2) {
|
|
2174
|
+
var n2 = di(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
2175
2175
|
if (r2) return r2[i2];
|
|
2176
2176
|
}
|
|
2177
|
-
var
|
|
2178
|
-
var
|
|
2179
|
-
var
|
|
2180
|
-
function
|
|
2181
|
-
return
|
|
2177
|
+
var mi = [];
|
|
2178
|
+
var hi = mi.forEach;
|
|
2179
|
+
var gi = mi.slice;
|
|
2180
|
+
function _i(e6) {
|
|
2181
|
+
return hi.call(gi.call(arguments, 1), function(t2) {
|
|
2182
2182
|
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
2183
2183
|
var i2 = r2[n2];
|
|
2184
|
-
|
|
2184
|
+
ui.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
2185
2185
|
}
|
|
2186
2186
|
}), e6;
|
|
2187
2187
|
}
|
|
2188
|
-
function
|
|
2189
|
-
let n2 = t2 && t2.cache ? t2.cache :
|
|
2190
|
-
return (t2 && t2.strategy ? t2.strategy :
|
|
2188
|
+
function vi(e6, t2) {
|
|
2189
|
+
let n2 = t2 && t2.cache ? t2.cache : Oi, r2 = t2 && t2.serializer ? t2.serializer : Ei;
|
|
2190
|
+
return (t2 && t2.strategy ? t2.strategy : Ci)(e6, { cache: n2, serializer: r2 });
|
|
2191
2191
|
}
|
|
2192
|
-
function
|
|
2192
|
+
function yi(e6) {
|
|
2193
2193
|
return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
|
|
2194
2194
|
}
|
|
2195
|
-
function
|
|
2196
|
-
let i2 =
|
|
2195
|
+
function bi(e6, t2, n2, r2) {
|
|
2196
|
+
let i2 = yi(r2) ? r2 : n2(r2), a2 = t2.get(i2);
|
|
2197
2197
|
return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
|
|
2198
2198
|
}
|
|
2199
|
-
function
|
|
2199
|
+
function xi(e6, t2, n2) {
|
|
2200
2200
|
let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
|
|
2201
2201
|
return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
|
|
2202
2202
|
}
|
|
2203
|
-
function
|
|
2203
|
+
function Si(e6, t2, n2, r2, i2) {
|
|
2204
2204
|
return n2.bind(t2, e6, r2, i2);
|
|
2205
2205
|
}
|
|
2206
|
-
function Si(e6, t2) {
|
|
2207
|
-
let n2 = e6.length === 1 ? yi : bi;
|
|
2208
|
-
return xi(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2209
|
-
}
|
|
2210
2206
|
function Ci(e6, t2) {
|
|
2211
|
-
|
|
2207
|
+
let n2 = e6.length === 1 ? bi : xi;
|
|
2208
|
+
return Si(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2212
2209
|
}
|
|
2213
2210
|
function wi(e6, t2) {
|
|
2214
|
-
return
|
|
2211
|
+
return Si(e6, this, xi, t2.cache.create(), t2.serializer);
|
|
2212
|
+
}
|
|
2213
|
+
function Ti(e6, t2) {
|
|
2214
|
+
return Si(e6, this, bi, t2.cache.create(), t2.serializer);
|
|
2215
2215
|
}
|
|
2216
|
-
var
|
|
2216
|
+
var Ei = function() {
|
|
2217
2217
|
return JSON.stringify(arguments);
|
|
2218
2218
|
};
|
|
2219
|
-
var
|
|
2219
|
+
var Di = class {
|
|
2220
2220
|
constructor() {
|
|
2221
2221
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2222
2222
|
}
|
|
@@ -2227,14 +2227,14 @@ var Ei = class {
|
|
|
2227
2227
|
this.cache[e6] = t2;
|
|
2228
2228
|
}
|
|
2229
2229
|
};
|
|
2230
|
-
var
|
|
2231
|
-
return new
|
|
2230
|
+
var Oi = { create: function() {
|
|
2231
|
+
return new Di();
|
|
2232
2232
|
} };
|
|
2233
|
-
var
|
|
2234
|
-
var
|
|
2235
|
-
function
|
|
2233
|
+
var ki = { variadic: wi, monadic: Ti };
|
|
2234
|
+
var Ai = /(?:[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;
|
|
2235
|
+
function ji(e6) {
|
|
2236
2236
|
let t2 = {};
|
|
2237
|
-
return e6.replace(
|
|
2237
|
+
return e6.replace(Ai, (e7) => {
|
|
2238
2238
|
let n2 = e7.length;
|
|
2239
2239
|
switch (e7[0]) {
|
|
2240
2240
|
case `G`:
|
|
@@ -2321,10 +2321,10 @@ function Ai(e6) {
|
|
|
2321
2321
|
return ``;
|
|
2322
2322
|
}), t2;
|
|
2323
2323
|
}
|
|
2324
|
-
var
|
|
2325
|
-
function
|
|
2324
|
+
var Mi = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
2325
|
+
function Ni(e6) {
|
|
2326
2326
|
if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
|
|
2327
|
-
let t2 = e6.split(
|
|
2327
|
+
let t2 = e6.split(Mi).filter((e7) => e7.length > 0), n2 = [];
|
|
2328
2328
|
for (let e7 of t2) {
|
|
2329
2329
|
let t3 = e7.split(`/`);
|
|
2330
2330
|
if (t3.length === 0) throw Error(`Invalid number skeleton`);
|
|
@@ -2334,20 +2334,20 @@ function Mi(e6) {
|
|
|
2334
2334
|
}
|
|
2335
2335
|
return n2;
|
|
2336
2336
|
}
|
|
2337
|
-
function
|
|
2337
|
+
function Pi(e6) {
|
|
2338
2338
|
return e6.replace(/^(.*?)-/, ``);
|
|
2339
2339
|
}
|
|
2340
|
-
var
|
|
2341
|
-
var
|
|
2342
|
-
var
|
|
2343
|
-
var
|
|
2344
|
-
function
|
|
2340
|
+
var Fi = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
2341
|
+
var Ii = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
2342
|
+
var Li = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
2343
|
+
var Ri = /^(0+)$/;
|
|
2344
|
+
function zi(e6) {
|
|
2345
2345
|
let t2 = {};
|
|
2346
|
-
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(
|
|
2346
|
+
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Ii, function(e7, n2, r2) {
|
|
2347
2347
|
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), ``;
|
|
2348
2348
|
}), t2;
|
|
2349
2349
|
}
|
|
2350
|
-
function
|
|
2350
|
+
function Bi(e6) {
|
|
2351
2351
|
switch (e6) {
|
|
2352
2352
|
case `sign-auto`:
|
|
2353
2353
|
return { signDisplay: `auto` };
|
|
@@ -2371,19 +2371,19 @@ function zi(e6) {
|
|
|
2371
2371
|
return { signDisplay: `never` };
|
|
2372
2372
|
}
|
|
2373
2373
|
}
|
|
2374
|
-
function
|
|
2374
|
+
function Vi(e6) {
|
|
2375
2375
|
let t2;
|
|
2376
2376
|
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) {
|
|
2377
2377
|
let n2 = e6.slice(0, 2);
|
|
2378
|
-
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !
|
|
2378
|
+
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !Ri.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
|
|
2379
2379
|
t2.minimumIntegerDigits = e6.length;
|
|
2380
2380
|
}
|
|
2381
2381
|
return t2;
|
|
2382
2382
|
}
|
|
2383
|
-
function Vi(e6) {
|
|
2384
|
-
return zi(e6) || {};
|
|
2385
|
-
}
|
|
2386
2383
|
function Hi(e6) {
|
|
2384
|
+
return Bi(e6) || {};
|
|
2385
|
+
}
|
|
2386
|
+
function Ui(e6) {
|
|
2387
2387
|
let t2 = {};
|
|
2388
2388
|
for (let n2 of e6) {
|
|
2389
2389
|
switch (n2.stem) {
|
|
@@ -2407,7 +2407,7 @@ function Hi(e6) {
|
|
|
2407
2407
|
continue;
|
|
2408
2408
|
case `measure-unit`:
|
|
2409
2409
|
case `unit`:
|
|
2410
|
-
t2.style = `unit`, t2.unit =
|
|
2410
|
+
t2.style = `unit`, t2.unit = Pi(n2.options[0]);
|
|
2411
2411
|
continue;
|
|
2412
2412
|
case `compact-short`:
|
|
2413
2413
|
case `K`:
|
|
@@ -2418,10 +2418,10 @@ function Hi(e6) {
|
|
|
2418
2418
|
t2.notation = `compact`, t2.compactDisplay = `long`;
|
|
2419
2419
|
continue;
|
|
2420
2420
|
case `scientific`:
|
|
2421
|
-
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2421
|
+
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Hi(t3) }), {}) };
|
|
2422
2422
|
continue;
|
|
2423
2423
|
case `engineering`:
|
|
2424
|
-
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2424
|
+
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Hi(t3) }), {}) };
|
|
2425
2425
|
continue;
|
|
2426
2426
|
case `notation-simple`:
|
|
2427
2427
|
t2.notation = `standard`;
|
|
@@ -2464,7 +2464,7 @@ function Hi(e6) {
|
|
|
2464
2464
|
continue;
|
|
2465
2465
|
case `integer-width`:
|
|
2466
2466
|
if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
|
|
2467
|
-
n2.options[0].replace(
|
|
2467
|
+
n2.options[0].replace(Li, function(e8, n3, r3, i2, a2, o2) {
|
|
2468
2468
|
if (n3) t2.minimumIntegerDigits = r3.length;
|
|
2469
2469
|
else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
|
|
2470
2470
|
else if (o2) throw Error(`We currently do not support exact integer digits`);
|
|
@@ -2472,68 +2472,68 @@ function Hi(e6) {
|
|
|
2472
2472
|
});
|
|
2473
2473
|
continue;
|
|
2474
2474
|
}
|
|
2475
|
-
if (
|
|
2475
|
+
if (Ri.test(n2.stem)) {
|
|
2476
2476
|
t2.minimumIntegerDigits = n2.stem.length;
|
|
2477
2477
|
continue;
|
|
2478
2478
|
}
|
|
2479
|
-
if (
|
|
2479
|
+
if (Fi.test(n2.stem)) {
|
|
2480
2480
|
if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
|
|
2481
|
-
n2.stem.replace(
|
|
2481
|
+
n2.stem.replace(Fi, function(e9, n3, r3, i2, a2, o2) {
|
|
2482
2482
|
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), ``;
|
|
2483
2483
|
});
|
|
2484
2484
|
let e8 = n2.options[0];
|
|
2485
|
-
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...
|
|
2485
|
+
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...zi(e8) });
|
|
2486
2486
|
continue;
|
|
2487
2487
|
}
|
|
2488
|
-
if (
|
|
2489
|
-
t2 = { ...t2, ...
|
|
2488
|
+
if (Ii.test(n2.stem)) {
|
|
2489
|
+
t2 = { ...t2, ...zi(n2.stem) };
|
|
2490
2490
|
continue;
|
|
2491
2491
|
}
|
|
2492
|
-
let e7 =
|
|
2492
|
+
let e7 = Bi(n2.stem);
|
|
2493
2493
|
e7 && (t2 = { ...t2, ...e7 });
|
|
2494
|
-
let r2 =
|
|
2494
|
+
let r2 = Vi(n2.stem);
|
|
2495
2495
|
r2 && (t2 = { ...t2, ...r2 });
|
|
2496
2496
|
}
|
|
2497
2497
|
return t2;
|
|
2498
2498
|
}
|
|
2499
|
-
var
|
|
2499
|
+
var Wi = function(e6) {
|
|
2500
2500
|
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;
|
|
2501
2501
|
}({});
|
|
2502
|
-
function
|
|
2502
|
+
function Gi(e6) {
|
|
2503
2503
|
return e6.type === 0;
|
|
2504
2504
|
}
|
|
2505
|
-
function
|
|
2505
|
+
function Ki(e6) {
|
|
2506
2506
|
return e6.type === 1;
|
|
2507
2507
|
}
|
|
2508
|
-
function
|
|
2508
|
+
function qi(e6) {
|
|
2509
2509
|
return e6.type === 2;
|
|
2510
2510
|
}
|
|
2511
|
-
function
|
|
2511
|
+
function Ji(e6) {
|
|
2512
2512
|
return e6.type === 3;
|
|
2513
2513
|
}
|
|
2514
|
-
function
|
|
2514
|
+
function Yi(e6) {
|
|
2515
2515
|
return e6.type === 4;
|
|
2516
2516
|
}
|
|
2517
|
-
function
|
|
2517
|
+
function Xi(e6) {
|
|
2518
2518
|
return e6.type === 5;
|
|
2519
2519
|
}
|
|
2520
|
-
function
|
|
2520
|
+
function Zi(e6) {
|
|
2521
2521
|
return e6.type === 6;
|
|
2522
2522
|
}
|
|
2523
|
-
function
|
|
2523
|
+
function Qi(e6) {
|
|
2524
2524
|
return e6.type === 7;
|
|
2525
2525
|
}
|
|
2526
|
-
function
|
|
2526
|
+
function $i(e6) {
|
|
2527
2527
|
return e6.type === 8;
|
|
2528
2528
|
}
|
|
2529
|
-
function
|
|
2529
|
+
function ea(e6) {
|
|
2530
2530
|
return !!(e6 && typeof e6 == `object` && e6.type === 0);
|
|
2531
2531
|
}
|
|
2532
|
-
function
|
|
2532
|
+
function ta(e6) {
|
|
2533
2533
|
return !!(e6 && typeof e6 == `object` && e6.type === 1);
|
|
2534
2534
|
}
|
|
2535
|
-
var
|
|
2536
|
-
var
|
|
2535
|
+
var na = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
2536
|
+
var W = { "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`] };
|
|
2537
2537
|
function ra(e6, t2) {
|
|
2538
2538
|
let n2 = ``;
|
|
2539
2539
|
for (let r2 = 0; r2 < e6.length; r2++) {
|
|
@@ -2567,10 +2567,10 @@ function ia(e6) {
|
|
|
2567
2567
|
throw Error(`Invalid hourCycle`);
|
|
2568
2568
|
}
|
|
2569
2569
|
let n2 = e6.language, r2;
|
|
2570
|
-
return n2 !== `root` && (r2 = e6.maximize().region), (
|
|
2570
|
+
return n2 !== `root` && (r2 = e6.maximize().region), (W[`${n2}-${r2}`] || W[r2 || ``] || W[n2 || ``] || W[`${n2}-001`] || W[`001`])[0].charAt(0);
|
|
2571
2571
|
}
|
|
2572
|
-
var aa = RegExp(`^${
|
|
2573
|
-
var oa = RegExp(`${
|
|
2572
|
+
var aa = RegExp(`^${na.source}*`);
|
|
2573
|
+
var oa = RegExp(`${na.source}*$`);
|
|
2574
2574
|
function G(e6, t2) {
|
|
2575
2575
|
return { start: e6, end: t2 };
|
|
2576
2576
|
}
|
|
@@ -2795,7 +2795,7 @@ var ga = class {
|
|
|
2795
2795
|
if (t4.length === 0) return this.error(10, i3);
|
|
2796
2796
|
let r3 = t4;
|
|
2797
2797
|
this.locale && (r3 = ra(t4, this.locale));
|
|
2798
|
-
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ?
|
|
2798
|
+
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? ji(r3) : {} };
|
|
2799
2799
|
return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
|
|
2800
2800
|
}
|
|
2801
2801
|
}
|
|
@@ -2854,11 +2854,11 @@ var ga = class {
|
|
|
2854
2854
|
parseNumberSkeletonFromString(e6, t2) {
|
|
2855
2855
|
let n2 = [];
|
|
2856
2856
|
try {
|
|
2857
|
-
n2 =
|
|
2857
|
+
n2 = Ni(e6);
|
|
2858
2858
|
} catch {
|
|
2859
2859
|
return this.error(7, t2);
|
|
2860
2860
|
}
|
|
2861
|
-
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ?
|
|
2861
|
+
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? Ui(n2) : {} }, err: null };
|
|
2862
2862
|
}
|
|
2863
2863
|
tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
|
|
2864
2864
|
let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
|
|
@@ -2962,15 +2962,15 @@ function ba(e6) {
|
|
|
2962
2962
|
}
|
|
2963
2963
|
function xa(e6) {
|
|
2964
2964
|
e6.forEach((e7) => {
|
|
2965
|
-
if (delete e7.location,
|
|
2966
|
-
else
|
|
2965
|
+
if (delete e7.location, Xi(e7) || Zi(e7)) for (let t2 in e7.options) delete e7.options[t2].location, xa(e7.options[t2].value);
|
|
2966
|
+
else qi(e7) && ea(e7.style) || (Ji(e7) || Yi(e7)) && ta(e7.style) ? delete e7.style.location : $i(e7) && xa(e7.children);
|
|
2967
2967
|
});
|
|
2968
2968
|
}
|
|
2969
2969
|
function Sa(e6, t2 = {}) {
|
|
2970
2970
|
t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
|
|
2971
2971
|
let n2 = new ga(e6, t2).parse();
|
|
2972
2972
|
if (n2.err) {
|
|
2973
|
-
let e7 = SyntaxError(
|
|
2973
|
+
let e7 = SyntaxError(Wi[n2.err.kind]);
|
|
2974
2974
|
throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
|
|
2975
2975
|
}
|
|
2976
2976
|
return t2?.captureLocation || xa(n2.val), n2.val;
|
|
@@ -3008,29 +3008,29 @@ function Oa(e6) {
|
|
|
3008
3008
|
return typeof e6 == `function`;
|
|
3009
3009
|
}
|
|
3010
3010
|
function ka(e6, t2, n2, r2, i2, a2, o2) {
|
|
3011
|
-
if (e6.length === 1 &&
|
|
3011
|
+
if (e6.length === 1 && Gi(e6[0])) return [{ type: 0, value: e6[0].value }];
|
|
3012
3012
|
let s2 = [];
|
|
3013
3013
|
for (let c2 of e6) {
|
|
3014
|
-
if (
|
|
3014
|
+
if (Gi(c2)) {
|
|
3015
3015
|
s2.push({ type: 0, value: c2.value });
|
|
3016
3016
|
continue;
|
|
3017
3017
|
}
|
|
3018
|
-
if (
|
|
3018
|
+
if (Qi(c2)) {
|
|
3019
3019
|
typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
|
|
3020
3020
|
continue;
|
|
3021
3021
|
}
|
|
3022
3022
|
let { value: e7 } = c2;
|
|
3023
3023
|
if (!(i2 && e7 in i2)) throw new Ea(e7, o2);
|
|
3024
3024
|
let l2 = i2[e7];
|
|
3025
|
-
if (
|
|
3026
|
-
else if (
|
|
3027
|
-
let e8 = typeof c2.style == `string` ? r2.date[c2.style] :
|
|
3025
|
+
if (Ki(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 });
|
|
3026
|
+
else if (Ji(c2)) {
|
|
3027
|
+
let e8 = typeof c2.style == `string` ? r2.date[c2.style] : ta(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3028
3028
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3029
|
-
} else if (
|
|
3030
|
-
let e8 = typeof c2.style == `string` ? r2.time[c2.style] :
|
|
3029
|
+
} else if (Yi(c2)) {
|
|
3030
|
+
let e8 = typeof c2.style == `string` ? r2.time[c2.style] : ta(c2.style) ? c2.style.parsedOptions : r2.time.medium;
|
|
3031
3031
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3032
|
-
} else if (
|
|
3033
|
-
let e8 = typeof c2.style == `string` ? r2.number[c2.style] :
|
|
3032
|
+
} else if (qi(c2)) {
|
|
3033
|
+
let e8 = typeof c2.style == `string` ? r2.number[c2.style] : ea(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3034
3034
|
if (e8 && e8.scale) {
|
|
3035
3035
|
let t3 = e8.scale || 1;
|
|
3036
3036
|
if (typeof l2 == `bigint`) {
|
|
@@ -3040,17 +3040,17 @@ function ka(e6, t2, n2, r2, i2, a2, o2) {
|
|
|
3040
3040
|
}
|
|
3041
3041
|
s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
|
|
3042
3042
|
} else {
|
|
3043
|
-
if (
|
|
3043
|
+
if ($i(c2)) {
|
|
3044
3044
|
let { children: e8, value: l3 } = c2, u2 = i2[l3];
|
|
3045
3045
|
if (!Oa(u2)) throw new Ta(l3, `function`, o2);
|
|
3046
3046
|
let d2 = u2(ka(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
|
|
3047
3047
|
Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
|
|
3048
3048
|
}
|
|
3049
|
-
if (
|
|
3049
|
+
if (Xi(c2)) {
|
|
3050
3050
|
let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
|
|
3051
3051
|
if (!a3) throw new wa(c2.value, l2, Object.keys(c2.options), o2);
|
|
3052
3052
|
s2.push(...ka(a3.value, t2, n2, r2, i2));
|
|
3053
|
-
} else if (
|
|
3053
|
+
} else if (Zi(c2)) {
|
|
3054
3054
|
let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
|
|
3055
3055
|
if (!a3) {
|
|
3056
3056
|
if (!Intl.PluralRules) throw new Ca(`Intl.PluralRules is not available in this environment.
|
|
@@ -3083,7 +3083,7 @@ function Ma(e6) {
|
|
|
3083
3083
|
} };
|
|
3084
3084
|
}
|
|
3085
3085
|
function Na(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
|
|
3086
|
-
return { getNumberFormat:
|
|
3086
|
+
return { getNumberFormat: vi((...e7) => new Intl.NumberFormat(...e7), { cache: Ma(e6.number), strategy: ki.variadic }), getDateTimeFormat: vi((...e7) => new Intl.DateTimeFormat(...e7), { cache: Ma(e6.dateTime), strategy: ki.variadic }), getPluralRules: vi((...e7) => new Intl.PluralRules(...e7), { cache: Ma(e6.pluralRules), strategy: ki.variadic }) };
|
|
3087
3087
|
}
|
|
3088
3088
|
var Pa = class e5 {
|
|
3089
3089
|
constructor(t2, n2 = e5.defaultLocale, r2, i2) {
|
|
@@ -3234,7 +3234,7 @@ var Xa = function() {
|
|
|
3234
3234
|
}
|
|
3235
3235
|
return Ka(e6, [{ key: `init`, value: function(e7, t2) {
|
|
3236
3236
|
var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
|
|
3237
|
-
if (this.options =
|
|
3237
|
+
if (this.options = _i(r2, t2, this.options || {}, Ya()), this.formats = this.options.formats, e7) {
|
|
3238
3238
|
var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
|
|
3239
3239
|
e7.IntlMessageFormat = Pa, e7.ICU = this, s2 && (a2 && e7.on(a2, function() {
|
|
3240
3240
|
return n2.clearCache();
|
|
@@ -3246,9 +3246,9 @@ var Xa = function() {
|
|
|
3246
3246
|
this.formats = this.formats ? Ha(Ha({}, this.formats), e7) : e7;
|
|
3247
3247
|
} }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
|
|
3248
3248
|
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && `${n2}.${r2}.${i2.replace(/\./g, `###`)}`, c2;
|
|
3249
|
-
this.options.memoize && (c2 =
|
|
3249
|
+
this.options.memoize && (c2 = pi(this.mem, s2));
|
|
3250
3250
|
try {
|
|
3251
|
-
return c2 || (c2 = new Pa(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) &&
|
|
3251
|
+
return c2 || (c2 = new Pa(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && fi(this.mem, s2, c2)), c2.format(this.escapeVariableValues(t2));
|
|
3252
3252
|
} catch (n3) {
|
|
3253
3253
|
return this.options.parseErrorHandler(n3, i2, e7, t2);
|
|
3254
3254
|
}
|
|
@@ -3268,7 +3268,7 @@ var Xa = function() {
|
|
|
3268
3268
|
Xa.type = `i18nFormat`;
|
|
3269
3269
|
function Za({ icuOptions: e6 = {}, ...t2 }) {
|
|
3270
3270
|
let { parseErrorHandler: n2 = void 0 } = t2;
|
|
3271
|
-
return
|
|
3271
|
+
return li(t2, { icu: new Xa({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
|
|
3272
3272
|
}
|
|
3273
3273
|
var Qa = (e6, t2, n2, r2) => {
|
|
3274
3274
|
let i2 = [n2, { code: t2, ...r2 || {} }];
|
|
@@ -3817,39 +3817,39 @@ function Js(e6) {
|
|
|
3817
3817
|
let t2 = ``;
|
|
3818
3818
|
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;
|
|
3819
3819
|
}
|
|
3820
|
-
function
|
|
3820
|
+
function X(e6) {
|
|
3821
3821
|
if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
|
|
3822
3822
|
}
|
|
3823
|
-
var
|
|
3824
|
-
var
|
|
3825
|
-
function
|
|
3823
|
+
var Ys = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
|
|
3824
|
+
var Xs = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
|
|
3825
|
+
function Zs(e6) {
|
|
3826
3826
|
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: `` }] } }));
|
|
3827
3827
|
}
|
|
3828
|
-
var
|
|
3829
|
-
function
|
|
3828
|
+
var Qs = `@wix/auto_sdk_blog_categories`;
|
|
3829
|
+
function $s(e6) {
|
|
3830
3830
|
function t2({ host: t3 }) {
|
|
3831
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName:
|
|
3831
|
+
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 }]) };
|
|
3832
3832
|
}
|
|
3833
3833
|
return t2;
|
|
3834
3834
|
}
|
|
3835
|
-
var
|
|
3836
|
-
var
|
|
3837
|
-
async function
|
|
3838
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3835
|
+
var ec = [{ path: `categories.url` }, { path: `categories.translations.url` }];
|
|
3836
|
+
var tc = [{ path: `categories.coverImage` }];
|
|
3837
|
+
async function nc(e6) {
|
|
3838
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = $s(D({ paging: e6?.paging, fieldsets: e6?.fieldsets, language: e6?.language }));
|
|
3839
3839
|
n2?.onSiteCall?.();
|
|
3840
3840
|
try {
|
|
3841
3841
|
let e7 = await t2.request(r2);
|
|
3842
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3842
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: ec }, { transformFn: Js, paths: tc }]));
|
|
3843
3843
|
} catch (e7) {
|
|
3844
3844
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3845
3845
|
throw n2?.onError?.(e7), t3;
|
|
3846
3846
|
}
|
|
3847
3847
|
}
|
|
3848
|
-
function
|
|
3849
|
-
return (t2) =>
|
|
3848
|
+
function rc(e6) {
|
|
3849
|
+
return (t2) => nc(t2, { httpClient: e6 });
|
|
3850
3850
|
}
|
|
3851
|
-
var
|
|
3852
|
-
function
|
|
3851
|
+
var ic = M(rc);
|
|
3852
|
+
function ac(e6) {
|
|
3853
3853
|
if (!e6) return;
|
|
3854
3854
|
let t2 = ``;
|
|
3855
3855
|
e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
|
|
@@ -3864,43 +3864,43 @@ function oc(e6) {
|
|
|
3864
3864
|
}
|
|
3865
3865
|
return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
|
|
3866
3866
|
}
|
|
3867
|
-
var
|
|
3868
|
-
var
|
|
3869
|
-
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` }];
|
|
3870
|
-
var
|
|
3871
|
-
function
|
|
3867
|
+
var oc = [{ path: `post.firstPublishedDate` }, { path: `post.lastPublishedDate` }, { 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` }];
|
|
3868
|
+
var sc = [{ path: `post.richContentCompressed` }];
|
|
3869
|
+
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` }];
|
|
3870
|
+
var lc = [{ path: `metrics.averageRating` }];
|
|
3871
|
+
function uc(e6) {
|
|
3872
3872
|
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` }] } }));
|
|
3873
3873
|
}
|
|
3874
|
-
var
|
|
3875
|
-
function
|
|
3874
|
+
var dc = `@wix/auto_sdk_blog_posts`;
|
|
3875
|
+
function fc(e6) {
|
|
3876
3876
|
function t2({ host: t3 }) {
|
|
3877
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost`, packageName:
|
|
3877
|
+
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 }]) };
|
|
3878
3878
|
}
|
|
3879
3879
|
return t2;
|
|
3880
3880
|
}
|
|
3881
|
-
function
|
|
3881
|
+
function pc(e6) {
|
|
3882
3882
|
function t2({ host: t3 }) {
|
|
3883
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics`, packageName:
|
|
3883
|
+
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 }]) };
|
|
3884
3884
|
}
|
|
3885
3885
|
return t2;
|
|
3886
3886
|
}
|
|
3887
|
-
var
|
|
3888
|
-
var
|
|
3889
|
-
var
|
|
3890
|
-
var
|
|
3891
|
-
async function
|
|
3892
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3887
|
+
var mc = [{ path: `post.url` }, { path: `post.translations.url` }];
|
|
3888
|
+
var hc = [{ path: `post.heroImage` }, { path: `post.media.wixMedia.image` }];
|
|
3889
|
+
var gc = [{ path: `post.media.wixMedia.videoV2` }];
|
|
3890
|
+
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 || {});
|
|
3891
|
+
async function _c(e6, t2) {
|
|
3892
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = fc(D({ postId: e6, fieldsets: t2?.fieldsets }, []));
|
|
3893
3893
|
r2?.onSiteCall?.();
|
|
3894
3894
|
try {
|
|
3895
3895
|
let e7 = await n2.request(i2);
|
|
3896
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3896
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: mc }, { transformFn: Js, paths: hc }, { transformFn: ac, paths: gc }]), [`post.richContent`, `post.rich_content`]);
|
|
3897
3897
|
} catch (e7) {
|
|
3898
3898
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { postId: `$[0]`, fieldsets: `$[1].fieldsets` }, singleArgumentUnchanged: false }, [`postId`, `options`]);
|
|
3899
3899
|
throw r2?.onError?.(e7), t3;
|
|
3900
3900
|
}
|
|
3901
3901
|
}
|
|
3902
|
-
async function
|
|
3903
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3902
|
+
async function vc(e6) {
|
|
3903
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = pc(D({ postId: e6 }, []));
|
|
3904
3904
|
n2?.onSiteCall?.();
|
|
3905
3905
|
try {
|
|
3906
3906
|
let e7 = await t2.request(r2);
|
|
@@ -3910,32 +3910,32 @@ async function yc(e6) {
|
|
|
3910
3910
|
throw n2?.onError?.(e7), t3;
|
|
3911
3911
|
}
|
|
3912
3912
|
}
|
|
3913
|
-
function
|
|
3914
|
-
return (t2, n2) =>
|
|
3913
|
+
function yc(e6) {
|
|
3914
|
+
return (t2, n2) => _c(t2, n2, { httpClient: e6 });
|
|
3915
3915
|
}
|
|
3916
|
-
function
|
|
3917
|
-
return (t2) =>
|
|
3916
|
+
function bc(e6) {
|
|
3917
|
+
return (t2) => vc(t2, { httpClient: e6 });
|
|
3918
3918
|
}
|
|
3919
|
+
var xc = M(yc);
|
|
3919
3920
|
var Sc = M(bc);
|
|
3920
|
-
var Cc =
|
|
3921
|
-
var wc = [{ path: `
|
|
3922
|
-
|
|
3923
|
-
function Ec(e6) {
|
|
3921
|
+
var Cc = [{ path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3922
|
+
var wc = [{ path: `tags.createdDate` }, { path: `tags.updatedDate` }];
|
|
3923
|
+
function Tc(e6) {
|
|
3924
3924
|
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` }] } }));
|
|
3925
3925
|
}
|
|
3926
|
-
var
|
|
3927
|
-
function
|
|
3926
|
+
var Ec = `@wix/auto_sdk_blog_tags`;
|
|
3927
|
+
function Dc(e6) {
|
|
3928
3928
|
function t2({ host: t3 }) {
|
|
3929
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3930
|
-
return { entityFqdn: `wix.blog.v3.tag`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.TagService.QueryTags`, packageName:
|
|
3929
|
+
let n2 = A(e6, [{ transformFn: un, paths: Cc }]);
|
|
3930
|
+
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 }]) };
|
|
3931
3931
|
}
|
|
3932
3932
|
return t2;
|
|
3933
3933
|
}
|
|
3934
|
-
var
|
|
3935
|
-
function
|
|
3934
|
+
var Oc = [{ path: `tags.url` }];
|
|
3935
|
+
function kc(e6) {
|
|
3936
3936
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3937
3937
|
return gs({ func: async (r2) => {
|
|
3938
|
-
let i2 =
|
|
3938
|
+
let i2 = Dc({ ...r2, ...e6 ?? {} });
|
|
3939
3939
|
n2?.onSiteCall?.();
|
|
3940
3940
|
try {
|
|
3941
3941
|
let e7 = await t2.request(i2);
|
|
@@ -3947,50 +3947,57 @@ function Ac(e6) {
|
|
|
3947
3947
|
let n3 = [t3, e6];
|
|
3948
3948
|
return D({ ...n3?.[1], query: n3?.[0] });
|
|
3949
3949
|
}, responseTransformer: ({ data: e7 }) => {
|
|
3950
|
-
let t3 = O(A(e7, [{ transformFn:
|
|
3950
|
+
let t3 = O(A(e7, [{ transformFn: X, paths: Oc }]));
|
|
3951
3951
|
return { items: t3?.tags, pagingMetadata: t3?.pagingMetadata };
|
|
3952
3952
|
}, errorTransformer: (e7) => {
|
|
3953
3953
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3954
3954
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
3955
3955
|
}
|
|
3956
|
-
async function
|
|
3957
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3956
|
+
async function Ac(e6, t2) {
|
|
3957
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Dc(D({ query: e6, ...t2 }));
|
|
3958
3958
|
r2?.onSiteCall?.();
|
|
3959
3959
|
try {
|
|
3960
3960
|
let e7 = await n2.request(i2);
|
|
3961
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3961
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Oc }]));
|
|
3962
3962
|
} catch (e7) {
|
|
3963
3963
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
3964
3964
|
throw r2?.onError?.(e7), t3;
|
|
3965
3965
|
}
|
|
3966
3966
|
}
|
|
3967
|
+
function jc(e6) {
|
|
3968
|
+
return (t2) => kc(t2, { httpClient: e6 });
|
|
3969
|
+
}
|
|
3967
3970
|
function Mc(e6) {
|
|
3968
|
-
return (t2) => Ac(t2, { httpClient: e6 });
|
|
3971
|
+
return (t2, n2) => Ac(t2, n2, { httpClient: e6 });
|
|
3969
3972
|
}
|
|
3970
3973
|
function Nc(e6) {
|
|
3971
|
-
|
|
3972
|
-
}
|
|
3973
|
-
function Pc(e6) {
|
|
3974
|
-
let t2 = Es({ builderQueryFunction: (t3) => Mc(e6)(t3), typedQueryFunction: (t3, n3) => Nc(e6)(t3, n3), hasOptionsParameter: true });
|
|
3974
|
+
let t2 = Es({ builderQueryFunction: (t3) => jc(e6)(t3), typedQueryFunction: (t3, n3) => Mc(e6)(t3, n3), hasOptionsParameter: true });
|
|
3975
3975
|
function n2(e7, n3) {
|
|
3976
3976
|
return t2(...arguments);
|
|
3977
3977
|
}
|
|
3978
3978
|
return n2;
|
|
3979
3979
|
}
|
|
3980
|
-
var
|
|
3981
|
-
var
|
|
3982
|
-
|
|
3980
|
+
var Pc = M(Nc);
|
|
3981
|
+
var Fc = (e6) => O(A(e6, [{ transformFn: X, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: Js, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: ac, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
|
|
3982
|
+
var Ic = `https://blog.wixsite.com/blog-demo-posts`;
|
|
3983
|
+
M((e6) => async (t2) => {
|
|
3984
|
+
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${N(t2)}`);
|
|
3985
|
+
if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
|
|
3986
|
+
return Fc(await n2.json()).filter((e7) => !e7.url?.startsWith(Ic));
|
|
3987
|
+
});
|
|
3988
|
+
var Lc = [{ path: `member.createdDate` }, { path: `member.updatedDate` }, { path: `member.lastLoginDate` }];
|
|
3989
|
+
function Rc(e6) {
|
|
3983
3990
|
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` }] } }));
|
|
3984
3991
|
}
|
|
3985
|
-
var
|
|
3986
|
-
function
|
|
3992
|
+
var zc = `@wix/auto_sdk_members_members`;
|
|
3993
|
+
function Bc(e6) {
|
|
3987
3994
|
function t2({ host: t3 }) {
|
|
3988
|
-
return { entityFqdn: `wix.members.v1.member`, method: `GET`, methodFqn: `com.wixpress.members.api.Members.GetMember`, packageName:
|
|
3995
|
+
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 }]) };
|
|
3989
3996
|
}
|
|
3990
3997
|
return t2;
|
|
3991
3998
|
}
|
|
3992
|
-
async function
|
|
3993
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3999
|
+
async function Vc(e6, t2) {
|
|
4000
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Bc(D({ id: e6, fieldsets: t2?.fieldsets }));
|
|
3994
4001
|
r2?.onSiteCall?.();
|
|
3995
4002
|
try {
|
|
3996
4003
|
let e7 = await n2.request(i2);
|
|
@@ -4000,70 +4007,70 @@ async function Bc(e6, t2) {
|
|
|
4000
4007
|
throw r2?.onError?.(e7), t3;
|
|
4001
4008
|
}
|
|
4002
4009
|
}
|
|
4003
|
-
function
|
|
4004
|
-
return (t2, n2) =>
|
|
4010
|
+
function Hc(e6) {
|
|
4011
|
+
return (t2, n2) => Vc(t2, n2, { httpClient: e6 });
|
|
4005
4012
|
}
|
|
4006
|
-
var
|
|
4007
|
-
var
|
|
4013
|
+
var Uc = M(Hc);
|
|
4014
|
+
var Wc = async (e6) => {
|
|
4008
4015
|
try {
|
|
4009
|
-
return await
|
|
4016
|
+
return await Uc(e6, { fieldsets: [`PUBLIC`] });
|
|
4010
4017
|
} catch {
|
|
4011
4018
|
return;
|
|
4012
4019
|
}
|
|
4013
4020
|
};
|
|
4014
|
-
var
|
|
4015
|
-
var
|
|
4016
|
-
let n2 = await ss({ postFqdn:
|
|
4021
|
+
var Gc = `wix.blog.v4.post`;
|
|
4022
|
+
var Kc = async (e6, t2) => {
|
|
4023
|
+
let n2 = await ss({ postFqdn: Gc, postId: e6 }, t2 ? { language: t2 } : void 0);
|
|
4017
4024
|
if (typeof n2 != `object` || !n2) throw Error(`No Wix SDK context for the post paywall read`);
|
|
4018
4025
|
let { richContent: r2 } = n2;
|
|
4019
4026
|
return D(r2);
|
|
4020
4027
|
};
|
|
4021
|
-
var
|
|
4022
|
-
var
|
|
4023
|
-
var
|
|
4028
|
+
var qc = `1522827f-c56c-a5c9-2ac9-00f9e6ae12d3`;
|
|
4029
|
+
var Jc = `membership_plan_picker_tpa`;
|
|
4030
|
+
var Yc = (e6) => {
|
|
4024
4031
|
let t2;
|
|
4025
4032
|
try {
|
|
4026
|
-
t2 = e6.appSectionRelativeUrl(
|
|
4033
|
+
t2 = e6.appSectionRelativeUrl(qc, Jc);
|
|
4027
4034
|
} catch {
|
|
4028
4035
|
return;
|
|
4029
4036
|
}
|
|
4030
4037
|
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${t2.replace(/^\/+/, ``)}`;
|
|
4031
4038
|
};
|
|
4032
|
-
var
|
|
4033
|
-
let n2 = e7.nodes ? { ...e7, nodes:
|
|
4039
|
+
var Xc = (e6, t2) => e6.flatMap((e7) => {
|
|
4040
|
+
let n2 = e7.nodes ? { ...e7, nodes: Xc(e7.nodes, t2) } : e7;
|
|
4034
4041
|
return e7.type !== `BUTTON` || e7.buttonData?.type !== `ACTION` ? [n2] : t2 ? [{ ...n2, buttonData: { ...e7.buttonData, type: `LINK`, link: { url: t2, target: `SELF`, rel: { nofollow: true } } } }] : [];
|
|
4035
4042
|
});
|
|
4036
|
-
var
|
|
4043
|
+
var Zc = (e6, t2, n2) => {
|
|
4037
4044
|
if (!t2?.nodes?.length) return e6;
|
|
4038
|
-
let r2 =
|
|
4045
|
+
let r2 = Xc(t2.nodes.map((e7) => e7.layoutData ? { ...e7, layoutData: { ...e7.layoutData, banner: void 0 } } : e7), n2);
|
|
4039
4046
|
return { ...e6, nodes: [...e6.nodes ?? [], ...r2] };
|
|
4040
4047
|
};
|
|
4041
|
-
var
|
|
4042
|
-
var
|
|
4043
|
-
var $c = [{ 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` }];
|
|
4044
|
-
var
|
|
4045
|
-
function
|
|
4048
|
+
var Qc = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { 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` }];
|
|
4049
|
+
var $c = [{ path: `posts.richContentCompressed` }];
|
|
4050
|
+
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` }];
|
|
4051
|
+
var tl = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
4052
|
+
function nl(e6) {
|
|
4046
4053
|
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` }] } }));
|
|
4047
4054
|
}
|
|
4048
|
-
var
|
|
4049
|
-
function
|
|
4055
|
+
var rl = `@wix/auto_sdk_blog_posts`;
|
|
4056
|
+
function il(e6) {
|
|
4050
4057
|
function t2({ host: t3 }) {
|
|
4051
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
4052
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
4058
|
+
let n2 = A(e6, [{ transformFn: un, paths: tl }]);
|
|
4059
|
+
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 }]) };
|
|
4053
4060
|
}
|
|
4054
4061
|
return t2;
|
|
4055
4062
|
}
|
|
4056
|
-
function
|
|
4057
|
-
let e6 =
|
|
4063
|
+
function al() {
|
|
4064
|
+
let e6 = il({});
|
|
4058
4065
|
return { getUrl: (t2) => {
|
|
4059
4066
|
let { url: n2 } = e6(t2);
|
|
4060
4067
|
return n2;
|
|
4061
4068
|
}, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
|
|
4062
4069
|
}
|
|
4063
|
-
var
|
|
4064
|
-
var
|
|
4070
|
+
var ol = al();
|
|
4071
|
+
var sl = (e6) => (t2) => ({ method: `POST`, url: ol.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
|
|
4065
4072
|
M((e6) => async (t2) => {
|
|
4066
|
-
let { data: n2 } = await e6.request(
|
|
4073
|
+
let { data: n2 } = await e6.request(sl(t2)), r2 = {};
|
|
4067
4074
|
for (let e7 of n2.posts ?? []) {
|
|
4068
4075
|
let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
|
|
4069
4076
|
if (!t3 || !n3?.length) continue;
|
|
@@ -4072,115 +4079,115 @@ M((e6) => async (t2) => {
|
|
|
4072
4079
|
}
|
|
4073
4080
|
return r2;
|
|
4074
4081
|
});
|
|
4075
|
-
var
|
|
4082
|
+
var cl = class extends Error {
|
|
4076
4083
|
constructor(e6, t2) {
|
|
4077
4084
|
super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
|
|
4078
4085
|
}
|
|
4079
4086
|
};
|
|
4080
|
-
var
|
|
4087
|
+
var ll = (e6, t2, n2) => {
|
|
4081
4088
|
let r2, i2 = new Promise((e7, i3) => {
|
|
4082
|
-
r2 = setTimeout(() => i3(new
|
|
4089
|
+
r2 = setTimeout(() => i3(new cl(n2, t2)), t2);
|
|
4083
4090
|
});
|
|
4084
4091
|
return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
|
|
4085
4092
|
};
|
|
4086
|
-
|
|
4087
|
-
var
|
|
4088
|
-
|
|
4089
|
-
var
|
|
4093
|
+
Z.RICH_CONTENT, Z.SEO, Z.URL, Z.CONTENT_TEXT;
|
|
4094
|
+
var ul = [Z.RICH_CONTENT, Z.URL];
|
|
4095
|
+
Z.URL, Z.METRICS;
|
|
4096
|
+
var dl = (e6) => {
|
|
4090
4097
|
let { status: t2, details: n2 } = e6 ?? {};
|
|
4091
4098
|
return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
|
|
4092
4099
|
};
|
|
4093
|
-
var
|
|
4094
|
-
if (t2 && !
|
|
4100
|
+
var fl = (e6, t2) => {
|
|
4101
|
+
if (t2 && !dl(e6)) throw e6;
|
|
4095
4102
|
};
|
|
4096
|
-
var
|
|
4103
|
+
var pl = async (e6) => {
|
|
4097
4104
|
try {
|
|
4098
|
-
let { metrics: t2 } = await
|
|
4105
|
+
let { metrics: t2 } = await Sc(e6);
|
|
4099
4106
|
return t2;
|
|
4100
4107
|
} catch {
|
|
4101
4108
|
return;
|
|
4102
4109
|
}
|
|
4103
4110
|
};
|
|
4104
|
-
var
|
|
4105
|
-
var
|
|
4111
|
+
var ml = 100;
|
|
4112
|
+
var hl = async () => {
|
|
4106
4113
|
try {
|
|
4107
|
-
let { categories: e6 } = await
|
|
4114
|
+
let { categories: e6 } = await ic({ paging: { limit: ml } });
|
|
4108
4115
|
return e6 ?? [];
|
|
4109
4116
|
} catch {
|
|
4110
4117
|
return [];
|
|
4111
4118
|
}
|
|
4112
4119
|
};
|
|
4113
|
-
var
|
|
4120
|
+
var gl = (e6, t2) => {
|
|
4114
4121
|
let { categoryIds: n2 } = e6 ?? {};
|
|
4115
4122
|
if (!n2?.length) return [];
|
|
4116
4123
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4117
4124
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4118
4125
|
};
|
|
4119
|
-
var
|
|
4120
|
-
var
|
|
4126
|
+
var _l = 30;
|
|
4127
|
+
var vl = async (e6) => {
|
|
4121
4128
|
if (!e6?.length) return [];
|
|
4122
4129
|
try {
|
|
4123
|
-
let { items: t2 } = await
|
|
4130
|
+
let { items: t2 } = await Pc().in(`_id`, e6).limit(_l).find();
|
|
4124
4131
|
return t2 ?? [];
|
|
4125
4132
|
} catch {
|
|
4126
4133
|
return [];
|
|
4127
4134
|
}
|
|
4128
4135
|
};
|
|
4129
|
-
var
|
|
4136
|
+
var yl = (e6, t2) => {
|
|
4130
4137
|
let { tagIds: n2 } = e6 ?? {};
|
|
4131
4138
|
if (!n2?.length) return [];
|
|
4132
4139
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4133
4140
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4134
4141
|
};
|
|
4135
|
-
var
|
|
4136
|
-
var
|
|
4142
|
+
var bl = 1e3;
|
|
4143
|
+
var xl = async (e6, t2 = false) => {
|
|
4137
4144
|
try {
|
|
4138
|
-
return (await
|
|
4145
|
+
return (await xc(e6, { fieldsets: ul })).post;
|
|
4139
4146
|
} catch (e7) {
|
|
4140
|
-
|
|
4147
|
+
fl(e7, t2);
|
|
4141
4148
|
return;
|
|
4142
4149
|
}
|
|
4143
4150
|
};
|
|
4144
|
-
var
|
|
4145
|
-
let n2 =
|
|
4146
|
-
return
|
|
4151
|
+
var Sl = async (e6, t2 = false) => {
|
|
4152
|
+
let n2 = hl();
|
|
4153
|
+
return Cl(await xl(e6, t2), n2);
|
|
4147
4154
|
};
|
|
4148
|
-
var
|
|
4149
|
-
let { _id: n2, memberId: r2, tagIds: i2, preview: a2 } = e6 ?? {}, [o2, s2, c2, l2, u2] = await Promise.all([r2 ?
|
|
4150
|
-
return { post: e6, author: o2, metrics: s2, categories:
|
|
4155
|
+
var Cl = async (e6, t2) => {
|
|
4156
|
+
let { _id: n2, memberId: r2, tagIds: i2, preview: a2 } = e6 ?? {}, [o2, s2, c2, l2, u2] = await Promise.all([r2 ? Wc(r2) : void 0, n2 ? pl(n2) : void 0, t2, vl(i2), a2 && n2 ? ll(Kc(n2, e6?.language ?? void 0), bl, `post-paywall`).catch(() => void 0) : void 0]);
|
|
4157
|
+
return { post: e6, author: o2, metrics: s2, categories: gl(e6, c2), tags: yl(e6, l2), ...u2 && { paywall: u2 } };
|
|
4151
4158
|
};
|
|
4152
|
-
var
|
|
4159
|
+
var wl = (e6) => {
|
|
4153
4160
|
let { _id: t2, categoryIds: n2, relatedPostIds: r2 } = e6 ?? {};
|
|
4154
4161
|
return { currentPostId: t2 ?? void 0, categoryIds: n2, relatedPostIds: r2 };
|
|
4155
4162
|
};
|
|
4156
|
-
var
|
|
4157
|
-
var
|
|
4163
|
+
var Tl = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
|
|
4164
|
+
var El = (e6) => {
|
|
4158
4165
|
try {
|
|
4159
4166
|
return e6.getMonitoringClient?.() ?? null;
|
|
4160
4167
|
} catch {
|
|
4161
4168
|
return null;
|
|
4162
4169
|
}
|
|
4163
4170
|
};
|
|
4164
|
-
var
|
|
4165
|
-
function
|
|
4166
|
-
let o2 =
|
|
4171
|
+
var Dl = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
|
|
4172
|
+
function Ol(e6, t2, { feature: n2, action: r2, level: i2 = `error`, contexts: a2 }) {
|
|
4173
|
+
let o2 = Dl(e6, `captureException`);
|
|
4167
4174
|
if (!o2) return;
|
|
4168
4175
|
let s2 = t2 instanceof Error ? t2 : Error(String(t2));
|
|
4169
4176
|
o2.captureException(s2, { level: i2, tags: { feature: n2, action: r2 }, ...a2 ? { contexts: a2 } : {} });
|
|
4170
4177
|
}
|
|
4171
|
-
function
|
|
4172
|
-
let a2 =
|
|
4178
|
+
function kl(e6, t2, { feature: n2, tags: r2 }, i2) {
|
|
4179
|
+
let a2 = Dl(e6, `startSpanManual`);
|
|
4173
4180
|
if (!a2) return i2;
|
|
4174
4181
|
let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
|
|
4175
4182
|
return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
|
|
4176
4183
|
}
|
|
4177
|
-
var
|
|
4184
|
+
var Al = class extends n {
|
|
4178
4185
|
state = { error: void 0 };
|
|
4179
4186
|
static getDerivedStateFromError(e6) {
|
|
4180
4187
|
return { error: e6 ?? Error(`Unknown render error`) };
|
|
4181
4188
|
}
|
|
4182
4189
|
componentDidCatch(e6, t2) {
|
|
4183
|
-
|
|
4190
|
+
Ol(this.props.monitoringClient, e6, { feature: this.props.feature, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
|
|
4184
4191
|
}
|
|
4185
4192
|
render() {
|
|
4186
4193
|
if (this.state.error === void 0) return this.props.children;
|
|
@@ -4188,13 +4195,13 @@ var kl = class extends n {
|
|
|
4188
4195
|
return this.props.fallback;
|
|
4189
4196
|
}
|
|
4190
4197
|
};
|
|
4191
|
-
var
|
|
4192
|
-
var
|
|
4198
|
+
var jl = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
|
|
4199
|
+
var Ml = (e6) => {
|
|
4193
4200
|
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;
|
|
4194
4201
|
};
|
|
4195
|
-
var
|
|
4196
|
-
var
|
|
4197
|
-
var
|
|
4202
|
+
var Nl = `postId`;
|
|
4203
|
+
var Pl = (e6) => Ml(e6?.[Nl]);
|
|
4204
|
+
var Fl = (e6) => {
|
|
4198
4205
|
let t2;
|
|
4199
4206
|
try {
|
|
4200
4207
|
t2 = m(Xn);
|
|
@@ -4203,49 +4210,49 @@ var Pl = (e6) => {
|
|
|
4203
4210
|
}
|
|
4204
4211
|
return lr(t2, e6);
|
|
4205
4212
|
};
|
|
4206
|
-
var
|
|
4207
|
-
function
|
|
4213
|
+
var Il = 1e4;
|
|
4214
|
+
function Ll(e6) {
|
|
4208
4215
|
let [t2, n2] = f(void 0);
|
|
4209
4216
|
return l(() => {
|
|
4210
4217
|
let t3 = Date.now();
|
|
4211
|
-
t3 - e6 >
|
|
4218
|
+
t3 - e6 > Il && o(() => n2(t3));
|
|
4212
4219
|
}, []), t2 ?? e6;
|
|
4213
4220
|
}
|
|
4214
|
-
var
|
|
4215
|
-
var Rl = async (e6) => {
|
|
4216
|
-
await Gs({ like: { entityId: e6, fqdn: Ll } });
|
|
4217
|
-
};
|
|
4221
|
+
var Rl = `wix.blog.v3.post`;
|
|
4218
4222
|
var zl = async (e6) => {
|
|
4219
|
-
await
|
|
4223
|
+
await Gs({ like: { entityId: e6, fqdn: Rl } });
|
|
4224
|
+
};
|
|
4225
|
+
var Bl = async (e6) => {
|
|
4226
|
+
await Ks({ fqdn: Rl, entityId: e6 });
|
|
4220
4227
|
};
|
|
4221
|
-
var
|
|
4222
|
-
var
|
|
4223
|
-
let [t2, n2] = await Promise.allSettled([qs().eq(`fqdn`,
|
|
4224
|
-
return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount:
|
|
4228
|
+
var Vl = (e6) => typeof e6 == `number` ? e6 : void 0;
|
|
4229
|
+
var Hl = async (e6) => {
|
|
4230
|
+
let [t2, n2] = await Promise.allSettled([qs().eq(`fqdn`, Rl).eq(`entityId`, e6).limit(1).find(), Sc(e6)]), r2 = n2.status === `fulfilled` ? n2.value.metrics : void 0;
|
|
4231
|
+
return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount: Vl(r2?.likes), viewCount: Vl(r2?.views), commentCount: Vl(r2?.comments) };
|
|
4225
4232
|
};
|
|
4226
|
-
var
|
|
4227
|
-
var
|
|
4233
|
+
var Ul = I(`@wix/site-service-editor-context`);
|
|
4234
|
+
var Wl = () => {
|
|
4228
4235
|
try {
|
|
4229
|
-
return !!m(
|
|
4236
|
+
return !!m(Ul).previewMode;
|
|
4230
4237
|
} catch {
|
|
4231
4238
|
return false;
|
|
4232
4239
|
}
|
|
4233
4240
|
};
|
|
4234
|
-
var
|
|
4235
|
-
var
|
|
4236
|
-
var
|
|
4241
|
+
var Gl = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
|
|
4242
|
+
var Kl = `wix-blog:post-like-toggled`;
|
|
4243
|
+
var ql = () => {
|
|
4237
4244
|
let e6 = window;
|
|
4238
|
-
return e6[
|
|
4245
|
+
return e6[Kl] ??= /* @__PURE__ */ new Map();
|
|
4239
4246
|
};
|
|
4240
|
-
var
|
|
4241
|
-
|
|
4247
|
+
var Jl = (e6) => {
|
|
4248
|
+
ql().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(Kl, { detail: e6 }));
|
|
4242
4249
|
};
|
|
4243
|
-
var
|
|
4244
|
-
var
|
|
4245
|
-
let i2 =
|
|
4250
|
+
var Yl = (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 });
|
|
4251
|
+
var Xl = (e6, t2, n2 = false, r2) => {
|
|
4252
|
+
let i2 = Wl() || n2, [a2, c2] = f(Gl), p2 = d(Gl), m2 = d(t2), h2 = d(/* @__PURE__ */ new Set()), g2 = d(false), _2 = d(false), v2 = d(void 0), y2 = Jn(), [b2, x2] = f(0);
|
|
4246
4253
|
l(() => {
|
|
4247
4254
|
let e7 = y2?.addMemberLoginListener?.(() => {
|
|
4248
|
-
|
|
4255
|
+
ql().clear(), x2((e8) => e8 + 1);
|
|
4249
4256
|
});
|
|
4250
4257
|
return () => {
|
|
4251
4258
|
e7 !== void 0 && y2?.removeMemberLoginListener?.(e7);
|
|
@@ -4254,21 +4261,21 @@ var Yl = (e6, t2, n2 = false, r2) => {
|
|
|
4254
4261
|
let S2 = s((e7) => {
|
|
4255
4262
|
let t3 = p2.current, n3 = { ...t3, ...e7 };
|
|
4256
4263
|
Object.keys(n3).every((e8) => n3[e8] === t3[e8]) || (p2.current = n3, h2.current.forEach((e8) => e8()), o(() => c2(n3)));
|
|
4257
|
-
}, []), C2 = u(() => ({ get: () =>
|
|
4264
|
+
}, []), C2 = u(() => ({ get: () => Yl(p2.current, m2.current), subscribe: (e7) => (h2.current.add(e7), () => {
|
|
4258
4265
|
h2.current.delete(e7);
|
|
4259
4266
|
}) }), []);
|
|
4260
4267
|
l(() => {
|
|
4261
4268
|
m2.current !== t2 && (m2.current = t2, h2.current.forEach((e7) => e7()));
|
|
4262
4269
|
}, [t2]), l(() => {
|
|
4263
|
-
if (v2.current !== e6 && (v2.current = e6, S2(
|
|
4270
|
+
if (v2.current !== e6 && (v2.current = e6, S2(Gl)), _2.current = false, !e6 || i2) {
|
|
4264
4271
|
S2({ isLikeCountLoaded: true });
|
|
4265
4272
|
return;
|
|
4266
4273
|
}
|
|
4267
4274
|
let t3 = false;
|
|
4268
|
-
return
|
|
4275
|
+
return Hl(e6).then(({ liked: e7, likeCount: n3, viewCount: r3, commentCount: i3 }) => {
|
|
4269
4276
|
t3 || S2({ isLikeCountLoaded: true, viewCount: r3, commentCount: i3, baselineLiked: e7, freshLikeCount: n3, ...!_2.current && { liked: e7 } });
|
|
4270
4277
|
}).catch((n3) => {
|
|
4271
|
-
t3 || S2({ isLikeCountLoaded: true }),
|
|
4278
|
+
t3 || S2({ isLikeCountLoaded: true }), Ol(r2, n3, { feature: Tl.likes, action: `read-like-state`, level: `warning`, contexts: { likes: { postId: e6 } } });
|
|
4272
4279
|
}), () => {
|
|
4273
4280
|
t3 = true;
|
|
4274
4281
|
};
|
|
@@ -4276,32 +4283,32 @@ var Yl = (e6, t2, n2 = false, r2) => {
|
|
|
4276
4283
|
if (!e6) return;
|
|
4277
4284
|
let t3 = (e7) => {
|
|
4278
4285
|
_2.current = true, S2({ liked: e7 });
|
|
4279
|
-
}, n3 =
|
|
4286
|
+
}, n3 = ql().get(e6);
|
|
4280
4287
|
n3 !== void 0 && t3(n3);
|
|
4281
4288
|
let r3 = (n4) => {
|
|
4282
4289
|
let { detail: r4 } = n4;
|
|
4283
4290
|
r4.postId === e6 && t3(r4.liked);
|
|
4284
4291
|
};
|
|
4285
|
-
return window.addEventListener(
|
|
4292
|
+
return window.addEventListener(Kl, r3), () => window.removeEventListener(Kl, r3);
|
|
4286
4293
|
}, [e6, S2]);
|
|
4287
4294
|
let ee2 = s(async (t3) => {
|
|
4288
4295
|
if (!e6 || g2.current) return;
|
|
4289
4296
|
_2.current = true;
|
|
4290
4297
|
let n3 = !p2.current.liked;
|
|
4291
|
-
if (S2({ liked: n3 }),
|
|
4298
|
+
if (S2({ liked: n3 }), Jl({ postId: e6, liked: n3 }), !i2) {
|
|
4292
4299
|
g2.current = true;
|
|
4293
4300
|
try {
|
|
4294
|
-
await (n3 ?
|
|
4301
|
+
await (n3 ? zl(e6) : Bl(e6));
|
|
4295
4302
|
} catch (t4) {
|
|
4296
|
-
S2({ liked: !n3 }),
|
|
4303
|
+
S2({ liked: !n3 }), Jl({ postId: e6, liked: !n3 }), Ol(r2, t4, { feature: Tl.likes, action: n3 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
|
|
4297
4304
|
} finally {
|
|
4298
4305
|
g2.current = false;
|
|
4299
4306
|
}
|
|
4300
4307
|
}
|
|
4301
4308
|
}, [e6, i2, r2, S2]);
|
|
4302
|
-
return { ...
|
|
4309
|
+
return { ...Yl(a2, t2), toggleLike: ee2, liveLikes: C2 };
|
|
4303
4310
|
};
|
|
4304
|
-
var
|
|
4311
|
+
var Zl = () => {
|
|
4305
4312
|
try {
|
|
4306
4313
|
let { locale: e6, language: t2 } = m(xo);
|
|
4307
4314
|
return e6 || t2;
|
|
@@ -4309,23 +4316,23 @@ var Xl = () => {
|
|
|
4309
4316
|
return;
|
|
4310
4317
|
}
|
|
4311
4318
|
};
|
|
4312
|
-
var
|
|
4319
|
+
var Ql = () => {
|
|
4313
4320
|
try {
|
|
4314
|
-
return
|
|
4321
|
+
return Yc(m(Xn));
|
|
4315
4322
|
} catch {
|
|
4316
4323
|
return;
|
|
4317
4324
|
}
|
|
4318
4325
|
};
|
|
4319
|
-
var
|
|
4320
|
-
var
|
|
4321
|
-
var
|
|
4322
|
-
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted:
|
|
4323
|
-
return { timeToRead: (t3) => e6(
|
|
4326
|
+
var $l = (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);
|
|
4327
|
+
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` };
|
|
4328
|
+
var eu = (e6, t2) => {
|
|
4329
|
+
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: $l(r2, `full`, t2) });
|
|
4330
|
+
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) } };
|
|
4324
4331
|
};
|
|
4325
|
-
var
|
|
4326
|
-
var
|
|
4327
|
-
var
|
|
4328
|
-
var
|
|
4332
|
+
var tu = i({ isEditor: false, isPreview: false });
|
|
4333
|
+
var nu = () => c(tu);
|
|
4334
|
+
var ru = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
|
|
4335
|
+
var iu = () => {
|
|
4329
4336
|
try {
|
|
4330
4337
|
let { SSR: e6, SEO: t2 } = m(Un);
|
|
4331
4338
|
return e6 || t2;
|
|
@@ -4333,159 +4340,159 @@ var ru = () => {
|
|
|
4333
4340
|
return false;
|
|
4334
4341
|
}
|
|
4335
4342
|
};
|
|
4336
|
-
var
|
|
4337
|
-
let e6 =
|
|
4338
|
-
return nu(
|
|
4339
|
-
};
|
|
4340
|
-
var
|
|
4341
|
-
var
|
|
4342
|
-
var
|
|
4343
|
-
var
|
|
4344
|
-
var
|
|
4345
|
-
var
|
|
4346
|
-
var
|
|
4347
|
-
var
|
|
4343
|
+
var au = () => {
|
|
4344
|
+
let e6 = iu();
|
|
4345
|
+
return ru(nu()) && !e6;
|
|
4346
|
+
};
|
|
4347
|
+
var ou = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4348
|
+
var $ = (e6) => ({ text: e6, html: `<p>${ou(e6)}</p>`, linkList: [] });
|
|
4349
|
+
var su = 6e4;
|
|
4350
|
+
var cu = su * 60;
|
|
4351
|
+
var lu = cu * 24;
|
|
4352
|
+
var uu = lu * 7;
|
|
4353
|
+
var du = (e6) => e6 < su ? [`second`, e6 / 1e3] : e6 < cu ? [`minute`, e6 / su] : e6 < lu ? [`hour`, e6 / cu] : [`day`, e6 / lu];
|
|
4354
|
+
var fu = (e6, t2, n2 = Date.now()) => {
|
|
4348
4355
|
let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
|
|
4349
|
-
if (i2 >= 0 && i2 <
|
|
4350
|
-
let [e7, n3] =
|
|
4356
|
+
if (i2 >= 0 && i2 < uu) {
|
|
4357
|
+
let [e7, n3] = du(i2);
|
|
4351
4358
|
return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
|
|
4352
4359
|
}
|
|
4353
4360
|
let a2 = r2.getFullYear() === new Date(n2).getFullYear();
|
|
4354
4361
|
return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
|
|
4355
4362
|
};
|
|
4356
|
-
var
|
|
4357
|
-
var
|
|
4358
|
-
var
|
|
4363
|
+
var pu = `https://static.wixstatic.com/media/`;
|
|
4364
|
+
var mu = 100;
|
|
4365
|
+
var hu = (e6, t2 = ``) => {
|
|
4359
4366
|
let n2 = e6?.profile?.photo;
|
|
4360
4367
|
if (!n2?.url) return;
|
|
4361
|
-
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(
|
|
4362
|
-
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width ||
|
|
4363
|
-
};
|
|
4364
|
-
var
|
|
4365
|
-
var
|
|
4366
|
-
var
|
|
4367
|
-
var
|
|
4368
|
-
var
|
|
4368
|
+
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(pu) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
|
|
4369
|
+
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || mu, height: n2.height || mu, alt: r2 ?? t2 };
|
|
4370
|
+
};
|
|
4371
|
+
var gu = `https://static.wixstatic.com/media/`;
|
|
4372
|
+
var _u = `wix:image://`;
|
|
4373
|
+
var vu = 1200;
|
|
4374
|
+
var yu = 800;
|
|
4375
|
+
var bu = (e6) => {
|
|
4369
4376
|
if (!e6) return;
|
|
4370
4377
|
let t2 = Number.parseInt(e6, 10);
|
|
4371
4378
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4372
4379
|
};
|
|
4373
|
-
var
|
|
4374
|
-
if (!e6.startsWith(
|
|
4380
|
+
var xu = (e6) => {
|
|
4381
|
+
if (!e6.startsWith(_u)) {
|
|
4375
4382
|
let t3 = e6.split(/[?#]/)[0];
|
|
4376
4383
|
return t3 ? { uri: t3 } : void 0;
|
|
4377
4384
|
}
|
|
4378
4385
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
|
|
4379
4386
|
if (!r2) return;
|
|
4380
4387
|
let a2 = new URLSearchParams(n2 ?? ``);
|
|
4381
|
-
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width:
|
|
4388
|
+
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: bu(a2.get(`originWidth`)), height: bu(a2.get(`originHeight`)) };
|
|
4382
4389
|
};
|
|
4383
|
-
var
|
|
4390
|
+
var Su = (e6, t2) => {
|
|
4384
4391
|
if (!e6) return;
|
|
4385
|
-
let n2 =
|
|
4392
|
+
let n2 = xu(e6);
|
|
4386
4393
|
if (!n2) return;
|
|
4387
4394
|
let r2 = n2.name ?? n2.uri;
|
|
4388
|
-
return { uri: n2.uri, url: `${
|
|
4395
|
+
return { uri: n2.uri, url: `${gu}${n2.uri}`, name: r2, width: n2.width ?? vu, height: n2.height ?? yu, alt: t2 ?? r2 };
|
|
4389
4396
|
};
|
|
4390
|
-
var
|
|
4397
|
+
var Cu = (e6) => {
|
|
4391
4398
|
let t2 = e6?.media?.wixMedia?.image;
|
|
4392
4399
|
if (!t2) return;
|
|
4393
|
-
let n2 =
|
|
4400
|
+
let n2 = xu(t2);
|
|
4394
4401
|
if (!n2) return;
|
|
4395
4402
|
let r2 = n2.name ?? n2.uri;
|
|
4396
|
-
return { uri: n2.uri, url: `${
|
|
4403
|
+
return { uri: n2.uri, url: `${gu}${n2.uri}`, name: r2, width: n2.width ?? vu, height: n2.height ?? yu, alt: e6?.media?.altText ?? e6?.title ?? r2 };
|
|
4397
4404
|
};
|
|
4398
|
-
var
|
|
4399
|
-
var
|
|
4400
|
-
var
|
|
4405
|
+
var wu = `https://static.wixstatic.com/media/`;
|
|
4406
|
+
var Tu = `wix:video://`;
|
|
4407
|
+
var Eu = (e6) => {
|
|
4401
4408
|
if (!e6) return;
|
|
4402
4409
|
let t2 = Number.parseInt(e6, 10);
|
|
4403
4410
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4404
4411
|
};
|
|
4405
|
-
var
|
|
4406
|
-
if (!e6.startsWith(
|
|
4412
|
+
var Du = (e6) => {
|
|
4413
|
+
if (!e6.startsWith(Tu)) return;
|
|
4407
4414
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
|
|
4408
4415
|
if (!r2) return;
|
|
4409
4416
|
let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
|
|
4410
|
-
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${
|
|
4417
|
+
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${wu}${a2}` : void 0, posterWidth: Eu(i2.get(`posterWidth`)), posterHeight: Eu(i2.get(`posterHeight`)) };
|
|
4411
4418
|
};
|
|
4412
|
-
var
|
|
4413
|
-
let t2 =
|
|
4419
|
+
var Ou = (e6) => {
|
|
4420
|
+
let t2 = Cu(e6), n2 = e6?.media?.wixMedia?.videoV2;
|
|
4414
4421
|
if (t2 || !n2) return t2;
|
|
4415
|
-
let r2 =
|
|
4422
|
+
let r2 = Du(n2), i2 = Su(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
|
|
4416
4423
|
return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
|
|
4417
4424
|
};
|
|
4418
|
-
var
|
|
4425
|
+
var ku = (e6) => {
|
|
4419
4426
|
if (!e6) return;
|
|
4420
4427
|
let t2 = e6 instanceof Date ? e6 : new Date(e6);
|
|
4421
4428
|
return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
|
|
4422
4429
|
};
|
|
4423
|
-
var
|
|
4424
|
-
var
|
|
4425
|
-
var
|
|
4426
|
-
let n2 =
|
|
4430
|
+
var Au = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4431
|
+
var ju = (e6, t2) => e6 && t2 ? `${e6}/${encodeURIComponent(t2)}` : void 0;
|
|
4432
|
+
var Mu = (e6, t2) => {
|
|
4433
|
+
let n2 = ju(e6, t2);
|
|
4427
4434
|
return n2 ? { href: n2, target: `_self` } : void 0;
|
|
4428
4435
|
};
|
|
4429
|
-
var
|
|
4430
|
-
var
|
|
4436
|
+
var Nu = { href: `#`, target: `_self` };
|
|
4437
|
+
var Pu = (e6, t2) => {
|
|
4431
4438
|
let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
|
|
4432
|
-
return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel:
|
|
4439
|
+
return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel: $(a2), itemCategoryLink: Mu(t2, i2 ?? ``), categoryItem: { label: a2, slug: i2 ?? `` } };
|
|
4433
4440
|
};
|
|
4434
|
-
var
|
|
4435
|
-
var
|
|
4441
|
+
var Fu = 2;
|
|
4442
|
+
var Iu = (e6) => Array.from({ length: Fu }, (t2, n2) => {
|
|
4436
4443
|
let r2 = e6.canvas.categoryNumbered(n2 + 1);
|
|
4437
|
-
return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel:
|
|
4444
|
+
return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel: $(r2), itemCategoryLink: Nu, categoryItem: { label: r2, slug: `` } };
|
|
4438
4445
|
});
|
|
4439
|
-
var
|
|
4446
|
+
var Lu = (e6, t2) => {
|
|
4440
4447
|
let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
|
|
4441
|
-
return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel:
|
|
4448
|
+
return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel: $(a2), itemTagLink: Mu(t2, i2 ?? ``), tagItem: { label: a2, slug: i2 ?? `` } };
|
|
4442
4449
|
};
|
|
4443
|
-
var
|
|
4444
|
-
var
|
|
4450
|
+
var Ru = 3;
|
|
4451
|
+
var zu = (e6) => Array.from({ length: Ru }, (t2, n2) => {
|
|
4445
4452
|
let r2 = e6.canvas.tagNumbered(n2 + 1);
|
|
4446
|
-
return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel:
|
|
4453
|
+
return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel: $(r2), itemTagLink: Nu, tagItem: { label: r2, slug: `` } };
|
|
4447
4454
|
});
|
|
4448
|
-
var
|
|
4449
|
-
var
|
|
4450
|
-
var
|
|
4451
|
-
var
|
|
4452
|
-
var
|
|
4453
|
-
var
|
|
4454
|
-
var
|
|
4455
|
-
var
|
|
4456
|
-
var
|
|
4457
|
-
let { t: a2 } = yo(), o2 =
|
|
4455
|
+
var Bu = 1;
|
|
4456
|
+
var Vu = { views: 120, comments: 4, likes: 12 };
|
|
4457
|
+
var Hu = (e6) => ({ nodes: [{ type: `PARAGRAPH`, nodes: [{ type: `TEXT`, nodes: [], textData: { text: e6, decorations: [] } }] }] });
|
|
4458
|
+
var Uu = (e6, t2, n2, r2) => $(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4459
|
+
var Wu = (e6, t2, n2) => e6 ?? (n2 ? t2 : void 0);
|
|
4460
|
+
var Gu = { nodes: [] };
|
|
4461
|
+
var Ku = () => ({ title: $(``), excerpt: $(``), coverImage: void 0, richContent: Gu, authorName: $(``), authorImage: void 0, timeToRead: $(``), publishedDate: $(``), viewCount: $(``), commentCount: $(``), likeCount: $(``), postCategories: [], postTags: [], hasCoverImage: false, hasExcerpt: false, hasTags: false, publishedDateValue: void 0, minutesToReadValue: void 0, viewCountValue: void 0, commentCountValue: void 0 });
|
|
4462
|
+
var qu = ({ post: e6, author: t2, metrics: n2, categories: r2, tags: i2 }, a2, o2, s2 = false, c2 = Date.now(), l2 = {}) => !e6 && !s2 ? Ku() : { title: $(e6?.title ?? a2.canvas.postTitle()), excerpt: $(e6?.excerpt ?? a2.canvas.excerpt()), coverImage: Ou(e6), richContent: e6?.richContent ?? Hu(a2.canvas.content()), authorName: $(t2?.profile?.nickname ?? a2.canvas.authorName()), authorImage: hu(t2, a2.canvas.authorPhotoAlt()), timeToRead: $(typeof e6?.minutesToRead == `number` && e6.minutesToRead > 0 ? a2.timeToRead(e6.minutesToRead) : s2 ? a2.timeToRead(Bu) : ``), publishedDate: $(fu(e6?.firstPublishedDate ?? new Date(c2), o2, c2)), viewCount: Uu(n2?.views, Vu.views, s2, a2.viewCount), commentCount: Uu(n2?.comments, Vu.comments, s2, a2.commentCount), likeCount: Uu(n2?.likes, Vu.likes, s2, a2.likeCount), postCategories: r2.length === 0 && s2 ? Iu(a2) : r2.map((e7) => Pu(e7, l2.category)), postTags: i2.length === 0 && s2 ? zu(a2) : i2.map((e7) => Lu(e7, l2.tag)), hasCoverImage: !e6 || e6.media?.displayed !== false && Ou(e6) !== void 0, hasExcerpt: !e6 || !!e6.excerpt?.trim(), hasTags: !e6 || i2.length > 0, publishedDateValue: ku(e6?.firstPublishedDate) ?? (s2 ? `2026-05-12T12:00:00.000Z` : void 0), minutesToReadValue: Au(e6?.minutesToRead) ?? (s2 ? Bu : void 0), viewCountValue: Wu(n2?.views, Vu.views, s2), commentCountValue: Wu(n2?.comments, Vu.comments, s2) };
|
|
4463
|
+
var Ju = ({ postWithAuthor: e6, hasError: t2, monitoringClient: n2, isPostInPreview: r2, postPageBase: i2 }) => {
|
|
4464
|
+
let { t: a2 } = yo(), o2 = Zl(), s2 = u(() => eu(a2, o2), [a2, o2]), c2 = Ll(e6.fetchedAt), l2 = au(), { isLiked: d2, likeCount: f2, isLikeCountLoaded: p2, viewCount: m2, commentCount: h2, toggleLike: g2, liveLikes: _2 } = Xl(e6.post?._id ?? void 0, e6.metrics?.likes ?? 0, r2, n2), v2 = Fl($n), y2 = Fl(`tag`), b2 = u(() => wl(e6.post), [e6]), x2 = Ql(), S2 = u(() => e6.post?.richContent && e6.paywall ? Zc(e6.post.richContent, e6.paywall, x2) : void 0, [e6, x2]);
|
|
4458
4465
|
return u(() => {
|
|
4459
|
-
let n3 =
|
|
4460
|
-
return { ...n3, ...S2 && { richContent: S2 }, relatedPostsSource: b2, viewCountValue: m2 ?? n3.viewCountValue, commentCountValue: h2 ?? n3.commentCountValue, postUrl: r2 || !e6.post ? void 0 : cr(e6.post, i2)?.href, ...e6.post && (e6.metrics?.likes !== void 0 || p2) ? { likeCount:
|
|
4466
|
+
let n3 = qu(!e6.post && l2 && e6.demoPost ? { ...e6, post: e6.demoPost } : e6, s2, o2, l2, c2, { category: v2, tag: y2 });
|
|
4467
|
+
return { ...n3, ...S2 && { richContent: S2 }, relatedPostsSource: b2, viewCountValue: m2 ?? n3.viewCountValue, commentCountValue: h2 ?? n3.commentCountValue, postUrl: r2 || !e6.post ? void 0 : cr(e6.post, i2)?.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 };
|
|
4461
4468
|
}, [e6, t2, b2, S2, s2, o2, c2, f2, d2, p2, m2, h2, g2, _2, l2, r2, i2, v2, y2]);
|
|
4462
4469
|
};
|
|
4463
|
-
var
|
|
4464
|
-
var
|
|
4465
|
-
var
|
|
4470
|
+
var Yu = (e6) => ({ post: e6, hasError: false });
|
|
4471
|
+
var Xu = () => ({ post: { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: Date.now() }, hasError: true });
|
|
4472
|
+
var Zu = (e6) => {
|
|
4466
4473
|
throw e6;
|
|
4467
4474
|
};
|
|
4468
|
-
var
|
|
4475
|
+
var Qu = { ...Ku(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
|
|
4469
4476
|
}, liveLikes: void 0, postUrl: void 0, clockValue: 0, relatedPostsSource: { currentPostId: void 0, categoryIds: void 0, relatedPostIds: void 0 }, isLoadingPost: true, hasError: false, isEmpty: false };
|
|
4470
|
-
var
|
|
4471
|
-
var
|
|
4472
|
-
var
|
|
4473
|
-
var
|
|
4474
|
-
let { post: a2, hasError: o2 } = Bn(r2), c2 = Yn(a2, s(() => n2 ?
|
|
4477
|
+
var $u = { ...Qu, isLoadingPost: false, hasError: true, isEmpty: true };
|
|
4478
|
+
var ed = 2500;
|
|
4479
|
+
var td = Promise.resolve(Yu({ post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: 0 }));
|
|
4480
|
+
var nd = ({ children: t2, postId: n2, postLoadPromise: r2, monitoringClient: i2 }) => {
|
|
4481
|
+
let { post: a2, hasError: o2 } = Bn(r2), c2 = Yn(a2, s(() => n2 ? xl(n2) : Promise.resolve(void 0), [n2])), l2 = Ju({ postWithAuthor: c2, hasError: o2, monitoringClient: i2, isPostInPreview: false, postPageBase: ur() });
|
|
4475
4482
|
return pr(dr.postByIdProvider, o2 ? `error` : c2.post ? `data` : `empty`), h(e, { value: l2, children: t2 });
|
|
4476
4483
|
};
|
|
4477
|
-
function
|
|
4478
|
-
let i2 =
|
|
4479
|
-
let e6 =
|
|
4480
|
-
return
|
|
4481
|
-
} }),
|
|
4482
|
-
return h(bo, { i18n: c2, children: g(r, { fallback: h(e, { value:
|
|
4484
|
+
function rd({ children: t2, postPicker: n2 }) {
|
|
4485
|
+
let i2 = Pl(n2), a2 = Wn(), o2 = hr(), s2 = u(() => El(Rn), []), { i18n: c2, locale: l2 } = Go($o), d2 = Kn(() => i2 ? Hn(Mo({ key: `blog-builder:post-by-id:${i2}`, warmupData: o2, fetchData: () => {
|
|
4486
|
+
let e6 = Sl(i2, a2);
|
|
4487
|
+
return jl(kl(s2, `post-by-id-read`, { feature: Tl.post }, a2 ? ll(e6, ed, `post-by-id`) : e6));
|
|
4488
|
+
} }), Yu, a2 ? Zu : Xu) : td, [i2, a2, o2, s2]);
|
|
4489
|
+
return h(bo, { i18n: c2, children: g(r, { fallback: h(e, { value: Qu, children: t2 }), children: [h(Wo, { i18n: c2, locale: l2 }), h(Al, { fallback: h(e, { value: $u, children: t2 }), feature: Tl.post, monitoringClient: s2, rethrow: a2, children: h(nd, { postId: i2, postLoadPromise: d2, monitoringClient: s2, children: t2 }, i2 ?? ``) })] }) });
|
|
4483
4490
|
}
|
|
4484
|
-
var
|
|
4491
|
+
var id = jn(`474ee948-702b-4c0f-970e-b5319eff6d8b`);
|
|
4485
4492
|
export {
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4493
|
+
rd as PostByIdProvider,
|
|
4494
|
+
rd as default,
|
|
4495
|
+
id as injectAccessTokenGetter,
|
|
4489
4496
|
t as usePostByIdContext
|
|
4490
4497
|
};
|
|
4491
4498
|
//# sourceMappingURL=context-post-by-id-context-provider.mjs.map
|