TC_learn_En / _next /static /chunks /app /layout-8f4e954e06fc61fd.js
Neil67's picture
Privacy-safe anonymous release
5704b98
Raw
History Blame Contribute Delete
1.19 kB
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{1743:()=>{},1910:(e,t,n)=>{"use strict";n.d(t,{StaticSpaceNavigationGuard:()=>a});var i=n(2115);function a(){return(0,i.useEffect)(()=>{if(window.location.hostname.endsWith(".static.hf.space"))return document.addEventListener("click",e,!0),()=>document.removeEventListener("click",e,!0);function e(e){if(e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target;if(!(t instanceof Element))return;let n=t.closest("a");if(!n||"_blank"===n.target||n.hasAttribute("download"))return;let i=new URL(n.href,window.location.href);if(i.origin!==window.location.origin)return;let a=function(e){if("/"===e.pathname||e.pathname.endsWith("/index.html")||(e.pathname.split("/").filter(Boolean).at(-1)??"").includes("."))return e;let t=e.pathname.endsWith("/")?e.pathname:`${e.pathname}/`;return e.pathname=`${t}index.html`,e}(i);a.href!==n.href&&(e.preventDefault(),e.stopPropagation(),window.location.assign(a.href))}},[]),null}},4916:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,1743,23)),Promise.resolve().then(n.bind(n,1910))}},e=>{e.O(0,[3334,8441,3794,7358],()=>e(e.s=4916)),_N_E=e.O()}]);