sinzmise-cetastories 2.0.0-1737377296424 → 2.0.0-1737385424712

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. package/404/index.html +1 -1
  2. package/404.html +1 -1
  3. package/archives/2021/12/index.html +1 -1
  4. package/archives/2021/index.html +1 -1
  5. package/archives/2022/12/index.html +1 -1
  6. package/archives/2022/index.html +1 -1
  7. package/archives/2023/01/index.html +1 -1
  8. package/archives/2023/02/index.html +1 -1
  9. package/archives/2023/03/index.html +1 -1
  10. package/archives/2023/04/index.html +1 -1
  11. package/archives/2023/07/index.html +1 -1
  12. package/archives/2023/08/index.html +1 -1
  13. package/archives/2023/09/index.html +1 -1
  14. package/archives/2023/10/index.html +1 -1
  15. package/archives/2023/11/index.html +1 -1
  16. package/archives/2023/12/index.html +1 -1
  17. package/archives/2023/index.html +1 -1
  18. package/archives/2023/page/2/index.html +1 -1
  19. package/archives/2023/page/3/index.html +1 -1
  20. package/archives/2024/01/index.html +1 -1
  21. package/archives/2024/02/index.html +1 -1
  22. package/archives/2024/03/index.html +1 -1
  23. package/archives/2024/04/index.html +1 -1
  24. package/archives/2024/05/index.html +1 -1
  25. package/archives/2024/06/index.html +1 -1
  26. package/archives/2024/07/index.html +1 -1
  27. package/archives/2024/08/index.html +1 -1
  28. package/archives/2024/09/index.html +1 -1
  29. package/archives/2024/10/index.html +1 -1
  30. package/archives/2024/11/index.html +1 -1
  31. package/archives/2024/12/index.html +1 -1
  32. package/archives/2024/index.html +1 -1
  33. package/archives/2024/page/2/index.html +1 -1
  34. package/archives/2024/page/3/index.html +1 -1
  35. package/archives/2025/01/index.html +1 -1
  36. package/archives/2025/index.html +1 -1
  37. package/archives/index.html +1 -1
  38. package/archives/page/2/index.html +1 -1
  39. package/archives/page/3/index.html +1 -1
  40. package/archives/page/4/index.html +1 -1
  41. package/archives/page/5/index.html +1 -1
  42. package/atom.xml +21 -21
  43. package/baidu_verify_codeva-F0RjFTve6w.html +1 -1
  44. package/categories/index.html +1 -1
  45. package/categories//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
  46. package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
  47. package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/3/index.html +1 -1
  48. package/categories//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
  49. package/categories//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
  50. package/categories//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
  51. package/categories//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
  52. package/categories//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
  53. package/charts/index.html +1 -1
  54. package/comments/index.html +1 -1
  55. package/fcircle/index.html +1 -1
  56. package/flink_count.json +1 -1
  57. package/friend.json +1 -1
  58. package/games/index.html +1 -1
  59. package/games/riddle/esc2-e.html +1 -1
  60. package/games/riddle/esc3-e.html +1 -1
  61. package/games/riddle/esc4-e.html +1 -1
  62. package/google8073542809160a67.html +1 -1
  63. package/index.html +1 -1
  64. package/js/main.js +1 -1
  65. package/link/index.html +1 -1
  66. package/load.html +1 -1
  67. package/music/index.html +1 -1
  68. package/package.json +1 -1
  69. package/page/2/index.html +1 -1
  70. package/page/3/index.html +1 -1
  71. package/page/4/index.html +1 -1
  72. package/page/5/index.html +1 -1
  73. package/posts/10021/index.html +1 -1
  74. package/posts/10045/index.html +1 -1
  75. package/posts/10733/index.html +1 -1
  76. package/posts/10996/index.html +1 -1
  77. package/posts/12779/index.html +1 -1
  78. package/posts/13624/index.html +1 -1
  79. package/posts/15688/index.html +1 -1
  80. package/posts/15748/index.html +1 -1
  81. package/posts/15799/index.html +1 -1
  82. package/posts/15842/index.html +1 -1
  83. package/posts/16107/index.html +1 -1
  84. package/posts/18063/index.html +1 -1
  85. package/posts/20412/index.html +1 -1
  86. package/posts/21375/index.html +1 -1
  87. package/posts/22945/index.html +1 -1
  88. package/posts/23021/index.html +1 -1
  89. package/posts/23226/index.html +1 -1
  90. package/posts/27531/index.html +1 -1
  91. package/posts/27762/index.html +1 -1
  92. package/posts/28536/index.html +1 -1
  93. package/posts/28733/index.html +1 -1
  94. package/posts/29196/index.html +1 -1
  95. package/posts/38917/index.html +1 -1
  96. package/posts/38964/index.html +1 -1
  97. package/posts/42487/index.html +1 -1
  98. package/posts/42580/index.html +1 -1
  99. package/posts/45875/index.html +1 -1
  100. package/posts/46640/index.html +1 -1
  101. package/posts/48762/index.html +1 -1
  102. package/posts/50710/index.html +1 -1
  103. package/posts/52677/index.html +1 -1
  104. package/posts/53662/index.html +1 -1
  105. package/posts/54386/index.html +1 -1
  106. package/posts/54481/index.html +1 -1
  107. package/posts/54787/index.html +1 -1
  108. package/posts/56467/index.html +1 -1
  109. package/posts/57692/index.html +1 -1
  110. package/posts/58203/index.html +1 -1
  111. package/posts/60486/index.html +1 -1
  112. package/posts/61417/index.html +1 -1
  113. package/posts/61712/index.html +1 -1
  114. package/posts/61713/index.html +1 -1
  115. package/posts/646/index.html +1 -1
  116. package/posts/64856/index.html +1 -1
  117. package/posts/64935/index.html +1 -1
  118. package/posts/65382/index.html +1 -1
  119. package/seas/index.html +1 -1
  120. package/sw.js +1 -1
  121. package/tags/Flash/347/233/270/345/205/263/index.html +1 -1
  122. package/tags/Steam/346/270/270/346/210/217/index.html +1 -1
  123. package/tags/Windows/350/275/257/344/273/266/index.html +1 -1
  124. package/tags/index.html +1 -1
  125. package/tags//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
  126. package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
  127. package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/3/index.html +1 -1
  128. package/tags//345/205/266/345/256/203/346/270/270/346/210/217/index.html +1 -1
  129. package/tags//345/212/240/350/275/275/345/212/250/347/224/273/index.html +1 -1
  130. package/tags//346/202/254/346/265/256/345/256/240/347/211/251-/347/234/213/346/235/277/345/250/230/index.html +1 -1
  131. package/tags//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
  132. package/tags//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
  133. package/tags//347/253/231/347/202/271/345/272/225/351/203/250/351/255/224/346/224/271/index.html +1 -1
  134. package/tags//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
  135. package/tags//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
  136. package/tags//350/207/252/345/273/272/351/203/250/347/275/262/index.html +1 -1
  137. package/tags//351/241/265/351/235/242/351/255/224/346/224/271/index.html +1 -1
  138. package/tags//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
  139. package/update/index.html +1 -1
  140. package/bbs/bbs.html +0 -1
  141. package/bbs/bbs.js +0 -13
  142. package/bbs/index.html +0 -1
