@wix/blog 1.0.713 → 1.0.715

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,10 +30,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // context-post-by-id.ts
31
31
  var context_post_by_id_exports = {};
32
32
  __export(context_post_by_id_exports, {
33
- PostByIdProvider: () => hd,
34
- default: () => hd,
35
- injectAccessTokenGetter: () => gd,
36
- usePostByIdContext: () => dd
33
+ PostByIdProvider: () => gd,
34
+ default: () => gd,
35
+ injectAccessTokenGetter: () => _d,
36
+ usePostByIdContext: () => fd
37
37
  });
38
38
  module.exports = __toCommonJS(context_post_by_id_exports);
39
39
 
@@ -1104,8 +1104,7 @@ var rr = (e6) => {
1104
1104
  let t2;
1105
1105
  try {
1106
1106
  let n3 = e6.appSectionRelativeUrl(Qn, tr);
1107
- if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, nr) && !n3?.endsWith(`/post-page`)) return;
1108
- t2 = e6.appSectionRelativeUrl(Qn, tr, true);
1107
+ if (t2 = e6.appSectionRelativeUrl(Qn, tr, true), n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, nr) && !n3?.endsWith(`/post-page`) && t2 === n3) return;
1109
1108
  } catch {
1110
1109
  return;
1111
1110
  }
@@ -4414,31 +4413,38 @@ var tu = (e6, t2, n2 = false, r2) => {
4414
4413
  }, [e6, i2, r2, S2]);
4415
4414
  return { ...eu(a2, t2), toggleLike: ee2, liveLikes: C2 };
4416
4415
  };
