scratch-storage 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/node/chunks/{fetch-worker.eefe62e3c8ee125d3436.js → fetch-worker.3bf90a691c26a60b5752.js} +158 -52
- package/dist/node/chunks/fetch-worker.3bf90a691c26a60b5752.js.map +1 -0
- package/dist/node/scratch-storage.js +169 -92
- package/dist/node/scratch-storage.js.map +1 -1
- package/dist/web/chunks/fetch-worker.0fa0968cc994fb298693.js +2 -0
- package/dist/web/chunks/{fetch-worker.85da71862ab8ee15f1cd.js.map → fetch-worker.0fa0968cc994fb298693.js.map} +1 -1
- package/dist/web/chunks/{fetch-worker.ba5eddd48c8ae259073b.js → fetch-worker.cd3a909d7b876aabf94a.js} +158 -52
- package/dist/web/chunks/fetch-worker.cd3a909d7b876aabf94a.js.map +1 -0
- package/dist/web/scratch-storage.js +166 -65
- package/dist/web/scratch-storage.js.map +1 -1
- package/dist/web/scratch-storage.min.js +1 -1
- package/package.json +9 -9
- package/src/scratchFetch.js +10 -13
- package/webpack.config.js +8 -5
- package/dist/node/chunks/fetch-worker.eefe62e3c8ee125d3436.js.map +0 -1
- package/dist/web/chunks/fetch-worker.85da71862ab8ee15f1cd.js +0 -2
- package/dist/web/chunks/fetch-worker.ba5eddd48c8ae259073b.js.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see scratch-storage.min.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ScratchStorage=e():t.ScratchStorage=e()}(self,(()=>(()=>{var __webpack_modules__={9:(t,e,r)=>{t.exports=r(14)("iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAAAAADmVT4XAAADZElEQVR42u3a70vbQBgH8O/7vOibvsmbFUEEWUGGUhQ25nDuhSKIUFDxlYi0SAd94atRmFiHCH2x4W8iiNtwowXRgd1QipJYY3N/1F4kTQ6XLKS9yyHcvWyO8MnT5y53Tw5EcIMESIAESIAESIAESIAEPFVAq/6l8G4oAQCp4aniwbUVJ6BVzafwqKXy1VZMgNb+CHzbyK4ZB+Bi0nnk0VyhsDiSoAmvvnMHmGUVAF6UG+0ffsxRhsRHky/AyCsAUpumX0wAAIs6T4CxDADDtcdZsal6gjmdH8AsAEC6+s8Fa48SFExeAKusAEju+V367AmUCi9ANQ0AU3pwcOw2cMEH0FwAAKz5X228pRLR5AI4TgIAtIDL24oLUE94AB6W7LsH/cONN14Ilh44AOqD9s2LQR1KHiB9zgGgOSGeuA3ocPrME1Q4ANaceyePAzrcjHmAZYs9IBeW4/fzHiAwTCwAgTle9ACZK44ALDT9e6x7gL4aT0BQCHb4AqgA5/1TTOMLoJ7vZSMM0H/GHnCeDnu+CrU8vGYPcN5FADBYD0vCaYPDy+i0p337GSMsS1Z4vA3t9QgAZTt0IuIxFRPSKicAQHlvhk3FXF5GhBByMa8qo/sBO6BarwuYbYrYnFKDYEvE7phKgcxvEQBqnvhgiQCUOgoAO4C3JOS3L/hv23UXxVldBECfcueAqpAa0WGy/QeULREAY6aTXRFDgBuA13+ElOncAERMAGaA9hBQD4gQQHsIRE1AZoD2xrgQS5nOZyHgFKmWDSIG4GRAVidiAE4GRB6AzAB2AKIPQFaA5myHA5AV4ESNugZhC7BLR50lIBPAebrzBGQCKAFQNSIMcDvRTQIwAHxNApM3RBygGK0uyhxwOwGsPAgEnPWj5ycRCNiJtBHlAChGKQVwANzPY+CXSMDNWISiLA9AfRA5IhJQ68UnoQAt+AtOPIBKhJosF8B6UM0yLkAxQk2WCyDX9SiUh1gkQAIkoCuAvjGuquMbuijAtwG7MPL8yBICOHSPk3W8Ne8KcEUdmBi6FADYos+QleIH0N/ogOxd7AD6uAS6WRU8WcBdlgZMG/EnYUlwEpLLoQ4PjzGbiA5UsRMRsbQ+5ziDJmYqJuR6NaMomdXuFuZyPSABEiABEiABEiABEiAc8Bd6VyvCEKGqcQAAAABJRU5ErkJggg==")},680:(t,e,r)=>{t.exports=r(14)("UklGRiYAAABXQVZFZm10IBAAAAABAAEAIlYAAESsAAACABAAZGF0YQIAAAAAAA==")},914:(t,e,r)=>{t.exports=r(14)("PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiA8Zz4KICA8cmVjdCBmaWxsPSIjQ0NDIiBoZWlnaHQ9IjEyOCIgd2lkdGg9IjEyOCIvPgogIDx0ZXh0IGZpbGw9ImJsYWNrIiB5PSIxMDciIHg9IjM1LjUiIGZvbnQtc2l6ZT0iMTI4Ij4/PC90ZXh0PgogPC9nPgo8L3N2Zz4K")},14:(t,e,r)=>{"use strict";var n=r(287).hp;t.exports=function(t){for(var e="undefined"!=typeof window&&"function"==typeof window.atob?window.atob(t):n.from(t,"base64").toString("binary"),r=new Uint8Array(e.length),o=0;o<e.length;++o)r[o]=e.charCodeAt(o);return r.buffer}},953:(t,e,r)=>{const n=r(945),o=new n.Headers,i=t=>{if((()=>{if(!("undefined"!=typeof self&&self&&self.location&&self.location.search&&self.location.search.split(/[?&]/)||[]).includes("scratchMetadata=1"))return!1;for(const t of o)return!0;return!1})()){const e=Object.assign({},t);if(e.headers=new n.Headers(o),t&&t.headers){const r=t.headers instanceof n.Headers?t.headers:new n.Headers(t.headers);for(const[t,n]of r.entries())e.headers.set(t,n)}return e}return t};t.exports={Headers:n.Headers,RequestMetadata:{ProjectId:"X-Project-ID",RunId:"X-Run-ID"},applyMetadata:i,scratchFetch:(t,e)=>{const r=i(e);return n.fetch(t,r)},setMetadata:(t,e)=>{o.set(t,e)},unsetMetadata:t=>{o.delete(t)}}},526:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=a(t),s=i[0],u=i[1],f=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),c=0,h=u>0?s-4:s;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],f[c++]=e>>16&255,f[c++]=e>>8&255,f[c++]=255&e;2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,f[c++]=255&e);1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,f[c++]=e>>8&255,f[c++]=255&e);return f},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=16383,a=0,f=n-o;a<f;a+=s)i.push(u(t,a,a+s>f?f:a+s));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)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 u(t,e,n){for(var o,i,s=[],a=e;a<n;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},287:(t,e,r)=>{"use strict";const n=r(526),o=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=u,e.IS=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|y(t,e);let n=a(r);const o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(V(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(V(t,ArrayBuffer)||t&&V(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(V(t,SharedArrayBuffer)||t&&V(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const o=function(t){if(u.isBuffer(t)){const e=0|d(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||z(t.length)?a(0):l(t);if("Buffer"===t.type&&Array.isArray(t.data))return l(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return c(t),a(t<0?0:0|d(t))}function l(t){const e=t.length<0?0:0|d(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function d(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function y(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||V(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return J(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(t).length;default:if(o)return n?-1:J(t).length;e=(""+e).toLowerCase(),o=!0}}function g(t,e,r){let 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 x(this,e,r);case"utf8":case"utf-8":return R(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function w(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),z(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:_(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function _(t,e,r,n,o){let i,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 f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){let n=-1;for(i=r;i<a;i++)if(f(t,i)===f(e,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*s}else-1!==n&&(i-=i-n),n=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(f(t,i+n)!==f(e,n)){r=!1;break}if(r)return i}return-1}function m(t,e,r,n){r=Number(r)||0;const o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=e.length;let s;for(n>i/2&&(n=i/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(z(n))return s;t[r+s]=n}return s}function A(t,e,r,n){return Y(J(e,t.length-r),t,r,n)}function v(t,e,r,n){return Y(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return Y(Q(e),t,r,n)}function S(t,e,r,n){return Y(function(t,e){let r,n,o;const i=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function R(t,e,r){r=Math.min(t.length,r);const n=[];let o=e;for(;o<r;){const e=t[o];let i=null,s=e>239?4:e>223?3:e>191?2:1;if(o+s<=r){let r,n,a,u;switch(s){case 1:e<128&&(i=e);break;case 2:r=t[o+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(i=u));break;case 3:r=t[o+1],n=t[o+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=t[o+1],n=t[o+2],a=t[o+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=s}return function(t){const e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=O));return r}(n)}u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return f(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return c(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},u.allocUnsafe=function(t){return h(t)},u.allocUnsafeSlow=function(t){return h(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(V(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),V(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=u.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(V(e,Uint8Array))o+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)b(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?R(this,0,t):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,o){if(V(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;let i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(i,s),f=this.slice(n,o),c=t.slice(e,r);for(let t=0;t<a;++t)if(f[t]!==c[t]){i=f[t],s=c[t];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return w(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return w(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return A(this,t,e,r);case"ascii":case"latin1":case"binary":return v(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function I(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function T(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function x(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=e;n<r;++n)o+=$[t[n]];return o}function U(t,e,r){const n=t.slice(e,r);let o="";for(let t=0;t<n.length-1;t+=2)o+=String.fromCharCode(n[t]+256*n[t+1]);return o}function H(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function C(t,e,r,n,o){q(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function k(t,e,r,n,o){q(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r+7]=i,i>>=8,t[r+6]=i,i>>=8,t[r+5]=i,i>>=8,t[r+4]=i;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function P(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,i){return e=+e,r>>>=0,i||P(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,i){return e=+e,r>>>=0,i||P(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||H(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||H(t,e,this.length);let n=this[t+--e],o=1;for(;e>0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||H(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||H(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||H(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||H(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||H(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=Z((function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),u.prototype.readBigUInt64BE=Z((function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||H(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||H(t,e,this.length);let n=e,o=1,i=this[t+--n];for(;n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return t>>>=0,e||H(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||H(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||H(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||H(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||H(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=Z((function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=Z((function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||H(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||H(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||H(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||H(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){j(this,t,e,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){j(this,t,e,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=Z((function(t,e=0){return C(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Z((function(t,e=0){return k(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}let o=0,i=1,s=0;for(this[e]=255&t;++o<r&&(i*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/i|0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}let o=r-1,i=1,s=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/i|0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=Z((function(t,e=0){return C(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Z((function(t,e=0){return k(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{const i=u.isBuffer(t)?t:u.from(t,n),s=i.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=i[o%s]}return this};const F={};function N(t,e,r){F[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function L(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function q(t,e,r,n,o,i){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let o;throw o=i>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){G(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||W(e,t.length-(r+1))}(n,o,i)}function G(t,e){if("number"!=typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function W(t,e,r){if(Math.floor(t)!==t)throw G(t,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}N("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),N("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),N("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=L(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=L(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function J(t,e){let r;e=e||1/0;const n=t.length;let o=null;const i=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Q(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,r,n){let o;for(o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function V(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function z(t){return t!=t}const $=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)e[n+o]=t[r]+t[o]}return e}();function Z(t){return"undefined"==typeof BigInt?K:t}function K(){throw new Error("BigInt not supported")}},945: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,o="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),i="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 f(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 c(t){return"string"!=typeof t&&(t=String(t)),t}function h(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 l(t){this.map={},t instanceof l?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 p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(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=d(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 b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&o&&((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"))},o&&(this.blob=function(){var t=p(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?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,r,n=p(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=d(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<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(t,e){t=f(t),e=c(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},l.prototype.delete=function(t){delete this.map[f(t)]},l.prototype.get=function(t){return t=f(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(f(t))},l.prototype.set=function(t,e){this.map[f(t)]=c(e)},l.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},l.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),h(t)},l.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),h(t)},l.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),h(t)},n&&(l.prototype[Symbol.iterator]=l.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(t,e){var r,n,o=(e=e||{}).body;if(t instanceof _){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),w.indexOf(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)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function m(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}})),e}function A(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 l(e.headers),this.url=e.url||"",this._initBody(t)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},b.call(_.prototype),b.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},A.error=function(){var t=new A(null,{status:0,statusText:""});return t.type="error",t};var v=[301,302,303,307,308];A.redirect=function(t,e){if(-1===v.indexOf(e))throw new RangeError("Invalid status code");return new A(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 E(t,r){return new Promise((function(n,i){var s=new _(t,r);if(s.signal&&s.signal.aborted)return i(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 l,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new A(o,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(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&&o&&(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)}))}E.polyfill=!0,t.fetch||(t.fetch=E,t.Headers=l,t.Request=_,t.Response=A),e.Headers=l,e.Request=_,e.Response=A,e.fetch=E,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var o=n;(e=o.fetch).default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e},767:function(t,e,r){"use strict";!function(t){function e(){}function r(){}var n=String.fromCharCode,o={}.toString,i=o.call(t.SharedArrayBuffer),s=o(),a=t.Uint8Array,u=a||Array,f=a?ArrayBuffer:u,c=f.isView||function(t){return t&&"length"in t},h=o.call(f.prototype);f=r.prototype;var l=t.TextEncoder,p=new(a?Uint16Array:u)(32);e.prototype.decode=function(t){if(!c(t)){var e=o.call(t);if(e!==h&&e!==i&&e!==s)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");t=a?new u(t):t||[]}for(var r,f,l,d=e="",y=0,g=0|t.length,b=g-32|0,w=0,_=0,m=0,A=-1;y<g;){for(r=y<=b?32:g-y|0;m<r;y=y+1|0,m=m+1|0){switch((f=255&t[y])>>4){case 15:if(2!=(l=255&t[y=y+1|0])>>6||247<f){y=y-1|0;break}w=(7&f)<<6|63&l,_=5,f=256;case 14:w<<=6,w|=(15&f)<<6|63&(l=255&t[y=y+1|0]),_=2==l>>6?_+4|0:24,f=f+256&768;case 13:case 12:w<<=6,w|=(31&f)<<6|63&(l=255&t[y=y+1|0]),_=_+7|0,y<g&&2==l>>6&&w>>_&&1114112>w?(f=w,0<=(w=w-65536|0)&&(A=55296+(w>>10)|0,f=56320+(1023&w)|0,31>m?(p[m]=A,m=m+1|0,A=-1):(l=A,A=f,f=l))):(y=y-(f>>=8)-1|0,f=65533),w=_=0,r=y<=b?32:g-y|0;default:p[m]=f;continue;case 11:case 10:case 9:case 8:}p[m]=65533}if(d+=n(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15],p[16],p[17],p[18],p[19],p[20],p[21],p[22],p[23],p[24],p[25],p[26],p[27],p[28],p[29],p[30],p[31]),32>m&&(d=d.slice(0,m-32|0)),y<g){if(p[0]=A,m=~A>>>31,A=-1,d.length<e.length)continue}else-1!==A&&(d+=n(A));e+=d,d=""}return e},f.encode=function(t){var e,r=0|(t=void 0===t?"":""+t).length,n=new u(8+(r<<1)|0),o=0,i=!a;for(e=0;e<r;e=e+1|0,o=o+1|0){var s=0|t.charCodeAt(e);if(127>=s)n[o]=s;else{if(2047>=s)n[o]=192|s>>6;else{t:{if(55296<=s)if(56319>=s){var f=0|t.charCodeAt(e=e+1|0);if(56320<=f&&57343>=f){if(65535<(s=(s<<10)+f-56613888|0)){n[o]=240|s>>18,n[o=o+1|0]=128|s>>12&63,n[o=o+1|0]=128|s>>6&63,n[o=o+1|0]=128|63&s;continue}break t}s=65533}else 57343>=s&&(s=65533);!i&&e<<1<o&&e<<1<(o-7|0)&&(i=!0,(f=new u(3*r)).set(n),n=f)}n[o]=224|s>>12,n[o=o+1|0]=128|s>>6&63}n[o=o+1|0]=128|63&s}}return a?n.subarray(0,o):n.slice(0,o)},l||(t.TextDecoder=e,t.TextEncoder=r)}(""+void 0==typeof r.g?""+void 0==typeof self?this:self:r.g)},251:(t,e)=>{e.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,f=u>>1,c=-7,h=r?o-1:0,l=r?-1:1,p=t[e+h];for(h+=l,i=p&(1<<-c)-1,p>>=-c,c+=a;c>0;i=256*i+t[e+h],h+=l,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=l,c-=8);if(0===i)i=1-f;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=f}return(p?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,a,u,f=8*i-o-1,c=(1<<f)-1,h=c>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=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=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,o),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;t[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,f+=o;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*y}},386:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=__webpack_require__.g:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t){return function(e){return new Md5(!0).update(e)[t]()}},createMethod=function(){var t=createOutputMethod("hex");NODE_JS&&(t=nodeWrap(t)),t.create=function(){return new Md5},t.update=function(e){return t.create().update(e)};for(var e=0;e<OUTPUT_TYPES.length;++e){var r=OUTPUT_TYPES[e];t[r]=createOutputMethod(r)}return t},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(t){if("string"==typeof t)return crypto.createHash("md5").update(t,"utf8").digest("hex");if(null==t)throw ERROR;return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer?crypto.createHash("md5").update(new Buffer(t)).digest("hex"):method(t)};return nodeMethod};function Md5(t){if(t)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var e=new ArrayBuffer(68);this.buffer8=new Uint8Array(e),this.blocks=new Uint32Array(e)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(t){if(!this.finalized){var e,r=typeof t;if("string"!==r){if("object"!==r)throw ERROR;if(null===t)throw ERROR;if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||ARRAY_BUFFER&&ArrayBuffer.isView(t)))throw ERROR;e=!0}for(var n,o,i=0,s=t.length,a=this.blocks,u=this.buffer8;i<s;){if(this.hashed&&(this.hashed=!1,a[0]=a[16],a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),e)if(ARRAY_BUFFER)for(o=this.start;i<s&&o<64;++i)u[o++]=t[i];else for(o=this.start;i<s&&o<64;++i)a[o>>2]|=t[i]<<SHIFT[3&o++];else if(ARRAY_BUFFER)for(o=this.start;i<s&&o<64;++i)(n=t.charCodeAt(i))<128?u[o++]=n:n<2048?(u[o++]=192|n>>6,u[o++]=128|63&n):n<55296||n>=57344?(u[o++]=224|n>>12,u[o++]=128|n>>6&63,u[o++]=128|63&n):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++i)),u[o++]=240|n>>18,u[o++]=128|n>>12&63,u[o++]=128|n>>6&63,u[o++]=128|63&n);else for(o=this.start;i<s&&o<64;++i)(n=t.charCodeAt(i))<128?a[o>>2]|=n<<SHIFT[3&o++]:n<2048?(a[o>>2]|=(192|n>>6)<<SHIFT[3&o++],a[o>>2]|=(128|63&n)<<SHIFT[3&o++]):n<55296||n>=57344?(a[o>>2]|=(224|n>>12)<<SHIFT[3&o++],a[o>>2]|=(128|n>>6&63)<<SHIFT[3&o++],a[o>>2]|=(128|63&n)<<SHIFT[3&o++]):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++i)),a[o>>2]|=(240|n>>18)<<SHIFT[3&o++],a[o>>2]|=(128|n>>12&63)<<SHIFT[3&o++],a[o>>2]|=(128|n>>6&63)<<SHIFT[3&o++],a[o>>2]|=(128|63&n)<<SHIFT[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[e>>2]|=EXTRA[3&e],e>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var t,e,r,n,o,i,s=this.blocks;this.first?e=((e=((t=((t=s[0]-680876937)<<7|t>>>25)-271733879|0)^(r=((r=(-271733879^(n=((n=(-1732584194^2004318071&t)+s[1]-117830708)<<12|n>>>20)+t|0)&(-271733879^t))+s[2]-1126478375)<<17|r>>>15)+n|0)&(n^t))+s[3]-1316259209)<<22|e>>>10)+r|0:(t=this.h0,e=this.h1,r=this.h2,e=((e+=((t=((t+=((n=this.h3)^e&(r^n))+s[0]-680876936)<<7|t>>>25)+e|0)^(r=((r+=(e^(n=((n+=(r^t&(e^r))+s[1]-389564586)<<12|n>>>20)+t|0)&(t^e))+s[2]+606105819)<<17|r>>>15)+n|0)&(n^t))+s[3]-1044525330)<<22|e>>>10)+r|0),e=((e+=((t=((t+=(n^e&(r^n))+s[4]-176418897)<<7|t>>>25)+e|0)^(r=((r+=(e^(n=((n+=(r^t&(e^r))+s[5]+1200080426)<<12|n>>>20)+t|0)&(t^e))+s[6]-1473231341)<<17|r>>>15)+n|0)&(n^t))+s[7]-45705983)<<22|e>>>10)+r|0,e=((e+=((t=((t+=(n^e&(r^n))+s[8]+1770035416)<<7|t>>>25)+e|0)^(r=((r+=(e^(n=((n+=(r^t&(e^r))+s[9]-1958414417)<<12|n>>>20)+t|0)&(t^e))+s[10]-42063)<<17|r>>>15)+n|0)&(n^t))+s[11]-1990404162)<<22|e>>>10)+r|0,e=((e+=((t=((t+=(n^e&(r^n))+s[12]+1804603682)<<7|t>>>25)+e|0)^(r=((r+=(e^(n=((n+=(r^t&(e^r))+s[13]-40341101)<<12|n>>>20)+t|0)&(t^e))+s[14]-1502002290)<<17|r>>>15)+n|0)&(n^t))+s[15]+1236535329)<<22|e>>>10)+r|0,e=((e+=((n=((n+=(e^r&((t=((t+=(r^n&(e^r))+s[1]-165796510)<<5|t>>>27)+e|0)^e))+s[6]-1069501632)<<9|n>>>23)+t|0)^t&((r=((r+=(t^e&(n^t))+s[11]+643717713)<<14|r>>>18)+n|0)^n))+s[0]-373897302)<<20|e>>>12)+r|0,e=((e+=((n=((n+=(e^r&((t=((t+=(r^n&(e^r))+s[5]-701558691)<<5|t>>>27)+e|0)^e))+s[10]+38016083)<<9|n>>>23)+t|0)^t&((r=((r+=(t^e&(n^t))+s[15]-660478335)<<14|r>>>18)+n|0)^n))+s[4]-405537848)<<20|e>>>12)+r|0,e=((e+=((n=((n+=(e^r&((t=((t+=(r^n&(e^r))+s[9]+568446438)<<5|t>>>27)+e|0)^e))+s[14]-1019803690)<<9|n>>>23)+t|0)^t&((r=((r+=(t^e&(n^t))+s[3]-187363961)<<14|r>>>18)+n|0)^n))+s[8]+1163531501)<<20|e>>>12)+r|0,e=((e+=((n=((n+=(e^r&((t=((t+=(r^n&(e^r))+s[13]-1444681467)<<5|t>>>27)+e|0)^e))+s[2]-51403784)<<9|n>>>23)+t|0)^t&((r=((r+=(t^e&(n^t))+s[7]+1735328473)<<14|r>>>18)+n|0)^n))+s[12]-1926607734)<<20|e>>>12)+r|0,e=((e+=((i=(n=((n+=((o=e^r)^(t=((t+=(o^n)+s[5]-378558)<<4|t>>>28)+e|0))+s[8]-2022574463)<<11|n>>>21)+t|0)^t)^(r=((r+=(i^e)+s[11]+1839030562)<<16|r>>>16)+n|0))+s[14]-35309556)<<23|e>>>9)+r|0,e=((e+=((i=(n=((n+=((o=e^r)^(t=((t+=(o^n)+s[1]-1530992060)<<4|t>>>28)+e|0))+s[4]+1272893353)<<11|n>>>21)+t|0)^t)^(r=((r+=(i^e)+s[7]-155497632)<<16|r>>>16)+n|0))+s[10]-1094730640)<<23|e>>>9)+r|0,e=((e+=((i=(n=((n+=((o=e^r)^(t=((t+=(o^n)+s[13]+681279174)<<4|t>>>28)+e|0))+s[0]-358537222)<<11|n>>>21)+t|0)^t)^(r=((r+=(i^e)+s[3]-722521979)<<16|r>>>16)+n|0))+s[6]+76029189)<<23|e>>>9)+r|0,e=((e+=((i=(n=((n+=((o=e^r)^(t=((t+=(o^n)+s[9]-640364487)<<4|t>>>28)+e|0))+s[12]-421815835)<<11|n>>>21)+t|0)^t)^(r=((r+=(i^e)+s[15]+530742520)<<16|r>>>16)+n|0))+s[2]-995338651)<<23|e>>>9)+r|0,e=((e+=((n=((n+=(e^((t=((t+=(r^(e|~n))+s[0]-198630844)<<6|t>>>26)+e|0)|~r))+s[7]+1126891415)<<10|n>>>22)+t|0)^((r=((r+=(t^(n|~e))+s[14]-1416354905)<<15|r>>>17)+n|0)|~t))+s[5]-57434055)<<21|e>>>11)+r|0,e=((e+=((n=((n+=(e^((t=((t+=(r^(e|~n))+s[12]+1700485571)<<6|t>>>26)+e|0)|~r))+s[3]-1894986606)<<10|n>>>22)+t|0)^((r=((r+=(t^(n|~e))+s[10]-1051523)<<15|r>>>17)+n|0)|~t))+s[1]-2054922799)<<21|e>>>11)+r|0,e=((e+=((n=((n+=(e^((t=((t+=(r^(e|~n))+s[8]+1873313359)<<6|t>>>26)+e|0)|~r))+s[15]-30611744)<<10|n>>>22)+t|0)^((r=((r+=(t^(n|~e))+s[6]-1560198380)<<15|r>>>17)+n|0)|~t))+s[13]+1309151649)<<21|e>>>11)+r|0,e=((e+=((n=((n+=(e^((t=((t+=(r^(e|~n))+s[4]-145523070)<<6|t>>>26)+e|0)|~r))+s[11]-1120210379)<<10|n>>>22)+t|0)^((r=((r+=(t^(n|~e))+s[2]+718787259)<<15|r>>>17)+n|0)|~t))+s[9]-343485551)<<21|e>>>11)+r|0,this.first?(this.h0=t+1732584193|0,this.h1=e-271733879|0,this.h2=r-1732584194|0,this.h3=n+271733878|0,this.first=!1):(this.h0=this.h0+t|0,this.h1=this.h1+e|0,this.h2=this.h2+r|0,this.h3=this.h3+n|0)},Md5.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3;return HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3;return[255&t,t>>8&255,t>>16&255,t>>24&255,255&e,e>>8&255,e>>16&255,e>>24&255,255&r,r>>8&255,r>>16&255,r>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),e=new Uint32Array(t);return e[0]=this.h0,e[1]=this.h1,e[2]=this.h2,e[3]=this.h3,t},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var t,e,r,n="",o=this.array(),i=0;i<15;)t=o[i++],e=o[i++],r=o[i++],n+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[63&(t<<4|e>>>4)]+BASE64_ENCODE_CHAR[63&(e<<2|r>>>6)]+BASE64_ENCODE_CHAR[63&r];return t=o[i],n+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[t<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},173:t=>{function e(){this._events={}}e.prototype={on:function(t,e){this._events||(this._events={});var r=this._events;return(r[t]||(r[t]=[])).push(e),this},removeListener:function(t,e){var r,n=this._events[t]||[];for(r=n.length-1;r>=0&&n[r];r--)n[r]!==e&&n[r].cb!==e||n.splice(r,1)},removeAllListeners:function(t){t?this._events[t]&&(this._events[t]=[]):this._events={}},listeners:function(t){return this._events&&this._events[t]||[]},emit:function(t){this._events||(this._events={});var e,r=Array.prototype.slice.call(arguments,1),n=this._events[t]||[];for(e=n.length-1;e>=0&&n[e];e--)n[e].apply(this,r);return this},when:function(t,e){return this.once(t,e,!0)},once:function(t,e,r){if(!e)return this;function n(){r||this.removeListener(t,n),e.apply(this,arguments)&&r&&this.removeListener(t,n)}return n.cb=e,this.on(t,n),this}},e.mixin=function(t){var r,n=e.prototype;for(r in n)n.hasOwnProperty(r)&&(t.prototype[r]=n[r])},t.exports=e},84:(t,e,r)=>{var n=r(408),o={debug:1,info:2,warn:3,error:4};function i(){this.enabled=!0,this.defaultResult=!0,this.clear()}function s(t,e){return t.n.test?t.n.test(e):t.n==e}n.mixin(i),i.prototype.allow=function(t,e){return this._white.push({n:t,l:o[e]}),this},i.prototype.deny=function(t,e){return this._black.push({n:t,l:o[e]}),this},i.prototype.clear=function(){return this._white=[],this._black=[],this},i.prototype.test=function(t,e){var r,n=Math.max(this._white.length,this._black.length);for(r=0;r<n;r++){if(this._white[r]&&s(this._white[r],t)&&o[e]>=this._white[r].l)return!0;if(this._black[r]&&s(this._black[r],t)&&o[e]<=this._black[r].l)return!1}return this.defaultResult},i.prototype.write=function(t,e,r){if(!this.enabled||this.test(t,e))return this.emit("item",t,e,r)},t.exports=i},15:(t,e,r)=>{var n=r(408),o=r(84),i=new n,s=Array.prototype.slice;(e=t.exports=function(t){var r=function(){return i.write(t,void 0,s.call(arguments)),r};return r.debug=function(){return i.write(t,"debug",s.call(arguments)),r},r.info=function(){return i.write(t,"info",s.call(arguments)),r},r.warn=function(){return i.write(t,"warn",s.call(arguments)),r},r.error=function(){return i.write(t,"error",s.call(arguments)),r},r.log=r.debug,r.suggest=e.suggest,r.format=i.format,r}).defaultBackend=e.defaultFormatter=null,e.pipe=function(t){return i.pipe(t)},e.end=e.unpipe=e.disable=function(t){return i.unpipe(t)},e.Transform=n,e.Filter=o,e.suggest=new o,e.enable=function(){return e.defaultFormatter?i.pipe(e.suggest).pipe(e.defaultFormatter).pipe(e.defaultBackend):i.pipe(e.suggest).pipe(e.defaultBackend)}},408:(t,e,r)=>{function n(){}r(173).mixin(n),n.prototype.write=function(t,e,r){this.emit("item",t,e,r)},n.prototype.end=function(){this.emit("end"),this.removeAllListeners()},n.prototype.pipe=function(t){var e=this;function r(){t.write.apply(t,Array.prototype.slice.call(arguments))}function n(){!t._isStdio&&t.end()}return e.emit("unpipe",t),t.emit("pipe",e),e.on("item",r),e.on("end",n),e.when("unpipe",(function(o){var i=o===t||void 0===o;return i&&(e.removeListener("item",r),e.removeListener("end",n),t.emit("unpipe")),i})),t},n.prototype.unpipe=function(t){return this.emit("unpipe",t),this},n.prototype.format=function(t){throw new Error(["Warning: .format() is deprecated in Minilog v2! Use .pipe() instead. For example:","var Minilog = require('minilog');","Minilog"," .pipe(Minilog.backends.console.formatClean)"," .pipe(Minilog.backends.console);"].join("\n"))},n.mixin=function(t){var e,r=n.prototype;for(e in r)r.hasOwnProperty(e)&&(t.prototype[e]=r[e])},t.exports=n},692:(t,e,r)=>{var n=r(408),o=[],i=new n;i.write=function(t,e,r){o.push([t,e,r])},i.get=function(){return o},i.empty=function(){o=[]},t.exports=i},260:(t,e,r)=>{var n=r(408),o=/\n+$/,i=new n;i.write=function(t,e,r){var n=r.length-1;if("undefined"!=typeof console&&console.log){if(console.log.apply)return console.log.apply(console,[t,e].concat(r));if(JSON&&JSON.stringify){r[n]&&"string"==typeof r[n]&&(r[n]=r[n].replace(o,""));try{for(n=0;n<r.length;n++)r[n]=JSON.stringify(r[n])}catch(t){}console.log(r.join(" "))}}},i.formatters=["color","minilog"],i.color=r(638),i.minilog=r(658),t.exports=i},638:(t,e,r)=>{var n=r(408),o=r(193),i={debug:["cyan"],info:["purple"],warn:["yellow",!0],error:["red",!0]},s=new n;s.write=function(t,e,r){console.log;console[e]&&console[e].apply&&console[e].apply(console,["%c"+t+" %c"+e,o("gray"),o.apply(o,i[e])].concat(r))},s.pipe=function(){},t.exports=s},658:(t,e,r)=>{var n=r(408),o=r(193),i={debug:["gray"],info:["purple"],warn:["yellow",!0],error:["red",!0]},s=new n;s.write=function(t,e,r){var n=console.log;"debug"!=e&&console[e]&&(n=console[e]);var s=0;if("info"!=e){for(;s<r.length&&"string"==typeof r[s];s++);n.apply(console,["%c"+t+" "+r.slice(0,s).join(" "),o.apply(o,i[e])].concat(r.slice(s)))}else n.apply(console,["%c"+t,o.apply(o,i[e])].concat(r))},s.pipe=function(){},t.exports=s},193:t=>{var e={black:"#000",red:"#c23621",green:"#25bc26",yellow:"#bbbb00",blue:"#492ee1",magenta:"#d338d3",cyan:"#33bbc8",gray:"#808080",purple:"#708"};t.exports=function(t,r){return r?"color: #fff; background: "+e[t]+";":"color: "+e[t]+";"}},557:(t,e,r)=>{var n=r(15),o=n.enable,i=n.disable,s="undefined"!=typeof navigator&&/chrome/i.test(navigator.userAgent),a=r(260);if(n.defaultBackend=s?a.minilog:a,"undefined"!=typeof window){try{n.enable(JSON.parse(window.localStorage.minilogSettings))}catch(t){}if(window.location&&window.location.search){var u=RegExp("[?&]minilog=([^&]*)").exec(window.location.search);u&&n.enable(decodeURIComponent(u[1]))}}n.enable=function(){o.call(n,!0);try{window.localStorage.minilogSettings=JSON.stringify(!0)}catch(t){}return this},n.disable=function(){i.call(n);try{delete window.localStorage.minilogSettings}catch(t){}return this},(t.exports=n).backends={array:r(692),browser:n.defaultBackend,localStorage:r(113),jQuery:r(740)}},740:(t,e,r)=>{var n=r(408),o=(new Date).valueOf().toString(36);function i(t){this.url=t.url||"",this.cache=[],this.timer=null,this.interval=t.interval||3e4,this.enabled=!0,this.jQuery=window.jQuery,this.extras={}}n.mixin(i),i.prototype.write=function(t,e,r){this.timer||this.init(),this.cache.push([t,e].concat(r))},i.prototype.init=function(){if(this.enabled&&this.jQuery){var t=this;this.timer=setTimeout((function(){var e,r,n=[],i=t.url;if(0==t.cache.length)return t.init();for(e=0;e<t.cache.length;e++)try{JSON.stringify(t.cache[e]),n.push(t.cache[e])}catch(t){}t.jQuery.isEmptyObject(t.extras)?(r=JSON.stringify({logs:n}),i=t.url+"?client_id="+o):r=JSON.stringify(t.jQuery.extend({logs:n},t.extras)),t.jQuery.ajax(i,{type:"POST",cache:!1,processData:!1,data:r,contentType:"application/json",timeout:1e4}).success((function(e,r,n){e.interval&&(t.interval=Math.max(1e3,e.interval))})).error((function(){t.interval=3e4})).always((function(){t.init()})),t.cache=[]}),this.interval)}},i.prototype.end=function(){},i.jQueryWait=function(t){if("undefined"!=typeof window&&(window.jQuery||window.$))return t(window.jQuery||window.$);"undefined"!=typeof window&&setTimeout((function(){i.jQueryWait(t)}),200)},t.exports=i},113:(t,e,r)=>{var n=r(408),o=!1,i=new n;i.write=function(t,e,r){if("undefined"!=typeof window&&"undefined"!=typeof JSON&&JSON.stringify&&JSON.parse)try{o||(o=window.localStorage.minilog?JSON.parse(window.localStorage.minilog):[]),o.push([(new Date).toString(),t,e,r]),window.localStorage.minilog=JSON.stringify(o)}catch(t){}},t.exports=i}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.u=t=>"chunks/fetch-worker.85da71862ab8ee15f1cd.js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.p="/",__webpack_require__.b=document.baseURI||self.location.href;var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Asset:()=>f,AssetType:()=>h,DataFormat:()=>c,Helper:()=>p,ScratchStorage:()=>L});var t=__webpack_require__(557),e=__webpack_require__.n(t);e().enable();const r=e()("storage");var n=__webpack_require__(386),o=__webpack_require__.n(n);let i,s;if("undefined"==typeof TextDecoder||"undefined"==typeof TextEncoder){const t=__webpack_require__(767);i=t.TextDecoder,s=t.TextEncoder}else i=TextDecoder,s=TextEncoder;const a=function(){let t=null;const e={};return(r,n)=>{if(!Object.prototype.hasOwnProperty.call(e,r))if("undefined"==typeof btoa){const t=__webpack_require__(526);e[r]=t.fromByteArray(n)}else{if(null===t){t=new Array(256);for(let e=0;e<256;e++)t[e]=String.fromCharCode(e)}const{length:o}=n;let i="";for(let e=0,r=0;e<o;e=r){r=Math.min(r+32766,o);let s="";for(let o=e;o<r;o+=1)s+=t[n[o]];i+=btoa(s)}e[r]=i}return e[r]}}();function u(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class f{constructor(t,e,r,n,o){u(this,"assetType",void 0),u(this,"assetId",void 0),u(this,"data",void 0),u(this,"dataFormat",void 0),u(this,"dependencies",void 0),u(this,"clean",void 0),this.assetType=t,this.assetId=e,this.setData(n,r||t.runtimeFormat,o),this.dependencies=[]}setData(t,e,r){if(t&&!e)throw new Error("Data provided without specifying its format");this.dataFormat=e,this.data=t,r&&(this.assetId=o()(t)),this.clean=!r}decodeText(){return(new i).decode(this.data)}encodeTextData(t,e,r){const n=new s;this.setData(n.encode(t),e,r)}encodeDataURI(t){return t=t||this.assetType.contentType,"data:".concat(t,";base64,").concat(a(this.assetId,this.data))}}const c={JPG:"jpg",JSON:"json",MP3:"mp3",PNG:"png",SB2:"sb2",SB3:"sb3",SVG:"svg",WAV:"wav"},h={ImageBitmap:{contentType:"image/png",name:"ImageBitmap",runtimeFormat:c.PNG,immutable:!0},ImageVector:{contentType:"image/svg+xml",name:"ImageVector",runtimeFormat:c.SVG,immutable:!0},Project:{contentType:"application/json",name:"Project",runtimeFormat:c.JSON,immutable:!1},Sound:{contentType:"audio/x-wav",name:"Sound",runtimeFormat:c.WAV,immutable:!0},Sprite:{contentType:"application/json",name:"Sprite",runtimeFormat:c.JSON,immutable:!0}};function l(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class p{constructor(t){l(this,"parent",void 0),this.parent=t}load(t,e,r){return Promise.reject(new Error("No asset of type ".concat(t," for ID ").concat(e," with format ").concat(r)))}}var d=__webpack_require__(9),y=__webpack_require__.n(d),g=__webpack_require__(680),b=__webpack_require__.n(g),w=__webpack_require__(914),_=__webpack_require__.n(w),m=__webpack_require__(287);function A(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const v=[{type:h.ImageBitmap,format:c.PNG,id:null,data:m.hp.from(y())},{type:h.Sound,format:c.WAV,id:null,data:m.hp.from(b())},{type:h.ImageVector,format:c.SVG,id:null,data:m.hp.from(_())}],E=v.concat([]);class S extends p{constructor(t){super(t),A(this,"assets",void 0),this.assets={},E.forEach((t=>{t.id=this._store(t.type,t.format,t.data,t.id)}))}registerDefaultAssets(){const t=v.length;for(let e=0;e<t;++e){const t=v[e];this.parent.setDefaultAssetId(t.type,t.id)}}get(t){let e=null;if(Object.prototype.hasOwnProperty.call(this.assets,t)){const r=this.assets[t];e=new f(r.type,r.id,r.format,r.data)}return e}cache(t,e,n,o){return r.warn("Deprecation: BuiltinHelper.cache has been replaced with BuiltinHelper.store."),this.store(t,e,n,o)}store(t,e,n,o){return r.warn("Deprecation: use Storage.createAsset. BuiltinHelper is for internal use only."),this._store(t,e,n,o)}_store(t,e,r,n){let i=n;if(!e)throw new Error("Data cached without specifying its format");if(""!==i&&null!=i){if(Object.prototype.hasOwnProperty.call(this.assets,i)&&t.immutable)return i}else{if(!t.immutable)throw new Error("Tried to cache data without an id");i=o()(r)}return this.assets[i]={type:t,format:e,id:i,data:r},i}load(t,e){return this.get(e)?Promise.resolve(this.get(e)):null}}var B=__webpack_require__(953),R=__webpack_require__.n(B);const O=["url"];function I(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class T{constructor(){I(this,"_workerSupport",void 0),I(this,"_supportError",void 0),I(this,"worker",void 0),I(this,"jobs",void 0),this._workerSupport={fetch:"undefined"!=typeof fetch},this._supportError=null,this.worker=null,this.jobs={};try{if(this.isGetSupported){const t=new Worker(new URL(__webpack_require__.p+__webpack_require__.u(836),__webpack_require__.b));t.addEventListener("message",(t=>{let{data:e}=t;if(e.support)this._workerSupport=e.support;else for(const t of e){const e=this.jobs[t.id];e&&(t.error?e.reject(t.error):e.resolve(t.buffer),delete this.jobs[t.id])}})),this.worker=t}}catch(t){this._supportError=t}}get isGetSupported(){return"undefined"!=typeof Worker&&this._workerSupport.fetch&&!this._supportError}get(t){let{url:e}=t,r=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.includes(r)||{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,O);const n=this.worker;return n?new Promise(((t,o)=>{const i=Math.random().toString(16).substring(2),s=(0,B.applyMetadata)(Object.assign({method:"GET"},r));s&&s.headers instanceof B.Headers&&(s.headers=Array.from(s.headers.entries())),n.postMessage({id:i,url:e,options:s}),this.jobs[i]={id:i,resolve:t,reject:o}})).then((t=>t?new Uint8Array(t):null)):Promise.reject(new Error("The worker could not be initialized"))}get isSendSupported(){return!1}send(){throw new Error("Not implemented.")}static get instance(){return this._instance||(this._instance=new T),this._instance}}I(T,"_instance",void 0);class x{constructor(){I(this,"inner",void 0),this.inner=T.instance}get isGetSupported(){return this.inner.isGetSupported}get(t){return this.inner.get(t)}get isSendSupported(){return!1}send(){throw new Error("Not implemented.")}}const U=["url"],H=["url","withCredentials"];function j(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.includes(r)||{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}class C{get isGetSupported(){return!0}get(t){let{url:e}=t,r=j(t,U);return(0,B.scratchFetch)(e,Object.assign({method:"GET"},r)).then((t=>t.ok?t.arrayBuffer().then((t=>new Uint8Array(t))):404===t.status?null:Promise.reject(t.status)))}get isSendSupported(){return!0}send(t){let{url:e,withCredentials:r=!1}=t,n=j(t,H);return(0,B.scratchFetch)(e,Object.assign({credentials:r?"include":"omit"},n)).then((t=>t.ok?t.text():Promise.reject(t.status)))}}function k(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class P{constructor(){let t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P.TOOL_FILTER.ALL;k(this,"tools",void 0),t=e===P.TOOL_FILTER.READY?[new C]:[new x,new C],this.tools=t}get isGetSupported(){return this.tools.some((t=>t.isGetSupported))}get(t){let e=0;const r=n=>{const o=this.tools[e++];if(!o)throw n;return o.isGetSupported?o.get(t).catch(r):r(n)};return r()}get isSendSupported(){return this.tools.some((t=>t.isSendSupported))}send(t){let e=0;const r=n=>{const o=this.tools[e++];if(!o)throw n;return o.isSendSupported?o.send(t).catch(r):r(n)};return r()}}function D(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}k(P,"TOOL_FILTER",{ALL:"all",READY:"ready"});const M=t=>"string"==typeof t?{url:t}:t;class F extends p{constructor(t){super(t),D(this,"stores",void 0),D(this,"assetTool",void 0),D(this,"projectTool",void 0),this.stores=[],this.assetTool=new P,this.projectTool=new P(P.TOOL_FILTER.READY)}addSource(t,e){r.warn("Deprecation: WebHelper.addSource has been replaced with WebHelper.addStore."),this.addStore(t,e)}addStore(t,e,r,n){this.stores.push({types:t.map((t=>t.name)),get:e,create:r,update:n})}load(t,e,r){const n=[],o=this.stores.slice().filter((e=>e.types.indexOf(t.name)>=0)),i=new f(t,e,r);let s=this.assetTool;"Project"===t.name&&(s=this.projectTool);let a=0;const u=t=>{t&&n.push(t);const e=o[a++],f=e&&e.get;if(f){const t=M(f(i));return!1===t?u():s.get(t).then((t=>t?(i.setData(t,r),i):u())).catch(u)}return n.length>0?Promise.reject(n):Promise.resolve(null)};return u()}store(t,e,r,n){const o=new f(t,n,e),i=""===n||null==n,s=this.stores.filter((e=>-1!==e.types.indexOf(t.name)&&(i&&e.create||e.update)))[0],a=i?"post":"put";if(!s)return Promise.reject(new Error("No appropriate stores"));let u=this.assetTool;"Project"===t.name&&(u=this.projectTool);const c=M(i?s.create(o):s.update(o)),h=Object.assign({body:r,method:a},c);return u.send(h).then((t=>{if("string"==typeof t)try{t=JSON.parse(t)}catch(e){return t}return Object.assign({id:t["content-name"]||n},t)}))}}function N(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class L{constructor(){N(this,"defaultAssetId",void 0),N(this,"builtinHelper",void 0),N(this,"webHelper",void 0),N(this,"_helpers",void 0),this.defaultAssetId={},this.builtinHelper=new S(this),this.webHelper=new F(this),this.builtinHelper.registerDefaultAssets(),this._helpers=[{helper:this.builtinHelper,priority:100},{helper:this.webHelper,priority:-100}]}get Asset(){return f}get AssetType(){return h}get DataFormat(){return c}get scratchFetch(){return R()}static get Asset(){return f}static get AssetType(){return h}addHelper(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._helpers.push({helper:t,priority:e}),this._helpers.sort(((t,e)=>e.priority-t.priority))}get(t){return this.builtinHelper.get(t)}cache(t,e,n,o){return r.warn("Deprecation: Storage.cache is deprecated. Use Storage.createAsset, and store assets externally."),this.builtinHelper._store(t,e,n,o)}createAsset(t,e,r,n,o){if(!e)throw new Error("Tried to create asset without a dataFormat");return new f(t,n,e,r,o)}addWebStore(t,e,r,n){this.webHelper.addStore(t,e,r,n)}addWebSource(t,e){r.warn("Deprecation: Storage.addWebSource has been replaced by addWebStore."),this.addWebStore(t,e)}getDefaultAssetId(t){if(Object.prototype.hasOwnProperty.call(this.defaultAssetId,t.name))return this.defaultAssetId[t.name]}setDefaultAssetId(t,e){this.defaultAssetId[t.name]=e}load(t,e,r){const n=this._helpers.map((t=>t.helper)),o=[];r=r||t.runtimeFormat;let i,s=0;const a=u=>{if(u&&o.push(u),i=n[s++],i){const n=i.load(t,e,r);return null===n?a():n.catch(a)}return o.length>0?Promise.reject(o):Promise.resolve(null)};return a()}store(t,e,r,n){return e=e||t.runtimeFormat,this.webHelper.store(t,e,r,n).then((n=>{const o="string"==typeof n?void 0:n.id;return this.builtinHelper._store(t,e,r,o),n}))}}})(),__webpack_exports__})()));
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ScratchStorage=e():t.ScratchStorage=e()}(self,(()=>(()=>{var __webpack_modules__={9:(t,e,r)=>{t.exports=r(14)("iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAAAAADmVT4XAAADZElEQVR42u3a70vbQBgH8O/7vOibvsmbFUEEWUGGUhQ25nDuhSKIUFDxlYi0SAd94atRmFiHCH2x4W8iiNtwowXRgd1QipJYY3N/1F4kTQ6XLKS9yyHcvWyO8MnT5y53Tw5EcIMESIAESIAESIAESIAEPFVAq/6l8G4oAQCp4aniwbUVJ6BVzafwqKXy1VZMgNb+CHzbyK4ZB+Bi0nnk0VyhsDiSoAmvvnMHmGUVAF6UG+0ffsxRhsRHky/AyCsAUpumX0wAAIs6T4CxDADDtcdZsal6gjmdH8AsAEC6+s8Fa48SFExeAKusAEju+V367AmUCi9ANQ0AU3pwcOw2cMEH0FwAAKz5X228pRLR5AI4TgIAtIDL24oLUE94AB6W7LsH/cONN14Ilh44AOqD9s2LQR1KHiB9zgGgOSGeuA3ocPrME1Q4ANaceyePAzrcjHmAZYs9IBeW4/fzHiAwTCwAgTle9ACZK44ALDT9e6x7gL4aT0BQCHb4AqgA5/1TTOMLoJ7vZSMM0H/GHnCeDnu+CrU8vGYPcN5FADBYD0vCaYPDy+i0p337GSMsS1Z4vA3t9QgAZTt0IuIxFRPSKicAQHlvhk3FXF5GhBByMa8qo/sBO6BarwuYbYrYnFKDYEvE7phKgcxvEQBqnvhgiQCUOgoAO4C3JOS3L/hv23UXxVldBECfcueAqpAa0WGy/QeULREAY6aTXRFDgBuA13+ElOncAERMAGaA9hBQD4gQQHsIRE1AZoD2xrgQS5nOZyHgFKmWDSIG4GRAVidiAE4GRB6AzAB2AKIPQFaA5myHA5AV4ESNugZhC7BLR50lIBPAebrzBGQCKAFQNSIMcDvRTQIwAHxNApM3RBygGK0uyhxwOwGsPAgEnPWj5ycRCNiJtBHlAChGKQVwANzPY+CXSMDNWISiLA9AfRA5IhJQ68UnoQAt+AtOPIBKhJosF8B6UM0yLkAxQk2WCyDX9SiUh1gkQAIkoCuAvjGuquMbuijAtwG7MPL8yBICOHSPk3W8Ne8KcEUdmBi6FADYos+QleIH0N/ogOxd7AD6uAS6WRU8WcBdlgZMG/EnYUlwEpLLoQ4PjzGbiA5UsRMRsbQ+5ziDJmYqJuR6NaMomdXuFuZyPSABEiABEiABEiABEiAc8Bd6VyvCEKGqcQAAAABJRU5ErkJggg==")},680:(t,e,r)=>{t.exports=r(14)("UklGRiYAAABXQVZFZm10IBAAAAABAAEAIlYAAESsAAACABAAZGF0YQIAAAAAAA==")},914:(t,e,r)=>{t.exports=r(14)("PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiA8Zz4KICA8cmVjdCBmaWxsPSIjQ0NDIiBoZWlnaHQ9IjEyOCIgd2lkdGg9IjEyOCIvPgogIDx0ZXh0IGZpbGw9ImJsYWNrIiB5PSIxMDciIHg9IjM1LjUiIGZvbnQtc2l6ZT0iMTI4Ij4/PC90ZXh0PgogPC9nPgo8L3N2Zz4K")},14:(t,e,r)=>{"use strict";var n=r(287).hp;t.exports=function(t){for(var e="undefined"!=typeof window&&"function"==typeof window.atob?window.atob(t):n.from(t,"base64").toString("binary"),r=new Uint8Array(e.length),o=0;o<e.length;++o)r[o]=e.charCodeAt(o);return r.buffer}},953:(t,e,r)=>{const n=r(945),o=new n.Headers,i=t=>{if((()=>{if(!("undefined"!=typeof self&&self&&self.location&&self.location.search&&self.location.search.split(/[?&]/)||[]).includes("scratchMetadata=1"))return!1;for(const t of o)return!0;return!1})()){const e=Object.assign({},t);if(e.headers=new n.Headers(o),t&&t.headers){const r=t.headers instanceof n.Headers?t.headers:new n.Headers(t.headers);for(const[t,n]of r.entries())e.headers.set(t,n)}return e}return t};t.exports={Headers:n.Headers,RequestMetadata:{ProjectId:"X-Project-ID",RunId:"X-Run-ID"},applyMetadata:i,scratchFetch:(t,e)=>{const r=i(e);return n.fetch(t,r)},setMetadata:(t,e)=>{o.set(t,e)},unsetMetadata:t=>{o.delete(t)},getMetadata:t=>o.get(t)}},526:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=a(t),s=i[0],u=i[1],f=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),c=0,h=u>0?s-4:s;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],f[c++]=e>>16&255,f[c++]=e>>8&255,f[c++]=255&e;2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,f[c++]=255&e);1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,f[c++]=e>>8&255,f[c++]=255&e);return f},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=16383,a=0,f=n-o;a<f;a+=s)i.push(u(t,a,a+s>f?f:a+s));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)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 u(t,e,n){for(var o,i,s=[],a=e;a<n;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},287:(t,e,r)=>{"use strict";const n=r(526),o=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=u,e.IS=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|y(t,e);let n=a(r);const o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Y(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Y(t,ArrayBuffer)||t&&Y(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(t,SharedArrayBuffer)||t&&Y(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const o=function(t){if(u.isBuffer(t)){const e=0|d(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||z(t.length)?a(0):l(t);if("Buffer"===t.type&&Array.isArray(t.data))return l(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return c(t),a(t<0?0:0|d(t))}function l(t){const e=t.length<0?0:0|d(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function d(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function y(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Y(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return J(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(t).length;default:if(o)return n?-1:J(t).length;e=(""+e).toLowerCase(),o=!0}}function g(t,e,r){let 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 x(this,e,r);case"utf8":case"utf-8":return R(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function w(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),z(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:_(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function _(t,e,r,n,o){let i,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 f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){let n=-1;for(i=r;i<a;i++)if(f(t,i)===f(e,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*s}else-1!==n&&(i-=i-n),n=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(f(t,i+n)!==f(e,n)){r=!1;break}if(r)return i}return-1}function m(t,e,r,n){r=Number(r)||0;const o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=e.length;let s;for(n>i/2&&(n=i/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(z(n))return s;t[r+s]=n}return s}function A(t,e,r,n){return V(J(e,t.length-r),t,r,n)}function v(t,e,r,n){return V(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return V(Q(e),t,r,n)}function S(t,e,r,n){return V(function(t,e){let r,n,o;const i=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function R(t,e,r){r=Math.min(t.length,r);const n=[];let o=e;for(;o<r;){const e=t[o];let i=null,s=e>239?4:e>223?3:e>191?2:1;if(o+s<=r){let r,n,a,u;switch(s){case 1:e<128&&(i=e);break;case 2:r=t[o+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(i=u));break;case 3:r=t[o+1],n=t[o+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=t[o+1],n=t[o+2],a=t[o+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=s}return function(t){const e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=O));return r}(n)}u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return f(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return c(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},u.allocUnsafe=function(t){return h(t)},u.allocUnsafeSlow=function(t){return h(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(Y(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),Y(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=u.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(Y(e,Uint8Array))o+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,o)):Uint8Array.prototype.set.call(n,e,o);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)b(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?R(this,0,t):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,o){if(Y(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;let i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(i,s),f=this.slice(n,o),c=t.slice(e,r);for(let t=0;t<a;++t)if(f[t]!==c[t]){i=f[t],s=c[t];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return w(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return w(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return A(this,t,e,r);case"ascii":case"latin1":case"binary":return v(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function I(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function T(t,e,r){let n="";r=Math.min(t.length,r);for(let o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function x(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=e;n<r;++n)o+=$[t[n]];return o}function U(t,e,r){const n=t.slice(e,r);let o="";for(let t=0;t<n.length-1;t+=2)o+=String.fromCharCode(n[t]+256*n[t+1]);return o}function j(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function H(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function C(t,e,r,n,o){q(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i,i>>=8,t[r++]=i;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function P(t,e,r,n,o){q(e,n,o,t,r,7);let i=Number(e&BigInt(4294967295));t[r+7]=i,i>>=8,t[r+6]=i,i>>=8,t[r+5]=i,i>>=8,t[r+4]=i;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function k(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,i){return e=+e,r>>>=0,i||k(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,i){return e=+e,r>>>=0,i||k(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);let n=this[t+--e],o=1;for(;e>0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=Z((function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),u.prototype.readBigUInt64BE=Z((function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);let n=this[t],o=1,i=0;for(;++i<e&&(o*=256);)n+=this[t+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);let n=e,o=1,i=this[t+--n];for(;n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||j(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||j(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=Z((function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=Z((function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||j(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||j(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||j(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||j(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){H(this,t,e,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){H(this,t,e,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||H(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||H(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||H(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||H(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||H(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=Z((function(t,e=0){return C(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Z((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);H(this,t,e,r,n-1,-n)}let o=0,i=1,s=0;for(this[e]=255&t;++o<r&&(i*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/i|0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);H(this,t,e,r,n-1,-n)}let o=r-1,i=1,s=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/i|0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||H(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||H(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||H(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||H(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||H(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=Z((function(t,e=0){return C(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Z((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{const i=u.isBuffer(t)?t:u.from(t,n),s=i.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=i[o%s]}return this};const F={};function N(t,e,r){F[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function L(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function q(t,e,r,n,o,i){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let o;throw o=i>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){G(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||W(e,t.length-(r+1))}(n,o,i)}function G(t,e){if("number"!=typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function W(t,e,r){if(Math.floor(t)!==t)throw G(t,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}N("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),N("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),N("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=L(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=L(o)),o+="n"),n+=` It must be ${e}. Received ${o}`,n}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function J(t,e){let r;e=e||1/0;const n=t.length;let o=null;const i=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Q(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function V(t,e,r,n){let o;for(o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Y(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function z(t){return t!=t}const $=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)e[n+o]=t[r]+t[o]}return e}();function Z(t){return"undefined"==typeof BigInt?K:t}function K(){throw new Error("BigInt not supported")}},945:(t,e,r)=>{var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,o=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();!function(t){!function(e){var r=void 0!==t&&t||"undefined"!=typeof self&&self||void 0!==r&&r,n="URLSearchParams"in r,o="Symbol"in r&&"iterator"in Symbol,i="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(t){return!1}}(),s="FormData"in r,a="ArrayBuffer"in r;if(a)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function h(t){return"string"!=typeof t&&(t=String(t)),t}function l(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?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 y(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function g(t){var e=new FileReader,r=y(e);return e.readAsArrayBuffer(t),r}function b(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:s&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=b(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||f(t))?this._bodyArrayBuffer=b(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):n&&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(){if(this._bodyArrayBuffer){var t=d(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(g)}),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=y(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<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(t,e){t=c(t),e=h(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},p.prototype.delete=function(t){delete this.map[c(t)]},p.prototype.get=function(t){return t=c(t),this.has(t)?this.map[t]:null},p.prototype.has=function(t){return this.map.hasOwnProperty(c(t))},p.prototype.set=function(t,e){this.map[c(t)]=h(e)},p.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},p.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),l(t)},p.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),l(t)},p.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),l(t)},o&&(p.prototype[Symbol.iterator]=p.prototype.entries);var _=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(t,e){if(!(this instanceof m))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n,o=(e=e||{}).body;if(t instanceof m){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new p(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new p(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),_.indexOf(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)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function A(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}})),e}function v(t,e){if(!(this instanceof v))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},w.call(m.prototype),w.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},v.error=function(){var t=new v(null,{status:0,statusText:""});return t.type="error",t};var E=[301,302,303,307,308];v.redirect=function(t,e){if(-1===E.indexOf(e))throw new RangeError("Invalid status code");return new v(null,{status:e,headers:{location:t}})},e.DOMException=r.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,n){return new Promise((function(o,s){var u=new m(t,n);if(u.signal&&u.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var f=new XMLHttpRequest;function c(){f.abort()}f.onload=function(){var t,e,r={status:f.status,statusText:f.statusText,headers:(t=f.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}})),e)};r.url="responseURL"in f?f.responseURL:r.headers.get("X-Request-URL");var n="response"in f?f.response:f.responseText;setTimeout((function(){o(new v(n,r))}),0)},f.onerror=function(){setTimeout((function(){s(new TypeError("Network request failed"))}),0)},f.ontimeout=function(){setTimeout((function(){s(new TypeError("Network request failed"))}),0)},f.onabort=function(){setTimeout((function(){s(new e.DOMException("Aborted","AbortError"))}),0)},f.open(u.method,function(t){try{return""===t&&r.location.href?r.location.href:t}catch(e){return t}}(u.url),!0),"include"===u.credentials?f.withCredentials=!0:"omit"===u.credentials&&(f.withCredentials=!1),"responseType"in f&&(i?f.responseType="blob":a&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(f.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof p?u.headers.forEach((function(t,e){f.setRequestHeader(e,t)})):Object.getOwnPropertyNames(n.headers).forEach((function(t){f.setRequestHeader(t,h(n.headers[t]))})),u.signal&&(u.signal.addEventListener("abort",c),f.onreadystatechange=function(){4===f.readyState&&u.signal.removeEventListener("abort",c)}),f.send(void 0===u._bodyInit?null:u._bodyInit)}))}S.polyfill=!0,r.fetch||(r.fetch=S,r.Headers=p,r.Request=m,r.Response=v),e.Headers=p,e.Request=m,e.Response=v,e.fetch=S}({})}(o),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var i=n.fetch?n:o;(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},767:function(t,e,r){"use strict";!function(t){function e(){}function r(){}var n=String.fromCharCode,o={}.toString,i=o.call(t.SharedArrayBuffer),s=o(),a=t.Uint8Array,u=a||Array,f=a?ArrayBuffer:u,c=f.isView||function(t){return t&&"length"in t},h=o.call(f.prototype);f=r.prototype;var l=t.TextEncoder,p=new(a?Uint16Array:u)(32);e.prototype.decode=function(t){if(!c(t)){var e=o.call(t);if(e!==h&&e!==i&&e!==s)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");t=a?new u(t):t||[]}for(var r,f,l,d=e="",y=0,g=0|t.length,b=g-32|0,w=0,_=0,m=0,A=-1;y<g;){for(r=y<=b?32:g-y|0;m<r;y=y+1|0,m=m+1|0){switch((f=255&t[y])>>4){case 15:if(2!=(l=255&t[y=y+1|0])>>6||247<f){y=y-1|0;break}w=(7&f)<<6|63&l,_=5,f=256;case 14:w<<=6,w|=(15&f)<<6|63&(l=255&t[y=y+1|0]),_=2==l>>6?_+4|0:24,f=f+256&768;case 13:case 12:w<<=6,w|=(31&f)<<6|63&(l=255&t[y=y+1|0]),_=_+7|0,y<g&&2==l>>6&&w>>_&&1114112>w?(f=w,0<=(w=w-65536|0)&&(A=55296+(w>>10)|0,f=56320+(1023&w)|0,31>m?(p[m]=A,m=m+1|0,A=-1):(l=A,A=f,f=l))):(y=y-(f>>=8)-1|0,f=65533),w=_=0,r=y<=b?32:g-y|0;default:p[m]=f;continue;case 11:case 10:case 9:case 8:}p[m]=65533}if(d+=n(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15],p[16],p[17],p[18],p[19],p[20],p[21],p[22],p[23],p[24],p[25],p[26],p[27],p[28],p[29],p[30],p[31]),32>m&&(d=d.slice(0,m-32|0)),y<g){if(p[0]=A,m=~A>>>31,A=-1,d.length<e.length)continue}else-1!==A&&(d+=n(A));e+=d,d=""}return e},f.encode=function(t){var e,r=0|(t=void 0===t?"":""+t).length,n=new u(8+(r<<1)|0),o=0,i=!a;for(e=0;e<r;e=e+1|0,o=o+1|0){var s=0|t.charCodeAt(e);if(127>=s)n[o]=s;else{if(2047>=s)n[o]=192|s>>6;else{t:{if(55296<=s)if(56319>=s){var f=0|t.charCodeAt(e=e+1|0);if(56320<=f&&57343>=f){if(65535<(s=(s<<10)+f-56613888|0)){n[o]=240|s>>18,n[o=o+1|0]=128|s>>12&63,n[o=o+1|0]=128|s>>6&63,n[o=o+1|0]=128|63&s;continue}break t}s=65533}else 57343>=s&&(s=65533);!i&&e<<1<o&&e<<1<(o-7|0)&&(i=!0,(f=new u(3*r)).set(n),n=f)}n[o]=224|s>>12,n[o=o+1|0]=128|s>>6&63}n[o=o+1|0]=128|63&s}}return a?n.subarray(0,o):n.slice(0,o)},l||(t.TextDecoder=e,t.TextEncoder=r)}(""+void 0==typeof r.g?""+void 0==typeof self?this:self:r.g)},251:(t,e)=>{e.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,f=u>>1,c=-7,h=r?o-1:0,l=r?-1:1,p=t[e+h];for(h+=l,i=p&(1<<-c)-1,p>>=-c,c+=a;c>0;i=256*i+t[e+h],h+=l,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=l,c-=8);if(0===i)i=1-f;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=f}return(p?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,a,u,f=8*i-o-1,c=(1<<f)-1,h=c>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=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=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,o),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;t[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,f+=o;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*y}},386:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=__webpack_require__.g:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t){return function(e){return new Md5(!0).update(e)[t]()}},createMethod=function(){var t=createOutputMethod("hex");NODE_JS&&(t=nodeWrap(t)),t.create=function(){return new Md5},t.update=function(e){return t.create().update(e)};for(var e=0;e<OUTPUT_TYPES.length;++e){var r=OUTPUT_TYPES[e];t[r]=createOutputMethod(r)}return t},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(t){if("string"==typeof t)return crypto.createHash("md5").update(t,"utf8").digest("hex");if(null==t)throw ERROR;return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer?crypto.createHash("md5").update(new Buffer(t)).digest("hex"):method(t)};return nodeMethod};function Md5(t){if(t)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var e=new ArrayBuffer(68);this.buffer8=new Uint8Array(e),this.blocks=new Uint32Array(e)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(t){if(!this.finalized){var e,r=typeof t;if("string"!==r){if("object"!==r)throw ERROR;if(null===t)throw ERROR;if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||ARRAY_BUFFER&&ArrayBuffer.isView(t)))throw ERROR;e=!0}for(var n,o,i=0,s=t.length,a=this.blocks,u=this.buffer8;i<s;){if(this.hashed&&(this.hashed=!1,a[0]=a[16],a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),e)if(ARRAY_BUFFER)for(o=this.start;i<s&&o<64;++i)u[o++]=t[i];else for(o=this.start;i<s&&o<64;++i)a[o>>2]|=t[i]<<SHIFT[3&o++];else if(ARRAY_BUFFER)for(o=this.start;i<s&&o<64;++i)(n=t.charCodeAt(i))<128?u[o++]=n:n<2048?(u[o++]=192|n>>6,u[o++]=128|63&n):n<55296||n>=57344?(u[o++]=224|n>>12,u[o++]=128|n>>6&63,u[o++]=128|63&n):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++i)),u[o++]=240|n>>18,u[o++]=128|n>>12&63,u[o++]=128|n>>6&63,u[o++]=128|63&n);else for(o=this.start;i<s&&o<64;++i)(n=t.charCodeAt(i))<128?a[o>>2]|=n<<SHIFT[3&o++]:n<2048?(a[o>>2]|=(192|n>>6)<<SHIFT[3&o++],a[o>>2]|=(128|63&n)<<SHIFT[3&o++]):n<55296||n>=57344?(a[o>>2]|=(224|n>>12)<<SHIFT[3&o++],a[o>>2]|=(128|n>>6&63)<<SHIFT[3&o++],a[o>>2]|=(128|63&n)<<SHIFT[3&o++]):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++i)),a[o>>2]|=(240|n>>18)<<SHIFT[3&o++],a[o>>2]|=(128|n>>12&63)<<SHIFT[3&o++],a[o>>2]|=(128|n>>6&63)<<SHIFT[3&o++],a[o>>2]|=(128|63&n)<<SHIFT[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[e>>2]|=EXTRA[3&e],e>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var t,e,r,n,o,i,s=this.blocks;this.first?e=((e=((t=((t=s[0]-680876937)<<7|t>>>25)-271733879|0)^(r=((r=(-271733879^(n=((n=(-1732584194^2004318071&t)+s[1]-117830708)<<12|n>>>20)+t|0)&(-271733879^t))+s[2]-1126478375)<<17|r>>>15)+n|0)&(n^t))+s[3]-1316259209)<<22|e>>>10)+r|0:(t=this.h0,e=this.h1,r=this.h2,e=((e+=((t=((t+=((n=this.h3)^e&(r^n))+s[0]-680876936)<<7|t>>>25)+e|0)^(r=((r+=(e^(n=((n+=(r^t&(e^r))+s[1]-389564586)<<12|n>>>20)+t|0)&(t^e))+s[2]+606105819)<<17|r>>>15)+n|0)&(n^t))+s[3]-1044525330)<<22|e>>>10)+r|0),e=((e+=((t=((t+=(n^e&(r^n))+s[4]-176418897)<<7|t>>>25)+e|0)^(r=((r+=(e^(n=((n+=(r^t&(e^r))+s[5]+1200080426)<<12|n>>>20)+t|0)&(t^e))+s[6]-1473231341)<<17|r>>>15)+n|0)&(n^t))+s[7]-45705983)<<22|e>>>10)+r|0,e=((e+=((t=((t+=(n^e&(r^n))+s[8]+1770035416)<<7|t>>>25)+e|0)^(r=((r+=(e^(n=((n+=(r^t&(e^r))+s[9]-1958414417)<<12|n>>>20)+t|0)&(t^e))+s[10]-42063)<<17|r>>>15)+n|0)&(n^t))+s[11]-1990404162)<<22|e>>>10)+r|0,e=((e+=((t=((t+=(n^e&(r^n))+s[12]+1804603682)<<7|t>>>25)+e|0)^(r=((r+=(e^(n=((n+=(r^t&(e^r))+s[13]-40341101)<<12|n>>>20)+t|0)&(t^e))+s[14]-1502002290)<<17|r>>>15)+n|0)&(n^t))+s[15]+1236535329)<<22|e>>>10)+r|0,e=((e+=((n=((n+=(e^r&((t=((t+=(r^n&(e^r))+s[1]-165796510)<<5|t>>>27)+e|0)^e))+s[6]-1069501632)<<9|n>>>23)+t|0)^t&((r=((r+=(t^e&(n^t))+s[11]+643717713)<<14|r>>>18)+n|0)^n))+s[0]-373897302)<<20|e>>>12)+r|0,e=((e+=((n=((n+=(e^r&((t=((t+=(r^n&(e^r))+s[5]-701558691)<<5|t>>>27)+e|0)^e))+s[10]+38016083)<<9|n>>>23)+t|0)^t&((r=((r+=(t^e&(n^t))+s[15]-660478335)<<14|r>>>18)+n|0)^n))+s[4]-405537848)<<20|e>>>12)+r|0,e=((e+=((n=((n+=(e^r&((t=((t+=(r^n&(e^r))+s[9]+568446438)<<5|t>>>27)+e|0)^e))+s[14]-1019803690)<<9|n>>>23)+t|0)^t&((r=((r+=(t^e&(n^t))+s[3]-187363961)<<14|r>>>18)+n|0)^n))+s[8]+1163531501)<<20|e>>>12)+r|0,e=((e+=((n=((n+=(e^r&((t=((t+=(r^n&(e^r))+s[13]-1444681467)<<5|t>>>27)+e|0)^e))+s[2]-51403784)<<9|n>>>23)+t|0)^t&((r=((r+=(t^e&(n^t))+s[7]+1735328473)<<14|r>>>18)+n|0)^n))+s[12]-1926607734)<<20|e>>>12)+r|0,e=((e+=((i=(n=((n+=((o=e^r)^(t=((t+=(o^n)+s[5]-378558)<<4|t>>>28)+e|0))+s[8]-2022574463)<<11|n>>>21)+t|0)^t)^(r=((r+=(i^e)+s[11]+1839030562)<<16|r>>>16)+n|0))+s[14]-35309556)<<23|e>>>9)+r|0,e=((e+=((i=(n=((n+=((o=e^r)^(t=((t+=(o^n)+s[1]-1530992060)<<4|t>>>28)+e|0))+s[4]+1272893353)<<11|n>>>21)+t|0)^t)^(r=((r+=(i^e)+s[7]-155497632)<<16|r>>>16)+n|0))+s[10]-1094730640)<<23|e>>>9)+r|0,e=((e+=((i=(n=((n+=((o=e^r)^(t=((t+=(o^n)+s[13]+681279174)<<4|t>>>28)+e|0))+s[0]-358537222)<<11|n>>>21)+t|0)^t)^(r=((r+=(i^e)+s[3]-722521979)<<16|r>>>16)+n|0))+s[6]+76029189)<<23|e>>>9)+r|0,e=((e+=((i=(n=((n+=((o=e^r)^(t=((t+=(o^n)+s[9]-640364487)<<4|t>>>28)+e|0))+s[12]-421815835)<<11|n>>>21)+t|0)^t)^(r=((r+=(i^e)+s[15]+530742520)<<16|r>>>16)+n|0))+s[2]-995338651)<<23|e>>>9)+r|0,e=((e+=((n=((n+=(e^((t=((t+=(r^(e|~n))+s[0]-198630844)<<6|t>>>26)+e|0)|~r))+s[7]+1126891415)<<10|n>>>22)+t|0)^((r=((r+=(t^(n|~e))+s[14]-1416354905)<<15|r>>>17)+n|0)|~t))+s[5]-57434055)<<21|e>>>11)+r|0,e=((e+=((n=((n+=(e^((t=((t+=(r^(e|~n))+s[12]+1700485571)<<6|t>>>26)+e|0)|~r))+s[3]-1894986606)<<10|n>>>22)+t|0)^((r=((r+=(t^(n|~e))+s[10]-1051523)<<15|r>>>17)+n|0)|~t))+s[1]-2054922799)<<21|e>>>11)+r|0,e=((e+=((n=((n+=(e^((t=((t+=(r^(e|~n))+s[8]+1873313359)<<6|t>>>26)+e|0)|~r))+s[15]-30611744)<<10|n>>>22)+t|0)^((r=((r+=(t^(n|~e))+s[6]-1560198380)<<15|r>>>17)+n|0)|~t))+s[13]+1309151649)<<21|e>>>11)+r|0,e=((e+=((n=((n+=(e^((t=((t+=(r^(e|~n))+s[4]-145523070)<<6|t>>>26)+e|0)|~r))+s[11]-1120210379)<<10|n>>>22)+t|0)^((r=((r+=(t^(n|~e))+s[2]+718787259)<<15|r>>>17)+n|0)|~t))+s[9]-343485551)<<21|e>>>11)+r|0,this.first?(this.h0=t+1732584193|0,this.h1=e-271733879|0,this.h2=r-1732584194|0,this.h3=n+271733878|0,this.first=!1):(this.h0=this.h0+t|0,this.h1=this.h1+e|0,this.h2=this.h2+r|0,this.h3=this.h3+n|0)},Md5.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3;return HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,n=this.h3;return[255&t,t>>8&255,t>>16&255,t>>24&255,255&e,e>>8&255,e>>16&255,e>>24&255,255&r,r>>8&255,r>>16&255,r>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),e=new Uint32Array(t);return e[0]=this.h0,e[1]=this.h1,e[2]=this.h2,e[3]=this.h3,t},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var t,e,r,n="",o=this.array(),i=0;i<15;)t=o[i++],e=o[i++],r=o[i++],n+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[63&(t<<4|e>>>4)]+BASE64_ENCODE_CHAR[63&(e<<2|r>>>6)]+BASE64_ENCODE_CHAR[63&r];return t=o[i],n+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[t<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},173:t=>{function e(){this._events={}}e.prototype={on:function(t,e){this._events||(this._events={});var r=this._events;return(r[t]||(r[t]=[])).push(e),this},removeListener:function(t,e){var r,n=this._events[t]||[];for(r=n.length-1;r>=0&&n[r];r--)n[r]!==e&&n[r].cb!==e||n.splice(r,1)},removeAllListeners:function(t){t?this._events[t]&&(this._events[t]=[]):this._events={}},listeners:function(t){return this._events&&this._events[t]||[]},emit:function(t){this._events||(this._events={});var e,r=Array.prototype.slice.call(arguments,1),n=this._events[t]||[];for(e=n.length-1;e>=0&&n[e];e--)n[e].apply(this,r);return this},when:function(t,e){return this.once(t,e,!0)},once:function(t,e,r){if(!e)return this;function n(){r||this.removeListener(t,n),e.apply(this,arguments)&&r&&this.removeListener(t,n)}return n.cb=e,this.on(t,n),this}},e.mixin=function(t){var r,n=e.prototype;for(r in n)n.hasOwnProperty(r)&&(t.prototype[r]=n[r])},t.exports=e},84:(t,e,r)=>{var n=r(408),o={debug:1,info:2,warn:3,error:4};function i(){this.enabled=!0,this.defaultResult=!0,this.clear()}function s(t,e){return t.n.test?t.n.test(e):t.n==e}n.mixin(i),i.prototype.allow=function(t,e){return this._white.push({n:t,l:o[e]}),this},i.prototype.deny=function(t,e){return this._black.push({n:t,l:o[e]}),this},i.prototype.clear=function(){return this._white=[],this._black=[],this},i.prototype.test=function(t,e){var r,n=Math.max(this._white.length,this._black.length);for(r=0;r<n;r++){if(this._white[r]&&s(this._white[r],t)&&o[e]>=this._white[r].l)return!0;if(this._black[r]&&s(this._black[r],t)&&o[e]<=this._black[r].l)return!1}return this.defaultResult},i.prototype.write=function(t,e,r){if(!this.enabled||this.test(t,e))return this.emit("item",t,e,r)},t.exports=i},15:(t,e,r)=>{var n=r(408),o=r(84),i=new n,s=Array.prototype.slice;(e=t.exports=function(t){var r=function(){return i.write(t,void 0,s.call(arguments)),r};return r.debug=function(){return i.write(t,"debug",s.call(arguments)),r},r.info=function(){return i.write(t,"info",s.call(arguments)),r},r.warn=function(){return i.write(t,"warn",s.call(arguments)),r},r.error=function(){return i.write(t,"error",s.call(arguments)),r},r.log=r.debug,r.suggest=e.suggest,r.format=i.format,r}).defaultBackend=e.defaultFormatter=null,e.pipe=function(t){return i.pipe(t)},e.end=e.unpipe=e.disable=function(t){return i.unpipe(t)},e.Transform=n,e.Filter=o,e.suggest=new o,e.enable=function(){return e.defaultFormatter?i.pipe(e.suggest).pipe(e.defaultFormatter).pipe(e.defaultBackend):i.pipe(e.suggest).pipe(e.defaultBackend)}},408:(t,e,r)=>{function n(){}r(173).mixin(n),n.prototype.write=function(t,e,r){this.emit("item",t,e,r)},n.prototype.end=function(){this.emit("end"),this.removeAllListeners()},n.prototype.pipe=function(t){var e=this;function r(){t.write.apply(t,Array.prototype.slice.call(arguments))}function n(){!t._isStdio&&t.end()}return e.emit("unpipe",t),t.emit("pipe",e),e.on("item",r),e.on("end",n),e.when("unpipe",(function(o){var i=o===t||void 0===o;return i&&(e.removeListener("item",r),e.removeListener("end",n),t.emit("unpipe")),i})),t},n.prototype.unpipe=function(t){return this.emit("unpipe",t),this},n.prototype.format=function(t){throw new Error(["Warning: .format() is deprecated in Minilog v2! Use .pipe() instead. For example:","var Minilog = require('minilog');","Minilog"," .pipe(Minilog.backends.console.formatClean)"," .pipe(Minilog.backends.console);"].join("\n"))},n.mixin=function(t){var e,r=n.prototype;for(e in r)r.hasOwnProperty(e)&&(t.prototype[e]=r[e])},t.exports=n},692:(t,e,r)=>{var n=r(408),o=[],i=new n;i.write=function(t,e,r){o.push([t,e,r])},i.get=function(){return o},i.empty=function(){o=[]},t.exports=i},260:(t,e,r)=>{var n=r(408),o=/\n+$/,i=new n;i.write=function(t,e,r){var n=r.length-1;if("undefined"!=typeof console&&console.log){if(console.log.apply)return console.log.apply(console,[t,e].concat(r));if(JSON&&JSON.stringify){r[n]&&"string"==typeof r[n]&&(r[n]=r[n].replace(o,""));try{for(n=0;n<r.length;n++)r[n]=JSON.stringify(r[n])}catch(t){}console.log(r.join(" "))}}},i.formatters=["color","minilog"],i.color=r(638),i.minilog=r(658),t.exports=i},638:(t,e,r)=>{var n=r(408),o=r(193),i={debug:["cyan"],info:["purple"],warn:["yellow",!0],error:["red",!0]},s=new n;s.write=function(t,e,r){console.log;console[e]&&console[e].apply&&console[e].apply(console,["%c"+t+" %c"+e,o("gray"),o.apply(o,i[e])].concat(r))},s.pipe=function(){},t.exports=s},658:(t,e,r)=>{var n=r(408),o=r(193),i={debug:["gray"],info:["purple"],warn:["yellow",!0],error:["red",!0]},s=new n;s.write=function(t,e,r){var n=console.log;"debug"!=e&&console[e]&&(n=console[e]);var s=0;if("info"!=e){for(;s<r.length&&"string"==typeof r[s];s++);n.apply(console,["%c"+t+" "+r.slice(0,s).join(" "),o.apply(o,i[e])].concat(r.slice(s)))}else n.apply(console,["%c"+t,o.apply(o,i[e])].concat(r))},s.pipe=function(){},t.exports=s},193:t=>{var e={black:"#000",red:"#c23621",green:"#25bc26",yellow:"#bbbb00",blue:"#492ee1",magenta:"#d338d3",cyan:"#33bbc8",gray:"#808080",purple:"#708"};t.exports=function(t,r){return r?"color: #fff; background: "+e[t]+";":"color: "+e[t]+";"}},557:(t,e,r)=>{var n=r(15),o=n.enable,i=n.disable,s="undefined"!=typeof navigator&&/chrome/i.test(navigator.userAgent),a=r(260);if(n.defaultBackend=s?a.minilog:a,"undefined"!=typeof window){try{n.enable(JSON.parse(window.localStorage.minilogSettings))}catch(t){}if(window.location&&window.location.search){var u=RegExp("[?&]minilog=([^&]*)").exec(window.location.search);u&&n.enable(decodeURIComponent(u[1]))}}n.enable=function(){o.call(n,!0);try{window.localStorage.minilogSettings=JSON.stringify(!0)}catch(t){}return this},n.disable=function(){i.call(n);try{delete window.localStorage.minilogSettings}catch(t){}return this},(t.exports=n).backends={array:r(692),browser:n.defaultBackend,localStorage:r(113),jQuery:r(740)}},740:(t,e,r)=>{var n=r(408),o=(new Date).valueOf().toString(36);function i(t){this.url=t.url||"",this.cache=[],this.timer=null,this.interval=t.interval||3e4,this.enabled=!0,this.jQuery=window.jQuery,this.extras={}}n.mixin(i),i.prototype.write=function(t,e,r){this.timer||this.init(),this.cache.push([t,e].concat(r))},i.prototype.init=function(){if(this.enabled&&this.jQuery){var t=this;this.timer=setTimeout((function(){var e,r,n=[],i=t.url;if(0==t.cache.length)return t.init();for(e=0;e<t.cache.length;e++)try{JSON.stringify(t.cache[e]),n.push(t.cache[e])}catch(t){}t.jQuery.isEmptyObject(t.extras)?(r=JSON.stringify({logs:n}),i=t.url+"?client_id="+o):r=JSON.stringify(t.jQuery.extend({logs:n},t.extras)),t.jQuery.ajax(i,{type:"POST",cache:!1,processData:!1,data:r,contentType:"application/json",timeout:1e4}).success((function(e,r,n){e.interval&&(t.interval=Math.max(1e3,e.interval))})).error((function(){t.interval=3e4})).always((function(){t.init()})),t.cache=[]}),this.interval)}},i.prototype.end=function(){},i.jQueryWait=function(t){if("undefined"!=typeof window&&(window.jQuery||window.$))return t(window.jQuery||window.$);"undefined"!=typeof window&&setTimeout((function(){i.jQueryWait(t)}),200)},t.exports=i},113:(t,e,r)=>{var n=r(408),o=!1,i=new n;i.write=function(t,e,r){if("undefined"!=typeof window&&"undefined"!=typeof JSON&&JSON.stringify&&JSON.parse)try{o||(o=window.localStorage.minilog?JSON.parse(window.localStorage.minilog):[]),o.push([(new Date).toString(),t,e,r]),window.localStorage.minilog=JSON.stringify(o)}catch(t){}},t.exports=i}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.u=t=>"chunks/fetch-worker.0fa0968cc994fb298693.js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.p="/",__webpack_require__.b=document.baseURI||self.location.href;var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Asset:()=>f,AssetType:()=>h,DataFormat:()=>c,Helper:()=>p,ScratchStorage:()=>L});var t=__webpack_require__(557),e=__webpack_require__.n(t);e().enable();const r=e()("storage");var n=__webpack_require__(386),o=__webpack_require__.n(n);let i,s;if("undefined"==typeof TextDecoder||"undefined"==typeof TextEncoder){const t=__webpack_require__(767);i=t.TextDecoder,s=t.TextEncoder}else i=TextDecoder,s=TextEncoder;const a=function(){let t=null;const e={};return(r,n)=>{if(!Object.prototype.hasOwnProperty.call(e,r))if("undefined"==typeof btoa){const t=__webpack_require__(526);e[r]=t.fromByteArray(n)}else{if(null===t){t=new Array(256);for(let e=0;e<256;e++)t[e]=String.fromCharCode(e)}const{length:o}=n;let i="";for(let e=0,r=0;e<o;e=r){r=Math.min(r+32766,o);let s="";for(let o=e;o<r;o+=1)s+=t[n[o]];i+=btoa(s)}e[r]=i}return e[r]}}();function u(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class f{constructor(t,e,r,n,o){u(this,"assetType",void 0),u(this,"assetId",void 0),u(this,"data",void 0),u(this,"dataFormat",void 0),u(this,"dependencies",void 0),u(this,"clean",void 0),this.assetType=t,this.assetId=e,this.setData(n,r||t.runtimeFormat,o),this.dependencies=[]}setData(t,e,r){if(t&&!e)throw new Error("Data provided without specifying its format");this.dataFormat=e,this.data=t,r&&(this.assetId=o()(t)),this.clean=!r}decodeText(){return(new i).decode(this.data)}encodeTextData(t,e,r){const n=new s;this.setData(n.encode(t),e,r)}encodeDataURI(t){return t=t||this.assetType.contentType,"data:".concat(t,";base64,").concat(a(this.assetId,this.data))}}const c={JPG:"jpg",JSON:"json",MP3:"mp3",PNG:"png",SB2:"sb2",SB3:"sb3",SVG:"svg",WAV:"wav"},h={ImageBitmap:{contentType:"image/png",name:"ImageBitmap",runtimeFormat:c.PNG,immutable:!0},ImageVector:{contentType:"image/svg+xml",name:"ImageVector",runtimeFormat:c.SVG,immutable:!0},Project:{contentType:"application/json",name:"Project",runtimeFormat:c.JSON,immutable:!1},Sound:{contentType:"audio/x-wav",name:"Sound",runtimeFormat:c.WAV,immutable:!0},Sprite:{contentType:"application/json",name:"Sprite",runtimeFormat:c.JSON,immutable:!0}};function l(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class p{constructor(t){l(this,"parent",void 0),this.parent=t}load(t,e,r){return Promise.reject(new Error("No asset of type ".concat(t," for ID ").concat(e," with format ").concat(r)))}}var d=__webpack_require__(9),y=__webpack_require__.n(d),g=__webpack_require__(680),b=__webpack_require__.n(g),w=__webpack_require__(914),_=__webpack_require__.n(w),m=__webpack_require__(287);function A(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const v=[{type:h.ImageBitmap,format:c.PNG,id:null,data:m.hp.from(y())},{type:h.Sound,format:c.WAV,id:null,data:m.hp.from(b())},{type:h.ImageVector,format:c.SVG,id:null,data:m.hp.from(_())}],E=v.concat([]);class S extends p{constructor(t){super(t),A(this,"assets",void 0),this.assets={},E.forEach((t=>{t.id=this._store(t.type,t.format,t.data,t.id)}))}registerDefaultAssets(){const t=v.length;for(let e=0;e<t;++e){const t=v[e];this.parent.setDefaultAssetId(t.type,t.id)}}get(t){let e=null;if(Object.prototype.hasOwnProperty.call(this.assets,t)){const r=this.assets[t];e=new f(r.type,r.id,r.format,r.data)}return e}cache(t,e,n,o){return r.warn("Deprecation: BuiltinHelper.cache has been replaced with BuiltinHelper.store."),this.store(t,e,n,o)}store(t,e,n,o){return r.warn("Deprecation: use Storage.createAsset. BuiltinHelper is for internal use only."),this._store(t,e,n,o)}_store(t,e,r,n){let i=n;if(!e)throw new Error("Data cached without specifying its format");if(""!==i&&null!=i){if(Object.prototype.hasOwnProperty.call(this.assets,i)&&t.immutable)return i}else{if(!t.immutable)throw new Error("Tried to cache data without an id");i=o()(r)}return this.assets[i]={type:t,format:e,id:i,data:r},i}load(t,e){return this.get(e)?Promise.resolve(this.get(e)):null}}var B=__webpack_require__(953),R=__webpack_require__.n(B);const O=["url"];function I(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class T{constructor(){I(this,"_workerSupport",void 0),I(this,"_supportError",void 0),I(this,"worker",void 0),I(this,"jobs",void 0),this._workerSupport={fetch:"undefined"!=typeof fetch},this._supportError=null,this.worker=null,this.jobs={};try{if(this.isGetSupported){const t=new Worker(new URL(__webpack_require__.p+__webpack_require__.u(836),__webpack_require__.b));t.addEventListener("message",(t=>{let{data:e}=t;if(e.support)this._workerSupport=e.support;else for(const t of e){const e=this.jobs[t.id];e&&(t.error?e.reject(t.error):e.resolve(t.buffer),delete this.jobs[t.id])}})),this.worker=t}}catch(t){this._supportError=t}}get isGetSupported(){return"undefined"!=typeof Worker&&this._workerSupport.fetch&&!this._supportError}get(t){let{url:e}=t,r=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.includes(r)||{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,O);const n=this.worker;return n?new Promise(((t,o)=>{const i=Math.random().toString(16).substring(2),s=(0,B.applyMetadata)(Object.assign({method:"GET"},r));s&&s.headers instanceof B.Headers&&(s.headers=Array.from(s.headers.entries())),n.postMessage({id:i,url:e,options:s}),this.jobs[i]={id:i,resolve:t,reject:o}})).then((t=>t?new Uint8Array(t):null)):Promise.reject(new Error("The worker could not be initialized"))}get isSendSupported(){return!1}send(){throw new Error("Not implemented.")}static get instance(){return this._instance||(this._instance=new T),this._instance}}I(T,"_instance",void 0);class x{constructor(){I(this,"inner",void 0),this.inner=T.instance}get isGetSupported(){return this.inner.isGetSupported}get(t){return this.inner.get(t)}get isSendSupported(){return!1}send(){throw new Error("Not implemented.")}}const U=["url"],j=["url","withCredentials"];function H(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.includes(r)||{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}class C{get isGetSupported(){return!0}get(t){let{url:e}=t,r=H(t,U);return(0,B.scratchFetch)(e,Object.assign({method:"GET"},r)).then((t=>t.ok?t.arrayBuffer().then((t=>new Uint8Array(t))):404===t.status?null:Promise.reject(t.status)))}get isSendSupported(){return!0}send(t){let{url:e,withCredentials:r=!1}=t,n=H(t,j);return(0,B.scratchFetch)(e,Object.assign({credentials:r?"include":"omit"},n)).then((t=>t.ok?t.text():Promise.reject(t.status)))}}function P(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class k{constructor(){let t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k.TOOL_FILTER.ALL;P(this,"tools",void 0),t=e===k.TOOL_FILTER.READY?[new C]:[new x,new C],this.tools=t}get isGetSupported(){return this.tools.some((t=>t.isGetSupported))}get(t){let e=0;const r=n=>{const o=this.tools[e++];if(!o)throw n;return o.isGetSupported?o.get(t).catch(r):r(n)};return r()}get isSendSupported(){return this.tools.some((t=>t.isSendSupported))}send(t){let e=0;const r=n=>{const o=this.tools[e++];if(!o)throw n;return o.isSendSupported?o.send(t).catch(r):r(n)};return r()}}function D(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}P(k,"TOOL_FILTER",{ALL:"all",READY:"ready"});const M=t=>"string"==typeof t?{url:t}:t;class F extends p{constructor(t){super(t),D(this,"stores",void 0),D(this,"assetTool",void 0),D(this,"projectTool",void 0),this.stores=[],this.assetTool=new k,this.projectTool=new k(k.TOOL_FILTER.READY)}addSource(t,e){r.warn("Deprecation: WebHelper.addSource has been replaced with WebHelper.addStore."),this.addStore(t,e)}addStore(t,e,r,n){this.stores.push({types:t.map((t=>t.name)),get:e,create:r,update:n})}load(t,e,r){const n=[],o=this.stores.slice().filter((e=>e.types.indexOf(t.name)>=0)),i=new f(t,e,r);let s=this.assetTool;"Project"===t.name&&(s=this.projectTool);let a=0;const u=t=>{t&&n.push(t);const e=o[a++],f=e&&e.get;if(f){const t=M(f(i));return!1===t?u():s.get(t).then((t=>t?(i.setData(t,r),i):u())).catch(u)}return n.length>0?Promise.reject(n):Promise.resolve(null)};return u()}store(t,e,r,n){const o=new f(t,n,e),i=""===n||null==n,s=this.stores.filter((e=>-1!==e.types.indexOf(t.name)&&(i&&e.create||e.update)))[0],a=i?"post":"put";if(!s)return Promise.reject(new Error("No appropriate stores"));let u=this.assetTool;"Project"===t.name&&(u=this.projectTool);const c=M(i?s.create(o):s.update(o)),h=Object.assign({body:r,method:a},c);return u.send(h).then((t=>{if("string"==typeof t)try{t=JSON.parse(t)}catch(e){return t}return Object.assign({id:t["content-name"]||n},t)}))}}function N(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class L{constructor(){N(this,"defaultAssetId",void 0),N(this,"builtinHelper",void 0),N(this,"webHelper",void 0),N(this,"_helpers",void 0),this.defaultAssetId={},this.builtinHelper=new S(this),this.webHelper=new F(this),this.builtinHelper.registerDefaultAssets(),this._helpers=[{helper:this.builtinHelper,priority:100},{helper:this.webHelper,priority:-100}]}get Asset(){return f}get AssetType(){return h}get DataFormat(){return c}get scratchFetch(){return R()}static get Asset(){return f}static get AssetType(){return h}addHelper(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._helpers.push({helper:t,priority:e}),this._helpers.sort(((t,e)=>e.priority-t.priority))}get(t){return this.builtinHelper.get(t)}cache(t,e,n,o){return r.warn("Deprecation: Storage.cache is deprecated. Use Storage.createAsset, and store assets externally."),this.builtinHelper._store(t,e,n,o)}createAsset(t,e,r,n,o){if(!e)throw new Error("Tried to create asset without a dataFormat");return new f(t,n,e,r,o)}addWebStore(t,e,r,n){this.webHelper.addStore(t,e,r,n)}addWebSource(t,e){r.warn("Deprecation: Storage.addWebSource has been replaced by addWebStore."),this.addWebStore(t,e)}getDefaultAssetId(t){if(Object.prototype.hasOwnProperty.call(this.defaultAssetId,t.name))return this.defaultAssetId[t.name]}setDefaultAssetId(t,e){this.defaultAssetId[t.name]=e}load(t,e,r){const n=this._helpers.map((t=>t.helper)),o=[];r=r||t.runtimeFormat;let i,s=0;const a=u=>{if(u&&o.push(u),i=n[s++],i){const n=i.load(t,e,r);return null===n?a():n.catch(a)}return o.length>0?Promise.reject(o):Promise.resolve(null)};return a()}store(t,e,r,n){return e=e||t.runtimeFormat,this.webHelper.store(t,e,r,n).then((n=>{const o="string"==typeof n?void 0:n.id;return this.builtinHelper._store(t,e,r,o),n}))}}})(),__webpack_exports__})()));
|
|
3
3
|
//# sourceMappingURL=scratch-storage.min.js.map
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scratch-storage",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Load and store project and asset files for Scratch 3.0",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"homepage": "https://github.com/scratchfoundation/scratch-storage#readme",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/scratchfoundation/scratch-storage.git",
|
|
10
|
-
"sha": "
|
|
10
|
+
"sha": "dc79c07809c15ab174f6577fb3ba55e810c52959"
|
|
11
11
|
},
|
|
12
12
|
"main": "./dist/node/scratch-storage.js",
|
|
13
13
|
"browser": "./dist/web/scratch-storage.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@babel/runtime": "^7.21.0",
|
|
34
34
|
"arraybuffer-loader": "^1.0.3",
|
|
35
35
|
"base64-js": "^1.3.0",
|
|
36
|
-
"cross-fetch": "^
|
|
36
|
+
"cross-fetch": "^4.0.0",
|
|
37
37
|
"fastestsmallesttextencoderdecoder": "^1.0.7",
|
|
38
38
|
"js-md5": "^0.7.3",
|
|
39
39
|
"minilog": "^3.1.0"
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"@commitlint/cli": "18.6.1",
|
|
47
47
|
"@commitlint/config-conventional": "18.6.3",
|
|
48
48
|
"@commitlint/travis-cli": "8.3.6",
|
|
49
|
-
"@types/jest": "
|
|
50
|
-
"@typescript-eslint/eslint-plugin": "
|
|
51
|
-
"babel-loader": "9.1
|
|
49
|
+
"@types/jest": "29.5.13",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
51
|
+
"babel-loader": "9.2.1",
|
|
52
52
|
"buffer": "6.0.3",
|
|
53
53
|
"eslint": "8.57.1",
|
|
54
54
|
"eslint-config-scratch": "9.0.9",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"husky": "8.0.3",
|
|
59
59
|
"jest": "29.7.0",
|
|
60
60
|
"json": "^9.0.4",
|
|
61
|
-
"rimraf": "
|
|
61
|
+
"rimraf": "6.0.1",
|
|
62
62
|
"scratch-semantic-release-config": "1.0.16",
|
|
63
63
|
"scratch-webpack-configuration": "1.6.0",
|
|
64
64
|
"semantic-release": "19.0.5",
|
|
65
65
|
"ts-jest": "29.2.5",
|
|
66
|
-
"ts-jest-mock-import-meta": "
|
|
66
|
+
"ts-jest-mock-import-meta": "1.2.0",
|
|
67
67
|
"ts-loader": "9.5.1",
|
|
68
|
-
"webpack": "5.
|
|
68
|
+
"webpack": "5.95.0",
|
|
69
69
|
"webpack-cli": "5.1.4"
|
|
70
70
|
},
|
|
71
71
|
"config": {
|
package/src/scratchFetch.js
CHANGED
|
@@ -102,23 +102,20 @@ const unsetMetadata = name => {
|
|
|
102
102
|
metadata.delete(name);
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Retrieve a named request metadata item.
|
|
107
|
+
* Only for use in tests. At the time of writing, used in scratch-vm tests.
|
|
108
|
+
* @param {RequestMetadata} name The name of the metadata item to retrieve.
|
|
109
|
+
* @returns {any} value The value of the metadata item, or `undefined` if it was not found.
|
|
110
|
+
*/
|
|
111
|
+
const getMetadata = name => metadata.get(name);
|
|
112
|
+
|
|
105
113
|
module.exports = {
|
|
106
114
|
Headers: crossFetch.Headers,
|
|
107
115
|
RequestMetadata,
|
|
108
116
|
applyMetadata,
|
|
109
117
|
scratchFetch,
|
|
110
118
|
setMetadata,
|
|
111
|
-
unsetMetadata
|
|
119
|
+
unsetMetadata,
|
|
120
|
+
getMetadata
|
|
112
121
|
};
|
|
113
|
-
|
|
114
|
-
if (process.env.NODE_ENV === 'development') {
|
|
115
|
-
/**
|
|
116
|
-
* Retrieve a named request metadata item.
|
|
117
|
-
* Only for use in tests.
|
|
118
|
-
* @param {RequestMetadata} name The name of the metadata item to retrieve.
|
|
119
|
-
* @returns {any} value The value of the metadata item, or `undefined` if it was not found.
|
|
120
|
-
*/
|
|
121
|
-
const getMetadata = name => metadata.get(name);
|
|
122
|
-
|
|
123
|
-
module.exports.getMetadata = getMetadata;
|
|
124
|
-
}
|
package/webpack.config.js
CHANGED
|
@@ -27,10 +27,11 @@ if (!process.env.CI) {
|
|
|
27
27
|
const webConfig = baseConfig.clone()
|
|
28
28
|
.merge({
|
|
29
29
|
output: {
|
|
30
|
-
library:
|
|
31
|
-
|
|
30
|
+
library: {
|
|
31
|
+
name: 'ScratchStorage',
|
|
32
|
+
type: 'umd2'
|
|
33
|
+
},
|
|
32
34
|
path: path.resolve(__dirname, 'dist', 'web'),
|
|
33
|
-
filename: '[name].js',
|
|
34
35
|
clean: false
|
|
35
36
|
}
|
|
36
37
|
});
|
|
@@ -62,9 +63,11 @@ const nodeConfig = baseConfig.clone()
|
|
|
62
63
|
'scratch-storage': path.join(__dirname, './src/index.ts')
|
|
63
64
|
},
|
|
64
65
|
output: {
|
|
65
|
-
|
|
66
|
+
library: {
|
|
67
|
+
type: 'commonjs2'
|
|
68
|
+
},
|
|
69
|
+
chunkFormat: 'commonjs',
|
|
66
70
|
path: path.resolve(__dirname, 'dist', 'node'),
|
|
67
|
-
filename: '[name].js',
|
|
68
71
|
clean: false
|
|
69
72
|
}
|
|
70
73
|
})
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/fetch-worker.eefe62e3c8ee125d3436.js","mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACziBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACvBA;;AAEA;AAEA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AAEA;;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AACA","sources":["webpack://scratch-storage/./node_modules/cross-fetch/dist/browser-ponyfill.js","webpack://scratch-storage/webpack/bootstrap","webpack://scratch-storage/./src/FetchWorkerTool.worker.js"],"sourcesContent":["var global = typeof self !== 'undefined' ? self : this;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\nvar irrelevant = (function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n})({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/* eslint-env worker */\n\nconst crossFetch = require('cross-fetch').default;\n\nlet jobsActive = 0;\nconst complete = [];\n\nlet intervalId = null;\n\n/**\n * Register a step function.\n *\n * Step checks if there are completed jobs and if there are sends them to the\n * parent. Then it checks the jobs count. If there are no further jobs, clear\n * the step.\n */\nconst registerStep = function () {\n intervalId = setInterval(() => {\n if (complete.length) {\n // Send our chunk of completed requests and instruct postMessage to\n // transfer the buffers instead of copying them.\n postMessage(\n complete.slice(),\n // Instruct postMessage that these buffers in the sent message\n // should use their Transferable trait. After the postMessage\n // call the \"buffers\" will still be in complete if you looked,\n // but they will all be length 0 as the data they reference has\n // been sent to the window. This lets us send a lot of data\n // without the normal postMessage behaviour of making a copy of\n // all of the data for the window.\n complete.map(response => response.buffer).filter(Boolean)\n );\n complete.length = 0;\n }\n if (jobsActive === 0) {\n clearInterval(intervalId);\n intervalId = null;\n }\n }, 1);\n};\n\n/**\n * Receive a job from the parent and fetch the requested data.\n * @param {object} options.job A job id, url, and options descriptor to perform.\n */\nconst onMessage = ({data: job}) => {\n if (jobsActive === 0 && !intervalId) {\n registerStep();\n }\n\n jobsActive++;\n\n crossFetch(job.url, job.options)\n .then(result => {\n if (result.ok) return result.arrayBuffer();\n if (result.status === 404) return null;\n return Promise.reject(result.status);\n })\n .then(buffer => complete.push({id: job.id, buffer}))\n .catch(error => complete.push({id: job.id, error: (error && error.message) || `Failed request: ${job.url}`}))\n .then(() => jobsActive--);\n};\n\n// crossFetch means \"fetch\" is now always supported\npostMessage({support: {fetch: true}});\nself.addEventListener('message', onMessage);\n"],"names":[],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ScratchStorage=e():t.ScratchStorage=e()}(self,(()=>(()=>{var t={945:function(t,e){var r="undefined"!=typeof self?self:this,o=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,o="Symbol"in t&&"iterator"in Symbol,n="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),i="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]"],h=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function u(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 f(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o&&(e[Symbol.iterator]=function(){return e}),e}function d(t){this.map={},t instanceof d?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 p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function l(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=l(e);return e.readAsArrayBuffer(t),r}function b(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:n&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&n&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=b(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||h(t))?this._bodyArrayBuffer=b(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"))},n&&(this.blob=function(){var t=p(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?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,r,o=p(this);if(o)return o;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=l(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),o=0;o<e.length;o++)r[o]=String.fromCharCode(e[o]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(x)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(t,e){t=u(t),e=f(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},d.prototype.delete=function(t){delete this.map[u(t)]},d.prototype.get=function(t){return t=u(t),this.has(t)?this.map[t]:null},d.prototype.has=function(t){return this.map.hasOwnProperty(u(t))},d.prototype.set=function(t,e){this.map[u(t)]=f(e)},d.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},d.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),c(t)},d.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),c(t)},d.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),c(t)},o&&(d.prototype[Symbol.iterator]=d.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function v(t,e){var r,o,n=(e=e||{}).body;if(t instanceof v){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new d(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new d(e.headers)),this.method=(r=e.method||this.method||"GET",o=r.toUpperCase(),w.indexOf(o)>-1?o:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function x(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}})),e}function E(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 d(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(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},E.error=function(){var t=new E(null,{status:0,statusText:""});return t.type="error",t};var g=[301,302,303,307,308];E.redirect=function(t,e){if(-1===g.indexOf(e))throw new RangeError("Invalid status code");return new E(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 A(t,r){return new Promise((function(o,i){var s=new v(t,r);if(s.signal&&s.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function h(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new d,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();e.append(o,n)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var n="response"in a?a.response:a.responseText;o(new E(n,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(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&&n&&(a.responseType="blob"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",h),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",h)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}A.polyfill=!0,t.fetch||(t.fetch=A,t.Headers=d,t.Request=v,t.Response=E),e.Headers=d,e.Request=v,e.Response=E,e.fetch=A,Object.defineProperty(e,"__esModule",{value:!0})}({})}(o),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var n=o;(e=n.fetch).default=n.fetch,e.fetch=n.fetch,e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response,t.exports=e}},e={};const r=function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,r),i.exports}(945).default;let o=0;const n=[];let i=null;return postMessage({support:{fetch:!0}}),self.addEventListener("message",(t=>{let{data:e}=t;0!==o||i||(i=setInterval((()=>{n.length&&(postMessage(n.slice(),n.map((t=>t.buffer)).filter(Boolean)),n.length=0),0===o&&(clearInterval(i),i=null)}),1)),o++,r(e.url,e.options).then((t=>t.ok?t.arrayBuffer():404===t.status?null:Promise.reject(t.status))).then((t=>n.push({id:e.id,buffer:t}))).catch((t=>n.push({id:e.id,error:t&&t.message||"Failed request: ".concat(e.url)}))).then((()=>o--))})),{}})()));
|
|
2
|
-
//# sourceMappingURL=fetch-worker.85da71862ab8ee15f1cd.js.map
|