source-map.js 31.4 KB
module.exports=(()=>{var e={375:(e,n)=>{class ArraySet{constructor(){this._array=[];this._set=new Map}static fromArray(e,n){const t=new ArraySet;for(let r=0,o=e.length;r<o;r++){t.add(e[r],n)}return t}size(){return this._set.size}add(e,n){const t=this.has(e);const r=this._array.length;if(!t||n){this._array.push(e)}if(!t){this._set.set(e,r)}}has(e){return this._set.has(e)}indexOf(e){const n=this._set.get(e);if(n>=0){return n}throw new Error('"'+e+'" is not in the set.')}at(e){if(e>=0&&e<this._array.length){return this._array[e]}throw new Error("No element indexed by "+e)}toArray(){return this._array.slice()}}n.I=ArraySet},975:(e,n,t)=>{const r=t(156);const o=5;const s=1<<o;const i=s-1;const u=s;function toVLQSigned(e){return e<0?(-e<<1)+1:(e<<1)+0}function fromVLQSigned(e){const n=(e&1)===1;const t=e>>1;return n?-t:t}n.encode=function base64VLQ_encode(e){let n="";let t;let s=toVLQSigned(e);do{t=s&i;s>>>=o;if(s>0){t|=u}n+=r.encode(t)}while(s>0);return n}},156:(e,n)=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e<t.length){return t[e]}throw new TypeError("Must be between 0 and 63: "+e)}},600:(e,n)=>{n.GREATEST_LOWER_BOUND=1;n.LEAST_UPPER_BOUND=2;function recursiveSearch(e,t,r,o,s,i){const u=Math.floor((t-e)/2)+e;const l=s(r,o[u],true);if(l===0){return u}else if(l>0){if(t-u>1){return recursiveSearch(u,t,r,o,s,i)}if(i==n.LEAST_UPPER_BOUND){return t<o.length?t:-1}return u}if(u-e>1){return recursiveSearch(e,u,r,o,s,i)}if(i==n.LEAST_UPPER_BOUND){return u}return e<0?-1:e}n.search=function search(e,t,r,o){if(t.length===0){return-1}let s=recursiveSearch(-1,t.length,e,t,r,o||n.GREATEST_LOWER_BOUND);if(s<0){return-1}while(s-1>=0){if(r(t[s],t[s-1],true)!==0){break}--s}return s}},817:(e,n,t)=>{const r=t(344);function generatedPositionAfter(e,n){const t=e.generatedLine;const o=n.generatedLine;const s=e.generatedColumn;const i=n.generatedColumn;return o>t||o==t&&i>=s||r.compareByGeneratedPositionsInflated(e,n)<=0}class MappingList{constructor(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}unsortedForEach(e,n){this._array.forEach(e,n)}add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}}toArray(){if(!this._sorted){this._array.sort(r.compareByGeneratedPositionsInflated);this._sorted=true}return this._array}}n.H=MappingList},587:(e,n,t)=>{if(typeof fetch==="function"){let n=null;e.exports=function readWasm(){if(typeof n!=="string"){throw new Error("You must provide the URL of lib/mappings.wasm by calling "+"SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) "+"before using SourceMapConsumer")}return fetch(n).then(e=>e.arrayBuffer())};e.exports.initialize=(e=>n=e)}else{const n=t(747);const r=t(622);e.exports=function readWasm(){return new Promise((e,r)=>{const o=t.ab+"mappings.wasm";n.readFile(t.ab+"mappings.wasm",null,(n,t)=>{if(n){r(n);return}e(t.buffer)})})};e.exports.initialize=(e=>{console.debug("SourceMapConsumer.initialize is a no-op when running in node.js")})}},155:(e,n,t)=>{var r;const o=t(344);const s=t(600);const i=t(375).I;const u=t(975);const l=t(587);const a=t(796);const c=Symbol("smcInternal");class SourceMapConsumer{constructor(e,n){if(e==c){return Promise.resolve(this)}return _factory(e,n)}static initialize(e){l.initialize(e["lib/mappings.wasm"])}static fromSourceMap(e,n){return _factoryBSM(e,n)}static with(e,n,t){let r=null;const o=new SourceMapConsumer(e,n);return o.then(e=>{r=e;return t(e)}).then(e=>{if(r){r.destroy()}return e},e=>{if(r){r.destroy()}throw e})}_parseMappings(e,n){throw new Error("Subclasses must implement _parseMappings")}eachMapping(e,n,t){throw new Error("Subclasses must implement eachMapping")}allGeneratedPositionsFor(e){throw new Error("Subclasses must implement allGeneratedPositionsFor")}destroy(){throw new Error("Subclasses must implement destroy")}}SourceMapConsumer.prototype._version=3;SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;n.SourceMapConsumer=SourceMapConsumer;class BasicSourceMapConsumer extends SourceMapConsumer{constructor(e,n){return super(c).then(t=>{let r=e;if(typeof e==="string"){r=o.parseSourceMapInput(e)}const s=o.getArg(r,"version");let u=o.getArg(r,"sources");const l=o.getArg(r,"names",[]);let c=o.getArg(r,"sourceRoot",null);const h=o.getArg(r,"sourcesContent",null);const f=o.getArg(r,"mappings");const g=o.getArg(r,"file",null);if(s!=t._version){throw new Error("Unsupported version: "+s)}if(c){c=o.normalize(c)}u=u.map(String).map(o.normalize).map(function(e){return c&&o.isAbsolute(c)&&o.isAbsolute(e)?o.relative(c,e):e});t._names=i.fromArray(l.map(String),true);t._sources=i.fromArray(u,true);t._absoluteSources=t._sources.toArray().map(function(e){return o.computeSourceURL(c,e,n)});t.sourceRoot=c;t.sourcesContent=h;t._mappings=f;t._sourceMapURL=n;t.file=g;t._computedColumnSpans=false;t._mappingsPtr=0;t._wasm=null;return a().then(e=>{t._wasm=e;return t})})}_findSourceIndex(e){let n=e;if(this.sourceRoot!=null){n=o.relative(this.sourceRoot,n)}if(this._sources.has(n)){return this._sources.indexOf(n)}for(let n=0;n<this._absoluteSources.length;++n){if(this._absoluteSources[n]==e){return n}}return-1}static fromSourceMap(e,n){return new BasicSourceMapConsumer(e.toString())}get sources(){return this._absoluteSources.slice()}_getMappingsPtr(){if(this._mappingsPtr===0){this._parseMappings(this._mappings,this.sourceRoot)}return this._mappingsPtr}_parseMappings(e,n){const t=e.length;const r=this._wasm.exports.allocate_mappings(t);const o=new Uint8Array(this._wasm.exports.memory.buffer,r,t);for(let n=0;n<t;n++){o[n]=e.charCodeAt(n)}const s=this._wasm.exports.parse_mappings(r);if(!s){const e=this._wasm.exports.get_last_error();let n=`Error parsing mappings (code ${e}): `;switch(e){case 1:n+="the mappings contained a negative line, column, source index, or name index";break;case 2:n+="the mappings contained a number larger than 2**32";break;case 3:n+="reached EOF while in the middle of parsing a VLQ";break;case 4:n+="invalid base 64 character while parsing a VLQ";break;default:n+="unknown error code";break}throw new Error(n)}this._mappingsPtr=s}eachMapping(e,n,t){const r=n||null;const s=t||SourceMapConsumer.GENERATED_ORDER;const i=this.sourceRoot;this._wasm.withMappingCallback(n=>{if(n.source!==null){n.source=this._sources.at(n.source);n.source=o.computeSourceURL(i,n.source,this._sourceMapURL);if(n.name!==null){n.name=this._names.at(n.name)}}e.call(r,n)},()=>{switch(s){case SourceMapConsumer.GENERATED_ORDER:this._wasm.exports.by_generated_location(this._getMappingsPtr());break;case SourceMapConsumer.ORIGINAL_ORDER:this._wasm.exports.by_original_location(this._getMappingsPtr());break;default:throw new Error("Unknown order of iteration.")}})}allGeneratedPositionsFor(e){let n=o.getArg(e,"source");const t=o.getArg(e,"line");const r=e.column||0;n=this._findSourceIndex(n);if(n<0){return[]}if(t<1){throw new Error("Line numbers must be >= 1")}if(r<0){throw new Error("Column numbers must be >= 0")}const s=[];this._wasm.withMappingCallback(e=>{let n=e.lastGeneratedColumn;if(this._computedColumnSpans&&n===null){n=Infinity}s.push({line:e.generatedLine,column:e.generatedColumn,lastColumn:n})},()=>{this._wasm.exports.all_generated_locations_for(this._getMappingsPtr(),n,t-1,"column"in e,r)});return s}destroy(){if(this._mappingsPtr!==0){this._wasm.exports.free_mappings(this._mappingsPtr);this._mappingsPtr=0}}computeColumnSpans(){if(this._computedColumnSpans){return}this._wasm.exports.compute_column_spans(this._getMappingsPtr());this._computedColumnSpans=true}originalPositionFor(e){const n={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")};if(n.generatedLine<1){throw new Error("Line numbers must be >= 1")}if(n.generatedColumn<0){throw new Error("Column numbers must be >= 0")}let t=o.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND);if(t==null){t=SourceMapConsumer.GREATEST_LOWER_BOUND}let r;this._wasm.withMappingCallback(e=>r=e,()=>{this._wasm.exports.original_location_for(this._getMappingsPtr(),n.generatedLine-1,n.generatedColumn,t)});if(r){if(r.generatedLine===n.generatedLine){let e=o.getArg(r,"source",null);if(e!==null){e=this._sources.at(e);e=o.computeSourceURL(this.sourceRoot,e,this._sourceMapURL)}let n=o.getArg(r,"name",null);if(n!==null){n=this._names.at(n)}return{source:e,line:o.getArg(r,"originalLine",null),column:o.getArg(r,"originalColumn",null),name:n}}}return{source:null,line:null,column:null,name:null}}hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null})}sourceContentFor(e,n){if(!this.sourcesContent){return null}const t=this._findSourceIndex(e);if(t>=0){return this.sourcesContent[t]}let r=e;if(this.sourceRoot!=null){r=o.relative(this.sourceRoot,r)}let s;if(this.sourceRoot!=null&&(s=o.urlParse(this.sourceRoot))){const e=r.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(e)){return this.sourcesContent[this._sources.indexOf(e)]}if((!s.path||s.path=="/")&&this._sources.has("/"+r)){return this.sourcesContent[this._sources.indexOf("/"+r)]}}if(n){return null}throw new Error('"'+r+'" is not in the SourceMap.')}generatedPositionFor(e){let n=o.getArg(e,"source");n=this._findSourceIndex(n);if(n<0){return{line:null,column:null,lastColumn:null}}const t={source:n,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")};if(t.originalLine<1){throw new Error("Line numbers must be >= 1")}if(t.originalColumn<0){throw new Error("Column numbers must be >= 0")}let r=o.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND);if(r==null){r=SourceMapConsumer.GREATEST_LOWER_BOUND}let s;this._wasm.withMappingCallback(e=>s=e,()=>{this._wasm.exports.generated_location_for(this._getMappingsPtr(),t.source,t.originalLine-1,t.originalColumn,r)});if(s){if(s.source===t.source){let e=s.lastGeneratedColumn;if(this._computedColumnSpans&&e===null){e=Infinity}return{line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:e}}}return{line:null,column:null,lastColumn:null}}}BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;r=BasicSourceMapConsumer;class IndexedSourceMapConsumer extends SourceMapConsumer{constructor(e,n){return super(c).then(t=>{let r=e;if(typeof e==="string"){r=o.parseSourceMapInput(e)}const s=o.getArg(r,"version");const u=o.getArg(r,"sections");if(s!=t._version){throw new Error("Unsupported version: "+s)}t._sources=new i;t._names=new i;t.__generatedMappings=null;t.__originalMappings=null;t.__generatedMappingsUnsorted=null;t.__originalMappingsUnsorted=null;let l={line:-1,column:0};return Promise.all(u.map(e=>{if(e.url){throw new Error("Support for url field in sections not implemented.")}const t=o.getArg(e,"offset");const r=o.getArg(t,"line");const s=o.getArg(t,"column");if(r<l.line||r===l.line&&s<l.column){throw new Error("Section offsets must be ordered and non-overlapping.")}l=t;const i=new SourceMapConsumer(o.getArg(e,"map"),n);return i.then(e=>{return{generatedOffset:{generatedLine:r+1,generatedColumn:s+1},consumer:e}})})).then(e=>{t._sections=e;return t})})}get _generatedMappings(){if(!this.__generatedMappings){this._sortGeneratedMappings()}return this.__generatedMappings}get _originalMappings(){if(!this.__originalMappings){this._sortOriginalMappings()}return this.__originalMappings}get _generatedMappingsUnsorted(){if(!this.__generatedMappingsUnsorted){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappingsUnsorted}get _originalMappingsUnsorted(){if(!this.__originalMappingsUnsorted){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappingsUnsorted}_sortGeneratedMappings(){const e=this._generatedMappingsUnsorted;e.sort(o.compareByGeneratedPositionsDeflated);this.__generatedMappings=e}_sortOriginalMappings(){const e=this._originalMappingsUnsorted;e.sort(o.compareByOriginalPositions);this.__originalMappings=e}get sources(){const e=[];for(let n=0;n<this._sections.length;n++){for(let t=0;t<this._sections[n].consumer.sources.length;t++){e.push(this._sections[n].consumer.sources[t])}}return e}originalPositionFor(e){const n={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")};const t=s.search(n,this._sections,function(e,n){const t=e.generatedLine-n.generatedOffset.generatedLine;if(t){return t}return e.generatedColumn-n.generatedOffset.generatedColumn});const r=this._sections[t];if(!r){return{source:null,line:null,column:null,name:null}}return r.consumer.originalPositionFor({line:n.generatedLine-(r.generatedOffset.generatedLine-1),column:n.generatedColumn-(r.generatedOffset.generatedLine===n.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias})}hasContentsOfAllSources(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})}sourceContentFor(e,n){for(let n=0;n<this._sections.length;n++){const t=this._sections[n];const r=t.consumer.sourceContentFor(e,true);if(r){return r}}if(n){return null}throw new Error('"'+e+'" is not in the SourceMap.')}generatedPositionFor(e){for(let n=0;n<this._sections.length;n++){const t=this._sections[n];if(t.consumer._findSourceIndex(o.getArg(e,"source"))===-1){continue}const r=t.consumer.generatedPositionFor(e);if(r){const e={line:r.line+(t.generatedOffset.generatedLine-1),column:r.column+(t.generatedOffset.generatedLine===r.line?t.generatedOffset.generatedColumn-1:0)};return e}}return{line:null,column:null}}_parseMappings(e,n){const t=this.__generatedMappingsUnsorted=[];const r=this.__originalMappingsUnsorted=[];for(let e=0;e<this._sections.length;e++){const n=this._sections[e];const s=[];n.consumer.eachMapping(e=>s.push(e));for(let e=0;e<s.length;e++){const i=s[e];let u=o.computeSourceURL(n.consumer.sourceRoot,null,this._sourceMapURL);this._sources.add(u);u=this._sources.indexOf(u);let l=null;if(i.name){this._names.add(i.name);l=this._names.indexOf(i.name)}const a={source:u,generatedLine:i.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:i.generatedColumn+(n.generatedOffset.generatedLine===i.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:i.originalLine,originalColumn:i.originalColumn,name:l};t.push(a);if(typeof a.originalLine==="number"){r.push(a)}}}}eachMapping(e,n,t){const r=n||null;const s=t||SourceMapConsumer.GENERATED_ORDER;let i;switch(s){case SourceMapConsumer.GENERATED_ORDER:i=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}const u=this.sourceRoot;i.map(function(e){let n=null;if(e.source!==null){n=this._sources.at(e.source);n=o.computeSourceURL(u,n,this._sourceMapURL)}return{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}},this).forEach(e,r)}_findMapping(e,n,t,r,o,i){if(e[t]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[t])}if(e[r]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[r])}return s.search(e,n,o,i)}allGeneratedPositionsFor(e){const n=o.getArg(e,"line");const t={source:o.getArg(e,"source"),originalLine:n,originalColumn:o.getArg(e,"column",0)};t.source=this._findSourceIndex(t.source);if(t.source<0){return[]}if(t.originalLine<1){throw new Error("Line numbers must be >= 1")}if(t.originalColumn<0){throw new Error("Column numbers must be >= 0")}const r=[];let i=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,s.LEAST_UPPER_BOUND);if(i>=0){let t=this._originalMappings[i];if(e.column===undefined){const e=t.originalLine;while(t&&t.originalLine===e){let e=t.lastGeneratedColumn;if(this._computedColumnSpans&&e===null){e=Infinity}r.push({line:o.getArg(t,"generatedLine",null),column:o.getArg(t,"generatedColumn",null),lastColumn:e});t=this._originalMappings[++i]}}else{const e=t.originalColumn;while(t&&t.originalLine===n&&t.originalColumn==e){let e=t.lastGeneratedColumn;if(this._computedColumnSpans&&e===null){e=Infinity}r.push({line:o.getArg(t,"generatedLine",null),column:o.getArg(t,"generatedColumn",null),lastColumn:e});t=this._originalMappings[++i]}}}return r}destroy(){for(let e=0;e<this._sections.length;e++){this._sections[e].consumer.destroy()}}}r=IndexedSourceMapConsumer;function _factory(e,n){let t=e;if(typeof e==="string"){t=o.parseSourceMapInput(e)}const r=t.sections!=null?new IndexedSourceMapConsumer(t,n):new BasicSourceMapConsumer(t,n);return Promise.resolve(r)}function _factoryBSM(e,n){return BasicSourceMapConsumer.fromSourceMap(e,n)}},425:(e,n,t)=>{const r=t(975);const o=t(344);const s=t(375).I;const i=t(817).H;class SourceMapGenerator{constructor(e){if(!e){e={}}this._file=o.getArg(e,"file",null);this._sourceRoot=o.getArg(e,"sourceRoot",null);this._skipValidation=o.getArg(e,"skipValidation",false);this._sources=new s;this._names=new s;this._mappings=new i;this._sourcesContents=null}static fromSourceMap(e){const n=e.sourceRoot;const t=new SourceMapGenerator({file:e.file,sourceRoot:n});e.eachMapping(function(e){const r={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){r.source=e.source;if(n!=null){r.source=o.relative(n,r.source)}r.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){r.name=e.name}}t.addMapping(r)});e.sources.forEach(function(r){let s=r;if(n!==null){s=o.relative(n,r)}if(!t._sources.has(s)){t._sources.add(s)}const i=e.sourceContentFor(r);if(i!=null){t.setSourceContent(r,i)}});return t}addMapping(e){const n=o.getArg(e,"generated");const t=o.getArg(e,"original",null);let r=o.getArg(e,"source",null);let s=o.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(n,t,r,s)}if(r!=null){r=String(r);if(!this._sources.has(r)){this._sources.add(r)}}if(s!=null){s=String(s);if(!this._names.has(s)){this._names.add(s)}}this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:t!=null&&t.line,originalColumn:t!=null&&t.column,source:r,name:s})}setSourceContent(e,n){let t=e;if(this._sourceRoot!=null){t=o.relative(this._sourceRoot,t)}if(n!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[o.toSetString(t)]=n}else if(this._sourcesContents){delete this._sourcesContents[o.toSetString(t)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}}applySourceMap(e,n,t){let r=n;if(n==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}r=e.file}const i=this._sourceRoot;if(i!=null){r=o.relative(i,r)}const u=this._mappings.toArray().length>0?new s:this._sources;const l=new s;this._mappings.unsortedForEach(function(n){if(n.source===r&&n.originalLine!=null){const r=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});if(r.source!=null){n.source=r.source;if(t!=null){n.source=o.join(t,n.source)}if(i!=null){n.source=o.relative(i,n.source)}n.originalLine=r.line;n.originalColumn=r.column;if(r.name!=null){n.name=r.name}}}const s=n.source;if(s!=null&&!u.has(s)){u.add(s)}const a=n.name;if(a!=null&&!l.has(a)){l.add(a)}},this);this._sources=u;this._names=l;e.sources.forEach(function(n){const r=e.sourceContentFor(n);if(r!=null){if(t!=null){n=o.join(t,n)}if(i!=null){n=o.relative(i,n)}this.setSourceContent(n,r)}},this)}_validateMapping(e,n,t,r){if(n&&typeof n.line!=="number"&&typeof n.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!n&&!t&&!r){}else if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&t){}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:t,original:n,name:r}))}}_serializeMappings(){let e=0;let n=1;let t=0;let s=0;let i=0;let u=0;let l="";let a;let c;let h;let f;const g=this._mappings.toArray();for(let p=0,m=g.length;p<m;p++){c=g[p];a="";if(c.generatedLine!==n){e=0;while(c.generatedLine!==n){a+=";";n++}}else if(p>0){if(!o.compareByGeneratedPositionsInflated(c,g[p-1])){continue}a+=","}a+=r.encode(c.generatedColumn-e);e=c.generatedColumn;if(c.source!=null){f=this._sources.indexOf(c.source);a+=r.encode(f-u);u=f;a+=r.encode(c.originalLine-1-s);s=c.originalLine-1;a+=r.encode(c.originalColumn-t);t=c.originalColumn;if(c.name!=null){h=this._names.indexOf(c.name);a+=r.encode(h-i);i=h}}l+=a}return l}_generateSourcesContent(e,n){return e.map(function(e){if(!this._sourcesContents){return null}if(n!=null){e=o.relative(n,e)}const t=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,t)?this._sourcesContents[t]:null},this)}toJSON(){const e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e}toString(){return JSON.stringify(this.toJSON())}}SourceMapGenerator.prototype._version=3;n.SourceMapGenerator=SourceMapGenerator},616:(e,n,t)=>{const r=t(425).SourceMapGenerator;const o=t(344);const s=/(\r?\n)/;const i=10;const u="$$$isSourceNode$$$";class SourceNode{constructor(e,n,t,r,o){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=n==null?null:n;this.source=t==null?null:t;this.name=o==null?null:o;this[u]=true;if(r!=null)this.add(r)}static fromStringWithSourceMap(e,n,t){const r=new SourceNode;const i=e.split(s);let u=0;const l=function(){const e=getNextLine();const n=getNextLine()||"";return e+n;function getNextLine(){return u<i.length?i[u++]:undefined}};let a=1,c=0;let h=null;let f;n.eachMapping(function(e){if(h!==null){if(a<e.generatedLine){addMappingWithCode(h,l());a++;c=0}else{f=i[u]||"";const n=f.substr(0,e.generatedColumn-c);i[u]=f.substr(e.generatedColumn-c);c=e.generatedColumn;addMappingWithCode(h,n);h=e;return}}while(a<e.generatedLine){r.add(l());a++}if(c<e.generatedColumn){f=i[u]||"";r.add(f.substr(0,e.generatedColumn));i[u]=f.substr(e.generatedColumn);c=e.generatedColumn}h=e},this);if(u<i.length){if(h){addMappingWithCode(h,l())}r.add(i.splice(u).join(""))}n.sources.forEach(function(e){const s=n.sourceContentFor(e);if(s!=null){if(t!=null){e=o.join(t,e)}r.setSourceContent(e,s)}});return r;function addMappingWithCode(e,n){if(e===null||e.source===undefined){r.add(n)}else{const s=t?o.join(t,e.source):e.source;r.add(new SourceNode(e.originalLine,e.originalColumn,s,n,e.name))}}}add(e){if(Array.isArray(e)){e.forEach(function(e){this.add(e)},this)}else if(e[u]||typeof e==="string"){if(e){this.children.push(e)}}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this}prepend(e){if(Array.isArray(e)){for(let n=e.length-1;n>=0;n--){this.prepend(e[n])}}else if(e[u]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this}walk(e){let n;for(let t=0,r=this.children.length;t<r;t++){n=this.children[t];if(n[u]){n.walk(e)}else if(n!==""){e(n,{source:this.source,line:this.line,column:this.column,name:this.name})}}}join(e){let n;let t;const r=this.children.length;if(r>0){n=[];for(t=0;t<r-1;t++){n.push(this.children[t]);n.push(e)}n.push(this.children[t]);this.children=n}return this}replaceRight(e,n){const t=this.children[this.children.length-1];if(t[u]){t.replaceRight(e,n)}else if(typeof t==="string"){this.children[this.children.length-1]=t.replace(e,n)}else{this.children.push("".replace(e,n))}return this}setSourceContent(e,n){this.sourceContents[o.toSetString(e)]=n}walkSourceContents(e){for(let n=0,t=this.children.length;n<t;n++){if(this.children[n][u]){this.children[n].walkSourceContents(e)}}const n=Object.keys(this.sourceContents);for(let t=0,r=n.length;t<r;t++){e(o.fromSetString(n[t]),this.sourceContents[n[t]])}}toString(){let e="";this.walk(function(n){e+=n});return e}toStringWithSourceMap(e){const n={code:"",line:1,column:0};const t=new r(e);let o=false;let s=null;let u=null;let l=null;let a=null;this.walk(function(e,r){n.code+=e;if(r.source!==null&&r.line!==null&&r.column!==null){if(s!==r.source||u!==r.line||l!==r.column||a!==r.name){t.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:n.line,column:n.column},name:r.name})}s=r.source;u=r.line;l=r.column;a=r.name;o=true}else if(o){t.addMapping({generated:{line:n.line,column:n.column}});s=null;o=false}for(let u=0,l=e.length;u<l;u++){if(e.charCodeAt(u)===i){n.line++;n.column=0;if(u+1===l){s=null;o=false}else if(o){t.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:n.line,column:n.column},name:r.name})}}else{n.column++}}});this.walkSourceContents(function(e,n){t.setSourceContent(e,n)});return{code:n.code,map:t}}}n.SourceNode=SourceNode},344:(e,n)=>{function getArg(e,n,t){if(n in e){return e[n]}else if(arguments.length===3){return t}throw new Error('"'+n+'" is a required argument.')}n.getArg=getArg;const t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;const r=/^data:.+\,.+$/;function urlParse(e){const n=e.match(t);if(!n){return null}return{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}}n.urlParse=urlParse;function urlGenerate(e){let n="";if(e.scheme){n+=e.scheme+":"}n+="//";if(e.auth){n+=e.auth+"@"}if(e.host){n+=e.host}if(e.port){n+=":"+e.port}if(e.path){n+=e.path}return n}n.urlGenerate=urlGenerate;const o=32;function lruMemoize(e){const n=[];return function(t){for(let e=0;e<n.length;e++){if(n[e].input===t){const t=n[0];n[0]=n[e];n[e]=t;return n[0].result}}const r=e(t);n.unshift({input:t,result:r});if(n.length>o){n.pop()}return r}}const s=lruMemoize(function normalize(e){let t=e;const r=urlParse(e);if(r){if(!r.path){return e}t=r.path}const o=n.isAbsolute(t);const s=[];let i=0;let u=0;while(true){i=u;u=t.indexOf("/",i);if(u===-1){s.push(t.slice(i));break}else{s.push(t.slice(i,u));while(u<t.length&&t[u]==="/"){u++}}}let l=0;for(u=s.length-1;u>=0;u--){const e=s[u];if(e==="."){s.splice(u,1)}else if(e===".."){l++}else if(l>0){if(e===""){s.splice(u+1,l);l=0}else{s.splice(u,2);l--}}}t=s.join("/");if(t===""){t=o?"/":"."}if(r){r.path=t;return urlGenerate(r)}return t});n.normalize=s;function join(e,n){if(e===""){e="."}if(n===""){n="."}const t=urlParse(n);const o=urlParse(e);if(o){e=o.path||"/"}if(t&&!t.scheme){if(o){t.scheme=o.scheme}return urlGenerate(t)}if(t||n.match(r)){return n}if(o&&!o.host&&!o.path){o.host=n;return urlGenerate(o)}const i=n.charAt(0)==="/"?n:s(e.replace(/\/+$/,"")+"/"+n);if(o){o.path=i;return urlGenerate(o)}return i}n.join=join;n.isAbsolute=function(e){return e.charAt(0)==="/"||t.test(e)};function relative(e,n){if(e===""){e="."}e=e.replace(/\/$/,"");let t=0;while(n.indexOf(e+"/")!==0){const r=e.lastIndexOf("/");if(r<0){return n}e=e.slice(0,r);if(e.match(/^([^\/]+:\/)?\/*$/)){return n}++t}return Array(t+1).join("../")+n.substr(e.length+1)}n.relative=relative;const i=function(){const e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}n.toSetString=i?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}n.fromSetString=i?identity:fromSetString;function isProtoString(e){if(!e){return false}const n=e.length;if(n<9){return false}if(e.charCodeAt(n-1)!==95||e.charCodeAt(n-2)!==95||e.charCodeAt(n-3)!==111||e.charCodeAt(n-4)!==116||e.charCodeAt(n-5)!==111||e.charCodeAt(n-6)!==114||e.charCodeAt(n-7)!==112||e.charCodeAt(n-8)!==95||e.charCodeAt(n-9)!==95){return false}for(let t=n-10;t>=0;t--){if(e.charCodeAt(t)!==36){return false}}return true}function compareByOriginalPositions(e,n,t){let r=strcmp(e.source,n.source);if(r!==0){return r}r=e.originalLine-n.originalLine;if(r!==0){return r}r=e.originalColumn-n.originalColumn;if(r!==0||t){return r}r=e.generatedColumn-n.generatedColumn;if(r!==0){return r}r=e.generatedLine-n.generatedLine;if(r!==0){return r}return strcmp(e.name,n.name)}n.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,n,t){let r=e.generatedLine-n.generatedLine;if(r!==0){return r}r=e.generatedColumn-n.generatedColumn;if(r!==0||t){return r}r=strcmp(e.source,n.source);if(r!==0){return r}r=e.originalLine-n.originalLine;if(r!==0){return r}r=e.originalColumn-n.originalColumn;if(r!==0){return r}return strcmp(e.name,n.name)}n.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,n){if(e===n){return 0}if(e===null){return 1}if(n===null){return-1}if(e>n){return 1}return-1}function compareByGeneratedPositionsInflated(e,n){let t=e.generatedLine-n.generatedLine;if(t!==0){return t}t=e.generatedColumn-n.generatedColumn;if(t!==0){return t}t=strcmp(e.source,n.source);if(t!==0){return t}t=e.originalLine-n.originalLine;if(t!==0){return t}t=e.originalColumn-n.originalColumn;if(t!==0){return t}return strcmp(e.name,n.name)}n.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}n.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,n,t){n=n||"";if(e){if(e[e.length-1]!=="/"&&n[0]!=="/"){e+="/"}n=e+n}if(t){const e=urlParse(t);if(!e){throw new Error("sourceMapURL could not be parsed")}if(e.path){const n=e.path.lastIndexOf("/");if(n>=0){e.path=e.path.substring(0,n+1)}}n=join(urlGenerate(e),n)}return s(n)}n.computeSourceURL=computeSourceURL},796:(e,n,t)=>{const r=t(587);function Mapping(){this.generatedLine=0;this.generatedColumn=0;this.lastGeneratedColumn=null;this.source=null;this.originalLine=null;this.originalColumn=null;this.name=null}let o=null;e.exports=function wasm(){if(o){return o}const e=[];o=r().then(n=>{return WebAssembly.instantiate(n,{env:{mapping_callback(n,t,r,o,s,i,u,l,a,c){const h=new Mapping;h.generatedLine=n+1;h.generatedColumn=t;if(r){h.lastGeneratedColumn=o-1}if(s){h.source=i;h.originalLine=u+1;h.originalColumn=l;if(a){h.name=c}}e[e.length-1](h)},start_all_generated_locations_for(){console.time("all_generated_locations_for")},end_all_generated_locations_for(){console.timeEnd("all_generated_locations_for")},start_compute_column_spans(){console.time("compute_column_spans")},end_compute_column_spans(){console.timeEnd("compute_column_spans")},start_generated_location_for(){console.time("generated_location_for")},end_generated_location_for(){console.timeEnd("generated_location_for")},start_original_location_for(){console.time("original_location_for")},end_original_location_for(){console.timeEnd("original_location_for")},start_parse_mappings(){console.time("parse_mappings")},end_parse_mappings(){console.timeEnd("parse_mappings")},start_sort_by_generated_location(){console.time("sort_by_generated_location")},end_sort_by_generated_location(){console.timeEnd("sort_by_generated_location")},start_sort_by_original_location(){console.time("sort_by_original_location")},end_sort_by_original_location(){console.timeEnd("sort_by_original_location")}}})}).then(n=>{return{exports:n.instance.exports,withMappingCallback:(n,t)=>{e.push(n);try{t()}finally{e.pop()}}}}).then(null,e=>{o=null;throw e});return o}},594:(e,n,t)=>{n.SourceMapGenerator=t(425).SourceMapGenerator;n.SourceMapConsumer=t(155).SourceMapConsumer;n.SourceNode=t(616).SourceNode},747:e=>{"use strict";e.exports=require("fs")},622:e=>{"use strict";e.exports=require("path")}};var n={};function __nccwpck_require__(t){if(n[t]){return n[t].exports}var r=n[t]={exports:{}};var o=true;try{e[t](r,r.exports,__nccwpck_require__);o=false}finally{if(o)delete n[t]}return r.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(594)})();