4417
- var nu = () => {
4416
+ var nu = I(`@wix/viewer-service-multilingual`);
4417
+ var ru = () => {
4418
+ let e6;
4418
4419
  try {
4419
- let { locale: e6, language: t2 } = (0, import_services_manager_react.useService)(xo);
4420
- return e6 || t2;
4420
+ let { multilingualEnabled: t3, currentLocale: n3 } = (0, import_services_manager_react.useService)(nu);
4421
+ t3 && n3 && !n3.primaryLocale && (e6 = n3.regionalFormat);
4421
4422
  } catch {
4422
- return;
4423
4423
  }
4424
+ let t2, n2;
4425
+ try {
4426
+ ({ locale: t2, language: n2 } = (0, import_services_manager_react.useService)(xo));
4427
+ } catch {
4428
+ }
4429
+ return e6 || t2 || n2;
4424
4430
  };
4425
- var ru = () => {
4431
+ var iu = () => {
4426
4432
  try {
4427
4433
  return Xc((0, import_services_manager_react.useService)(Zn));
4428
4434
  } catch {
4429
4435
  return;
4430
4436
  }
4431
4437
  };
4432
- var iu = (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);
4438
+ var au = (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);
4433
4439
  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` };
4434
- var au = (e6, t2) => {
4435
- let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: iu(r2, `full`, t2) });
4440
+ var ou = (e6, t2) => {
4441
+ let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: au(r2, `full`, t2) });
4436
4442
  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) } };
4437
4443
  };
4438
- var ou = (0, import_react.createContext)({ isEditor: false, isPreview: false });
4439
- var su = () => (0, import_react.useContext)(ou);
4440
- var cu = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
4441
- var lu = () => {
4444
+ var su = (0, import_react.createContext)({ isEditor: false, isPreview: false });
4445
+ var cu = () => (0, import_react.useContext)(su);
4446
+ var lu = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
4447
+ var uu = () => {
4442
4448
  try {
4443
4449
  let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(Wn);
4444
4450
  return e6 || t2;
@@ -4446,186 +4452,186 @@ var lu = () => {
4446
4452
  return false;
4447
4453
  }
4448
4454
  };
4449
- var uu = () => {
4450
- let e6 = lu();
4451
- return cu(su()) && !e6;
4455
+ var du = () => {
4456
+ let e6 = uu();
4457
+ return lu(cu()) && !e6;
4452
4458
  };
4453
- var du = (e6) => ({ href: e6 ?? `#`, target: `_self` });
4454
- var fu = (e6) => {
4459
+ var fu = (e6) => ({ href: e6 ?? `#`, target: `_self` });
4460
+ var pu = (e6) => {
4455
4461
  if (!e6) return;
4456
4462
  let t2 = e6 instanceof Date ? e6 : new Date(e6);
4457
4463
  return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
4458
4464
  };
4459
- var pu = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
4460
- var mu = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
4461
- var $ = (e6) => ({ text: e6, html: `<p>${mu(e6)}</p>`, linkList: [] });
4462
- var hu = 6e4;
4463
- var gu = hu * 60;
4464
- var _u = gu * 24;
4465
- var vu = _u * 7;
4466
- var yu = (e6) => e6 < hu ? [`second`, e6 / 1e3] : e6 < gu ? [`minute`, e6 / hu] : e6 < _u ? [`hour`, e6 / gu] : [`day`, e6 / _u];
4467
- var bu = (e6, t2, n2 = Date.now()) => {
4465
+ var mu = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
4466
+ var hu = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
4467
+ var $ = (e6) => ({ text: e6, html: `<p>${hu(e6)}</p>`, linkList: [] });
4468
+ var gu = 6e4;
4469
+ var _u = gu * 60;
4470
+ var vu = _u * 24;
4471
+ var yu = vu * 7;
4472
+ var bu = (e6) => e6 < gu ? [`second`, e6 / 1e3] : e6 < _u ? [`minute`, e6 / gu] : e6 < vu ? [`hour`, e6 / _u] : [`day`, e6 / vu];
4473
+ var xu = (e6, t2, n2 = Date.now()) => {
4468
4474
  let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
4469
- if (i2 >= 0 && i2 < vu) {
4470
- let [e7, n3] = yu(i2);
4475
+ if (i2 >= 0 && i2 < yu) {
4476
+ let [e7, n3] = bu(i2);
4471
4477
  return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
4472
4478
  }
4473
4479
  let a2 = r2.getFullYear() === new Date(n2).getFullYear();
4474
4480
  return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
4475
4481
  };
4476
- var xu = `https://static.wixstatic.com/media/`;
4477
- var Su = 100;
4478
- var Cu = (e6, t2 = ``) => {
4482
+ var Su = `https://static.wixstatic.com/media/`;
4483
+ var Cu = 100;
4484
+ var wu = (e6, t2 = ``) => {
4479
4485
  let n2 = e6?.profile?.photo;
4480
4486
  if (!n2?.url) return;
4481
- let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(xu) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
4482
- return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || Su, height: n2.height || Su, alt: r2 ?? t2 };
4483
- };
4484
- var wu = `https://static.wixstatic.com/media/`;
4485
- var Tu = `wix:image://`;
4486
- var Eu = 1200;
4487
- var Du = 800;
4488
- var Ou = (e6) => {
4487
+ let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(Su) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
4488
+ return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || Cu, height: n2.height || Cu, alt: r2 ?? t2 };
4489
+ };
4490
+ var Tu = `https://static.wixstatic.com/media/`;
4491
+ var Eu = `wix:image://`;
4492
+ var Du = 1200;
4493
+ var Ou = 800;
4494
+ var ku = (e6) => {
4489
4495
  if (!e6) return;
4490
4496
  let t2 = Number.parseInt(e6, 10);
4491
4497
  return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
4492
4498
  };
4493
- var ku = (e6) => {
4494
- if (!e6.startsWith(Tu)) {
4499
+ var Au = (e6) => {
4500
+ if (!e6.startsWith(Eu)) {
4495
4501
  let t3 = e6.split(/[?#]/)[0];
4496
4502
  return t3 ? { uri: t3 } : void 0;
4497
4503
  }
4498
4504
  let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
4499
4505
  if (!r2) return;
4500
4506
  let a2 = new URLSearchParams(n2 ?? ``);
4501
- return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: Ou(a2.get(`originWidth`)), height: Ou(a2.get(`originHeight`)) };
4507
+ return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: ku(a2.get(`originWidth`)), height: ku(a2.get(`originHeight`)) };
4502
4508
  };
4503
- var Au = (e6, t2) => {
4509
+ var ju = (e6, t2) => {
4504
4510
  if (!e6) return;
4505
- let n2 = ku(e6);
4511
+ let n2 = Au(e6);
4506
4512
  if (!n2) return;
4507
4513
  let r2 = n2.name ?? n2.uri;
4508
- return { uri: n2.uri, url: `${wu}${n2.uri}`, name: r2, width: n2.width ?? Eu, height: n2.height ?? Du, alt: t2 ?? r2 };
4514
+ return { uri: n2.uri, url: `${Tu}${n2.uri}`, name: r2, width: n2.width ?? Du, height: n2.height ?? Ou, alt: t2 ?? r2 };
4509
4515
  };
4510
- var ju = (e6) => {
4516
+ var Mu = (e6) => {
4511
4517
  let t2 = e6?.media?.wixMedia?.image;
4512
4518
  if (!t2) return;
4513
- let n2 = ku(t2);
4519
+ let n2 = Au(t2);
4514
4520
  if (!n2) return;
4515
4521
  let r2 = n2.name ?? n2.uri;
4516
- return { uri: n2.uri, url: `${wu}${n2.uri}`, name: r2, width: n2.width ?? Eu, height: n2.height ?? Du, alt: e6?.media?.altText ?? e6?.title ?? r2 };
4522
+ return { uri: n2.uri, url: `${Tu}${n2.uri}`, name: r2, width: n2.width ?? Du, height: n2.height ?? Ou, alt: e6?.media?.altText ?? e6?.title ?? r2 };
4517
4523
  };
4518
- var Mu = `https://static.wixstatic.com/media/`;
4519
- var Nu = `wix:video://`;
4520
- var Pu = (e6) => {
4524
+ var Nu = `https://static.wixstatic.com/media/`;
4525
+ var Pu = `wix:video://`;
4526
+ var Fu = (e6) => {
4521
4527
  if (!e6) return;
4522
4528
  let t2 = Number.parseInt(e6, 10);
4523
4529
  return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
4524
4530
  };
4525
- var Fu = (e6) => {
4526
- if (!e6.startsWith(Nu)) return;
4531
+ var Iu = (e6) => {
4532
+ if (!e6.startsWith(Pu)) return;
4527
4533
  let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
4528
4534
  if (!r2) return;
4529
4535
  let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
4530
- return { id: decodeURIComponent(r2), posterUrl: a2 ? `${Mu}${a2}` : void 0, posterWidth: Pu(i2.get(`posterWidth`)), posterHeight: Pu(i2.get(`posterHeight`)) };
4536
+ return { id: decodeURIComponent(r2), posterUrl: a2 ? `${Nu}${a2}` : void 0, posterWidth: Fu(i2.get(`posterWidth`)), posterHeight: Fu(i2.get(`posterHeight`)) };
4531
4537
  };
4532
- var Iu = [/https?:\/\/(?:www\.|m\.)?youtube\.com\/watch\?(?:[^#]*&)?v=([\w-]+)/i, /https?:\/\/(?:www\.)?youtube\.com\/embed\/([\w-]+)/i, /https?:\/\/youtu\.be\/([\w-]+)/i];
4533
- var Lu = [/https?:\/\/player\.vimeo\.com\/video\/(\d+)/i, /https?:\/\/vimeo\.com\/(\d+)/i];
4534
- var Ru = (e6, t2) => {
4538
+ var Lu = [/https?:\/\/(?:www\.|m\.)?youtube\.com\/watch\?(?:[^#]*&)?v=([\w-]+)/i, /https?:\/\/(?:www\.)?youtube\.com\/embed\/([\w-]+)/i, /https?:\/\/youtu\.be\/([\w-]+)/i];
4539
+ var Ru = [/https?:\/\/player\.vimeo\.com\/video\/(\d+)/i, /https?:\/\/vimeo\.com\/(\d+)/i];
4540
+ var zu = (e6, t2) => {
4535
4541
  for (let n2 of e6) {
4536
4542
  let e7 = n2.exec(t2);
4537
4543
  if (e7) return e7[1];
4538
4544
  }
4539
4545
  };
4540
- var zu = (e6) => {
4541
- let t2 = Ru(Iu, e6);
4546
+ var Bu = (e6) => {
4547
+ let t2 = zu(Lu, e6);
4542
4548
  if (t2) return { provider: `youtube`, embedUrl: `https://www.youtube.com/embed/${t2}?autoplay=1` };
4543
- let n2 = Ru(Lu, e6);
4549
+ let n2 = zu(Ru, e6);
4544
4550
  return n2 ? { provider: `vimeo`, embedUrl: `https://player.vimeo.com/video/${n2}?autoplay=1` } : { provider: `unknown` };
4545
4551
  };
4546
- var Bu = (e6, t2 = []) => {
4552
+ var Vu = (e6, t2 = []) => {
4547
4553
  let n2 = e6?.media;
4548
4554
  if (!n2 || n2.displayed === false) return;
4549
- let r2 = ju(e6);
4555
+ let r2 = Mu(e6);
4550
4556
  if (r2) return { kind: `image`, image: r2 };
4551
- let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? Fu(n2.wixMedia.videoV2) : void 0;
4557
+ let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? Iu(n2.wixMedia.videoV2) : void 0;
4552
4558
  if (a2) return { kind: `wixVideo`, ...a2, sources: t2, altText: i2 };
4553
4559
  let o2 = n2.embedMedia?.video?.url;
4554
4560
  if (o2) {
4555
4561
  let { thumbnail: e7 } = n2.embedMedia ?? {};
4556
- return { kind: `embed`, videoUrl: o2, ...zu(o2), thumbnailUrl: e7?.url, thumbnailWidth: e7?.width, thumbnailHeight: e7?.height, altText: i2 };
4562
+ return { kind: `embed`, videoUrl: o2, ...Bu(o2), thumbnailUrl: e7?.url, thumbnailWidth: e7?.width, thumbnailHeight: e7?.height, altText: i2 };
4557
4563
  }
4558
4564
  };
4559
- var Vu = (e6) => {
4560
- let t2 = ju(e6), n2 = e6?.media?.wixMedia?.videoV2;
4565
+ var Hu = (e6) => {
4566
+ let t2 = Mu(e6), n2 = e6?.media?.wixMedia?.videoV2;
4561
4567
  if (t2 || !n2) return t2;
4562
- let r2 = Fu(n2), i2 = Au(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
4568
+ let r2 = Iu(n2), i2 = ju(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
4563
4569
  return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
4564
4570
  };
4565
- var Hu = (e6, t2) => e6 && t2 ? `${e6}/${encodeURIComponent(t2)}` : void 0;
4566
- var Uu = (e6, t2) => {
4567
- let n2 = Hu(e6, t2);
4571
+ var Uu = (e6, t2) => e6 && t2 ? `${e6}/${encodeURIComponent(t2)}` : void 0;
4572
+ var Wu = (e6, t2) => {
4573
+ let n2 = Uu(e6, t2);
4568
4574
  return n2 ? { href: n2, target: `_self` } : void 0;
4569
4575
  };
4570
- var Wu = { href: `#`, target: `_self` };
4571
- var Gu = (e6, t2) => {
4576
+ var Gu = { href: `#`, target: `_self` };
4577
+ var Ku = (e6, t2) => {
4572
4578
  let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
4573
- return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel: $(a2), itemCategoryLink: Uu(t2, i2 ?? ``), categoryItem: { label: a2, slug: i2 ?? `` } };
4579
+ return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel: $(a2), itemCategoryLink: Wu(t2, i2 ?? ``), categoryItem: { label: a2, slug: i2 ?? `` } };
4574
4580
  };
4575
- var Ku = 2;
4576
- var qu = (e6) => Array.from({ length: Ku }, (t2, n2) => {
4581
+ var qu = 2;
4582
+ var Ju = (e6) => Array.from({ length: qu }, (t2, n2) => {
4577
4583
  let r2 = e6.canvas.categoryNumbered(n2 + 1);
4578
- return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel: $(r2), itemCategoryLink: Wu, categoryItem: { label: r2, slug: `` } };
4584
+ return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel: $(r2), itemCategoryLink: Gu, categoryItem: { label: r2, slug: `` } };
4579
4585
  });
4580
- var Ju = (e6, t2) => {
4586
+ var Yu = (e6, t2) => {
4581
4587
  let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
4582
- return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel: $(a2), itemTagLink: Uu(t2, i2 ?? ``), tagItem: { label: a2, slug: i2 ?? `` } };
4588
+ return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel: $(a2), itemTagLink: Wu(t2, i2 ?? ``), tagItem: { label: a2, slug: i2 ?? `` } };
4583
4589
  };
4584
- var Yu = 3;
4585
- var Xu = (e6) => Array.from({ length: Yu }, (t2, n2) => {
4590
+ var Xu = 3;
4591
+ var Zu = (e6) => Array.from({ length: Xu }, (t2, n2) => {
4586
4592
  let r2 = e6.canvas.tagNumbered(n2 + 1);
4587
- return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel: $(r2), itemTagLink: Wu, tagItem: { label: r2, slug: `` } };
4593
+ return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel: $(r2), itemTagLink: Gu, tagItem: { label: r2, slug: `` } };
4588
4594
  });
4589
- var Zu = 1;
4590
- var Qu = { views: 120, comments: 4, likes: 12 };
4591
- var $u = (e6) => ({ nodes: [{ type: `PARAGRAPH`, nodes: [{ type: `TEXT`, nodes: [], textData: { text: e6, decorations: [] } }] }] });
4592
- var ed = (e6, t2, n2, r2) => $(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
4593
- var td = (e6, t2, n2) => e6 ?? (n2 ? t2 : void 0);
4594
- var nd = { nodes: [] };
4595
- var rd = () => ({ title: $(``), excerpt: $(``), coverImage: void 0, coverMedia: void 0, richContent: nd, authorName: $(``), authorImage: void 0, timeToRead: $(``), publishedDate: $(``), viewCount: $(``), commentCount: $(``), likeCount: $(``), postCategories: [], itemCategoryLabel: $(``), postTags: [], hasCoverImage: false, hasExcerpt: false, hasTags: false, publishedDateValue: void 0, minutesToReadValue: void 0, viewCountValue: void 0, commentCountValue: void 0 });
4596
- var id = ({ post: e6, author: t2, metrics: n2, categories: r2, tags: i2, videoSources: a2 }, o2, s2, c2 = false, l2 = Date.now(), u2 = {}) => !e6 && !c2 ? rd() : { title: $(e6?.title ?? o2.canvas.postTitle()), excerpt: $(e6?.excerpt ?? o2.canvas.excerpt()), coverImage: Vu(e6), coverMedia: Bu(e6, a2), richContent: e6?.richContent ?? $u(o2.canvas.content()), authorName: $(t2?.profile?.nickname ?? o2.canvas.authorName()), authorImage: Cu(t2, o2.canvas.authorPhotoAlt()), timeToRead: $(typeof e6?.minutesToRead == `number` && e6.minutesToRead > 0 ? o2.timeToRead(e6.minutesToRead) : c2 ? o2.timeToRead(Zu) : ``), publishedDate: $(bu(e6?.firstPublishedDate ?? new Date(l2), s2, l2)), viewCount: ed(n2?.views, Qu.views, c2, o2.viewCount), commentCount: ed(n2?.comments, Qu.comments, c2, o2.commentCount), likeCount: ed(n2?.likes, Qu.likes, c2, o2.likeCount), postCategories: r2.length === 0 && c2 ? qu(o2) : r2.map((e7) => Gu(e7, u2.category)), itemCategoryLabel: $(r2[0]?.label ?? (c2 ? o2.canvas.category() : ``)), postTags: i2.length === 0 && c2 ? Xu(o2) : i2.map((e7) => Ju(e7, u2.tag)), hasCoverImage: !e6 || e6.media?.displayed !== false && Vu(e6) !== void 0, hasExcerpt: !e6 || !!e6.excerpt?.trim(), hasTags: !e6 || i2.length > 0, publishedDateValue: fu(e6?.firstPublishedDate) ?? (c2 ? `2026-05-12T12:00:00.000Z` : void 0), minutesToReadValue: pu(e6?.minutesToRead) ?? (c2 ? Zu : void 0), viewCountValue: td(n2?.views, Qu.views, c2), commentCountValue: td(n2?.comments, Qu.comments, c2) };
4597
- var ad = ({ postWithAuthor: e6, hasError: t2, monitoringClient: n2, isPostInPreview: r2, postPageBase: i2 }) => {
4598
- let { t: a2 } = yo(), o2 = nu(), s2 = (0, import_react.useMemo)(() => au(a2, o2), [a2, o2]), c2 = Hl(e6.fetchedAt), l2 = uu(), { isLiked: d2, likeCount: f2, isLikeCountLoaded: p2, viewCount: m2, commentCount: h2, toggleLike: g2, liveLikes: _2 } = tu(e6.post?._id ?? void 0, e6.metrics?.likes ?? 0, r2, n2), v2 = Bl(er), y2 = Bl(`tag`), b2 = (0, import_react.useMemo)(() => kl(e6.post), [e6]), x2 = ru(), S2 = (0, import_react.useMemo)(() => e6.post?.richContent && e6.paywall ? Qc(e6.post.richContent, e6.paywall, x2) : void 0, [e6, x2]);
4595
+ var Qu = 1;
4596
+ var $u = { views: 120, comments: 4, likes: 12 };
4597
+ var ed = (e6) => ({ nodes: [{ type: `PARAGRAPH`, nodes: [{ type: `TEXT`, nodes: [], textData: { text: e6, decorations: [] } }] }] });
4598
+ var td = (e6, t2, n2, r2) => $(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
4599
+ var nd = (e6, t2, n2) => e6 ?? (n2 ? t2 : void 0);
4600
+ var rd = { nodes: [] };
4601
+ var id = () => ({ title: $(``), excerpt: $(``), coverImage: void 0, coverMedia: void 0, richContent: rd, authorName: $(``), authorImage: void 0, timeToRead: $(``), publishedDate: $(``), viewCount: $(``), commentCount: $(``), likeCount: $(``), postCategories: [], itemCategoryLabel: $(``), postTags: [], hasCoverImage: false, hasExcerpt: false, hasTags: false, publishedDateValue: void 0, minutesToReadValue: void 0, viewCountValue: void 0, commentCountValue: void 0 });
4602
+ var ad = ({ post: e6, author: t2, metrics: n2, categories: r2, tags: i2, videoSources: a2 }, o2, s2, c2 = false, l2 = Date.now(), u2 = {}) => !e6 && !c2 ? id() : { title: $(e6?.title ?? o2.canvas.postTitle()), excerpt: $(e6?.excerpt ?? o2.canvas.excerpt()), coverImage: Hu(e6), coverMedia: Vu(e6, a2), richContent: e6?.richContent ?? ed(o2.canvas.content()), authorName: $(t2?.profile?.nickname ?? o2.canvas.authorName()), authorImage: wu(t2, o2.canvas.authorPhotoAlt()), timeToRead: $(typeof e6?.minutesToRead == `number` && e6.minutesToRead > 0 ? o2.timeToRead(e6.minutesToRead) : c2 ? o2.timeToRead(Qu) : ``), publishedDate: $(xu(e6?.firstPublishedDate ?? new Date(l2), s2, l2)), viewCount: td(n2?.views, $u.views, c2, o2.viewCount), commentCount: td(n2?.comments, $u.comments, c2, o2.commentCount), likeCount: td(n2?.likes, $u.likes, c2, o2.likeCount), postCategories: r2.length === 0 && c2 ? Ju(o2) : r2.map((e7) => Ku(e7, u2.category)), itemCategoryLabel: $(r2[0]?.label ?? (c2 ? o2.canvas.category() : ``)), postTags: i2.length === 0 && c2 ? Zu(o2) : i2.map((e7) => Yu(e7, u2.tag)), hasCoverImage: !e6 || e6.media?.displayed !== false && Hu(e6) !== void 0, hasExcerpt: !e6 || !!e6.excerpt?.trim(), hasTags: !e6 || i2.length > 0, publishedDateValue: pu(e6?.firstPublishedDate) ?? (c2 ? `2026-05-12T12:00:00.000Z` : void 0), minutesToReadValue: mu(e6?.minutesToRead) ?? (c2 ? Qu : void 0), viewCountValue: nd(n2?.views, $u.views, c2), commentCountValue: nd(n2?.comments, $u.comments, c2) };
4603
+ var od = ({ postWithAuthor: e6, hasError: t2, monitoringClient: n2, isPostInPreview: r2, postPageBase: i2 }) => {
4604
+ let { t: a2 } = yo(), o2 = ru(), s2 = (0, import_react.useMemo)(() => ou(a2, o2), [a2, o2]), c2 = Hl(e6.fetchedAt), l2 = du(), { isLiked: d2, likeCount: f2, isLikeCountLoaded: p2, viewCount: m2, commentCount: h2, toggleLike: g2, liveLikes: _2 } = tu(e6.post?._id ?? void 0, e6.metrics?.likes ?? 0, r2, n2), v2 = Bl(er), y2 = Bl(`tag`), b2 = (0, import_react.useMemo)(() => kl(e6.post), [e6]), x2 = iu(), S2 = (0, import_react.useMemo)(() => e6.post?.richContent && e6.paywall ? Qc(e6.post.richContent, e6.paywall, x2) : void 0, [e6, x2]);
4599
4605
  return (0, import_react.useMemo)(() => {
4600
- let n3 = id(!e6.post && l2 && e6.demoPost ? { ...e6, post: e6.demoPost } : e6, s2, o2, l2, c2, { category: v2, tag: y2 }), a3 = r2 || !e6.post ? void 0 : lr(e6.post, i2), u2 = a3 ?? (l2 ? du(i2) : void 0);
4606
+ let n3 = ad(!e6.post && l2 && e6.demoPost ? { ...e6, post: e6.demoPost } : e6, s2, o2, l2, c2, { category: v2, tag: y2 }), a3 = r2 || !e6.post ? void 0 : lr(e6.post, i2), u2 = a3 ?? (l2 ? fu(i2) : void 0);
4601
4607
  return { ...n3, ...S2 && { richContent: S2 }, relatedPostsSource: b2, commentingEnabled: e6.post?.commentingEnabled ?? void 0, viewCountValue: m2 ?? n3.viewCountValue, commentCountValue: h2 ?? n3.commentCountValue, itemLink: u2, postUrl: a3?.href, ...e6.post && (e6.metrics?.likes !== void 0 || p2) ? { likeCount: $(s2.likeCount(f2)) } : {}, isLiked: d2, likeCountValue: f2, isLikeCountLoaded: p2, toggleLike: g2, liveLikes: _2, clockValue: c2, isLoadingPost: false, hasError: t2, isEmpty: !e6.post && !l2 };
4602
4608
  }, [e6, t2, b2, S2, s2, o2, c2, f2, d2, p2, m2, h2, g2, _2, l2, r2, i2, v2, y2]);
4603
4609
  };
4604
- var od = (e6) => ({ post: e6, hasError: false });
4605
- var sd = () => ({ post: { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: Date.now() }, hasError: true });
4606
- var cd = (e6) => {
4610
+ var sd = (e6) => ({ post: e6, hasError: false });
4611
+ var cd = () => ({ post: { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: Date.now() }, hasError: true });
4612
+ var ld = (e6) => {
4607
4613
  throw e6;
4608
4614
  };
4609
- var ld = { ...rd(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
4615
+ var ud = { ...id(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
4610
4616
  }, liveLikes: void 0, postUrl: void 0, itemLink: void 0, clockValue: 0, relatedPostsSource: { currentPostId: void 0, categoryIds: void 0, relatedPostIds: void 0 }, commentingEnabled: void 0, isLoadingPost: true, hasError: false, isEmpty: false };
4611
- var ud = { ...ld, isLoadingPost: false, hasError: true, isEmpty: true };
4612
- function dd() {
4617
+ var dd = { ...ud, isLoadingPost: false, hasError: true, isEmpty: true };
4618
+ function fd() {
4613
4619
  return (0, import_post_context_provider.usePostContext)();
4614
4620
  }
4615
- var fd = 2500;
4616
- var pd = Promise.resolve(od({ post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: 0 }));
4617
- var md = ({ children: t2, postId: n2, postLoadPromise: r2, monitoringClient: i2 }) => {
4618
- let { post: a2, hasError: o2 } = Vn(r2), c2 = Xn(a2, (0, import_react.useCallback)(() => n2 ? El(n2) : Promise.resolve(void 0), [n2])), l2 = ad({ postWithAuthor: c2, hasError: o2, monitoringClient: i2, isPostInPreview: false, postPageBase: dr() });
4621
+ var pd = 2500;
4622
+ var md = Promise.resolve(sd({ post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: 0 }));
4623
+ var hd = ({ children: t2, postId: n2, postLoadPromise: r2, monitoringClient: i2 }) => {
4624
+ let { post: a2, hasError: o2 } = Vn(r2), c2 = Xn(a2, (0, import_react.useCallback)(() => n2 ? El(n2) : Promise.resolve(void 0), [n2])), l2 = od({ postWithAuthor: c2, hasError: o2, monitoringClient: i2, isPostInPreview: false, postPageBase: dr() });
4619
4625
  return mr(fr.postByIdProvider, o2 ? `error` : c2.post ? `data` : `empty`), (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: l2, children: t2 });
4620
4626
  };
4621
- function hd({ children: t2, postPicker: n2 }) {
4627
+ function gd({ children: t2, postPicker: n2 }) {
4622
4628
  let i2 = zl(n2), a2 = Gn(), o2 = gr(), s2 = (0, import_react.useMemo)(() => jl(zn), []), { i18n: c2, locale: l2 } = Go($o), d2 = qn(() => i2 ? Un(Mo({ key: `blog-builder:post-by-id:${i2}`, warmupData: o2, fetchData: () => {
4623
4629
  let e6 = Dl(i2, a2);
4624
- return Il(Pl(s2, `post-by-id-read`, { feature: Al.post }, a2 ? fl(e6, fd, `post-by-id`) : e6));
4625
- } }), od, a2 ? cd : sd) : pd, [i2, a2, o2, s2]);
4626
- return (0, import_jsx_runtime.jsx)(bo, { i18n: c2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: ld, children: t2 }), children: [(0, import_jsx_runtime.jsx)(Wo, { i18n: c2, locale: l2 }), (0, import_jsx_runtime.jsx)(Fl, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: ud, children: t2 }), feature: Al.post, monitoringClient: s2, rethrow: a2, children: (0, import_jsx_runtime.jsx)(md, { postId: i2, postLoadPromise: d2, monitoringClient: s2, children: t2 }, i2 ?? ``) })] }) });
4630
+ return Il(Pl(s2, `post-by-id-read`, { feature: Al.post }, a2 ? fl(e6, pd, `post-by-id`) : e6));
4631
+ } }), sd, a2 ? ld : cd) : md, [i2, a2, o2, s2]);
4632
+ return (0, import_jsx_runtime.jsx)(bo, { i18n: c2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: ud, children: t2 }), children: [(0, import_jsx_runtime.jsx)(Wo, { i18n: c2, locale: l2 }), (0, import_jsx_runtime.jsx)(Fl, { fallback: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: dd, children: t2 }), feature: Al.post, monitoringClient: s2, rethrow: a2, children: (0, import_jsx_runtime.jsx)(hd, { postId: i2, postLoadPromise: d2, monitoringClient: s2, children: t2 }, i2 ?? ``) })] }) });
4627
4633
  }
4628
- var gd = Mn(`474ee948-702b-4c0f-970e-b5319eff6d8b`);
4634
+ var _d = Mn(`474ee948-702b-4c0f-970e-b5319eff6d8b`);
4629
4635
  // Annotate the CommonJS export names for ESM import in node:
4630
4636
  0 && (module.exports = {
4631
4637
  PostByIdProvider,