1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3807],{41105:function(e,a,t){t.r(a);var s=t(85893),l=t(11163),r=t(67294),n=t(30037);a.default=e=>{let{cRef:a,slot:t}=e,i=(0,r.useRef)(),c=(0,r.useRef)();(0,r.useImperativeHandle)(a,()=>({show:()=>{var e,a,t;null==i||null===(a=i.current)||void 0===a||null===(e=a.classList)||void 0===e||e.remove("hidden"),null==c||null===(t=c.current)||void 0===t||t.focus()}}));let d=()=>{var e,a;null==i||null===(a=i.current)||void 0===a||null===(e=a.classList)||void 0===e||e.add("hidden")};return l.Router.events.on("routeChangeComplete",function(){for(var e=arguments.length,a=Array(e),t=0;t<e;t++)a[t]=arguments[t];d()}),(0,s.jsxs)("div",{id:"search-drawer-wrapper",ref:i,className:"hidden",children:[(0,s.jsx)("div",{className:"flex-col fixed px-5 w-full left-0 top-14 z-40 justify-center",children:(0,s.jsxs)("div",{className:"md:max-w-3xl w-full mx-auto animate__animated animate__faster animate__fadeIn",children:[(0,s.jsx)(n.default,{cRef:c}),t]})}),(0,s.jsx)("div",{id:"search-drawer-background",onClick:d,className:"animate__animated animate__faster animate__fadeIn fixed bg-day dark:bg-night top-0 left-0 z-30 w-full h-full"})]})}},30037:function(e,a,t){t.r(a);var s=t(85893),l=t(11163),r=t(24465),n=t(67294),i=t(23807),c=t(21384);let d=!1;a.default=e=>{let{currentTag:a,keyword:t,cRef:o}=e,{locale:u}
1=(0,r.O)(),[x,m]=(0,n.useState)(!1),f=(0,l.useRouter)(),h=(0,n.useRef)(),{searchModal:g}=(0,i.useNextGlobal)();(0,n.useImperativeHandle)(o,()=>({focus:()=>{var e;null==h||null===(e=h.current)||void 0===e||e.focus()}}));let j=()=>{if((0,c.JA)("ALGOLIA_APP_ID")){g.current.openSearch();return}let e=h.current.value;e&&""!==e?(m(!0),f.push({pathname:"/search/"+e}).then(e=>{m(!1)})):f.push({pathname:"/"}).then(e=>{})},p=()=>{h.current.value="",y(!1)};function v(){d=!0}let[N,y]=(0,n.useState)(!1),b=e=>{d||(h.current.value=e,e?y(!0):y(!1))};return(0,s.jsxs)("div",{className:"flex w-full bg-gray-100","data-aos":"fade-down","data-aos-duration":"500","data-aos-delay":"200","data-aos-once":"true","data-aos-anchor-placement":"top-bottom",children:[(0,s.jsx)("input",{ref:h,type:"text",placeholder:a?"".concat(u.SEARCH.TAGS," #").concat(a):"".concat(u.SEARCH.ARTICLES),className:"outline-none w-full text-sm pl-4 transition focus:shadow-lg font-light leading-10 text-black bg-gray-100 dark:bg-gray-800 dark:text-white",onKeyUp:e=>{13===e.keyCode?j(h.current.value):27===e.keyCode&&p()},onFocus:()=>{(0,c.JA)("ALGOLIA_APP_ID")&&g.current.openSearch()},onCompositionStart:v,onCompositionUpdate:v,onCompositionEnd:function(){d=!1},onChange:e=>b(e.target.value),defaultValue:t||""}),(0,s.jsx)("div",{className:"-ml-8 cursor-pointer float-right items-center justify-center py-2",onClick:j,children:(0,s.jsx)("i",{className:"hover:text-black transform duration-200 text-gray-500 cursor-pointer fas ".concat(x?"fa-spinner animate-spin":"fa-search")})}),N&&(0,s.jsx)("div",{className:"-ml-12 cursor-pointer dark:bg-gray-600 dark:hover:bg-gray-800 float-right items-center justify-center py-2",children:(0,s.jsx)("i",{className:"hover:text-black transform duration-200 text-gray-500 cursor-pointer fas fa-times",onClick:p})})]})}},81094:function(e,a,t){t.r(a);var s=t(85893),l=t(27411),r=t(78464),n=t(21384),i=t(24465),c=t(32909),d=t(45703),o=t(8635),u=t(97301),x=t(87052),m=t(30037),f=t(10087);a.default=e=>{let{post:a,slot:t,postCount:h}=e,{locale:g}=(0,i.O)(),j=a&&a.toc&&a.toc.length>1;return(0,s.jsxs)("aside",{id:"left",className:(JSON.parse((0,n.JA)("LAYOUT_SIDEBAR_REVERSE"))?"ml-4":"mr-4")+" hidden lg:block flex-col w-60 relative z-30",children:[(0,s.jsx)("section",{className:"w-60",children:(0,s.jsxs)("section",{className:"shadow hidden lg:block mb-5 pb-4 bg-white dark:bg-hexo-black-gray hover:shadow-xl duration-200",children:[(0,s.jsx)(u.default,{className:"min-h-32 ",...e}),(0,s.jsx)("div",{className:"pt-2 px-2 ",children:(0,s.jsx)(x.MenuList,{allowCollapse:!0,...e})}),(0,n.JA)("NEXT_MENU_SEARCH",null,c.default)&&(0,s.jsx)("div",{className:"px-2 pt-2 ",children:(0,s.jsx)(m.default,{...e})})]})}),(0,s.jsxs)("div",{className:"sticky top-4 hidden lg:block",children:[(0,s.jsx)(d.default,{children:(0,s.jsxs)(r.Z,{children:[j&&(0,s.jsx)("div",{className:"dark:text-gray-400 text-gray-600 bg-white dark:bg-hexo-black-gray duration-200",children:(0,s.jsx)(f.default,{toc:a.toc})},g.COMMON.TABLE_OF_CONTENTS),(0,s.jsxs)("div",{className:"mb-5 bg-white dark:bg-hexo-black-gray duration-200 py-6",children:[(0,s.jsx)(o.default,{...e}),(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"mt-2 text-center dark:text-gray-300 font-light text-xs",children:[(0,s.jsxs)("span",{className:"px-1 ",children:[(0,s.jsx)("strong",{className:"font-medium",children:h}),g.COMMON.POSTS]}),(0,s.jsxs)("span",{className:"px-1 busuanzi_container_site_uv hidden",children:["|"," ",(0,s.jsx)("strong",{className:"pl-1 busuanzi_value_site_uv font-medium"}),g.COMMON.VISITORS]})]})})]},g.NAV.ABOUT)]})}),(0,s.jsxs)("div",{className:"flex justify-center",children:[t,(0,s.jsx)(l.default,{})]})]})]})}},14245:function(e,a,t){t.r(a);var s=t(85893),l=t(24465),r=t(93096),n=t.n(r),i=t(7835),c=t(67294),d=t(62348),o=t(91627),u=t(97301),x=t(87052),m=t(41105),f=t(16187),h=t(32909),g=t(21384),j=t(23807),p=t(11163);let v=0;a.default=e=>{let{tags:a,currentTag:t,categories:r,currentCategory:N}=e,{locale:y}=(0,l.O)(),b=(0,c.useRef)(),w=(0,c.useRef)(null),k=(0,p.useRouter)(),_=(0,c.useCallback)(n()(()=>{let e=window.scrollY;if(e>=v&&e>10){let a=document.querySelector("#sticky-nav");a&&a.classList.replace("top-0","-top-40"),v=e}else{let a=document.querySelector("#sticky-nav");a&&a.classList.replace("-top-40","top-0"),v=e}},200),[]);(0,c.useEffect)(()=>("autoCollapse"===(0,g.JA)("NEXT_NAV_TYPE",null,h.default)&&(_(),window.addEventListener("scroll",_)),()=>{"autoCollapse"===(0,g.JA)("NEXT_NAV_TYPE",null,h.default)&&window.removeEventListener("scroll",_)}
1),[]);let[E,O]=(0,c.useState)(!1);(0,c.useEffect)(()=>(k.events.on("routeChangeComplete",A),()=>{k.events.off("routeChangeComplete",A)}),[]);let A=()=>{O(!1)},{searchModal:C}=(0,j.useNextGlobal)(),S=(0,s.jsxs)(s.Fragment,{children:[r&&(0,s.jsxs)("section",{className:"mt-8",children:[(0,s.jsxs)("div",{className:"text-sm flex flex-nowrap justify-between font-light px-2",children:[(0,s.jsxs)("div",{className:"text-gray-600 dark:text-gray-200",children:[(0,s.jsx)("i",{className:"mr-2 fas fa-th-list"}),y.COMMON.CATEGORY]}),(0,s.jsxs)(i.Z,{href:"/category",passHref:!0,className:"mb-3 text-gray-500 hover:text-black dark:text-gray-400 dark:hover:text-white hover:underline cursor-pointer",children:[y.COMMON.MORE," ",(0,s.jsx)("i",{className:"fas fa-angle-double-right"})]})]}),(0,s.jsx)(d.default,{currentCategory:N,categories:r})]}),a&&(0,s.jsxs)("section",{className:"mt-4",children:[(0,s.jsxs)("div",{className:"text-sm py-2 px-2 flex flex-nowrap justify-between font-light dark:text-gray-200",children:[(0,s.jsxs)("div",{className:"text-gray-600 dark:text-gray-200",children:[(0,s.jsx)("i",{className:"mr-2 fas fa-tag"}),y.COMMON.TAGS]}),(0,s.jsxs)(i.Z,{href:"/tag",passHref:!0,className:"text-gray-500 hover:text-black dark:hover:text-white hover:underline cursor-pointer",children:[y.COMMON.MORE," ",(0,s.jsx)("i",{className:"fas fa-angle-double-right"})]})]}),(0,s.jsx)("div",{className:"p-2",children:(0,s.jsx)(f.default,{tags:a,currentTag:t})})]})]});return(0,s.jsxs)("div",{id:"top-nav",className:"block lg:hidden",children:[(0,s.jsx)(m.default,{cRef:b,slot:S}),(0,s.jsxs)("div",{id:"sticky-nav",className:"".concat("normal"!==(0,g.JA)("NEXT_NAV_TYPE",null,h.default)?"fixed":"relative"," lg:relative w-full top-0 z-20 transform duration-500"),children:[(0,s.jsxs)("div",{className:"w-full flex justify-between items-center p-4 bg-black dark:bg-gray-800 text-white",children:[(0,s.jsx)("div",{className:"flex flex-none flex-grow-0",children:(0,s.jsx)("div",{onClick:()=>{O(!E)},className:"w-8 cursor-pointer",children:E?(0,s.jsx)("i",{className:"fas fa-times"}):(0,s.jsx)("i",{className:"fas fa-bars"})})}),(0,s.jsx)("div",{className:"flex",children:(0,s.jsx)(u.default,{...e})}),(0,s.jsx)("div",{className:"mr-1 flex justify-end items-center text-sm space-x-4 font-serif dark:text-gray-200",children:(0,s.jsx)("div",{className:"cursor-pointer block lg:hidden",onClick:()=>{var e,a;(0,g.JA)("ALGOLIA_APP_ID")?null==C||null===(e=C.current)||void 0===e||e.openSearch():null==b||null===(a=b.current)||void 0===a||a.show()},children:(0,s.jsx)("i",{className:"mr-2 fas fa-search"})})})]}),(0,s.jsx)(o.Z,{collapseRef:w,type:"vertical",isOpen:E,children:(0,s.jsx)(x.MenuList,{onHeightChange:e=>{var a;return null===(a=w.current)||void 0===a?void 0:a.updateCollapseHeight(e)},...e,from:"top"})})]})]})}},23807:function(e,a,t){t.r(a),t.d(a,{Layout404:function(){return H},LayoutArchive:function(){return Y},LayoutBase:function(){return J},LayoutCategoryIndex:function(){return z},LayoutIndex:function(){return F},LayoutPostList:function(){return B},LayoutSearch:function(){return G},LayoutSlug:function(){return V},LayoutTagIndex:function(){return U},THEME_CONFIG:function(){return L.default},useNextGlobal:function(){return P}});var s=t(85893),l=t(834),r=t(21384),n=t(24465),i=t(47935),c=t(5152),d=t.n(c),o=t(7835),u=t(11163),x=t(67294),m=t(71322),f=t(84703),h=t(43316),g=t(32807),j=t(295),p=t(55141),v=t(97394),N=t(45703),y=t(47391),b=t(13841),w=t(95442),k=t(57312),_=t(81094),E=t(23575),O=t(39386),A=t(84160),C=t(18518),S=t(52111),T=t(14245),L=t(32909),R=t(82104);let I=d()(()=>Promise.resolve().then(t.bind(t,34701)),{loadableGenerated:{webpack:()=>[34701]},ssr:!1}),M=(0,x.createContext)(),P=()=>(0,x.useContext)(M),J=e=>{let{children:a,headerSlot:t,rightAreaSlot:l,post:n}=e,c=(0,x.useRef)(null),d=(0,x.useRef)(null),[o,u]=(0,x.useState)(!1),[m,f]=(0,x.useState)(0),h=()=>{let e=document.getElementById("wrapper"),a=null==e?void 0:e.clientHeight,t=window.pageYOffset,s=parseFloat((t/(a-window.outerHeight)*100).toFixed(0));s>100&&(s=100);let l=t>100&&s>0;l!==o&&u(l),f(s)};(0,x.useEffect)(()=>{var e,a;return 0===document.getElementsByClassName("fb-customerchat").length?null==d||null===(e=d.current)||void 0===e||e.classList.replace("bottom-24","bottom-12"):null==d||null===(a=d.current)||void 0===a||a.classList.replace("bottom-12","bottom-24"),document.addEventListener("scroll",h),()=>document.removeEventListener("scroll",h)},[o]);let g=(0,x.useRef)(null),j=(0,s.jsx)("div",{className:"block lg:hidden",children:(0,s.jsx)(S.default,{onClick:()=>{var e;null==g||null===(e=g.current)||void 0===e||e.handleSwitchVisible()}})}),p=i.isBrowser?document.getElementById("article-wrapper"):null,v=(0,x.useRef)(null);return(0,s.jsx)(M.Provider,{value:{searchModal:v},children:(0,s.jsxs)("div",{id:"theme-next",className:"".concat((0,r.JA)("FONT_STYLE")," dark:bg-black scroll-smooth"),children:[(0,s.jsx)(R.Style,{}),(0,s.jsx)(T.default,{...e}),(0,s.jsx)(I,{cRef:v,...e}),(0,s.jsx)(s.Fragment,{children:t}),(0,s.jsx)("div",{className:"h-0.5 w-full bg-gray-700 dark:bg-gray-600 hidden lg:block"}),(0,s.jsxs)("main",{id:"wrapper",className:(JSON.parse((0,r.JA)("LAYOUT_SIDEBAR_REVERSE"))?"flex-row-reverse":"")+" next relative flex justify-center flex-1 pb-12",children:[(0,s.jsx)(_.default,{targetRef
1:c,...e}),(0,s.jsx)("section",{id:"container-inner",className:"".concat("normal"!==(0,r.JA)("NEXT_NAV_TYPE",null,L.default)?"mt-24":""," lg:max-w-3xl xl:max-w-4xl flex-grow md:mt-0 min-h-screen w-full relative z-10"),ref:c,children:a}),(0,r.JA)("NEXT_RIGHT_BAR",null,L.default)&&(0,s.jsx)(E.default,{targetRef:c,slot:l,...e})]}),n&&(0,s.jsx)("div",{className:"block lg:hidden",children:(0,s.jsx)(C.default,{post:n,cRef:g,targetRef:p})}),(0,s.jsx)("div",{ref:d,className:"right-8 bottom-12 lg:right-2 fixed justify-end z-20 ",children:(0,s.jsxs)("div",{className:(o?"animate__animated ":"hidden")+" animate__fadeInUp rounded-md glassmorphism justify-center duration-500 animate__faster flex space-x-2 items-center cursor-pointer ",children:[(0,s.jsx)(k.default,{percent:m}),(0,s.jsx)(w.default,{}),(0,s.jsx)(y.default,{}),j]})}),(0,s.jsx)(b.default,{title:(0,r.JA)("TITLE")})]})})},F=e=>{let{notice:a}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.default,{className:"my-2 lg:hidden",children:(0,s.jsx)(m.default,{post:a})}),(0,s.jsx)(g.default,{...e}),"page"!==(0,r.JA)("POST_LIST_STYLE")?(0,s.jsx)(v.default,{...e,showSummary:!0}):(0,s.jsx)(p.default,{...e})]})},B=e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g.default,{...e}),"page"!==(0,r.JA)("POST_LIST_STYLE")?(0,s.jsx)(v.default,{...e,showSummary:!0}):(0,s.jsx)(p.default,{...e})]}),G=e=>{let{locale:a}=(0,n.O)(),{posts:t,keyword:c}=e;return(0,x.useEffect)(()=>{i.isBrowser&&(0,l.Z)({doms:document.getElementById("posts-wrapper"),search:c,target:{element:"span",className:"text-red-500 border-b border-dashed"}})},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(O.default,{children:(0,s.jsxs)("div",{className:"p-4 dark:text-gray-200",children:[(0,s.jsx)("i",{className:"mr-1 fas fa-search"})," ",null==t?void 0:t.length," ",a.COMMON.RESULT_OF_SEARCH]})}),(0,s.jsx)("div",{className:"md:mt-5",children:"page"!==(0,r.JA)("POST_LIST_STYLE")?(0,s.jsx)(v.default,{...e,showSummary:!0}):(0,s.jsx)(p.default,{...e})})]})},H=e=>{let a=(0,u.useRouter)();return(0,x.useEffect)(()=>{setTimeout(()=>{i.isBrowser&&document.getElementById("article-wrapper")||a.push("/").then(()=>{})},3e3)},[]),(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"md:-mt-20 text-black w-full h-screen text-center justify-center content-center items-center flex flex-col",children:(0,s.jsxs)("div",{className:"dark:text-gray-200",children:[(0,s.jsxs)("h2",{className:"inline-block border-r-2 border-gray-600 mr-2 px-3 py-2 align-top",children:[(0,s.jsx)("i",{className:"mr-2 fas fa-spinner animate-spin"}),"404"]}),(0,s.jsx)("div",{className:"inline-block text-left h-32 leading-10 items-center",children:(0,s.jsx)("h2",{className:"m-0 p-0",children:"页颿 æ³å è½½ï¼å³å°è¿åé¦é¡µ"})})]})})})},Y=e=>{let{archivePosts:a}=e;return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"mb-10 pb-20 bg-white md:p-12 p-3 dark:bg-hexo-black-gray shadow-md min-h-full",children:Object.keys(a).map(e=>(0,s.jsx)(j.default,{posts:a[e],archiveTitle:e},e))})})},V=e=>{let{post:a,lock:t,validPassword:l}=e,n=(0,u.useRouter)(),c=1e3*(0,r.JA)("POST_WAITING_TIME_FOR_404");return(0,x.useEffect)(()=>{a||setTimeout(()=>{i.isBrowser&&!document.querySelector("#article-wrapper #notion-article")&&n.push("/404").then(()=>{console.warn("æ¾ä¸å°é¡µé¢",n.asPath)})},c)},[a]),(0,s.jsxs)(s.Fragment,{children:[a&&!t&&(0,s.jsx)(f.default,{...e}),a&&t&&(0,s.jsx)(h.ArticleLock,{validPassword:l})]})},z=e=>{let{allPosts:a,categoryOptions:t}=e,{locale:l}=(0,n.O)();return(0,s.jsx)("div",{totalPosts:a,...e,children:(0,s.jsxs)("div",{className:"bg-white dark:bg-hexo-black-gray px-10 py-10 shadow h-full",children:[(0,s.jsxs)("div",{className:"dark:text-gray-200 mb-5",children:[(0,s.jsx)("i",{className:"mr-4 fas faTh"}),l.COMMON.CATEGORY,":"]}),(0,s.jsx)("div",{id:"category-list",className:"duration-200 flex flex-wrap",children:null==t?void 0:t.map(e=>(0,s.jsx)(o.Z,{href:"/category/".concat(e.name),passHref:!0,legacyBehavior:!0,children:(0,s.jsxs)("div",{className:"hover:text-black dark:hover:text-white dark:text-gray-300 dark:hover:bg-gray-600 px-5 cursor-pointer py-2 hover:bg-gray-100",children:[(0,s.jsx)("i",{className:"mr-4 fas fa-folder"}),e.name,"(",e.count,")"]})},e.name))})]})})},U=e=>{let{tagOptions:a}=e,{locale:t}=(0,n.O)();return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"bg-white dark:bg-hexo-black-gray px-10 py-10 shadow h-full",children:[(0,s.jsxs)("div",{className:"dark:text-gray-200 mb-5",children:[(0,s.jsx)("i",{className:"fas fa-tags mr-4"}),t.COMMON.TAGS,":"]}),(0,s.jsx)("div",{id:"tags-list",className:"duration-200 flex flex-wrap",children:a.map(e=>(0,s.jsx)("div",{className:"p-2",children:(0,s.jsx)(A.default,{tag:e},e.name)},e.name))})]})})}}}]);
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.