1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_next/static/chunks/index-BCJYuZwX.js","_next/static/chunks/rolldown-runtime-C60lm6uB.js","_next/static/chunks/framework-BaE7mD_r.js","_next/static/chunks/app-elements-Drg5O4vw.js","_next/static/chunks/hash-D0ldriCF.js","_next/static/chunks/record-BdkTR7AP.js","_next/static/chunks/app-rsc-cache-busting-B2uquZQq.js","_next/static/chunks/app-rsc-render-mode-IDJu5NEE.js","_next/static/chunks/headers-CeAbe3am.js","_next/static/chunks/protocol-headers-URL33uU5.js","_next/static/chunks/deployment-id-DFhHa9wO.js","_next/static/chunks/navigation-errors-wvgRKjB-.js"])))=>i.map(i=>d[i]); 2import{r as e}from"./rolldown-runtime-C60lm6uB.js";import"./record-BdkTR7AP.js";import"./protocol-headers-URL33uU5.js";import{i as t,r as n}from"./framework-BaE7mD_r.js";import"./deployment-id-DFhHa9wO.js";import{C as r,S as i,T as a,_ as o,a as s,b as c,c as l,f as u,g as d,h as f,i as p,m,n as h,o as g,p as _,r as ee,s as te,t as v,w as y,x as b,y as ne}from"./index-BCJYuZwX.js";import{r as re,t as x}from"./query-CJ3eS_iZ.js";function S({basePath:e,domainLocales:t,hostname:n}){return f(i(window.location.pathname,e),window.__VINEXT_LOCALES__)||(_(t,n??void 0)?.defaultLocale??window.__VINEXT_LOCALE__??window.__VINEXT_DEFAULT_LOCALE__)}function C(){return window.location?.pathname??`/`}function w(e){return e.nodeEnv===`production`&&e.prefetch!==!1&&!e.isDangerous}function T(e){return e.nodeEnv!==`production`||e.isDangerous?!1:e.routerMode===`pages`||e.prefetch!==!1}function E(e){let{href:t,basePath:n,currentOrigin:r}=e;if(!p(t))return t;if(r===void 0)return null;try{let e=new URL(r),a=t.startsWith(`//`)?new URL(t,e.origin):new URL(t);return a.origin===e.origin?n?b(a.pathname,n)?i(a.pathname,n)+a.search+a.hash:null:a.pathname+a.search+a.hash:null}catch{return null}}var D=null,O=!1;function k(e){D&&D!==e&&D(!1),D=e,O=!0}function A(e){D===e&&(D=null)}function j(){if(O){O=!1;return}D&&=(D(!1),null)}var M=e(n(),1),N=t(),P=(0,M.createContext)({pending:!1});function F(){return(0,M.useContext)(P)}var I=0;function L(){I+=1,j()}a({notifyLinkNavigationStart:L});var R=``,z=!1,B=d();function V(e){if(typeof e==`string`)return e;let t=e.pathname??``;if(e.query){let n=re(e.query);t=x(t,n)}return e.hash&&(t+=e.hash.startsWith(`#`)?e.hash:`#${e.hash}`),t}function ie(e){return e}function H(e){let t=e.split(`?`),n=t.shift()??``,r=t.join(`?`);return n.replace(/\\/g,`/`).replace(/\/\/+/g,`/`)+(r?`?${r}`:``)}function ae(e){if(e.startsWith(`//`))return e;let t=e.match(/^[a-z][a-z0-9+.-]*:\/\//i),n=t?e.slice(t[0].length):e;if(!(n.split(`?`,1)[0]||``).match(/(\/\/|\\)/))return e;let r=C();console.error(`Invalid href '${e}' passed to next/router in page: '${r}'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.`);let i=H(n);return(t?t[0]:``)+i}function oe(e,t){return t||e===!1?`disabled`:e===!0?`full`:`auto`}function U(e){let t;try{t=new URL(e,window.location.href)}catch{return null}return t.origin===window.location.origin?`${i(t.pathname,R)}${t.search}`:null}function se(){return y()?`app`:`pages`}function ce(e){return{cacheForNavigation:!e.canPrefetchLoadingShell&&e.requiresDynamicNavigationRequest!==!0,prefetchShellFirst:!e.isDynamic,shouldPrefetch:!0}}function W(e){let t=window.__VINEXT_LINK_PREFETCH_ROUTES__;if(!t)return!1;let n=U(e);return n===null||!o(n,t,B)?!1:G(e).cacheForNavigation}function G(e){let t=window.__VINEXT_LINK_PREFETCH_ROUTES__;if(!t)return{cacheForNavigation:!1,prefetchShellFirst:!1,shouldPrefetch:!1};let n=U(e);if(n===null)return{cacheForNavigation:!1,prefetchShellFirst:!1,shouldPrefetch:!1};let r=o(n,t,B);if(!r)return{cacheForNavigation:!1,prefetchShellFirst:!1,shouldPrefetch:!1};let i=ce(r.route);return new URL(n,`http://vinext.local`).search===``?i:{...i,cacheForNavigation:!1,prefetchShellFirst:!0}}function K(){return{cacheForNavigation:!0,prefetchShellFirst:!0,shouldPrefetch:!0}}function le(e,t,n=`low`,r,i){let a=I,o=E({href:e,basePath:R,currentOrigin:window.location.origin});if(o==null)return;let s=g(o,window.location.href,R);g(r===void 0?o:E({href:r,basePath:R,currentOrigin:window.location.origin})??o,window.location.href,R);let c=new URL(s,window.location.href);
2if(c.origin===window.location.origin&&c.pathname===window.location.pathname&&c.search===window.location.search)return;let l=()=>{(async()=>{if(y()){if(ee(window.navigator?.userAgent??``))return;let[e,{AppElementsWire:r},i,{APP_RSC_RENDER_MODE_PREFETCH_DYNAMIC_SHELL:c,APP_RSC_RENDER_MODE_PREFETCH_LOADING_SHELL:l},u,d]=await Promise.all([v(()=>import(`./index-BCJYuZwX.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),v(()=>import(`./app-elements-Drg5O4vw.js`).then(e=>e.t),__vite__mapDeps([3,1,2,4,5])),v(()=>import(`./app-rsc-cache-busting-B2uquZQq.js`).then(e=>e.r),__vite__mapDeps([6,1,7,8,9,10,4])),v(()=>import(`./app-rsc-render-mode-IDJu5NEE.js`).then(e=>e.t),__vite__mapDeps([7,1])),v(()=>import(`./headers-CeAbe3am.js`).then(e=>e.h),__vite__mapDeps([8,1,9])),null]);if(a!==I)return;let{getPrefetchInterceptionContext:f,getPrefetchCache:p,getPrefetchedUrls:m,getMountedSlotsHeader:g,hasSearchAgnosticPrefetchShellForRoute:_,hasPrefetchCacheEntryForNavigation:te,peekPrefetchResponseForNavigation:y,prefetchRscResponse:b,restoreRscResponse:ne,PREFETCH_CACHE_TTL:re}=e,{createRscRequestHeaders:x,createRscRequestUrl:S}=i,{NEXT_ROUTER_PREFETCH_HEADER:C,NEXT_ROUTER_SEGMENT_PREFETCH_HEADER:w,VINEXT_MOUNTED_SLOTS_HEADER:T}=u,E=t===`auto`?G(o):t===`full-after-shell`?{cacheForNavigation:!0,prefetchShellFirst:!0,shouldPrefetch:!0}:K();if(!E.shouldPrefetch)return;let D=f(s),O=g(),k=!E.cacheForNavigation,A=new URL(s,window.location.href).search!==``,j=t===`auto`&&k&&A;if(k&&D!==null)return;let M=j&&_(await S(s,new Headers),D,O),N=x({interceptionContext:D,renderMode:k?M?l:j?c:l:void 0});O&&N.set(T,O),(k||t===`auto`)&&(N.set(C,`1`),N.set(w,`1`));let P=await S(s,N),F=[],L=r.encodeCacheKey(P,D),R=m();if(R.has(L)){if(!E.cacheForNavigation)return;let e=p().get(L);e?.cacheForNavigation===!1&&(e.cacheForNavigation=!0)}let z=()=>h(()=>fetch(P,{headers:N,credentials:`include`,priority:n,purpose:`prefetch`}),n),B=async()=>{let e=x({interceptionContext:D,renderMode:l});e.set(C,`1`),e.set(w,`1`),O&&e.set(T,O);let t=await S(s,e),i=r.encodeCacheKey(t,D),a=p(),o=a.get(i);o===void 0&&(m().add(i),b(t,h(()=>fetch(t,{headers:e,credentials:`include`,priority:n,purpose:`prefetch`}),n),D,O,void 0,{cacheForNavigation:!1,optimisticRouteShell:!0,prefetchKind:`loading-shell`}),o=a.get(i)),await o?.pending?.catch(()=>{})},V=async()=>{let e=x({interceptionContext:D,renderMode:l});e.set(C,`1`),e.set(w,`1`),O&&e.set(T,O);let t=await S(s,e);return fetch(t,{method:`HEAD`,headers:e,credentials:`include`,priority:n,purpose:`prefetch`})},ie=E.cacheForNavigation&&te(P,D,O);if(ie||E.cacheForNavigation&&te(P,D,O,{additionalRscUrls:F})){!ie&&!R.has(L)&&F.length>0&&E.prefetchShellFirst&&O===null&&(R.add(L),V().then(e=>e.arrayBuffer()).catch(()=>{}));return}R.add(L);let H=t===`full`&&A&&E.prefetchShellFirst&&O===null,ae=(t===`full-after-shell`||H)&&E.prefetchShellFirst,oe=E.cacheForNavigation&&ae?(async()=>{if(ae)return await B(),z();let e=x({interceptionContext:D,renderMode:void 0});e.set(C,`1`),e.set(w,`/_tree`),O&&e.set(T,O);let t=await S(s,e),i=r.encodeCacheKey(t,D),a=p(),o=a.get(i);o===void 0&&(m().add(i),b(t,h(()=>fetch(t,{headers:e,credentials:`include`,priority:n,purpose:`prefetch`}),n),D,O,void 0,{cacheForNavigation:!1,optimisticRouteShell:!1,prefetchKind:`route-tree`}),o=a.get(i)),await o?.pending?.catch(()=>{});let c=o?.snapshot?.renderedPathAndSearch;if(c){let e=y(await S(c,N),D,O);if(e)return ne(e)}return h(()=>fetch(P,{headers:N,credentials:`include`,priority:n,purpose:`prefetch`}),n)})():z();t===`full`&&E.cacheForNavigation&&E.prefetchShellFirst&&O===null&&!H&&B(),b(P,oe,D,O,void 0,{cacheForNavigation:E.cacheForNavigation,fallbackTtlMs:re,optimisticRouteShell:k,prefetchKind:k?`loading-shell`:`navigation`,searchAgnosticShell:j&&!M})}})().catch(e=>{console.error(`[vinext] RSC prefetch setup error:`,e)})};if(n===`high`||y()){l();return}(window.requestIdleCallback??(e=>setTimeout(e,100)))(l)}async function ue(e){if(!y())return;let[{getPrefetchCache:t},{stripRscCacheBustingSearchParam:n,stripRscSuffix:r}]=await Promise.all([v(()=>import(`./index-BCJYuZwX.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),v(()=>import(`./app-rsc-cache-busting-B2uquZQq.js`).then(e=>e.r),__vite__mapDeps([6,1,7,8,9,10,4]))]),i;try{i=new URL(g(e,window.location.href,R),window.location.href)}catch{return}for(let[e,a]of t()){if(a.optimisticRouteShell===!0||a.prefetchKind===`route-tree`)continue;let[t]=e.split(`\0`,1),o;try{o=new URL(t,window.location.href)}catch{continue}n(o),r(o.pathname)===i.pathname&&o.search===i.search&&(a.cacheForNavigation=!0)}}
2var q=null,J=new WeakMap,Y=new Set,X=[],Z=!1;function de(){for(Z=!1;;){let e=X.pop();if(!e)return;e.queuedViewportPrefetch=!1,!(!e.isVisible||e.routerMode!==`app`)&&le(e.href,e.mode,`low`,e.pagesRouteHref)}}function Q(e){e.queuedViewportPrefetch||(e.queuedViewportPrefetch=!0,X.push(e),!Z&&(Z=!0,queueMicrotask(de)))}function fe(e,t){if(e.isVisible=t,t){if(Y.add(e),e.routerMode===`pages`&&e.viewportPrefetched)return;e.routerMode===`app`?Q(e):le(e.href,e.mode,`low`,e.pagesRouteHref,e.locale),e.viewportPrefetched=!0}else Y.delete(e)}function pe(){a({pingVisibleLinks:me})}function me(){for(let e of Y)e.isVisible&&e.routerMode===`app`&&Q(e)}function he(){return typeof IntersectionObserver>`u`?null:q||(q=new IntersectionObserver(e=>{for(let t of e){let e=J.get(t.target);e&&fe(e,t.isIntersecting||t.intersectionRatio>0)}},{rootMargin:`250px`}),q)}function ge(){return window.__VINEXT_DEFAULT_LOCALE__}function _e(){return S({basePath:R,domainLocales:$(),hostname:ve()})}function $(){return window.__NEXT_DATA__?.domainLocales}function ve(){return window.location.hostname}function ye(e,t){return m(e,t,{basePath:R,currentHostname:ve(),domainItems:$()})}function be(e,t){if(e!==`/`&&!e.startsWith(`/?`)&&!e.startsWith(`/#`))return;let n;try{n=new URL(e,`http://vinext.local`)}catch{return}if(!(n.origin!==`http://vinext.local`||n.pathname!==`/`))return`/${t}${n.search}${n.hash}`}function xe(e,t){if(t===!1)return e;let n=t??_e();if(n===void 0||p(e))return e;let r=ye(e,n);if(r)return r;let i=ge()??``;if(n.toLowerCase()===i.toLowerCase()){let t=be(e,n);if(t)return t}return u(e,n,i)}var Se=(0,M.forwardRef)(function({href:e,as:t,replace:n=!1,prefetch:i,scroll:a=!0,shallow:o=!1,children:u,onClick:d,onMouseEnter:f,onTouchStart:m,onNavigate:h,unstable_dynamicOnHover:_=!1,legacyBehavior:ee=!1,passHref:y=!1,transitionTypes:b,...re},x){let S=t===void 0?void 0:V(t),{locale:C,...D}=re,O=u;ee&&(typeof u==`string`||typeof u==`number`)&&(O=M.createElement(`a`,null,u));let j=S??V(e),F=typeof j==`string`&&j.startsWith(`#`)?ie(j):j;typeof e==`string`||V(e);let I=typeof F==`string`?ae(F):F,L=typeof I==`string`&&ne(I),B=s(xe(L?`/`:I,C),z),H=B,U=s(l(B,R),z),[ce,W]=(0,M.useState)(!1),G=(0,M.useRef)(!0),K=(0,M.useRef)(null);K.current===null&&(K.current=e=>{G.current&&W(e)}),(0,M.useEffect)(()=>{G.current=!0;let e=K.current;return()=>{G.current=!1,e&&A(e)}},[]);let q=(0,M.useRef)(null),X=oe(i,L),Z=w({nodeEnv:`production`,prefetch:i,isDangerous:L}),de=(0,M.useCallback)(e=>{q.current=e,typeof x==`function`?x(e):x&&(x.current=e)},[x]);(0,M.useEffect)(()=>{if(!Z)return;let e=q.current;if(!e)return;let t=E({href:B,basePath:R,currentOrigin:window.location.origin});if(t==null)return;let n=he();if(!n)return;pe();let r={href:t,isVisible:!1,locale:C,mode:X,pagesRouteHref:H===B?void 0:E({href:H,basePath:R,currentOrigin:window.location.origin})??void 0,queuedViewportPrefetch:!1,routerMode:se(),viewportPrefetched:!1};return J.set(e,r),n.observe(e),()=>{n.unobserve(e),J.delete(e),Y.delete(r),r.isVisible=!1}},[Z,X,B,H,C]);let Q=(0,M.useCallback)(()=>{if(!T({nodeEnv:`production`,prefetch:i,isDangerous:L,routerMode:se()}))return;let e=_?`full-after-shell`:X;if(_&&q.current){let e=J.get(q.current);e&&(e.mode=`full-after-shell`),ue(B)}le(B,e,`high`,H===B?void 0:H,C)},[i,L,X,B,H,C,_]),fe=(0,M.useCallback)(e=>{f?.(e),Q()},[f,Q]),me=(0,M.useCallback)(e=>{m?.(e),Q()},[m,Q]),ge=async(e,t={})=>{if(!t.skipLinkOnClick&&d&&d(e),e.defaultPrevented||e.currentTarget.hasAttribute(`download`)||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.currentTarget.target&&e.currentTarget.target!==`_self`)return;let i=B;if(p(I)){let t=te(I,R);if(t==null){n&&(e.preventDefault(),window.location.replace(I));return}i=t}e.preventDefault();let o=!!r()?.functions.navigate,s=g(i,window.location.href,R);if(h)try{let e=new URL(s,window.location.origin),t=!1,n={url:e,preventDefault(){t=!0},get defaultPrevented(){return t}};if(h(n),n.defaultPrevented)return}catch{}if(o){let{navigateClientSide:e}=await v(async()=>{let{navigateClientSide:e}=await import(`./index-BCJYuZwX.js`);return{navigateClientSide:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),t=K.current;
2t&&k(t),W(!0),M.startTransition(()=>{e(i,n?`replace`:`push`,a,!0).finally(()=>{G.current&&W(!1),t&&A(t)})});return}else n?window.location.replace(s):window.location.assign(s)},_e=D,$=M.useMemo(()=>({pending:ce}),[ce]);if(L){let e=e=>{d&&d(e),c()};if(ee){let e=M.Children.only(O),t=e.props.onClick,n=e.props.ref;return(0,N.jsx)(P.Provider,{value:$,children:M.cloneElement(e,{ref:e=>{q.current=e,typeof n==`function`?n(e):n&&(n.current=e)},onClick:e=>{t&&t(e),c()}})})}return(0,N.jsx)(P.Provider,{value:$,children:(0,N.jsx)(`a`,{ref:de,onClick:e,onMouseEnter:fe,onTouchStart:me,..._e,children:O})})}if(ee){let e=M.Children.only(O),t=e.props,n=e.type===`a`?`href`in t:!1,r=y||e.type===`a`&&!n,i=t.onClick,a=t.onMouseEnter,o=t.onTouchStart,s=t.ref,c={ref:e=>{q.current=e,typeof s==`function`?s(e):s&&(s.current=e)},onClick:e=>{if(i&&i(e),!e.defaultPrevented)return ge(e,{skipLinkOnClick:!0})},onMouseEnter:e=>{a&&a(e),Q()},onTouchStart:e=>{o&&o(e),Q()}};return r&&(c.href=U),(0,N.jsx)(P.Provider,{value:$,children:M.cloneElement(e,c)})}return(0,N.jsx)(P.Provider,{value:$,children:(0,N.jsx)(`a`,{ref:de,href:U,onClick:ge,onMouseEnter:fe,onTouchStart:me,..._e,children:O})})});export{W as canAutoPrefetchFullAppRoute,Se as default,G as resolveAutoAppRoutePrefetch,oe as resolveLinkPrefetchMode,F as useLinkStatus};
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.