@wix/blog 1.0.697 → 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.
@@ -4908,19 +4908,33 @@ var Lp = (e6, t2) => {
4908
4908
  return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
4909
4909
  };
4910
4910
  var Rp = eu({ isDev: false, loadMessages: (e6) => Lp(e6, ``), loadDevMessages: (e6) => Lp(e6, `.dev`) });
4911
- var zp = [{ path: `member.createdDate` }, { path: `member.updatedDate` }, { path: `member.lastLoginDate` }];
4912
- function Bp(e6) {
4911
+ var zp = (e6) => E(O(e6, [{ transformFn: L, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: I, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: R, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
4912
+ var Bp = `https://blog.wixsite.com/blog-demo-posts`;
4913
+ var Vp = A((e6) => async (t2) => {
4914
+ let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${j(t2)}`);
4915
+ if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
4916
+ return zp(await n2.json()).filter((e7) => !e7.url?.startsWith(Bp));
4917
+ });
4918
+ var Hp = async (e6) => {
4919
+ try {
4920
+ return await Vp(e6);
4921
+ } catch (e7) {
4922
+ return console.info(`[blog demo posts]`, `read failed`, e7), [];
4923
+ }
4924
+ };
4925
+ var Up = [{ path: `member.createdDate` }, { path: `member.updatedDate` }, { path: `member.lastLoginDate` }];
4926
+ function Wp(e6) {
4913
4927
  return M(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` }] } }));
4914
4928
  }
