PageSourceSearch

https://lleavesg.top/_next/static/chunks/2893.9fa425ea9b4143e5.js

js lleavesg.top collected 2026-10-01 07:46:56 UTC 8,065 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2893,7835],{2893:function(e,t,r){r.r(t),r.d(t,{default:function(){return h}});var n=r(85893),a=r(67294),i=()=>{let[e,t]=(0,a.useState)({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight});return(0,a.useEffect)(()=>{let e=()=>{t({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),e},s=r(21384),o=r(76966),l=r(88503),c=r(7835),d=r(11163);function h(e){var t;let[r,h]=(0,a.useState)({x:"0px",y:"0px"}),[u,f]=(0,a.useState)(!1),{isDarkMode:m,updateDarkMode:p,locale:x}=(0,o.Og)(),w=(0,a.useRef)(null),N=i(),[E,v]=(0,a.useState)(0),[g,_]=(0,a.useState)(0),{allNavPages:C}=e,j=(0,d.useRouter)();(0,a.useLayoutEffect)(()=>{v(w.current.offsetWidth),_(w.current.offsetHeight)},[]),(0,a.useEffect)(()=>{f(!1)},[j]),(0,a.useEffect)(()=>{let e=e=>{e.preventDefault();let t=e.clientX<N.width-E?e.clientX:N.width-E,r=e.clientY<N.height-g?e.clientY:N.height-g;h({y:"".concat(r,"px"),x:"".concat(t,"px")}),f(!0)},t=e=>{f(!1)};return window.addEventListener("contextmenu",e),window.addEventListener("click",t),()=>{window.removeEventListener("contextmenu",e),window.removeEventListener("click",t)}},[N]);let M=(0,s.JA)("CUSTOM_RIGHT_CLICK_CONTEXT_MENU_RANDOM_POST"),T=(0,s.JA)("CUSTOM_RIGHT_CLICK_CONTEXT_MENU_CATEGORY"),y=(0,s.JA)("CUSTOM_RIGHT_CLICK_CONTEXT_MENU_TAG"),b=null!==(t=e.canCopy)&&void 0!==t?t:(0,s.JA)("CAN_COPY"),U=(0,s.JA)("CUSTOM_RIGHT_CLICK_CONTEXT_MENU_SHARE_LINK"),O=(0,s.JA)("CUSTOM_RIGHT_CLICK_CONTEXT_MENU_DARK_MODE"),A=(0,s.JA)("CUSTOM_RIGHT_CLICK_CONTEXT_MENU_THEME_SWITCH");return(0,n.jsx)("div",{ref:w,style:{top:r.y,left:r.x},className:"".concat(u?"":"invisible opacity-0"," select-none transition-opacity duration-200 fixed z-50"),children:(0,n.jsxs)("div",{className:"rounded-xl w-52 dark:hover:border-yellow-600 bg-white dark:bg-[#040404] dark:text-gray-200 dark:border-gray-600 p-3 border drop-shadow-lg flex-col duration-300 transition-colors",children:[(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)("i",{onClick:function(){window.history.back()},className:"hover:bg-blue-600 hover:text-white px-2 py-2 text-center w-8 rounded cursor-pointer fa-solid fa-arrow-left"}),(0,n.jsx)("i",{onClick:function(){window.history.forward()},className:"hover:bg-blue-600 hover:text-white px-2 py-2 text-center w-8 rounded cursor-pointer fa-solid fa-arrow-right"}),(0,n.jsx)("i",{onClick:function(){window.location.reload()},className:"hover:bg-blue-600 hover:text-white px-2 py-2 text-center w-8 rounded cursor-pointer fa-solid fa-rotate-right"}),(0,n.jsx)("i",{onClick:function(){window.scrollTo({top:0,behavior:"smooth"})},className:"hover:bg-blue-600 hover:text-white px-2 py-2 text-center w-8 rounded cursor-pointer fa-solid fa-arrow-up"})]}),(0,n.jsx)("hr",{className:"my-2 border-dashed"}),(0,n.jsxs)("div",{className:"w-full px-2",children:[M&&(0,n.jsxs)("div",{onClick:function(){let e=Math.floor(Math.random()*C.length),t=C[e];j.push("".concat((0,s.JA)("SUB_PATH",""),"/").concat(null==t?void 0:t.slug))},title:x.MENU.WALK_AROUND,className:"w-full px-2 h-10 flex justify-start items-center flex-nowrap cursor-pointer hover:bg-blue-600 hover:text-white rounded-lg duration-200 transition-all",children:[(0,n.jsx)("i",{className:"fa-solid fa-podcast mr-2"}),(0,n.jsx)("div",{className:"whitespace-nowrap",children:x.MENU.WALK_AROUND})]}),T&&(0,n.jsxs)(c.Z,{href:"/category",title:x.MENU.CATEGORY,className:"w-full px-2 h-10 flex justify-start items-center flex-nowrap cursor-pointer hover:bg-blue-600 hover:text-white rounded-lg duration-200 transition-all",children:[(0,n.jsx)("i",{className:"fa-solid fa-square-minus mr-2"}),(0,n.jsx)("div",{className:"whitespace-nowrap",children:x.MENU.CATEGORY})]}),y&&(0,n.jsxs)(c.Z,{href:"/tag",title:x.MENU.TAGS,className:"w-full px-2 h-10 flex justify-start items-center flex-nowrap cursor-pointer hover:bg-blue-600 hover:text-white rounded-lg duration-200 transition-all",children:[(0,n.jsx)("i",{className:"fa-solid fa-tag mr-2"}),(0,n.jsx)("div",{className:"whitespace-nowrap",children:x.MENU.TAGS})]})]}),(0,n.jsx)("hr",{className:"my-2 border-dashed"}),(0,n.jsxs)("div",{className:"w-full px-2",children:[b&&(0,n.jsxs)("div",{onClick:function(){let e=document.getSelection().toString();if(e){let t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),t&&t.parentNode&&t.parentNode.contains(t)&&t.parentNode.removeChild(t)}},title:x.MENU.COPY,className:"w-full px-2 h-10 flex justify-start items-center flex-nowrap cursor-pointer hover:bg-blue-600 hover:text-white rounded-lg duration-200 transition-all",children:[(0,n.jsx)("i",{className:"fa-solid fa-copy mr-2"}),(0,n.jsx)("div",{className:"whitespace-nowrap",children:x.MENU.COPY})]}),U&&(0,n.jsxs)("div",{onClick:function(){let e=window.location.href;navigator.clipboard.writeText(e).then(()=>{alert("".concat(x.COMMON.PAGE_URL_COPIED," : ").concat(e))}).catch(e=>{console.error("复制页面地址失败:",e)})},title:x.MENU.SHARE_URL,className:"w-full px-2 h-10 flex justify-start items-center flex-nowrap cursor-pointer hover:bg-blue-600 hover:text-white rounded-lg duration-200 transition-all",children:[(0,n.jsx)("i",{className:"fa-solid fa-arrow-up-right-from-square mr-2"}),(0,n.jsx)("div",{className:"whitespace-nowrap",children:x.MENU.SHARE_URL})]}),O&&(0,n.jsxs)("div",{onClick:function(){var e,t;let r=!m;(0,l.saveDarkModeToLocalStorage)(r),p(r);let n=document.getElementsByTagName("html")[0];null===(e=n.classList)||void 0===e||e.remove(r?"light":"dark"),null===(t=n.classList)||void 0===t||t.add(r?"dark":"light")},title:m?x.MENU.LIGHT_MODE:x.MENU.DARK_MODE,className:"w-full px-2 h-10 flex justify-start items-center flex-nowrap cursor-pointer hover:bg-blue-600 hover:text-white rounded-lg duration-200 transition-all",children:[m?(0,n.jsx)("i",{className:"fa-regular fa-sun mr-2"}):(0,n.jsx)("i",{className:"fa-regular fa-moon mr-2"}),(0,n.jsxs)("div",{className:"whitespace-nowrap",children:[" ",m?x.MENU.LIGHT_MODE:x.MENU.DARK_MODE]})]}),A&&(0,n.jsxs)("div",{onClick:function(){let e=l.THEMES[Math.floor(Math.random()*l.THEMES.length)],t=j.query;t.theme=e,j.push({pathname:j.pathname,query:t})},title:x.MENU.THEME_SWITCH,className:"w-full px-2 h-10 flex justify-start items-center flex-nowrap cursor-pointer hover:bg-blue-600 hover:text-white rounded-lg duration-200 transition-all",children:[(0,n.jsx)("i",{className:"fa-solid fa-palette mr-2"}),(0,n.jsx)("div",{className:"whitespace-nowrap",children:x.MENU.THEME_SWITCH})]})]})]})})}},7835:function(e,t,r){var n=r(85893),a=r(41664),i=r.n(a),s=r(21384);let o=e=>{let{passHref:t,legacyBehavior:r,placeholderSrc:n,fallbackSrc:a,...i}=e;return i},l=e=>{let{placeholderSrc:t,fallbackSrc:r,src:n,alt:a,width:i,height:s,loading:o,decoding:l,onLoad:c,onError:d,...h}=e;return h};t.Z=e=>{let{href:t,children:r,...a}=e,c=(0,s.JA)("LINK"),d="";"string"==typeof t?d=t:"object"==typeof t&&null!==t&&"string"==typeof t.pathname&&(d=t.pathname);let h=d.startsWith("http")&&!d.startsWith(c),u=()=>{var e;let t=new URLSearchParams((null===(e=window.location.search)||void 0===e?void 0:e.slice(1))||""),r={};for(let[e,n]of t.entries())""!==n&&(r[e]=n);return r};if(h){let e="string"==typeof t?t:new URL(t.pathname,c).toString();return(0,n.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",...o(a),children:r})}let f="string"==typeof t?(e=>{if("string"!=typeof e||!e||e.startsWith("#"))return e;let t=u();if(0===Object.keys(t).length)return e;let r=e.startsWith("http://")||e.startsWith("https://"),n=new URL(e,c);
1return(Object.entries(t).forEach(e=>{let[t,r]=e;n.searchParams.has(t)||n.searchParams.set(t,r)}),r)?n.toString():"".concat(n.pathname).concat(n.search).concat(n.hash)})(t):(e=>{if(!e||"object"!=typeof e)return e;let t=u();return 0===Object.keys(t).length?e:{...e,query:{...t,...e.query||{}}}})(t);return(0,n.jsx)(i(),{href:f,...l(a),children:r})}}}]);

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.