0){for(;m>p-f;){let r=t[m-h]||\"0\",n=e[m-d]||\"0\";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;\"\"===y&&0===i||(y=i+y),m--}\"\"!==y&&(y=\".\"+y),m--}if(l>0){for(;m>0;){let r=t[m-h]||\"0\",n=e[m-d]||\"0\";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;y=i+y,m--}const r=t[0-h]||\"0\",n=e[0-d]||\"0\";let i=Number(r)-(g>0?1:0)-Number(n);0!==i&&(y=i+y),y=y.replace(/^0+/,\"\")}return\".\"===y[0]&&(y=\"0\"+y),y}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";const n=r(5),i=r(6),o=r(33),s=r(49);function a(t,e,{format:r=\"string\",max_decimal_digits:a=100,ellipsis:u=!1}={}){\"0\"===t[0]&&(t=t.substring(1)),\"0\"===e[0]&&(e=e.substring(1));const c=t.indexOf(\".\"),l=e.indexOf(\".\"),f=-1===c?t.length:c,h=-1===l?0:e.length-1-l;let d=!1;t=t.replace(/\\./,\"\"),e=e.replace(/\\./,\"\");const p=t.length;let y,g=\"\",m=\"\",b=-1*h,v=0;for(let r=0;r\"===y){let t=1,r=i(e,e),s=e;for(;\">\"!==n(r,g);)t++,s=r,r=i(r,e);if(t=t.toString(),\"\"!==m)for(let e=t.length;e<=v;e++)m+=\"0\";m+=t,g=o(g,s),v=0}else{if(\"<\"===y){\"\"===m&&b++,v++;continue}if(\"=\"===y){if(\"\"!==m)for(let t=0;t3){m+=\"...\",d=!0;break}}else t[g]=1;const r=n(g,e);if(\">\"===r){let t=1,r=i(e,e),s=e;for(;\">\"!==n(r,g);)t++,s=r,r=i(r,e);t=t.toString();for(let e=t.length;e<=v;e++)m+=\"0\";if(m+=t,g=o(g,s),\"0\"===g)break;v=0}else{if(\"<\"===r){v++;continue}if(\"=\"===r){for(let t=0;tx){for(let t=x;t0&&(m=s(m.substring(0,m.length-S+1))),\".\"===m[0]&&(m=\"0\"+m),\"object\"===r?{quotient:m,extra_decimals:S}:m}t.exports=a,t.exports.default=a},function(t,e,r){\"use strict\";const n=r(0),i=r(5),o=r(15),s=r(9),a=r(31);function u(t,e,{infinity_minus_infinity:r=\"NaN\"}={}){t=n(t),e=n(e);const u=!(\"-\"===t[0]),c=!(\"-\"===e[0]),l=o(t),f=o(e);if(l&&f){if(u===c)return r;if(u)return\"Infinity\";if(c)return\"-Infinity\"}else{if(l)return t;if(f)return c?\"-Infinity\":\"Infinity\"}if(u){if(c){const r=i(t,e);return\">\"===r?a(t,e):\"<\"===r?\"-\"+a(e,t):\"0\"}return s(t,e.substring(1))}if(c)return\"-\"+s(t.substring(1),e);{t=t.substring(1),e=e.substring(1);const r=i(t,e);return\">\"===r?\"-\"+a(t,e):\"<\"===r?a(e,t):\"0\"}}t.exports=u,t.exports.default=u},function(t,e,r){\"use strict\";const n=r(0),i=r(5);function o(t,e){t=n(t),e=n(e);const r=\"-\"!==t[0],o=\"-\"!==e[0];return r?o?i(t,e):\">\":o?\"<\":i(e.substring(1),t.substring(1))}t.exports=o,t.exports.default=o},function(t,e,r){\"use strict\";const n=r(4),i=r(0),o=r(1),s=r(77),a=r(16),u=r(52),c=r(78),l=r(11),f=r(53),h=r(54),d=r(81),p=r(37),y=r(36),g=r(22),m=r(85);function b(t,e,{zero_to_the_power_of_zero:r=\"1\",ellipsis:b=!1,imaginary:v=!0,max_decimal_digits:w=100,fraction:x=!1}={}){t=i(t),e=i(e);const _=v&&u(t);_&&(t=t.replace(/i$/,\"\"));const S=l(t),A=l(e);if(S&&A)return r;if(A)return\"1\";const E=g(e);if(S){if(\"+\"===E)return\"0\";if(\"-\"===E)return\"Infinity\"}const k=a(e);if(\"+\"===E&&k){let r=h(t,e);return\"number\"==typeof w&&(r=y(r,{digits:w})),_&&c(e)&&(r+=\"i\"),r}if(\"-\"===E&&k){const r=\"1\",i=h(t,n(e));return o(r,i,{ellipsis:b,max_decimal_digits:w})}if(!k){e=n(e);let[r,i]=e.includes(\"/\")?e.split(\"/\"):s(e);[r,i]=m(r,i);let o=p(t,i,{imaginary:v}),a=f(r,o);return\"number\"==typeof w&&(a=y(a,{digits:w})),\"-\"===E&&(a=d(a,{fraction:x,max_decimal_digits:w})),a}}t.exports=b,t.exports.default=b},function(t,e,r){\"use strict\";const n=r(52),i=r(164);function o(t,{digits:e=0}={}){return n(t)?i(t.substring(0,t.length-1),{digits:e})+\"i\":i(t,{digits:e})}t.exports=o,t.exports.default=o},function(t,e,r){\"use strict\";const n=r(4),i=r(0),o=r(5),s=r(82),a=r(16),u=r(80),c=r(54),l=r(83);function f(t,e,{imaginary:r=!0,max_decimal_digits:f=100}={}){if(t=i(t),\"1\"===(e=i(e)))return t;if(\"1\"===t)return\"1\";if(!a(e))throw new Error(\"[preciso] can't find fractional roots\");if(u(e))throw new Error(\"[preciso] can't find root of negative indexes\");const h=n(t),d=u(t),p=s(e),y=d&&p;if(y&&!r)throw new Error(\"[preciso] root has an imaginary number\");const g=d&&!p?\"-\":\"\",m=l(h,e),b=[\"9\",\"8\",\"7\",\"6\",\"5\",\"4\",\"3\",\"2\",\"1\",\"0\"];let v=\"\";for(let t=0;to)return\">\";if(n\",'\"',\"`\",\" \",\"\\r\",\"\\n\",\"\\t\"]),c=[\"'\"].concat(u),l=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(c),f=[\"/\",\"?\",\"#\"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,\"javascript:\":!0},y={javascript:!0,\"javascript:\":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},m=r(142);function b(t,e,r){if(t&&\"object\"==typeof t&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}i.prototype.parse=function(t,e,r){if(\"string\"!=typeof t)throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof t);var i=t.indexOf(\"?\"),s=-1!==i&&i127?R+=\"x\":R+=I[j];if(!R.match(h)){var L=C.slice(0,k),F=C.slice(k+1),N=I.match(d);N&&(L.push(N[1]),F.unshift(N[2])),F.length&&(b=\"/\"+F.join(\".\")+b),this.hostname=L.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var D=this.port?\":\"+this.port:\"\",U=this.hostname||\"\";this.host=U+D,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),\"/\"!==b[0]&&(b=\"/\"+b))}if(!p[x])for(k=0,P=c.length;k0)&&r.host.split(\"@\"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname);return r.search=t.search,r.query=t.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.href=r.format(),r}if(!_.length)return r.pathname=null,r.search?r.path=\"/\"+r.search:r.path=null,r.href=r.format(),r;for(var A=_.slice(-1)[0],E=(r.host||t.host||_.length>1)&&(\".\"===A||\"..\"===A)||\"\"===A,k=0,T=_.length;T>=0;T--)\".\"===(A=_[T])?_.splice(T,1):\"..\"===A?(_.splice(T,1),k++):k&&(_.splice(T,1),k--);if(!w&&!x)for(;k--;k)_.unshift(\"..\");!w||\"\"===_[0]||_[0]&&\"/\"===_[0].charAt(0)||_.unshift(\"\"),E&&\"/\"!==_.join(\"/\").substr(-1)&&_.push(\"\");var O,C=\"\"===_[0]||_[0]&&\"/\"===_[0].charAt(0);S&&(r.hostname=C?\"\":_.length?_.shift():\"\",r.host=r.hostname,(O=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname));return(w=w||r.host&&_.length)&&!C&&_.unshift(\"\"),_.length>0?r.pathname=_.join(\"/\"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:\"\")+(r.search?r.search:\"\")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(\":\"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){return\"string\"==typeof t&&(t=b(t)),t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i},function(t,e,r){(function(t){var n=r(136),i=r(70),o=r(138),s=r(139),a=r(39),u=e;u.request=function(e,r){e=\"string\"==typeof e?a.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?\"http:\":\"\",s=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||\"/\";u&&-1!==u.indexOf(\":\")&&(u=\"[\"+u+\"]\"),e.url=(u?s+\"//\"+u:\"\")+(c?\":\"+c:\"\")+l,e.method=(e.method||\"GET\").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on(\"response\",r),f},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=[\"CHECKOUT\",\"CONNECT\",\"COPY\",\"DELETE\",\"GET\",\"HEAD\",\"LOCK\",\"M-SEARCH\",\"MERGE\",\"MKACTIVITY\",\"MKCOL\",\"MOVE\",\"NOTIFY\",\"OPTIONS\",\"PATCH\",\"POST\",\"PROPFIND\",\"PROPPATCH\",\"PURGE\",\"PUT\",\"REPORT\",\"SEARCH\",\"SUBSCRIBE\",\"TRACE\",\"UNLOCK\",\"UNSUBSCRIBE\"]}).call(this,r(3))},,function(t,e,r){(e=t.exports=r(61)).Stream=e,e.Readable=e,e.Writable=r(65),e.Duplex=r(14),e.Transform=r(67),e.PassThrough=r(122)},function(t,e,r){var n=r(7),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if(\"number\"==typeof t)throw new TypeError(\"Argument must not be a number\");return i(t,e,r)},s.alloc=function(t,e,r){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");var n=i(t);return void 0!==e?\"string\"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return i(t)},s.allocUnsafeSlow=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return n.SlowBuffer(t)}},function(t,e,r){\"use strict\";var n=SyntaxError,i=Function,o=TypeError,s=function(t){try{return i('\"use strict\"; return ('+t+\").constructor;\")()}catch(t){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},\"\")}catch(t){a=null}var u=function(){throw new o},c=a?function(){try{return u}catch(t){try{return a(arguments,\"callee\").get}catch(t){return u}}}():u,l=r(145)(),f=r(147)(),h=Object.getPrototypeOf||(f?function(t){return t.__proto__}:null),d={},p=\"undefined\"!=typeof Uint8Array&&h?h(Uint8Array):void 0,y={\"%AggregateError%\":\"undefined\"==typeof AggregateError?void 0:AggregateError,\"%Array%\":Array,\"%ArrayBuffer%\":\"undefined\"==typeof ArrayBuffer?void 0:ArrayBuffer,\"%ArrayIteratorPrototype%\":l&&h?h([][Symbol.iterator]()):void 0,\"%AsyncFromSyncIteratorPrototype%\":void 0,\"%AsyncFunction%\":d,\"%AsyncGenerator%\":d,\"%AsyncGeneratorFunction%\":d,\"%AsyncIteratorPrototype%\":d,\"%Atomics%\":\"undefined\"==typeof Atomics?void 0:Atomics,\"%BigInt%\":\"undefined\"==typeof BigInt?void 0:BigInt,\"%BigInt64Array%\":\"undefined\"==typeof BigInt64Array?void 0:BigInt64Array,\"%BigUint64Array%\":\"undefined\"==typeof BigUint64Array?void 0:BigUint64Array,\"%Boolean%\":Boolean,\"%DataView%\":\"undefined\"==typeof DataView?void 0:DataView,\"%Date%\":Date,\"%decodeURI%\":decodeURI,\"%decodeURIComponent%\":decodeURIComponent,\"%encodeURI%\":encodeURI,\"%encodeURIComponent%\":encodeURIComponent,\"%Error%\":Error,\"%eval%\":eval,\"%EvalError%\":EvalError,\"%Float32Array%\":\"undefined\"==typeof Float32Array?void 0:Float32Array,\"%Float64Array%\":\"undefined\"==typeof Float64Array?void 0:Float64Array,\"%FinalizationRegistry%\":\"undefined\"==typeof FinalizationRegistry?void 0:FinalizationRegistry,\"%Function%\":i,\"%GeneratorFunction%\":d,\"%Int8Array%\":\"undefined\"==typeof Int8Array?void 0:Int8Array,\"%Int16Array%\":\"undefined\"==typeof Int16Array?void 0:Int16Array,\"%Int32Array%\":\"undefined\"==typeof Int32Array?void 0:Int32Array,\"%isFinite%\":isFinite,\"%isNaN%\":isNaN,\"%IteratorPrototype%\":l&&h?h(h([][Symbol.iterator]())):void 0,\"%JSON%\":\"object\"==typeof JSON?JSON:void 0,\"%Map%\":\"undefined\"==typeof Map?void 0:Map,\"%MapIteratorPrototype%\":\"undefined\"!=typeof Map&&l&&h?h((new Map)[Symbol.iterator]()):void 0,\"%Math%\":Math,\"%Number%\":Number,\"%Object%\":Object,\"%parseFloat%\":parseFloat,\"%parseInt%\":parseInt,\"%Promise%\":\"undefined\"==typeof Promise?void 0:Promise,\"%Proxy%\":\"undefined\"==typeof Proxy?void 0:Proxy,\"%RangeError%\":RangeError,\"%ReferenceError%\":ReferenceError,\"%Reflect%\":\"undefined\"==typeof Reflect?void 0:Reflect,\"%RegExp%\":RegExp,\"%Set%\":\"undefined\"==typeof Set?void 0:Set,\"%SetIteratorPrototype%\":\"undefined\"!=typeof Set&&l&&h?h((new Set)[Symbol.iterator]()):void 0,\"%SharedArrayBuffer%\":\"undefined\"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,\"%String%\":String,\"%StringIteratorPrototype%\":l&&h?h(\"\"[Symbol.iterator]()):void 0,\"%Symbol%\":l?Symbol:void 0,\"%SyntaxError%\":n,\"%ThrowTypeError%\":c,\"%TypedArray%\":p,\"%TypeError%\":o,\"%Uint8Array%\":\"undefined\"==typeof Uint8Array?void 0:Uint8Array,\"%Uint8ClampedArray%\":\"undefined\"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,\"%Uint16Array%\":\"undefined\"==typeof Uint16Array?void 0:Uint16Array,\"%Uint32Array%\":\"undefined\"==typeof Uint32Array?void 0:Uint32Array,\"%URIError%\":URIError,\"%WeakMap%\":\"undefined\"==typeof WeakMap?void 0:WeakMap,\"%WeakRef%\":\"undefined\"==typeof WeakRef?void 0:WeakRef,\"%WeakSet%\":\"undefined\"==typeof WeakSet?void 0:WeakSet};if(h)try{null.error}catch(t){var g=h(h(t));y[\"%Error.prototype%\"]=g}var m={\"%ArrayBufferPrototype%\":[\"ArrayBuffer\",\"prototype\"],\"%ArrayPrototype%\":[\"Array\",\"prototype\"],\"%ArrayProto_entries%\":[\"Array\",\"prototype\",\"entries\"],\"%ArrayProto_forEach%\":[\"Array\",\"prototype\",\"forEach\"],\"%ArrayProto_keys%\":[\"Array\",\"prototype\",\"keys\"],\"%ArrayProto_values%\":[\"Array\",\"prototype\",\"values\"],\"%AsyncFunctionPrototype%\":[\"AsyncFunction\",\"prototype\"],\"%AsyncGenerator%\":[\"AsyncGeneratorFunction\",\"prototype\"],\"%AsyncGeneratorPrototype%\":[\"AsyncGeneratorFunction\",\"prototype\",\"prototype\"],\"%BooleanPrototype%\":[\"Boolean\",\"prototype\"],\"%DataViewPrototype%\":[\"DataView\",\"prototype\"],\"%DatePrototype%\":[\"Date\",\"prototype\"],\"%ErrorPrototype%\":[\"Error\",\"prototype\"],\"%EvalErrorPrototype%\":[\"EvalError\",\"prototype\"],\"%Float32ArrayPrototype%\":[\"Float32Array\",\"prototype\"],\"%Float64ArrayPrototype%\":[\"Float64Array\",\"prototype\"],\"%FunctionPrototype%\":[\"Function\",\"prototype\"],\"%Generator%\":[\"GeneratorFunction\",\"prototype\"],\"%GeneratorPrototype%\":[\"GeneratorFunction\",\"prototype\",\"prototype\"],\"%Int8ArrayPrototype%\":[\"Int8Array\",\"prototype\"],\"%Int16ArrayPrototype%\":[\"Int16Array\",\"prototype\"],\"%Int32ArrayPrototype%\":[\"Int32Array\",\"prototype\"],\"%JSONParse%\":[\"JSON\",\"parse\"],\"%JSONStringify%\":[\"JSON\",\"stringify\"],\"%MapPrototype%\":[\"Map\",\"prototype\"],\"%NumberPrototype%\":[\"Number\",\"prototype\"],\"%ObjectPrototype%\":[\"Object\",\"prototype\"],\"%ObjProto_toString%\":[\"Object\",\"prototype\",\"toString\"],\"%ObjProto_valueOf%\":[\"Object\",\"prototype\",\"valueOf\"],\"%PromisePrototype%\":[\"Promise\",\"prototype\"],\"%PromiseProto_then%\":[\"Promise\",\"prototype\",\"then\"],\"%Promise_all%\":[\"Promise\",\"all\"],\"%Promise_reject%\":[\"Promise\",\"reject\"],\"%Promise_resolve%\":[\"Promise\",\"resolve\"],\"%RangeErrorPrototype%\":[\"RangeError\",\"prototype\"],\"%ReferenceErrorPrototype%\":[\"ReferenceError\",\"prototype\"],\"%RegExpPrototype%\":[\"RegExp\",\"prototype\"],\"%SetPrototype%\":[\"Set\",\"prototype\"],\"%SharedArrayBufferPrototype%\":[\"SharedArrayBuffer\",\"prototype\"],\"%StringPrototype%\":[\"String\",\"prototype\"],\"%SymbolPrototype%\":[\"Symbol\",\"prototype\"],\"%SyntaxErrorPrototype%\":[\"SyntaxError\",\"prototype\"],\"%TypedArrayPrototype%\":[\"TypedArray\",\"prototype\"],\"%TypeErrorPrototype%\":[\"TypeError\",\"prototype\"],\"%Uint8ArrayPrototype%\":[\"Uint8Array\",\"prototype\"],\"%Uint8ClampedArrayPrototype%\":[\"Uint8ClampedArray\",\"prototype\"],\"%Uint16ArrayPrototype%\":[\"Uint16Array\",\"prototype\"],\"%Uint32ArrayPrototype%\":[\"Uint32Array\",\"prototype\"],\"%URIErrorPrototype%\":[\"URIError\",\"prototype\"],\"%WeakMapPrototype%\":[\"WeakMap\",\"prototype\"],\"%WeakSetPrototype%\":[\"WeakSet\",\"prototype\"]},b=r(45),v=r(149),w=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),_=b.call(Function.call,String.prototype.replace),S=b.call(Function.call,String.prototype.slice),A=b.call(Function.call,RegExp.prototype.exec),E=/[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g,k=/\\\\(\\\\)?/g,T=function(t){var e=S(t,0,1),r=S(t,-1);if(\"%\"===e&&\"%\"!==r)throw new n(\"invalid intrinsic syntax, expected closing `%`\");if(\"%\"===r&&\"%\"!==e)throw new n(\"invalid intrinsic syntax, expected opening `%`\");var i=[];return _(t,E,(function(t,e,r,n){i[i.length]=r?_(n,k,\"$1\"):e||t})),i},O=function(t,e){var r,i=t;if(v(m,i)&&(i=\"%\"+(r=m[i])[0]+\"%\"),v(y,i)){var a=y[i];if(a===d&&(a=function t(e){var r;if(\"%AsyncFunction%\"===e)r=s(\"async function () {}\");else if(\"%GeneratorFunction%\"===e)r=s(\"function* () {}\");else if(\"%AsyncGeneratorFunction%\"===e)r=s(\"async function* () {}\");else if(\"%AsyncGenerator%\"===e){var n=t(\"%AsyncGeneratorFunction%\");n&&(r=n.prototype)}else if(\"%AsyncIteratorPrototype%\"===e){var i=t(\"%AsyncGenerator%\");i&&h&&(r=h(i.prototype))}return y[e]=r,r}(i)),void 0===a&&!e)throw new o(\"intrinsic \"+t+\" exists, but is not available. Please file an issue!\");return{alias:r,name:i,value:a}}throw new n(\"intrinsic \"+t+\" does not exist!\")};t.exports=function(t,e){if(\"string\"!=typeof t||0===t.length)throw new o(\"intrinsic name must be a non-empty string\");if(arguments.length>1&&\"boolean\"!=typeof e)throw new o('\"allowMissing\" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,t))throw new n(\"`%` may not be present anywhere but at the beginning and end of the intrinsic name\");var r=T(t),i=r.length>0?r[0]:\"\",s=O(\"%\"+i+\"%\",e),u=s.name,c=s.value,l=!1,f=s.alias;f&&(i=f[0],x(r,w([0,1],f)));for(var h=1,d=!0;h=r.length){var b=a(c,p);c=(d=!!b)&&\"get\"in b&&!(\"originalValue\"in b.get)?b.get:c[p]}else d=v(c,p),c=c[p];d&&!l&&(y[u]=c)}}return c}},function(t,e,r){\"use strict\";var n=r(148);t.exports=Function.prototype.bind||n},function(t,e,r){\"use strict\";var n=String.prototype.replace,i=/%20/g,o=\"RFC1738\",s=\"RFC3986\";t.exports={default:s,formatters:{RFC1738:function(t){return n.call(t,i,\"+\")},RFC3986:function(t){return String(t)}},RFC1738:o,RFC3986:s}},function(t,e,r){\"use strict\";const n=r(5),i=r(11),o=r(48),s=r(9);function a(t,e,r=\"1\"){if(i(t))return\"0\";let a=t,u=t;for(;\"<\"===n(u,e);)u=s(u,r),a=o(a,u);return a}t.exports=a,t.exports.default=a},function(t,e,r){\"use strict\";const{MAX_SAFE_INTEGER_LENGTH:n}=r(30);function i(t,e){if(\"0\"===t||\"0\"===e)return\"0\";const r=t.indexOf(\".\"),i=e.indexOf(\".\"),o=(-1===r?t.length:r)+(-1===i?e.length:i),s=(-1===r?0:t.length-1-r)+(-1===i?0:e.length-1-i);if(0===s&&o=0;){const t=h,e=h-=15,r=a.substring(e,t);f.push([Number(r),r.length])}const d=[],p=[];for(let t=0,e=l-1;e>=0;e--,t++){const r=u[e],n=Number(r);let i=0,o=\"\";const s=f.length-1;f.forEach(([t,e],r)=>{let a=(i+n*t).toString();const u=a.length;if(u>e&&r!==s){const t=-1*e;o=a.slice(t)+o,i=Number(a.slice(0,t))}else{const t=e-u;for(let e=0;eNumber(t)),o.length])}const y=d.length,g=p[p.length-1][1]+y;let m=\"\",b=0;for(let t=0;t=0&&(e+=r[o])}e>=10?(e=e.toString(),m=e[e.length-1]+m,b=Number(e.slice(0,-1))):(m=e+m,b=0)}if(0===s)m=m.replace(/^0+/,\"\");else{const t=m.length-s;m=m.substring(0,t)+\".\"+m.substring(t),m=m.replace(/^0+/,\"\"),m=m.replace(/\\.?0+$/,\"\"),\".\"===m[0]&&(m=\"0\"+m)}return m}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";const n=r(6),i=r(160),o=[\"5\",\"6\",\"7\",\"8\",\"9\"];function s(t){if(t.match(/\\.9+$/))return n(i(t),\"1\");\"+\"===t[0]&&(t=t.substring(1));const e=t.length;let r=\"\";const s=t[t.length-1];if(o.includes(s)){let n;for(n=e-2;n>=0;n--){const e=t[n];if(\".\"===e||\"-\"===e)continue;const i=Number(e)+1;if(10!==i){r=i+r;break}r=\"0\"+r}n>0&&(r=t.substring(0,n)+r)}else r=t.substring(0,e-1);return\".\"===r[r.length-1]&&(r=r.substring(0,r.length-1)),r.indexOf(\".\")>-1&&(r=r.replace(/0+$/,\"\")),r}t.exports=s,t.exports.default=s},function(t,e,r){\"use strict\";function n(t){return\"-\"===t[0]?\"-\":\"+\"}t.exports=n,t.exports.default=n},function(t,e,r){\"use strict\";const n=r(0);function i(t){const e=(t=n(t)).indexOf(\".\");return-1===e?\"0\":(t.length-e-1).toString()}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";function n(t){return t.includes(\"i\")}t.exports=n,t.exports.default=n},function(t,e,r){\"use strict\";const n=r(79);function i(){const t=Array.from(arguments),e=\"object\"==typeof t[t.length-1]?t[t.length-1]:void 0,r=Array.isArray(t[0])?t[0]:e?t.slice(0,t.length-1):t;return n(r,e)}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";const n=r(17);function i(t,e){const r=Number(e);let i=t;for(let e=1;et.type===c.a.internalError).map(t=>t.error);return Object.assign(t,{[u.a]:i,[u.b]:r,[u.c]:n,[u.e]:e})}function m(t,e){return f(this,void 0,void 0,(function*(){d(\"Initializing new thread\");const r=e&&e.timeout?e.timeout:y,n=(yield function(t,e,r){return f(this,void 0,void 0,(function*(){let n;const i=new Promise((t,i)=>{n=setTimeout(()=>i(Error(r)),e)}),o=yield Promise.race([t,i]);return clearTimeout(n),o}))}(function(t){return new Promise((e,r)=>{const n=i=>{var o;h(\"Message from worker before finishing initialization:\",i.data),(o=i.data)&&\"init\"===o.type?(t.removeEventListener(\"message\",n),e(i.data)):(t=>t&&\"uncaughtError\"===t.type)(i.data)&&(t.removeEventListener(\"message\",n),r(Object(s.a)(i.data.error)))};t.addEventListener(\"message\",n)})}(t),r,`Timeout: Did not receive an init message from worker after ${r}ms. Make sure the worker calls expose().`)).exposed,{termination:i,terminate:u}=function(t){const[e,r]=Object(a.a)();return{terminate:()=>f(this,void 0,void 0,(function*(){p(\"Terminating worker\"),yield t.terminate(),r()})),termination:e}}(t),m=function(t,e){return new o.a(r=>{const n=t=>{const e={type:c.a.message,data:t.data};r.next(e)},i=t=>{p(\"Unhandled promise rejection event in thread:\",t);const e={type:c.a.internalError,error:Error(t.reason)};r.next(e)};t.addEventListener(\"message\",n),t.addEventListener(\"unhandledrejection\",i),e.then(()=>{const e={type:c.a.termination};t.removeEventListener(\"message\",n),t.removeEventListener(\"unhandledrejection\",i),r.next(e),r.complete()})})}(t,i);if(\"function\"===n.type){return g(Object(l.a)(t),t,m,u)}if(\"module\"===n.type){return g(Object(l.b)(t,n.methods),t,m,u)}{const t=n.type;throw Error(\"Worker init message states unexpected type of expose(): \"+t)}}))}}).call(this,r(8))},function(t,e,r){\"use strict\";r.d(e,\"a\",(function(){return g}));var n=r(12),i=r.n(n),o=r(103),s=r(201),a=r(26);function u(t){return Promise.all(t.map(t=>{const e=t=>({status:\"fulfilled\",value:t}),r=t=>({status:\"rejected\",reason:t}),n=Promise.resolve(t);try{return n.then(e,r)}catch(t){return Promise.reject(t)}}))}var c,l=r(19);!function(t){t.initialized=\"initialized\",t.taskCanceled=\"taskCanceled\",t.taskCompleted=\"taskCompleted\",t.taskFailed=\"taskFailed\",t.taskQueued=\"taskQueued\",t.taskQueueDrained=\"taskQueueDrained\",t.taskStart=\"taskStart\",t.terminated=\"terminated\"}(c||(c={}));var f=r(24),h=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))};let d=1;class p{constructor(t,e){this.eventSubject=new o.a,this.initErrors=[],this.isClosing=!1,this.nextTaskID=1,this.taskQueue=[];const r=\"number\"==typeof e?{size:e}:e||{},{size:n=l.a}=r;this.debug=i()(\"threads:pool:\"+(r.name||String(d++)).replace(/\\W/g,\" \").trim().replace(/\\s+/g,\"-\")),this.options=r,this.workers=function(t,e){return function(t){const e=[];for(let r=0;r({init:t(),runningTasks:[]}))}(t,n),this.eventObservable=Object(s.a)(a.a.from(this.eventSubject)),Promise.all(this.workers.map(t=>t.init)).then(()=>this.eventSubject.next({type:c.initialized,size:this.workers.length}),t=>{this.debug(\"Error while initializing pool worker:\",t),this.eventSubject.error(t),this.initErrors.push(t)})}findIdlingWorker(){const{concurrency:t=1}=this.options;return this.workers.find(e=>e.runningTasks.lengthh(this,void 0,void 0,(function*(){var n;yield(n=0,new Promise(t=>setTimeout(t,n)));try{yield this.runPoolTask(t,e)}finally{t.runningTasks=t.runningTasks.filter(t=>t!==r),this.isClosing||this.scheduleWork()}})))();t.runningTasks.push(r)}))}scheduleWork(){this.debug(\"Attempt de-queueing a task in order to run it...\");const t=this.findIdlingWorker();if(!t)return;const e=this.taskQueue.shift();if(!e)return this.debug(\"Task queue is empty\"),void this.eventSubject.next({type:c.taskQueueDrained});this.run(t,e)}taskCompletion(t){return new Promise((e,r)=>{const n=this.events().subscribe(i=>{i.type===c.taskCompleted&&i.taskID===t?(n.unsubscribe(),e(i.returnValue)):i.type===c.taskFailed&&i.taskID===t?(n.unsubscribe(),r(i.error)):i.type===c.terminated&&(n.unsubscribe(),r(Error(\"Pool has been terminated before task was run.\")))})})}settled(t=!1){return h(this,void 0,void 0,(function*(){const e=()=>{return t=this.workers,e=t=>t.runningTasks,t.reduce((t,r)=>[...t,...e(r)],[]);var t,e},r=[],n=this.eventObservable.subscribe(t=>{t.type===c.taskFailed&&r.push(t.error)});return this.initErrors.length>0?Promise.reject(this.initErrors[0]):t&&0===this.taskQueue.length?(yield u(e()),r):(yield new Promise((t,e)=>{const r=this.eventObservable.subscribe({next(e){e.type===c.taskQueueDrained&&(r.unsubscribe(),t(void 0))},error:e})}),yield u(e()),n.unsubscribe(),r)}))}completed(t=!1){return h(this,void 0,void 0,(function*(){const e=this.settled(t),r=new Promise((t,r)=>{const n=this.eventObservable.subscribe({next(i){i.type===c.taskQueueDrained?(n.unsubscribe(),t(e)):i.type===c.taskFailed&&(n.unsubscribe(),r(i.error))},error:r})}),n=yield Promise.race([e,r]);if(n.length>0)throw n[0]}))}events(){return this.eventObservable}queue(t){const{maxQueuedJobs:e=1/0}=this.options;if(this.isClosing)throw Error(\"Cannot schedule pool tasks after terminate() has been called.\");if(this.initErrors.length>0)throw this.initErrors[0];const r=this.nextTaskID++,n=this.taskCompletion(r);n.catch(t=>{this.debug(`Task #${r} errored:`,t)});const i={id:r,run:t,cancel:()=>{-1!==this.taskQueue.indexOf(i)&&(this.taskQueue=this.taskQueue.filter(t=>t!==i),this.eventSubject.next({type:c.taskCanceled,taskID:i.id}))},then:n.then.bind(n)};if(this.taskQueue.length>=e)throw Error(\"Maximum number of pool tasks queued. Refusing to queue another one.\\nThis usually happens for one of two reasons: We are either at peak workload right now or some tasks just won't finish, thus blocking the pool.\");return this.debug(`Queueing task #${i.id}...`),this.taskQueue.push(i),this.eventSubject.next({type:c.taskQueued,taskID:i.id}),this.scheduleWork(),i}terminate(t){return h(this,void 0,void 0,(function*(){this.isClosing=!0,t||(yield this.completed(!0)),this.eventSubject.next({type:c.terminated,remainingQueue:[...this.taskQueue]}),this.eventSubject.complete(),yield Promise.all(this.workers.map(t=>h(this,void 0,void 0,(function*(){return f.a.terminate(yield t.init)}))))}))}}function y(t,e){return new p(t,e)}p.EventType=c,y.EventType=c;const g=y},function(t,e,r){\"use strict\";r.d(e,\"a\",(function(){return b})),r.d(e,\"b\",(function(){return v}));var n=r(12),i=r.n(n),o=r(26),s=r(201),a=r(13);const u=()=>{},c=t=>t,l=t=>Promise.resolve().then(t);function f(t){throw t}class h extends o.a{constructor(t){super(e=>{const r=this,n=Object.assign(Object.assign({},e),{complete(){e.complete(),r.onCompletion()},error(t){e.error(t),r.onError(t)},next(t){e.next(t),r.onNext(t)}});try{return this.initHasRun=!0,t(n)}catch(t){n.error(t)}}),this.initHasRun=!1,this.fulfillmentCallbacks=[],this.rejectionCallbacks=[],this.firstValueSet=!1,this.state=\"pending\"}onNext(t){this.firstValueSet||(this.firstValue=t,this.firstValueSet=!0)}onError(t){this.state=\"rejected\",this.rejection=t;for(const e of this.rejectionCallbacks)l(()=>e(t))}onCompletion(){this.state=\"fulfilled\";for(const t of this.fulfillmentCallbacks)l(()=>t(this.firstValue))}then(t,e){const r=t||c,n=e||f;let i=!1;return new Promise((t,e)=>{const o=r=>{if(!i){i=!0;try{t(n(r))}catch(t){e(t)}}};return this.initHasRun||this.subscribe({error:o}),\"fulfilled\"===this.state?t(r(this.firstValue)):\"rejected\"===this.state?(i=!0,t(n(this.rejection))):(this.fulfillmentCallbacks.push(e=>{try{t(r(e))}catch(t){o(t)}}),void this.rejectionCallbacks.push(o))})}catch(t){return this.then(void 0,t)}finally(t){const e=t||u;return this.then(t=>(e(),t),()=>e())}static from(t){return function(t){return t&&\"function\"==typeof t.then}(t)?new h(e=>{t.then(t=>{e.next(t),e.complete()},t=>{e.error(t)})}):super.from(t)}}var d=r(105),p=r(20);const y=i()(\"threads:master:messages\");let g=1;function m(t,e){return new o.a(r=>{let n;const i=o=>{var s;if(y(\"Message from worker:\",o.data),o.data&&o.data.uid===e)if((s=o.data)&&s.type===p.b.running)n=o.data.resultType;else if((t=>t&&t.type===p.b.result)(o.data))\"promise\"===n?(void 0!==o.data.payload&&r.next(Object(a.a)(o.data.payload)),r.complete(),t.removeEventListener(\"message\",i)):(o.data.payload&&r.next(Object(a.a)(o.data.payload)),o.data.complete&&(r.complete(),t.removeEventListener(\"message\",i)));else if((t=>t&&t.type===p.b.error)(o.data)){const e=Object(a.a)(o.data.error);r.error(e),t.removeEventListener(\"message\",i)}};return t.addEventListener(\"message\",i),()=>{if(\"observable\"===n||!n){const r={type:p.a.cancel,uid:e};t.postMessage(r)}t.removeEventListener(\"message\",i)}})}function b(t,e){return(...r)=>{const n=g++,{args:i,transferables:o}=function(t){if(0===t.length)return{args:[],transferables:[]};const e=[],r=[];for(const n of t)Object(d.a)(n)?(e.push(Object(a.b)(n.send)),r.push(...n.transferables)):e.push(Object(a.b)(n));return{args:e,transferables:0===r.length?r:(n=r,Array.from(new Set(n)))};var n}(r),u={type:p.a.run,uid:n,method:e,args:i};y(\"Sending command to run function to worker:\",u);try{t.postMessage(u,o)}catch(t){return h.from(Promise.reject(t))}return h.from(Object(s.a)(m(t,n)))}}function v(t,e){const r={};for(const n of e)r[n]=b(t,n);return r}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return\"[object Array]\"==r.call(t)}},function(t,e,r){\"use strict\";(function(e,n){var i=r(28);t.exports=v;var o,s=r(60);v.ReadableState=b;r(62).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(63),c=r(43).Buffer,l=(void 0!==e?e:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var f=Object.create(r(21));f.inherits=r(10);var h=r(115),d=void 0;d=h&&h.debuglog?h.debuglog(\"stream\"):function(){};var p,y=r(116),g=r(64);f.inherits(v,u);var m=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function b(t,e){t=t||{};var n=e instanceof(o=o||r(14));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(66).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||r(14),!(this instanceof v))return new v(t);this._readableState=new b(t,this),this.readable=!0,t&&(\"function\"==typeof t.read&&(this._read=t.read),\"function\"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,S(t)}(t,s)):(i||(o=function(t,e){var r;n=e,c.isBuffer(n)||n instanceof l||\"string\"==typeof e||void 0===e||t.objectMode||(r=new TypeError(\"Invalid non-string/buffer chunk\"));var n;return r}(s,e)),o?t.emit(\"error\",o):s.objectMode||e&&e.length>0?(\"string\"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?s.endEmitted?t.emit(\"error\",new Error(\"stream.unshift() after end event\")):x(t,s,e,!0):s.ended?t.emit(\"error\",new Error(\"stream.push() after EOF\")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?x(t,s,e,!1):E(t,s)):x(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d(\"emitReadable\",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(A,t):A(t))}function A(t){d(\"emit readable\"),t.emit(\"readable\"),C(t)}function E(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(k,t,e))}function k(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(\"\"):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;to.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function I(t){var e=t._readableState;if(e.length>0)throw new Error('\"endReadable()\" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(R,e,t))}function R(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit(\"end\"))}function j(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return d(\"read: emitReadable\",e.length,e.ended),0===e.length&&e.ended?I(this):S(this),null;if(0===(t=_(t,e))&&e.ended)return 0===e.length&&I(this),null;var n,i=e.needReadable;return d(\"need readable\",i),(0===e.length||e.length-t0?P(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&I(this)),null!==n&&this.emit(\"data\",n),n},v.prototype._read=function(t){this.emit(\"error\",new Error(\"_read() is not implemented\"))},v.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d(\"pipe count=%d opts=%j\",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?l:v;function c(e,n){d(\"onunpipe\"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d(\"cleanup\"),t.removeListener(\"close\",m),t.removeListener(\"finish\",b),t.removeListener(\"drain\",f),t.removeListener(\"error\",g),t.removeListener(\"unpipe\",c),r.removeListener(\"end\",l),r.removeListener(\"end\",v),r.removeListener(\"data\",y),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function l(){d(\"onend\"),t.end()}o.endEmitted?i.nextTick(u):r.once(\"end\",u),t.on(\"unpipe\",c);var f=function(t){return function(){var e=t._readableState;d(\"pipeOnDrain\",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,\"data\")&&(e.flowing=!0,C(t))}}(r);t.on(\"drain\",f);var h=!1;var p=!1;function y(e){d(\"ondata\"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==j(o.pipes,t))&&!h&&(d(\"false write response, pause\",o.awaitDrain),o.awaitDrain++,p=!0),r.pause())}function g(e){d(\"onerror\",e),v(),t.removeListener(\"error\",g),0===a(t,\"error\")&&t.emit(\"error\",e)}function m(){t.removeListener(\"finish\",b),v()}function b(){d(\"onfinish\"),t.removeListener(\"close\",m),v()}function v(){d(\"unpipe\"),r.unpipe(t)}return r.on(\"data\",y),function(t,e,r){if(\"function\"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,\"error\",g),t.once(\"close\",m),t.once(\"finish\",b),t.emit(\"pipe\",r),o.flowing||(d(\"pipe resume\"),r.resume()),t},v.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\"unpipe\",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error(\"Possible EventEmitter memory leak detected. \"+s.length+\" \"+String(e)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");u.name=\"MaxListenersExceededWarning\",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:\"function\"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(s=e[0]),s instanceof Error)throw s;var a=new Error(\"Unhandled error.\"+(s?\" (\"+s.message+\")\":\"\"));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if(\"function\"==typeof u)o(u,this,e);else{var c=u.length,l=g(u,c);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return\"function\"==typeof t.listenerCount?t.listenerCount(e):y.call(t,e)},a.prototype.listenerCount=y,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){t.exports=r(62).EventEmitter},function(t,e,r){\"use strict\";var n=r(28);function i(t,e){t.emit(\"error\",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,t)):n.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){\"use strict\";(function(e,n,i){var o=r(28);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=b;var a,u=!e.browser&&[\"v0.10\",\"v0.9.\"].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;b.WritableState=m;var c=Object.create(r(21));c.inherits=r(10);var l={deprecate:r(120)},f=r(63),h=r(43).Buffer,d=(void 0!==i?i:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var p,y=r(64);function g(){}function m(t,e){a=a||r(14),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(A,t,e),t._writableState.errorEmitted=!0,t.emit(\"error\",n)):(i(n),t._writableState.errorEmitted=!0,t.emit(\"error\",n),A(t,e))}(t,r,n,e,i);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),n?u(w,t,r,s,i):w(t,r,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(t){if(a=a||r(14),!(p.call(b,this)||this instanceof a))return new b(t);this._writableState=new m(t,this),this.writable=!0,t&&(\"function\"==typeof t.write&&(this._write=t.write),\"function\"==typeof t.writev&&(this._writev=t.writev),\"function\"==typeof t.destroy&&(this._destroy=t.destroy),\"function\"==typeof t.final&&(this._final=t.final)),f.call(this)}function v(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit(\"drain\"))}(t,e),e.pendingcb--,n(),A(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,v(t,e,!0,e.length,i,\"\",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(v(t,e,!1,e.objectMode?1:c.length,c,l,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final((function(r){e.pendingcb--,r&&t.emit(\"error\",r),e.prefinished=!0,t.emit(\"prefinish\"),A(t,e)}))}function A(t,e){var r=_(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||(\"function\"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(S,t,e)):(e.prefinished=!0,t.emit(\"prefinish\")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit(\"finish\"))),r}c.inherits(b,f),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,\"buffer\",{get:l.deprecate((function(){return this.getBuffer()}),\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(t){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===b&&(t&&t._writableState instanceof m)}})):p=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit(\"error\",new Error(\"Cannot pipe, not readable\"))},b.prototype.write=function(t,e,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=t,h.isBuffer(n)||n instanceof d);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),\"function\"==typeof e&&(r=e,e=null),a?e=\"buffer\":e||(e=i.defaultEncoding),\"function\"!=typeof r&&(r=g),i.ended?function(t,e){var r=new Error(\"write after end\");t.emit(\"error\",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError(\"May not write null values to stream\"):\"string\"==typeof r||void 0===r||e.objectMode||(s=new TypeError(\"Invalid non-string/buffer chunk\")),s&&(t.emit(\"error\",s),o.nextTick(n,s),i=!1),i}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||\"string\"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i=\"buffer\",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length-1))throw new TypeError(\"Unknown encoding: \"+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error(\"_write() is not implemented\"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;\"function\"==typeof t?(r=t,t=null,e=null):\"function\"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,A(t,e),r&&(e.finished?o.nextTick(r):t.once(\"finish\",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,\"destroyed\",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(8),r(118).setImmediate,r(3))},function(t,e,r){\"use strict\";var n=r(121).Buffer,i=n.isEncoding||function(t){switch((t=\"\"+t)&&t.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return\"utf8\";for(var e;;)switch(t){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return t;default:if(e)return;t=(\"\"+t).toLowerCase(),e=!0}}(t);if(\"string\"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error(\"Unknown encoding: \"+t);return e||t}(t),this.encoding){case\"utf16le\":this.text=u,this.end=c,e=4;break;case\"utf8\":this.fillLast=a,e=4;break;case\"base64\":this.text=l,this.end=f,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:-1}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,\"�\".repeat(r);if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,\"�\".repeat(r+1);if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,\"�\".repeat(r+2)}}(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString(\"utf16le\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\"utf16le\",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\"utf16le\",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString(\"base64\",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\"base64\",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):\"\";return this.lastNeed?e+this.lastChar.toString(\"base64\",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):\"\"}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return\"\";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString(\"utf8\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\"utf8\",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){\"use strict\";t.exports=s;var n=r(14),i=Object.create(r(21));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit(\"error\",new Error(\"write callback called multiple times\"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.lengthObject(o.a)(r),e)}async decode(t,e){return new Promise((r,n)=>{this.pool.queue(async i=>{try{const n=await i(t,e);r(n)}catch(t){n(t)}})})}destroy(){this.pool.terminate(!0)}}}).call(this,r(133))},function(t,e,r){(function(t){e.fetch=a(t.fetch)&&a(t.ReadableStream),e.writableStream=a(t.WritableStream),e.abortController=a(t.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch(t){}var r;function n(){if(void 0!==r)return r;if(t.XMLHttpRequest){r=new t.XMLHttpRequest;try{r.open(\"GET\",t.XDomainRequest?\"/\":\"https://example.com\")}catch(t){r=null}}else r=null;return r}function i(t){var e=n();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}var o=void 0!==t.ArrayBuffer,s=o&&a(t.ArrayBuffer.prototype.slice);function a(t){return\"function\"==typeof t}e.arraybuffer=e.fetch||o&&i(\"arraybuffer\"),e.msstream=!e.fetch&&s&&i(\"ms-stream\"),e.mozchunkedarraybuffer=!e.fetch&&o&&i(\"moz-chunked-arraybuffer\"),e.overrideMimeType=e.fetch||!!n()&&a(n().overrideMimeType),e.vbArray=a(t.VBArray),r=null}).call(this,r(3))},function(t,e,r){(function(t,n,i){var o=r(69),s=r(10),a=r(42),u=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=e.IncomingMessage=function(e,r,s,u){var c=this;if(a.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on(\"end\",(function(){t.nextTick((function(){c.emit(\"close\")}))})),\"fetch\"===s){if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach((function(t,e){c.headers[e.toLowerCase()]=t,c.rawHeaders.push(e,t)})),o.writableStream){var l=new WritableStream({write:function(t){return new Promise((function(e,r){c._destroyed?r():c.push(new n(t))?e():c._resumeFetch=e}))},close:function(){i.clearTimeout(u),c._destroyed||c.push(null)},abort:function(t){c._destroyed||c.emit(\"error\",t)}});try{return void r.body.pipeTo(l).catch((function(t){i.clearTimeout(u),c._destroyed||c.emit(\"error\",t)}))}catch(t){}}var f=r.body.getReader();!function t(){f.read().then((function(e){if(!c._destroyed){if(e.done)return i.clearTimeout(u),void c.push(null);c.push(new n(e.value)),t()}})).catch((function(t){i.clearTimeout(u),c._destroyed||c.emit(\"error\",t)}))}()}else{if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\\r?\\n/).forEach((function(t){var e=t.match(/^([^:]+):\\s*(.*)/);if(e){var r=e[1].toLowerCase();\"set-cookie\"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(e[2])):void 0!==c.headers[r]?c.headers[r]+=\", \"+e[2]:c.headers[r]=e[2],c.rawHeaders.push(e[1],e[2])}})),c._charset=\"x-user-defined\",!o.overrideMimeType){var h=c.rawHeaders[\"mime-type\"];if(h){var d=h.match(/;\\s*charset=([^;])(;|$)/);d&&(c._charset=d[1].toLowerCase())}c._charset||(c._charset=\"utf-8\")}}};s(c,a.Readable),c.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},c.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case\"text:vbarray\":if(e.readyState!==u.DONE)break;try{r=new i.VBArray(e.responseBody).toArray()}catch(t){}if(null!==r){t.push(new n(r));break}case\"text\":try{r=e.responseText}catch(e){t._mode=\"text:vbarray\";break}if(r.length>t._pos){var o=r.substr(t._pos);if(\"x-user-defined\"===t._charset){for(var s=new n(o.length),a=0;at._pos&&(t.push(new n(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(r)}t._xhr.readyState===u.DONE&&\"ms-stream\"!==t._mode&&t.push(null)}}).call(this,r(8),r(7).Buffer,r(3))},function(t,e,r){\"use strict\";var n=r(46),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push(\"%\"+((e<16?\"0\":\"\")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n1;){var e=t.pop(),r=e.obj[e.prop];if(o(r)){for(var n=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===n.RFC1738&&(40===l||41===l)?u+=a.charAt(c):l<128?u+=s[l]:l<2048?u+=s[192|l>>6]+s[128|63&l]:l<55296||l>=57344?u+=s[224|l>>12]+s[128|l>>6&63]+s[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(c)),u+=s[240|l>>18]+s[128|l>>12&63]+s[128|l>>6&63]+s[128|63&l])}return u},isBuffer:function(t){return!(!t||\"object\"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return\"[object RegExp]\"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var r=[],n=0;ne++t.next());return e.every(({done:t})=>t)?{done:!0}:{done:!1,value:e.map(({value:t})=>t)}}))}}},function(t,e,r){\"use strict\";function n(t){\"+\"===t[0]&&(t=t.substring(1));const e=\"-\"===t[0]?\"-\":\"\";\"-\"===e&&(t=t.substring(1));const r=t.indexOf(\"e\");if(-1===r)return e+t;let n=t.indexOf(\".\");-1===n&&(n=r);const i=Number(t.substring(r+1)),o=t.substring(0,r).replace(\".\",\"\"),s=n+i,a=o.length;if(s>=a){const t=s-a;let r=o;for(let e=0;es;e--)t+=\"0\";return t+=o,e+t}return e+o.substring(0,s)+\".\"+o.substring(s)}t.exports=n,t.exports.default=n},function(t,e,r){\"use strict\";t.exports={MAX_SAFE_INTEGER:9007199254740991}},function(t,e,r){\"use strict\";const n=r(47);function i(t){return\"0\"===t?\"1\":n(\"1\",t)}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";const n=r(4),i=r(0),o=r(9),s=r(22);function a(t){if(-1===(t=i(t)).indexOf(\".\"))return t;const e=s(t);return t=n(t).split(\".\")[0],\"+\"===e?o(t,\"1\"):\"-\"===e?\"0\"===t||\"\"===t?\"0\":\"-\"+t:void 0}t.exports=a,t.exports.default=a},function(t,e,r){\"use strict\";const n=r(51);function i(t){const e=n(t);return[t.replace(/\\./g,\"\").replace(/^0/,\"\"),1+\"0\".repeat(e)]}t.exports=i,t.exports.default=i},function(t,e,r){const n=r(0),i=r(16);function o(t){if(t=n(t),!i(t))throw new Error(\"can't call is_odd on decimal\");return[\"1\",\"3\",\"5\",\"7\",\"9\"].includes(t.charAt(t.length-1))}t.exports=o,t.exports.default=o},function(t,e,r){\"use strict\";const n=r(52),i=r(15),o=r(78),s=r(11),a=r(17),u=r(50);function c(t,{max_decimal_digits:e,infinity_times_zero:r=\"NaN\"}={}){const c=t.some(t=>i(t)),l=t.some(t=>s(t));if(c&&l)return r;if(c){return t.filter(t=>\"-\"===u(t)).length%2==0?\"Infinity\":\"-Infinity\"}if(l)return\"0\";const f=o(t.filter(t=>n(t)).length.toString());let h=a(t.map(t=>t.replace(/i$/,\"\")),{max_decimal_digits:e});return f&&(h+=\"i\"),h}t.exports=c,t.exports.default=c},function(t,e,r){\"use strict\";const n=r(0);function i(t){return\"-\"===(t=n(t))[0]}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";const n=r(1),i=r(165),o=r(166);function s(t,{max_decimal_digits:e=100,fraction:r=!1}={}){if(i(t)){const[i,s]=o(t);return r?s+\"/\"+i:n(s,i,{max_decimal_digits:e})}return r?\"1/\"+t:n(\"1\",t,{max_decimal_digits:e})}t.exports=s,t.exports.default=s},function(t,e,r){\"use strict\";const n=r(0),i=r(16);function o(t){if(t=n(t),!i(t))throw new Error(\"can't call is_even on decimal\");return[\"0\",\"2\",\"4\",\"6\",\"8\"].includes(t.charAt(t.length-1))}t.exports=o,t.exports.default=o},function(t,e,r){\"use strict\";const n=r(76),i=r(84),o=r(1);function s(t,e){const r=i(t);return\"0\"===r?\"0\":n(o(r,e,{max_decimal_digits:1}))}t.exports=s,t.exports.default=s},function(t,e,r){\"use strict\";const n=r(4),i=r(0);function o(t){const e=(t=n(i(t))).indexOf(\".\");return(-1===e?t.length:e).toString()}t.exports=o,t.exports.default=o},function(t,e,r){\"use strict\";const n=r(1),i=r(82),o=r(86),s=r(87);function a(t,e){const r=s(\"2\",o([\"1000\",e,e]));for(;t.endsWith(\"0\")&&e.endsWith(\"0\");)t=t.substring(0,t.length-1),e=e.substring(0,e.length-1);for(;i(t)&&i(e);)t=n(t,\"2\"),e=n(e,\"2\");let a=!0;for(;a;){a=!1;for(let i=0;i\"<\"!==n(r,t)&&\">\"!==n(r,e));let a=\"13\";for(;\">\"!==n(a,e);)/^\\d+5/.test(a)||/^(\\d)\\1+/.test(a)||[\"9\",\"7\",\"3\"].every(t=>!o(i(a,t)))&&r.push(a),a=s(a,\"2\");return r}t.exports=a,t.exports.default=a},function(t,e,r){\"use strict\";const n=r(6),i=r(1);function o({max_decimal_digits:t=100,steps:e=100}={}){let r=\"1\",o=\"1\";for(let s=1;s\":return\"-\"+s(t,e)}else if(r&&!a)switch(e=e.substring(1),n(t,e)){case\"=\":return\"0\";case\"<\":return\"-\"+s(e,t);case\">\":return s(t,e)}}t.exports=a,t.exports.default=a},function(t,e,r){const{MAX_SAFE_INTEGER_LENGTH:n}=r(56);t.exports=function(t,e){const r=t.length,i=e.length,o=t.indexOf(\".\"),s=e.indexOf(\".\"),a=-1===o?r:o,u=-1===s?i:s;if(-1===o&&-1===s&&r0){for(;m>p-f;){const r=t[m-h]||\"0\",n=e[m-d]||\"0\";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,\"\"===y&&0===i||(y=i+y),m--}y&&(y=\".\"+y),m--}if(l>0)for(;m>=0;){const r=t[m-h]||\"0\",n=e[m-d]||\"0\";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,y=i+y,m--}return 1===g&&(y=g+y),\".\"===y[0]&&(y=\"0\"+y),y}},function(t,e,r){const{MAX_SAFE_INTEGER_LENGTH:n}=r(56);t.exports=function(t,e){const r=t.length,i=e.length,o=t.indexOf(\".\"),s=e.indexOf(\".\"),a=-1===o?r:o,u=-1===s?i:s;if(-1===o&&-1===s&&r0){for(;m>p-f;){let r=t[m-h]||\"0\",n=e[m-d]||\"0\";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;\"\"===y&&0===i||(y=i+y),m--}\"\"!==y&&(y=\".\"+y),m--}if(l>0){for(;m>0;){let r=t[m-h]||\"0\",n=e[m-d]||\"0\";r-=g,g=0;let i=r-n;if(i<0)for(;i<0;)g++,i+=10;else g&&g--;y=i+y,m--}const r=t[0-h]||\"0\",n=e[0-d]||\"0\";let i=Number(r)-(g>0?1:0)-Number(n);0!==i&&(y=i+y),y=y.replace(/^0+/,\"\")}return\".\"===y[0]&&(y=\"0\"+y),y}},function(t,e,r){const n=r(18);function i(t){return\"-\"===(t=n(t))[0]?t.substring(1):t}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";t.exports={countIn1D:function(t){return t.reduce((function(t,e){return void 0===t[e]?t[e]=1:t[e]++,t}),{})},countIn2D:function(t){return t.reduce((function(t,e){return e.forEach((function(e){void 0===t[e]?t[e]=1:t[e]++})),t}),{})},unflatten:function(t,e){for(var r=e.height,n=e.width,i=[],o=0;o>24)/500+a,c=a-(t[e+2]<<24>>24)/200;u=.95047*(u*u*u>.008856?u*u*u:(u-16/116)/7.787),a=1*(a*a*a>.008856?a*a*a:(a-16/116)/7.787),c=1.08883*(c*c*c>.008856?c*c*c:(c-16/116)/7.787),i=3.2406*u+-1.5372*a+-.4986*c,o=-.9689*u+1.8758*a+.0415*c,s=.0557*u+-.204*a+1.057*c,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,n[r]=255*Math.max(0,Math.min(1,i)),n[r+1]=255*Math.max(0,Math.min(1,o)),n[r+2]=255*Math.max(0,Math.min(1,s))}return n}function S(t,e){let r=t.length-e,n=0;do{for(let r=e;r>0;r--)t[n+e]+=t[n],n++;r-=e}while(r>0)}function A(t,e,r){let n=0,i=t.length;const o=i/r;for(;i>e;){for(let r=e;r>0;--r)t[n+e]+=t[n],++n;i-=e}const s=t.slice();for(let e=0;e=t.byteLength);++o){let n;if(2===e){switch(i[0]){case 8:n=new Uint8Array(t,o*a*r*s,a*r*s);break;case 16:n=new Uint16Array(t,o*a*r*s,a*r*s/2);break;case 32:n=new Uint32Array(t,o*a*r*s,a*r*s/4);break;default:throw new Error(`Predictor 2 not allowed with ${i[0]} bits per sample.`)}S(n,a)}else 3===e&&(n=new Uint8Array(t,o*a*r*s,a*r*s),A(n,a,s))}return t}(r,n,e?t.TileWidth:t.ImageWidth,e?t.TileLength:t.RowsPerStrip||t.ImageLength,t.BitsPerSample,t.PlanarConfiguration)}return r}}class k extends E{decodeBlock(t){return t}}function T(t,e){for(let r=e.length-1;r>=0;r--)t.push(e[r]);return t}function O(t){const e=new Uint16Array(4093),r=new Uint8Array(4093);for(let t=0;t<=257;t++)e[t]=4096,r[t]=t;let n=258,i=9,o=0;function s(){n=258,i=9}function a(t){const e=function(t,e,r){const n=e%8,i=Math.floor(e/8),o=8-n,s=e+r-8*(i+1);let a=8*(i+2)-(e+r);const u=8*(i+2)-e;if(a=Math.max(0,a),i>=t.length)return console.warn(\"ran off the end of the buffer before finding EOI_CODE (end on input code)\"),257;let c=t[i]&2**(8-n)-1;c<<=r-o;let l=c;if(i+1>>a;e<<=Math.max(0,r-u),l+=e}if(s>8&&i+2>>n}return l}(t,o,i);return o+=i,e}function u(t,i){return r[n]=i,e[n]=t,n++,n-1}function c(t){const n=[];for(let i=t;4096!==i;i=e[i])n.push(r[i]);return n}const l=[];s();const f=new Uint8Array(t);let h,d=a(f);for(;257!==d;){if(256===d){for(s(),d=a(f);256===d;)d=a(f);if(257===d)break;if(d>256)throw new Error(\"corrupted code at scanline \"+d);T(l,c(d)),h=d}else if(d=2**i&&(12===i?h=void 0:i++),d=a(f)}return new Uint8Array(l)}class C extends E{decodeBlock(t){return O(t).buffer}}const P=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function I(t,e){let r=0;const n=[];let i=16;for(;i>0&&!t[i-1];)--i;n.push({children:[],index:0});let o,s=n[0];for(let a=0;a0;)s=n.pop();for(s.index++,n.push(s);n.length<=a;)n.push(o={children:[],index:0}),s.children[s.index]=o.children,s=o;r++}a+10)return p--,d>>p&1;if(d=t[h++],255===d){const e=t[h++];if(e)throw new Error(\"unexpected marker: \"+(d<<8|e).toString(16))}return p=7,d>>>7}function g(t){let e,r=t;for(;null!==(e=y());){if(r=r[e],\"number\"==typeof r)return r;if(\"object\"!=typeof r)throw new Error(\"invalid huffman sequence\")}return null}function m(t){let e=t,r=0;for(;e>0;){const t=y();if(null===t)return;r=r<<1|t,--e}return r}function b(t){const e=m(t);return e>=1<0)return void v--;let r=o;const n=s;for(;r<=n;){const n=g(t.huffmanTableAC),i=15&n,o=n>>4;if(0===i){if(o<15){v=m(o)+(1<>4,0===r)i<15?(v=m(i)+(1<>4;if(0===n){if(o<15)break;i+=16}else{i+=o;e[P[i]]=b(n),i++}}};let R,j,M=0;j=1===A?n[0].blocksPerLine*n[0].blocksPerColumn:c*r.mcusPerColumn;const L=i||j;for(;M=65488&&R<=65495))break;h+=2}return h-f}function j(t,e){const r=[],{blocksPerLine:n,blocksPerColumn:i}=e,o=n<<3,s=new Int32Array(64),a=new Uint8Array(64);function u(t,r,n){const i=e.quantizationTable;let o,s,a,u,c,l,f,h,d;const p=n;let y;for(y=0;y<64;y++)p[y]=t[y]*i[y];for(y=0;y<8;++y){const t=8*y;0!==p[1+t]||0!==p[2+t]||0!==p[3+t]||0!==p[4+t]||0!==p[5+t]||0!==p[6+t]||0!==p[7+t]?(o=5793*p[0+t]+128>>8,s=5793*p[4+t]+128>>8,a=p[2+t],u=p[6+t],c=2896*(p[1+t]-p[7+t])+128>>8,h=2896*(p[1+t]+p[7+t])+128>>8,l=p[3+t]<<4,f=p[5+t]<<4,d=o-s+1>>1,o=o+s+1>>1,s=d,d=3784*a+1567*u+128>>8,a=1567*a-3784*u+128>>8,u=d,d=c-f+1>>1,c=c+f+1>>1,f=d,d=h+l+1>>1,l=h-l+1>>1,h=d,d=o-u+1>>1,o=o+u+1>>1,u=d,d=s-a+1>>1,s=s+a+1>>1,a=d,d=2276*c+3406*h+2048>>12,c=3406*c-2276*h+2048>>12,h=d,d=799*l+4017*f+2048>>12,l=4017*l-799*f+2048>>12,f=d,p[0+t]=o+h,p[7+t]=o-h,p[1+t]=s+f,p[6+t]=s-f,p[2+t]=a+l,p[5+t]=a-l,p[3+t]=u+c,p[4+t]=u-c):(d=5793*p[0+t]+512>>10,p[0+t]=d,p[1+t]=d,p[2+t]=d,p[3+t]=d,p[4+t]=d,p[5+t]=d,p[6+t]=d,p[7+t]=d)}for(y=0;y<8;++y){const t=y;0!==p[8+t]||0!==p[16+t]||0!==p[24+t]||0!==p[32+t]||0!==p[40+t]||0!==p[48+t]||0!==p[56+t]?(o=5793*p[0+t]+2048>>12,s=5793*p[32+t]+2048>>12,a=p[16+t],u=p[48+t],c=2896*(p[8+t]-p[56+t])+2048>>12,h=2896*(p[8+t]+p[56+t])+2048>>12,l=p[24+t],f=p[40+t],d=o-s+1>>1,o=o+s+1>>1,s=d,d=3784*a+1567*u+2048>>12,a=1567*a-3784*u+2048>>12,u=d,d=c-f+1>>1,c=c+f+1>>1,f=d,d=h+l+1>>1,l=h-l+1>>1,h=d,d=o-u+1>>1,o=o+u+1>>1,u=d,d=s-a+1>>1,s=s+a+1>>1,a=d,d=2276*c+3406*h+2048>>12,c=3406*c-2276*h+2048>>12,h=d,d=799*l+4017*f+2048>>12,l=4017*l-799*f+2048>>12,f=d,p[0+t]=o+h,p[56+t]=o-h,p[8+t]=s+f,p[48+t]=s-f,p[16+t]=a+l,p[40+t]=a-l,p[24+t]=u+c,p[32+t]=u-c):(d=5793*n[y+0]+8192>>14,p[0+t]=d,p[8+t]=d,p[16+t]=d,p[24+t]=d,p[32+t]=d,p[40+t]=d,p[48+t]=d,p[56+t]=d)}for(y=0;y<64;++y){const t=128+(p[y]+8>>4);r[y]=t<0?0:t>255?255:t}}for(let t=0;t>4==0)for(let r=0;r<64;r++){i[P[r]]=t[e++]}else{if(n>>4!=1)throw new Error(\"DQT: invalid table spec\");for(let t=0;t<64;t++){i[P[t]]=r()}}this.quantizationTables[15&n]=i}break}case 65472:case 65473:case 65474:{r();const n={extended:65473===o,progressive:65474===o,precision:t[e++],scanLines:r(),samplesPerLine:r(),components:{},componentsOrder:[]},s=t[e++];let a;for(let r=0;r>4,i=15&t[e+1],o=t[e+2];n.componentsOrder.push(a),n.components[a]={h:r,v:i,quantizationIdx:o},e+=3}i(n),this.frames.push(n);break}case 65476:{const n=r();for(let r=2;r>4==0?this.huffmanTablesDC[15&n]=I(i,s):this.huffmanTablesAC[15&n]=I(i,s)}break}case 65501:r(),this.resetInterval=r();break;case 65498:{r();const n=t[e++],i=[],o=this.frames[0];for(let r=0;r>4],r.huffmanTableAC=this.huffmanTablesAC[15&n],i.push(r)}const s=t[e++],a=t[e++],u=t[e++],c=R(t,e,o,i,this.resetInterval,s,a,u>>4,15&u);e+=c;break}case 65535:255!==t[e]&&e--;break;default:if(255===t[e-3]&&t[e-2]>=192&&t[e-2]<=254){e-=3;break}throw new Error(\"unknown JPEG marker \"+o.toString(16))}o=r()}}getResult(){const{frames:t}=this;if(0===this.frames.length)throw new Error(\"no frames were decoded\");this.frames.length>1&&console.warn(\"more than one frame is not supported\");for(let t=0;t{const a=B(t,n,i);for(let u=0;u{const a=B(t,n,i);for(let u=0;u=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${t} is out of range.`);const e=this.fileDirectory.BitsPerSample[t];if(e%8!=0)throw new Error(`Sample bit-width of ${e} is not supported.`);return e/8}getReaderForSample(t){const e=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,r=this.fileDirectory.BitsPerSample[t];switch(e){case 1:switch(r){case 8:return DataView.prototype.getUint8;case 16:return DataView.prototype.getUint16;case 32:return DataView.prototype.getUint32}break;case 2:switch(r){case 8:return DataView.prototype.getInt8;case 16:return DataView.prototype.getInt16;case 32:return DataView.prototype.getInt32}break;case 3:switch(r){case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error(\"Unsupported data format/bitsPerSample\")}getArrayForSample(t,e){return W(this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,this.fileDirectory.BitsPerSample[t],e)}async getTileOrStrip(t,e,r,n){const i=Math.ceil(this.getWidth()/this.getTileWidth()),o=Math.ceil(this.getHeight()/this.getTileHeight());let s;const{tiles:a}=this;let u,c;1===this.planarConfiguration?s=e*i+t:2===this.planarConfiguration&&(s=r*i*o+e*i+t),this.isTiled?(u=this.fileDirectory.TileOffsets[s],c=this.fileDirectory.TileByteCounts[s]):(u=this.fileDirectory.StripOffsets[s],c=this.fileDirectory.StripByteCounts[s]);const l=await this.source.fetch(u,c);let f;return null===a?f=n.decode(this.fileDirectory,l):a[s]||(f=n.decode(this.fileDirectory,l),a[s]=f),{x:t,y:e,sample:r,data:await f}}async _readRaster(t,e,r,n,i,o,s,a){const u=this.getTileWidth(),c=this.getTileHeight(),l=Math.max(Math.floor(t[0]/u),0),f=Math.min(Math.ceil(t[2]/u),Math.ceil(this.getWidth()/this.getTileWidth())),h=Math.max(Math.floor(t[1]/c),0),d=Math.min(Math.ceil(t[3]/c),Math.ceil(this.getHeight()/this.getTileHeight())),p=t[2]-t[0];let y=this.getBytesPerPixel();const g=[],m=[];for(let t=0;t{const o=i.data,s=new DataView(o),a=i.y*c,f=i.x*u,h=(i.y+1)*c,d=(i.x+1)*u,b=m[l],w=Math.min(c,c-(h-t[3])),x=Math.min(u,u-(d-t[2]));for(let i=Math.max(0,t[1]-a);iu[2]||u[1]>u[3])throw new Error(\"Invalid subsets\");const c=(u[2]-u[0])*(u[3]-u[1]);if(e&&e.length){for(let t=0;t=this.fileDirectory.SamplesPerPixel)return Promise.reject(new RangeError(`Invalid sample index '${e[t]}'.`))}else for(let t=0;ts[2]||s[1]>s[3])throw new Error(\"Invalid subsets\");const a=this.fileDirectory.PhotometricInterpretation;if(a===d.RGB){let i=[0,1,2];if(this.fileDirectory.ExtraSamples!==p.Unspecified&&o){i=[];for(let t=0;t\"Item\"===t.tagName);t&&(o=o.filter(e=>Number(e.attributes.sample)===t));for(let t=0;t0;let i=!0;for(let o=0;o<8;o++){let s=this._dataView.getUint8(t+(e?o:7-o));n&&(i?0!==s&&(s=255&~(s-1),i=!1):s=255&~s),r+=s*256**o}return n&&(r=-r),r}getUint8(t,e){return this._dataView.getUint8(t,e)}getInt8(t,e){return this._dataView.getInt8(t,e)}getUint16(t,e){return this._dataView.getUint16(t,e)}getInt16(t,e){return this._dataView.getInt16(t,e)}getUint32(t,e){return this._dataView.getUint32(t,e)}getInt32(t,e){return this._dataView.getInt32(t,e)}getFloat32(t,e){return this._dataView.getFloat32(t,e)}getFloat64(t,e){return this._dataView.getFloat64(t,e)}}class K{constructor(t,e,r,n){this._dataView=new DataView(t),this._sliceOffset=e,this._littleEndian=r,this._bigTiff=n}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(t,e){return this.sliceOffset<=t&&this.sliceTop>=t+e}readUint8(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}readInt8(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}readUint16(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}readInt16(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}readUint32(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}readInt32(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}readFloat32(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}readFloat64(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}readUint64(t){const e=this.readUint32(t),r=this.readUint32(t+4);let n;if(this._littleEndian){if(n=e+2**32*r,!Number.isSafeInteger(n))throw new Error(n+\" exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues\");return n}if(n=2**32*e+r,!Number.isSafeInteger(n))throw new Error(n+\" exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues\");return n}readInt64(t){let e=0;const r=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0;let n=!0;for(let i=0;i<8;i++){let o=this._dataView.getUint8(t+(this._littleEndian?i:7-i));r&&(n?0!==o&&(o=255&~(o-1),n=!1):o=255&~o),e+=o*256**i}return r&&(e=-e),e}readOffset(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}var Y=r(68),Z=r(7),X=r(25),Q=r(40),J=r.n(Q),tt=r(106),et=r.n(tt),rt=r(39),nt=r.n(rt);class it{constructor(t,{blockSize:e=65536}={}){this.retrievalFunction=t,this.blockSize=e,this.blockRequests=new Map,this.blocks=new Map,this.blockIdsAwaitingRequest=null}async fetch(t,e,r=!1){const n=t+e,i=[],o=[],s=[];for(let e=Math.floor(t/this.blockSize)*this.blockSize;esetTimeout(e,t))}(),this.blockIdsAwaitingRequest){const t=function(t){if(0===t.length)return[];const e=[];let r=[];e.push(r);for(let n=0;n{const e=await t,i=r*this.blockSize,o=Math.min(i+this.blockSize,e.data.byteLength),s=e.data.slice(i,o);this.blockRequests.delete(n),this.blocks.set(n,{data:s,offset:e.offset+i,length:s.byteLength,top:e.offset+o})})())}}this.blockIdsAwaitingRequest=null}const a=[];for(const t of o)this.blockRequests.has(t)&&a.push(this.blockRequests.get(t));await Promise.all(a),await Promise.all(s);return function(t,e,r){const n=e+r,i=new ArrayBuffer(r),o=new Uint8Array(i);for(const r of t){const t=r.offset-e,i=r.top-n;let s,a=0,u=0;t<0?a=-t:t>0&&(u=t),s=i<0?r.length-a:n-r.offset-a;const c=new Uint8Array(r.data,a,s);o.set(c,u)}return i}(i.map(t=>this.blocks.get(t)),t,e)}async requestData(t,e){const r=await this.retrievalFunction(t,e);return r.length?r.length!==r.data.byteLength&&(r.data=r.data.slice(0,r.length)):r.length=r.data.byteLength,r.top=r.offset+r.length,r}}function ot(t,e){const{forceXHR:r}=e;if(\"function\"==typeof fetch&&!r)return function(t,{headers:e={},blockSize:r}={}){return new it(async(r,n)=>{const i=await fetch(t,{headers:{...e,Range:`bytes=${r}-${r+n-1}`}});if(i.ok){if(206===i.status){return{data:i.arrayBuffer?await i.arrayBuffer():(await i.buffer()).buffer,offset:r,length:n}}{const t=i.arrayBuffer?await i.arrayBuffer():(await i.buffer()).buffer;return{data:t,offset:0,length:t.byteLength}}}throw new Error(\"Error fetching data.\")},{blockSize:r})}(t,e);if(\"undefined\"!=typeof XMLHttpRequest)return function(t,{headers:e={},blockSize:r}={}){return new it(async(r,n)=>new Promise((i,o)=>{const s=new XMLHttpRequest;s.open(\"GET\",t),s.responseType=\"arraybuffer\";const a={...e,Range:`bytes=${r}-${r+n-1}`};for(const[t,e]of Object.entries(a))s.setRequestHeader(t,e);s.onload=()=>{const t=s.response;206===s.status?i({data:t,offset:r,length:n}):i({data:t,offset:0,length:t.byteLength})},s.onerror=o,s.send()}),{blockSize:r})}(t,e);if(J.a.get)return function(t,{headers:e={},blockSize:r}={}){return new it(async(r,n)=>new Promise((i,o)=>{const s=nt.a.parse(t);(\"http:\"===s.protocol?J.a:et.a).get({...s,headers:{...e,Range:`bytes=${r}-${r+n-1}`}},t=>{const e=[];t.on(\"data\",t=>{e.push(t)}),t.on(\"end\",()=>{const t=Z.Buffer.concat(e).buffer;i({data:t,offset:r,length:t.byteLength})})}).on(\"error\",o)}),{blockSize:r})}(t,e);throw new Error(\"No remote source available\")}function st(t){const e=function(t,e,r){return new Promise((n,i)=>{Object(X.open)(t,e,r,(t,e)=>{t?i(t):n(e)})})}(t,\"r\");return{async fetch(t,r){const n=await e,{buffer:i}=await function(...t){return new Promise((e,r)=>{Object(X.read)(...t,(t,n,i)=>{t?r(t):e({bytesRead:n,buffer:i})})})}(n,Z.Buffer.alloc(r),0,r,t);return i.buffer},async close(){const t=await e;return await function(t){return new Promise((e,r)=>{Object(X.close)(t,t=>{t?r(t):e()})})}(t)}}}function at(t,e){for(const r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}function ut(t,e){if(t.length{let r=e;for(;0!==t[r];)r++;return r},readUshort:(t,e)=>t[e]<<8|t[e+1],readShort:(t,e)=>{const r=yt.ui8;return r[0]=t[e+1],r[1]=t[e+0],yt.i16[0]},readInt:(t,e)=>{const r=yt.ui8;return r[0]=t[e+3],r[1]=t[e+2],r[2]=t[e+1],r[3]=t[e+0],yt.i32[0]},readUint:(t,e)=>{const r=yt.ui8;return r[0]=t[e+3],r[1]=t[e+2],r[2]=t[e+1],r[3]=t[e+0],yt.ui32[0]},readASCII:(t,e,r)=>r.map(r=>String.fromCharCode(t[e+r])).join(\"\"),readFloat:(t,e)=>{const r=yt.ui8;return lt(4,n=>{r[n]=t[e+3-n]}),yt.fl32[0]},readDouble:(t,e)=>{const r=yt.ui8;return lt(8,n=>{r[n]=t[e+7-n]}),yt.fl64[0]},writeUshort:(t,e,r)=>{t[e]=r>>8&255,t[e+1]=255&r},writeUint:(t,e,r)=>{t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=r>>0&255},writeASCII:(t,e,r)=>{lt(r.length,n=>{t[e+n]=r.charCodeAt(n)})},ui8:new Uint8Array(8)};yt.fl64=new Float64Array(yt.ui8.buffer),yt.writeDouble=(t,e,r)=>{yt.fl64[0]=r,lt(8,r=>{t[e+r]=yt.ui8[7-r]})};const gt=t=>{const e=new Uint8Array(1e3);let r=4;const n=yt;e[0]=77,e[1]=77,e[3]=42;let i=8;if(n.writeUint(e,r,i),r+=4,t.forEach((r,o)=>{const s=((t,e,r,n)=>{let i=r;const o=Object.keys(n).filter(t=>null!=t&&\"undefined\"!==t);t.writeUshort(e,i,o.length),i+=2;let s=i+12*o.length+4;for(const r of o){let o=null;\"number\"==typeof r?o=r:\"string\"==typeof r&&(o=parseInt(r,10));const a=c[o],u=pt[a];if(null==a||void 0===a||void 0===a)throw new Error(\"unknown type of tag: \"+o);let l=n[r];if(void 0===l)throw new Error(\"failed to get value for key \"+r);\"ASCII\"===a&&\"string\"==typeof l&&!1===ut(l,\"\\0\")&&(l+=\"\\0\");const f=l.length;t.writeUshort(e,i,o),i+=2,t.writeUshort(e,i,u),i+=2,t.writeUint(e,i,f),i+=4;let h=[-1,1,1,2,4,8,0,0,0,0,0,0,8][u]*f,d=i;h>4&&(t.writeUint(e,i,s),d=s),\"ASCII\"===a?t.writeASCII(e,d,l):\"SHORT\"===a?lt(f,r=>{t.writeUshort(e,d+2*r,l[r])}):\"LONG\"===a?lt(f,r=>{t.writeUint(e,d+4*r,l[r])}):\"RATIONAL\"===a?lt(f,r=>{t.writeUint(e,d+8*r,Math.round(1e4*l[r])),t.writeUint(e,d+8*r+4,1e4)}):\"DOUBLE\"===a&<(f,r=>{t.writeDouble(e,d+8*r,l[r])}),h>4&&(h+=1&h,s+=h),i+=4}return[i,s]})(n,e,i,r);i=s[1],o{lt(i,r=>{lt(n,n=>{o.push(t[n][e][r])})})})),e.ImageLength=r,delete e.height,e.ImageWidth=i,delete e.width,e.BitsPerSample||(e.BitsPerSample=lt(n,()=>8)),mt.forEach(t=>{const r=t[0];if(!e[r]){const n=t[1];e[r]=n}}),e.PhotometricInterpretation||(e.PhotometricInterpretation=3===e.BitsPerSample.length?2:1),e.SamplesPerPixel||(e.SamplesPerPixel=[n]),e.StripByteCounts||(e.StripByteCounts=[n*r*i]),e.ModelPixelScale||(e.ModelPixelScale=[360/i,180/r,0]),e.SampleFormat||(e.SampleFormat=lt(n,()=>1));const s=Object.keys(e).filter(t=>ut(t,\"GeoKey\")).sort((t,e)=>dt[t]-dt[e]);if(!e.GeoKeyDirectory){const t=[1,1,0,s.length];s.forEach(r=>{const n=Number(dt[r]);let i,o,s;t.push(n),\"SHORT\"===c[n]?(i=1,o=0,s=e[r]):\"GeogCitationGeoKey\"===r?(i=e.GeoAsciiParams.length,o=Number(dt.GeoAsciiParams),s=0):console.log(\"[geotiff.js] couldn't get TIFFTagLocation for \"+r),t.push(o),t.push(i),t.push(s)}),e.GeoKeyDirectory=t}for(const t in s)s.hasOwnProperty(t)&&delete e[t];[\"Compression\",\"ExtraSamples\",\"GeographicTypeGeoKey\",\"GTModelTypeGeoKey\",\"GTRasterTypeGeoKey\",\"ImageLength\",\"ImageWidth\",\"PhotometricInterpretation\",\"PlanarConfiguration\",\"ResolutionUnit\",\"SamplesPerPixel\",\"XPosition\",\"YPosition\"].forEach(t=>{var r;e[t]&&(e[t]=(r=e[t],Array.isArray(r)?r:[r]))});const a=(t=>{const e={};for(const r in t)\"StripOffsets\"!==r&&(dt[r]||console.error(r,\"not in name2code:\",Object.keys(dt)),e[dt[r]]=t[r]);return e})(e);return((t,e,r,n)=>{if(null==r)throw new Error(\"you passed into encodeImage a width of type \"+r);if(null==e)throw new Error(\"you passed into encodeImage a width of type \"+e);const i={256:[e],257:[r],273:[1e3],278:[r],305:\"geotiff.js\"};if(n)for(const t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);const o=new Uint8Array(gt([i])),s=new Uint8Array(t),a=i[277],u=new Uint8Array(1e3+e*r*a);return lt(o.length,t=>{u[t]=o[t]}),function(t,e){const{length:r}=t;for(let n=0;n{u[1e3+e]=t}),u.buffer})(o,i,r,a)}class vt{log(){}info(){}warn(){}error(){}time(){}timeEnd(){}}let wt=new vt;function xt(t=new vt){wt=t}function _t(t){switch(t){case h.BYTE:case h.ASCII:case h.SBYTE:case h.UNDEFINED:return 1;case h.SHORT:case h.SSHORT:return 2;case h.LONG:case h.SLONG:case h.FLOAT:case h.IFD:return 4;case h.RATIONAL:case h.SRATIONAL:case h.DOUBLE:case h.LONG8:case h.SLONG8:case h.IFD8:return 8;default:throw new RangeError(\"Invalid field type: \"+t)}}function St(t,e,r,n){let i=null,o=null;const s=_t(e);switch(e){case h.BYTE:case h.ASCII:case h.UNDEFINED:i=new Uint8Array(r),o=t.readUint8;break;case h.SBYTE:i=new Int8Array(r),o=t.readInt8;break;case h.SHORT:i=new Uint16Array(r),o=t.readUint16;break;case h.SSHORT:i=new Int16Array(r),o=t.readInt16;break;case h.LONG:case h.IFD:i=new Uint32Array(r),o=t.readUint32;break;case h.SLONG:i=new Int32Array(r),o=t.readInt32;break;case h.LONG8:case h.IFD8:i=new Array(r),o=t.readUint64;break;case h.SLONG8:i=new Array(r),o=t.readInt64;break;case h.RATIONAL:i=new Uint32Array(2*r),o=t.readUint32;break;case h.SRATIONAL:i=new Int32Array(2*r),o=t.readInt32;break;case h.FLOAT:i=new Float32Array(r),o=t.readFloat32;break;case h.DOUBLE:i=new Float64Array(r),o=t.readFloat64;break;default:throw new RangeError(\"Invalid field type: \"+e)}if(e!==h.RATIONAL&&e!==h.SRATIONAL)for(let e=0;et.getWidth()-e.getWidth());for(let e=0;en||o&&o>s)break}}let f=e;if(s){const[t,e]=a.getOrigin(),[r,n]=u.getResolution(a);f=[Math.round((s[0]-t)/r),Math.round((s[1]-e)/n),Math.round((s[2]-t)/r),Math.round((s[3]-e)/n)],f=[Math.min(f[0],f[2]),Math.min(f[1],f[3]),Math.max(f[0],f[2]),Math.max(f[1],f[3])]}return u.readRasters({...t,window:f})}}class Tt extends kt{constructor(t,e,r,n,i={}){super(),this.source=t,this.littleEndian=e,this.bigTiff=r,this.firstIFDOffset=n,this.cache=i.cache||!1,this.ifdRequests=[],this.ghostValues=null}async getSlice(t,e){const r=this.bigTiff?4048:1024;return new K(await this.source.fetch(t,void 0!==e?e:r),t,this.littleEndian,this.bigTiff)}async parseFileDirectoryAt(t){const e=this.bigTiff?20:12,r=this.bigTiff?8:2;let n=await this.getSlice(t);const i=this.bigTiff?n.readUint64(t):n.readUint16(t),o=i*e+(this.bigTiff?16:6);n.covers(t,o)||(n=await this.getSlice(t,o));const s={};let u=t+(this.bigTiff?8:2);for(let t=0;t{const e=await this.ifdRequests[t-1];if(0===e.nextIFDByteOffset)throw new Et(t);return this.parseFileDirectoryAt(e.nextIFDByteOffset)})(),this.ifdRequests[t]}async getImage(t=0){const e=await this.requestIFD(t);return new V(e.fileDirectory,e.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)}async getImageCount(){let t=0,e=!0;for(;e;)try{await this.requestIFD(t),++t}catch(t){if(!(t instanceof Et))throw t;e=!1}return t}async getGhostValues(){const t=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;const e=\"GDAL_STRUCTURAL_METADATA_SIZE=\",r=e.length+100;let n=await this.getSlice(t,r);if(e===St(n,h.ASCII,e.length,t)){const e=St(n,h.ASCII,r,t).split(\"\\n\")[0],i=Number(e.split(\"=\")[1].split(\" \")[0])+e.length;i>r&&(n=await this.getSlice(t,i));const o=St(n,h.ASCII,i,t);this.ghostValues={},o.split(\"\\n\").filter(t=>t.length>0).map(t=>t.split(\"=\")).forEach(([t,e])=>{this.ghostValues[t]=e})}return this.ghostValues}static async fromSource(t,e){const r=await t.fetch(0,1024),n=new $(r),i=n.getUint16(0,0);let o;if(18761===i)o=!0;else{if(19789!==i)throw new TypeError(\"Invalid byte order value.\");o=!1}const s=n.getUint16(2,o);let a;if(42===s)a=!1;else{if(43!==s)throw new TypeError(\"Invalid magic number.\");a=!0;if(8!==n.getUint16(4,o))throw new Error(\"Unsupported offset byte-size.\")}const u=a?n.getUint64(8,o):n.getUint32(4,o);return new Tt(t,o,a,u,e)}close(){return\"function\"==typeof this.source.close&&this.source.close()}}e.default=Tt;class Ot extends kt{constructor(t,e){super(),this.mainFile=t,this.overviewFiles=e,this.imageFiles=[t].concat(e),this.fileDirectoriesPerFile=null,this.fileDirectoriesPerFileParsing=null,this.imageCount=null}async parseFileDirectoriesPerFile(){const t=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map(t=>t.parseFileDirectoryAt(t.firstIFDOffset)));return this.fileDirectoriesPerFile=await Promise.all(t),this.fileDirectoriesPerFile}async getImage(t=0){await this.getImageCount(),await this.parseFileDirectoriesPerFile();let e=0,r=0;for(let n=0;nt.getImageCount()));return this.imageCounts=await Promise.all(t),this.imageCount=this.imageCounts.reduce((t,e)=>t+e,0),this.imageCount}}async function Ct(t,e={}){return Tt.fromSource(ot(t,e))}async function Pt(t){return Tt.fromSource(function(t){return{fetch:async(e,r)=>t.slice(e,e+r)}}(t))}async function It(t){return Tt.fromSource(st(t))}async function Rt(t){return Tt.fromSource((e=t,{fetch:async(t,r)=>new Promise((n,i)=>{const o=e.slice(t,t+r),s=new FileReader;s.onload=t=>n(t.target.result),s.onerror=i,s.readAsArrayBuffer(o)})}));var e}async function jt(t,e=[],r={}){const n=await Tt.fromSource(ot(t,r)),i=await Promise.all(e.map(t=>Tt.fromSource(ot(t,r))));return new Ot(n,i)}async function Mt(t,e){return bt(t,e)}},function(t,e,r){function n(t,e){\"use strict\";var r=(e=e||{}).pos||0,i=\"<\".charCodeAt(0),o=\">\".charCodeAt(0),s=\"-\".charCodeAt(0),a=\"/\".charCodeAt(0),u=\"!\".charCodeAt(0),c=\"'\".charCodeAt(0),l='\"'.charCodeAt(0);function f(){for(var e=[];t[r];)if(t.charCodeAt(r)==i){if(t.charCodeAt(r+1)===a)return(r=t.indexOf(\">\",r))+1&&(r+=1),e;if(t.charCodeAt(r+1)===u){if(t.charCodeAt(r+2)==s){for(;-1!==r&&(t.charCodeAt(r)!==o||t.charCodeAt(r-1)!=s||t.charCodeAt(r-2)!=s||-1==r);)r=t.indexOf(\">\",r+1);-1===r&&(r=t.length)}else for(r+=2;t.charCodeAt(r)!==o&&t[r];)r++;r++;continue}var n=y();e.push(n)}else{var c=h();c.trim().length>0&&e.push(c),r++}return e}function h(){var e=r;return-2===(r=t.indexOf(\"<\",r)-1)&&(r=t.length),t.slice(e,r+1)}function d(){for(var e=r;-1===\"\\n\\t>/= \".indexOf(t[r])&&t[r];)r++;return t.slice(e,r)}var p=e.noChildNodes||[\"img\",\"br\",\"input\",\"meta\",\"link\"];function y(){r++;const e=d(),n={};let i=[];for(;t.charCodeAt(r)!==o&&t[r];){var s=t.charCodeAt(r);if(s>64&&s<91||s>96&&s<123){for(var u=d(),h=t.charCodeAt(r);h&&h!==c&&h!==l&&!(h>64&&h<91||h>96&&h<123)&&h!==o;)r++,h=t.charCodeAt(r);if(h===c||h===l){var y=g();if(-1===r)return{tagName:e,attributes:n,children:i}}else y=null,r--;n[u]=y}r++}if(t.charCodeAt(r-1)!==a)if(\"script\"==e){var m=r+1;r=t.indexOf(\"<\\/script>\",r),i=[t.slice(m,r-1)],r+=9}else if(\"style\"==e){m=r+1;r=t.indexOf(\"\",r),i=[t.slice(m,r-1)],r+=8}else-1==p.indexOf(e)&&(r++,i=f());else r++;return{tagName:e,attributes:n,children:i}}function g(){var e=t[r],n=++r;return r=t.indexOf(e,n),t.slice(n,r)}var m,b=null;if(void 0!==e.attrValue){e.attrName=e.attrName||\"id\";for(b=[];-1!==(m=void 0,m=new RegExp(\"\\\\s\"+e.attrName+\"\\\\s*=['\\\"]\"+e.attrValue+\"['\\\"]\").exec(t),r=m?m.index:-1);)-1!==(r=t.lastIndexOf(\"<\",r))&&b.push(y()),t=t.substr(r),r=0}else b=e.parseNode?y():f();return e.filter&&(b=n.filter(b,e.filter)),e.setPos&&(b.pos=r),b}n.simplify=function(t){var e={};if(!t.length)return\"\";if(1===t.length&&\"string\"==typeof t[0])return t[0];for(var r in t.forEach((function(t){if(\"object\"==typeof t){e[t.tagName]||(e[t.tagName]=[]);var r=n.simplify(t.children||[]);e[t.tagName].push(r),t.attributes&&(r._attributes=t.attributes)}})),e)1==e[r].length&&(e[r]=e[r][0]);return e},n.filter=function(t,e){var r=[];return t.forEach((function(t){if(\"object\"==typeof t&&e(t)&&r.push(t),t.children){var i=n.filter(t.children,e);r=r.concat(i)}})),r},n.stringify=function(t){var e=\"\";function r(t){if(t)for(var r=0;r\",r(t.children),e+=\"\"+t.tagName+\">\"}return r(t),e},n.toContentString=function(t){if(Array.isArray(t)){var e=\"\";return t.forEach((function(t){e=(e+=\" \"+n.toContentString(t)).trim()})),e}return\"object\"==typeof t?n.toContentString(t.children):\" \"+t},n.getElementById=function(t,e,r){var i=n(t,{attrValue:e});return r?n.simplify(i):i[0]},n.getElementsByClassName=function(t,e,r){const i=n(t,{attrName:\"class\",attrValue:\"[a-zA-Z0-9-s ]*\"+e+\"[a-zA-Z0-9-s ]*\"});return r?n.simplify(i):i},n.parseStream=function(t,e){if(\"string\"==typeof e&&(e=e.length+2),\"string\"==typeof t){var i=r(25);t=i.createReadStream(t,{start:e}),e=0}var o=e,s=\"\";return t.on(\"data\",(function(e){s+=e;for(var r=0;;){if(!(o=s.indexOf(\"<\",o)+1))return void(o=r);if(\"/\"!==s[o+1]){var i=n(s,{pos:o-1,parseNode:!0,setPos:!0});if((o=i.pos)>s.length-1||oo.length-1||i=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);if(this.header=new c,n.inflateGetHeader(this.strm,this.header),e.dictionary&&(\"string\"==typeof e.dictionary?e.dictionary=o.string2buf(e.dictionary):\"[object ArrayBuffer]\"===l.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==s.Z_OK))throw new Error(a[r])}function h(t,e){var r=new f(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}f.prototype.push=function(t,e){var r,a,u,c,f,h=this.strm,d=this.options.chunkSize,p=this.options.dictionary,y=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,\"string\"==typeof t?h.input=o.binstring2buf(t):\"[object ArrayBuffer]\"===l.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(d),h.next_out=0,h.avail_out=d),(r=n.inflate(h,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===s.Z_BUF_ERROR&&!0===y&&(r=s.Z_OK,y=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==s.Z_STREAM_END&&(0!==h.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||(\"string\"===this.options.to?(u=o.utf8border(h.output,h.next_out),c=h.next_out-u,f=o.buf2string(h.output,u),h.next_out=c,h.avail_out=d-c,c&&i.arraySet(h.output,h.output,u,c,0),this.onData(f)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(y=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),h.avail_out=0,!0)},f.prototype.onData=function(t){this.chunks.push(t)},f.prototype.onEnd=function(t){t===s.Z_OK&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=f,e.inflate=h,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,h(t,e)},e.ungzip=h},function(t,e,r){\"use strict\";var n=r(26);class i extends n.a{constructor(){super(t=>(this._observers.add(t),()=>this._observers.delete(t))),this._observers=new Set}next(t){for(const e of this._observers)e.next(t)}error(t){for(const e of this._observers)e.error(t)}complete(){for(const t of this._observers)t.complete()}}e.a=i},function(t,e,r){\"use strict\";r.d(e,\"a\",(function(){return i}));const n=()=>{};function i(){let t,e=!1,r=n;return[new Promise(n=>{e?n(t):r=n}),n=>{e=!0,t=n,r(t)}]}},function(t,e,r){\"use strict\";r.d(e,\"a\",(function(){return i}));var n=r(2);function i(t){return t&&\"object\"==typeof t&&t[n.d]}},function(t,e,r){var n=r(40),i=r(39),o=t.exports;for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);function a(t){if(\"string\"==typeof t&&(t=i.parse(t)),t.protocol||(t.protocol=\"https:\"),\"https:\"!==t.protocol)throw new Error('Protocol \"'+t.protocol+'\" not supported. Expected \"https:\"');return t}o.request=function(t,e){return t=a(t),n.request.call(this,t,e)},o.get=function(t,e){return t=a(t),n.get.call(this,t,e)}},function(t,e,r){\"use strict\";(function(e){var n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},i=function(){function t(t,e){for(var r=0;r0?s-4:s;for(r=0;r>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+\"==\")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+\"=\"));return o.join(\"\")};for(var n=[],i=[],o=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,s=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",a=0,u=s.length;a0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=t.indexOf(\"=\");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var i,o,s=[],a=e;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join(\"\")}i[\"-\".charCodeAt(0)]=62,i[\"_\".charCodeAt(0)]=63},function(t,e){\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\ne.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,l=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;t[r+d]=255&s,d+=p,s/=256,c-=8);t[r+d-p]|=128*y}},function(t,e){var r=\"undefined\"!=typeof self?self:this,n=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r=\"URLSearchParams\"in t,n=\"Symbol\"in t&&\"iterator\"in Symbol,i=\"FileReader\"in t&&\"Blob\"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o=\"FormData\"in t,s=\"ArrayBuffer\"in t;if(s)var a=[\"[object Int8Array]\",\"[object Uint8Array]\",\"[object Uint8ClampedArray]\",\"[object Int16Array]\",\"[object Uint16Array]\",\"[object Int32Array]\",\"[object Uint32Array]\",\"[object Float32Array]\",\"[object Float64Array]\"],u=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if(\"string\"!=typeof t&&(t=String(t)),/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError(\"Invalid character in header field name\");return t.toLowerCase()}function l(t){return\"string\"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function d(t){if(t.bodyUsed)return Promise.reject(new TypeError(\"Already read\"));t.bodyUsed=!0}function p(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function y(t){var e=new FileReader,r=p(e);return e.readAsArrayBuffer(t),r}function g(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?\"string\"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=g(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=g(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText=\"\",this.headers.get(\"content-type\")||(\"string\"==typeof t?this.headers.set(\"content-type\",\"text/plain;charset=UTF-8\"):this._bodyBlob&&this._bodyBlob.type?this.headers.set(\"content-type\",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set(\"content-type\",\"application/x-www-form-urlencoded;charset=UTF-8\"))},i&&(this.blob=function(){var t=d(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error(\"could not read FormData body as blob\");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,r,n=d(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=p(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,(\"GET\"===this.method||\"HEAD\"===this.method)&&i)throw new TypeError(\"Body not allowed for GET or HEAD requests\");this._initBody(i)}function w(t){var e=new FormData;return t.trim().split(\"&\").forEach((function(t){if(t){var r=t.split(\"=\"),n=r.shift().replace(/\\+/g,\" \"),i=r.join(\"=\").replace(/\\+/g,\" \");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function x(t,e){e||(e={}),this.type=\"default\",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=\"statusText\"in e?e.statusText:\"OK\",this.headers=new h(e.headers),this.url=e.url||\"\",this._initBody(t)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},x.error=function(){var t=new x(null,{status:0,statusText:\"\"});return t.type=\"error\",t};var _=[301,302,303,307,308];x.redirect=function(t,e){if(-1===_.indexOf(e))throw new RangeError(\"Invalid status code\");return new x(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function S(t,r){return new Promise((function(n,o){var s=new v(t,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException(\"Aborted\",\"AbortError\"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||\"\",e=new h,t.replace(/\\r?\\n[\\t ]+/g,\" \").split(/\\r?\\n/).forEach((function(t){var r=t.split(\":\"),n=r.shift().trim();if(n){var i=r.join(\":\").trim();e.append(n,i)}})),e)};r.url=\"responseURL\"in a?a.responseURL:r.headers.get(\"X-Request-URL\");var i=\"response\"in a?a.response:a.responseText;n(new x(i,r))},a.onerror=function(){o(new TypeError(\"Network request failed\"))},a.ontimeout=function(){o(new TypeError(\"Network request failed\"))},a.onabort=function(){o(new e.DOMException(\"Aborted\",\"AbortError\"))},a.open(s.method,s.url,!0),\"include\"===s.credentials?a.withCredentials=!0:\"omit\"===s.credentials&&(a.withCredentials=!1),\"responseType\"in a&&i&&(a.responseType=\"blob\"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener(\"abort\",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener(\"abort\",u)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}S.polyfill=!0,t.fetch||(t.fetch=S,t.Headers=h,t.Request=v,t.Response=x),e.Headers=h,e.Request=v,e.Response=x,e.fetch=S,Object.defineProperty(e,\"__esModule\",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e},function(t,e,r){\"use strict\";t.exports=function(){return r(112)('!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,\"a\",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p=\"\",r(r.s=106)}([function(t,e,r){\"use strict\";const n=r(73);t.exports=function(t){return\"+\"===t[0]&&(t=t.substring(1)),(t=(t=n(t)).replace(/^0+(?=\\\\d)/,\"\")).includes(\".\")&&(t=t.replace(/\\\\.?0+$/,\"\")),\"\"===t&&(t=\"0\"),\"-0\"===t&&(t=\"0\"),t}},function(t,e,r){\"use strict\";const n=r(4),i=r(0),o=r(15),s=r(32);function a(t,e,r){t=i(t),e=i(e);const a=\"-\"!==t[0],u=\"-\"!==e[0],c=o(t),l=o(e);if(c||l)return a==u?\"Infinity\":\"-Infinity\";if(\"0\"===e)throw new Error(\"[preciso] division by zero\");if(\"\"===t||\"0\"===t)return\"0\";const f=a!==u?\"-\":\"\";return a||(t=n(t)),u||(e=n(e)),f+s(t,e,r)}t.exports=a,t.exports.default=a},function(t,e,r){\"use strict\";r.d(e,\"a\",(function(){return n})),r.d(e,\"b\",(function(){return i})),r.d(e,\"c\",(function(){return o})),r.d(e,\"d\",(function(){return s})),r.d(e,\"e\",(function(){return a}));const n=Symbol(\"thread.errors\"),i=Symbol(\"thread.events\"),o=Symbol(\"thread.terminate\"),s=Symbol(\"thread.transferable\"),a=Symbol(\"thread.worker\")},function(t,e){var r;r=function(){return this}();try{r=r||new Function(\"return this\")()}catch(t){\"object\"==typeof window&&(r=window)}t.exports=r},function(t,e,r){\"use strict\";const n=r(0);function i(t){return\"-\"===(t=n(t))[0]?t.substring(1):t}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";function n(t,e){const r=t.length,n=e.length,i=t.indexOf(\".\"),o=e.indexOf(\".\"),s=-1===i?r:i,a=-1===o?n:o,u=s-a;let c=u<0?-1*u:0,l=u<=0?0:u,f=Math.max(s,a)+1+Math.max(r-s,n-a)-1,h=0;for(;ho)return\">\";if(n\":return\"-\"+s(t,e)}else if(u&&!c)switch(e=e.substring(1),n(t,e)){case\"=\":return\"0\";case\"<\":return\"-\"+s(e,t);case\">\":return s(t,e)}}t.exports=u,t.exports.default=u},function(t,e){var r,n,i=t.exports={};function o(){throw new Error(\"setTimeout has not been defined\")}function s(){throw new Error(\"clearTimeout has not been defined\")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r=\"function\"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n=\"function\"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var t=a(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var r=1;r0){for(;m>p-f;){const r=t[m-h]||\"0\",n=e[m-d]||\"0\";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,\"\"===y&&0===i||(y=i+y),m--}y&&(y=\".\"+y),m--}if(l>0)for(;m>=0;){const r=t[m-h]||\"0\",n=e[m-d]||\"0\";let i=Number(r)+Number(n)+g;i>=10?(i-=10,g=1):g=0,y=i+y,m--}return 1===g&&(y=g+y),\".\"===y[0]&&(y=\"0\"+y),y}t.exports=i,t.exports.default=i},function(t,e,r){\"use strict\";(function(t){\\n/*!\\n * The buffer module from node.js, for the browser.\\n *\\n * @author Feross Aboukhadijeh \\n * @license MIT\\n */\\nvar n=r(108),i=r(109),o=r(61);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()=s())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+s().toString(16)+\" bytes\");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if(\"undefined\"!=typeof ArrayBuffer&&\"function\"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;\"string\"!=typeof t&&(t=\"\"+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":case void 0:return B(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return G(t).length;default:if(n)return B(t).length;e=(\"\"+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(e>>>=0))return\"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return O(this,e,r);case\"utf8\":case\"utf-8\":return k(this,e,r);case\"ascii\":return T(this,e,r);case\"latin1\":case\"binary\":return C(this,e,r);case\"base64\":return E(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return I(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if(\"string\"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if(\"number\"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function b(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var f=!0,h=0;h