1import{a2 as k,aa as H,ab as A,af as v,p as y,A as B,ao as C,d as E,K as M,c as $,o as q,e as f,b as w,u as z}from"./BxdW20Ub.js";import{_ as V}from"./Vz-2EXx8.js";import{_ as G}from"./BwA2q9Bu.js";import{_ as K}from"./DErdkTRz.js";import O from"./0IFSHsr_.js";import{u as R}from"./Bz8D0j-4.js";import{u as X}from"./B3w1Viou.js";import"./Dwcg0_5Q.js";import"./teMtHUYD.js";import"./5XSATRc4.js";import"./CLsKqG-e.js";import"./CUBleYSJ.js";import"./CQ2nXzyS.js";import"./51z2yfQf.js";function j(t,e){const r=e/t*100;return 2/Math.PI*100*Math.atan(r/50)}function J(t={}){const{duration:e=2e3,throttle:r=200,hideDelay:u=500,resetDelay:d=400}=t,c=t.estimatedProgress||j,i=k(),a=v(0),n=v(!1),m=v(!1);let p=!1,h,x,D,I;const T=(o={})=>{N(),m.value=!1,b(0,o)};function b(o=0,s={}){if(i.isHydrating)return;if(o>=100)return g({force:s.force});_(),a.value=o<0?0:o;const l=s.force?0:r;l?x=setTimeout(()=>{n.value=!0,L()},l):(n.value=!0,L())}function F(){D=setTimeout(()=>{n.value=!1,I=setTimeout(()=>{a.value=0},d)},u)}function g(o={}){a.value=100,p=!0,_(),N(),o.error&&(m.value=!0),o.force?(a.value=0,n.value=!1):F()}function N(){clearTimeout(D),clearTimeout(I)}function _(){clearTimeout(x),cancelAnimationFrame(h)}function L(){p=!1;let o;function s(l){if(p)return;o??(o=l);const S=l-o;a.value=Math.max(0,Math.min(100,c(e,S))),h=requestAnimationFrame(s)}h=requestAnimationFrame(s)}let P=()=>{};{const o=i.hook("page:loading:start",()=>{T()}),s=i.hook("page:loading:end",()=>{g()}),l=i.hook("vue:error",()=>g());P=()=>{l(),o(),s(),_()}}return{_cleanup:P,progress:y(()=>a.value),isLoading:y(()=>n.value),error:y(()=>m.value),start:T,set:b,finish:g,clear:_}}function Q(t={}){const e=k(),r=e._loadingIndicator||(e._loadingIndicator=J(t));return H()&&(e._loadingIndicatorDeps||(e._loadingIndicatorDeps=0),e._loadingIndicatorDeps++,A(()=>{e._loadingIndicatorDeps--,e._loadingIndicatorDeps===0&&(r._cleanup(),delete e._loadingIndicator)})),r}const U=B({name:"NuxtLoadingIndicator",props:{throttle:{type:Number,default:200},duration:{type:Number,default:2e3},hideDelay:{type:Number,default:500},resetDelay:{type:Number,default:400},height:{type:Number,default:3},color:{type:[String,Boolean],default:"repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)"},errorColor:{type:String,default:"repeating-linear-gradient(to right,#f87171 0%,#ef4444 100%)"},estimatedProgress:{type:Function,required:!1}},setup(t,{slots:e,expose:r}){const{progress:u,isLoading:d,error:c,start:i,finish:a,clear:n}=Q({duration:t.duration,throttle:t.throttle,hideDelay:t.hideDelay,resetDelay:t.resetDelay,estimatedProgress:t.estimatedProgress});return r({progress:u,isLoading:d,error:c,start:i,finish:a,clear:n}),()=>C("div",{class:"nuxt-loading-indicator",style:{position:"fixed",top:0,right:0,left:0,pointerEvents:"none",width:"auto",height:`${t.height}px`,opacity:d.value?1:0,background:c.value?t.errorColor:t.color||void 0,backgroundSize:`${100/u.value*100}% auto`,transform:`scaleX(${u.value}%)`,transformOrigin:"left",transition:"transform 0.1s, height 0.4s, opacity 0.4s",zIndex:999999}},e)}}),de={__name:"default",setup(t){const{scrollingTo:e}=R(),{locale:r}=E();return M({htmlAttrs:{lang:r.value}}),X(),(u,d)=>{const c=U,i=V,a=G,n=K,m=O;return q(),$("div",null,[f(c,{throttle:0,class:"loading-indicator"}),f(i,{scrollto:z(e),"color-mode":"light"},null,8,["scrollto"]),w("div",null,[f(a,{class:"main-page-layout main-page-light"})]),f(n),f(m)])}}};export{de as default};
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.