import{p as k}from"./vendor-react-CTtPmzVP.js";var m,C;function S(){if(C)return m;C=1;function v(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function A(o,e){for(var r="",i=0,f=-1,t=0,n,l=0;l<=o.length;++l){if(l<o.length)n=o.charCodeAt(l);else{if(n===47)break;n=47}if(n===47){if(!(f===l-1||t===1))if(f!==l-1&&t===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){s===-1?(r="",i=0):(r=r.slice(0,s),i=r.length-1-r.lastIndexOf("/")),f=l,t=0;continue}}else if(r.length===2||r.length===1){r="",i=0,f=l,t=0;continue}}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+o.slice(f+1,l):r=o.slice(f+1,l),i=l-f-1;f=l,t=0}else n===46&&t!==-1?++t:t=-1}return r}function b(o,e){var r=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+i:r+o+i:i}var g={resolve:function(){for(var e="",r=!1,i,f=arguments.length-1;f>=-1&&!r;f--){var t;f>=0?t=arguments[f]:(i===void 0&&(i=k.cwd()),t=i),v(t),t.length!==0&&(e=t+"/"+e,r=t.charCodeAt(0)===47)}return e=A(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(v(e),e.length===0)return".";var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=A(e,!r),e.length===0&&!r&&(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return v(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];v(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":g.normalize(e)},relative:function(e,r){if(v(e),v(r),e===r||(e=g.resolve(e),r=g.resolve(r),e===r))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var f=e.length,t=f-i,n=1;n<r.length&&r.charCodeAt(n)===47;++n);for(var l=r.length,s=l-n,c=t<s?t:s,u=-1,a=0;a<=c;++a){if(a===c){if(s>c){if(r.charCodeAt(n+a)===47)return r.slice(n+a+1);if(a===0)return r.slice(n+a)}else t>c&&(e.charCodeAt(i+a)===47?u=a:a===0&&(u=0));break}var h=e.charCodeAt(i+a),y=r.charCodeAt(n+a);if(h!==y)break;h===47&&(u=a)}var d="";for(a=i+u+1;a<=f;++a)(a===f||e.charCodeAt(a)===47)&&(d.length===0?d+="..":d+="/..");return d.length>0?d+r.slice(n+u):(n+=u,r.charCodeAt(n)===47&&++n,r.slice(n))},_makeLong:function(e){return e},dirname:function(e){if(v(e),e.length===0)return".";for(var r=e.charCodeAt(0),i=r===47,f=-1,t=!0,n=e.length-1;n>=1;--n)if(r=e.charCodeAt(n),r===47){if(!t){f=n;break}}else t=!1;return f===-1?i?"/":".":i&&f===1?"//":e.slice(0,f)},basename:function(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');v(e);var i=0,f=-1,t=!0,n;if(r!==void 0&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var l=r.length-1,s=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(c===47){if(!t){i=n+1;break}}else s===-1&&(t=!1,s=n+1),l>=0&&(c===r.charCodeAt(l)?--l===-1&&(f=n):(l=-1,f=s))}return i===f?f=s:f===-1&&(f=e.length),e.slice(i,f)}else{for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===47){if(!t){i=n+1;break}}else f===-1&&(t=!1,f=n+1);return f===-1?"":e.slice(i,f)}},extname:function(e){v(e);for(var r=-1,i=0,f=-1,t=!0,n=0,l=e.length-1;l>=0;--l){var s=e.charCodeAt(l);if(s===47){if(!t){i=l+1;break}continue}f===-1&&(t=!1,f=l+1),s===46?r===-1?r=l:n!==1&&(n=1):r!==-1&&(n=-1)}return r===-1||f===-1||n===0||n===1&&r===f-1&&r===i+1?"":e.slice(r,f)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return b("/",e)},parse:function(e){v(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;var i=e.charCodeAt(0),f=i===47,t;f?(r.root="/",t=1):t=0;for(var n=-1,l=0,s=-1,c=!0,u=e.length-1,a=0;u>=t;--u){if(i=e.charCodeAt(u),i===47){if(!c){l=u+1;break}continue}s===-1&&(c=!1,s=u+1),i===46?n===-1?n=u:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||s===-1||a===0||a===1&&n===s-1&&n===l+1?s!==-1&&(l===0&&f?r.base=r.name=e.slice(1,s):r.base=r.name=e.slice(l,s)):(l===0&&f?(r.name=e.slice(1,n),r.base=e.slice(1,s)):(r.name=e.slice(l,n),r.base=e.slice(l,s)),r.ext=e.slice(n,s)),l>0?r.dir=e.slice(0,l-1):f&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};return g.posix=g,m=g,m}export{S as r};
