1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[78885],{99095:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[prefix]/[slug]/[...suffix]",function(){return o(92119)}])},92119:function(e,t,o){"use strict";o.r(t),o.d(t,{__N_SSG:function(){return l}});var r=o(85893),n=o(58979),l=!0;t.default=e=>(0,r.jsx)(n.default,{...e})},58979:function(e,t,o){"use strict";o.r(t),o.d(t,{__N_SSG:function(){return h},default:function(){return g}});var r=o(85893),n=o(67294),l=()=>{let[e,t]=(0,n.useState)(""),[o,l]=(0,n.useState)(!1),a=()=>{l(!1),t("")};return{showNotification:e=>{t(e),l(!0),setTimeout(()=>{a()},3e3)},closeNotification:a,Notification:()=>(0,r.jsx)("div",{className:"notification fixed left-0 w-full px-2 z-20 bottom-14",children:(0,r.jsxs)("div",{className:" ".concat(o&&e?"opacity-100 ":"invisible opacity-0 bottom-0"," transition-opacity duration-200 \n max-w-3xl mx-auto bg-green-500 flex items-center justify-between px-4 py-2 text-white rounded-lg shadow-lg"),children:[e,(0,r.jsx)("button",{onClick:a,className:"ml-4 p-2 cursor-pointer bg-transparent text-white border-none",children:(0,r.jsx)("i",{className:"fas fa-times"})})]})})}},a=o(69325),i=o(93348),s=o(78174),u=o(11163);let d=e=>{document.querySelectorAll("a.catalog-item").forEach(t=>{e?(t.style.pointerEvents="none",t.style.opacity="0.5"):(t.style.pointerEvents="auto",t.style.opacity="1")})};var c=()=>{let e=(0,u.useRouter)(),t=(0,a.JA)("OPEN_WRITE_QRCODE","请é
ç½®å
¬ä¼å·äºç»´ç "),o=(0,a.JA)("OPEN_WRITE_BLOG_ID"),l=(0,a.JA)("OPEN_WRITE_NAME","请é
ç½®å
¬ä¼å·å"),c=(0,a.JA)("OPEN_WRITE_KEYWORD","请é
ç½®å
¬ä¼å·å
³é®è¯"),f=(0,a.JA)("OPEN_WRITE_BTN_TEXT","åå䏿ï¼å®æäººæºæ£æµï¼é
读å
¨æ"),p=(0,a.JA)("OPEN_WRITE_VALIDITY_DURATION",1),v=(0,a.JA)("OPEN_WRITE_WHITE_LIST",""),{isLoaded:_,isSignedIn:w}=(0,i.O)(),E=async()=>{try{var e;await (0,s.loadExternalResource)("https://readmore.openwrite.cn/js/readmore-2.0.js","js");let r=null===(e=window)||void 0===e?void 0:e.BTWPlugin;if(r){let e=new r;window.btw=e,e.init({qrcode:t,id:"article-wrapper",name:l,btnText:f,keyword:c,blogId:o,cookieAge:p});let n=setInterval(()=>{let e=document.getElementById("read-more-wrap"),t=document.getElementById("article-wrapper");!e&&t&&(d(!1),t.style.height="auto",clearInterval(n))},1e3);return()=>clearInterval(n)}}catch(e){console.error("OpenWrite å è½½å¼å¸¸",e)}};return(0,n.useEffect)(()=>{if(!function(e,t){if(!e||!t)return!0;let o=e.replace(/\?.*$/,"").replace(/.*\/([^/]+)(?:\.html)?$/,"$1"),r=t.includes(o);return r&&console.log("OpenWriteç½åå",o),r}(e.asPath,v)){if(w){console.log("ç¨æ·å·²ç»å½");return}s.isBrowser&&o&&!w&&(d(!0),document.getElementById("read-more-wrap")||E())}},[_,e]),(0,r.jsx)(r.Fragment,{})},f=o(58622);let p={header:0,sub_header:1,sub_sub_header:2},v=(e,t)=>{var o;let r=function e(t,o,r){if(r||(r=[]),!t)return r;for(let i of t){var n,l,a;let t=null===(n=o.block[i])||void 0===n?void 0:n.value;if(!t)continue;let{type:s}=t;s.indexOf("header")>=0&&!r.find(e=>e.id===i)&&r.push({id:i,type:s,text:(0,f.FB)(null===(a=t.properties)||void 0===a?void 0:a.title),indentLevel:p[s]}),(null===(l=t.content)||void 0===l?void 0:l.length)>0&&e(t.content,o,r)}return r}(null!==(o=e.content)&&void 0!==o?o:[],t),n=[{actual:-1,effective:-1}];for(let e of r){let{indentLevel:t}=e;for(;;){let{actual:o,effective:r}=n[n.length-1];if(t>o)e.indentLevel=r+1,n.push({actual:t,effective:e.indentLevel});else if(t===o){e.indentLevel=r;break}else n.pop()}}return r},_=e=>{let t=new URL(e,s.isBrowser?window.location.origin:""),o=Object.fromEntries(t.searchParams.entries());o.password&&localStorage.setItem("password_default",o.password);let r=t.pathname,n=localStorage.getItem("password_"+r),l=localStorage.getItem("password_default");return[o.password,n,l].filter(Boolean)};var w=o(31123),E=o(88495),m=o.n(E),h=!0,g=e=>{let{post:t}=e,o=(0,u.useRouter)(),{locale:s}=(0,i.O)(),[d,f]=(0,n.useState)((null==t?void 0:t.password)&&(null==t?void 0:t.password)!==""),{showNotification:p,Notification:E}=l(),h=e=>{if(!t)return!1;let r=m()((null==t?void 0:t.slug)+e);return!!e&&r===(null==t?void 0:t.password)&&(f(!1),localStorage.setItem("password_"+o.asPath,e),p(s.COMMON.ARTICLE_UNLOCK_TIPS),!0)};(0,n.useEffect)(()=>{(null==t?void 0:t.password)&&(null==t?void 0:t.password)!==""?f(!0):f(!1);let e=_(o.asPath);if(e.length>0){for(let t of e)if(h(t))break}},[t]),(0,n.useEffect)(()=>{var e;!d&&(null==t?void 0:null===(e=t.blockMap)||void 0===e?void 0:e.block)&&(t.content=Object.keys(t.blockMap.block).filter(e=>{var o,r;return(null===(r=t.blockMap.block[e])||void 0===r?void 0:null===(o=r.value)||void 0===o?void 0:o.parent_id)===t.id}),t.toc=v(t,t.blockMap))}
1,[o,d]),e={...e,lock:d,setLock:f,validPassword:h};let g=(0,w.getLayoutByTheme)({theme:(0,a.JA)("THEME"),router:(0,u.useRouter)()});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g,{...e}),(null==t?void 0:t.password)&&(null==t?void 0:t.password)!==""&&!d&&(0,r.jsx)(E,{}),(0,r.jsx)(c,{})]})}}},function(e){e.O(0,[88495,92888,49774,40179],function(){return e(e.s=99095)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.