pages/assets/chunks/theme.BI7Ww41l.js

2 lines
63 KiB
JavaScript
Raw Normal View History

import{d as k,o as r,c as p,r as d,n as C,a as J,t as M,b as S,w as v,e as g,T as Ne,_ as L,u as Re,i as vt,f as ft,g as fe,h as V,j as h,k as l,p as z,l as j,m as ee,q as Le,s as I,v as Q,x as me,y as oe,z as Me,A as xe,B as mt,C as _t,D as Z,F as A,E as F,G as Ke,H as _e,I as y,J as se,K as We,L as ge,M as ce,N as ke,O as gt,P as Je,Q as kt,R as Xe,S as Ye,U as be,V as bt,W as $t,X as yt,Y as Fe,Z as Pt,$ as Qe,a0 as Vt,a1 as Lt,a2 as Ze,a3 as et,a4 as St,a5 as wt,a6 as It}from"./framework.Cq0zXouN.js";const Tt=k({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(e){return(t,n)=>(r(),p("span",{class:C(["VPBadge",t.type])},[d(t.$slots,"default",{},()=>[J(M(t.text),1)])],2))}}),Nt={key:0,class:"VPBackdrop"},Mt=k({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(e){return(t,n)=>(r(),S(Ne,{name:"fade"},{default:v(()=>[t.show?(r(),p("div",Nt)):g("",!0)]),_:1}))}}),Ct=L(Mt,[["__scopeId","data-v-c79a1216"]]),T=Re;function At(e,t){let n,s=!1;return()=>{n&&clearTimeout(n),s?n=setTimeout(e,t):(e(),(s=!0)&&setTimeout(()=>s=!1,t))}}function Se(e){return/^\//.test(e)?e:`/${e}`}function Ce(e){const{pathname:t,search:n,hash:s,protocol:o}=new URL(e,"http://a.com");if(vt(e)||e.startsWith("#")||!o.startsWith("http")||!ft(t))return e;const{site:a}=T(),i=t.endsWith("/")||t.endsWith(".html")?e:e.replace(/(?:(^\.+)\/)?.*$/,`$1${t.replace(/(\.md)?$/,a.value.cleanUrls?"":".html")}${n}${s}`);return fe(i)}function ie({correspondingLink:e=!1}={}){const{site:t,localeIndex:n,page:s,theme:o,hash:a}=T(),i=V(()=>{var u,f;return{label:(u=t.value.locales[n.value])==null?void 0:u.label,link:((f=t.value.locales[n.value])==null?void 0:f.link)||(n.value==="root"?"/":`/${n.value}/`)}});return{localeLinks:V(()=>Object.entries(t.value.locales).flatMap(([u,f])=>i.value.label===f.label?[]:{text:f.label,link:Bt(f.link||(u==="root"?"/":`/${u}/`),o.value.i18nRouting!==!1&&e,s.value.relativePath.slice(i.value.link.length-1),!t.value.cleanUrls)+a.value})),currentLang:i}}function Bt(e,t,n,s){return t?e.replace(/\/$/,"")+Se(n.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,s?".html":"")):e}const Ht=e=>(z("data-v-d6be1790"),e=e(),j(),e),Et={class:"NotFound"},Ot={class:"code"},Dt={class:"title"},Ft=Ht(()=>h("div",{class:"divider"},null,-1)),zt={class:"quote"},jt={class:"action"},Ut=["href","aria-label"],qt=k({__name:"NotFound",setup(e){const{theme:t}=T(),{currentLang:n}=ie();return(s,o)=>{var a,i,c,u,f;return r(),p("div",Et,[h("p",Ot,M(((a=l(t).notFound)==null?void 0:a.code)??"404"),1),h("h1",Dt,M(((i=l(t).notFound)==null?void 0:i.title)??"PAGE NOT FOUND"),1),Ft,h("blockquote",zt,M(((c=l(t).notFound)==null?void 0:c.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),h("div",jt,[h("a",{class:"link",href:l(fe)(l(n).link),"aria-label":((u=l(t).notFound)==null?void 0:u.linkLabel)??"go to home"},M(((f=l(t).notFound)==null?void 0:f.linkText)??"Take me home"),9,Ut)])])}}}),Gt=L(qt,[["__scopeId","data-v-d6be1790"]]);function tt(e,t){if(Array.isArray(e))return ue(e);if(e==null)return[];t=Se(t);const n=Object.keys(e).sort((o,a)=>a.split("/").length-o.split("/").length).find(o=>t.startsWith(Se(o))),s=n?e[n]:[];return Array.isArray(s)?ue(s):ue(s.items,s.base)}function Rt(e){const t=[];let n=0;for(const s in e){const o=e[s];if(o.items){n=t.push(o);continue}t[n]||t.push({items:[]}),t[n].items.push(o)}return t}function xt(e){const t=[];function n(s){for(const o of s)o.text&&o.link&&t.push({text:o.text,link:o.link,docFooterText:o.docFooterText}),o.items&&n(o.items)}return n(e),t}function we(e,t){return Array.isArray(t)?t.some(n=>we(e,n)):ee(e,t.link)?!0:t.items?we(e,t.items):!1}function ue(e,t){return[...e].map(n=>{const s={...n},o=s.base||t;return o&&s.link&&(s.link=o+s.link),s.items&&(s.items=ue(s.items,o)),s})}function X(){const{frontmatter:e,page:t,theme:n}=T(),s=Le("(min-width: 960px)"),o=I(!1),a=V(()=>{const N=n.value.sidebar,w=t.value.relativePath;return N?tt(N,w):[]}),i=I(a.value);Q(a,(N,w)=>{JSON.stringify(N)!==JSON.stringify(w)&&(i.value=a.value)});const c=V(()=>e.value.sidebar!==!1&&i.value.len