import{Mt as e}from"./app-elements-CWGamLYk.js";import t from"node:path";import"node:fs";var n=/([/#?\\]|%(2f|23|3f|5c))/gi;function r(e){return e.replace(n,e=>encodeURIComponent(e))}function i(e){try{return r(decodeURIComponent(e))}catch{return e}}function a(e){return r(decodeURIComponent(e))}function o(e){return e.split(`/`).map(e=>i(e)).join(`/`)}function s(e){return o(e).split(`/`).filter(Boolean)}function c(e){return e.split(`/`).map(e=>a(e)).join(`/`)}function l(e){try{return decodeURIComponent(e)}catch{return e}}function u(e){let t=Object.create(null);for(let[n,r]of e)t[n]=r;return t}function d(e){for(let t of Object.keys(e)){let n=e[t];Array.isArray(n)?e[t]=n.map(l):e[t]=l(n)}}function f(e){return e.split(`/`).filter(Boolean)}function p(e){return e.startsWith(`[...`)&&e.endsWith(`]`)&&e.length>5}function m(e){return e.startsWith(`[[...`)&&e.endsWith(`]]`)&&e.length>7}var h=/\\/g,g=process.platform===`win32`,_=e=>e.startsWith(`\\\\?\\`)?e:e.replace(h,`/`),v=t.win32;function y(e){return(...t)=>_(e(...t))}var b={resolve:y(v.resolve),normalize:y(v.normalize),join:y(v.join),relative:y(v.relative),dirname:y(v.dirname),format:y(v.format),parse:e=>{let t=v.parse(e);return t.root=_(t.root),t.dir=_(t.dir),t},basename:v.basename,extname:v.extname,isAbsolute:v.isAbsolute,matchesGlob:v.matchesGlob,toNamespacedPath:v.toNamespacedPath,delimiter:v.delimiter,sep:`/`},x={...t.posix};x.posix=b.posix=x,x.win32=b.win32=b;var{basename:S,delimiter:C,dirname:w,extname:T,format:E,isAbsolute:D,join:O,matchesGlob:k,normalize:A,parse:j,relative:M,resolve:N,sep:P,toNamespacedPath:F}=g?b:x;function I(){return globalThis.__VINEXT_onRequestErrorHandler__??null}function L(t,n,r){let i=I();if(!i)return Promise.resolve();let a=(async()=>{try{await i(t,n,r)}catch(e){console.error(`[vinext] onRequestError handler threw:`,e instanceof Error?e.message:String(e))}})();return e()?.waitUntil(a),a}export{m as a,f as c,p as i,s as l,u as n,o,d as r,c as s,L as t};