package/js/main.js CHANGED
@@ -1 +1 @@
1
- const sidebarFn=()=>{const e=document.getElementById("toggle-menu"),t=document.getElementById("sidebar-menus"),o=document.getElementById("menu-mask"),n=document.body,s=e=>{utils.sidebarPaddingR(),n.style.overflow=e?"hidden":"",utils[e?"fadeIn":"fadeOut"](o,.5),t.classList.toggle("open",e)},i=()=>{t.classList.contains("open")&&s(!1)};e.addEventListener("click",(()=>s(!0))),o.addEventListener("click",i),window.addEventListener("resize",(()=>{utils.isHidden(e)&&t.classList.contains("open")&&i(),sco.refreshWaterFall()}))},scrollFn=()=>{const e=document.getElementById("rightside"),t=document.getElementById("page-header");let o=0;const n=utils.throttle((()=>{initThemeColor();const n=window.scrollY||document.documentElement.scrollTop,s=n>o;o=n,((o,n)=>{n>0?(t.classList.toggle("nav-visible",!o),t.classList.add("nav-fixed"),e&&(e.style.opacity="0.8",e.style.transform="translateX(-58px)")):(t.classList.remove("nav-fixed","nav-visible"),e&&(e.style.opacity="",e.style.transform=""))})(s,n)}),200);window.addEventListener("scroll",(o=>{n(o),0===window.scrollY&&(t.classList.remove("nav-fixed","nav-visible"),e&&(e.style.cssText="opacity: ''; transform: ''"))}))},percent=()=>{const e=document.documentElement,t=document.body,o=window.pageYOffset||e.scrollTop,n=Math.max(t.scrollHeight,e.scrollHeight,t.offsetHeight,e.offsetHeight,t.clientHeight,e.clientHeight)-e.clientHeight,s=Math.round(o/n*100),i=document.querySelector("#nav-totop"),c=document.querySelector(".rs_show .top i"),a=document.querySelector("#percent"),l=window.scrollY+e.clientHeight>=(document.getElementById("post-comment")||document.getElementById("footer")).offsetTop;i?.classList.toggle("long",l||s>90),c?.classList.toggle("show",l||s>90),a.textContent=l||s>90?i?GLOBAL_CONFIG.lang.backtop:"":s,document.querySelectorAll(".needEndHide").forEach((e=>e.classList.toggle("hide",n-o<100)))},showTodayCard=()=>{const e=document.getElementById("todayCard"),t=document.querySelector(".topGroup");t?.addEventListener("mouseleave",(()=>e?.classList.remove("hide")))},initObserver=()=>{const e=document.getElementById("post-comment"),t=document.getElementById("pagination"),o=document.querySelector(".comment-barrage");if(e&&t){new IntersectionObserver((e=>{e.forEach((e=>{t.classList.toggle("show-window",e.isIntersecting),GLOBAL_CONFIG.comment.commentBarrage&&(o.style.bottom=e.isIntersecting?"-200px":"0px")}))})).observe(e)}},addCopyright=()=>{if(!GLOBAL_CONFIG.copyright)return;const{limit:e,author:t,link:o,source:n,info:s}=GLOBAL_CONFIG.copyright;document.body.addEventListener("copy",(i=>{i.preventDefault();const c=window.getSelection().toString(),a=c.length>e?`${c}\n\n${t}\n${o}${window.location.href}\n${n}\n${s}`:c;i.clipboardData.setData("text",a)}))},asideStatus=()=>{const e=utils.saveToLocal.get("aside-status");document.documentElement.classList.toggle("hide-aside","hide"===e)};function initThemeColor(){const e=(window.scrollY||document.documentElement.scrollTop)>0?"--efu-card-bg":PAGE_CONFIG.is_post?"--efu-main":"--efu-background";applyThemeColor(getComputedStyle(document.documentElement).getPropertyValue(e))}function applyThemeColor(e){const t=document.querySelector('meta[name="theme-color"]'),o=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');t?.setAttribute("content",e),o?.setAttribute("content",e),window.matchMedia("(display-mode: standalone)").matches&&(document.body.style.backgroundColor=e)}const handleThemeChange=e=>{const t=window.globalFn?.themeChange||{};Object.values(t).forEach((t=>t(e)))},sco={lastWittyWord:"",wasPageHidden:!1,musicPlaying:!1,scrollTo(e){const t=document.getElementById(e);if(t){const e=t.getBoundingClientRect().top+window.pageYOffset-80;window.scroll({top:e,behavior:"smooth"})}},musicToggle(e=!0){this.isMusicBind||this.musicBind();const t=document.querySelector("#nav-music"),o=document.querySelector("meting-js"),n=document.getElementById("consoleMusic"),s=document.querySelector("#menu-music-toggle span"),i=document.querySelector("#menu-music-toggle i");this.musicPlaying=!this.musicPlaying,t.classList.toggle("playing",this.musicPlaying),t.classList.toggle("stretch",this.musicPlaying),n?.classList.toggle("on",this.musicPlaying),"undefined"!=typeof rm&&rm?.menuItems.music[0]&&(s.textContent=this.musicPlaying?GLOBAL_CONFIG.right_menu.music.stop:GLOBAL_CONFIG.right_menu.music.start,i.className=this.musicPlaying?"solitude fas fa-pause":"solitude fas fa-play"),e&&(this.musicPlaying?o.aplayer.play():o.aplayer.pause())},musicBind(){const e=document.querySelector("#nav-music"),t=document.querySelector("#nav-music .aplayer-music"),o=document.querySelector("#nav-music .aplayer-button");t?.addEventListener("click",(()=>{e.classList.toggle("stretch")})),o?.addEventListener("click",(()=>{this.musicToggle(!1)})),this.isMusicBind=!0},switchCommentBarrage(){const e=document.querySelector(".comment-barrage"),t=document.querySelector("#consoleCommentBarrage");if(!e)return;const o="flex"===window.getComputedStyle(e).display;e.style.display=o?"none":"flex",t?.classList.toggle("on",!o),utils.saveToLocal.set("commentBarrageSwitch",!o,.2),rm?.menuItems.barrage&&rm.barrage(o)},switchHideAside(){const e=document.documentElement.classList,t=document.querySelector("#consoleHideAside"),o=e.contains("hide-aside");utils.saveToLocal.set("aside-status",o?"show":"hide",1),e.toggle("hide-aside"),t.classList.toggle("on",!o)},switchKeyboard(){this.sco_keyboards=!this.sco_keyboards;const e=document.querySelector("#consoleKeyboard"),t=this.sco_keyboards?openKeyboard:closeKeyboard;e?.classList.toggle("on",this.sco_keyboards),t(),localStorage.setItem("keyboard",this.sco_keyboards),document.getElementById("keyboard-tips")?.classList.remove("show")},initConsoleState(){const e=document.querySelector("#consoleHideAside");e&&e.classList.toggle("on",document.documentElement.classList.contains("hide-aside"))},changeWittyWord(){const e=GLOBAL_CONFIG.aside.witty_words,t=document.getElementById("author-info__sayhi");let o;do{o=e[Math.floor(Math.random()*e.length)]}while(o===this.lastWittyWord);t.textContent=o,this.lastWittyWord=o},switchDarkMode(){const e="dark"===document.documentElement.getAttribute("data-theme"),t=e?"light":"dark";document.documentElement.setAttribute("data-theme",t),utils.saveToLocal.set("theme",t,.02),utils.snackbarShow(GLOBAL_CONFIG.lang.theme[t],!1,2e3),"object"==typeof rm&&rm.mode(!e)&&rm.hideRightMenu(),handleThemeChange(t)},hideTodayCard:()=>document.getElementById("todayCard").classList.add("hide"),toTop:()=>utils.scrollToDest(0),showConsole:()=>document.getElementById("console")?.classList.toggle("show",!0),hideConsole:()=>document.getElementById("console")?.classList.remove("show"),refreshWaterFall(){const e=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&setTimeout((()=>{waterfall(e.target).then((()=>{e.target.classList.add("show")}))}),300)}))}));document.querySelectorAll(".waterfall").forEach((t=>e.observe(t)))},addRuntime(){const e=document.getElementById("runtimeshow");e&&GLOBAL_CONFIG.runtime&&(e.innerText=utils.timeDiff(new Date(GLOBAL_CONFIG.runtime),new Date)+GLOBAL_CONFIG.lang.day)},toTalk(e){["#wl-edit",".el-textarea__inner","#veditor",".atk-textarea"].forEach((t=>{const o=document.querySelector(t);o&&(o.dispatchEvent(new Event("input",{bubble:!0,cancelable:!0})),o.value="> "+e.replace(/\n/g,"\n> ")+"\n\n",utils.scrollToDest(utils.getEleTop(document.getElementById("post-comment")),300),o.focus(),o.setSelectionRange(-1,-1))})),utils.snackbarShow(GLOBAL_CONFIG.lang.totalk,!1,2e3)},initbbtalk(){document.querySelector("#bber-talk")&&new Swiper(".swiper-container",{direction:"vertical",loop:!0,autoplay:{delay:3e3,pauseOnMouseEnter:!0}})},addPhotoFigcaption(){document.querySelectorAll(".article-container img:not(.gallery-item img)").forEach((e=>{const t=e.getAttribute("alt");t&&e.insertAdjacentHTML("afterend",`<div class="img-alt is-center">${utils.escapeHtml(t)}</div>`)}))},scrollToComment:()=>utils.scrollToDest(utils.getEleTop(document.getElementById("post-comment")),300),setTimeState(){const e=document.getElementById("author-info__sayhi");if(e){const t=(new Date).getHours(),o=GLOBAL_CONFIG.aside.state,n=function(e){for(let t of e){const e=localStorage.getItem(t);if(e)return JSON.parse(e)}return null}(["twikoo","WALINE_USER_META","WALINE_USER","_v_Cache_Meta","ArtalkUser"]);const s=n?n.nick||n.display_name:null,i=this.wasPageHidden?GLOBAL_CONFIG.aside.witty_comment.back+s:GLOBAL_CONFIG.aside.witty_comment.prefix+s,c=[{start:0,end:5,text:s?i:o.goodnight},{start:6,end:10,text:s?i:o.morning},{start:11,end:14,text:s?i:o.noon},{start:15,end:18,text:s?i:o.afternoon},{start:19,end:24,text:s?i:o.night}].find((e=>t>=e.start&&t<=e.end));e.innerText=c.text}},tagPageActive(){const e=decodeURIComponent(window.location.pathname);if(/\/tags\/.*?\//.test(e)){const t=e.split("/").slice(-2,-1)[0],o=document.getElementById(t);o&&(document.querySelectorAll("a.select").forEach((e=>{e.classList.remove("select")})),o.classList.add("select"))}},categoriesBarActive(){const e=document.querySelector("#category-bar"),t=decodeURIComponent(window.location.pathname),o=t===GLOBAL_CONFIG.root;if(e){e.querySelectorAll(".category-bar-item").forEach((e=>e.classList.remove("select")));const n=o?"category-bar-home":t.split("/").slice(-2,-1)[0],s=document.getElementById(n);s&&s.classList.add("select")}},scrollCategoryBarToRight(){const e=document.getElementById("category-bar-items"),t=document.getElementById("category-bar-next");if(e){const o=()=>e.scrollLeft+e.clientWidth>=e.scrollWidth-8,n=()=>{e.scroll({left:o()?0:e.clientWidth,behavior:"smooth"})};e.addEventListener("scroll",(()=>{clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{t.style.transform=o()?"rotate(180deg)":""}),150)})),n()}},openAllTags(){document.querySelectorAll(".card-allinfo .card-tag-cloud").forEach((e=>e.classList.add("all-tags"))),document.getElementById("more-tags-btn")?.remove()},listenToPageInputPress(){const e=document.querySelector(".toPageGroup"),t=document.getElementById("toPageText");if(!t)return;const o=document.getElementById("toPageButton"),n=document.querySelectorAll(".page-number"),s=+n[n.length-1].textContent;t&&1!==s?(t.addEventListener("keydown",(e=>{13===e.keyCode&&(sco.toPage(),pjax.loadUrl(o.href))})),t.addEventListener("input",(()=>{o.classList.toggle("haveValue",""!==t.value&&"0"!==t.value),+t.value>s&&(t.value=s)}))):e.style.display="none"},addNavBackgroundInit(){0!==document.documentElement.scrollTop&&document.getElementById("page-header").classList.add("nav-fixed","nav-visible")},toPage(){const e=document.querySelectorAll(".page-number"),t=parseInt(e[e.length-1].innerHTML),o=document.getElementById("toPageText"),n=parseInt(o.value);document.getElementById("toPageButton").href=!isNaN(n)&&n<=t&&n>1?window.location.href.replace(/\/page\/\d+\/$/,"/")+"page/"+n+"/":"/"},owoBig(e){let t=document.getElementById("owo-big");t||(t=document.createElement("div"),t.id="owo-big",document.body.appendChild(t));const o=e=>{const o=e.getBoundingClientRect();t.style.left=o.left-t.offsetWidth/4+"px",t.style.top=`${o.top}px`};document.addEventListener("mouseover",(n=>{const s=n.target,i=s.closest(e.item);if(i&&s.closest(e.body)){const e=i.querySelector("img")?.src;e&&(t.innerHTML=`<img src="${e}" style="max-width: 100%; height: auto;">`,t.style.display="block",o(i))}})),document.addEventListener("mouseout",(o=>{o.target.closest(e.item)&&o.target.closest(e.body)&&(t.style.display="none")}))},changeTimeFormat(e){e.forEach((e=>{const t=e.getAttribute("datetime");e.textContent=utils.diffDate(t,!0),e.style.display="inline"}))},switchComments(){const e=document.getElementById("switch-btn");if(!e)return;let t=!1;const o=document.getElementById("post-comment");utils.addEventListenerPjax(e,"click",(()=>{o.classList.toggle("move"),t||"function"!=typeof loadTwoComment||(t=!0,loadTwoComment())}))},homeTypeit(){if("undefined"==typeof home_subtitle)return;const e=new TypeIt(".banners-title-small",{speed:200,waitUntilVisible:!0,loop:!0,lifeLike:!0});home_subtitle.forEach((t=>{e.type(t).pause(500).delete(t)})),e.go()}},addHighlight=()=>{const e=GLOBAL_CONFIG.highlight;if(!e)return;const{copy:t,expand:o,limit:n,syntax:s}=e,i="prismjs"===s,c=e.enable||t||o||n,a=o?"":"closed",l="highlight.js"===s?document.querySelectorAll("figure.highlight"):document.querySelectorAll('pre[class*="language-"]');if(!c&&!n||!l.length)return;const r=t?'<i class="solitude fas fa-copy copy-button"></i>':"<i></i>",d=n?'<i class="solitude fas fa-angles-down"></i>':"<i></i>",m=e=>{const t=e.parentNode;t.classList.add("copy-true");const o=window.getSelection(),n=document.createRange(),s=i?"pre code":"table .code pre";var c;n.selectNodeContents(t.querySelectorAll(`${s}`)[0]),o.removeAllRanges(),o.addRange(n),document.execCommand("copy"),e.lastChild,c=GLOBAL_CONFIG.lang.copy.success,utils.snackbarShow(c,!1,2e3),o.removeAllRanges(),t.classList.remove("copy-true")},u=function(){this.classList.toggle("expand-done")},g=function(e){const t=e.target.classList;t.contains("expand")?(e=>{e.classList.toggle("closed")})(this):t.contains("copy-button")&&m(this)},h=(e,t,o)=>{const s=document.createDocumentFragment();if(c){const o=t.querySelector("figcaption");let n="";o&&(n=`<div class="caption">${o.innerHTML}</div>`,t.removeChild(o));const i=document.createElement("div");i.className=`highlight-tools ${a}`,i.innerHTML='<i class="solitude fas fa-angle-down expand"></i>'+e+n+r,utils.addEventListenerPjax(i,"click",g),s.appendChild(i)}if(n&&t.offsetHeight>n+30){const e=document.createElement("div");e.className="code-expand-btn",e.innerHTML=d,utils.addEventListenerPjax(e,"click",u),s.appendChild(e)}"hl"===o?t.insertBefore(s,t.firstChild):t.parentNode.insertBefore(s,t)};i?l.forEach((e=>{const t=e.getAttribute("data-language")||"Code",o=`<div class="code-lang">${utils.escapeHtml(t)}</div>`;utils.wrap(e,"figure",{class:"highlight"}),h(o,e)})):l.forEach((e=>{let t=e.getAttribute("class").split(" ")[1];"plain"!==t&&void 0!==t||(t="Code");const o=`<div class="code-lang">${utils.escapeHtml(t)}</div>`;h(o,e,"hl")}))};class toc{static init(){const e=document.getElementById("card-toc");if(!e||!e.querySelector(".toc a"))return void(e.style.display="none");const t=document.querySelectorAll(".toc a");t.forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),utils.scrollToDest(utils.getEleTop(document.getElementById(decodeURI(("toc-text"===e.target.className?e.target.parentNode.hash:e.target.hash).replace("#","")))),300)}))})),this.active(t)}static active(e){const t=document.querySelector(".article-container"),o=document.getElementById("toc-content"),n=t.querySelectorAll("h1,h2,h3,h4,h5,h6");let s="";const i=t=>{if(0===t)return!1;let i="";if(n.forEach(((e,o)=>{t>utils.getEleTop(e)-80&&(i=o)})),s===i)return;s=i,document.querySelectorAll(".toc .active").forEach((e=>{e.classList.remove("active")}));const c=e[s];if(c){let t=e[s].parentNode;for(c.classList.add("active"),(e=>{const t=e.getBoundingClientRect().top,n=o.scrollTop;t>document.documentElement.clientHeight-100&&(o.scrollTop=n+150),t<100&&(o.scrollTop=n-150)})(c);!t.matches(".toc");t=t.parentNode)t.matches("li")&&t.classList.add("active")}};window.tocScrollFn=utils.throttle((()=>{const e=window.scrollY||document.documentElement.scrollTop;i(e)}),100),window.addEventListener("scroll",tocScrollFn)}}class tabs{static init(){this.clickFnOfTabs(),this.backToTop()}static clickFnOfTabs(){document.querySelectorAll(".article-container .tab > button").forEach((e=>{e.addEventListener("click",(function(){const e=this.parentNode;if(!e.classList.contains("active")){const t=e.parentNode.nextElementSibling,o=utils.siblings(e,".active")[0];o&&o.classList.remove("active"),e.classList.add("active");const n=this.getAttribute("data-href").replace("#","");[...t.children].forEach((e=>{e.classList.toggle("active",e.id===n)}))}}))}))}static backToTop(){document.querySelectorAll(".article-container .tabs .tab-to-top").forEach((e=>{e.addEventListener("click",(function(){utils.scrollToDest(utils.getEleTop(this.parentElement.parentElement.parentNode),300)}))}))}static lureAddListener(){if(!GLOBAL_CONFIG.lure)return;const e=document.title;document.addEventListener("visibilitychange",(()=>{const{lure:t}=GLOBAL_CONFIG;document.title="hidden"===document.visibilityState?t.jump:t.back,"visible"===document.visibilityState&&setTimeout((()=>{document.title=e}),2e3)}))}static expireAddListener(){const{expire:e}=GLOBAL_CONFIG;if(!e)return;const t=document.querySelectorAll(".post-meta-date time"),o=t.length?t[t.length-1]:document.querySelector(".datetime");if(!o)return;const n=Math.ceil(((new Date).getTime()-new Date(o.getAttribute("datetime")).getTime())/1e3/60/60/24);if(e.time>n)return;const s=document.createElement("div");s.className="expire",s.innerHTML=`<i class="solitude fas fa-circle-exclamation"></i>${e.text_prev}${-(e.time-n)}${e.text_next}`;document.querySelector(".article-container").insertAdjacentElement("top"===e.position?"afterbegin":"beforeend",s)}}const scrollFnToDo=()=>{const{toc:e}=PAGE_CONFIG;if(e){const e=document.getElementById("card-toc"),t=e.querySelector(".toc-content"),o=(t.querySelectorAll(".toc-link"),e.querySelector(".toc-percentage"),t.classList.contains("is-expand"),t=>{const o=t.target.closest(".toc-link");o&&(t.preventDefault(),utils.scrollToDest(utils.getEleTop(document.getElementById(decodeURI(o.getAttribute("href")).replace("#",""))),300),window.innerWidth<900&&e.classList.remove("open"))});utils.addEventListenerPjax(t,"click",o)}},forPostFn=()=>{scrollFnToDo()};function _0x435e(){const e=["20px","color","sinzmise.top","self","width","transparent","createElement","top","display","center","style","5rtfmHX","margin","overflow","transform","localhost","当前访问于嵌套窗口,可能存在侵权行为,请在独立窗口访问 ","5329205Xpvjqs","innerText","fontSize","#8d8d8d","1285119gGhpEj","wrap","location","警告:本页面非官方页面,可能存在有害信息!建议您立即跳转 ","appendChild","https://blog.storical.space","127.0.0.1","1393320EHxoUY","hidden","9FmwXcx"," 并向站长举报该冒牌镜像站!","14072224twJEcE","opacity","storical.space","flex","1455800yweGkm","height","2px 2px 5px rgba(0, 0, 0, 0.5)","0.35","3797888VinOzS","endsWith","4738938XAUCKq","alignItems","zIndex","div","fixed","open","flexWrap","nowrap","whiteSpace","textShadow","pointerEvents","_blank"];return(_0x435e=function(){return e})()}window.refreshFn=()=>{const{is_home:e,is_page:t,page:o,is_post:n}=PAGE_CONFIG,{runtime:s,lazyload:i,lightbox:c,randomlink:a,covercolor:l,post_ai:r,lure:d,expire:m}=GLOBAL_CONFIG,u=(e||n?".post-meta-date time":".datetime")+", .webinfo-item time";document.body.setAttribute("data-type",o),sco.changeTimeFormat(document.querySelectorAll(u)),s&&sco.addRuntime(),[scrollFn,sidebarFn,sco.addPhotoFigcaption,sco.setTimeState,sco.tagPageActive,sco.categoriesBarActive,sco.listenToPageInputPress,sco.addNavBackgroundInit,sco.refreshWaterFall].forEach((e=>e())),i.enable&&utils.lazyloadImg(),c&&utils.lightbox(document.querySelectorAll(".article-container img:not(.flink-avatar,.gallery-group img, .no-lightbox)")),a&&randomLinksList(),r&&n&&ai.init(),sco.switchComments(),initObserver(),e&&(showTodayCard(),sco.homeTypeit()),"function"==typeof updatePostsBasedOnComments&&updatePostsBasedOnComments(),(n||t)&&(addHighlight(),tabs.init()),n&&m&&tabs.expireAddListener(),l.enable&&coverColor(),PAGE_CONFIG.toc&&toc.init(),d&&tabs.lureAddListener(),"music"===o&&initializeMusicPlayer(),forPostFn()},document.addEventListener("DOMContentLoaded",(()=>{[addCopyright,window.refreshFn,asideStatus,()=>window.onscroll=percent,sco.initConsoleState].forEach((e=>e()))})),document.addEventListener("visibilitychange",(()=>{document.hidden&&(sco.wasPageHidden=!0)})),window.onkeydown=e=>{const{keyCode:t,ctrlKey:o,shiftKey:n}=e;(123===t||o&&n&&67===t)&&utils.snackbarShow(GLOBAL_CONFIG.lang.f12,!1,3e3),27===t&&sco.hideConsole()},document.addEventListener("copy",(()=>{utils.snackbarShow(GLOBAL_CONFIG.lang.copy.success,!1,3e3)}));const _0x178311=_0x1406;function _0x1406(e,t){const o=_0x435e();return(_0x1406=function(e,t){return o[e-=127]})(e,t)}!function(){const e=_0x1406,t=_0x435e();for(;;)try{if(806997===parseInt(e(160))/1+parseInt(e(175))/2+-parseInt(e(167))/3+-parseInt(e(179))/4+-parseInt(e(150))/5*(parseInt(e(127))/6)+-parseInt(e(156))/7+parseInt(e(171))/8*(parseInt(e(169))/9))break;t.push(t.shift())}catch(e){t.push(t.shift())}}();const validDomain1=_0x178311(141),validDomain2=_0x178311(173),redirectUrl=_0x178311(165),hostname=document[_0x178311(162)].hostname,isLocalHost=hostname===_0x178311(154)||hostname===_0x178311(166);if(!isLocalHost&&!hostname[_0x178311(180)](validDomain)){createWatermark(validDomain);confirm(_0x178311(163)+validDomain+_0x178311(170))&&window[_0x178311(162)].replace(redirectUrl)}if(window[_0x178311(146)]!==window[_0x178311(142)]){confirm(_0x178311(155)+validDomain+"。")&&window[_0x178311(132)](redirectUrl,_0x178311(138))}function createWatermark(e){const t=_0x178311,o=document[t(145)](t(130));o[t(149)][t(137)]="none",o.style.position=t(131),o[t(149)][t(146)]="0",o[t(149)].left="0",o[t(149)][t(143)]="100%",o.style[t(176)]="100%",o.style[t(129)]="9999",o[t(149)][t(172)]=t(178),o.style.background=t(144),o.style[t(152)]=t(168),o[t(149)][t(147)]=t(174),o[t(149)].justifyContent=t(148),o[t(149)][t(128)]=t(148),o[t(149)][t(133)]=t(161);const n=document[t(145)](t(130));n[t(157)]=e,n[t(149)][t(140)]=t(159),n[t(149)][t(158)]="30px",n[t(149)][t(153)]="rotate(-30deg)",n[t(149)][t(135)]=t(134),n[t(149)][t(151)]=t(139),n[t(149)][t(136)]=t(177);for(let e=0;e<60;e++)o[t(164)](n.cloneNode(!0));document.body[t(164)](o)}
1
+ const sidebarFn=()=>{const e=document.getElementById("toggle-menu"),t=document.getElementById("sidebar-menus"),o=document.getElementById("menu-mask"),n=document.body,s=e=>{utils.sidebarPaddingR(),n.style.overflow=e?"hidden":"",utils[e?"fadeIn":"fadeOut"](o,.5),t.classList.toggle("open",e)},i=()=>{t.classList.contains("open")&&s(!1)};e.addEventListener("click",(()=>s(!0))),o.addEventListener("click",i),window.addEventListener("resize",(()=>{utils.isHidden(e)&&t.classList.contains("open")&&i(),sco.refreshWaterFall()}))},scrollFn=()=>{const e=document.getElementById("rightside"),t=document.getElementById("page-header");let o=0;const n=utils.throttle((()=>{initThemeColor();const n=window.scrollY||document.documentElement.scrollTop,s=n>o;o=n,((o,n)=>{n>0?(t.classList.toggle("nav-visible",!o),t.classList.add("nav-fixed"),e&&(e.style.opacity="0.8",e.style.transform="translateX(-58px)")):(t.classList.remove("nav-fixed","nav-visible"),e&&(e.style.opacity="",e.style.transform=""))})(s,n)}),200);window.addEventListener("scroll",(o=>{n(o),0===window.scrollY&&(t.classList.remove("nav-fixed","nav-visible"),e&&(e.style.cssText="opacity: ''; transform: ''"))}))},percent=()=>{const e=document.documentElement,t=document.body,o=window.pageYOffset||e.scrollTop,n=Math.max(t.scrollHeight,e.scrollHeight,t.offsetHeight,e.offsetHeight,t.clientHeight,e.clientHeight)-e.clientHeight,s=Math.round(o/n*100),i=document.querySelector("#nav-totop"),c=document.querySelector(".rs_show .top i"),a=document.querySelector("#percent"),l=window.scrollY+e.clientHeight>=(document.getElementById("post-comment")||document.getElementById("footer")).offsetTop;i?.classList.toggle("long",l||s>90),c?.classList.toggle("show",l||s>90),a.textContent=l||s>90?i?GLOBAL_CONFIG.lang.backtop:"":s,document.querySelectorAll(".needEndHide").forEach((e=>e.classList.toggle("hide",n-o<100)))},showTodayCard=()=>{const e=document.getElementById("todayCard"),t=document.querySelector(".topGroup");t?.addEventListener("mouseleave",(()=>e?.classList.remove("hide")))},initObserver=()=>{const e=document.getElementById("post-comment"),t=document.getElementById("pagination"),o=document.querySelector(".comment-barrage");if(e&&t){new IntersectionObserver((e=>{e.forEach((e=>{t.classList.toggle("show-window",e.isIntersecting),GLOBAL_CONFIG.comment.commentBarrage&&(o.style.bottom=e.isIntersecting?"-200px":"0px")}))})).observe(e)}},addCopyright=()=>{if(!GLOBAL_CONFIG.copyright)return;const{limit:e,author:t,link:o,source:n,info:s}=GLOBAL_CONFIG.copyright;document.body.addEventListener("copy",(i=>{i.preventDefault();const c=window.getSelection().toString(),a=c.length>e?`${c}\n\n${t}\n${o}${window.location.href}\n${n}\n${s}`:c;i.clipboardData.setData("text",a)}))},asideStatus=()=>{const e=utils.saveToLocal.get("aside-status");document.documentElement.classList.toggle("hide-aside","hide"===e)};function initThemeColor(){const e=(window.scrollY||document.documentElement.scrollTop)>0?"--efu-card-bg":PAGE_CONFIG.is_post?"--efu-main":"--efu-background";applyThemeColor(getComputedStyle(document.documentElement).getPropertyValue(e))}function applyThemeColor(e){const t=document.querySelector('meta[name="theme-color"]'),o=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');t?.setAttribute("content",e),o?.setAttribute("content",e),window.matchMedia("(display-mode: standalone)").matches&&(document.body.style.backgroundColor=e)}const handleThemeChange=e=>{const t=window.globalFn?.themeChange||{};Object.values(t).forEach((t=>t(e)))},sco={lastWittyWord:"",wasPageHidden:!1,musicPlaying:!1,scrollTo(e){const t=document.getElementById(e);if(t){const e=t.getBoundingClientRect().top+window.pageYOffset-80;window.scroll({top:e,behavior:"smooth"})}},musicToggle(e=!0){this.isMusicBind||this.musicBind();const t=document.querySelector("#nav-music"),o=document.querySelector("meting-js"),n=document.getElementById("consoleMusic"),s=document.querySelector("#menu-music-toggle span"),i=document.querySelector("#menu-music-toggle i");this.musicPlaying=!this.musicPlaying,t.classList.toggle("playing",this.musicPlaying),t.classList.toggle("stretch",this.musicPlaying),n?.classList.toggle("on",this.musicPlaying),"undefined"!=typeof rm&&rm?.menuItems.music[0]&&(s.textContent=this.musicPlaying?GLOBAL_CONFIG.right_menu.music.stop:GLOBAL_CONFIG.right_menu.music.start,i.className=this.musicPlaying?"solitude fas fa-pause":"solitude fas fa-play"),e&&(this.musicPlaying?o.aplayer.play():o.aplayer.pause())},musicBind(){const e=document.querySelector("#nav-music"),t=document.querySelector("#nav-music .aplayer-music"),o=document.querySelector("#nav-music .aplayer-button");t?.addEventListener("click",(()=>{e.classList.toggle("stretch")})),o?.addEventListener("click",(()=>{this.musicToggle(!1)})),this.isMusicBind=!0},switchCommentBarrage(){const e=document.querySelector(".comment-barrage"),t=document.querySelector("#consoleCommentBarrage");if(!e)return;const o="flex"===window.getComputedStyle(e).display;e.style.display=o?"none":"flex",t?.classList.toggle("on",!o),utils.saveToLocal.set("commentBarrageSwitch",!o,.2),rm?.menuItems.barrage&&rm.barrage(o)},switchHideAside(){const e=document.documentElement.classList,t=document.querySelector("#consoleHideAside"),o=e.contains("hide-aside");utils.saveToLocal.set("aside-status",o?"show":"hide",1),e.toggle("hide-aside"),t.classList.toggle("on",!o)},switchKeyboard(){this.sco_keyboards=!this.sco_keyboards;const e=document.querySelector("#consoleKeyboard"),t=this.sco_keyboards?openKeyboard:closeKeyboard;e?.classList.toggle("on",this.sco_keyboards),t(),localStorage.setItem("keyboard",this.sco_keyboards),document.getElementById("keyboard-tips")?.classList.remove("show")},initConsoleState(){const e=document.querySelector("#consoleHideAside");e&&e.classList.toggle("on",document.documentElement.classList.contains("hide-aside"))},changeWittyWord(){const e=GLOBAL_CONFIG.aside.witty_words,t=document.getElementById("author-info__sayhi");let o;do{o=e[Math.floor(Math.random()*e.length)]}while(o===this.lastWittyWord);t.textContent=o,this.lastWittyWord=o},switchDarkMode(){const e="dark"===document.documentElement.getAttribute("data-theme"),t=e?"light":"dark";document.documentElement.setAttribute("data-theme",t),utils.saveToLocal.set("theme",t,.02),utils.snackbarShow(GLOBAL_CONFIG.lang.theme[t],!1,2e3),"object"==typeof rm&&rm.mode(!e)&&rm.hideRightMenu(),handleThemeChange(t)},hideTodayCard:()=>document.getElementById("todayCard").classList.add("hide"),toTop:()=>utils.scrollToDest(0),showConsole:()=>document.getElementById("console")?.classList.toggle("show",!0),hideConsole:()=>document.getElementById("console")?.classList.remove("show"),refreshWaterFall(){const e=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&setTimeout((()=>{waterfall(e.target).then((()=>{e.target.classList.add("show")}))}),300)}))}));document.querySelectorAll(".waterfall").forEach((t=>e.observe(t)))},addRuntime(){const e=document.getElementById("runtimeshow");e&&GLOBAL_CONFIG.runtime&&(e.innerText=utils.timeDiff(new Date(GLOBAL_CONFIG.runtime),new Date)+GLOBAL_CONFIG.lang.day)},toTalk(e){["#wl-edit",".el-textarea__inner","#veditor",".atk-textarea"].forEach((t=>{const o=document.querySelector(t);o&&(o.dispatchEvent(new Event("input",{bubble:!0,cancelable:!0})),o.value="> "+e.replace(/\n/g,"\n> ")+"\n\n",utils.scrollToDest(utils.getEleTop(document.getElementById("post-comment")),300),o.focus(),o.setSelectionRange(-1,-1))})),utils.snackbarShow(GLOBAL_CONFIG.lang.totalk,!1,2e3)},initbbtalk(){document.querySelector("#bber-talk")&&new Swiper(".swiper-container",{direction:"vertical",loop:!0,autoplay:{delay:3e3,pauseOnMouseEnter:!0}})},addPhotoFigcaption(){document.querySelectorAll(".article-container img:not(.gallery-item img)").forEach((e=>{const t=e.getAttribute("alt");t&&e.insertAdjacentHTML("afterend",`<div class="img-alt is-center">${utils.escapeHtml(t)}</div>`)}))},scrollToComment:()=>utils.scrollToDest(utils.getEleTop(document.getElementById("post-comment")),300),setTimeState(){const e=document.getElementById("author-info__sayhi");if(e){const t=(new Date).getHours(),o=GLOBAL_CONFIG.aside.state,n=function(e){for(let t of e){const e=localStorage.getItem(t);if(e)return JSON.parse(e)}return null}(["twikoo","WALINE_USER_META","WALINE_USER","_v_Cache_Meta","ArtalkUser"]);const s=n?n.nick||n.display_name:null,i=this.wasPageHidden?GLOBAL_CONFIG.aside.witty_comment.back+s:GLOBAL_CONFIG.aside.witty_comment.prefix+s,c=[{start:0,end:5,text:s?i:o.goodnight},{start:6,end:10,text:s?i:o.morning},{start:11,end:14,text:s?i:o.noon},{start:15,end:18,text:s?i:o.afternoon},{start:19,end:24,text:s?i:o.night}].find((e=>t>=e.start&&t<=e.end));e.innerText=c.text}},tagPageActive(){const e=decodeURIComponent(window.location.pathname);if(/\/tags\/.*?\//.test(e)){const t=e.split("/").slice(-2,-1)[0],o=document.getElementById(t);o&&(document.querySelectorAll("a.select").forEach((e=>{e.classList.remove("select")})),o.classList.add("select"))}},categoriesBarActive(){const e=document.querySelector("#category-bar"),t=decodeURIComponent(window.location.pathname),o=t===GLOBAL_CONFIG.root;if(e){e.querySelectorAll(".category-bar-item").forEach((e=>e.classList.remove("select")));const n=o?"category-bar-home":t.split("/").slice(-2,-1)[0],s=document.getElementById(n);s&&s.classList.add("select")}},scrollCategoryBarToRight(){const e=document.getElementById("category-bar-items"),t=document.getElementById("category-bar-next");if(e){const o=()=>e.scrollLeft+e.clientWidth>=e.scrollWidth-8,n=()=>{e.scroll({left:o()?0:e.clientWidth,behavior:"smooth"})};e.addEventListener("scroll",(()=>{clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{t.style.transform=o()?"rotate(180deg)":""}),150)})),n()}},openAllTags(){document.querySelectorAll(".card-allinfo .card-tag-cloud").forEach((e=>e.classList.add("all-tags"))),document.getElementById("more-tags-btn")?.remove()},listenToPageInputPress(){const e=document.querySelector(".toPageGroup"),t=document.getElementById("toPageText");if(!t)return;const o=document.getElementById("toPageButton"),n=document.querySelectorAll(".page-number"),s=+n[n.length-1].textContent;t&&1!==s?(t.addEventListener("keydown",(e=>{13===e.keyCode&&(sco.toPage(),pjax.loadUrl(o.href))})),t.addEventListener("input",(()=>{o.classList.toggle("haveValue",""!==t.value&&"0"!==t.value),+t.value>s&&(t.value=s)}))):e.style.display="none"},addNavBackgroundInit(){0!==document.documentElement.scrollTop&&document.getElementById("page-header").classList.add("nav-fixed","nav-visible")},toPage(){const e=document.querySelectorAll(".page-number"),t=parseInt(e[e.length-1].innerHTML),o=document.getElementById("toPageText"),n=parseInt(o.value);document.getElementById("toPageButton").href=!isNaN(n)&&n<=t&&n>1?window.location.href.replace(/\/page\/\d+\/$/,"/")+"page/"+n+"/":"/"},owoBig(e){let t=document.getElementById("owo-big");t||(t=document.createElement("div"),t.id="owo-big",document.body.appendChild(t));const o=e=>{const o=e.getBoundingClientRect();t.style.left=o.left-t.offsetWidth/4+"px",t.style.top=`${o.top}px`};document.addEventListener("mouseover",(n=>{const s=n.target,i=s.closest(e.item);if(i&&s.closest(e.body)){const e=i.querySelector("img")?.src;e&&(t.innerHTML=`<img src="${e}" style="max-width: 100%; height: auto;">`,t.style.display="block",o(i))}})),document.addEventListener("mouseout",(o=>{o.target.closest(e.item)&&o.target.closest(e.body)&&(t.style.display="none")}))},changeTimeFormat(e){e.forEach((e=>{const t=e.getAttribute("datetime");e.textContent=utils.diffDate(t,!0),e.style.display="inline"}))},switchComments(){const e=document.getElementById("switch-btn");if(!e)return;let t=!1;const o=document.getElementById("post-comment");utils.addEventListenerPjax(e,"click",(()=>{o.classList.toggle("move"),t||"function"!=typeof loadTwoComment||(t=!0,loadTwoComment())}))},homeTypeit(){if("undefined"==typeof home_subtitle)return;const e=new TypeIt(".banners-title-small",{speed:200,waitUntilVisible:!0,loop:!0,lifeLike:!0});home_subtitle.forEach((t=>{e.type(t).pause(500).delete(t)})),e.go()}},addHighlight=()=>{const e=GLOBAL_CONFIG.highlight;if(!e)return;const{copy:t,expand:o,limit:n,syntax:s}=e,i="prismjs"===s,c=e.enable||t||o||n,a=o?"":"closed",l="highlight.js"===s?document.querySelectorAll("figure.highlight"):document.querySelectorAll('pre[class*="language-"]');if(!c&&!n||!l.length)return;const r=t?'<i class="solitude fas fa-copy copy-button"></i>':"<i></i>",d=n?'<i class="solitude fas fa-angles-down"></i>':"<i></i>",m=e=>{const t=e.parentNode;t.classList.add("copy-true");const o=window.getSelection(),n=document.createRange(),s=i?"pre code":"table .code pre";var c;n.selectNodeContents(t.querySelectorAll(`${s}`)[0]),o.removeAllRanges(),o.addRange(n),document.execCommand("copy"),e.lastChild,c=GLOBAL_CONFIG.lang.copy.success,utils.snackbarShow(c,!1,2e3),o.removeAllRanges(),t.classList.remove("copy-true")},u=function(){this.classList.toggle("expand-done")},g=function(e){const t=e.target.classList;t.contains("expand")?(e=>{e.classList.toggle("closed")})(this):t.contains("copy-button")&&m(this)},h=(e,t,o)=>{const s=document.createDocumentFragment();if(c){const o=t.querySelector("figcaption");let n="";o&&(n=`<div class="caption">${o.innerHTML}</div>`,t.removeChild(o));const i=document.createElement("div");i.className=`highlight-tools ${a}`,i.innerHTML='<i class="solitude fas fa-angle-down expand"></i>'+e+n+r,utils.addEventListenerPjax(i,"click",g),s.appendChild(i)}if(n&&t.offsetHeight>n+30){const e=document.createElement("div");e.className="code-expand-btn",e.innerHTML=d,utils.addEventListenerPjax(e,"click",u),s.appendChild(e)}"hl"===o?t.insertBefore(s,t.firstChild):t.parentNode.insertBefore(s,t)};i?l.forEach((e=>{const t=e.getAttribute("data-language")||"Code",o=`<div class="code-lang">${utils.escapeHtml(t)}</div>`;utils.wrap(e,"figure",{class:"highlight"}),h(o,e)})):l.forEach((e=>{let t=e.getAttribute("class").split(" ")[1];"plain"!==t&&void 0!==t||(t="Code");const o=`<div class="code-lang">${utils.escapeHtml(t)}</div>`;h(o,e,"hl")}))};class toc{static init(){const e=document.getElementById("card-toc");if(!e||!e.querySelector(".toc a"))return void(e.style.display="none");const t=document.querySelectorAll(".toc a");t.forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),utils.scrollToDest(utils.getEleTop(document.getElementById(decodeURI(("toc-text"===e.target.className?e.target.parentNode.hash:e.target.hash).replace("#","")))),300)}))})),this.active(t)}static active(e){const t=document.querySelector(".article-container"),o=document.getElementById("toc-content"),n=t.querySelectorAll("h1,h2,h3,h4,h5,h6");let s="";const i=t=>{if(0===t)return!1;let i="";if(n.forEach(((e,o)=>{t>utils.getEleTop(e)-80&&(i=o)})),s===i)return;s=i,document.querySelectorAll(".toc .active").forEach((e=>{e.classList.remove("active")}));const c=e[s];if(c){let t=e[s].parentNode;for(c.classList.add("active"),(e=>{const t=e.getBoundingClientRect().top,n=o.scrollTop;t>document.documentElement.clientHeight-100&&(o.scrollTop=n+150),t<100&&(o.scrollTop=n-150)})(c);!t.matches(".toc");t=t.parentNode)t.matches("li")&&t.classList.add("active")}};window.tocScrollFn=utils.throttle((()=>{const e=window.scrollY||document.documentElement.scrollTop;i(e)}),100),window.addEventListener("scroll",tocScrollFn)}}class tabs{static init(){this.clickFnOfTabs(),this.backToTop()}static clickFnOfTabs(){document.querySelectorAll(".article-container .tab > button").forEach((e=>{e.addEventListener("click",(function(){const e=this.parentNode;if(!e.classList.contains("active")){const t=e.parentNode.nextElementSibling,o=utils.siblings(e,".active")[0];o&&o.classList.remove("active"),e.classList.add("active");const n=this.getAttribute("data-href").replace("#","");[...t.children].forEach((e=>{e.classList.toggle("active",e.id===n)}))}}))}))}static backToTop(){document.querySelectorAll(".article-container .tabs .tab-to-top").forEach((e=>{e.addEventListener("click",(function(){utils.scrollToDest(utils.getEleTop(this.parentElement.parentElement.parentNode),300)}))}))}static lureAddListener(){if(!GLOBAL_CONFIG.lure)return;const e=document.title;document.addEventListener("visibilitychange",(()=>{const{lure:t}=GLOBAL_CONFIG;document.title="hidden"===document.visibilityState?t.jump:t.back,"visible"===document.visibilityState&&setTimeout((()=>{document.title=e}),2e3)}))}static expireAddListener(){const{expire:e}=GLOBAL_CONFIG;if(!e)return;const t=document.querySelectorAll(".post-meta-date time"),o=t.length?t[t.length-1]:document.querySelector(".datetime");if(!o)return;const n=Math.ceil(((new Date).getTime()-new Date(o.getAttribute("datetime")).getTime())/1e3/60/60/24);if(e.time>n)return;const s=document.createElement("div");s.className="expire",s.innerHTML=`<i class="solitude fas fa-circle-exclamation"></i>${e.text_prev}${-(e.time-n)}${e.text_next}`;document.querySelector(".article-container").insertAdjacentElement("top"===e.position?"afterbegin":"beforeend",s)}}const scrollFnToDo=()=>{const{toc:e}=PAGE_CONFIG;if(e){const e=document.getElementById("card-toc"),t=e.querySelector(".toc-content"),o=(t.querySelectorAll(".toc-link"),e.querySelector(".toc-percentage"),t.classList.contains("is-expand"),t=>{const o=t.target.closest(".toc-link");o&&(t.preventDefault(),utils.scrollToDest(utils.getEleTop(document.getElementById(decodeURI(o.getAttribute("href")).replace("#",""))),300),window.innerWidth<900&&e.classList.remove("open"))});utils.addEventListenerPjax(t,"click",o)}},forPostFn=()=>{scrollFnToDo()};window.refreshFn=()=>{const{is_home:e,is_page:t,page:o,is_post:n}=PAGE_CONFIG,{runtime:s,lazyload:i,lightbox:c,randomlink:a,covercolor:l,post_ai:r,lure:d,expire:m}=GLOBAL_CONFIG,u=(e||n?".post-meta-date time":".datetime")+", .webinfo-item time";document.body.setAttribute("data-type",o),sco.changeTimeFormat(document.querySelectorAll(u)),s&&sco.addRuntime(),[scrollFn,sidebarFn,sco.addPhotoFigcaption,sco.setTimeState,sco.tagPageActive,sco.categoriesBarActive,sco.listenToPageInputPress,sco.addNavBackgroundInit,sco.refreshWaterFall].forEach((e=>e())),i.enable&&utils.lazyloadImg(),c&&utils.lightbox(document.querySelectorAll(".article-container img:not(.flink-avatar,.gallery-group img, .no-lightbox)")),a&&randomLinksList(),r&&n&&ai.init(),sco.switchComments(),initObserver(),e&&(showTodayCard(),sco.homeTypeit()),"function"==typeof updatePostsBasedOnComments&&updatePostsBasedOnComments(),(n||t)&&(addHighlight(),tabs.init()),n&&m&&tabs.expireAddListener(),l.enable&&coverColor(),PAGE_CONFIG.toc&&toc.init(),d&&tabs.lureAddListener(),"music"===o&&initializeMusicPlayer(),forPostFn()},document.addEventListener("DOMContentLoaded",(()=>{[addCopyright,window.refreshFn,asideStatus,()=>window.onscroll=percent,sco.initConsoleState].forEach((e=>e()))})),document.addEventListener("visibilitychange",(()=>{document.hidden&&(sco.wasPageHidden=!0)})),window.onkeydown=e=>{const{keyCode:t,ctrlKey:o,shiftKey:n}=e;(123===t||o&&n&&67===t)&&utils.snackbarShow(GLOBAL_CONFIG.lang.f12,!1,3e3),27===t&&sco.hideConsole()},document.addEventListener("copy",(()=>{utils.snackbarShow(GLOBAL_CONFIG.lang.copy.success,!1,3e3)}));const _0x162ca7=_0x4bbd;function _0xe168(){const e=["top","width","220633tytCAv","10YcCwrh","transparent","nowrap","102uczCSg","hidden","3YREEHR","none","opacity","margin","63692cYhdxG","127.0.0.1","transform","height","background","flexWrap","3403213ZBVFNc","警告:本页面非官方页面,可能存在有害信息!建议您立即跳转 ","hostname","appendChild","flex","30px","#8d8d8d","endsWith","storical.space","sinzmise.top","20px","justifyContent","_blank","center"," 并向站长举报该冒牌镜像站!","color","left","div","zIndex","100%","cloneNode","125DpcmBh","62174cDpKbs","https://blog.storical.space/","alignItems","当前访问于嵌套窗口,可能存在侵权行为,请在独立窗口访问 ","open","createElement","location","pointerEvents","819718BApLnZ","localhost","6527925hsPNMq","3143296pqWkNQ","style","fixed","whiteSpace","2px 2px 5px rgba(0, 0, 0, 0.5)"];return(_0xe168=function(){return e})()}function _0x4bbd(e,t){const o=_0xe168();return(_0x4bbd=function(e,t){return o[e-=284]})(e,t)}!function(){const e=_0x4bbd,t=_0xe168();for(;;)try{if(496529===parseInt(e(285))/1+-parseInt(e(333))/2*(parseInt(e(301))/3)+parseInt(e(305))/4*(-parseInt(e(332))/5)+parseInt(e(299))/6*(-parseInt(e(295))/7)+-parseInt(e(288))/8+parseInt(e(287))/9+-parseInt(e(296))/10*(-parseInt(e(311))/11))break;t.push(t.shift())}catch(e){t.push(t.shift())}}();const validDomain1=_0x162ca7(319),validDomain2=_0x162ca7(320),redirectUrl=_0x162ca7(334),hostname=document[_0x162ca7(339)][_0x162ca7(313)],isLocalHost=hostname===_0x162ca7(286)||hostname===_0x162ca7(306);if(!isLocalHost&&!hostname[_0x162ca7(318)](validDomain1)&&!hostname[_0x162ca7(318)](validDomain2)){createWatermark(validDomain);confirm(_0x162ca7(312)+validDomain+_0x162ca7(325))&&window[_0x162ca7(339)].replace(redirectUrl)}if(window[_0x162ca7(293)]!==window.self){confirm(_0x162ca7(336)+validDomain+"。")&&window[_0x162ca7(337)](redirectUrl,_0x162ca7(323))}function createWatermark(e){const t=_0x162ca7,o=document.createElement("div");o[t(289)][t(284)]=t(302),o.style.position=t(290),o[t(289)][t(293)]="0",o[t(289)][t(327)]="0",o[t(289)][t(294)]=t(330),o[t(289)][t(308)]=t(330),o[t(289)][t(329)]="9999",o.style[t(303)]="0.35",o.style[t(309)]=t(297),o[t(289)].overflow=t(300),o[t(289)].display=t(315),o[t(289)][t(322)]=t(324),o[t(289)][t(335)]=t(324),o.style[t(310)]="wrap";const n=document[t(338)](t(328));n.innerText=e,n[t(289)][t(326)]=t(317),n[t(289)].fontSize=t(316),n[t(289)][t(307)]="rotate(-30deg)",n[t(289)][t(291)]=t(298),n[t(289)][t(304)]=t(321),n[t(289)].textShadow=t(292);for(let e=0;e<60;e++)o[t(314)](n[t(331)](!0));document.body.appendChild(o)}