UNPKG

csound-wasm

Version:

[![npm version](https://badge.fury.io/js/csound-wasm.svg)](https://badge.fury.io/js/csound-wasm)

1 lines 3.15 MB
function A(A){return window.atob(A)}const t=Symbol("Comlink.proxy"),e=Symbol("Comlink.endpoint"),n=Symbol("Comlink.releaseProxy"),r=Symbol("Comlink.thrown"),i=A=>"object"==typeof A&&null!==A||"function"==typeof A,o=new Map([["proxy",{canHandle:A=>i(A)&&A[t],serialize(A){const{port1:e,port2:n}=new MessageChannel;return function A(e,n=self){n.addEventListener("message",(function i(o){if(!o||!o.data)return;const{id:a,type:g,path:u}=Object.assign({path:[]},o.data),I=(o.data.argumentList||[]).map(h);let f;try{const n=u.slice(0,-1).reduce((A,t)=>A[t],e),r=u.reduce((A,t)=>A[t],e);switch(g){case 0:f=r;break;case 1:n[u.slice(-1)[0]]=h(o.data.value),f=!0;break;case 2:f=r.apply(n,I);break;case 3:f=function(A){return Object.assign(A,{[t]:!0})}(new r(...I));break;case 4:{const{port1:t,port2:n}=new MessageChannel;A(e,n),f=function(A,t){return c.set(A,t),A}(t,[t])}break;case 5:f=void 0}}catch(A){f={value:A,[r]:0}}Promise.resolve(f).catch(A=>({value:A,[r]:0})).then(A=>{const[t,e]=l(A);n.postMessage(Object.assign(Object.assign({},t),{id:a}),e),5===g&&(n.removeEventListener("message",i),s(n))})})),n.start&&n.start()}(A,e),[n,[n]]},deserialize:A=>(A.start(),a(A))}],["throw",{canHandle:A=>i(A)&&r in A,serialize({value:A}){let t;return t=A instanceof Error?{isError:!0,value:{message:A.message,name:A.name,stack:A.stack}}:{isError:!1,value:A},[t,[]]},deserialize(A){if(A.isError)throw Object.assign(new Error(A.value.message),A.value);throw A.value}}]]);function s(A){(function(A){return"MessagePort"===A.constructor.name})(A)&&A.close()}function a(A,t){return function A(t,r=[],i=function(){}){let o=!1;const a=new Proxy(i,{get(e,i){if(g(o),i===n)return()=>I(t,{type:5,path:r.map(A=>A.toString())}).then(()=>{s(t),o=!0});if("then"===i){if(0===r.length)return{then:()=>a};const A=I(t,{type:0,path:r.map(A=>A.toString())}).then(h);return A.then.bind(A)}return A(t,[...r,i])},set(A,e,n){g(o);const[i,s]=l(n);return I(t,{type:1,path:[...r,e].map(A=>A.toString()),value:i},s).then(h)},apply(n,i,s){g(o);const a=r[r.length-1];if(a===e)return I(t,{type:4}).then(h);if("bind"===a)return A(t,r.slice(0,-1));const[c,l]=u(s);return I(t,{type:2,path:r.map(A=>A.toString()),argumentList:c},l).then(h)},construct(A,e){g(o);const[n,i]=u(e);return I(t,{type:3,path:r.map(A=>A.toString()),argumentList:n},i).then(h)}});return a}(A,[],t)}function g(A){if(A)throw new Error("Proxy has been released and is not useable")}function u(A){const t=A.map(l);return[t.map(A=>A[0]),(e=t.map(A=>A[1]),Array.prototype.concat.apply([],e))];var e}const c=new WeakMap;function l(A){for(const[t,e]of o)if(e.canHandle(A)){const[n,r]=e.serialize(A);return[{type:3,name:t,value:n},r]}return[{type:0,value:A},c.get(A)||[]]}function h(A){switch(A.type){case 3:return o.get(A.name).deserialize(A.value);case 0:return A.value}}function I(A,t,e){return new Promise(n=>{const r=new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");A.addEventListener("message",(function t(e){e.data&&e.data.id&&e.data.id===r&&(A.removeEventListener("message",t),n(e.data))})),A.start&&A.start(),A.postMessage(Object.assign({id:r},t),e)})}var f="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function C(){throw new Error("setTimeout has not been defined")}function B(){throw new Error("clearTimeout has not been defined")}var p=C,d=B;function E(A){if(p===setTimeout)return setTimeout(A,0);if((p===C||!p)&&setTimeout)return p=setTimeout,setTimeout(A,0);try{return p(A,0)}catch(t){try{return p.call(null,A,0)}catch(t){return p.call(this,A,0)}}}"function"==typeof f.setTimeout&&(p=setTimeout),"function"==typeof f.clearTimeout&&(d=clearTimeout);var Q,m=[],y=!1,b=-1;function w(){y&&Q&&(y=!1,Q.length?m=Q.concat(m):b=-1,m.length&&G())}function G(){if(!y){var A=E(w);y=!0;for(var t=m.length;t;){for(Q=m,m=[];++b<t;)Q&&Q[b].run();b=-1,t=m.length}Q=null,y=!1,function(A){if(d===clearTimeout)return clearTimeout(A);if((d===B||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(A);try{d(A)}catch(t){try{return d.call(null,A)}catch(t){return d.call(this,A)}}}(A)}}function v(A,t){this.fun=A,this.array=t}v.prototype.run=function(){this.fun.apply(null,this.array)};function Z(){}var D=Z,N=Z,Y=Z,k=Z,R=Z,M=Z,S=Z;var F=f.performance||{},W=F.now||F.mozNow||F.msNow||F.oNow||F.webkitNow||function(){return(new Date).getTime()};var J=new Date;var L={nextTick:function(A){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];m.push(new v(A,t)),1!==m.length||y||E(G)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:D,addListener:N,once:Y,off:k,removeListener:R,removeAllListeners:M,emit:S,binding:function(A){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(A){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(A){var t=.001*W.call(F),e=Math.floor(t),n=Math.floor(t%1*1e9);return A&&(e-=A[0],(n-=A[1])<0&&(e--,n+=1e9)),[e,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-J)/1e3}},X="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function j(A,t,e){return A(e={path:t,exports:{},require:function(A,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&e.path)}},e.exports),e.exports}var U="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),O=function(A){if(0<=A&&A<U.length)return U[A];throw new TypeError("Must be between 0 and 63: "+A)},x=function(A){return 65<=A&&A<=90?A-65:97<=A&&A<=122?A-97+26:48<=A&&A<=57?A-48+52:43==A?62:47==A?63:-1};var T=function(A){var t,e="",n=function(A){return A<0?1+(-A<<1):0+(A<<1)}(A);do{t=31&n,(n>>>=5)>0&&(t|=32),e+=O(t)}while(n>0);return e},V=function(A,t,e){var n,r,i,o,s=A.length,a=0,g=0;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(r=x(A.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+A.charAt(t-1));n=!!(32&r),a+=(r&=31)<<g,g+=5}while(n);e.value=(o=(i=a)>>1,1==(1&i)?-o:o),e.rest=t},z=j((function(A,t){t.getArg=function(A,t,e){if(t in A)return A[t];if(3===arguments.length)return e;throw new Error('"'+t+'" is a required argument.')};var e=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function r(A){var t=A.match(e);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(A){var t="";return A.scheme&&(t+=A.scheme+":"),t+="//",A.auth&&(t+=A.auth+"@"),A.host&&(t+=A.host),A.port&&(t+=":"+A.port),A.path&&(t+=A.path),t}function o(A){var e=A,n=r(A);if(n){if(!n.path)return A;e=n.path}for(var o,s=t.isAbsolute(e),a=e.split(/\/+/),g=0,u=a.length-1;u>=0;u--)"."===(o=a[u])?a.splice(u,1):".."===o?g++:g>0&&(""===o?(a.splice(u+1,g),g=0):(a.splice(u,2),g--));return""===(e=a.join("/"))&&(e=s?"/":"."),n?(n.path=e,i(n)):e}function s(A,t){""===A&&(A="."),""===t&&(t=".");var e=r(t),s=r(A);if(s&&(A=s.path||"/"),e&&!e.scheme)return s&&(e.scheme=s.scheme),i(e);if(e||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,i(s);var a="/"===t.charAt(0)?t:o(A.replace(/\/+$/,"")+"/"+t);return s?(s.path=a,i(s)):a}t.urlParse=r,t.urlGenerate=i,t.normalize=o,t.join=s,t.isAbsolute=function(A){return"/"===A.charAt(0)||e.test(A)},t.relative=function(A,t){""===A&&(A="."),A=A.replace(/\/$/,"");for(var e=0;0!==t.indexOf(A+"/");){var n=A.lastIndexOf("/");if(n<0)return t;if((A=A.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++e}return Array(e+1).join("../")+t.substr(A.length+1)};var a=!("__proto__"in Object.create(null));function g(A){return A}function u(A){if(!A)return!1;var t=A.length;if(t<9)return!1;if(95!==A.charCodeAt(t-1)||95!==A.charCodeAt(t-2)||111!==A.charCodeAt(t-3)||116!==A.charCodeAt(t-4)||111!==A.charCodeAt(t-5)||114!==A.charCodeAt(t-6)||112!==A.charCodeAt(t-7)||95!==A.charCodeAt(t-8)||95!==A.charCodeAt(t-9))return!1;for(var e=t-10;e>=0;e--)if(36!==A.charCodeAt(e))return!1;return!0}function c(A,t){return A===t?0:null===A?1:null===t?-1:A>t?1:-1}t.toSetString=a?g:function(A){return u(A)?"$"+A:A},t.fromSetString=a?g:function(A){return u(A)?A.slice(1):A},t.compareByOriginalPositions=function(A,t,e){var n=c(A.source,t.source);return 0!==n||0!==(n=A.originalLine-t.originalLine)||0!==(n=A.originalColumn-t.originalColumn)||e||0!==(n=A.generatedColumn-t.generatedColumn)||0!==(n=A.generatedLine-t.generatedLine)?n:c(A.name,t.name)},t.compareByGeneratedPositionsDeflated=function(A,t,e){var n=A.generatedLine-t.generatedLine;return 0!==n||0!==(n=A.generatedColumn-t.generatedColumn)||e||0!==(n=c(A.source,t.source))||0!==(n=A.originalLine-t.originalLine)||0!==(n=A.originalColumn-t.originalColumn)?n:c(A.name,t.name)},t.compareByGeneratedPositionsInflated=function(A,t){var e=A.generatedLine-t.generatedLine;return 0!==e||0!==(e=A.generatedColumn-t.generatedColumn)||0!==(e=c(A.source,t.source))||0!==(e=A.originalLine-t.originalLine)||0!==(e=A.originalColumn-t.originalColumn)?e:c(A.name,t.name)},t.parseSourceMapInput=function(A){return JSON.parse(A.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(A,t,e){if(t=t||"",A&&("/"!==A[A.length-1]&&"/"!==t[0]&&(A+="/"),t=A+t),e){var n=r(e);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var a=n.path.lastIndexOf("/");a>=0&&(n.path=n.path.substring(0,a+1))}t=s(i(n),t)}return o(t)}})),H=Object.prototype.hasOwnProperty,P="undefined"!=typeof Map;function K(){this._array=[],this._set=P?new Map:Object.create(null)}K.fromArray=function(A,t){for(var e=new K,n=0,r=A.length;n<r;n++)e.add(A[n],t);return e},K.prototype.size=function(){return P?this._set.size:Object.getOwnPropertyNames(this._set).length},K.prototype.add=function(A,t){var e=P?A:z.toSetString(A),n=P?this.has(A):H.call(this._set,e),r=this._array.length;n&&!t||this._array.push(A),n||(P?this._set.set(A,r):this._set[e]=r)},K.prototype.has=function(A){if(P)return this._set.has(A);var t=z.toSetString(A);return H.call(this._set,t)},K.prototype.indexOf=function(A){if(P){var t=this._set.get(A);if(t>=0)return t}else{var e=z.toSetString(A);if(H.call(this._set,e))return this._set[e]}throw new Error('"'+A+'" is not in the set.')},K.prototype.at=function(A){if(A>=0&&A<this._array.length)return this._array[A];throw new Error("No element indexed by "+A)},K.prototype.toArray=function(){return this._array.slice()};var q={ArraySet:K};function _(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}_.prototype.unsortedForEach=function(A,t){this._array.forEach(A,t)},_.prototype.add=function(A){var t,e,n,r,i,o;t=this._last,e=A,n=t.generatedLine,r=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn,r>n||r==n&&o>=i||z.compareByGeneratedPositionsInflated(t,e)<=0?(this._last=A,this._array.push(A)):(this._sorted=!1,this._array.push(A))},_.prototype.toArray=function(){return this._sorted||(this._array.sort(z.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};var $=q.ArraySet,AA={MappingList:_}.MappingList;function tA(A){A||(A={}),this._file=z.getArg(A,"file",null),this._sourceRoot=z.getArg(A,"sourceRoot",null),this._skipValidation=z.getArg(A,"skipValidation",!1),this._sources=new $,this._names=new $,this._mappings=new AA,this._sourcesContents=null}tA.prototype._version=3,tA.fromSourceMap=function(A){var t=A.sourceRoot,e=new tA({file:A.file,sourceRoot:t});return A.eachMapping((function(A){var n={generated:{line:A.generatedLine,column:A.generatedColumn}};null!=A.source&&(n.source=A.source,null!=t&&(n.source=z.relative(t,n.source)),n.original={line:A.originalLine,column:A.originalColumn},null!=A.name&&(n.name=A.name)),e.addMapping(n)})),A.sources.forEach((function(n){var r=n;null!==t&&(r=z.relative(t,n)),e._sources.has(r)||e._sources.add(r);var i=A.sourceContentFor(n);null!=i&&e.setSourceContent(n,i)})),e},tA.prototype.addMapping=function(A){var t=z.getArg(A,"generated"),e=z.getArg(A,"original",null),n=z.getArg(A,"source",null),r=z.getArg(A,"name",null);this._skipValidation||this._validateMapping(t,e,n,r),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=r&&(r=String(r),this._names.has(r)||this._names.add(r)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=e&&e.line,originalColumn:null!=e&&e.column,source:n,name:r})},tA.prototype.setSourceContent=function(A,t){var e=A;null!=this._sourceRoot&&(e=z.relative(this._sourceRoot,e)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[z.toSetString(e)]=t):this._sourcesContents&&(delete this._sourcesContents[z.toSetString(e)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},tA.prototype.applySourceMap=function(A,t,e){var n=t;if(null==t){if(null==A.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=A.file}var r=this._sourceRoot;null!=r&&(n=z.relative(r,n));var i=new $,o=new $;this._mappings.unsortedForEach((function(t){if(t.source===n&&null!=t.originalLine){var s=A.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=e&&(t.source=z.join(e,t.source)),null!=r&&(t.source=z.relative(r,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name))}var a=t.source;null==a||i.has(a)||i.add(a);var g=t.name;null==g||o.has(g)||o.add(g)}),this),this._sources=i,this._names=o,A.sources.forEach((function(t){var n=A.sourceContentFor(t);null!=n&&(null!=e&&(t=z.join(e,t)),null!=r&&(t=z.relative(r,t)),this.setSourceContent(t,n))}),this)},tA.prototype._validateMapping=function(A,t,e,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)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((!(A&&"line"in A&&"column"in A&&A.line>0&&A.column>=0)||t||e||n)&&!(A&&"line"in A&&"column"in A&&t&&"line"in t&&"column"in t&&A.line>0&&A.column>=0&&t.line>0&&t.column>=0&&e))throw new Error("Invalid mapping: "+JSON.stringify({generated:A,source:e,original:t,name:n}))},tA.prototype._serializeMappings=function(){for(var A,t,e,n,r=0,i=1,o=0,s=0,a=0,g=0,u="",c=this._mappings.toArray(),l=0,h=c.length;l<h;l++){if(A="",(t=c[l]).generatedLine!==i)for(r=0;t.generatedLine!==i;)A+=";",i++;else if(l>0){if(!z.compareByGeneratedPositionsInflated(t,c[l-1]))continue;A+=","}A+=T(t.generatedColumn-r),r=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),A+=T(n-g),g=n,A+=T(t.originalLine-1-s),s=t.originalLine-1,A+=T(t.originalColumn-o),o=t.originalColumn,null!=t.name&&(e=this._names.indexOf(t.name),A+=T(e-a),a=e)),u+=A}return u},tA.prototype._generateSourcesContent=function(A,t){return A.map((function(A){if(!this._sourcesContents)return null;null!=t&&(A=z.relative(t,A));var e=z.toSetString(A);return Object.prototype.hasOwnProperty.call(this._sourcesContents,e)?this._sourcesContents[e]:null}),this)},tA.prototype.toJSON=function(){var A={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(A.file=this._file),null!=this._sourceRoot&&(A.sourceRoot=this._sourceRoot),this._sourcesContents&&(A.sourcesContent=this._generateSourcesContent(A.sources,A.sourceRoot)),A},tA.prototype.toString=function(){return JSON.stringify(this.toJSON())};var eA={SourceMapGenerator:tA},nA=j((function(A,t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(A,e,n,r){if(0===e.length)return-1;var i=function A(e,n,r,i,o,s){var a=Math.floor((n-e)/2)+e,g=o(r,i[a],!0);return 0===g?a:g>0?n-a>1?A(a,n,r,i,o,s):s==t.LEAST_UPPER_BOUND?n<i.length?n:-1:a:a-e>1?A(e,a,r,i,o,s):s==t.LEAST_UPPER_BOUND?a:e<0?-1:e}(-1,e.length,A,e,n,r||t.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===n(e[i],e[i-1],!0);)--i;return i}}));function rA(A,t,e){var n=A[t];A[t]=A[e],A[e]=n}function iA(A,t,e,n){if(e<n){var r=e-1;rA(A,(a=e,g=n,Math.round(a+Math.random()*(g-a))),n);for(var i=A[n],o=e;o<n;o++)t(A[o],i)<=0&&rA(A,r+=1,o);rA(A,r+1,o);var s=r+1;iA(A,t,e,s-1),iA(A,t,s+1,n)}var a,g}var oA=q.ArraySet,sA=function(A,t){iA(A,t,0,A.length-1)};function aA(A,t){var e=A;return"string"==typeof A&&(e=z.parseSourceMapInput(A)),null!=e.sections?new hA(e,t):new uA(e,t)}aA.fromSourceMap=function(A,t){return uA.fromSourceMap(A,t)},aA.prototype._version=3,aA.prototype.__generatedMappings=null,Object.defineProperty(aA.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),aA.prototype.__originalMappings=null,Object.defineProperty(aA.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),aA.prototype._charIsMappingSeparator=function(A,t){var e=A.charAt(t);return";"===e||","===e},aA.prototype._parseMappings=function(A,t){throw new Error("Subclasses must implement _parseMappings")},aA.GENERATED_ORDER=1,aA.ORIGINAL_ORDER=2,aA.GREATEST_LOWER_BOUND=1,aA.LEAST_UPPER_BOUND=2,aA.prototype.eachMapping=function(A,t,e){var n,r=t||null;switch(e||aA.GENERATED_ORDER){case aA.GENERATED_ORDER:n=this._generatedMappings;break;case aA.ORIGINAL_ORDER:n=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var i=this.sourceRoot;n.map((function(A){var t=null===A.source?null:this._sources.at(A.source);return{source:t=z.computeSourceURL(i,t,this._sourceMapURL),generatedLine:A.generatedLine,generatedColumn:A.generatedColumn,originalLine:A.originalLine,originalColumn:A.originalColumn,name:null===A.name?null:this._names.at(A.name)}}),this).forEach(A,r)},aA.prototype.allGeneratedPositionsFor=function(A){var t=z.getArg(A,"line"),e={source:z.getArg(A,"source"),originalLine:t,originalColumn:z.getArg(A,"column",0)};if(e.source=this._findSourceIndex(e.source),e.source<0)return[];var n=[],r=this._findMapping(e,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,nA.LEAST_UPPER_BOUND);if(r>=0){var i=this._originalMappings[r];if(void 0===A.column)for(var o=i.originalLine;i&&i.originalLine===o;)n.push({line:z.getArg(i,"generatedLine",null),column:z.getArg(i,"generatedColumn",null),lastColumn:z.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++r];else for(var s=i.originalColumn;i&&i.originalLine===t&&i.originalColumn==s;)n.push({line:z.getArg(i,"generatedLine",null),column:z.getArg(i,"generatedColumn",null),lastColumn:z.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++r]}return n};var gA=aA;function uA(A,t){var e=A;"string"==typeof A&&(e=z.parseSourceMapInput(A));var n=z.getArg(e,"version"),r=z.getArg(e,"sources"),i=z.getArg(e,"names",[]),o=z.getArg(e,"sourceRoot",null),s=z.getArg(e,"sourcesContent",null),a=z.getArg(e,"mappings"),g=z.getArg(e,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=z.normalize(o)),r=r.map(String).map(z.normalize).map((function(A){return o&&z.isAbsolute(o)&&z.isAbsolute(A)?z.relative(o,A):A})),this._names=oA.fromArray(i.map(String),!0),this._sources=oA.fromArray(r,!0),this._absoluteSources=this._sources.toArray().map((function(A){return z.computeSourceURL(o,A,t)})),this.sourceRoot=o,this.sourcesContent=s,this._mappings=a,this._sourceMapURL=t,this.file=g}function cA(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}uA.prototype=Object.create(aA.prototype),uA.prototype.consumer=aA,uA.prototype._findSourceIndex=function(A){var t,e=A;if(null!=this.sourceRoot&&(e=z.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==A)return t;return-1},uA.fromSourceMap=function(A,t){var e=Object.create(uA.prototype),n=e._names=oA.fromArray(A._names.toArray(),!0),r=e._sources=oA.fromArray(A._sources.toArray(),!0);e.sourceRoot=A._sourceRoot,e.sourcesContent=A._generateSourcesContent(e._sources.toArray(),e.sourceRoot),e.file=A._file,e._sourceMapURL=t,e._absoluteSources=e._sources.toArray().map((function(A){return z.computeSourceURL(e.sourceRoot,A,t)}));for(var i=A._mappings.toArray().slice(),o=e.__generatedMappings=[],s=e.__originalMappings=[],a=0,g=i.length;a<g;a++){var u=i[a],c=new cA;c.generatedLine=u.generatedLine,c.generatedColumn=u.generatedColumn,u.source&&(c.source=r.indexOf(u.source),c.originalLine=u.originalLine,c.originalColumn=u.originalColumn,u.name&&(c.name=n.indexOf(u.name)),s.push(c)),o.push(c)}return sA(e.__originalMappings,z.compareByOriginalPositions),e},uA.prototype._version=3,Object.defineProperty(uA.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),uA.prototype._parseMappings=function(A,t){for(var e,n,r,i,o,s=1,a=0,g=0,u=0,c=0,l=0,h=A.length,I=0,f={},C={},B=[],p=[];I<h;)if(";"===A.charAt(I))s++,I++,a=0;else if(","===A.charAt(I))I++;else{for((e=new cA).generatedLine=s,i=I;i<h&&!this._charIsMappingSeparator(A,i);i++);if(r=f[n=A.slice(I,i)])I+=n.length;else{for(r=[];I<i;)V(A,I,C),o=C.value,I=C.rest,r.push(o);if(2===r.length)throw new Error("Found a source, but no line and column");if(3===r.length)throw new Error("Found a source and line, but no column");f[n]=r}e.generatedColumn=a+r[0],a=e.generatedColumn,r.length>1&&(e.source=c+r[1],c+=r[1],e.originalLine=g+r[2],g=e.originalLine,e.originalLine+=1,e.originalColumn=u+r[3],u=e.originalColumn,r.length>4&&(e.name=l+r[4],l+=r[4])),p.push(e),"number"==typeof e.originalLine&&B.push(e)}sA(p,z.compareByGeneratedPositionsDeflated),this.__generatedMappings=p,sA(B,z.compareByOriginalPositions),this.__originalMappings=B},uA.prototype._findMapping=function(A,t,e,n,r,i){if(A[e]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+A[e]);if(A[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+A[n]);return nA.search(A,t,r,i)},uA.prototype.computeColumnSpans=function(){for(var A=0;A<this._generatedMappings.length;++A){var t=this._generatedMappings[A];if(A+1<this._generatedMappings.length){var e=this._generatedMappings[A+1];if(t.generatedLine===e.generatedLine){t.lastGeneratedColumn=e.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},uA.prototype.originalPositionFor=function(A){var t={generatedLine:z.getArg(A,"line"),generatedColumn:z.getArg(A,"column")},e=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",z.compareByGeneratedPositionsDeflated,z.getArg(A,"bias",aA.GREATEST_LOWER_BOUND));if(e>=0){var n=this._generatedMappings[e];if(n.generatedLine===t.generatedLine){var r=z.getArg(n,"source",null);null!==r&&(r=this._sources.at(r),r=z.computeSourceURL(this.sourceRoot,r,this._sourceMapURL));var i=z.getArg(n,"name",null);return null!==i&&(i=this._names.at(i)),{source:r,line:z.getArg(n,"originalLine",null),column:z.getArg(n,"originalColumn",null),name:i}}}return{source:null,line:null,column:null,name:null}},uA.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(A){return null==A})))},uA.prototype.sourceContentFor=function(A,t){if(!this.sourcesContent)return null;var e=this._findSourceIndex(A);if(e>=0)return this.sourcesContent[e];var n,r=A;if(null!=this.sourceRoot&&(r=z.relative(this.sourceRoot,r)),null!=this.sourceRoot&&(n=z.urlParse(this.sourceRoot))){var i=r.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!n.path||"/"==n.path)&&this._sources.has("/"+r))return this.sourcesContent[this._sources.indexOf("/"+r)]}if(t)return null;throw new Error('"'+r+'" is not in the SourceMap.')},uA.prototype.generatedPositionFor=function(A){var t=z.getArg(A,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var e={source:t,originalLine:z.getArg(A,"line"),originalColumn:z.getArg(A,"column")},n=this._findMapping(e,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,z.getArg(A,"bias",aA.GREATEST_LOWER_BOUND));if(n>=0){var r=this._originalMappings[n];if(r.source===e.source)return{line:z.getArg(r,"generatedLine",null),column:z.getArg(r,"generatedColumn",null),lastColumn:z.getArg(r,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};var lA=uA;function hA(A,t){var e=A;"string"==typeof A&&(e=z.parseSourceMapInput(A));var n=z.getArg(e,"version"),r=z.getArg(e,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new oA,this._names=new oA;var i={line:-1,column:0};this._sections=r.map((function(A){if(A.url)throw new Error("Support for url field in sections not implemented.");var e=z.getArg(A,"offset"),n=z.getArg(e,"line"),r=z.getArg(e,"column");if(n<i.line||n===i.line&&r<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=e,{generatedOffset:{generatedLine:n+1,generatedColumn:r+1},consumer:new aA(z.getArg(A,"map"),t)}}))}hA.prototype=Object.create(aA.prototype),hA.prototype.constructor=aA,hA.prototype._version=3,Object.defineProperty(hA.prototype,"sources",{get:function(){for(var A=[],t=0;t<this._sections.length;t++)for(var e=0;e<this._sections[t].consumer.sources.length;e++)A.push(this._sections[t].consumer.sources[e]);return A}}),hA.prototype.originalPositionFor=function(A){var t={generatedLine:z.getArg(A,"line"),generatedColumn:z.getArg(A,"column")},e=nA.search(t,this._sections,(function(A,t){var e=A.generatedLine-t.generatedOffset.generatedLine;return e||A.generatedColumn-t.generatedOffset.generatedColumn})),n=this._sections[e];return n?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:A.bias}):{source:null,line:null,column:null,name:null}},hA.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(A){return A.consumer.hasContentsOfAllSources()}))},hA.prototype.sourceContentFor=function(A,t){for(var e=0;e<this._sections.length;e++){var n=this._sections[e].consumer.sourceContentFor(A,!0);if(n)return n}if(t)return null;throw new Error('"'+A+'" is not in the SourceMap.')},hA.prototype.generatedPositionFor=function(A){for(var t=0;t<this._sections.length;t++){var e=this._sections[t];if(-1!==e.consumer._findSourceIndex(z.getArg(A,"source"))){var n=e.consumer.generatedPositionFor(A);if(n)return{line:n.line+(e.generatedOffset.generatedLine-1),column:n.column+(e.generatedOffset.generatedLine===n.line?e.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},hA.prototype._parseMappings=function(A,t){this.__generatedMappings=[],this.__originalMappings=[];for(var e=0;e<this._sections.length;e++)for(var n=this._sections[e],r=n.consumer._generatedMappings,i=0;i<r.length;i++){var o=r[i],s=n.consumer._sources.at(o.source);s=z.computeSourceURL(n.consumer.sourceRoot,s,this._sourceMapURL),this._sources.add(s),s=this._sources.indexOf(s);var a=null;o.name&&(a=n.consumer._names.at(o.name),this._names.add(a),a=this._names.indexOf(a));var g={source:s,generatedLine:o.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(n.generatedOffset.generatedLine===o.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:a};this.__generatedMappings.push(g),"number"==typeof g.originalLine&&this.__originalMappings.push(g)}sA(this.__generatedMappings,z.compareByGeneratedPositionsDeflated),sA(this.__originalMappings,z.compareByOriginalPositions)};var IA={SourceMapConsumer:gA,BasicSourceMapConsumer:lA,IndexedSourceMapConsumer:hA},fA=eA.SourceMapGenerator,CA=/(\r?\n)/,BA="$$$isSourceNode$$$";function pA(A,t,e,n,r){this.children=[],this.sourceContents={},this.line=null==A?null:A,this.column=null==t?null:t,this.source=null==e?null:e,this.name=null==r?null:r,this[BA]=!0,null!=n&&this.add(n)}pA.fromStringWithSourceMap=function(A,t,e){var n=new pA,r=A.split(CA),i=0,o=function(){return A()+(A()||"");function A(){return i<r.length?r[i++]:void 0}},s=1,a=0,g=null;return t.eachMapping((function(A){if(null!==g){if(!(s<A.generatedLine)){var t=(e=r[i]||"").substr(0,A.generatedColumn-a);return r[i]=e.substr(A.generatedColumn-a),a=A.generatedColumn,u(g,t),void(g=A)}u(g,o()),s++,a=0}for(;s<A.generatedLine;)n.add(o()),s++;if(a<A.generatedColumn){var e=r[i]||"";n.add(e.substr(0,A.generatedColumn)),r[i]=e.substr(A.generatedColumn),a=A.generatedColumn}g=A}),this),i<r.length&&(g&&u(g,o()),n.add(r.splice(i).join(""))),t.sources.forEach((function(A){var r=t.sourceContentFor(A);null!=r&&(null!=e&&(A=z.join(e,A)),n.setSourceContent(A,r))})),n;function u(A,t){if(null===A||void 0===A.source)n.add(t);else{var r=e?z.join(e,A.source):A.source;n.add(new pA(A.originalLine,A.originalColumn,r,t,A.name))}}},pA.prototype.add=function(A){if(Array.isArray(A))A.forEach((function(A){this.add(A)}),this);else{if(!A[BA]&&"string"!=typeof A)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+A);A&&this.children.push(A)}return this},pA.prototype.prepend=function(A){if(Array.isArray(A))for(var t=A.length-1;t>=0;t--)this.prepend(A[t]);else{if(!A[BA]&&"string"!=typeof A)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+A);this.children.unshift(A)}return this},pA.prototype.walk=function(A){for(var t,e=0,n=this.children.length;e<n;e++)(t=this.children[e])[BA]?t.walk(A):""!==t&&A(t,{source:this.source,line:this.line,column:this.column,name:this.name})},pA.prototype.join=function(A){var t,e,n=this.children.length;if(n>0){for(t=[],e=0;e<n-1;e++)t.push(this.children[e]),t.push(A);t.push(this.children[e]),this.children=t}return this},pA.prototype.replaceRight=function(A,t){var e=this.children[this.children.length-1];return e[BA]?e.replaceRight(A,t):"string"==typeof e?this.children[this.children.length-1]=e.replace(A,t):this.children.push("".replace(A,t)),this},pA.prototype.setSourceContent=function(A,t){this.sourceContents[z.toSetString(A)]=t},pA.prototype.walkSourceContents=function(A){for(var t=0,e=this.children.length;t<e;t++)this.children[t][BA]&&this.children[t].walkSourceContents(A);var n=Object.keys(this.sourceContents);for(t=0,e=n.length;t<e;t++)A(z.fromSetString(n[t]),this.sourceContents[n[t]])},pA.prototype.toString=function(){var A="";return this.walk((function(t){A+=t})),A},pA.prototype.toStringWithSourceMap=function(A){var t={code:"",line:1,column:0},e=new fA(A),n=!1,r=null,i=null,o=null,s=null;return this.walk((function(A,a){t.code+=A,null!==a.source&&null!==a.line&&null!==a.column?(r===a.source&&i===a.line&&o===a.column&&s===a.name||e.addMapping({source:a.source,original:{line:a.line,column:a.column},generated:{line:t.line,column:t.column},name:a.name}),r=a.source,i=a.line,o=a.column,s=a.name,n=!0):n&&(e.addMapping({generated:{line:t.line,column:t.column}}),r=null,n=!1);for(var g=0,u=A.length;g<u;g++)10===A.charCodeAt(g)?(t.line++,t.column=0,g+1===u?(r=null,n=!1):n&&e.addMapping({source:a.source,original:{line:a.line,column:a.column},generated:{line:t.line,column:t.column},name:a.name})):t.column++})),this.walkSourceContents((function(A,t){e.setSourceContent(A,t)})),{code:t.code,map:e}};for(var dA={SourceMapGenerator:eA.SourceMapGenerator,SourceMapConsumer:IA.SourceMapConsumer,SourceNode:{SourceNode:pA}.SourceNode},EA=j((function(A){const t="undefined"!=typeof window&&window.window===window&&window.navigator,e=t?window.location.href:L.cwd(),n=new RegExp("^((https|http)://)?[a-z0-9A-Z]{3}.[a-z0-9A-Z][a-z0-9A-Z]{0,61}?[a-z0-9A-Z].com|net|cn|cc (:s[0-9]{1-4})?/$"),r=A.exports={concat(A,t){const e="/"===A[A.length-1],n="/"===t[0];return A+(e||n?"":"/")+(e&&n?t.substring(1):t)},resolve:A=>r.isAbsolute(A)?r.normalize(A):r.normalize(r.concat(e,A)),normalize(A){let e=[],n=0;A.split("/").reverse().filter(A=>"."!==A).forEach(A=>{".."===A?n++:0===n?e.push(A):n--});const r=e.reverse().join("/");return(t&&"/"===r[0]?window.location.origin:"")+r},isData:A=>0===A.indexOf("data:"),isURL:A=>n.test(A),isAbsolute:A=>"/"===A[0]||/^[^\/]*:/.test(A),relativeToFile:(A,t)=>r.isData(A)||r.isAbsolute(t)?r.normalize(t):r.normalize(r.concat(A.split("/").slice(0,-1).join("/"),t))}})),QA=function(A){var t=NA(A),e=t[0],n=t[1];return 3*(e+n)/4-n},mA=function(A){var t,e,n=NA(A),r=n[0],i=n[1],o=new GA(function(A,t,e){return 3*(t+e)/4-e}(0,r,i)),s=0,a=i>0?r-4:r;for(e=0;e<a;e+=4)t=wA[A.charCodeAt(e)]<<18|wA[A.charCodeAt(e+1)]<<12|wA[A.charCodeAt(e+2)]<<6|wA[A.charCodeAt(e+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=255&t;2===i&&(t=wA[A.charCodeAt(e)]<<2|wA[A.charCodeAt(e+1)]>>4,o[s++]=255&t);1===i&&(t=wA[A.charCodeAt(e)]<<10|wA[A.charCodeAt(e+1)]<<4|wA[A.charCodeAt(e+2)]>>2,o[s++]=t>>8&255,o[s++]=255&t);return o},yA=function(A){for(var t,e=A.length,n=e%3,r=[],i=16383,o=0,s=e-n;o<s;o+=i)r.push(YA(A,o,o+i>s?s:o+i));1===n?(t=A[e-1],r.push(bA[t>>2]+bA[t<<4&63]+"==")):2===n&&(t=(A[e-2]<<8)+A[e-1],r.push(bA[t>>10]+bA[t>>4&63]+bA[t<<2&63]+"="));return r.join("")},bA=[],wA=[],GA="undefined"!=typeof Uint8Array?Uint8Array:Array,vA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ZA=0,DA=vA.length;ZA<DA;++ZA)bA[ZA]=vA[ZA],wA[vA.charCodeAt(ZA)]=ZA;function NA(A){var t=A.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=A.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function YA(A,t,e){for(var n,r,i=[],o=t;o<e;o+=3)n=(A[o]<<16&16711680)+(A[o+1]<<8&65280)+(255&A[o+2]),i.push(bA[(r=n)>>18&63]+bA[r>>12&63]+bA[r>>6&63]+bA[63&r]);return i.join("")}wA["-".charCodeAt(0)]=62,wA["_".charCodeAt(0)]=63;var kA={byteLength:QA,toByteArray:mA,fromByteArray:yA},RA=function(A,t,e,n,r){var i,o,s=8*r-n-1,a=(1<<s)-1,g=a>>1,u=-7,c=e?r-1:0,l=e?-1:1,h=A[t+c];for(c+=l,i=h&(1<<-u)-1,h>>=-u,u+=s;u>0;i=256*i+A[t+c],c+=l,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=n;u>0;o=256*o+A[t+c],c+=l,u-=8);if(0===i)i=1-g;else{if(i===a)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),i-=g}return(h?-1:1)*o*Math.pow(2,i-n)},MA=function(A,t,e,n,r,i){var o,s,a,g=8*i-r-1,u=(1<<g)-1,c=u>>1,l=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,I=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-o))<1&&(o--,a*=2),(t+=o+c>=1?l/a:l*Math.pow(2,1-c))*a>=2&&(o++,a/=2),o+c>=u?(s=0,o=u):o+c>=1?(s=(t*a-1)*Math.pow(2,r),o+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,r),o=0));r>=8;A[e+h]=255&s,h+=I,s/=256,r-=8);for(o=o<<r|s,g+=r;g>0;A[e+h]=255&o,h+=I,o/=256,g-=8);A[e+h-I]|=128*f},SA=j((function(A,t){var e="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=i,t.SlowBuffer=function(A){+A!=A&&(A=0);return i.alloc(+A)},t.INSPECT_MAX_BYTES=50;var n=2147483647;function r(A){if(A>n)throw new RangeError('The value "'+A+'" is invalid for option "size"');var t=new Uint8Array(A);return Object.setPrototypeOf(t,i.prototype),t}function i(A,t,e){if("number"==typeof A){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return a(A)}return o(A,t,e)}function o(A,t,e){if("string"==typeof A)return function(A,t){"string"==typeof t&&""!==t||(t="utf8");if(!i.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var e=0|l(A,t),n=r(e),o=n.write(A,t);o!==e&&(n=n.slice(0,o));return n}(A,t);if(ArrayBuffer.isView(A))return g(A);if(null==A)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(L(A,ArrayBuffer)||A&&L(A.buffer,ArrayBuffer))return u(A,t,e);if("undefined"!=typeof SharedArrayBuffer&&(L(A,SharedArrayBuffer)||A&&L(A.buffer,SharedArrayBuffer)))return u(A,t,e);if("number"==typeof A)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=A.valueOf&&A.valueOf();if(null!=n&&n!==A)return i.from(n,t,e);var o=function(A){if(i.isBuffer(A)){var t=0|c(A.length),e=r(t);return 0===e.length||A.copy(e,0,0,t),e}if(void 0!==A.length)return"number"!=typeof A.length||X(A.length)?r(0):g(A);if("Buffer"===A.type&&Array.isArray(A.data))return g(A.data)}(A);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof A[Symbol.toPrimitive])return i.from(A[Symbol.toPrimitive]("string"),t,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A)}function s(A){if("number"!=typeof A)throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function a(A){return s(A),r(A<0?0:0|c(A))}function g(A){for(var t=A.length<0?0:0|c(A.length),e=r(t),n=0;n<t;n+=1)e[n]=255&A[n];return e}function u(A,t,e){if(t<0||A.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(A.byteLength<t+(e||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===e?new Uint8Array(A):void 0===e?new Uint8Array(A,t):new Uint8Array(A,t,e),Object.setPrototypeOf(n,i.prototype),n}function c(A){if(A>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|A}function l(A,t){if(i.isBuffer(A))return A.length;if(ArrayBuffer.isView(A)||L(A,ArrayBuffer))return A.byteLength;if("string"!=typeof A)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof A);var e=A.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===e)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return F(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return W(A).length;default:if(r)return n?-1:F(A).length;t=(""+t).toLowerCase(),r=!0}}function h(A,t,e){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(t>>>=0))return"";for(A||(A="utf8");;)switch(A){case"hex":return Z(this,t,e);case"utf8":case"utf-8":return b(this,t,e);case"ascii":return G(this,t,e);case"latin1":case"binary":return v(this,t,e);case"base64":return y(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),n=!0}}function I(A,t,e){var n=A[t];A[t]=A[e],A[e]=n}function f(A,t,e,n,r){if(0===A.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),X(e=+e)&&(e=r?0:A.length-1),e<0&&(e=A.length+e),e>=A.length){if(r)return-1;e=A.length-1}else if(e<0){if(!r)return-1;e=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:C(A,t,e,n,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(A,t,e):Uint8Array.prototype.lastIndexOf.call(A,t,e):C(A,[t],e,n,r);throw new TypeError("val must be string, number or Buffer")}function C(A,t,e,n,r){var i,o=1,s=A.length,a=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(A.length<2||t.length<2)return-1;o=2,s/=2,a/=2,e/=2}function g(A,t){return 1===o?A[t]:A.readUInt16BE(t*o)}if(r){var u=-1;for(i=e;i<s;i++)if(g(A,i)===g(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===a)return u*o}else-1!==u&&(i-=i-u),u=-1}else for(e+a>s&&(e=s-a),i=e;i>=0;i--){for(var c=!0,l=0;l<a;l++)if(g(A,i+l)!==g(t,l)){c=!1;break}if(c)return i}return-1}function B(A,t,e,n){e=Number(e)||0;var r=A.length-e;n?(n=Number(n))>r&&(n=r):n=r;var i=t.length;n>i/2&&(n=i/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(X(s))return o;A[e+o]=s}return o}function p(A,t,e,n){return J(F(t,A.length-e),A,e,n)}function d(A,t,e,n){return J(function(A){for(var t=[],e=0;e<A.length;++e)t.push(255&A.charCodeAt(e));return t}(t),A,e,n)}function E(A,t,e,n){return d(A,t,e,n)}function Q(A,t,e,n){return J(W(t),A,e,n)}function m(A,t,e,n){return J(function(A,t){for(var e,n,r,i=[],o=0;o<A.length&&!((t-=2)<0);++o)n=(e=A.charCodeAt(o))>>8,r=e%256,i.push(r),i.push(n);return i}(t,A.length-e),A,e,n)}function y(A,t,e){return 0===t&&e===A.length?kA.fromByteArray(A):kA.fromByteArray(A.slice(t,e))}function b(A,t,e){e=Math.min(A.length,e);for(var n=[],r=t;r<e;){var i,o,s,a,g=A[r],u=null,c=g>239?4:g>223?3:g>191?2:1;if(r+c<=e)switch(c){case 1:g<128&&(u=g);break;case 2:128==(192&(i=A[r+1]))&&(a=(31&g)<<6|63&i)>127&&(u=a);break;case 3:i=A[r+1],o=A[r+2],128==(192&i)&&128==(192&o)&&(a=(15&g)<<12|(63&i)<<6|63&o)>2047&&(a<55296||a>57343)&&(u=a);break;case 4:i=A[r+1],o=A[r+2],s=A[r+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&(a=(15&g)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&a<1114112&&(u=a)}null===u?(u=65533,c=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),r+=c}return function(A){var t=A.length;if(t<=w)return String.fromCharCode.apply(String,A);var e="",n=0;for(;n<t;)e+=String.fromCharCode.apply(String,A.slice(n,n+=w));return e}(n)}t.kMaxLength=n,i.TYPED_ARRAY_SUPPORT=function(){try{var A=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(A,t),42===A.foo()}catch(A){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),i.poolSize=8192,i.from=function(A,t,e){return o(A,t,e)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array),i.alloc=function(A,t,e){return function(A,t,e){return s(A),A<=0?r(A):void 0!==t?"string"==typeof e?r(A).fill(t,e):r(A).fill(t):r(A)}(A,t,e)},i.allocUnsafe=function(A){return a(A)},i.allocUnsafeSlow=function(A){return a(A)},i.isBuffer=function(A){return null!=A&&!0===A._isBuffer&&A!==i.prototype},i.compare=function(A,t){if(L(A,Uint8Array)&&(A=i.from(A,A.offset,A.byteLength)),L(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(A)||!i.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(A===t)return 0;for(var e=A.length,n=t.length,r=0,o=Math.min(e,n);r<o;++r)if(A[r]!==t[r]){e=A[r],n=t[r];break}return e<n?-1:n<e?1:0},i.isEncoding=function(A){switch(String(A).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(A,t){if(!Array.isArray(A))throw new TypeError('"list" argument must be an Array of Buffers');if(0===A.length)return i.alloc(0);var e;if(void 0===t)for(t=0,e=0;e<A.length;++e)t+=A[e].length;var n=i.allocUnsafe(t),r=0;for(e=0;e<A.length;++e){var o=A[e];if(L(o,Uint8Array)&&(o=i.from(o)),!i.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,r),r+=o.length}return n},i.byteLength=l,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var A=this.length;if(A%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<A;t+=2)I(this,t,t+1);return this},i.prototype.swap32=function(){var A=this.length;if(A%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<A;t+=4)I(this,t,t+3),I(this,t+1,t+2);return this},i.prototype.swap64=function(){var A=this.length;if(A%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<A;t+=8)I(this,t,t+7),I(this,t+1,t+6),I(this,t+2,t+5),I(this,t+3,t+4);return this},i.prototype.toString=function(){var A=this.length;return 0===A?"":0===arguments.length?b(this,0,A):h.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(A){if(!i.isBuffer(A))throw new TypeError("Argument must be a Buffer");return this===A||0===i.compare(this,A)},i.prototype.inspect=function(){var A="",e=t.INSPECT_MAX_BYTES;return A=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(A+=" ... "),"<Buffer "+A+">"},e&&(i.prototype[e]=i.prototype.inspect),i.prototype.compare=function(A,t,e,n,r){if(L(A,Uint8Array)&&(A=i.from(A,A.offset,A.byteLength)),!i.isBuffer(A))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof A);if(void 0===t&&(t=0),void 0===e&&(e=A?A.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||e>A.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=e)return 0;if(n>=r)return-1;if(t>=e)return 1;if(this===A)return 0;for(var o=(r>>>=0)-(n>>>=0),s=(e>>>=0)-(t>>>=0),a=Math.min(o,s),g=this.slice(n,r),u=A.slice(t,e),c=0;c<a;++c)if(g[c]!==u[c]){o=g[c],s=u[c];break}return o<s?-1:s<o?1:0},i.prototype.includes=function(A,t,e){return-1!==this.indexOf(A,t,e)},i.prototype.indexOf=function(A,t,e){return f(this,A,t,e,!0)},i.prototype.lastIndexOf=function(A,t,e){return f(this,A,t,e,!1)},i.prototype.write=function(A,t,e,n){if(void 0===t)n="utf8",e=this.length,t=0;else if(void 0===e&&"string"==typeof t)n=t,e=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(e)?(e>>>=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var r=this.length-t;if((void 0===e||e>r)&&(e=r),A.length>0&&(e<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return B(this,A,t,e);case"utf8":case"utf-8":return p(this,A,t,e);case"ascii":return d(this,A,t,e);case"latin1":case"binary":return E(this,A,t,e);case"base64":return Q(this,A,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,A,t,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var w=4096;function G(A,t,e){var n="";e=Math.min(A.length,e);for(var r=t;r<e;++r)n+=String.fromCharCode(127&A[r]);return n}function v(A,t,e){var n="";e=Math.min(A.length,e);for(var r=t;r<e;++r)n+=String.fromCharCode(A[r]);return n}function Z(A,t,e){var n=A.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var r="",i=t;i<e;++i)r+=j[A[i]];return r}function D(A,t,e){for(var n=A.slice(t,e),r="",i=0;i<n.length;i+=2)r+=String.fromCharCode(n[i]+256*n[i+1]);return r}function N(A,t,e){if(A%1!=0||A<0)throw new RangeError("offset is not uint");if(A+t>e)throw new RangeError("Trying to access beyond buffer length")}function Y(A,t,e,n,r,o){if(!i.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>A.length)throw new RangeError("Index out of range")}function k(A,t,e,n,r,i){if(e+n>A.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function R(A,t,e,n,r){return t=+t,e>>>=0,r||k(A,0,e,4),MA(A,t,e,n,23,4),e+4}function M(A,t,e,n,r){return t=+t,e>>>=0,r||k(A,0,e,8),MA(A,t,e,n,52,8),e+8}i.prototype.slice=function(A,t){var e=this.length;(A=~~A)<0?(A+=e)<0&&(A=0):A>e&&(A=e),(t=void 0===t?e:~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),t<A&&(t=A);var n=this.subarray(A,t);return Object.setPrototypeOf(n,i.prototype),n},i.prototype.readUIntLE=function(A,t,e){A>>>=0,t>>>=0,e||N(A,t,this.length);for(var n=this[A],r=1,i=0;++i<t&&(r*=256);)n+=this[A+i]*r;return n},i.prototype.readUIntBE=function(A,t,e){A>>>=0,t>>>=0,e||N(A,t,this.length);for(var n=this[A+--t],r=1;t>0&&(r*=256);)n+=this[A+--t]*r;return n},i.prototype.readUInt8=function(A,t){return A>>>=0,t||N(A,1,this.length),this[A]},i.prototype.readUInt16LE=function(A,t){return A>>>=0,t||N(A,2,this.length),this[A]|this[A+1]<<8},i.prototype.readUInt16BE=function(A,t){return A>>>=0,t||N(A,2,this.length),this[A]<<8|this[A+1]},i.prototype.readUInt32LE=function(A,t){return A>>>=0,t||N(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+16777216*this[A+3]},i.prototype.readUInt32BE=function(A,t){return A>>>=0,t||N(A,4,this.length),16777216*this[A]+(this[A+1]<<16|this[A+2]<<8|this[A+3])},i.prototype.readIntLE=function(A,t,e){A>>>=0,t>>>=0,e||N(A,t,this.length);for(var n=this[A],r=1,i=0;++i<t&&(r*=256);)n+=this[A+i]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(A,t,e){A>>>=0,t>>>=0,e||N(A,t,this.length);for(var n=t,r=1,i=this[A+--n];n>0&&(r*=256);)i+=this[A+--n]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},i.prototype.readInt8=function(A,t){return A>>>=0,t||N(A,1,this.length),128&this[A]?-1*(255-this[A]+1):this[A]},i.prototype.readInt16LE=function(A,t){A>>>=0,t||N(A,2,this.length);var e=this[A]|this[A+1]<<8;return 32768&e?4294901760|e:e},i.prototype.readInt16BE=function(A,t){A>>>=0,t||N(A,2,this.length);var e=this[A+1]|this[A]<<8;return 32768&e?4294901760|e:e},i.prototype.readInt32LE=function(A,t){return A>>>=0,t||N(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},i.prototype.readInt32BE=function(A,t){return A>>>=0,t||N(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},i.prototype.readFloatLE=function(A,t){return A>>>=0,t||N(A,4,this.length),RA(this,A,!0,23,4)},i.prototype.readFloatBE=function(A,t){return A>>>=0,t||N(A,4,this.length),RA(this,A,!1,23,4)},i.prototype.readDoubleLE=function(A,t){return A>>>=0,t||N(A,8,this.length),RA(this,A,!0,52,8)},i.prototype.readDoubleBE=function(A,t){return A>>>=0,t||N(A,8,this.length),RA