PageSourceSearch

https://www.barnman.cc/_next/static/chunks/pages/auth-151a80088931d011.js

js barnman.cc collected 2026-09-25 22:27:26 UTC 5,363 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[12473],{20876:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth",function(){return n(72550)}])},58979:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return g},default:function(){return I}});var r=n(85893),o=n(43551),l=n.n(o),a=n(67294),i=()=>{let[e,t]=(0,a.useState)(""),[n,o]=(0,a.useState)(!1),l=()=>{o(!1),t("")};return{showNotification:e=>{t(e),o(!0),setTimeout(()=>{l()},3e3)},closeNotification:l,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(n&&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:l,className:"ml-4 p-2 cursor-pointer bg-transparent text-white border-none",children:(0,r.jsx)("i",{className:"fas fa-times"})})]})})}},s=n(69325),u=n(26964),c=n(78174),d=n(11163);let f=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 p=()=>{let e=(0,d.useRouter)(),t=(0,s.JA)("OPEN_WRITE_QRCODE","请配置公众号二维码"),n=(0,s.JA)("OPEN_WRITE_BLOG_ID"),o=(0,s.JA)("OPEN_WRITE_NAME","请配置公众号名"),l=(0,s.JA)("OPEN_WRITE_KEYWORD","请配置公众号关键词"),i=(0,s.JA)("OPEN_WRITE_BTN_TEXT","原创不易,完成人机检测,阅读全文"),p=(0,s.JA)("OPEN_WRITE_VALIDITY_DURATION",1),_=(0,s.JA)("OPEN_WRITE_WHITE_LIST",""),{isLoaded:v,isSignedIn:w}=(0,u.O)(),E=async()=>{try{var e;await (0,c.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:o,btnText:i,keyword:l,blogId:n,cookieAge:p});let a=setInterval(()=>{let e=document.getElementById("read-more-wrap"),t=document.getElementById("article-wrapper");!e&&t&&(f(!1),t.style.height="auto",clearInterval(a))},1e3);return()=>clearInterval(a)}}catch(e){console.error("OpenWrite 加载异常",e)}};return(0,a.useEffect)(()=>{if(!function(e,t){if(!e||!t)return!0;let n=e.replace(/\?.*$/,"").replace(/.*\/([^/]+)(?:\.html)?$/,"$1"),r=t.includes(n);return r&&console.log("OpenWrite白名单",n),r}(e.asPath,_)){if(w){console.log("用户已登录");return}c.isBrowser&&n&&!w&&(f(!0),document.getElementById("read-more-wrap")||E())}},[v,e]),(0,r.jsx)(r.Fragment,{})},_=n(58622);let v={header:0,sub_header:1,sub_sub_header:2},w=(e,t)=>{var n;let r=function e(t,n,r){if(r||(r=[]),!t)return r;for(let i of t){var o,l,a;let t=null===(o=n.block[i])||void 0===o?void 0:o.value;if(!t)continue;let{type:s}=t;(null===(l=t.content)||void 0===l?void 0:l.length)>0?e(t.content,n,r):s.indexOf("header")>=0?r.find(e=>e.id===i)||r.push({id:i,type:s,text:(0,_.FB)(null===(a=t.properties)||void 0===a?void 0:a.title),indentLevel:v[s]}):"transclusion_reference"===s?e([t.format.transclusion_reference_pointer.id],n,r):"transclusion_container"===s&&e(t.content,n,r)}return r}(null!==(n=e.content)&&void 0!==n?n:[],t),o=[{actual:-1,effective:-1}];for(let e of r){let{indentLevel:t}=e;for(;;){let{actual:n,effective:r}=o[o.length-1];if(t>n)e.indentLevel=r+1,o.push({actual:t,effective:e.indentLevel});else if(t===n){e.indentLevel=r;break}else o.pop()}}return r},E=e=>{let t=new URL(e,c.isBrowser?window.location.origin:""),n=Object.fromEntries(t.searchParams.entries());n.password&&localStorage.setItem("password_default",n.password);let r=t.pathname,o=localStorage.getItem("password_"+r),l=localStorage.getItem("password_default");return[n.password,o,l].filter(Boolean)};var m=n(31123),h=n(88495),N=n.n(h),g=!0,I=e=>{let{post:t}=e,n=(0,d.useRouter)(),{locale:o}=(0,u.O)(),[c,f]=(0,a.useState)((null==t?void 0:t.password)&&(null==t?void 0:t.password)!==""),{showNotification:_,Notification:v}=i(),h=e=>{if(!t)return!1;let r=N()((null==t?void 0:t.slug)+e);return!!e&&r===(null==t?void 0:t.password)&&(f(!1),localStorage.setItem("password_"+n.asPath,e),_(o.COMMON.ARTICLE_UNLOCK_TIPS),!0)};(0,a.useEffect)(()=>{(null==t?void 0:t.password)&&(null==t?void 0:t.password)!==""?f(!0):f(!1);let e=E(n.asPath);if(e.length>0){for(let t of e)if(h(t))break}},[t]),(0,a.useEffect)(()=>{var e;!c&&(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 n,r;return(null===(r=t.blockMap.block[e])||void 0===r?void 0:null===(n=r.value)||void 0===n?void 0:n.parent_id)===t.id}),t.toc=w(t,t.blockMap))},[n,c]),e={...e,lock:c,validPassword:h};let g=(0,s.JA)("THEME",l().THEME,e.NOTION_CONFIG);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.DynamicLayout,{theme:g,layoutName:"LayoutSlug",...e}),(null==t?void 0:t.password)&&(null==t?void 0:t.password)!==""&&!c&&(0,r.jsx)(v,{}),(0,r.jsx)(p,{})]})}},72550:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return i}});var r=n(85893),o=n(11163),l=n(67294),a=n(58979),i=!0;t.default=e=>{let{redirect_pathname:t,redirect_query:n}=e,i=(0,o.useRouter)();return(0,l.useEffect)(()=>{null==i||i.push({pathname:t,query:n})},[]),(0,r.jsx)(a.default,{...e})}}},function(e){e.O(0,[88495,92888,49774,40179],function(){return e(e.s=20876)}),_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.