import{s as b}from"./vendor-u-117-DC4Cwaa0.js";class d extends Error{constructor(t,e,s){super(),typeof e=="string"&&(s=e,e=void 0);let o="",i={},r=!1;if(e&&("line"in e&&"column"in e?i={place:e}:"start"in e&&"end"in e?i={place:e}:"type"in e?i={ancestors:[e],place:e.position}:i={...e}),typeof t=="string"?o=t:!i.cause&&t&&(r=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof s=="string"){const f=s.indexOf(":");f===-1?i.ruleId=s:(i.source=s.slice(0,f),i.ruleId=s.slice(f+1))}if(!i.place&&i.ancestors&&i.ancestors){const f=i.ancestors[i.ancestors.length-1];f&&(i.place=f.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=l?l.line:void 0,this.name=b(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=r&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}d.prototype.file="";d.prototype.name="";d.prototype.reason="";d.prototype.message="";d.prototype.stack="";d.prototype.column=void 0;d.prototype.line=void 0;d.prototype.ancestors=void 0;d.prototype.cause=void 0;d.prototype.fatal=void 0;d.prototype.place=void 0;d.prototype.ruleId=void 0;d.prototype.source=void 0;const c={basename:x,dirname:A,extname:E,join:I,sep:"/"};function x(n,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');u(n);let e=0,s=-1,o=n.length,i;if(t===void 0||t.length===0||t.length>n.length){for(;o--;)if(n.codePointAt(o)===47){if(i){e=o+1;break}}else s<0&&(i=!0,s=o+1);return s<0?"":n.slice(e,s)}if(t===n)return"";let r=-1,l=t.length-1;for(;o--;)if(n.codePointAt(o)===47){if(i){e=o+1;break}}else r<0&&(i=!0,r=o+1),l>-1&&(n.codePointAt(o)===t.codePointAt(l--)?l<0&&(s=o):(l=-1,s=r));return e===s?s=r:s<0&&(s=n.length),n.slice(e,s)}function A(n){if(u(n),n.length===0)return".";let t=-1,e=n.length,s;for(;--e;)if(n.codePointAt(e)===47){if(s){t=e;break}}else s||(s=!0);return t<0?n.codePointAt(0)===47?"/":".":t===1&&n.codePointAt(0)===47?"//":n.slice(0,t)}function E(n){u(n);let t=n.length,e=-1,s=0,o=-1,i=0,r;for(;t--;){const l=n.codePointAt(t);if(l===47){if(r){s=t+1;break}continue}e<0&&(r=!0,e=t+1),l===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||e<0||i===0||i===1&&o===e-1&&o===s+1?"":n.slice(o,e)}function I(...n){let t=-1,e;for(;++t0&&n.codePointAt(n.length-1)===47&&(e+="/"),t?"/"+e:e}function R(n,t){let e="",s=0,o=-1,i=0,r=-1,l,f;for(;++r<=n.length;){if(r2){if(f=e.lastIndexOf("/"),f!==e.length-1){f<0?(e="",s=0):(e=e.slice(0,f),s=e.length-1-e.lastIndexOf("/")),o=r,i=0;continue}}else if(e.length>0){e="",s=0,o=r,i=0;continue}}t&&(e=e.length>0?e+"/..":"..",s=2)}else e.length>0?e+="/"+n.slice(o+1,r):e=n.slice(o+1,r),s=r-o-1;o=r,i=0}else l===46&&i>-1?i++:i=-1}return e}function u(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const S={cwd:N};function N(){return"/"}function g(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function _(n){if(typeof n=="string")n=new URL(n);else if(!g(n)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(n.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return T(n)}function T(n){if(n.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=n.pathname;let e=-1;for(;++e-1&&i<=t.length){let r=0;for(;;){let l=e[r];if(l===void 0){const f=w(t,e[r-1]);l=f===-1?t.length+1:f+1,e[r]=l}if(l>i)return{line:r+1,column:i-(r>0?e[r-1]:0)+1,offset:i};r++}}}function o(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;e.length1?e[i.line-2]:0)+i.column-1;if(r