msb-file 0.0.1 → 0.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.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Xe(_,h,p,m,b,R,C){try{var A=_[R](C),N=A.value}catch(d){return void p(d)}A.done?h(N):Promise.resolve(N).then(m,b)}function ee(_){return function(){var h=this,p=arguments;return new Promise(function(m,b){var R=_.apply(h,p);function C(N){Xe(R,m,b,C,A,"next",N)}function A(N){Xe(R,m,b,C,A,"throw",N)}C(void 0)})}}function at(_,h){if(!(_ instanceof h))throw new TypeError("Cannot call a class as a function")}function qe(_,h){for(var p=0;p<h.length;p++){var m=h[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(_,ar(m.key),m)}}function it(_,h,p){return h&&qe(_.prototype,h),p&&qe(_,p),Object.defineProperty(_,"prototype",{writable:!1}),_}function te(_,h,p){return(h=ar(h))in _?Object.defineProperty(_,h,{value:p,enumerable:!0,configurable:!0,writable:!0}):_[h]=p,_}function G(){var _,h,p=typeof Symbol=="function"?Symbol:{},m=p.iterator||"@@iterator",b=p.toStringTag||"@@toStringTag";function R(k,B,j,F){var W=B&&B.prototype instanceof A?B:A,M=Object.create(W.prototype);return ne(M,"_invoke",(function(re,J,y){var L,T,z,U=0,Q=y||[],V=!1,t={p:0,n:0,v:_,a,f:a.bind(_,4),d:function(i,n){return L=i,T=0,z=_,t.n=n,C}};function a(i,n){for(T=i,z=n,h=0;!V&&U&&!D&&h<Q.length;h++){var D,w=Q[h],g=t.p,x=w[2];i>3?(D=x===n)&&(z=w[(T=w[4])?5:(T=3,3)],w[4]=w[5]=_):w[0]<=g&&((D=i<2&&g<w[1])?(T=0,t.v=n,t.n=w[1]):g<x&&(D=i<3||w[0]>n||n>x)&&(w[4]=i,w[5]=n,t.n=x,T=0))}if(D||i>1)return C;throw V=!0,n}return function(i,n,D){if(U>1)throw TypeError("Generator is already running");for(V&&n===1&&a(n,D),T=n,z=D;(h=T<2?_:z)||!V;){L||(T?T<3?(T>1&&(t.n=-1),a(T,z)):t.n=z:t.v=z);try{if(U=2,L){if(T||(i="next"),h=L[i]){if(!(h=h.call(L,z)))throw TypeError("iterator result is not an object");if(!h.done)return h;z=h.value,T<2&&(T=0)}else T===1&&(h=L.return)&&h.call(L),T<2&&(z=TypeError("The iterator does not provide a '"+i+"' method"),T=1);L=_}else if((h=(V=t.n<0)?z:re.call(J,t))!==C)break}catch(w){L=_,T=1,z=w}finally{U=1}}return{value:h,done:V}}})(k,j,F),!0),M}var C={};function A(){}function N(){}function d(){}h=Object.getPrototypeOf;var $=[][m]?h(h([][m]())):(ne(h={},m,function(){return this}),h),c=d.prototype=A.prototype=Object.create($);function P(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,d):(k.__proto__=d,ne(k,b,"GeneratorFunction")),k.prototype=Object.create(c),k}return N.prototype=d,ne(c,"constructor",d),ne(d,"constructor",N),N.displayName="GeneratorFunction",ne(d,b,"GeneratorFunction"),ne(c),ne(c,b,"Generator"),ne(c,m,function(){return this}),ne(c,"toString",function(){return"[object Generator]"}),(G=function(){return{w:R,m:P}})()}function ne(_,h,p,m){var b=Object.defineProperty;try{b({},"",{})}catch{b=0}ne=function(R,C,A,N){function d($,c){ne(R,$,function(P){return this._invoke($,c,P)})}C?b?b(R,C,{value:A,enumerable:!N,configurable:!N,writable:!N}):R[C]=A:(d("next",0),d("throw",1),d("return",2))},ne(_,h,p,m)}function ot(_){if(_!=null){var h=_[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],p=0;if(h)return h.call(_);if(typeof _.next=="function")return _;if(!isNaN(_.length))return{next:function(){return _&&p>=_.length&&(_=void 0),{value:_&&_[p++],done:!_}}}}throw new TypeError(typeof _+" is not iterable")}function ut(_,h){if(typeof _!="object"||!_)return _;var p=_[Symbol.toPrimitive];if(p!==void 0){var m=p.call(_,h);if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(h==="string"?String:Number)(_)}function ar(_){var h=ut(_,"string");return typeof h=="symbol"?h:h+""}function oe(_){"@babel/helpers - typeof";return oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},oe(_)}var ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ir(_){return _&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_}function st(_){if(Object.prototype.hasOwnProperty.call(_,"__esModule"))return _;var h=_.default;if(typeof h=="function"){var p=function m(){var b=!1;try{b=this instanceof m}catch{}return b?Reflect.construct(h,arguments,this.constructor):h.apply(this,arguments)};p.prototype=h.prototype}else p={};return Object.defineProperty(p,"__esModule",{value:!0}),Object.keys(_).forEach(function(m){var b=Object.getOwnPropertyDescriptor(_,m);Object.defineProperty(p,m,b.get?b:{enumerable:!0,get:function(){return _[m]}})}),p}function ye(_){throw new Error('Could not dynamically require "'+_+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ae={exports:{}},Ze;function ft(){return Ze||(Ze=1,(function(_,h){(function(p){_.exports=p()})(function(){return(function p(m,b,R){function C(d,$){if(!b[d]){if(!m[d]){var c=typeof ye=="function"&&ye;if(!$&&c)return c(d,!0);if(A)return A(d,!0);var P=new Error("Cannot find module '"+d+"'");throw P.code="MODULE_NOT_FOUND",P}var k=b[d]={exports:{}};m[d][0].call(k.exports,function(B){var j=m[d][1][B];return C(j||B)},k,k.exports,p,m,b,R)}return b[d].exports}for(var A=typeof ye=="function"&&ye,N=0;N<R.length;N++)C(R[N]);return C})({1:[function(p,m,b){(function(R){var C=R.MutationObserver||R.WebKitMutationObserver,A;if(C){var N=0,d=new C(B),$=R.document.createTextNode("");d.observe($,{characterData:!0}),A=function(){$.data=N=++N%2}}else if(!R.setImmediate&&typeof R.MessageChannel<"u"){var c=new R.MessageChannel;c.port1.onmessage=B,A=function(){c.port2.postMessage(0)}}else"document"in R&&"onreadystatechange"in R.document.createElement("script")?A=function(){var W=R.document.createElement("script");W.onreadystatechange=function(){B(),W.onreadystatechange=null,W.parentNode.removeChild(W),W=null},R.document.documentElement.appendChild(W)}:A=function(){setTimeout(B,0)};var P,k=[];function B(){P=!0;for(var F,W,M=k.length;M;){for(W=k,k=[],F=-1;++F<M;)W[F]();M=k.length}P=!1}m.exports=j;function j(F){k.push(F)===1&&!P&&A()}}).call(this,typeof ve<"u"?ve:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(p,m,b){var R=p(1);function C(){}var A={},N=["REJECTED"],d=["FULFILLED"],$=["PENDING"];m.exports=c;function c(y){if(typeof y!="function")throw new TypeError("resolver must be a function");this.state=$,this.queue=[],this.outcome=void 0,y!==C&&j(this,y)}c.prototype.catch=function(y){return this.then(null,y)},c.prototype.then=function(y,L){if(typeof y!="function"&&this.state===d||typeof L!="function"&&this.state===N)return this;var T=new this.constructor(C);if(this.state!==$){var z=this.state===d?y:L;k(T,z,this.outcome)}else this.queue.push(new P(T,y,L));return T};function P(y,L,T){this.promise=y,typeof L=="function"&&(this.onFulfilled=L,this.callFulfilled=this.otherCallFulfilled),typeof T=="function"&&(this.onRejected=T,this.callRejected=this.otherCallRejected)}P.prototype.callFulfilled=function(y){A.resolve(this.promise,y)},P.prototype.otherCallFulfilled=function(y){k(this.promise,this.onFulfilled,y)},P.prototype.callRejected=function(y){A.reject(this.promise,y)},P.prototype.otherCallRejected=function(y){k(this.promise,this.onRejected,y)};function k(y,L,T){R(function(){var z;try{z=L(T)}catch(U){return A.reject(y,U)}z===y?A.reject(y,new TypeError("Cannot resolve promise with itself")):A.resolve(y,z)})}A.resolve=function(y,L){var T=F(B,L);if(T.status==="error")return A.reject(y,T.value);var z=T.value;if(z)j(y,z);else{y.state=d,y.outcome=L;for(var U=-1,Q=y.queue.length;++U<Q;)y.queue[U].callFulfilled(L)}return y},A.reject=function(y,L){y.state=N,y.outcome=L;for(var T=-1,z=y.queue.length;++T<z;)y.queue[T].callRejected(L);return y};function B(y){var L=y&&y.then;if(y&&(oe(y)==="object"||typeof y=="function")&&typeof L=="function")return function(){L.apply(y,arguments)}}function j(y,L){var T=!1;function z(t){T||(T=!0,A.reject(y,t))}function U(t){T||(T=!0,A.resolve(y,t))}function Q(){L(U,z)}var V=F(Q);V.status==="error"&&z(V.value)}function F(y,L){var T={};try{T.value=y(L),T.status="success"}catch(z){T.status="error",T.value=z}return T}c.resolve=W;function W(y){return y instanceof this?y:A.resolve(new this(C),y)}c.reject=M;function M(y){var L=new this(C);return A.reject(L,y)}c.all=re;function re(y){var L=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var T=y.length,z=!1;if(!T)return this.resolve([]);for(var U=new Array(T),Q=0,V=-1,t=new this(C);++V<T;)a(y[V],V);return t;function a(i,n){L.resolve(i).then(D,function(w){z||(z=!0,A.reject(t,w))});function D(w){U[n]=w,++Q===T&&!z&&(z=!0,A.resolve(t,U))}}}c.race=J;function J(y){var L=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var T=y.length,z=!1;if(!T)return this.resolve([]);for(var U=-1,Q=new this(C);++U<T;)V(y[U]);return Q;function V(t){L.resolve(t).then(function(a){z||(z=!0,A.resolve(Q,a))},function(a){z||(z=!0,A.reject(Q,a))})}}},{1:1}],3:[function(p,m,b){(function(R){typeof R.Promise!="function"&&(R.Promise=p(2))}).call(this,typeof ve<"u"?ve:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(p,m,b){var R=typeof Symbol=="function"&&oe(Symbol.iterator)==="symbol"?function(e){return oe(e)}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":oe(e)};function C(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function A(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var N=A();function d(){try{if(!N||!N.open)return!1;var e=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),o=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!e||o)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function $(e,o){e=e||[],o=o||{};try{return new Blob(e,o)}catch(u){if(u.name!=="TypeError")throw u;for(var r=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,s=new r,f=0;f<e.length;f+=1)s.append(e[f]);return s.getBlob(o.type)}}typeof Promise>"u"&&p(3);var c=Promise;function P(e,o){o&&e.then(function(r){o(null,r)},function(r){o(r)})}function k(e,o,r){typeof o=="function"&&e.then(o),typeof r=="function"&&e.catch(r)}function B(e){return typeof e!="string"&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function j(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var F="local-forage-detect-blob-support",W=void 0,M={},re=Object.prototype.toString,J="readonly",y="readwrite";function L(e){for(var o=e.length,r=new ArrayBuffer(o),s=new Uint8Array(r),f=0;f<o;f++)s[f]=e.charCodeAt(f);return r}function T(e){return new c(function(o){var r=e.transaction(F,y),s=$([""]);r.objectStore(F).put(s,"key"),r.onabort=function(f){f.preventDefault(),f.stopPropagation(),o(!1)},r.oncomplete=function(){var f=navigator.userAgent.match(/Chrome\/(\d+)/),u=navigator.userAgent.match(/Edge\//);o(u||!f||parseInt(f[1],10)>=43)}}).catch(function(){return!1})}function z(e){return typeof W=="boolean"?c.resolve(W):T(e).then(function(o){return W=o,W})}function U(e){var o=M[e.name],r={};r.promise=new c(function(s,f){r.resolve=s,r.reject=f}),o.deferredOperations.push(r),o.dbReady?o.dbReady=o.dbReady.then(function(){return r.promise}):o.dbReady=r.promise}function Q(e){var o=M[e.name],r=o.deferredOperations.pop();if(r)return r.resolve(),r.promise}function V(e,o){var r=M[e.name],s=r.deferredOperations.pop();if(s)return s.reject(o),s.promise}function t(e,o){return new c(function(r,s){if(M[e.name]=M[e.name]||le(),e.db)if(o)U(e),e.db.close();else return r(e.db);var f=[e.name];o&&f.push(e.version);var u=N.open.apply(N,f);o&&(u.onupgradeneeded=function(l){var v=u.result;try{v.createObjectStore(e.storeName),l.oldVersion<=1&&v.createObjectStore(F)}catch(S){if(S.name==="ConstraintError")console.warn('The database "'+e.name+'" has been upgraded from version '+l.oldVersion+" to version "+l.newVersion+', but the storage "'+e.storeName+'" already exists.');else throw S}}),u.onerror=function(l){l.preventDefault(),s(u.error)},u.onsuccess=function(){var l=u.result;l.onversionchange=function(v){v.target.close()},r(l),Q(e)}})}function a(e){return t(e,!1)}function i(e){return t(e,!0)}function n(e,o){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),s=e.version<e.db.version,f=e.version>e.db.version;if(s&&(e.version!==o&&console.warn('The database "'+e.name+`" can't be downgraded from version `+e.db.version+" to version "+e.version+"."),e.version=e.db.version),f||r){if(r){var u=e.db.version+1;u>e.version&&(e.version=u)}return!0}return!1}function D(e){return new c(function(o,r){var s=new FileReader;s.onerror=r,s.onloadend=function(f){var u=btoa(f.target.result||"");o({__local_forage_encoded_blob:!0,data:u,type:e.type})},s.readAsBinaryString(e)})}function w(e){var o=L(atob(e.data));return $([o],{type:e.type})}function g(e){return e&&e.__local_forage_encoded_blob}function x(e){var o=this,r=o._initReady().then(function(){var s=M[o._dbInfo.name];if(s&&s.dbReady)return s.dbReady});return k(r,e,e),r}function Z(e){U(e);for(var o=M[e.name],r=o.forages,s=0;s<r.length;s++){var f=r[s];f._dbInfo.db&&(f._dbInfo.db.close(),f._dbInfo.db=null)}return e.db=null,a(e).then(function(u){return e.db=u,n(e)?i(e):u}).then(function(u){e.db=o.db=u;for(var l=0;l<r.length;l++)r[l]._dbInfo.db=u}).catch(function(u){throw V(e,u),u})}function ae(e,o,r,s){s===void 0&&(s=1);try{var f=e.db.transaction(e.storeName,o);r(null,f)}catch(u){if(s>0&&(!e.db||u.name==="InvalidStateError"||u.name==="NotFoundError"))return c.resolve().then(function(){if(!e.db||u.name==="NotFoundError"&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),i(e)}).then(function(){return Z(e).then(function(){ae(e,o,r,s-1)})}).catch(r);r(u)}}function le(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ur(e){var o=this,r={db:null};if(e)for(var s in e)r[s]=e[s];var f=M[r.name];f||(f=le(),M[r.name]=f),f.forages.push(o),o._initReady||(o._initReady=o.ready,o.ready=x);var u=[];function l(){return c.resolve()}for(var v=0;v<f.forages.length;v++){var S=f.forages[v];S!==o&&u.push(S._initReady().catch(l))}var E=f.forages.slice(0);return c.all(u).then(function(){return r.db=f.db,a(r)}).then(function(I){return r.db=I,n(r,o._defaultConfig.version)?i(r):I}).then(function(I){r.db=f.db=I,o._dbInfo=r;for(var O=0;O<E.length;O++){var Y=E[O];Y!==o&&(Y._dbInfo.db=r.db,Y._dbInfo.version=r.version)}})}function sr(e,o){var r=this;e=B(e);var s=new c(function(f,u){r.ready().then(function(){ae(r._dbInfo,J,function(l,v){if(l)return u(l);try{var S=v.objectStore(r._dbInfo.storeName),E=S.get(e);E.onsuccess=function(){var I=E.result;I===void 0&&(I=null),g(I)&&(I=w(I)),f(I)},E.onerror=function(){u(E.error)}}catch(I){u(I)}})}).catch(u)});return P(s,o),s}function fr(e,o){var r=this,s=new c(function(f,u){r.ready().then(function(){ae(r._dbInfo,J,function(l,v){if(l)return u(l);try{var S=v.objectStore(r._dbInfo.storeName),E=S.openCursor(),I=1;E.onsuccess=function(){var O=E.result;if(O){var Y=O.value;g(Y)&&(Y=w(Y));var H=e(Y,O.key,I++);H!==void 0?f(H):O.continue()}else f()},E.onerror=function(){u(E.error)}}catch(O){u(O)}})}).catch(u)});return P(s,o),s}function cr(e,o,r){var s=this;e=B(e);var f=new c(function(u,l){var v;s.ready().then(function(){return v=s._dbInfo,re.call(o)==="[object Blob]"?z(v.db).then(function(S){return S?o:D(o)}):o}).then(function(S){ae(s._dbInfo,y,function(E,I){if(E)return l(E);try{var O=I.objectStore(s._dbInfo.storeName);S===null&&(S=void 0);var Y=O.put(S,e);I.oncomplete=function(){S===void 0&&(S=null),u(S)},I.onabort=I.onerror=function(){var H=Y.error?Y.error:Y.transaction.error;l(H)}}catch(H){l(H)}})}).catch(l)});return P(f,r),f}function lr(e,o){var r=this;e=B(e);var s=new c(function(f,u){r.ready().then(function(){ae(r._dbInfo,y,function(l,v){if(l)return u(l);try{var S=v.objectStore(r._dbInfo.storeName),E=S.delete(e);v.oncomplete=function(){f()},v.onerror=function(){u(E.error)},v.onabort=function(){var I=E.error?E.error:E.transaction.error;u(I)}}catch(I){u(I)}})}).catch(u)});return P(s,o),s}function hr(e){var o=this,r=new c(function(s,f){o.ready().then(function(){ae(o._dbInfo,y,function(u,l){if(u)return f(u);try{var v=l.objectStore(o._dbInfo.storeName),S=v.clear();l.oncomplete=function(){s()},l.onabort=l.onerror=function(){var E=S.error?S.error:S.transaction.error;f(E)}}catch(E){f(E)}})}).catch(f)});return P(r,e),r}function dr(e){var o=this,r=new c(function(s,f){o.ready().then(function(){ae(o._dbInfo,J,function(u,l){if(u)return f(u);try{var v=l.objectStore(o._dbInfo.storeName),S=v.count();S.onsuccess=function(){s(S.result)},S.onerror=function(){f(S.error)}}catch(E){f(E)}})}).catch(f)});return P(r,e),r}function vr(e,o){var r=this,s=new c(function(f,u){if(e<0){f(null);return}r.ready().then(function(){ae(r._dbInfo,J,function(l,v){if(l)return u(l);try{var S=v.objectStore(r._dbInfo.storeName),E=!1,I=S.openKeyCursor();I.onsuccess=function(){var O=I.result;if(!O){f(null);return}e===0||E?f(O.key):(E=!0,O.advance(e))},I.onerror=function(){u(I.error)}}catch(O){u(O)}})}).catch(u)});return P(s,o),s}function pr(e){var o=this,r=new c(function(s,f){o.ready().then(function(){ae(o._dbInfo,J,function(u,l){if(u)return f(u);try{var v=l.objectStore(o._dbInfo.storeName),S=v.openKeyCursor(),E=[];S.onsuccess=function(){var I=S.result;if(!I){s(E);return}E.push(I.key),I.continue()},S.onerror=function(){f(S.error)}}catch(I){f(I)}})}).catch(f)});return P(r,e),r}function mr(e,o){o=j.apply(this,arguments);var r=this.config();e=typeof e!="function"&&e||{},e.name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var s=this,f;if(!e.name)f=c.reject("Invalid arguments");else{var u=e.name===r.name&&s._dbInfo.db,l=u?c.resolve(s._dbInfo.db):a(e).then(function(v){var S=M[e.name],E=S.forages;S.db=v;for(var I=0;I<E.length;I++)E[I]._dbInfo.db=v;return v});e.storeName?f=l.then(function(v){if(v.objectStoreNames.contains(e.storeName)){var S=v.version+1;U(e);var E=M[e.name],I=E.forages;v.close();for(var O=0;O<I.length;O++){var Y=I[O];Y._dbInfo.db=null,Y._dbInfo.version=S}var H=new c(function(K,q){var X=N.open(e.name,S);X.onerror=function(ie){var de=X.result;de.close(),q(ie)},X.onupgradeneeded=function(){var ie=X.result;ie.deleteObjectStore(e.storeName)},X.onsuccess=function(){var ie=X.result;ie.close(),K(ie)}});return H.then(function(K){E.db=K;for(var q=0;q<I.length;q++){var X=I[q];X._dbInfo.db=K,Q(X._dbInfo)}}).catch(function(K){throw(V(e,K)||c.resolve()).catch(function(){}),K})}}):f=l.then(function(v){U(e);var S=M[e.name],E=S.forages;v.close();for(var I=0;I<E.length;I++){var O=E[I];O._dbInfo.db=null}var Y=new c(function(H,K){var q=N.deleteDatabase(e.name);q.onerror=function(){var X=q.result;X&&X.close(),K(q.error)},q.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},q.onsuccess=function(){var X=q.result;X&&X.close(),H(X)}});return Y.then(function(H){S.db=H;for(var K=0;K<E.length;K++){var q=E[K];Q(q._dbInfo)}}).catch(function(H){throw(V(e,H)||c.resolve()).catch(function(){}),H})})}return P(f,o),f}var yr={_driver:"asyncStorage",_initStorage:ur,_support:d(),iterate:fr,getItem:sr,setItem:cr,removeItem:lr,clear:hr,length:dr,key:vr,keys:pr,dropInstance:mr};function gr(){return typeof openDatabase=="function"}var ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",br="~~local_forage_type~",Te=/^~~local_forage_type~([^~]+)~/,pe="__lfsc__:",ge=pe.length,be="arbf",we="blob",Pe="si08",Oe="ui08",Be="uic8",Me="si16",ke="si32",Le="ur16",Ue="ui32",ze="fl32",We="fl64",$e=ge+be.length,je=Object.prototype.toString;function Ye(e){var o=e.length*.75,r=e.length,s,f=0,u,l,v,S;e[e.length-1]==="="&&(o--,e[e.length-2]==="="&&o--);var E=new ArrayBuffer(o),I=new Uint8Array(E);for(s=0;s<r;s+=4)u=ue.indexOf(e[s]),l=ue.indexOf(e[s+1]),v=ue.indexOf(e[s+2]),S=ue.indexOf(e[s+3]),I[f++]=u<<2|l>>4,I[f++]=(l&15)<<4|v>>2,I[f++]=(v&3)<<6|S&63;return E}function Se(e){var o=new Uint8Array(e),r="",s;for(s=0;s<o.length;s+=3)r+=ue[o[s]>>2],r+=ue[(o[s]&3)<<4|o[s+1]>>4],r+=ue[(o[s+1]&15)<<2|o[s+2]>>6],r+=ue[o[s+2]&63];return o.length%3===2?r=r.substring(0,r.length-1)+"=":o.length%3===1&&(r=r.substring(0,r.length-2)+"=="),r}function wr(e,o){var r="";if(e&&(r=je.call(e)),e&&(r==="[object ArrayBuffer]"||e.buffer&&je.call(e.buffer)==="[object ArrayBuffer]")){var s,f=pe;e instanceof ArrayBuffer?(s=e,f+=be):(s=e.buffer,r==="[object Int8Array]"?f+=Pe:r==="[object Uint8Array]"?f+=Oe:r==="[object Uint8ClampedArray]"?f+=Be:r==="[object Int16Array]"?f+=Me:r==="[object Uint16Array]"?f+=Le:r==="[object Int32Array]"?f+=ke:r==="[object Uint32Array]"?f+=Ue:r==="[object Float32Array]"?f+=ze:r==="[object Float64Array]"?f+=We:o(new Error("Failed to get type for BinaryArray"))),o(f+Se(s))}else if(r==="[object Blob]"){var u=new FileReader;u.onload=function(){var l=br+e.type+"~"+Se(this.result);o(pe+we+l)},u.readAsArrayBuffer(e)}else try{o(JSON.stringify(e))}catch(l){console.error("Couldn't convert value into a JSON string: ",e),o(null,l)}}function Sr(e){if(e.substring(0,ge)!==pe)return JSON.parse(e);var o=e.substring($e),r=e.substring(ge,$e),s;if(r===we&&Te.test(o)){var f=o.match(Te);s=f[1],o=o.substring(f[0].length)}var u=Ye(o);switch(r){case be:return u;case we:return $([u],{type:s});case Pe:return new Int8Array(u);case Oe:return new Uint8Array(u);case Be:return new Uint8ClampedArray(u);case Me:return new Int16Array(u);case Le:return new Uint16Array(u);case ke:return new Int32Array(u);case Ue:return new Uint32Array(u);case ze:return new Float32Array(u);case We:return new Float64Array(u);default:throw new Error("Unkown type: "+r)}}var _e={serialize:wr,deserialize:Sr,stringToBuffer:Ye,bufferToString:Se};function Ge(e,o,r,s){e.executeSql("CREATE TABLE IF NOT EXISTS "+o.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,s)}function _r(e){var o=this,r={db:null};if(e)for(var s in e)r[s]=typeof e[s]!="string"?e[s].toString():e[s];var f=new c(function(u,l){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(v){return l(v)}r.db.transaction(function(v){Ge(v,r,function(){o._dbInfo=r,u()},function(S,E){l(E)})},l)});return r.serializer=_e,f}function se(e,o,r,s,f,u){e.executeSql(r,s,f,function(l,v){v.code===v.SYNTAX_ERR?l.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[o.storeName],function(S,E){E.rows.length?u(S,v):Ge(S,o,function(){S.executeSql(r,s,f,u)},u)},u):u(l,v)},u)}function Er(e,o){var r=this;e=B(e);var s=new c(function(f,u){r.ready().then(function(){var l=r._dbInfo;l.db.transaction(function(v){se(v,l,"SELECT * FROM "+l.storeName+" WHERE key = ? LIMIT 1",[e],function(S,E){var I=E.rows.length?E.rows.item(0).value:null;I&&(I=l.serializer.deserialize(I)),f(I)},function(S,E){u(E)})})}).catch(u)});return P(s,o),s}function Rr(e,o){var r=this,s=new c(function(f,u){r.ready().then(function(){var l=r._dbInfo;l.db.transaction(function(v){se(v,l,"SELECT * FROM "+l.storeName,[],function(S,E){for(var I=E.rows,O=I.length,Y=0;Y<O;Y++){var H=I.item(Y),K=H.value;if(K&&(K=l.serializer.deserialize(K)),K=e(K,H.key,Y+1),K!==void 0){f(K);return}}f()},function(S,E){u(E)})})}).catch(u)});return P(s,o),s}function He(e,o,r,s){var f=this;e=B(e);var u=new c(function(l,v){f.ready().then(function(){o===void 0&&(o=null);var S=o,E=f._dbInfo;E.serializer.serialize(o,function(I,O){O?v(O):E.db.transaction(function(Y){se(Y,E,"INSERT OR REPLACE INTO "+E.storeName+" (key, value) VALUES (?, ?)",[e,I],function(){l(S)},function(H,K){v(K)})},function(Y){if(Y.code===Y.QUOTA_ERR){if(s>0){l(He.apply(f,[e,S,r,s-1]));return}v(Y)}})})}).catch(v)});return P(u,r),u}function Cr(e,o,r){return He.apply(this,[e,o,r,1])}function Ir(e,o){var r=this;e=B(e);var s=new c(function(f,u){r.ready().then(function(){var l=r._dbInfo;l.db.transaction(function(v){se(v,l,"DELETE FROM "+l.storeName+" WHERE key = ?",[e],function(){f()},function(S,E){u(E)})})}).catch(u)});return P(s,o),s}function Ar(e){var o=this,r=new c(function(s,f){o.ready().then(function(){var u=o._dbInfo;u.db.transaction(function(l){se(l,u,"DELETE FROM "+u.storeName,[],function(){s()},function(v,S){f(S)})})}).catch(f)});return P(r,e),r}function Dr(e){var o=this,r=new c(function(s,f){o.ready().then(function(){var u=o._dbInfo;u.db.transaction(function(l){se(l,u,"SELECT COUNT(key) as c FROM "+u.storeName,[],function(v,S){var E=S.rows.item(0).c;s(E)},function(v,S){f(S)})})}).catch(f)});return P(r,e),r}function Fr(e,o){var r=this,s=new c(function(f,u){r.ready().then(function(){var l=r._dbInfo;l.db.transaction(function(v){se(v,l,"SELECT key FROM "+l.storeName+" WHERE id = ? LIMIT 1",[e+1],function(S,E){var I=E.rows.length?E.rows.item(0).key:null;f(I)},function(S,E){u(E)})})}).catch(u)});return P(s,o),s}function Nr(e){var o=this,r=new c(function(s,f){o.ready().then(function(){var u=o._dbInfo;u.db.transaction(function(l){se(l,u,"SELECT key FROM "+u.storeName,[],function(v,S){for(var E=[],I=0;I<S.rows.length;I++)E.push(S.rows.item(I).key);s(E)},function(v,S){f(S)})})}).catch(f)});return P(r,e),r}function xr(e){return new c(function(o,r){e.transaction(function(s){s.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(f,u){for(var l=[],v=0;v<u.rows.length;v++)l.push(u.rows.item(v).name);o({db:e,storeNames:l})},function(f,u){r(u)})},function(s){r(s)})})}function Tr(e,o){o=j.apply(this,arguments);var r=this.config();e=typeof e!="function"&&e||{},e.name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var s=this,f;return e.name?f=new c(function(u){var l;e.name===r.name?l=s._dbInfo.db:l=openDatabase(e.name,"","",0),e.storeName?u({db:l,storeNames:[e.storeName]}):u(xr(l))}).then(function(u){return new c(function(l,v){u.db.transaction(function(S){function E(H){return new c(function(K,q){S.executeSql("DROP TABLE IF EXISTS "+H,[],function(){K()},function(X,ie){q(ie)})})}for(var I=[],O=0,Y=u.storeNames.length;O<Y;O++)I.push(E(u.storeNames[O]));c.all(I).then(function(){l()}).catch(function(H){v(H)})},function(S){v(S)})})}):f=c.reject("Invalid arguments"),P(f,o),f}var Pr={_driver:"webSQLStorage",_initStorage:_r,_support:gr(),iterate:Rr,getItem:Er,setItem:Cr,removeItem:Ir,clear:Ar,length:Dr,key:Fr,keys:Nr,dropInstance:Tr};function Or(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Ke(e,o){var r=e.name+"/";return e.storeName!==o.storeName&&(r+=e.storeName+"/"),r}function Br(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch{return!0}}function Mr(){return!Br()||localStorage.length>0}function kr(e){var o=this,r={};if(e)for(var s in e)r[s]=e[s];return r.keyPrefix=Ke(e,o._defaultConfig),Mr()?(o._dbInfo=r,r.serializer=_e,c.resolve()):c.reject()}function Lr(e){var o=this,r=o.ready().then(function(){for(var s=o._dbInfo.keyPrefix,f=localStorage.length-1;f>=0;f--){var u=localStorage.key(f);u.indexOf(s)===0&&localStorage.removeItem(u)}});return P(r,e),r}function Ur(e,o){var r=this;e=B(e);var s=r.ready().then(function(){var f=r._dbInfo,u=localStorage.getItem(f.keyPrefix+e);return u&&(u=f.serializer.deserialize(u)),u});return P(s,o),s}function zr(e,o){var r=this,s=r.ready().then(function(){for(var f=r._dbInfo,u=f.keyPrefix,l=u.length,v=localStorage.length,S=1,E=0;E<v;E++){var I=localStorage.key(E);if(I.indexOf(u)===0){var O=localStorage.getItem(I);if(O&&(O=f.serializer.deserialize(O)),O=e(O,I.substring(l),S++),O!==void 0)return O}}});return P(s,o),s}function Wr(e,o){var r=this,s=r.ready().then(function(){var f=r._dbInfo,u;try{u=localStorage.key(e)}catch{u=null}return u&&(u=u.substring(f.keyPrefix.length)),u});return P(s,o),s}function $r(e){var o=this,r=o.ready().then(function(){for(var s=o._dbInfo,f=localStorage.length,u=[],l=0;l<f;l++){var v=localStorage.key(l);v.indexOf(s.keyPrefix)===0&&u.push(v.substring(s.keyPrefix.length))}return u});return P(r,e),r}function jr(e){var o=this,r=o.keys().then(function(s){return s.length});return P(r,e),r}function Yr(e,o){var r=this;e=B(e);var s=r.ready().then(function(){var f=r._dbInfo;localStorage.removeItem(f.keyPrefix+e)});return P(s,o),s}function Gr(e,o,r){var s=this;e=B(e);var f=s.ready().then(function(){o===void 0&&(o=null);var u=o;return new c(function(l,v){var S=s._dbInfo;S.serializer.serialize(o,function(E,I){if(I)v(I);else try{localStorage.setItem(S.keyPrefix+e,E),l(u)}catch(O){(O.name==="QuotaExceededError"||O.name==="NS_ERROR_DOM_QUOTA_REACHED")&&v(O),v(O)}})})});return P(f,r),f}function Hr(e,o){if(o=j.apply(this,arguments),e=typeof e!="function"&&e||{},!e.name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var s=this,f;return e.name?f=new c(function(u){e.storeName?u(Ke(e,s._defaultConfig)):u(e.name+"/")}).then(function(u){for(var l=localStorage.length-1;l>=0;l--){var v=localStorage.key(l);v.indexOf(u)===0&&localStorage.removeItem(v)}}):f=c.reject("Invalid arguments"),P(f,o),f}var Kr={_driver:"localStorageWrapper",_initStorage:kr,_support:Or(),iterate:zr,getItem:Ur,setItem:Gr,removeItem:Yr,clear:Lr,length:jr,key:Wr,keys:$r,dropInstance:Hr},Jr=function(o,r){return o===r||typeof o=="number"&&typeof r=="number"&&isNaN(o)&&isNaN(r)},Vr=function(o,r){for(var s=o.length,f=0;f<s;){if(Jr(o[f],r))return!0;f++}return!1},Je=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},he={},Ve={},fe={INDEXEDDB:yr,WEBSQL:Pr,LOCALSTORAGE:Kr},Qr=[fe.INDEXEDDB._driver,fe.WEBSQL._driver,fe.LOCALSTORAGE._driver],me=["dropInstance"],Ee=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(me),Xr={description:"",driver:Qr.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function qr(e,o){e[o]=function(){var r=arguments;return e.ready().then(function(){return e[o].apply(e,r)})}}function Re(){for(var e=1;e<arguments.length;e++){var o=arguments[e];if(o)for(var r in o)o.hasOwnProperty(r)&&(Je(o[r])?arguments[0][r]=o[r].slice():arguments[0][r]=o[r])}return arguments[0]}var Zr=(function(){function e(o){C(this,e);for(var r in fe)if(fe.hasOwnProperty(r)){var s=fe[r],f=s._driver;this[r]=f,he[f]||this.defineDriver(s)}this._defaultConfig=Re({},Xr),this._config=Re({},this._defaultConfig,o),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(r){if((typeof r>"u"?"undefined":R(r))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var s in r){if(s==="storeName"&&(r[s]=r[s].replace(/\W/g,"_")),s==="version"&&typeof r[s]!="number")return new Error("Database version must be a number.");this._config[s]=r[s]}return"driver"in r&&r.driver?this.setDriver(this._config.driver):!0}else return typeof r=="string"?this._config[r]:this._config},e.prototype.defineDriver=function(r,s,f){var u=new c(function(l,v){try{var S=r._driver,E=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!r._driver){v(E);return}for(var I=Ee.concat("_initStorage"),O=0,Y=I.length;O<Y;O++){var H=I[O],K=!Vr(me,H);if((K||r[H])&&typeof r[H]!="function"){v(E);return}}var q=function(){for(var de=function(tt){return function(){var nt=new Error("Method "+tt+" is not implemented by the current driver"),Qe=c.reject(nt);return P(Qe,arguments[arguments.length-1]),Qe}},Ce=0,rt=me.length;Ce<rt;Ce++){var Ie=me[Ce];r[Ie]||(r[Ie]=de(Ie))}};q();var X=function(de){he[S]&&console.info("Redefining LocalForage driver: "+S),he[S]=r,Ve[S]=de,l()};"_support"in r?r._support&&typeof r._support=="function"?r._support().then(X,v):X(!!r._support):X(!0)}catch(ie){v(ie)}});return k(u,s,f),u},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(r,s,f){var u=he[r]?c.resolve(he[r]):c.reject(new Error("Driver not found."));return k(u,s,f),u},e.prototype.getSerializer=function(r){var s=c.resolve(_e);return k(s,r),s},e.prototype.ready=function(r){var s=this,f=s._driverSet.then(function(){return s._ready===null&&(s._ready=s._initDriver()),s._ready});return k(f,r,r),f},e.prototype.setDriver=function(r,s,f){var u=this;Je(r)||(r=[r]);var l=this._getSupportedDrivers(r);function v(){u._config.driver=u.driver()}function S(O){return u._extend(O),v(),u._ready=u._initStorage(u._config),u._ready}function E(O){return function(){var Y=0;function H(){for(;Y<O.length;){var K=O[Y];return Y++,u._dbInfo=null,u._ready=null,u.getDriver(K).then(S).catch(H)}v();var q=new Error("No available storage method found.");return u._driverSet=c.reject(q),u._driverSet}return H()}}var I=this._driverSet!==null?this._driverSet.catch(function(){return c.resolve()}):c.resolve();return this._driverSet=I.then(function(){var O=l[0];return u._dbInfo=null,u._ready=null,u.getDriver(O).then(function(Y){u._driver=Y._driver,v(),u._wrapLibraryMethodsWithReady(),u._initDriver=E(l)})}).catch(function(){v();var O=new Error("No available storage method found.");return u._driverSet=c.reject(O),u._driverSet}),k(this._driverSet,s,f),this._driverSet},e.prototype.supports=function(r){return!!Ve[r]},e.prototype._extend=function(r){Re(this,r)},e.prototype._getSupportedDrivers=function(r){for(var s=[],f=0,u=r.length;f<u;f++){var l=r[f];this.supports(l)&&s.push(l)}return s},e.prototype._wrapLibraryMethodsWithReady=function(){for(var r=0,s=Ee.length;r<s;r++)qr(this,Ee[r])},e.prototype.createInstance=function(r){return new e(r)},e})(),et=new Zr;m.exports=et},{3:3}]},{},[4])(4)})})(Ae)),Ae.exports}var ct=ft();const ce=ir(ct);var De={exports:{}};const lt={},ht=Object.freeze(Object.defineProperty({__proto__:null,default:lt},Symbol.toStringTag,{value:"Module"})),er=st(ht);var rr;function dt(){return rr||(rr=1,(function(_){(function(){var h="input is invalid type",p="finalize already called",m=(typeof window>"u"?"undefined":oe(window))==="object",b=m?window:{};b.JS_MD5_NO_WINDOW&&(m=!1);var R=!m&&(typeof self>"u"?"undefined":oe(self))==="object",C=!b.JS_MD5_NO_NODE_JS&&(typeof process>"u"?"undefined":oe(process))==="object"&&process.versions&&process.versions.node;C?b=ve:R&&(b=self);var A=!b.JS_MD5_NO_COMMON_JS&&!0&&_.exports,N=!b.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",d="0123456789abcdef".split(""),$=[128,32768,8388608,-2147483648],c=[0,8,16,24],P=["hex","array","digest","buffer","arrayBuffer","base64"],k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),B=[],j;if(N){var F=new ArrayBuffer(68);j=new Uint8Array(F),B=new Uint32Array(F)}var W=Array.isArray;(b.JS_MD5_NO_NODE_JS||!W)&&(W=function(a){return Object.prototype.toString.call(a)==="[object Array]"});var M=ArrayBuffer.isView;N&&(b.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!M)&&(M=function(a){return oe(a)==="object"&&a.buffer&&a.buffer.constructor===ArrayBuffer});var re=function(a){var i=oe(a);if(i==="string")return[a,!0];if(i!=="object"||a===null)throw new Error(h);if(N&&a.constructor===ArrayBuffer)return[new Uint8Array(a),!1];if(!W(a)&&!M(a))throw new Error(h);return[a,!1]},J=function(a){return function(i){return new U(!0).update(i)[a]()}},y=function(){var a=J("hex");C&&(a=L(a)),a.create=function(){return new U},a.update=function(D){return a.create().update(D)};for(var i=0;i<P.length;++i){var n=P[i];a[n]=J(n)}return a},L=function(a){var i=er,n=er.Buffer,D;n.from&&!b.JS_MD5_NO_BUFFER_FROM?D=n.from:D=function(x){return new n(x)};var w=function(x){if(typeof x=="string")return i.createHash("md5").update(x,"utf8").digest("hex");if(x==null)throw new Error(h);return x.constructor===ArrayBuffer&&(x=new Uint8Array(x)),W(x)||M(x)||x.constructor===n?i.createHash("md5").update(D(x)).digest("hex"):a(x)};return w},T=function(a){return function(i,n){return new Q(i,!0).update(n)[a]()}},z=function(){var a=T("hex");a.create=function(D){return new Q(D)},a.update=function(D,w){return a.create(D).update(w)};for(var i=0;i<P.length;++i){var n=P[i];a[n]=T(n)}return a};function U(t){if(t)B[0]=B[16]=B[1]=B[2]=B[3]=B[4]=B[5]=B[6]=B[7]=B[8]=B[9]=B[10]=B[11]=B[12]=B[13]=B[14]=B[15]=0,this.blocks=B,this.buffer8=j;else if(N){var a=new ArrayBuffer(68);this.buffer8=new Uint8Array(a),this.blocks=new Uint32Array(a)}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}U.prototype.update=function(t){if(this.finalized)throw new Error(p);var a=re(t);t=a[0];for(var i=a[1],n,D=0,w,g=t.length,x=this.blocks,Z=this.buffer8;D<g;){if(this.hashed&&(this.hashed=!1,x[0]=x[16],x[16]=x[1]=x[2]=x[3]=x[4]=x[5]=x[6]=x[7]=x[8]=x[9]=x[10]=x[11]=x[12]=x[13]=x[14]=x[15]=0),i)if(N)for(w=this.start;D<g&&w<64;++D)n=t.charCodeAt(D),n<128?Z[w++]=n:n<2048?(Z[w++]=192|n>>>6,Z[w++]=128|n&63):n<55296||n>=57344?(Z[w++]=224|n>>>12,Z[w++]=128|n>>>6&63,Z[w++]=128|n&63):(n=65536+((n&1023)<<10|t.charCodeAt(++D)&1023),Z[w++]=240|n>>>18,Z[w++]=128|n>>>12&63,Z[w++]=128|n>>>6&63,Z[w++]=128|n&63);else for(w=this.start;D<g&&w<64;++D)n=t.charCodeAt(D),n<128?x[w>>>2]|=n<<c[w++&3]:n<2048?(x[w>>>2]|=(192|n>>>6)<<c[w++&3],x[w>>>2]|=(128|n&63)<<c[w++&3]):n<55296||n>=57344?(x[w>>>2]|=(224|n>>>12)<<c[w++&3],x[w>>>2]|=(128|n>>>6&63)<<c[w++&3],x[w>>>2]|=(128|n&63)<<c[w++&3]):(n=65536+((n&1023)<<10|t.charCodeAt(++D)&1023),x[w>>>2]|=(240|n>>>18)<<c[w++&3],x[w>>>2]|=(128|n>>>12&63)<<c[w++&3],x[w>>>2]|=(128|n>>>6&63)<<c[w++&3],x[w>>>2]|=(128|n&63)<<c[w++&3]);else if(N)for(w=this.start;D<g&&w<64;++D)Z[w++]=t[D];else for(w=this.start;D<g&&w<64;++D)x[w>>>2]|=t[D]<<c[w++&3];this.lastByteIndex=w,this.bytes+=w-this.start,w>=64?(this.start=w-64,this.hash(),this.hashed=!0):this.start=w}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},U.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,a=this.lastByteIndex;t[a>>>2]|=$[a&3],a>=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()}},U.prototype.hash=function(){var t,a,i,n,D,w,g=this.blocks;this.first?(t=g[0]-680876937,t=(t<<7|t>>>25)-271733879<<0,n=(-1732584194^t&2004318071)+g[1]-117830708,n=(n<<12|n>>>20)+t<<0,i=(-271733879^n&(t^-271733879))+g[2]-1126478375,i=(i<<17|i>>>15)+n<<0,a=(t^i&(n^t))+g[3]-1316259209,a=(a<<22|a>>>10)+i<<0):(t=this.h0,a=this.h1,i=this.h2,n=this.h3,t+=(n^a&(i^n))+g[0]-680876936,t=(t<<7|t>>>25)+a<<0,n+=(i^t&(a^i))+g[1]-389564586,n=(n<<12|n>>>20)+t<<0,i+=(a^n&(t^a))+g[2]+606105819,i=(i<<17|i>>>15)+n<<0,a+=(t^i&(n^t))+g[3]-1044525330,a=(a<<22|a>>>10)+i<<0),t+=(n^a&(i^n))+g[4]-176418897,t=(t<<7|t>>>25)+a<<0,n+=(i^t&(a^i))+g[5]+1200080426,n=(n<<12|n>>>20)+t<<0,i+=(a^n&(t^a))+g[6]-1473231341,i=(i<<17|i>>>15)+n<<0,a+=(t^i&(n^t))+g[7]-45705983,a=(a<<22|a>>>10)+i<<0,t+=(n^a&(i^n))+g[8]+1770035416,t=(t<<7|t>>>25)+a<<0,n+=(i^t&(a^i))+g[9]-1958414417,n=(n<<12|n>>>20)+t<<0,i+=(a^n&(t^a))+g[10]-42063,i=(i<<17|i>>>15)+n<<0,a+=(t^i&(n^t))+g[11]-1990404162,a=(a<<22|a>>>10)+i<<0,t+=(n^a&(i^n))+g[12]+1804603682,t=(t<<7|t>>>25)+a<<0,n+=(i^t&(a^i))+g[13]-40341101,n=(n<<12|n>>>20)+t<<0,i+=(a^n&(t^a))+g[14]-1502002290,i=(i<<17|i>>>15)+n<<0,a+=(t^i&(n^t))+g[15]+1236535329,a=(a<<22|a>>>10)+i<<0,t+=(i^n&(a^i))+g[1]-165796510,t=(t<<5|t>>>27)+a<<0,n+=(a^i&(t^a))+g[6]-1069501632,n=(n<<9|n>>>23)+t<<0,i+=(t^a&(n^t))+g[11]+643717713,i=(i<<14|i>>>18)+n<<0,a+=(n^t&(i^n))+g[0]-373897302,a=(a<<20|a>>>12)+i<<0,t+=(i^n&(a^i))+g[5]-701558691,t=(t<<5|t>>>27)+a<<0,n+=(a^i&(t^a))+g[10]+38016083,n=(n<<9|n>>>23)+t<<0,i+=(t^a&(n^t))+g[15]-660478335,i=(i<<14|i>>>18)+n<<0,a+=(n^t&(i^n))+g[4]-405537848,a=(a<<20|a>>>12)+i<<0,t+=(i^n&(a^i))+g[9]+568446438,t=(t<<5|t>>>27)+a<<0,n+=(a^i&(t^a))+g[14]-1019803690,n=(n<<9|n>>>23)+t<<0,i+=(t^a&(n^t))+g[3]-187363961,i=(i<<14|i>>>18)+n<<0,a+=(n^t&(i^n))+g[8]+1163531501,a=(a<<20|a>>>12)+i<<0,t+=(i^n&(a^i))+g[13]-1444681467,t=(t<<5|t>>>27)+a<<0,n+=(a^i&(t^a))+g[2]-51403784,n=(n<<9|n>>>23)+t<<0,i+=(t^a&(n^t))+g[7]+1735328473,i=(i<<14|i>>>18)+n<<0,a+=(n^t&(i^n))+g[12]-1926607734,a=(a<<20|a>>>12)+i<<0,D=a^i,t+=(D^n)+g[5]-378558,t=(t<<4|t>>>28)+a<<0,n+=(D^t)+g[8]-2022574463,n=(n<<11|n>>>21)+t<<0,w=n^t,i+=(w^a)+g[11]+1839030562,i=(i<<16|i>>>16)+n<<0,a+=(w^i)+g[14]-35309556,a=(a<<23|a>>>9)+i<<0,D=a^i,t+=(D^n)+g[1]-1530992060,t=(t<<4|t>>>28)+a<<0,n+=(D^t)+g[4]+1272893353,n=(n<<11|n>>>21)+t<<0,w=n^t,i+=(w^a)+g[7]-155497632,i=(i<<16|i>>>16)+n<<0,a+=(w^i)+g[10]-1094730640,a=(a<<23|a>>>9)+i<<0,D=a^i,t+=(D^n)+g[13]+681279174,t=(t<<4|t>>>28)+a<<0,n+=(D^t)+g[0]-358537222,n=(n<<11|n>>>21)+t<<0,w=n^t,i+=(w^a)+g[3]-722521979,i=(i<<16|i>>>16)+n<<0,a+=(w^i)+g[6]+76029189,a=(a<<23|a>>>9)+i<<0,D=a^i,t+=(D^n)+g[9]-640364487,t=(t<<4|t>>>28)+a<<0,n+=(D^t)+g[12]-421815835,n=(n<<11|n>>>21)+t<<0,w=n^t,i+=(w^a)+g[15]+530742520,i=(i<<16|i>>>16)+n<<0,a+=(w^i)+g[2]-995338651,a=(a<<23|a>>>9)+i<<0,t+=(i^(a|~n))+g[0]-198630844,t=(t<<6|t>>>26)+a<<0,n+=(a^(t|~i))+g[7]+1126891415,n=(n<<10|n>>>22)+t<<0,i+=(t^(n|~a))+g[14]-1416354905,i=(i<<15|i>>>17)+n<<0,a+=(n^(i|~t))+g[5]-57434055,a=(a<<21|a>>>11)+i<<0,t+=(i^(a|~n))+g[12]+1700485571,t=(t<<6|t>>>26)+a<<0,n+=(a^(t|~i))+g[3]-1894986606,n=(n<<10|n>>>22)+t<<0,i+=(t^(n|~a))+g[10]-1051523,i=(i<<15|i>>>17)+n<<0,a+=(n^(i|~t))+g[1]-2054922799,a=(a<<21|a>>>11)+i<<0,t+=(i^(a|~n))+g[8]+1873313359,t=(t<<6|t>>>26)+a<<0,n+=(a^(t|~i))+g[15]-30611744,n=(n<<10|n>>>22)+t<<0,i+=(t^(n|~a))+g[6]-1560198380,i=(i<<15|i>>>17)+n<<0,a+=(n^(i|~t))+g[13]+1309151649,a=(a<<21|a>>>11)+i<<0,t+=(i^(a|~n))+g[4]-145523070,t=(t<<6|t>>>26)+a<<0,n+=(a^(t|~i))+g[11]-1120210379,n=(n<<10|n>>>22)+t<<0,i+=(t^(n|~a))+g[2]+718787259,i=(i<<15|i>>>17)+n<<0,a+=(n^(i|~t))+g[9]-343485551,a=(a<<21|a>>>11)+i<<0,this.first?(this.h0=t+1732584193<<0,this.h1=a-271733879<<0,this.h2=i-1732584194<<0,this.h3=n+271733878<<0,this.first=!1):(this.h0=this.h0+t<<0,this.h1=this.h1+a<<0,this.h2=this.h2+i<<0,this.h3=this.h3+n<<0)},U.prototype.hex=function(){this.finalize();var t=this.h0,a=this.h1,i=this.h2,n=this.h3;return d[t>>>4&15]+d[t&15]+d[t>>>12&15]+d[t>>>8&15]+d[t>>>20&15]+d[t>>>16&15]+d[t>>>28&15]+d[t>>>24&15]+d[a>>>4&15]+d[a&15]+d[a>>>12&15]+d[a>>>8&15]+d[a>>>20&15]+d[a>>>16&15]+d[a>>>28&15]+d[a>>>24&15]+d[i>>>4&15]+d[i&15]+d[i>>>12&15]+d[i>>>8&15]+d[i>>>20&15]+d[i>>>16&15]+d[i>>>28&15]+d[i>>>24&15]+d[n>>>4&15]+d[n&15]+d[n>>>12&15]+d[n>>>8&15]+d[n>>>20&15]+d[n>>>16&15]+d[n>>>28&15]+d[n>>>24&15]},U.prototype.toString=U.prototype.hex,U.prototype.digest=function(){this.finalize();var t=this.h0,a=this.h1,i=this.h2,n=this.h3;return[t&255,t>>>8&255,t>>>16&255,t>>>24&255,a&255,a>>>8&255,a>>>16&255,a>>>24&255,i&255,i>>>8&255,i>>>16&255,i>>>24&255,n&255,n>>>8&255,n>>>16&255,n>>>24&255]},U.prototype.array=U.prototype.digest,U.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),a=new Uint32Array(t);return a[0]=this.h0,a[1]=this.h1,a[2]=this.h2,a[3]=this.h3,t},U.prototype.buffer=U.prototype.arrayBuffer,U.prototype.base64=function(){for(var t,a,i,n="",D=this.array(),w=0;w<15;)t=D[w++],a=D[w++],i=D[w++],n+=k[t>>>2]+k[(t<<4|a>>>4)&63]+k[(a<<2|i>>>6)&63]+k[i&63];return t=D[w],n+=k[t>>>2]+k[t<<4&63]+"==",n};function Q(t,a){var i,n=re(t);if(t=n[0],n[1]){var D=[],w=t.length,g=0,x;for(i=0;i<w;++i)x=t.charCodeAt(i),x<128?D[g++]=x:x<2048?(D[g++]=192|x>>>6,D[g++]=128|x&63):x<55296||x>=57344?(D[g++]=224|x>>>12,D[g++]=128|x>>>6&63,D[g++]=128|x&63):(x=65536+((x&1023)<<10|t.charCodeAt(++i)&1023),D[g++]=240|x>>>18,D[g++]=128|x>>>12&63,D[g++]=128|x>>>6&63,D[g++]=128|x&63);t=D}t.length>64&&(t=new U(!0).update(t).array());var Z=[],ae=[];for(i=0;i<64;++i){var le=t[i]||0;Z[i]=92^le,ae[i]=54^le}U.call(this,a),this.update(ae),this.oKeyPad=Z,this.inner=!0,this.sharedMemory=a}Q.prototype=new U,Q.prototype.finalize=function(){if(U.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();U.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(t),U.prototype.finalize.call(this)}};var V=y();V.md5=V,V.md5.hmac=z(),A?_.exports=V:b.md5=V})()})(De)),De.exports}var vt=dt(),Fe={exports:{}},tr;function pt(){return tr||(tr=1,(function(_){var h=this;(function(p,m){_.exports=m()})("streamSaver",function(){var p=(typeof window>"u"?"undefined":oe(window))==="object"?window:h;p.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");var m=null,b=!1,R=function(F){try{F()}catch{}},C=p.WebStreamsPolyfill||{},A=p.isSecureContext,N=/constructor/i.test(p.HTMLElement)||!!p.safari||!!p.WebKitPoint,d=A||"MozAppearance"in document.documentElement.style?"iframe":"navigate",$={createWriteStream:B,WritableStream:p.WritableStream||C.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0"};function c(j){if(!j)throw new Error("meh");var F=document.createElement("iframe");return F.hidden=!0,F.src=j,F.loaded=!1,F.name="iframe",F.isIframe=!0,F.postMessage=function(){var W;return(W=F.contentWindow).postMessage.apply(W,arguments)},F.addEventListener("load",function(){F.loaded=!0},{once:!0}),document.body.appendChild(F),F}function P(j){var F="width=200,height=100",W=document.createDocumentFragment(),M={frame:p.open(j,"popup",F),loaded:!1,isIframe:!1,isPopup:!0,remove:function(){M.frame.close()},addEventListener:function(){W.addEventListener.apply(W,arguments)},dispatchEvent:function(){W.dispatchEvent.apply(W,arguments)},removeEventListener:function(){W.removeEventListener.apply(W,arguments)},postMessage:function(){var y;(y=M.frame).postMessage.apply(y,arguments)}},re=function(y){y.source===M.frame&&(M.loaded=!0,p.removeEventListener("message",re),M.dispatchEvent(new Event("load")))};return p.addEventListener("message",re),M}try{new Response(new ReadableStream),A&&!("serviceWorker"in navigator)&&(N=!0)}catch{N=!0}R(function(){var j=new TransformStream,F=j.readable,W=new MessageChannel;W.port1.postMessage(F,[F]),W.port1.close(),W.port2.close(),b=!0,Object.defineProperty($,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})});function k(){m||(m=A?c($.mitm):P($.mitm))}function B(j,F,W){var M={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},re=0,J=null,y=null,L=null;if(Number.isFinite(F)){var T=[F,W];W=T[0],F=T[1],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),M.size=W,M.writableStrategy=F}else F&&F.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),M.size=W,M.writableStrategy=F):M=F||{};if(!N){k(),y=new MessageChannel,j=encodeURIComponent(j.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");var z={transferringReadable:b,pathname:M.pathname||Math.random().toString().slice(-6)+"/"+j,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+j}};M.size&&(z.headers["Content-Length"]=M.size);var U=[z,"*",[y.port2]];if(b){var Q=d==="iframe"?void 0:{transform:function(n,D){if(!(n instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");re+=n.length,D.enqueue(n),J&&(location.href=J,J=null)},flush:function(){J&&(location.href=J)}};L=new $.TransformStream(Q,M.writableStrategy,M.readableStrategy);var V=L.readable;y.port1.postMessage({readableStream:V},[V])}if(y.port1.onmessage=function(i){i.data.download?d==="navigate"?(m.remove(),m=null,re?location.href=i.data.download:J=i.data.download):(m.isPopup&&(m.remove(),m=null,d==="iframe"&&c($.mitm)),c(i.data.download)):i.data.abort&&(a=[],y.port1.postMessage("abort"),y.port1.onmessage=null,y.port1.close(),y.port2.close(),y=null)},m.loaded){var t;(t=m).postMessage.apply(t,U)}else m.addEventListener("load",function(){var i;(i=m).postMessage.apply(i,U)},{once:!0})}var a=[];return!N&&L&&L.writable||new $.WritableStream({write:function(n){if(!(n instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");if(N){a.push(n);return}y.port1.postMessage(n),re+=n.length,J&&(location.href=J,J=null)},close:function(){if(N){var n=new Blob(a,{type:"application/octet-stream; charset=utf-8"}),D=document.createElement("a");D.href=URL.createObjectURL(n),D.download=j,D.click()}else y.port1.postMessage("end")},abort:function(){a=[],y.port1.postMessage("abort"),y.port1.onmessage=null,y.port1.close(),y.port2.close(),y=null}},M.writableStrategy)}return $})})(Fe)),Fe.exports}var mt=pt();const nr=ir(mt);var Ne=(function(_){return _.PENDING="pending",_.PAUSE="pause",_.DOWNLOADING="downloading",_.FINISHED="finished",_.ERROR="error",_})(Ne||{}),or=(function(_){return _.READY="ready",_.STATUS_UPDATE="status_update",_.PROGRESS_UPDATE="progress_update",_})(or||{}),xe=(function(){function _(h){var p=this,m=h.url,b=h.fileName,R=h.chunkSize,C=R===void 0?10*1024*1024:R,A=h.onReady,N=h.onProgressUpdate,d=h.onStatusChange;at(this,_),te(this,"url",void 0),te(this,"fileName",void 0),te(this,"isReady",!1),te(this,"abortController",void 0),te(this,"currentChunk",0),te(this,"chunkSize",void 0),te(this,"totalChunk",0),te(this,"totalSize",0),te(this,"status","pending"),te(this,"onReady",void 0),te(this,"onStatusChange",void 0),te(this,"onProgressUpdate",void 0),te(this,"getURLMd5",(function(){var $;return function(){return $||($=vt.md5(p.url))}})()),this.url=m,this.fileName=b,this.chunkSize=C,this.abortController=new AbortController,this.onReady=A,this.onProgressUpdate=N,this.onStatusChange=d,this.openDB()}return it(_,[{key:"changeStatus",value:function(p){var m,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.status=p,(m=this.onStatusChange)===null||m===void 0||m.call(this,{status:p,error:b})}},{key:"openDB",value:(function(){var h=ee(G().m(function m(){var b,R;return G().w(function(C){for(;;)switch(C.p=C.n){case 0:return C.p=0,this.changeStatus("pending"),C.n=1,ce.ready();case 1:return C.n=2,this.init();case 2:(b=this.onReady)===null||b===void 0||b.call(this),this.isReady=!0,C.n=4;break;case 3:C.p=3,R=C.v,this.changeStatus("error",R);case 4:return C.a(2)}},m,this,[[0,3]])}));function p(){return h.apply(this,arguments)}return p})()},{key:"getChunkKeys",value:(function(){var h=ee(G().m(function m(){var b,R;return G().w(function(C){for(;;)switch(C.n){case 0:return b=this.getURLMd5(),C.n=1,ce.keys();case 1:return R=C.v,C.a(2,R.filter(function(A){return A.startsWith("".concat(b,"_"))}))}},m,this)}));function p(){return h.apply(this,arguments)}return p})()},{key:"getCompletedCount",value:(function(){var h=ee(G().m(function m(){var b;return G().w(function(R){for(;;)switch(R.n){case 0:return R.n=1,this.getChunkKeys();case 1:return b=R.v,R.a(2,b.length)}},m,this)}));function p(){return h.apply(this,arguments)}return p})()},{key:"getResumePosition",value:(function(){var h=ee(G().m(function m(){var b,R,C,A;return G().w(function(N){for(;;)switch(N.n){case 0:return N.n=1,this.getChunkKeys();case 1:for(b=N.v,R=b.map(function(d){return parseInt(d.split("_")[1],10)}).filter(function(d){return!isNaN(d)}),C=0,A=new Set(R);A.has(C);)C++;return N.a(2,C)}},m,this)}));function p(){return h.apply(this,arguments)}return p})()},{key:"init",value:(function(){var h=ee(G().m(function m(){var b;return G().w(function(R){for(;;)switch(R.n){case 0:return R.n=1,this.getFileSize();case 1:return b=R.v,this.totalSize=b,this.totalChunk=Math.ceil(this.totalSize/this.chunkSize),R.n=2,this.getResumePosition();case 2:this.currentChunk=R.v,this.updateProgress();case 3:return R.a(2)}},m,this)}));function p(){return h.apply(this,arguments)}return p})()},{key:"getFileSize",value:(function(){var h=ee(G().m(function m(){var b,R,C,A,N,d,$;return G().w(function(c){for(;;)switch(c.p=c.n){case 0:return c.p=0,c.n=1,fetch(this.url,{method:"HEAD"});case 1:if(b=c.v,R=b.headers,C=R.get("content-length"),!C){c.n=2;break}return c.a(2,Number(C));case 2:c.n=4;break;case 3:c.p=3,c.v;case 4:return c.n=5,fetch(this.url,{method:"GET",headers:{Range:"bytes=0-0"}});case 5:if(A=c.v,N=A.headers,d=N.get("content-range"),!d){c.n=6;break}if($=d.match(/\/(\d+)$/),!$){c.n=6;break}return c.a(2,Number($[1]));case 6:throw new Error("无法获取文件大小");case 7:return c.a(2)}},m,this,[[0,3]])}));function p(){return h.apply(this,arguments)}return p})()},{key:"getCurrentChunkName",value:function(p){var m=this.getURLMd5();return"".concat(m,"_").concat(p)}},{key:"getChunkData",value:(function(){var h=ee(G().m(function m(b,R){var C,A;return G().w(function(N){for(;;)switch(N.n){case 0:return N.n=1,fetch(this.url,{headers:{Range:"bytes=".concat(b,"-").concat(R)},signal:(C=this.abortController)===null||C===void 0?void 0:C.signal});case 1:return A=N.v,N.a(2,A.arrayBuffer())}},m,this)}));function p(m,b){return h.apply(this,arguments)}return p})()},{key:"abort",value:function(){var p;(p=this.abortController)===null||p===void 0||p.abort(),this.abortController=new AbortController}},{key:"updateProgress",value:(function(){var h=ee(G().m(function m(){var b,R,C;return G().w(function(A){for(;;)switch(A.n){case 0:return A.n=1,this.getCompletedCount();case 1:R=A.v,C=(R/this.totalChunk*100).toFixed(2),(b=this.onProgressUpdate)===null||b===void 0||b.call(this,C);case 2:return A.a(2)}},m,this)}));function p(){return h.apply(this,arguments)}return p})()},{key:"resetState",value:function(){this.currentChunk=0,this.updateProgress(),this.changeStatus("pending")}},{key:"start",value:function(){this.isReady&&(this.changeStatus("downloading"),this.download())}},{key:"pause",value:function(){this.changeStatus("pause"),this.abort()}},{key:"resume",value:(function(){var h=ee(G().m(function m(){return G().w(function(b){for(;;)switch(b.n){case 0:return b.n=1,this.getResumePosition();case 1:this.currentChunk=b.v,this.changeStatus("downloading"),this.download();case 2:return b.a(2)}},m,this)}));function p(){return h.apply(this,arguments)}return p})()},{key:"cancel",value:(function(){var h=ee(G().m(function m(){return G().w(function(b){for(;;)switch(b.n){case 0:this.abort(),this.resetState(),this.remove();case 1:return b.a(2)}},m,this)}));function p(){return h.apply(this,arguments)}return p})()},{key:"uploadSingeChunk",value:(function(){var h=ee(G().m(function m(b){var R,C,A,N;return G().w(function(d){for(;;)switch(d.n){case 0:return R=this.getCurrentChunkName(b),d.n=1,ce.getItem(R);case 1:if(!d.v){d.n=2;break}return this.updateProgress(),d.a(2);case 2:return C=b*this.chunkSize,A=Math.min(C+this.chunkSize-1,this.totalSize-1),d.n=3,this.getChunkData(C,A);case 3:return N=d.v,d.n=4,ce.setItem(R,new Blob([N]));case 4:this.updateProgress();case 5:return d.a(2)}},m,this)}));function p(m){return h.apply(this,arguments)}return p})()},{key:"download",value:(function(){var h=ee(G().m(function m(){var b=this,R,C,A,N,d,$;return G().w(function(c){for(;;)switch(c.p=c.n){case 0:c.p=0,R=4,C=[],A=(function(){var P=ee(G().m(function k(B){return G().w(function(j){for(;;)switch(j.n){case 0:return j.n=1,b.uploadSingeChunk(B);case 1:return j.a(2)}},k)}));return function(B){return P.apply(this,arguments)}})(),N=G().m(function P(){var k;return G().w(function(B){for(;;)switch(B.n){case 0:if(!(C.length>=R)){B.n=1;break}return B.n=1,Promise.race(C);case 1:k=A(b.currentChunk++).finally(function(){var j=C.indexOf(k);j>-1&&C.splice(j,1)}),C.push(k);case 2:return B.a(2)}},P)});case 1:if(!(this.currentChunk<this.totalChunk)){c.n=3;break}return c.d(ot(N()),2);case 2:c.n=1;break;case 3:return c.n=4,Promise.all(C);case 4:this.changeStatus("finished"),this.mergeAndDownload(),c.n=7;break;case 5:if(c.p=5,$=c.v,d=$,!(d&&d.name==="AbortError")){c.n=6;break}return c.a(2);case 6:this.changeStatus("error",$);case 7:return c.a(2)}},m,this,[[0,5]])}));function p(){return h.apply(this,arguments)}return p})()},{key:"remove",value:(function(){var h=ee(G().m(function m(){var b;return G().w(function(R){for(;;)switch(R.n){case 0:return R.n=1,this.getChunkKeys();case 1:return b=R.v,R.n=2,Promise.all(b.map(function(C){return ce.removeItem(C)}));case 2:return R.a(2)}},m,this)}));function p(){return h.apply(this,arguments)}return p})()},{key:"mergeAndDownload",value:(function(){var h=ee(G().m(function m(){var b=this,R,C,A,N,d,$,c,P,k,B,j;return G().w(function(F){for(;;)switch(F.p=F.n){case 0:return F.n=1,this.getCompletedCount();case 1:if(R=F.v,!(R<this.totalChunk)){F.n=2;break}return this.changeStatus("error",new Error("下载不完整,请取消再重新下载")),F.a(2);case 2:C=nr.createWriteStream(this.fileName,{size:this.totalSize}),A=C.getWriter(),N=this.getURLMd5(),F.p=3,d=0;case 4:if(!(d<this.totalChunk)){F.n=12;break}return F.n=5,ce.getItem("".concat(N,"_").concat(d));case 5:if($=F.v,$){F.n=6;break}throw new Error("Chunk ".concat(d," missed!"));case 6:c=$.stream().getReader();case 7:return F.n=8,c.read();case 8:if(P=F.v,k=P.done,B=P.value,!k){F.n=9;break}return F.a(3,11);case 9:return F.n=10,A.write(B);case 10:F.n=7;break;case 11:d++,F.n=4;break;case 12:return F.n=13,A.close();case 13:setTimeout(ee(G().m(function W(){return G().w(function(M){for(;;)switch(M.n){case 0:return M.n=1,b.remove();case 1:b.resetState();case 2:return M.a(2)}},W)})),2e3),F.n=15;break;case 14:F.p=14,j=F.v,this.changeStatus("error",j),A.abort&&A.abort(j);case 15:return F.a(2)}},m,this,[[3,14]])}));function p(){return h.apply(this,arguments)}return p})()},{key:"destroy",value:function(){this.abort()}}],[{key:"setMitmPath",value:function(p){nr.mitm=p}}])})();te(xe,"EVENTS",or);te(xe,"STATUS",Ne);exports.Download=xe;exports.STATUS=Ne;
@@ -1,4 +1,4 @@
1
- declare class Download {
1
+ export declare class Download {
2
2
  static EVENTS: typeof EVENTS;
3
3
  static STATUS: typeof STATUS;
4
4
  url: string;
@@ -38,7 +38,6 @@ declare class Download {
38
38
  mergeAndDownload(): Promise<void>;
39
39
  destroy(): void;
40
40
  }
41
- export default Download;
42
41
 
43
42
  export declare type DownloadOptions = {
44
43
  url: string;