speice.io/assets/js/5601.f9142a81.js

1 line
12 KiB
JavaScript
Raw Permalink Normal View History

"use strict";(self.webpackChunkspeice_io=self.webpackChunkspeice_io||[]).push([["5601"],{4183:function(e,t,a){a.d(t,{wj:()=>r,nO:()=>m,iZ:()=>f,cH:()=>N,n4:()=>c,Ne:()=>Z,CS:()=>v});var i=a("5893"),n=a("7294"),s=a("5346"),l=a("8312");function r(){let e=(0,l.Z)(),t=e?.data?.blogMetadata;if(!t)throw Error("useBlogMetadata() can't be called on the current route because the blog metadata could not be found in route context");return t}let o=n.createContext(null);function c(e){let{children:t,content:a,isBlogPostPage:s=!1}=e,l=function(e){let{content:t,isBlogPostPage:a}=e;return(0,n.useMemo)(()=>({metadata:t.metadata,frontMatter:t.frontMatter,assets:t.assets,toc:t.toc,isBlogPostPage:a}),[t,a])}({content:a,isBlogPostPage:s});return(0,i.jsx)(o.Provider,{value:l,children:t})}function m(){let e=(0,n.useContext)(o);if(null===e)throw new s.i6("BlogPostProvider");return e}var u=a("4757"),h=a("2933");let d=e=>new Date(e).toISOString();function g(e){let t=e.map(p);return{author:1===t.length?t[0]:t}}function x(e,t,a){return e?{image:function(e){let{imageUrl:t,caption:a}=e;return{"@type":"ImageObject","@id":t,url:t,contentUrl:t,caption:a}}({imageUrl:t(e,{absolute:!0}),caption:`title image for the blog post: ${a}`})}:{}}function v(e){let{siteConfig:t}=(0,h.Z)(),{withBaseUrl:a}=(0,u.Cg)(),{metadata:{blogDescription:i,blogTitle:n,permalink:s}}=e,l=`${t.url}${s}`;return{"@context":"https://schema.org","@type":"Blog","@id":l,mainEntityOfPage:l,headline:n,description:i,blogPost:e.items.map(e=>(function(e,t,a){let{assets:i,frontMatter:n,metadata:s}=e,{date:l,title:r,description:o,lastUpdatedAt:c}=s,m=i.image??n.image,u=n.keywords??[],h=`${t.url}${s.permalink}`,v=c?d(c):void 0;return{"@type":"BlogPosting","@id":h,mainEntityOfPage:h,url:h,headline:r,name:r,description:o,datePublished:l,...v?{dateModified:v}:{},...g(s.authors),...x(m,a,r),...u?{keywords:u}:{}}})(e.content,t,a))}}function f(){let e=r(),{assets:t,metadata:a}=m(),{siteConfig:i}=(0,h.Z)(),{withBaseUrl:n}=(0,u.Cg)(),{date:s,title:l,description:o,frontMatter:c,lastUpdatedAt:v}=a,f=t.image??c.image,p=c.keywords??[],j=v?d(v):void 0,w=`${i.url}${a.permalink}`;return{"@context":"https://schema.org","@type":"BlogPosting","@id":w,mainEntityOfPage:w,url:w,headline:l,name:l,description:o,datePublished:s,...j?{dateModified:j}:{},...g(a.authors),...x(f,n,l),...p?{keywords:p}:{},isPartOf:{"@type":"Blog","@id":`${i.url}${e.blogBasePath}`,name:e.blogTitle}}}function p(e){return{"@type":"Person",...e.name?{name:e.name}:{},...e.title?{description:e.title}:{},...e.url?{url:e.url}:{},...e.email?{email:e.email}:{},...e.imageURL?{image:e.imageURL}:{}}}var j=a("6550"),w=a("3012"),b=a("9246");function N(e){let{pathname:t}=(0,j.TH)();return(0,n.useMemo)(()=>e.filter(e=>{var a,i;return a=e,i=t,(!a.unlisted||!!(0,b.Mg)(a.permalink,i))&&!0}),[e,t])}function Z(e){let{items:t,ulClassName:a,liClassName:n,linkClassName:s,linkActiveClassName:l}=e;return(0,i.jsx)("ul",{className:a,children:t.map(e=>(0,i.jsx)("li",{className:n,children:(0,i.jsx)(w.Z,{isNavLink:!0,to:e.permalink,className:s,activeClassName:l,children:e.title})},e.permalink))})}},1389:function(e,t,a){a.d(t,{Z:()=>w});var i=a("5893");a("7294");var n=a("7026"),s=a("3012");let l="githubSvg_Uu4N",r="xSvg_y3PF",o=function(e){return(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,i.jsx)("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"}),(0,i.jsx)("path",{d:"M3.6 9h16.8"}),(0,i.jsx)("path",{d:"M3.6 15h16.8"}),(0,i.jsx)("path",{d:"M11.5 3a17 17 0 0 0 0 18"}),(0,i.jsx)("path",{d:"M12.5 3a17 17 0 0 1 0 18"})]})},c="authorSocials_rSDt",m="authorSocialLink_owbf",u={twitter:{Icon:function(e){return(0,i.jsx)("svg",{viewBox:"0 0 256 209",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",...e,children:(0,i.jsx)("path",{d:"M256 25.45c-9.42 4.177-19.542 7-30.166 8.27 10.845-6.5 19.172-16.793 23.093-29.057a105