4915
- var Vp = `@wix/auto_sdk_members_members`;
4916
- function Hp(e6) {
4929
+ var Gp = `@wix/auto_sdk_members_members`;
4930
+ function Kp(e6) {
4917
4931
  function t2({ host: t3 }) {
4918
- return { entityFqdn: `wix.members.v1.member`, method: `GET`, methodFqn: `com.wixpress.members.api.Members.GetMember`, packageName: Vp, migrationOptions: { optInTransformResponse: true }, url: Bp({ protoPath: `/v1/members/{id}`, data: e6, host: t3 }), params: j(e6), transformResponse: (e7) => O(e7, [{ transformFn: D, paths: zp }]) };
4932
+ return { entityFqdn: `wix.members.v1.member`, method: `GET`, methodFqn: `com.wixpress.members.api.Members.GetMember`, packageName: Gp, migrationOptions: { optInTransformResponse: true }, url: Wp({ protoPath: `/v1/members/{id}`, data: e6, host: t3 }), params: j(e6), transformResponse: (e7) => O(e7, [{ transformFn: D, paths: Up }]) };
4919
4933
  }
4920
4934
  return t2;
4921
4935
  }
4922
- async function Up(e6, t2) {
4923
- let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Hp(T({ id: e6, fieldsets: t2?.fieldsets }));
4936
+ async function qp(e6, t2) {
4937
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Kp(T({ id: e6, fieldsets: t2?.fieldsets }));
4924
4938
  r2?.onSiteCall?.();
4925
4939
  try {
4926
4940
  let e7 = await n2.request(i2);
@@ -4930,43 +4944,43 @@ async function Up(e6, t2) {
4930
4944
  throw r2?.onError?.(e7), t3;
4931
4945
  }
4932
4946
  }
4933
- function Wp(e6) {
4934
- return (t2, n2) => Up(t2, n2, { httpClient: e6 });
4947
+ function Jp(e6) {
4948
+ return (t2, n2) => qp(t2, n2, { httpClient: e6 });
4935
4949
  }
4936
- var Gp = A(Wp);
4937
- var Kp = async (e6) => {
4950
+ var Yp = A(Jp);
4951
+ var Xp = async (e6) => {
4938
4952
  try {
4939
- return await Gp(e6, { fieldsets: [`PUBLIC`] });
4953
+ return await Yp(e6, { fieldsets: [`PUBLIC`] });
4940
4954
  } catch {
4941
4955
  return;
4942
4956
  }
4943
4957
  };
4944
- var qp = [{ 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` }];
4945
- var Jp = [{ path: `posts.richContentCompressed` }];
4946
- var Yp = [{ 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` }];
4947
- var Xp = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
4948
- function Zp(e6) {
4958
+ var Zp = [{ 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` }];
4959
+ var Qp = [{ path: `posts.richContentCompressed` }];
4960
+ var $p = [{ 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` }];
4961
+ var em = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
4962
+ function tm(e6) {
4949
4963
  return M(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` }] } }));
4950
4964
  }
4951
- var Qp = `@wix/auto_sdk_blog_posts`;
4952
- function $p(e6) {
4965
+ var nm = `@wix/auto_sdk_blog_posts`;
4966
+ function rm(e6) {
4953
4967
  function t2({ host: t3 }) {
4954
- let n2 = O(e6, [{ transformFn: hn, paths: Xp }]);
4955
- return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Qp, migrationOptions: { optInTransformResponse: true }, url: Zp({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => O(e7, [{ transformFn: D, paths: qp }, { transformFn: gn, paths: Jp }, { transformFn: N, paths: Yp }]) };
4968
+ let n2 = O(e6, [{ transformFn: hn, paths: em }]);
4969
+ return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: nm, migrationOptions: { optInTransformResponse: true }, url: tm({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => O(e7, [{ transformFn: D, paths: Zp }, { transformFn: gn, paths: Qp }, { transformFn: N, paths: $p }]) };
4956
4970
  }
4957
4971
  return t2;
4958
4972
  }
4959
- function em() {
4960
- let e6 = $p({});
4973
+ function im() {
4974
+ let e6 = rm({});
4961
4975
  return { getUrl: (t2) => {
4962
4976
  let { url: n2 } = e6(t2);
4963
4977
  return n2;
4964
4978
  }, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
4965
4979
  }
4966
- var tm = em();
4967
- var nm = (e6) => (t2) => ({ method: `POST`, url: tm.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
4980
+ var am = im();
4981
+ var om = (e6) => (t2) => ({ method: `POST`, url: am.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
4968
4982
  A((e6) => async (t2) => {
4969
- let { data: n2 } = await e6.request(nm(t2)), r2 = {};
4983
+ let { data: n2 } = await e6.request(om(t2)), r2 = {};
4970
4984
  for (let e7 of n2.posts ?? []) {
4971
4985
  let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
4972
4986
  if (!t3 || !n3?.length) continue;
@@ -4975,42 +4989,43 @@ A((e6) => async (t2) => {
4975
4989
  }
4976
4990
  return r2;
4977
4991
  });
4978
- var rm = class extends Error {
4992
+ var sm = class extends Error {
4979
4993
  constructor(e6, t2) {
4980
4994
  super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
4981
4995
  }
4982
4996
  };
4983
- var im = (e6, t2, n2) => {
4997
+ var cm = (e6, t2, n2) => {
4984
4998
  let r2, i2 = new Promise((e7, i3) => {
4985
- r2 = setTimeout(() => i3(new rm(n2, t2)), t2);
4999
+ r2 = setTimeout(() => i3(new sm(n2, t2)), t2);
4986
5000
  });
4987
5001
  return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
4988
5002
  };
4989
- var am = [G.RICH_CONTENT, G.SEO, G.URL, G.CONTENT_TEXT, `TRANSLATIONS`];
4990
- G.RICH_CONTENT, G.URL, G.URL, G.METRICS;
4991
- var om = (e6) => {
5003
+ var lm = [G.RICH_CONTENT, G.SEO, G.URL, G.CONTENT_TEXT, `TRANSLATIONS`];
5004
+ var um = [G.RICH_CONTENT, G.URL];
5005
+ G.URL, G.METRICS;
5006
+ var dm = (e6) => {
4992
5007
  let { status: t2, details: n2 } = e6 ?? {};
4993
5008
  return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
4994
5009
  };
4995
- var sm = (e6, t2) => {
4996
- if (t2 && !om(e6)) throw e6;
5010
+ var fm = (e6, t2) => {
5011
+ if (t2 && !dm(e6)) throw e6;
4997
5012
  };
4998
- var cm = async (e6, t2, n2 = false, r2) => {
5013
+ var pm = async (e6, t2, n2 = false, r2) => {
4999
5014
  try {
5000
5015
  let { post: n3 } = await tc(e6, { ...t2 && { fieldsets: t2 }, ...r2 && { language: r2 } });
5001
5016
  if (n3) return n3;
5002
5017
  } catch (e7) {
5003
- sm(e7, n2);
5018
+ fm(e7, n2);
5004
5019
  }
5005
5020
  try {
5006
5021
  let { items: n3 } = await ac(t2 ? { fieldsets: t2 } : void 0).eq(`slug`, e6).limit(1).find();
5007
5022
  return n3[0];
5008
5023
  } catch (e7) {
5009
- sm(e7, n2);
5024
+ fm(e7, n2);
5010
5025
  return;
5011
5026
  }
5012
5027
  };
5013
- var lm = async (e6, t2 = false, n2) => {
5028
+ var mm = async (e6, t2 = false, n2) => {
5014
5029
  try {
5015
5030
  let t3 = async (t4) => {
5016
5031
  let { posts: r2 } = await nc({ paging: { limit: 1 }, ...e6 && { fieldsets: e6 }, ...t4 && n2 && { language: n2 } });
@@ -5018,12 +5033,12 @@ var lm = async (e6, t2 = false, n2) => {
5018
5033
  };
5019
5034
  return await t3(true) ?? (n2 ? await t3(false) : void 0);
5020
5035
  } catch (e7) {
5021
- sm(e7, t2);
5036
+ fm(e7, t2);
5022
5037
  return;
5023
5038
  }
5024
5039
  };
5025
- var um = async (e6, t2 = false, n2) => (e6 ? await cm(e6, am, t2, n2) : void 0) ?? await lm(am, t2, n2);
5026
- var dm = async (e6) => {
5040
+ var hm = async (e6, t2 = false, n2) => (e6 ? await pm(e6, lm, t2, n2) : void 0) ?? await mm(lm, t2, n2);
5041
+ var gm = async (e6) => {
5027
5042
  try {
5028
5043
  let { metrics: t2 } = await rc(e6);
5029
5044
  return t2;
@@ -5031,51 +5046,52 @@ var dm = async (e6) => {
5031
5046
  return;
5032
5047
  }
5033
5048
  };
5034
- var fm = 100;
5035
- var pm = async () => {
5049
+ var _m = 100;
5050
+ var vm = async () => {
5036
5051
  try {
5037
- let { categories: e6 } = await ai({ paging: { limit: fm } });
5052
+ let { categories: e6 } = await ai({ paging: { limit: _m } });
5038
5053
  return e6 ?? [];
5039
5054
  } catch {
5040
5055
  return [];
5041
5056
  }
5042
5057
  };
5043
- var mm = (e6, t2) => {
5058
+ var ym = (e6, t2) => {
5044
5059
  let { categoryIds: n2 } = e6 ?? {};
5045
5060
  if (!n2?.length) return [];
5046
5061
  let r2 = new Map(t2.map((e7) => [e7._id, e7]));
5047
5062
  return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
5048
5063
  };
5049
- var hm = 30;
5050
- var gm = async (e6) => {
5064
+ var bm = 30;
5065
+ var xm = async (e6) => {
5051
5066
  if (!e6?.length) return [];
5052
5067
  try {
5053
- let { items: t2 } = await _c().in(`_id`, e6).limit(hm).find();
5068
+ let { items: t2 } = await _c().in(`_id`, e6).limit(bm).find();
5054
5069
  return t2 ?? [];
5055
5070
  } catch {
5056
5071
  return [];
5057
5072
  }
5058
5073
  };
5059
- var _m = (e6, t2) => {
5074
+ var Sm = (e6, t2) => {
5060
5075
  let { tagIds: n2 } = e6 ?? {};
5061
5076
  if (!n2?.length) return [];
5062
5077
  let r2 = new Map(t2.map((e7) => [e7._id, e7]));
5063
5078
  return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
5064
5079
  };
5065
- var vm = 1e3;
5066
- var ym = async (e6, t2 = false, n2) => {
5067
- let r2 = pm();
5068
- return bm(await um(e6, t2, n2), r2);
5080
+ var Cm = async (e6, t2) => e6.post ? e6 : { ...e6, demoPost: (await Hp({ paging: { limit: 1, offset: 0 }, fieldsets: um, ...t2 && { language: t2 } }))[0] };
5081
+ var wm = 1e3;
5082
+ var Tm = async (e6, t2 = false, n2) => {
5083
+ let r2 = vm();
5084
+ return Em(await hm(e6, t2, n2), r2);
5069
5085
  };
5070
- var bm = async (e6, t2) => {
5071
- let { _id: n2, memberId: r2, tagIds: i2, preview: a2 } = e6 ?? {}, [o2, s2, c2, l2, u2] = await Promise.all([r2 ? Kp(r2) : void 0, n2 ? dm(n2) : void 0, t2, gm(i2), a2 && n2 ? im(Bl(n2, e6?.language ?? void 0), vm, `post-paywall`).catch(() => void 0) : void 0]);
5072
- return { post: e6, author: o2, metrics: s2, categories: mm(e6, c2), tags: _m(e6, l2), ...u2 && { paywall: u2 } };
5086
+ var Em = async (e6, t2) => {
5087
+ let { _id: n2, memberId: r2, tagIds: i2, preview: a2 } = e6 ?? {}, [o2, s2, c2, l2, u2] = await Promise.all([r2 ? Xp(r2) : void 0, n2 ? gm(n2) : void 0, t2, xm(i2), a2 && n2 ? cm(Bl(n2, e6?.language ?? void 0), wm, `post-paywall`).catch(() => void 0) : void 0]);
5088
+ return { post: e6, author: o2, metrics: s2, categories: ym(e6, c2), tags: Sm(e6, l2), ...u2 && { paywall: u2 } };
5073
5089
  };
5074
- var xm = (e6) => {
5090
+ var Dm = (e6) => {
5075
5091
  let { _id: t2, categoryIds: n2, relatedPostIds: r2 } = e6 ?? {};
5076
5092
  return { currentPostId: t2 ?? void 0, categoryIds: n2, relatedPostIds: r2 };
5077
5093
  };
5078
- var Sm = async (e6, t2) => {
5094
+ var Om = async (e6, t2) => {
5079
5095
  try {
5080
5096
  let { items: n2 } = await ac().eq(`translationId`, e6).eq(`language`, t2).limit(1).find();
5081
5097
  return n2[0]?.slug ?? void 0;
@@ -5083,7 +5099,7 @@ var Sm = async (e6, t2) => {
5083
5099
  return;
5084
5100
  }
5085
5101
  };
5086
- var Cm = class extends e {
5102
+ var km = class extends e {
5087
5103
  state = { error: void 0 };
5088
5104
  static getDerivedStateFromError(e6) {
5089
5105
  return { error: e6 ?? Error(`Unknown render error`) };
@@ -5097,30 +5113,30 @@ var Cm = class extends e {
5097
5113
  return this.props.fallback;
5098
5114
  }
5099
5115
  };
5100
- var wm = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
5101
- var Tm = { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [] };
5102
- var Em = [so.RICH_CONTENT, so.GENERATED_EXCERPT];
5103
- var Dm = A((e6) => () => e6.fetchWithAuth);
5104
- var Om = (e6) => e6 ? Dm() : (...e7) => globalThis.fetch(...e7);
5105
- var km = (e6, t2) => Je({ modules: { draftPosts: si }, auth: { getAuthHeaders: () => ({ headers: { authorization: e6 } }) }, fetch: Om(t2) });
5106
- var Am = (e6) => {
5116
+ var Am = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
5117
+ var jm = { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [] };
5118
+ var Mm = [so.RICH_CONTENT, so.GENERATED_EXCERPT];
5119
+ var Nm = A((e6) => () => e6.fetchWithAuth);
5120
+ var Pm = (e6) => e6 ? Nm() : (...e7) => globalThis.fetch(...e7);
5121
+ var Fm = (e6, t2) => Je({ modules: { draftPosts: si }, auth: { getAuthHeaders: () => ({ headers: { authorization: e6 } }) }, fetch: Pm(t2) });
5122
+ var Im = (e6) => {
5107
5123
  let { _id: t2, title: n2, excerpt: r2, seoSlug: i2, memberId: a2, minutesToRead: o2, categoryIds: s2, tagIds: c2, firstPublishedDate: l2, richContent: u2, media: d2 } = e6 ?? {};
5108
5124
  if (t2) return { _id: t2, title: n2, excerpt: r2 ?? void 0, slug: i2 ?? void 0, memberId: a2 ?? void 0, minutesToRead: o2, categoryIds: s2, tagIds: c2, firstPublishedDate: l2 ?? void 0, richContent: u2, ...d2 && { media: d2 } };
5109
5125
  };
5110
- var jm = (e6) => e6 instanceof Error ? e6.message : String(e6);
5111
- var Mm = async ({ draftPostId: e6, instance: t2 }, n2) => {
5112
- let r2 = pm();
5126
+ var Lm = (e6) => e6 instanceof Error ? e6.message : String(e6);
5127
+ var Rm = async ({ draftPostId: e6, instance: t2 }, n2) => {
5128
+ let r2 = vm();
5113
5129
  try {
5114
- let { draftPost: i2 } = await km(t2, n2).draftPosts.getDraftPost(e6, { fieldsets: Em }), a2 = Am(i2), { memberId: o2, tagIds: s2 } = a2 ?? {}, [c2, l2, u2] = await Promise.all([o2 ? Kp(o2) : void 0, r2, gm(s2)]);
5115
- return { post: a2, author: c2, metrics: void 0, categories: mm(a2, l2), tags: _m(a2, u2) };
5130
+ let { draftPost: i2 } = await Fm(t2, n2).draftPosts.getDraftPost(e6, { fieldsets: Mm }), a2 = Im(i2), { memberId: o2, tagIds: s2 } = a2 ?? {}, [c2, l2, u2] = await Promise.all([o2 ? Xp(o2) : void 0, r2, xm(s2)]);
5131
+ return { post: a2, author: c2, metrics: void 0, categories: ym(a2, l2), tags: Sm(a2, u2) };
5116
5132
  } catch (e7) {
5117
- let t3 = jm(e7);
5118
- return console.error(`[blog-builder] draft preview fetch failed (${t3})`, e7), { ...Tm, reason: t3 };
5133
+ let t3 = Lm(e7);
5134
+ return console.error(`[blog-builder] draft preview fetch failed (${t3})`, e7), { ...jm, reason: t3 };
5119
5135
  }
5120
5136
  };
5121
- var Nm = n(void 0);
5122
- var Pm = n(void 0);
5123
- var Fm = (e6) => {
5137
+ var zm = n(void 0);
5138
+ var Bm = n(void 0);
5139
+ var Vm = (e6) => {
5124
5140
  let t2;
5125
5141
  try {
5126
5142
  t2 = f(kc);
@@ -5129,41 +5145,41 @@ var Fm = (e6) => {
5129
5145
  }
5130
5146
  return Hc(t2, e6);
5131
5147
  };
5132
- var Im = 1e4;
5133
- function Lm(e6) {
5148
+ var Hm = 1e4;
5149
+ function Um(e6) {
5134
5150
  let [t2, n2] = u(void 0);
5135
5151
  return s(() => {
5136
5152
  let t3 = Date.now();
5137
- t3 - e6 > Im && i(() => n2(t3));
5153
+ t3 - e6 > Hm && i(() => n2(t3));
5138
5154
  }, []), t2 ?? e6;
5139
5155
  }
5140
- var Rm = `wix.blog.v3.post`;
5141
- var zm = async (e6) => {
5142
- await Gr({ like: { entityId: e6, fqdn: Rm } });
5156
+ var Wm = `wix.blog.v3.post`;
5157
+ var Gm = async (e6) => {
5158
+ await Gr({ like: { entityId: e6, fqdn: Wm } });
5143
5159
  };
5144
- var Bm = async (e6) => {
5145
- await Kr({ fqdn: Rm, entityId: e6 });
5160
+ var Km = async (e6) => {
5161
+ await Kr({ fqdn: Wm, entityId: e6 });
5146
5162
  };
5147
- var Vm = (e6) => typeof e6 == `number` ? e6 : void 0;
5148
- var Hm = async (e6) => {
5149
- let [t2, n2] = await Promise.allSettled([qr().eq(`fqdn`, Rm).eq(`entityId`, e6).limit(1).find(), rc(e6)]), r2 = n2.status === `fulfilled` ? n2.value.metrics : void 0;
5150
- return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount: Vm(r2?.likes), viewCount: Vm(r2?.views), commentCount: Vm(r2?.comments) };
5163
+ var qm = (e6) => typeof e6 == `number` ? e6 : void 0;
5164
+ var Jm = async (e6) => {
5165
+ let [t2, n2] = await Promise.allSettled([qr().eq(`fqdn`, Wm).eq(`entityId`, e6).limit(1).find(), rc(e6)]), r2 = n2.status === `fulfilled` ? n2.value.metrics : void 0;
5166
+ return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount: qm(r2?.likes), viewCount: qm(r2?.views), commentCount: qm(r2?.comments) };
5151
5167
  };
5152
- var Um = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
5153
- var Wm = `wix-blog:post-like-toggled`;
5154
- var Gm = () => {
5168
+ var Ym = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
5169
+ var Xm = `wix-blog:post-like-toggled`;
5170
+ var Zm = () => {
5155
5171
  let e6 = window;
5156
- return e6[Wm] ??= /* @__PURE__ */ new Map();
5172
+ return e6[Xm] ??= /* @__PURE__ */ new Map();
5157
5173
  };
5158
- var Km = (e6) => {
5159
- Gm().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(Wm, { detail: e6 }));
5174
+ var Qm = (e6) => {
5175
+ Zm().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(Xm, { detail: e6 }));
5160
5176
  };
5161
- var qm = (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 });
5162
- var Jm = (e6, t2, n2 = false, r2) => {
5163
- let o2 = bc() || n2, [d2, f2] = u(Um), p2 = l(Um), m2 = l(t2), h2 = l(/* @__PURE__ */ new Set()), g2 = l(false), _2 = l(false), v2 = l(void 0), y2 = Dc(), [b2, x2] = u(0);
5177
+ var $m = (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 });
5178
+ var eh = (e6, t2, n2 = false, r2) => {
5179
+ let o2 = bc() || n2, [d2, f2] = u(Ym), p2 = l(Ym), m2 = l(t2), h2 = l(/* @__PURE__ */ new Set()), g2 = l(false), _2 = l(false), v2 = l(void 0), y2 = Dc(), [b2, x2] = u(0);
5164
5180
  s(() => {
5165
5181
  let e7 = y2?.addMemberLoginListener?.(() => {
5166
- Gm().clear(), x2((e8) => e8 + 1);
5182
+ Zm().clear(), x2((e8) => e8 + 1);
5167
5183
  });
5168
5184
  return () => {
5169
5185
  e7 !== void 0 && y2?.removeMemberLoginListener?.(e7);
@@ -5172,18 +5188,18 @@ var Jm = (e6, t2, n2 = false, r2) => {
5172
5188
  let S2 = a((e7) => {
5173
5189
  let t3 = p2.current, n3 = { ...t3, ...e7 };
5174
5190
  Object.keys(n3).every((e8) => n3[e8] === t3[e8]) || (p2.current = n3, h2.current.forEach((e8) => e8()), i(() => f2(n3)));
5175
- }, []), ee2 = c(() => ({ get: () => qm(p2.current, m2.current), subscribe: (e7) => (h2.current.add(e7), () => {
5191
+ }, []), ee2 = c(() => ({ get: () => $m(p2.current, m2.current), subscribe: (e7) => (h2.current.add(e7), () => {
5176
5192
  h2.current.delete(e7);
5177
5193
  }) }), []);
5178
5194
  s(() => {
5179
5195
  m2.current !== t2 && (m2.current = t2, h2.current.forEach((e7) => e7()));
5180
5196
  }, [t2]), s(() => {
5181
- if (v2.current !== e6 && (v2.current = e6, S2(Um)), _2.current = false, !e6 || o2) {
5197
+ if (v2.current !== e6 && (v2.current = e6, S2(Ym)), _2.current = false, !e6 || o2) {
5182
5198
  S2({ isLikeCountLoaded: true });
5183
5199
  return;
5184
5200
  }
5185
5201
  let t3 = false;
5186
- return Hm(e6).then(({ liked: e7, likeCount: n3, viewCount: r3, commentCount: i2 }) => {
5202
+ return Jm(e6).then(({ liked: e7, likeCount: n3, viewCount: r3, commentCount: i2 }) => {
5187
5203
  t3 || S2({ isLikeCountLoaded: true, viewCount: r3, commentCount: i2, baselineLiked: e7, freshLikeCount: n3, ...!_2.current && { liked: e7 } });
5188
5204
  }).catch((n3) => {
5189
5205
  t3 || S2({ isLikeCountLoaded: true }), rl(r2, n3, { feature: el.likes, action: `read-like-state`, level: `warning`, contexts: { likes: { postId: e6 } } });
@@ -5194,32 +5210,32 @@ var Jm = (e6, t2, n2 = false, r2) => {
5194
5210
  if (!e6) return;
5195
5211
  let t3 = (e7) => {
5196
5212
  _2.current = true, S2({ liked: e7 });
5197
- }, n3 = Gm().get(e6);
5213
+ }, n3 = Zm().get(e6);
5198
5214
  n3 !== void 0 && t3(n3);
5199
5215
  let r3 = (n4) => {
5200
5216
  let { detail: r4 } = n4;
5201
5217
  r4.postId === e6 && t3(r4.liked);
5202
5218
  };
5203
- return window.addEventListener(Wm, r3), () => window.removeEventListener(Wm, r3);
5219
+ return window.addEventListener(Xm, r3), () => window.removeEventListener(Xm, r3);
5204
5220
  }, [e6, S2]);
5205
5221
  let te2 = a(async (t3) => {
5206
5222
  if (!e6 || g2.current) return;
5207
5223
  _2.current = true;
5208
5224
  let n3 = !p2.current.liked;
5209
- if (S2({ liked: n3 }), Km({ postId: e6, liked: n3 }), !o2) {
5225
+ if (S2({ liked: n3 }), Qm({ postId: e6, liked: n3 }), !o2) {
5210
5226
  g2.current = true;
5211
5227
  try {
5212
- await (n3 ? zm(e6) : Bm(e6));
5228
+ await (n3 ? Gm(e6) : Km(e6));
5213
5229
  } catch (t4) {
5214
- S2({ liked: !n3 }), Km({ postId: e6, liked: !n3 }), rl(r2, t4, { feature: el.likes, action: n3 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
5230
+ S2({ liked: !n3 }), Qm({ postId: e6, liked: !n3 }), rl(r2, t4, { feature: el.likes, action: n3 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
5215
5231
  } finally {
5216
5232
  g2.current = false;
5217
5233
  }
5218
5234
  }
5219
5235
  }, [e6, o2, r2, S2]);
5220
- return { ...qm(d2, t2), toggleLike: te2, liveLikes: ee2 };
5236
+ return { ...$m(d2, t2), toggleLike: te2, liveLikes: ee2 };
5221
5237
  };
5222
- var Ym = () => {
5238
+ var th = () => {
5223
5239
  try {
5224
5240
  let { locale: e6, language: t2 } = f(jl);
5225
5241
  return e6 || t2;
@@ -5227,148 +5243,148 @@ var Ym = () => {
5227
5243
  return;
5228
5244
  }
5229
5245
  };
5230
- var Xm = (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);
5246
+ var nh = (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);
5231
5247
  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` };
5232
- var Zm = (e6, t2) => {
5233
- let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: Xm(r2, `full`, t2) });
5248
+ var rh = (e6, t2) => {
5249
+ let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: nh(r2, `full`, t2) });
5234
5250
  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) } };
5235
5251
  };
5236
- var Qm = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
5237
- var $ = (e6) => ({ text: e6, html: `<p>${Qm(e6)}</p>`, linkList: [] });
5238
- var $m = 6e4;
5239
- var eh = $m * 60;
5240
- var th = eh * 24;
5241
- var nh = th * 7;
5242
- var rh = (e6) => e6 < $m ? [`second`, e6 / 1e3] : e6 < eh ? [`minute`, e6 / $m] : e6 < th ? [`hour`, e6 / eh] : [`day`, e6 / th];
5243
- var ih = (e6, t2, n2 = Date.now()) => {
5252
+ var ih = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
5253
+ var $ = (e6) => ({ text: e6, html: `<p>${ih(e6)}</p>`, linkList: [] });
5254
+ var ah = 6e4;
5255
+ var oh = ah * 60;
5256
+ var sh = oh * 24;
5257
+ var ch = sh * 7;
5258
+ var lh = (e6) => e6 < ah ? [`second`, e6 / 1e3] : e6 < oh ? [`minute`, e6 / ah] : e6 < sh ? [`hour`, e6 / oh] : [`day`, e6 / sh];
5259
+ var uh = (e6, t2, n2 = Date.now()) => {
5244
5260
  let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
5245
- if (i2 >= 0 && i2 < nh) {
5246
- let [e7, n3] = rh(i2);
5261
+ if (i2 >= 0 && i2 < ch) {
5262
+ let [e7, n3] = lh(i2);
5247
5263
  return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
5248
5264
  }
5249
5265
  let a2 = r2.getFullYear() === new Date(n2).getFullYear();
5250
5266
  return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
5251
5267
  };
5252
- var ah = `https://static.wixstatic.com/media/`;
5253
- var oh = `wix:video://`;
5254
- var sh = (e6) => {
5268
+ var dh = `https://static.wixstatic.com/media/`;
5269
+ var fh = `wix:video://`;
5270
+ var ph = (e6) => {
5255
5271
  if (!e6) return;
5256
5272
  let t2 = Number.parseInt(e6, 10);
5257
5273
  return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
5258
5274
  };
5259
- var ch = (e6) => {
5260
- if (!e6.startsWith(oh)) return;
5275
+ var mh = (e6) => {
5276
+ if (!e6.startsWith(fh)) return;
5261
5277
  let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
5262
5278
  if (!r2) return;
5263
5279
  let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
5264
- return { id: decodeURIComponent(r2), posterUrl: a2 ? `${ah}${a2}` : void 0, posterWidth: sh(i2.get(`posterWidth`)), posterHeight: sh(i2.get(`posterHeight`)) };
5280
+ return { id: decodeURIComponent(r2), posterUrl: a2 ? `${dh}${a2}` : void 0, posterWidth: ph(i2.get(`posterWidth`)), posterHeight: ph(i2.get(`posterHeight`)) };
5265
5281
  };
5266
- var lh = (e6) => {
5282
+ var hh = (e6) => {
5267
5283
  let t2 = hl(e6), n2 = e6?.media?.wixMedia?.videoV2;
5268
5284
  if (t2 || !n2) return t2;
5269
- let r2 = ch(n2), i2 = ml(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
5285
+ let r2 = mh(n2), i2 = ml(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
5270
5286
  return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
5271
5287
  };
5272
- var uh = (e6) => {
5288
+ var gh = (e6) => {
5273
5289
  if (!e6) return;
5274
5290
  let t2 = e6 instanceof Date ? e6 : new Date(e6);
5275
5291
  return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
5276
5292
  };
5277
- var dh = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
5278
- var fh = (e6, t2) => e6 && t2 ? `${e6}/${encodeURIComponent(t2)}` : void 0;
5279
- var ph = (e6, t2) => {
5280
- let n2 = fh(e6, t2);
5293
+ var _h = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
5294
+ var vh = (e6, t2) => e6 && t2 ? `${e6}/${encodeURIComponent(t2)}` : void 0;
5295
+ var yh = (e6, t2) => {
5296
+ let n2 = vh(e6, t2);
5281
5297
  return n2 ? { href: n2, target: `_self` } : void 0;
5282
5298
  };
5283
- var mh = { href: `#`, target: `_self` };
5284
- var hh = (e6, t2) => {
5299
+ var bh = { href: `#`, target: `_self` };
5300
+ var xh = (e6, t2) => {
5285
5301
  let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
5286
- return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel: $(a2), itemCategoryLink: ph(t2, i2 ?? ``), categoryItem: { label: a2, slug: i2 ?? `` } };
5302
+ return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel: $(a2), itemCategoryLink: yh(t2, i2 ?? ``), categoryItem: { label: a2, slug: i2 ?? `` } };
5287
5303
  };
5288
- var gh = 2;
5289
- var _h = (e6) => Array.from({ length: gh }, (t2, n2) => {
5304
+ var Sh = 2;
5305
+ var Ch = (e6) => Array.from({ length: Sh }, (t2, n2) => {
5290
5306
  let r2 = e6.canvas.categoryNumbered(n2 + 1);
5291
- return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel: $(r2), itemCategoryLink: mh, categoryItem: { label: r2, slug: `` } };
5307
+ return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel: $(r2), itemCategoryLink: bh, categoryItem: { label: r2, slug: `` } };
5292
5308
  });
5293
- var vh = (e6, t2) => {
5309
+ var wh = (e6, t2) => {
5294
5310
  let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
5295
- return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel: $(a2), itemTagLink: ph(t2, i2 ?? ``), tagItem: { label: a2, slug: i2 ?? `` } };
5311
+ return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel: $(a2), itemTagLink: yh(t2, i2 ?? ``), tagItem: { label: a2, slug: i2 ?? `` } };
5296
5312
  };
5297
- var yh = 3;
5298
- var bh = (e6) => Array.from({ length: yh }, (t2, n2) => {
5313
+ var Th = 3;
5314
+ var Eh = (e6) => Array.from({ length: Th }, (t2, n2) => {
5299
5315
  let r2 = e6.canvas.tagNumbered(n2 + 1);
5300
- return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel: $(r2), itemTagLink: mh, tagItem: { label: r2, slug: `` } };
5316
+ return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel: $(r2), itemTagLink: bh, tagItem: { label: r2, slug: `` } };
5301
5317
  });
5302
- var xh = 1;
5303
- var Sh = { views: 120, comments: 4, likes: 12 };
5304
- var Ch = (e6) => ({ nodes: [{ type: `PARAGRAPH`, nodes: [{ type: `TEXT`, nodes: [], textData: { text: e6, decorations: [] } }] }] });
5305
- var wh = (e6, t2, n2, r2) => $(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
5306
- var Th = (e6, t2, n2) => e6 ?? (n2 ? t2 : void 0);
5307
- var Eh = { nodes: [] };
5308
- var Dh = () => ({ title: $(``), excerpt: $(``), coverImage: void 0, richContent: Eh, 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 });
5309
- var Oh = ({ post: e6, author: t2, metrics: n2, categories: r2, tags: i2 }, a2, o2, s2 = false, c2 = Date.now(), l2 = {}) => !e6 && !s2 ? Dh() : { title: $(e6?.title ?? a2.canvas.postTitle()), excerpt: $(e6?.excerpt ?? a2.canvas.excerpt()), coverImage: lh(e6), richContent: e6?.richContent ?? Ch(a2.canvas.content()), authorName: $(t2?.profile?.nickname ?? a2.canvas.authorName()), authorImage: sl(t2, a2.canvas.authorPhotoAlt()), timeToRead: $(typeof e6?.minutesToRead == `number` && e6.minutesToRead > 0 ? a2.timeToRead(e6.minutesToRead) : s2 ? a2.timeToRead(xh) : ``), publishedDate: $(ih(e6?.firstPublishedDate ?? new Date(c2), o2, c2)), viewCount: wh(n2?.views, Sh.views, s2, a2.viewCount), commentCount: wh(n2?.comments, Sh.comments, s2, a2.commentCount), likeCount: wh(n2?.likes, Sh.likes, s2, a2.likeCount), postCategories: r2.length === 0 && s2 ? _h(a2) : r2.map((e7) => hh(e7, l2.category)), postTags: i2.length === 0 && s2 ? bh(a2) : i2.map((e7) => vh(e7, l2.tag)), hasCoverImage: !e6 || e6.media?.displayed !== false && lh(e6) !== void 0, hasExcerpt: !e6 || !!e6.excerpt?.trim(), hasTags: !e6 || i2.length > 0, publishedDateValue: uh(e6?.firstPublishedDate) ?? (s2 ? `2026-05-12T12:00:00.000Z` : void 0), minutesToReadValue: dh(e6?.minutesToRead) ?? (s2 ? xh : void 0), viewCountValue: Th(n2?.views, Sh.views, s2), commentCountValue: Th(n2?.comments, Sh.comments, s2) };
5310
- var kh = ({ postWithAuthor: e6, hasError: t2, monitoringClient: n2, isPostInPreview: r2, postPageBase: i2 }) => {
5311
- let { t: a2 } = sp(), o2 = Ym(), s2 = c(() => Zm(a2, o2), [a2, o2]), l2 = Lm(e6.fetchedAt), u2 = Rl(), { isLiked: d2, likeCount: f2, isLikeCountLoaded: p2, viewCount: m2, commentCount: h2, toggleLike: g2, liveLikes: _2 } = Jm(e6.post?._id ?? void 0, e6.metrics?.likes ?? 0, r2, n2), v2 = Fm(Mc), y2 = Fm(`tag`), b2 = c(() => xm(e6.post), [e6]), x2 = ql(), S2 = c(() => e6.post?.richContent && e6.paywall ? Gl(e6.post.richContent, e6.paywall, x2) : void 0, [e6, x2]);
5318
+ var Dh = 1;
5319
+ var Oh = { views: 120, comments: 4, likes: 12 };
5320
+ var kh = (e6) => ({ nodes: [{ type: `PARAGRAPH`, nodes: [{ type: `TEXT`, nodes: [], textData: { text: e6, decorations: [] } }] }] });
5321
+ var Ah = (e6, t2, n2, r2) => $(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
5322
+ var jh = (e6, t2, n2) => e6 ?? (n2 ? t2 : void 0);
5323
+ var Mh = { nodes: [] };
5324
+ var Nh = () => ({ title: $(``), excerpt: $(``), coverImage: void 0, richContent: Mh, 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 });
5325
+ var Ph = ({ post: e6, author: t2, metrics: n2, categories: r2, tags: i2 }, a2, o2, s2 = false, c2 = Date.now(), l2 = {}) => !e6 && !s2 ? Nh() : { title: $(e6?.title ?? a2.canvas.postTitle()), excerpt: $(e6?.excerpt ?? a2.canvas.excerpt()), coverImage: hh(e6), richContent: e6?.richContent ?? kh(a2.canvas.content()), authorName: $(t2?.profile?.nickname ?? a2.canvas.authorName()), authorImage: sl(t2, a2.canvas.authorPhotoAlt()), timeToRead: $(typeof e6?.minutesToRead == `number` && e6.minutesToRead > 0 ? a2.timeToRead(e6.minutesToRead) : s2 ? a2.timeToRead(Dh) : ``), publishedDate: $(uh(e6?.firstPublishedDate ?? new Date(c2), o2, c2)), viewCount: Ah(n2?.views, Oh.views, s2, a2.viewCount), commentCount: Ah(n2?.comments, Oh.comments, s2, a2.commentCount), likeCount: Ah(n2?.likes, Oh.likes, s2, a2.likeCount), postCategories: r2.length === 0 && s2 ? Ch(a2) : r2.map((e7) => xh(e7, l2.category)), postTags: i2.length === 0 && s2 ? Eh(a2) : i2.map((e7) => wh(e7, l2.tag)), hasCoverImage: !e6 || e6.media?.displayed !== false && hh(e6) !== void 0, hasExcerpt: !e6 || !!e6.excerpt?.trim(), hasTags: !e6 || i2.length > 0, publishedDateValue: gh(e6?.firstPublishedDate) ?? (s2 ? `2026-05-12T12:00:00.000Z` : void 0), minutesToReadValue: _h(e6?.minutesToRead) ?? (s2 ? Dh : void 0), viewCountValue: jh(n2?.views, Oh.views, s2), commentCountValue: jh(n2?.comments, Oh.comments, s2) };
5326
+ var Fh = ({ postWithAuthor: e6, hasError: t2, monitoringClient: n2, isPostInPreview: r2, postPageBase: i2 }) => {
5327
+ let { t: a2 } = sp(), o2 = th(), s2 = c(() => rh(a2, o2), [a2, o2]), l2 = Um(e6.fetchedAt), u2 = Rl(), { isLiked: d2, likeCount: f2, isLikeCountLoaded: p2, viewCount: m2, commentCount: h2, toggleLike: g2, liveLikes: _2 } = eh(e6.post?._id ?? void 0, e6.metrics?.likes ?? 0, r2, n2), v2 = Vm(Mc), y2 = Vm(`tag`), b2 = c(() => Dm(e6.post), [e6]), x2 = ql(), S2 = c(() => e6.post?.richContent && e6.paywall ? Gl(e6.post.richContent, e6.paywall, x2) : void 0, [e6, x2]);
5312
5328
  return c(() => {
5313
- let n3 = Oh(e6, s2, o2, u2, l2, { category: v2, tag: y2 });
5329
+ let n3 = Ph(!e6.post && u2 && e6.demoPost ? { ...e6, post: e6.demoPost } : e6, s2, o2, u2, l2, { category: v2, tag: y2 });
5314
5330
  return { ...n3, ...S2 && { richContent: S2 }, relatedPostsSource: b2, viewCountValue: m2 ?? n3.viewCountValue, commentCountValue: h2 ?? n3.commentCountValue, postUrl: r2 || !e6.post ? void 0 : Vc(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: l2, isLoadingPost: false, hasError: t2, isEmpty: !e6.post && !u2 };
5315
5331
  }, [e6, t2, b2, S2, s2, o2, l2, f2, d2, p2, m2, h2, g2, _2, u2, r2, i2, v2, y2]);
5316
5332
  };
5317
- var Ah = (e6) => ({ post: e6, hasError: false });
5318
- var jh = () => ({ post: { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: Date.now() }, hasError: true });
5319
- var Mh = (e6) => {
5333
+ var Ih = (e6) => ({ post: e6, hasError: false });
5334
+ var Lh = () => ({ post: { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: Date.now() }, hasError: true });
5335
+ var Rh = (e6) => {
5320
5336
  throw e6;
5321
5337
  };
5322
- var Nh = { ...Dh(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
5338
+ var zh = { ...Nh(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
5323
5339
  }, liveLikes: void 0, postUrl: void 0, clockValue: 0, relatedPostsSource: { currentPostId: void 0, categoryIds: void 0, relatedPostIds: void 0 }, isLoadingPost: true, hasError: false, isEmpty: false };
5324
- var Ph = { ...Nh, isLoadingPost: false, hasError: true, isEmpty: true };
5325
- var Fh = n(void 0);
5326
- function Ih() {
5327
- let e6 = o(Fh);
5340
+ var Bh = { ...zh, isLoadingPost: false, hasError: true, isEmpty: true };
5341
+ var Vh = n(void 0);
5342
+ function Hh() {
5343
+ let e6 = o(Vh);
5328
5344
  if (!e6) throw Error(`usePostContext must be used within a PostProvider`);
5329
5345
  return e6;
5330
5346
  }
5331
- var Lh = new Promise(() => {
5347
+ var Uh = new Promise(() => {
5332
5348
  });
5333
- var Rh = 2500;
5334
- var zh = (e6) => {
5349
+ var Wh = 2500;
5350
+ var Gh = (e6) => {
5335
5351
  try {
5336
5352
  return decodeURIComponent(e6);
5337
5353
  } catch {
5338
5354
  return e6;
5339
5355
  }
5340
5356
  };
5341
- var Bh = ({ children: e6, postLoadPromise: t2, monitoringClient: n2, slug: r2, language: i2, isPostInPreview: o2 }) => {
5342
- let { post: s2, hasError: c2 } = Kn(t2), l2 = Oc(s2, a(() => um(r2, false, i2), [r2, i2]));
5343
- Al(l2, o2, n2), Yl(r2 && l2.post?.slug === zh(r2) && !o2 ? l2.post : void 0, i2, Sm);
5357
+ var Kh = ({ children: e6, postLoadPromise: t2, monitoringClient: n2, slug: r2, language: i2, isPostInPreview: o2 }) => {
5358
+ let { post: s2, hasError: c2 } = Kn(t2), l2 = Oc(s2, a(() => hm(r2, false, i2), [r2, i2]));
5359
+ Al(l2, o2, n2), Yl(r2 && l2.post?.slug === Gh(r2) && !o2 ? l2.post : void 0, i2, Om);
5344
5360
  let { _id: u2 } = l2.post ?? {};
5345
5361
  xc(o2 ? void 0 : u2 ?? void 0);
5346
- let d2 = kh({ postWithAuthor: l2, hasError: c2, monitoringClient: n2, isPostInPreview: o2, postPageBase: Uc(r2) });
5347
- return Zc(Yc.postProvider, c2 ? `error` : l2.post ? `data` : `empty`), p(Fh.Provider, { value: d2, children: e6 });
5348
- };
5349
- function Vh({ children: e6 }) {
5350
- let n2 = Kc(), r2 = Jc(), i2 = Nl(), a2 = Cc(), { draftPostId: o2, instance: s2 } = n2 ?? {}, l2 = Zl(), u2 = c(() => tl(Wn), []), { i18n: d2, locale: f2 } = Ap(Rp), h2 = Tc(() => {
5351
- let e7 = o2 && s2 ? wm(Mm({ draftPostId: o2, instance: s2 }, a2)) : _p({ key: r2 ? `blog-builder:post:${r2}|${i2 ?? ``}` : null, warmupData: l2, fetchData: () => {
5352
- let e8 = ym(r2, a2, i2);
5353
- return wm(il(u2, `post-read`, { feature: el.post }, a2 ? im(e8, Rh, `post`) : e8));
5354
- } }), t2 = e7.then(({ post: e8 }) => xm(e8));
5362
+ let d2 = Fh({ postWithAuthor: l2, hasError: c2, monitoringClient: n2, isPostInPreview: o2, postPageBase: Uc(r2) });
5363
+ return Zc(Yc.postProvider, c2 ? `error` : l2.post ? `data` : `empty`), p(Vh.Provider, { value: d2, children: e6 });
5364
+ };
5365
+ function qh({ children: e6 }) {
5366
+ let n2 = Kc(), r2 = Jc(), i2 = Nl(), a2 = Cc(), { draftPostId: o2, instance: s2 } = n2 ?? {}, l2 = Rl(), u2 = Zl(), d2 = c(() => tl(Wn), []), { i18n: f2, locale: h2 } = Ap(Rp), g2 = Tc(() => {
5367
+ let e7 = o2 && s2 ? Am(Rm({ draftPostId: o2, instance: s2 }, a2)) : _p({ key: r2 ? `blog-builder:post:${r2}|${i2 ?? ``}` : null, warmupData: u2, fetchData: () => {
5368
+ let e8 = Tm(r2, a2, i2).then((e9) => l2 ? Cm(e9, i2) : e9);
5369
+ return Am(il(d2, `post-read`, { feature: el.post }, a2 ? cm(e8, Wh, `post`) : e8));
5370
+ } }), t2 = e7.then(({ post: e8 }) => Dm(e8));
5355
5371
  return t2.catch(() => {
5356
- }), { slug: r2, language: i2, isPostInPreview: !!o2, postLoadPromise: Jn(e7, Ah, a2 ? Mh : jh), relatedSourcePromise: t2 };
5357
- }, [o2, s2, i2, r2, a2, l2, u2]);
5358
- return p(Nm.Provider, { value: h2.relatedSourcePromise, children: p(cp, { i18n: d2, children: m(t, { fallback: p(Fh.Provider, { value: Nh, children: e6 }), children: [p(kp, { i18n: d2, locale: f2 }), p(Cm, { fallback: p(Fh.Provider, { value: Ph, children: e6 }), feature: el.post, monitoringClient: u2, rethrow: a2, children: p(Bh, { postLoadPromise: h2.postLoadPromise, monitoringClient: u2, slug: h2.isPostInPreview ? void 0 : h2.slug, language: h2.language, isPostInPreview: h2.isPostInPreview, children: e6 }) })] }) }) });
5372
+ }), { slug: r2, language: i2, isPostInPreview: !!o2, postLoadPromise: Jn(e7, Ih, a2 ? Rh : Lh), relatedSourcePromise: t2 };
5373
+ }, [o2, s2, i2, r2, a2, l2, u2, d2]);
5374
+ return p(zm.Provider, { value: g2.relatedSourcePromise, children: p(cp, { i18n: f2, children: m(t, { fallback: p(Vh.Provider, { value: zh, children: e6 }), children: [p(kp, { i18n: f2, locale: h2 }), p(km, { fallback: p(Vh.Provider, { value: Bh, children: e6 }), feature: el.post, monitoringClient: d2, rethrow: a2, children: p(Kh, { postLoadPromise: g2.postLoadPromise, monitoringClient: d2, slug: g2.isPostInPreview ? void 0 : g2.slug, language: g2.language, isPostInPreview: g2.isPostInPreview, children: e6 }) })] }) }) });
5359
5375
  }
5360
- function Hh({ children: e6, value: t2 }) {
5361
- let n2 = c(() => t2.isLoadingPost ? Lh : Promise.resolve(t2.relatedPostsSource), [t2.isLoadingPost, t2.relatedPostsSource]);
5362
- return p(Pm.Provider, { value: t2.relatedPostsSource.currentPostId, children: p(Nm.Provider, { value: n2, children: p(Fh.Provider, { value: t2, children: e6 }) }) });
5376
+ function Jh({ children: e6, value: t2 }) {
5377
+ let n2 = c(() => t2.isLoadingPost ? Uh : Promise.resolve(t2.relatedPostsSource), [t2.isLoadingPost, t2.relatedPostsSource]);
5378
+ return p(Bm.Provider, { value: t2.relatedPostsSource.currentPostId, children: p(zm.Provider, { value: n2, children: p(Vh.Provider, { value: t2, children: e6 }) }) });
5363
5379
  }
5364
- function Uh({ children: e6, value: t2 }) {
5365
- return t2 === void 0 ? p(Vh, { children: e6 }) : p(Hh, { value: t2, children: e6 });
5380
+ function Yh({ children: e6, value: t2 }) {
5381
+ return t2 === void 0 ? p(qh, { children: e6 }) : p(Jh, { value: t2, children: e6 });
5366
5382
  }
5367
- var Wh = Ln(`d89e577c-857b-4604-ab4a-9801a3386d40`);
5383
+ var Xh = Ln(`d89e577c-857b-4604-ab4a-9801a3386d40`);
5368
5384
  export {
5369
- Uh as PostProvider,
5370
- Uh as default,
5371
- Wh as injectAccessTokenGetter,
5372
- Ih as usePostContext
5385
+ Yh as PostProvider,
5386
+ Yh as default,
5387
+ Xh as injectAccessTokenGetter,
5388
+ Hh as usePostContext
5373
5389
  };
5374
5390
  //# sourceMappingURL=context-post-context-provider.mjs.map