mphttpx 2.6.0 → 2.6.1
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/README.md +1 -1
- package/dist/cjs/fetchP.js +7 -13
- package/dist/cjs/index.js +5 -17
- package/dist/esm/fetchP.js +7 -6
- package/dist/esm/index.js +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/mphttpx.cjs.js +228 -1454
- package/dist/mphttpx.cjs.min.js +1 -1
- package/dist/mphttpx.esm.js +227 -1450
- package/dist/mphttpx.esm.min.js +1 -1
- package/dist/mphttpx.umd.js +5516 -0
- package/dist/mphttpx.umd.min.js +1 -0
- package/package.json +7 -6
package/dist/mphttpx.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,t,n){return t=o(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,n||[],o(e).constructor):t.apply(e,n))}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function u(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(a())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&s(o,n.prototype),o}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)},l(e)}var f={iterator:"function"==typeof Symbol&&Symbol.iterator||"Symbol(Symbol.iterator)",toStringTag:"function"==typeof Symbol&&Symbol.toStringTag||"Symbol(Symbol.toStringTag)"},h=function(n,o){function a(n,r){var o;return t(this,a),o=e(this,a,[n]),void 0!==r&&(o.name=""+r),o}return i(a,n),r(a,[{key:o,get:function(){return"DOMException"}},{key:"__MPHTTPX__",get:function(){return{chain:["DOMException"]}}}])}(l(Error),f.toStringTag),d=function(){try{return new DOMException,!0}catch(e){return!1}}()?DOMException:h;function p(e){try{return e.__MPHTTPX__.chain[0]}catch(t){return Object.prototype.toString.call(e).slice(8,-1)}}function y(e,t,n){Object.defineProperty(e,t,{value:n})}function v(e){try{return String(e)}catch(e){return"[object Unknown]"}}function g(e,t){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")}function m(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o="__MPHTTPX__";return!!t&&"object"===c(t)&&o in t&&!!t[o]&&"object"===c(t[o])&&"chain"in t[o]&&Array.isArray(t[o].chain)&&(n=t[o].chain.indexOf(e),r?0===n:n>-1)}var b="function"==typeof Symbol&&!!Symbol.iterator;function _(e){return Array.isArray(e)||!!e&&"object"===c(e)&&b&&Symbol.iterator in e&&"function"==typeof e[Symbol.iterator]}function k(e){var t,n,r,o=0,i=(t={next:function(){return o<e.length?{value:e[o++],done:!1}:{value:void 0,done:!0}}},r=function(){return i},(n=u(n=f.iterator))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);return i}function w(e,t,n,r){if(e<t)throw new TypeError("Failed to ".concat(r?"execute '"+r+"' on":"construct"," '").concat(n,"': ").concat(t," argument").concat(t>1?"s":""," required, but only ").concat(e," present."))}var T=function(){return r(function e(){t(this,e)},[{key:"encoding",get:function(){return"utf-8"}},{key:"encode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return E("string"==typeof e?e:""+e).encoded}},{key:"encodeInto",value:function(e,t){if(w(arguments.length,2,"TextEncoder","encodeInto"),!Uint8Array.prototype.isPrototypeOf(t)&&!g("Uint8Array",t))throw new TypeError("Failed to execute 'encodeInto' on 'TextEncoder': parameter 2 is not of type 'Uint8Array'.");var n=E("string"==typeof e?e:""+e,t);return{read:n.read,written:n.written}}},{key:"toString",value:function(){return"[object TextEncoder]"}},{key:f.toStringTag,get:function(){return"TextEncoder"}},{key:"__MPHTTPX__",get:function(){return{chain:["TextEncoder"]}}}])}();function E(e,t){for(var n=void 0!==t,r=0,o=0,i=e.length,a=0,s=Math.max(32,i+(i>>1)+7),u=n?t:new Uint8Array(s>>3<<3),c=0,l=0,f=0;r<i;){if(l=1,(c=e.charCodeAt(r))>=55296&&c<=56319)if(r+1<i){var h=e.charCodeAt(r+1);56320==(64512&h)?(l=2,r+=2,c=((1023&c)<<10)+(1023&h)+65536):(r+=1,c=65533)}else r+=1,c=65533;else c>=56320&&c<=57343?(r+=1,c=65533):r+=1;if(!n&&a+4>u.length){s+=8,s=(s*=1+r/e.length*2)>>3<<3;var d=new Uint8Array(s);d.set(u),u=d}if(4294967168&c?4294965248&c?4294901760&c?4292870144&c?(c=65533,f=3):f=4:f=3:f=2:f=1,n&&a+f>u.length)break;switch(f){case 1:u[a++]=c;break;case 2:u[a++]=c>>6&31|192,u[a++]=63&c|128;break;case 3:u[a++]=c>>12&15|224,u[a++]=c>>6&63|128,u[a++]=63&c|128;break;case 4:u[a++]=c>>18&7|240,u[a++]=c>>12&63|128,u[a++]=c>>6&63|128,u[a++]=63&c|128}o+=l}return{encoded:n?t:u.slice(0,a),read:o,written:a}}var S="undefined"!=typeof TextEncoder&&TextEncoder||T,x=["utf-8","utf8","unicode-1-1-utf-8"],R=function(){return r(function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"utf-8",r=arguments.length>1?arguments[1]:void 0;if(t(this,e),-1===x.indexOf(("string"==typeof n?n:""+n).toLowerCase()))throw new RangeError("Failed to construct 'TextDecoder': encoding ('".concat(n,"') not implemented."));y(this,"__TextDecoder__",new P(r))},[{key:"encoding",get:function(){return"utf-8"}},{key:"fatal",get:function(){return C(this).fatal}},{key:"ignoreBOM",get:function(){return C(this).ignoreBOM}},{key:"decode",value:function(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.stream,r=void 0!==n&&n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{fatal:!1,ignoreBOM:!1,partial:[]};if(void 0===e){if(o.partial.length>0&&o.fatal)throw o.partial=[],new TypeError("Incomplete UTF-8 sequence.");return""}var i=A(e)?new Uint8Array(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):function(){throw new TypeError("Input could not be converted to any of: ArrayBufferView, ArrayBuffer.")}();if(o.partial.length>0){var a=new Uint8Array(o.partial.length+i.length);a.set(o.partial,0),a.set(i,o.partial.length),i=a,o.partial=[]}!o.ignoreBOM&&i.length>=3&&239===i[0]&&187===i[1]&&191===i[2]&&(i=i.subarray(3));var s=i.length,u=[];if(r&&i.length>0){for(var c=i.length;c>0&&c>i.length-4;){var l=i[c-1];if(128!=(192&l)){(l>239?4:l>223?3:l>191?2:1)>i.length-(c-1)&&(s=c-1);break}--c}o.partial=Array.from(i.slice(s)),i=i.slice(0,s)}var f=0,h=0,d=0,p=0,y=0,v=0,g=0,m=0;for(;m<s;){if(f=0,m+(d=(p=i[m])>239?4:p>223?3:p>191?2:1)<=s)switch(d){case 1:p<128&&(f=p);break;case 2:128==(192&(y=i[m+1]))&&(h=(31&p)<<6|63&y)>127&&(f=h);break;case 3:y=i[m+1],v=i[m+2],128==(192&y)&&128==(192&v)&&(h=(15&p)<<12|(63&y)<<6|63&v)>2047&&(h<55296||h>57343)&&(f=h);break;case 4:y=i[m+1],v=i[m+2],g=i[m+3],128==(192&y)&&128==(192&v)&&128==(192&g)&&(h=(15&p)<<18|(63&y)<<12|(63&v)<<6|63&g)>65535&&h<1114112&&(f=h)}if(0===f&&(1===d&&0!==p||d>1)){if(o.fatal)throw o.partial=[],new TypeError("Decoding failed.");for(var b=1;m+b<s&&128==(192&i[m+b]);)b+=1;u.push(65533),m+=b}else f>65535&&(f-=65536,u.push(f>>>10&1023|55296),f=56320|1023&f),u.push(f),m+=d}return u.length>16384?function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(String.fromCharCode.apply(String,e.slice(n,n+4096)));return t.join("")}(u):function(e){for(var t="",n=0,r=e.length;n<r;n+=4096)t+=String.fromCharCode.apply(String,e.slice(n,n+4096));return t}(u)}(e,t,C(this))}},{key:"toString",value:function(){return"[object TextDecoder]"}},{key:f.toStringTag,get:function(){return"TextDecoder"}},{key:"__MPHTTPX__",get:function(){return{chain:["TextDecoder"]}}}])}(),P=r(function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.fatal,o=void 0!==r&&r,i=n.ignoreBOM,a=void 0!==i&&i;t(this,e),this.partial=[],this.fatal=!!o,this.ignoreBOM=!!a});function C(e){return e.__TextDecoder__}function A(e){return!!e&&"object"===c(e)&&ArrayBuffer.prototype.isPrototypeOf(e)||function(e){return!!e&&"object"===c(e)&&"byteLength"in e&&"number"==typeof e.byteLength&&(g("ArrayBuffer",e)||"[object ArrayBuffer]"===v(e))}(e)}var q="undefined"!=typeof TextDecoder&&TextDecoder||R,L=function(){return r(function e(n,r){t(this,e),w(arguments.length,1,"Event"),y(this,"__Event__",new H);var o=O(this);o.type=""+n,o.bubbles=!!(null==r?void 0:r.bubbles),o.cancelable=!!(null==r?void 0:r.cancelable),o.composed=!!(null==r?void 0:r.composed),Object.defineProperty(this,"isTrusted",{enumerable:!0,get:function(){return"YES"===o.isTrusted}})},[{key:"NONE",get:function(){return 0}},{key:"CAPTURING_PHASE",get:function(){return 1}},{key:"AT_TARGET",get:function(){return 2}},{key:"BUBBLING_PHASE",get:function(){return 3}},{key:"bubbles",get:function(){return O(this).bubbles}},{key:"cancelBubble",get:function(){return O(this).cancelBubble},set:function(e){e&&(O(this).cancelBubble=!0)}},{key:"cancelable",get:function(){return O(this).cancelable}},{key:"composed",get:function(){return O(this).composed}},{key:"currentTarget",get:function(){return O(this).currentTarget}},{key:"defaultPrevented",get:function(){return O(this).defaultPrevented}},{key:"eventPhase",get:function(){return O(this).eventPhase}},{key:"returnValue",get:function(){return O(this).returnValue},set:function(e){e||this.preventDefault()}},{key:"srcElement",get:function(){return O(this).target}},{key:"target",get:function(){return O(this).target}},{key:"timeStamp",get:function(){return O(this).timeStamp}},{key:"type",get:function(){return O(this).type}},{key:"composedPath",value:function(){var e=this.target?[this.target]:[];return this.currentTarget&&this.currentTarget!==this.target&&e.push(this.currentTarget),e}},{key:"initEvent",value:function(e,t,n){w(arguments.length,1,p(this),"initEvent");var r=O(this);r.eventDispatched||(r.type=""+e,r.bubbles=!!t,r.cancelable=!!n)}},{key:"preventDefault",value:function(){var e=O(this);if(e.passive)return console.warn("Ignoring 'preventDefault()' call on event of type '".concat(this.type,"' from a listener registered as 'passive'."));this.cancelable&&(e.defaultPrevented=!0,e.returnValue=!1)}},{key:"stopImmediatePropagation",value:function(){O(this).immediatePropagationStopped=!0,this.cancelBubble=!0}},{key:"stopPropagation",value:function(){this.cancelBubble=!0}},{key:"toString",value:function(){return"[object Event]"}},{key:f.toStringTag,get:function(){return"Event"}},{key:"__MPHTTPX__",get:function(){return{chain:["Event"]}}}],[{key:"NONE",get:function(){return 0}},{key:"CAPTURING_PHASE",get:function(){return 1}},{key:"AT_TARGET",get:function(){return 2}},{key:"BUBBLING_PHASE",get:function(){return 3}}])}(),H=r(function e(){t(this,e),this.bubbles=!1,this.cancelBubble=!1,this.cancelable=!1,this.composed=!1,this.currentTarget=null,this.defaultPrevented=!1,this.eventPhase=0,this.returnValue=!0,this.target=null,this.timeStamp=(new Date).getTime()-j,this.type="",this.passive=!1,this.eventDispatched=!1,this.immediatePropagationStopped=!1,Object.defineProperty(this,"isTrusted",F())});function O(e){return e.__Event__}var j=(new Date).getTime();function M(e){return"name"in e?e.name:"unknown"}function F(){var e=M(F),t=e.length,n="NO";return{configurable:!1,enumerable:!0,get:function(){return n},set:function(r){e===r.slice(0,t)&&(n=r.slice(t+1))}}}function U(e,t){(O(e)||{}).isTrusted="".concat(M(F),":").concat(t?"YES":"NO")}var D="undefined"!=typeof Event&&Event||L,B=function(){return r(function e(){t(this,e),y(this,"__EventTarget__",new N)},[{key:"addEventListener",value:function(e,t,n){if(w(arguments.length,2,p(this),"addEventListener"),"function"!=typeof t&&"object"!==c(t)&&void 0!==t)throw new TypeError("Failed to execute 'addEventListener' on '".concat(p(this),"': parameter 2 is not of type 'Object'."));var r=I(this)||{executors:[]},o=new X(e,t),i=o.options.capture="boolean"==typeof n?n:!!(null==n?void 0:n.capture);if(!r.executors.some(function(e){return e.equals(o)})){if(r.executors.push(o),n&&"object"===c(n)){o.options.once=!!n.once,o.options.passive=!!n.passive;var a=n.signal;a&&V(a)&&!a.aborted&&(o.options.signal=a,function(e,t,n){var r=function(){I(e).executors=I(e).executors.filter(function(e){return!e.equals(t)}),n.removeEventListener("abort",r)};n.addEventListener("abort",r)}(this,o,a))}if(i){var s=function(e){return e.options.capture?0:1};r.executors=r.executors.sort(function(e,t){return s(e)-s(t)})}}}},{key:"dispatchEvent",value:function(e){if(w(arguments.length,1,p(this),"dispatchEvent"),m("Event",e))U(e,!1);else{if(n=function(e){return"[object "===e.slice(0,8)&&"Event]"===e.slice(-6)},!(t=e)||"object"!==c(t)||!("type"in t)||"string"!=typeof t.type||!n(Object.prototype.toString.call(t))&&!n(v(t)))throw new TypeError("Failed to execute 'dispatchEvent' on '".concat(p(this),"': parameter 1 is not of type 'Event'."));console.warn("WARNING: undefined behavior when executing 'dispatchEvent' on '".concat(p(this),"': parameter 1 is not of type 'Event(P)'."))}var t,n;return z(this,e)}},{key:"removeEventListener",value:function(e,t,n){if(w(arguments.length,2,p(this),"removeEventListener"),"function"!=typeof t&&"object"!==c(t)&&void 0!==t)throw new TypeError("Failed to execute 'removeEventListener' on '".concat(p(this),"': parameter 2 is not of type 'Object'."));var r=I(this)||{executors:[]},o=new X(e,t);o.options.capture="boolean"==typeof n?n:!!(null==n?void 0:n.capture),r.executors.some(function(e){return e.equals(o)})&&(r.executors=r.executors.filter(function(e){return!e.equals(o)}))}},{key:"toString",value:function(){return"[object EventTarget]"}},{key:f.toStringTag,get:function(){return"EventTarget"}},{key:"__MPHTTPX__",get:function(){return{chain:["EventTarget"]}}}])}(),N=r(function e(){t(this,e),this.executors=[]});function I(e){return e.__EventTarget__}var X=function(){return r(function e(n,r){var o;t(this,e),this.options={},this.type=""+n,this.callback="function"==typeof(o=r)?o:function(e){return!!e&&"object"===c(e)&&"handleEvent"in e&&"function"==typeof e.handleEvent}(o)?o.handleEvent:o},[{key:"equals",value:function(e){return this.type===e.type&&this.callback===e.callback&&this.options.capture===e.options.capture}}])}();function z(e,t){var n=I(e)||{},r=t.__Event__||{};r.target=e,r.currentTarget=e,r.eventPhase=2,r.eventDispatched=!0;var o=[];Array.isArray(n.executors)||(n.executors=[]);for(var i=0;i<n.executors.length&&!r.immediatePropagationStopped;++i){var a=n.executors[i];if(a.type===t.type){a.options.once&&o.push(i),r.passive=!!a.options.passive;try{var s=a.callback;"function"==typeof s&&s.call(e,t)}catch(e){console.error(e)}r.passive=!1}}return o.length>0&&(n.executors=n.executors.reduce(function(e,t,n){return-1===o.indexOf(n)&&e.push(t),e},[])),r.currentTarget=null,r.eventPhase=0,r.eventDispatched=!1,!(t.cancelable&&t.defaultPrevented)}function G(e,t){return function(n){var r="on"+n,o=e[r],i=t[r];"function"==typeof o?B.prototype.addEventListener.call(e,n,i):B.prototype.removeEventListener.call(e,n,i)}}function W(e,t,n){"function"==typeof t&&t.call(e,n)}function V(e){return m("EventTarget",e)||function(e){return!!e&&"object"===c(e)&&"addEventListener"in e&&"function"==typeof e.addEventListener&&"removeEventListener"in e&&"function"==typeof e.removeEventListener}(e)}var $="undefined"!=typeof EventTarget&&EventTarget||B,J=function(n,o){function a(n,r){var o,i;return t(this,a),w(arguments.length,1,"CustomEvent"),y(o=e(this,a,[n,r]),"__CustomEvent__",new K),Y(o).detail=null!==(i=null==r?void 0:r.detail)&&void 0!==i?i:null,o}return i(a,L),r(a,[{key:"detail",get:function(){return Y(this).detail}},{key:"initCustomEvent",value:function(e,t,n,r){w(arguments.length,1,"CustomEvent","initCustomEvent"),this.__Event__.eventDispatched||(this.initEvent(e,t,n),Y(this).detail=null!=r?r:null)}},{key:"toString",value:function(){return"[object CustomEvent]"}},{key:o,get:function(){return"CustomEvent"}},{key:"__MPHTTPX__",get:function(){return{chain:["CustomEvent","Event"]}}}])}(0,f.toStringTag),K=r(function e(){t(this,e)});function Y(e){return e.__CustomEvent__}var Q="undefined"!=typeof CustomEvent&&CustomEvent||J,Z=function(n,o){function a(){var n;if(t(this,a),(n=e(this,a)).constructor===a)throw new TypeError("Failed to construct 'AbortSignal': Illegal constructor");return y(n,"__AbortSignal__",new ee(n)),n}return i(a,B),r(a,[{key:"aborted",get:function(){return te(this).aborted}},{key:"reason",get:function(){return te(this).reason}},{key:"throwIfAborted",value:function(){if(this.aborted)throw this.reason}},{key:"onabort",get:function(){return te(this).onabort},set:function(e){te(this).onabort=e,te(this).attach("abort")}},{key:"toString",value:function(){return"[object AbortSignal]"}},{key:o,get:function(){return"AbortSignal"}},{key:"__MPHTTPX__",get:function(){return{chain:["AbortSignal","EventTarget"]}}}],[{key:"abort",value:function(e){var t=ne();return re(t,!1,e),t}},{key:"any",value:function(e){if(w(arguments.length,1,"AbortSignal","any"),!_(e))throw new TypeError("Failed to execute 'any' on 'AbortSignal': The provided value cannot be converted to a sequence.");var t=Array.isArray(e)?e:Array.from(e);t.forEach(function(e){if(!V(e))throw new TypeError("Failed to execute 'any' on 'AbortSignal': Failed to convert value to 'AbortSignal'.")});var n=ne(),r=function(){for(var e=0;e<t.length;++e){var n=t[e];if(n.aborted)return n}}();return r?re(n,!1,r.reason):function(e,t){function n(){for(var r=0;r<t.length;++r){t[r].removeEventListener("abort",n)}re(e,!0,this.reason)}for(var r=0;r<t.length;++r){t[r].addEventListener("abort",n)}}(n,t),n}},{key:"timeout",value:function(e){if(w(arguments.length,1,"AbortSignal","timeout"),!(e>=0))throw new TypeError("Failed to execute 'timeout' on 'AbortSignal': Value is outside the 'unsigned long long' value range.");var t=ne();return setTimeout(function(){re(t,!0,new d("signal timed out","TimeoutError"))},e),t}}])}(0,f.toStringTag),ee=r(function e(n){var r;t(this,e),this.aborted=!1,this.reason=void 0,this.onabort=null,this.attach=G(n,(r=n,{onabort:function(e){W(r,r.onabort,e)}}))});function te(e){return e.__AbortSignal__}function ne(){var e=Object.create(Z.prototype);return y(e,"__EventTarget__",{executors:[]}),y(e,"__AbortSignal__",new ee(e)),e}function re(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;if(!e.aborted){var r=te(e)||{};if(r.aborted=!0,r.reason=void 0!==n?n:new d("signal is aborted without reason","AbortError"),t){var o=new L("abort");o.__Event__.target=e,U(o,!0),z(e,o)}}}var oe="undefined"!=typeof AbortSignal&&AbortSignal||Z,ie=function(){return r(function e(){t(this,e),y(this,"__AbortController__",new ae)},[{key:"signal",get:function(){return(e=this,e.__AbortController__).signal;var e}},{key:"abort",value:function(e){re(this.signal,!0,e)}},{key:"toString",value:function(){return"[object AbortController]"}},{key:f.toStringTag,get:function(){return"AbortController"}},{key:"__MPHTTPX__",get:function(){return{chain:["AbortController"]}}}])}(),ae=r(function e(){t(this,e),this.signal=ne()});var se="undefined"!=typeof AbortController&&AbortController||ie,ue=S.prototype.encode.bind(new S),ce=q.prototype.decode.bind(new q),le={ReadableStream:"undefined"!=typeof ReadableStream&&ReadableStream||void 0};var fe=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(t(this,e),!_(n))throw new TypeError("Failed to construct 'Blob/File': The provided value cannot be converted to a sequence.");for(var o=Array.isArray(n)?n:Array.from(n),i=[],a=0,s=0;s<o.length;++s){var u=o[s];if(ge(u))a+=u.size,i.push(u.arrayBuffer().then(function(e){return new Uint8Array(e)}));else{var c=A(u)||ArrayBuffer.isView(u)?pe(u):ue(u);a+=c.length,i.push(Promise.resolve(c))}}y(this,"__Blob__",new he(Promise.all(i).then(function(e){return function(e){var t=e.reduce(function(e,t){return e+t.byteLength},0),n=new Uint8Array(t);return e.reduce(function(e,t){return n.set(t,e),e+t.byteLength},0),n}(e)}))),de(this).size=a,de(this).type=ye(null==r?void 0:r.type)}return r(e,[{key:"size",get:function(){return de(this).size}},{key:"type",get:function(){return de(this).type}},{key:"arrayBuffer",value:function(){return de(this).promise.then(function(e){return ve(e.buffer).buffer})}},{key:"bytes",value:function(){return de(this).promise.then(function(e){return ve(e.buffer)})}},{key:"slice",value:function(t,n,r){var o=null!=t?t:0,i=null!=n?n:this.size,a=Object.create(e.prototype);return y(a,"__Blob__",new he(de(this).promise.then(function(e){return ve(e.slice(o,i))}))),de(a).size=function(e,t,n){var r=function(t){var n=Number(t);return isNaN(n)&&(n=0),n=n>=0?Math.min(n,e):Math.max(0,n+e)};return Math.max(0,r(n)-r(t))}(this.size,o,i),de(a).type=ye(r),a}},{key:"stream",value:function(){var e=le.ReadableStream||function(){throw new ReferenceError("ReadableStream is not defined")}(),t=0;try{return new e({type:"bytes",autoAllocateChunkSize:524288,pull:function(e){var n,r=null===(n=e.byobRequest)||void 0===n?void 0:n.view;return this.slice(t,(null==r?void 0:r.byteLength)?t+r.byteLength:void 0).arrayBuffer().then(function(n){var o,i=new Uint8Array(n),a=i.byteLength;t+=a,r.set(i),null===(o=e.byobRequest)||void 0===o||o.respond(a),t>=this.size&&e.close()}.bind(this))}.bind(this)})}catch(n){return new e({pull:function(e){return this.slice(t,t+524288).arrayBuffer().then(function(n){t+=n.byteLength;var r=new Uint8Array(n);e.enqueue(r),t==this.size&&e.close()}.bind(this))}.bind(this)})}}},{key:"text",value:function(){return de(this).promise.then(function(e){return ce(e)})}},{key:"toString",value:function(){return"[object Blob]"}},{key:f.toStringTag,get:function(){return"Blob"}},{key:"__MPHTTPX__",get:function(){return{chain:["Blob"]}}}])}(),he=r(function e(n){t(this,e),this.size=0,this.type="",this.promise=n});function de(e){return e.__Blob__}function pe(e){return A(e)?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function ye(e){var t=""+(void 0!==e?e:"");return/[^\u0020-\u007E]/.test(t)?"":t.toLowerCase()}function ve(e){var t=pe(e),n=new Uint8Array(new ArrayBuffer(t.byteLength));return n.set(t),n}function ge(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return m("Blob",e,t)||function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=["[object Blob]"];t||n.push("[object File]");return!!e&&"object"===c(e)&&"size"in e&&"number"==typeof e.size&&"arrayBuffer"in e&&"function"==typeof e.arrayBuffer&&(n.indexOf(Object.prototype.toString.call(e))>-1||n.indexOf(v(e))>-1)}(e,t)}var me=function(){try{return 2===new Blob(["ä"]).size}catch(e){return!1}}()?Blob:fe;function be(n){var o=function(n,o){function a(n,r,o){var i;return t(this,a),w(arguments.length,2,"File"),y(i=e(this,a,[n,o]),"__File__",new _e),ke(i).lastModified=+((null==o?void 0:o.lastModified)?new Date(o.lastModified):new Date)||0,ke(i).name=""+r,i}return i(a,n),r(a,[{key:"lastModified",get:function(){return ke(this).lastModified}},{key:"name",get:function(){return ke(this).name}},{key:"webkitRelativePath",get:function(){return""}},{key:"toString",value:function(){return"[object File]"}},{key:o,get:function(){return"File"}}])}(n,f.toStringTag);return n===fe&&Object.defineProperty(o.prototype,"__MPHTTPX__",{configurable:!0,get:function(){return{chain:["File","Blob"]}}}),o}var _e=r(function e(){t(this,e),this.lastModified=0,this.name=""});function ke(e){return e.__File__}var we=be(fe),Te=function(){try{return new File([],""),!0}catch(e){return!1}}()?File:me===fe?we:be(me),Ee=["loaded","total"],Se=function(n,o){function a(n,r){var o,i,s;t(this,a),y(o=e(this,a,[n,r]),"__ProgressEvent__",new xe);var u=Re(o);u.lengthComputable=!!(null==r?void 0:r.lengthComputable),u.loaded=Number(null!==(i=null==r?void 0:r.loaded)&&void 0!==i?i:0),u.total=Number(null!==(s=null==r?void 0:r.total)&&void 0!==s?s:0);for(var c=0;c<Ee.length;++c){var l=Ee[c];if(isNaN(o[l]))throw new TypeError("Failed to construct 'ProgressEvent': Failed to read the '".concat(l,"' property from 'ProgressEventInit': The provided double value is non-finite."))}return o}return i(a,L),r(a,[{key:"lengthComputable",get:function(){return Re(this).lengthComputable}},{key:"loaded",get:function(){return Re(this).loaded}},{key:"total",get:function(){return Re(this).total}},{key:"toString",value:function(){return"[object ProgressEvent]"}},{key:o,get:function(){return"ProgressEvent"}},{key:"__MPHTTPX__",get:function(){return{chain:["ProgressEvent","Event"]}}}])}(0,f.toStringTag),xe=r(function e(){t(this,e),this.lengthComputable=!1,this.loaded=0,this.total=0});function Re(e){return e.__ProgressEvent__}function Pe(e,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=new Se(t,{lengthComputable:n>0,loaded:arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,total:n});r.__Event__.target=e,U(r,!0),z(e,r)}var Ce=function(n,o){function a(){var n;return t(this,a),y(n=e(this,a),"__FileReader__",new Ae(n)),n}return i(a,B),r(a,[{key:"EMPTY",get:function(){return 0}},{key:"LOADING",get:function(){return 1}},{key:"DONE",get:function(){return 2}},{key:"error",get:function(){return qe(this).error}},{key:"readyState",get:function(){return qe(this).readyState}},{key:"result",get:function(){return qe(this).result}},{key:"abort",value:function(){var e,t;2===qe(this).pos&&((t=qe(e=this)).pos=5,t.error=new d("An ongoing operation was aborted, typically with a call to abort().","AbortError"),t.result=null,t.readyState=2,Pe(e,"abort"),Oe(e))}},{key:"readAsArrayBuffer",value:function(e){Le(this,"readAsArrayBuffer",arguments.length,e),He(this,e.size,function(){return e.arrayBuffer()})}},{key:"readAsBinaryString",value:function(e){Le(this,"readAsBinaryString",arguments.length,e),He(this,e.size,function(){return e.arrayBuffer().then(function(e){for(var t=[],n=new Uint8Array(e),r=0;r<n.length;++r)t.push(String.fromCharCode(n[r]));return t.join("")})})}},{key:"readAsDataURL",value:function(e){Le(this,"readAsDataURL",arguments.length,e),He(this,e.size,function(){return e.arrayBuffer().then(function(t){return"data:"+(e.type||"application/octet-stream")+";base64,"+je(new Uint8Array(t))})})}},{key:"readAsText",value:function(e,t){if(Le(this,"readAsText",arguments.length,e),"function"==typeof TextDecoder){var n=new TextDecoder(t);He(this,e.size,function(){return e.arrayBuffer().then(function(e){return n.decode(e)})})}else{if(void 0!==t){var r=""+t;-1===["utf-8","utf8","unicode-1-1-utf-8"].indexOf(r.toLowerCase())&&console.warn("Ignoring the execution of 'readAsText' on 'FileReader': encoding ('".concat(r,"') not implemented."))}He(this,e.size,function(){return e.text()})}}},{key:"onabort",get:function(){return qe(this).onabort},set:function(e){qe(this).onabort=e,qe(this).attach("abort")}},{key:"onerror",get:function(){return qe(this).onerror},set:function(e){qe(this).onerror=e,qe(this).attach("error")}},{key:"onload",get:function(){return qe(this).onload},set:function(e){qe(this).onload=e,qe(this).attach("load")}},{key:"onloadend",get:function(){return qe(this).onloadend},set:function(e){qe(this).onloadend=e,qe(this).attach("loadend")}},{key:"onloadstart",get:function(){return qe(this).onloadstart},set:function(e){qe(this).onloadstart=e,qe(this).attach("loadstart")}},{key:"onprogress",get:function(){return qe(this).onprogress},set:function(e){qe(this).onprogress=e,qe(this).attach("progress")}},{key:"toString",value:function(){return"[object FileReader]"}},{key:o,get:function(){return"FileReader"}},{key:"__MPHTTPX__",get:function(){return{chain:["FileReader","EventTarget"]}}}],[{key:"EMPTY",get:function(){return 0}},{key:"LOADING",get:function(){return 1}},{key:"DONE",get:function(){return 2}}])}(0,f.toStringTag),Ae=r(function e(n){var r;t(this,e),this.pos=0,this.readyState=0,this.result=null,this.error=null,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.attach=G(n,(r=n,{onabort:function(e){W(r,r.onabort,e)},onerror:function(e){W(r,r.onerror,e)},onload:function(e){W(r,r.onload,e)},onloadend:function(e){W(r,r.onloadend,e)},onloadstart:function(e){W(r,r.onloadstart,e)},onprogress:function(e){W(r,r.onprogress,e)}}))});function qe(e){return e.__FileReader__}function Le(e,t,n,r){if(w(n,1,"FileReader",t),!ge(r))throw new TypeError("Failed to execute '"+t+"' on 'FileReader': parameter 1 is not of type 'Blob'.");if(1===e.readyState)throw new d("Failed to execute '".concat(t,"' on 'FileReader': The object is already busy reading Blobs."),"InvalidStateError")}function He(e,t,n){!function(e,t,n){var r=qe(e);r.pos=1,r.error=null,r.result=null;var o=function(){return Pe(e,"loadstart",0,t),n()};(function(e,t,n){var r=qe(e);r.pos=2,r.readyState=1,Promise.resolve().then(function(){if(2===r.pos)return n().then(function(n){return function(e,t,n){var r=qe(e);if(2!==r.pos)return;r.pos=3,r.result=n,r.readyState=2,function(e,t){qe(e).pos=4,Pe(e,"load",t,t),Oe(e,t)}(e,t)}(e,t,n)}).catch(function(t){return function(e,t){var n=qe(e);if(2!==n.pos)return;n.pos=6,n.error=t,n.result=null,n.readyState=2,Pe(e,"error"),Oe(e)}(e,t)})})})(e,t,o)}(e,t,n)}function Oe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;qe(e).pos=7,Pe(e,"loadend",t,t)}function je(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=[],r=0;r<e.length;r+=3){var o=e[r],i=r+1<e.length,a=i?e[r+1]:0,s=r+2<e.length,u=s?e[r+2]:0,c=o>>2,l=(3&o)<<4|a>>4,f=(15&a)<<2|u>>6,h=63&u;s||(h=64,i||(f=64)),n.push(t[c],t[l],t[f],t[h])}return n.join("")}var Me="undefined"!=typeof FileReader&&FileReader||Ce,Fe=function(){return r(function e(n){if(t(this,e),y(this,"__URLSearchParams__",new Ue),void 0!==n)if(ze(n))n.forEach(function(e,t){this.append(t,e)}.bind(this),this);else if(n&&"object"===c(n))if(_(n))for(var r=Array.isArray(n)?n:Array.from(n),o=0;o<r.length;++o){var i=r[o];if(!_(i))throw new TypeError("Failed to construct 'URLSearchParams': The provided value cannot be converted to a sequence.");var a=Array.isArray(i)?i:Array.from(i);if(2!==a.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");this.append(a[0],a[1])}else Object.getOwnPropertyNames(n).forEach(function(e){this.append(e,n[e])}.bind(this),this);else{var s=""+n;0===s.indexOf("?")&&(s=s.slice(1));for(var u=s.split("&"),l=0;l<u.length;++l){var f=u[l],h=f.indexOf("=");h>-1?this.append(Xe(f.slice(0,h)),Xe(f.slice(h+1))):f&&this.append(Xe(f),"")}}},[{key:"size",get:function(){return De(this).array.length}},{key:"append",value:function(e,t){Be(arguments.length,2,"append"),De(this).array.push([""+e,Ne(t)])}},{key:"delete",value:function(e,t){Be(arguments.length,1,"delete");for(var n=""+e,r=-1,o=De(this).array,i=[],a=0;a<o.length;++a){var s=o[a];s[0]!==n?i.push(s):(1!==arguments.length&&s[1]!==Ne(t)&&i.push(s),r=a)}r>-1&&(De(this).array=i)}},{key:"get",value:function(e){Be(arguments.length,1,"get");for(var t=""+e,n=De(this).array,r=0;r<n.length;++r){var o=n[r];if(o[0]===t)return o[1]}return null}},{key:"getAll",value:function(e){Be(arguments.length,1,"getAll");for(var t=""+e,n=De(this).array,r=[],o=0;o<n.length;++o){var i=n[o];i[0]===t&&r.push(i[1])}return r}},{key:"has",value:function(e,t){Be(arguments.length,1,"has");for(var n=""+e,r=De(this).array,o=0;o<r.length;++o){var i=r[o];if(i[0]===n){if(1===arguments.length)return!0;if(i[1]===Ne(t))return!0}}return!1}},{key:"set",value:function(e,t){Be(arguments.length,2,"set");for(var n=""+e,r=Ne(t),o=-1,i=De(this).array,a=[],s=0;s<i.length;++s){var u=i[s];u[0]!==n?a.push(u):-1===o&&(o=s,a.push([n,r]))}-1===o&&a.push([n,r]),De(this).array=a}},{key:"sort",value:function(){De(this).array.sort(function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0})}},{key:"forEach",value:function(e,t){if(Be(arguments.length,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'URLSearchParams': parameter 1 is not of type 'Function'.");for(var n=De(this).array,r=0;r<n.length;++r){var o=n[r];e.call(t,o[1],o[0],this)}}},{key:"entries",value:function(){return k(De(this).array.map(function(e){return[e[0],e[1]]}))}},{key:"keys",value:function(){return k(De(this).array.map(function(e){return e[0]}))}},{key:"values",value:function(){return k(De(this).array.map(function(e){return e[1]}))}},{key:f.iterator,value:function(){return this.entries()}},{key:"toString",value:function(){for(var e=De(this).array,t=[],n=0;n<e.length;++n){var r=e[n];t.push(Ie(r[0])+"="+Ie(r[1]))}return t.join("&")}},{key:f.toStringTag,get:function(){return"URLSearchParams"}},{key:"__MPHTTPX__",get:function(){return{chain:["URLSearchParams"]}}}])}(),Ue=r(function e(){t(this,e),this.array=[]});function De(e){return e.__URLSearchParams__}function Be(e,t,n){w(e,t,"URLSearchParams",n)}function Ne(e){return"string"==typeof e?e:null!=e&&"function"==typeof e.toString?e.toString():JSON.stringify(e)}function Ie(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function Xe(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,function(e){return decodeURIComponent(e)})}function ze(e){return m("URLSearchParams",e)||function(e){return g("URLSearchParams",e)||!!e&&"object"===c(e)&&"function"==typeof URLSearchParams&&e instanceof URLSearchParams}(e)}var Ge="undefined"!=typeof URLSearchParams&&URLSearchParams||Fe,We=function(){return r(function e(n,r){if(t(this,e),y(this,"__FormData__",new Ve),void 0!==n)try{for(var o=n.elements,i=0;i<o.length;++i){var a=o[i];if(!a.name||a.disabled||"submit"===a.type||"button"===a.type||Ye(a,"form fieldset[disabled] *"))return;if("file"===a.type)for(var s=a.files&&a.files.length?a.files:[new Te([],"",{type:"application/octet-stream"})],u=0;u<s.length;++u)this.append(a.name,s[u]);else if("select-multiple"===a.type||"select-one"===a.type)for(var c=0;c<a.options.length;++c){var l=a.options[c];!l.disabled&&l.selected&&this.append(a.name,l.value)}else if("checkbox"===a.type||"radio"===a.type)a.checked&&this.append(a.name,a.value);else{var f="textarea"===a.type?et(a.value):a.value;this.append(a.name,f)}}}catch(e){throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}null!=r&&console.warn("Ignoring the 'submitter' of 'FormData' constructor: parameter 2 not implemented.")},[{key:"append",value:function(e,t,n){Je(arguments.length,2,"append"),$e(this).array.push(Ke(e,t,n))}},{key:"delete",value:function(e){Je(arguments.length,1,"delete");for(var t=""+e,n=-1,r=$e(this).array,o=[],i=0;i<r.length;++i){var a=r[i];a[0]!==t?o.push(a):n=i}n>-1&&($e(this).array=o)}},{key:"get",value:function(e){Je(arguments.length,1,"get");for(var t=""+e,n=$e(this).array,r=0;r<n.length;++r){var o=n[r];if(o[0]===t)return o[1]}return null}},{key:"getAll",value:function(e){Je(arguments.length,1,"getAll");for(var t=""+e,n=$e(this).array,r=[],o=0;o<n.length;++o){var i=n[o];i[0]===t&&r.push(i[1])}return r}},{key:"has",value:function(e){Je(arguments.length,1,"has");for(var t=""+e,n=$e(this).array,r=0;r<n.length;++r){if(n[r][0]===t)return!0}return!1}},{key:"set",value:function(e,t,n){Je(arguments.length,2,"set");for(var r=""+e,o=Ke(e,t,n),i=-1,a=$e(this).array,s=[],u=0;u<a.length;++u){var c=a[u];c[0]!==r?s.push(c):-1===i&&(i=u,s.push(o))}-1===i&&s.push(o),$e(this).array=s}},{key:"forEach",value:function(e,t){if(Je(arguments.length,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(var n=$e(this).array,r=0;r<n.length;++r){var o=n[r];e.call(t,o[1],o[0],t)}}},{key:"entries",value:function(){return k($e(this).array.map(function(e){return[e[0],e[1]]}))}},{key:"keys",value:function(){return k($e(this).array.map(function(e){return e[0]}))}},{key:"values",value:function(){return k($e(this).array.map(function(e){return e[1]}))}},{key:f.iterator,value:function(){return this.entries()}},{key:"toString",value:function(){return"[object FormData]"}},{key:f.toStringTag,get:function(){return"FormData"}},{key:"__MPHTTPX__",get:function(){return{chain:["FormData"]}}}])}(),Ve=r(function e(){t(this,e),this.array=[]});function $e(e){return e.__FormData__}function Je(e,t,n){return w(e,t,"FormData",n)}function Ke(e,t,n){if(ge(t)){if(n=void 0!==n?""+n:"string"==typeof t.name?t.name:"blob",t.name!==n||ge(t,!0))t=new(m("Blob",t)?we:Te)([t],n);return[""+e,t]}return[""+e,""+t]}function Ye(e,t){var n="undefined"!=typeof Element&&Element&&Element.prototype;return n&&!n.matches&&(n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector||function(e){for(var t=(this.ownerDocument||this.document).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1}),!!n&&n.matches.call(e,t)}function Qe(e){return m("FormData",e)||function(e){var t="[object FormData]";return!!e&&"object"===c(e)&&"forEach"in e&&"function"==typeof e.forEach&&(Object.prototype.toString.call(e)===t||v(e)===t)}(e)}function Ze(e,t){var n=t||"----formdata-mphttpx-"+Math.random(),r="--".concat(n,'\r\nContent-Disposition: form-data; name="'),o=[],i=!0;return e.forEach(function(e,t){"string"==typeof e?o.push(r+nt(et(t))+'"\r\n\r\n'.concat(et(e),"\r\n")):(i&&m("Blob",e)&&(i=!1),o.push(r+nt(et(t))+'"; filename="'.concat(nt(e.name),'"\r\nContent-Type: ').concat(e.type||"application/octet-stream","\r\n\r\n"),e,"\r\n"))}),o.push("--".concat(n,"--")),new(i?me:fe)(o,{type:"multipart/form-data; boundary="+n})}function et(e){return e.replace(/\r?\n|\r/g,"\r\n")}function nt(e){return e.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")}function rt(e){if(e&&/multipart\/form-data/i.test(e)){var t=e.match(/boundary\s*=\s*([^;]+)/i);if(t&&t[1])return t[1].trim().replace(/^["']|["']$/g,"")}}var ot="undefined"!=typeof FormData&&FormData||We,it=function(){return r(function e(n,r){if(t(this,e),this._type="",r&&(this.type=r),"string"==typeof n)this.promise=Promise.resolve(n),this.type="text/plain;charset=UTF-8",this.calcLength=function(){return ue(n).length};else if(ze(n)){var o=n.toString();this.promise=Promise.resolve(o),this.type="application/x-www-form-urlencoded;charset=UTF-8",this.calcLength=function(){return ue(o).length}}else if(A(n))this.promise=Promise.resolve(n.slice(0)),this.length=n.byteLength;else if(ArrayBuffer.isView(n)){var i=n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength);this.promise=Promise.resolve(i),this.length=i.byteLength}else if(ge(n))this.promise=n.arrayBuffer(),this.type=n.type,this.length=n.size;else if(Qe(n)){var a=Ze(n,r?rt(r):void 0);this.promise=a.arrayBuffer(),this.type=a.type,this.length=a.size}else if(null==n)this.promise=Promise.resolve(""),this.length=0;else{var s=""+n;this.promise=Promise.resolve(s),this.type="text/plain;charset=UTF-8",this.calcLength=function(){return ue(s).length}}},[{key:"type",get:function(){return this._type},set:function(e){this._type||(this._type=e)}},{key:"size",get:function(){var e;return"number"!=typeof this.length&&this.calcLength&&(this.length=this.calcLength()),null!==(e=this.length)&&void 0!==e?e:0}},{key:"text",value:function(){return this.promise.then(function(e){return"string"==typeof e?e:ce(e)})}},{key:"arrayBuffer",value:function(){return this.promise.then(function(e){return A(e)?e:ue(e).buffer})}}])}(),at=function(){return r(function e(){if(t(this,e),this.constructor===e)throw new TypeError("Failed to construct 'Body': Illegal constructor");y(this,"__Body__",new st)},[{key:"bodyUsed",get:function(){return ut(this).bodyUsed}},{key:"body",get:function(){throw new TypeError("Failed to access 'body' on '".concat(p(this),"': property not implemented."))}},{key:"arrayBuffer",value:function(){var e="arrayBuffer";return ht(this,e)||lt(this,e)}},{key:"blob",value:function(){var e="blob";return ht(this,e)||lt(this,e)}},{key:"bytes",value:function(){var e="bytes";return ht(this,e)||lt(this,e)}},{key:"formData",value:function(){var e="formData";return ht(this,e)||lt(this,e)}},{key:"json",value:function(){var e="json";return ht(this,e)||lt(this,e)}},{key:"text",value:function(){var e="text";return ht(this,e)||lt(this,e)}},{key:"toString",value:function(){return"[object Body]"}},{key:f.toStringTag,get:function(){return"Body"}},{key:"__MPHTTPX__",get:function(){return{chain:["Body"]}}}])}(),st=r(function e(){t(this,e),this.bodyUsed=!1});function ut(e){return e.__Body__}function ct(e,t){var n=e;if(function(e){var t="[object ReadableStream]";return!!e&&"object"===c(e)&&"getReader"in e&&"function"==typeof e.getReader&&(Object.prototype.toString.call(e)===t||v(e)===t)}(t))throw new TypeError("Failed to construct '".concat(p(n),"': ReadableStream not implemented."));null!=t&&(ut(n).payload=new it(t))}function lt(e,t){var n=ut(e).payload||new it;return"json"===t?n.text().then(function(e){return JSON.parse(e)}):"text"===t?n.text():"arrayBuffer"===t?n.arrayBuffer():"bytes"===t?n.arrayBuffer().then(function(e){return new Uint8Array(e)}):"blob"===t?n.promise.then(function(e){return new me([e])}):"formData"===t?n.text().then(function(e){return function(e,t){var n=function(){throw new TypeError("Could not parse content as FormData.")};"string"==typeof e&&""!==e.trim()||n();var r=e.indexOf("\r\n");-1===r&&n();var o=e.substring(2,r).trim();o||n(),void 0!==t&&t!==o&&n();var i=e.split("--".concat(o)).filter(function(e){var t=e.trim();return""!==t&&"--"!==t});0===i.length&&n();var a=[],s=!1;i.forEach(function(e){var t=e.indexOf("\r\n\r\n");-1===t&&n();var r=e.substring(0,t).trim(),o=r.match(/name="([^"]*)"/);(!o||o.length<2)&&n();var i=o[1],u=r.match(/filename="([^"]*)"/),c=e.substring(t+4);if(u){var l=u[1]||"",f=r.match(/Content-Type: ([^\r\n]+)/),h=f?(f[1]||"").trim():"text/plain",d=c.replace(/\r\n/g,"");s=!0,a.push([i,new Te([d],l,{type:h})])}else a.push([i,c.replace(/^[\r\n]+|[\r\n]+$/g,"")])});var u=new(!s||function(){try{var e=new ot;return e.append("file",new Te([],"")),"string"!=typeof e.get("file")}catch(e){return!1}}()?ot:We);return a.forEach(function(e){u.append(e[0],e[1])}),u}(e,rt(n.type))}):n.promise}function ht(e,t){if(ut(e).payload){if(e.bodyUsed)return Promise.reject(new TypeError("Failed to execute '".concat(t,"' on '").concat(p(e),"': body stream already read")));ut(e).bodyUsed=!0}}var dt=function(){return r(function e(n){if(t(this,e),y(this,"__Headers__",new pt),void 0!==n)if(bt(n))n.forEach(function(e,t){vt(this,t,e,"")}.bind(this),this);else if(_(n))for(var r=Array.isArray(n)?n:Array.from(n),o=0;o<r.length;++o){var i=r[o];if(!_(i))throw new TypeError("Failed to construct 'Headers': The provided value cannot be converted to a sequence.");var a=Array.isArray(i)?i:Array.from(i);if(2!==a.length)throw new TypeError("Failed to construct 'Headers': Invalid value");vt(this,a[0],a[1])}else{if(!n||"object"!==c(n))throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(record<ByteString, ByteString> or sequence<sequence<ByteString>>)'.");Object.getOwnPropertyNames(n).forEach(function(e){vt(this,e,n[e])}.bind(this),this)}},[{key:"append",value:function(e,t){mt(arguments.length,2,"append"),vt(this,e,t,"append")}},{key:"delete",value:function(e){mt(arguments.length,1,"delete"),delete yt(this).dict[_t(e,gt("delete"))]}},{key:"get",value:function(e){var t;return mt(arguments.length,1,"get"),null!==(t=yt(this).dict[_t(e,gt("get"))])&&void 0!==t?t:null}},{key:"getSetCookie",value:function(){var e=this.get("Set-Cookie");return e?e.split(", "):[]}},{key:"has",value:function(e){return mt(arguments.length,1,"has"),yt(this).dict.hasOwnProperty(_t(e,gt("has")))}},{key:"set",value:function(e,t){mt(arguments.length,2,"set"),yt(this).dict[_t(e,gt("set"))]=kt(t)}},{key:"forEach",value:function(e,t){if(mt(arguments.length,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.");for(var n=yt(this).dict,r=Object.getOwnPropertyNames(n),o=0;o<r.length;++o){var i=r[o];e.call(t,n[i],i,this)}}},{key:"entries",value:function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),k(e)}},{key:"keys",value:function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),k(e.map(function(e){return e[0]}))}},{key:"values",value:function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),k(e.map(function(e){return e[1]}))}},{key:f.iterator,value:function(){return this.entries()}},{key:"toString",value:function(){return"[object Headers]"}},{key:f.toStringTag,get:function(){return"Headers"}},{key:"__MPHTTPX__",get:function(){return{chain:["Headers"]}}}])}(),pt=r(function e(){t(this,e),this.dict={}});function yt(e){return e.__Headers__}function vt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"constructor",o=_t(t,r?gt(r):void 0),i=kt(n),a=yt(e).dict,s=a[o];a[o]=void 0!==s?"".concat(s,", ").concat(i):i}function gt(e){return function(){throw new TypeError("Failed to ".concat(e&&"constructor"!==e?"execute '"+e+"' on":"construct"," 'Headers': Invalid name"))}}function mt(e,t,n){w(e,t,"Headers",n)}function bt(e){return m("Headers",e)||function(e){var t="[object Headers]";return!!e&&"object"===c(e)&&"forEach"in e&&"function"==typeof e.forEach&&(Object.prototype.toString.call(e)===t||v(e)===t)}(e)}function _t(e,t){return"string"!=typeof e&&(e=""+e),t&&(/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)&&t(),e.toLowerCase()}function kt(e){return"string"==typeof e?e:""+e}function wt(e){var t=new Et;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substring(1,e.length):e}).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();try{t.append(r,o)}catch(e){console.warn("SyntaxError: Response.headers: '".concat(r,"' is not a valid HTTP header field name."))}}}),t}function Tt(e){if(m("Headers",e)&&Et!==dt){var t=new Et;return e.forEach(function(e,n){t.append(n,e)}),t}return new Et(e)}var Et="undefined"!=typeof Headers&&Headers||dt,St=function(n,o){function a(n,r){var o;t(this,a),w(arguments.length,1,"Request"),y(o=e(this,a),"__Request__",new xt);var i=Rt(o),s=null!=r?r:{};if("object"!==c(s))throw new TypeError("Failed to construct 'Request': The provided value is not of type 'RequestInit'.");var u,l=s.body,f=!1;if(m("Request",u=n)||function(e){var t="[object Request]";return!!e&&"object"===c(e)&&"arrayBuffer"in e&&"function"==typeof e.arrayBuffer&&(Object.prototype.toString.call(e)===t||v(e)===t)}(u)){if(n.bodyUsed)throw new TypeError("Failed to construct 'Request': Cannot construct a Request with a Request object that has already been used.");i.cache=n.cache,i.credentials=n.credentials,void 0===s.headers&&(Rt(o).headers=Tt(n.headers)),i.method=n.method,i.mode=n.mode,i.signal=n.signal,i.url=n.url,l||(o.__Body__.payload=Pt(n),f=!0)}else i.url=""+n;if(s.cache&&(i.cache=s.cache),s.credentials&&(i.credentials=s.credentials),void 0!==s.headers&&(Rt(o).headers=Tt(s.headers)),s.method&&(i.method=At(s.method)),s.mode&&(i.mode=s.mode),null!==s.signal&&void 0!==s.signal){if(!V(s.signal))throw new TypeError("Failed to construct 'Request': Failed to read the 'signal' property from 'RequestInit': Failed to convert value to 'AbortSignal'.");i.signal=s.signal}if(("GET"===o.method||"HEAD"===o.method)&&null!=l)throw new TypeError("Failed to construct 'Request': Request with GET/HEAD method cannot have body.");ct(o,f?null:l);var h=o.__Body__.payload;return!o.headers.has("Content-Type")&&h&&h.type&&o.headers.set("Content-Type",h.type),"GET"!==o.method&&"HEAD"!==o.method||"no-cache"!==o.cache&&"no-store"!==o.cache||function(e){var t=/([?&])_=[^&]*/;if(t.test(e.url))Rt(e).url=e.url.replace(t,"$1_="+(new Date).getTime());else{var n=/\?/;Rt(e).url+=(n.test(e.url)?"&":"?")+"_="+(new Date).getTime()}}(o),o}return i(a,at),r(a,[{key:"cache",get:function(){return Rt(this).cache}},{key:"credentials",get:function(){return Rt(this).credentials}},{key:"destination",get:function(){return""}},{key:"headers",get:function(){return Rt(this).headers||(Rt(this).headers=new Et),Rt(this).headers}},{key:"integrity",get:function(){return""}},{key:"keepalive",get:function(){return!1}},{key:"method",get:function(){return Rt(this).method}},{key:"mode",get:function(){return Rt(this).mode}},{key:"redirect",get:function(){return"follow"}},{key:"referrer",get:function(){return Rt(this).referrer}},{key:"referrerPolicy",get:function(){return""}},{key:"signal",get:function(){return Rt(this).signal||(Rt(this).signal=(new se).signal),Rt(this).signal}},{key:"url",get:function(){return Rt(this).url}},{key:"clone",value:function(){if(this.bodyUsed)throw new TypeError("Failed to execute 'clone' on 'Request': Request body is already used");var e=new a(this);return this.__Body__.bodyUsed=!1,e}},{key:"toString",value:function(){return"[object Request]"}},{key:o,get:function(){return"Request"}},{key:"__MPHTTPX__",get:function(){return{chain:["Request","Body"]}}}])}(0,f.toStringTag),xt=r(function e(){t(this,e),this.cache="default",this.credentials="same-origin",this.method="GET",this.mode="cors",this.referrer="about:client",this.url=""});function Rt(e){return e.__Request__}function Pt(e){var t=Object.create(it.prototype);t.type=e.headers.get("Content-Type")||"";try{t.promise=e.arrayBuffer()}catch(n){try{t.promise=e.text()}catch(n){if("multipart/form-data"===t.type.slice(0,19).toLowerCase())try{t.promise=e.formData().then(function(e){return new it(e,t.type).promise})}catch(e){}}}if(!t.promise)throw new TypeError("Failed to construct 'Request': Failed to read request body data, underlying data is in an invalid format.");return t}var Ct=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function At(e){var t=e.toUpperCase();return Ct.indexOf(t)>-1?t:e}var qt="undefined"!=typeof Request&&Request||St,Lt=function(n,o){function a(n,r){var o;t(this,a),y(o=e(this,a),"__Response__",new Ht);var i=Ot(o),s=null!=r?r:{};if("object"!==c(s))throw new TypeError("Failed to construct 'Response': The provided value is not of type 'ResponseInit'.");void 0!==s.headers&&(Ot(o).headers=Tt(s.headers));var u=void 0===s.status?200:s.status;if(u<200||u>599)throw new RangeError("Failed to construct 'Response': The status provided (".concat(+u,") is outside the range [200, 599]."));i.status=u,i.statusText=void 0===s.statusText?"":""+s.statusText,ct(o,n);var l=o.__Body__.payload;return!o.headers.has("Content-Type")&&l&&l.type&&o.headers.set("Content-Type",l.type),o}return i(a,at),r(a,[{key:"headers",get:function(){return Ot(this).headers||(Ot(this).headers=new Et),Ot(this).headers}},{key:"ok",get:function(){return this.status>=200&&this.status<300}},{key:"redirected",get:function(){return!1}},{key:"status",get:function(){return Ot(this).status}},{key:"statusText",get:function(){return Ot(this).statusText}},{key:"type",get:function(){return Ot(this).type}},{key:"url",get:function(){return Ot(this).url}},{key:"clone",value:function(){if(this.bodyUsed)throw new TypeError("Failed to execute 'clone' on 'Response': Response body is already used");var e=new a(null,{headers:Tt(this.headers),status:this.status,statusText:this.statusText});return Ot(e).url=this.url,e.__Body__.payload=this.__Body__.payload,e}},{key:"toString",value:function(){return"[object Response]"}},{key:o,get:function(){return"Response"}},{key:"__MPHTTPX__",get:function(){return{chain:["Response","Body"]}}}],[{key:"json",value:function(e,t){w(arguments.length,1,"Response","json");var n=new a("string"==typeof e?e:JSON.stringify(e),t);return n.headers.set("Content-Type","application/json"),n}},{key:"error",value:function(){var e=new a(null,{status:200,statusText:""});return Ot(e).status=0,Ot(e).type="error",e}},{key:"redirect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:302;if(w(arguments.length,1,"Response","redirect"),-1===[301,302,303,307,308].indexOf(t))throw new RangeError("Failed to execute 'redirect' on 'Response': Invalid status code");return new a(null,{status:t,headers:{location:""+e}})}}])}(0,f.toStringTag),Ht=r(function e(){t(this,e),this.status=200,this.statusText="",this.type="default",this.url=""});function Ot(e){return e.__Response__}var jt="undefined"!=typeof Response&&Response||Lt,Mt={XMLHttpRequest:"undefined"!=typeof XMLHttpRequest&&XMLHttpRequest||void 0};function Ft(e){Mt.XMLHttpRequest=e}function Ut(e,t){if(w(arguments.length,1,"Window","fetch"),this instanceof Ut)throw new TypeError("fetch is not a constructor");return new Promise(function(n,r){var o=new St(e,t),i=o.__Request__.signal;if(i&&i.aborted)return r(i.reason);var a,s=new(Mt.XMLHttpRequest||function(){throw new ReferenceError("XMLHttpRequest is not defined")}()),u=!1,l=o.__Body__.payload;if(s.onload=function(){var e={headers:wt(s.getAllResponseHeaders()||""),status:s.status,statusText:s.statusText};0===o.url.indexOf("file://")&&(s.status<200||s.status>599)&&(e.status=200),setTimeout(function(){(a=new Lt("response"in s?s.response:s.responseText,e)).__Response__.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL")||"";var t=a.__Body__.payload,o=a.headers.get("Content-Type")||"";t&&o&&(t.type=o),u?r(Dt()):n(a)},0)},s.onabort=function(){setTimeout(function(){r(Dt())},0)},s.onerror=function(){setTimeout(function(){r(new TypeError("Failed to fetch"))},0)},s.ontimeout=function(){setTimeout(function(){r(new d("The request timed out.","TimeoutError"))},0)},s.open(o.method,Nt(o.url),!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&(s.responseType="arraybuffer"),t&&"object"===c(t)&&t.headers&&"object"===c(t.headers)&&!bt(t.headers)){var f=t.headers,h=[];Object.getOwnPropertyNames(f).forEach(function(e){h.push(_t(e)),s.setRequestHeader(e,kt(f[e]))}),o.headers.forEach(function(e,t){-1===h.indexOf(t)&&s.setRequestHeader(t,e)})}else o.headers.forEach(function(e,t){s.setRequestHeader(t,e)});if(i){var p=function(){a&&!a.bodyUsed&&((a.__Body__.payload=new it).promise=Promise.reject(Dt()));u=!0,s.abort(),y()},y=function(){i.removeEventListener("abort",p)};i.addEventListener("abort",p),s.onreadystatechange=function(){4===s.readyState&&y()}}l?l.promise.then(function(e){u?r(Dt()):s.send(""!==e?e:void 0)}).catch(function(e){r(new TypeError("Failed to fetch")),console.error(e)}):s.send()})}function Dt(){return new d("The user aborted a request.","AbortError")}var Bt="undefined"!=typeof location&&!!location,Nt=function(e){return""===e&&Bt&&(null===location||void 0===location?void 0:location.href)?location.href:e},It="undefined"!=typeof fetch&&fetch||Ut,Xt={value:!1};var zt,Gt,Wt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $t,Jt,Kt,Yt={};var Qt,Zt=function(){if(Kt)return Jt;Kt=1;var e=Gt?zt:(Gt=1,zt=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}),t=function(){if($t)return Yt;$t=1;var e=Object.prototype.hasOwnProperty;function t(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function n(e){try{return encodeURIComponent(e)}catch(e){return null}}return Yt.stringify=function(t,r){r=r||"";var o,i,a=[];for(i in"string"!=typeof r&&(r="?"),t)if(e.call(t,i)){if((o=t[i])||null!=o&&!isNaN(o)||(o=""),i=n(i),o=n(o),null===i||null===o)continue;a.push(i+"="+o)}return a.length?r+a.join("&"):""},Yt.parse=function(e){for(var n,r=/([^=?#&]+)=?([^&]*)/g,o={};n=r.exec(e);){var i=t(n[1]),a=t(n[2]);null===i||null===a||i in o||(o[i]=a)}return o},Yt}(),n=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r=/[\n\r\t]/g,o=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,i=/:\d+$/,a=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,s=/^[a-zA-Z]:/;function u(e){return(e||"").toString().replace(n,"")}var l=[["#","hash"],["?","query"],function(e,t){return d(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],f={hash:1,query:1};function h(e){var t,n=("undefined"!=typeof window?window:void 0!==Wt?Wt:"undefined"!=typeof self?self:{}).location||{},r={},i=c(e=e||n);if("blob:"===e.protocol)r=new y(unescape(e.pathname),{});else if("string"===i)for(t in r=new y(e,{}),f)delete r[t];else if("object"===i){for(t in e)t in f||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=o.test(e.href))}return r}function d(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function p(e,t){e=(e=u(e)).replace(r,""),t=t||{};var n,o=a.exec(e),i=o[1]?o[1].toLowerCase():"",s=!!o[2],c=!!o[3],l=0;return s?c?(n=o[2]+o[3]+o[4],l=o[2].length+o[3].length):(n=o[2]+o[4],l=o[2].length):c?(n=o[3]+o[4],l=o[3].length):n=o[4],"file:"===i?l>=2&&(n=n.slice(2)):d(i)?n=o[4]:i?s&&(n=n.slice(2)):l>=2&&d(t.protocol)&&(n=o[4]),{protocol:i,slashes:s||d(i),slashesCount:l,rest:n}}function y(n,o,i){if(n=(n=u(n)).replace(r,""),!(this instanceof y))return new y(n,o,i);var a,f,v,g,m,b,_=l.slice(),k=c(o),w=this,T=0;for("object"!==k&&"string"!==k&&(i=o,o=null),i&&"function"!=typeof i&&(i=t.parse),a=!(f=p(n||"",o=h(o))).protocol&&!f.slashes,w.slashes=f.slashes||a&&o.slashes,w.protocol=f.protocol||o.protocol||"",n=f.rest,("file:"===f.protocol&&(2!==f.slashesCount||s.test(n))||!f.slashes&&(f.protocol||f.slashesCount<2||!d(w.protocol)))&&(_[3]=[/(.*)/,"pathname"]);T<_.length;T++)"function"!=typeof(g=_[T])?(v=g[0],b=g[1],v!=v?w[b]=n:"string"==typeof v?~(m="@"===v?n.lastIndexOf(v):n.indexOf(v))&&("number"==typeof g[2]?(w[b]=n.slice(0,m),n=n.slice(m+g[2])):(w[b]=n.slice(m),n=n.slice(0,m))):(m=v.exec(n))&&(w[b]=m[1],n=n.slice(0,m.index)),w[b]=w[b]||a&&g[3]&&o[b]||"",g[4]&&(w[b]=w[b].toLowerCase())):n=g(n,w);i&&(w.query=i(w.query)),a&&o.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==o.pathname)&&(w.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,o=n[r-1],i=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(i=!0),n.splice(r,1),a--);return i&&n.unshift(""),"."!==o&&".."!==o||n.push(""),n.join("/")}(w.pathname,o.pathname)),"/"!==w.pathname.charAt(0)&&d(w.protocol)&&(w.pathname="/"+w.pathname),e(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(m=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,m),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(m+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&d(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}return y.prototype={set:function(n,r,o){var a=this;switch(n){case"query":"string"==typeof r&&r.length&&(r=(o||t.parse)(r)),a[n]=r;break;case"port":a[n]=r,e(r,a.protocol)?r&&(a.host=a.hostname+":"+r):(a.host=a.hostname,a[n]="");break;case"hostname":a[n]=r,a.port&&(r+=":"+a.port),a.host=r;break;case"host":a[n]=r,i.test(r)?(r=r.split(":"),a.port=r.pop(),a.hostname=r.join(":")):(a.hostname=r,a.port="");break;case"protocol":a.protocol=r.toLowerCase(),a.slashes=!o;break;case"pathname":case"hash":if(r){var s="pathname"===n?"/":"#";a[n]=r.charAt(0)!==s?s+r:r}else a[n]=r;break;case"username":case"password":a[n]=encodeURIComponent(r);break;case"auth":var u=r.indexOf(":");~u?(a.username=r.slice(0,u),a.username=encodeURIComponent(decodeURIComponent(a.username)),a.password=r.slice(u+1),a.password=encodeURIComponent(decodeURIComponent(a.password))):a.username=encodeURIComponent(decodeURIComponent(r))}for(var c=0;c<l.length;c++){var f=l[c];f[4]&&(a[f[1]]=a[f[1]].toLowerCase())}return a.auth=a.password?a.username+":"+a.password:a.username,a.origin="file:"!==a.protocol&&d(a.protocol)&&a.host?a.protocol+"//"+a.host:"null",a.href=a.toString(),a},toString:function(e){e&&"function"==typeof e||(e=t.stringify);var n,r=this,o=r.host,a=r.protocol;a&&":"!==a.charAt(a.length-1)&&(a+=":");var s=a+(r.protocol&&r.slashes||d(r.protocol)?"//":"");return r.username?(s+=r.username,r.password&&(s+=":"+r.password),s+="@"):r.password?(s+=":"+r.password,s+="@"):"file:"!==r.protocol&&d(r.protocol)&&!o&&"/"!==r.pathname&&(s+="@"),(":"===o[o.length-1]||i.test(r.hostname)&&!r.port)&&(o+=":"),s+=o+r.pathname,(n="object"===c(r.query)?e(r.query):r.query)&&(s+="?"!==n.charAt(0)?"?"+n:n),r.hash&&(s+=r.hash),s}},y.extractProtocol=p,y.location=h,y.trimLeft=u,y.qs=t,Jt=y}(),en=Vt(Zt),tn={exports:{}};var nn=Vt((Qt||(Qt=1,function(e){e.exports.is_uri=n,e.exports.is_http_uri=r,e.exports.is_https_uri=o,e.exports.is_web_uri=i,e.exports.isUri=n,e.exports.isHttpUri=r,e.exports.isHttpsUri=o,e.exports.isWebUri=i;var t=function(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)};function n(e){if(e&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)&&!/%[^0-9a-f]/i.test(e)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)){var n,r,o,i,a,s="",u="";if(s=(n=t(e))[1],r=n[2],o=n[3],i=n[4],a=n[5],s&&s.length&&o.length>=0){if(r&&r.length){if(0!==o.length&&!/^\//.test(o))return}else if(/^\/\//.test(o))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(s.toLowerCase()))return u+=s+":",r&&r.length&&(u+="//"+r),u+=o,i&&i.length&&(u+="?"+i),a&&a.length&&(u+="#"+a),u}}}function r(e,r){if(n(e)){var o,i,a,s,u="",c="",l="",f="";if(u=(o=t(e))[1],c=o[2],i=o[3],a=o[4],s=o[5],u){if(r){if("https"!=u.toLowerCase())return}else if("http"!=u.toLowerCase())return;if(c)return/:(\d+)$/.test(c)&&(l=c.match(/:(\d+)$/)[0],c=c.replace(/:\d+$/,"")),f+=u+":",f+="//"+c,l&&(f+=l),f+=i,a&&a.length&&(f+="?"+a),s&&s.length&&(f+="#"+s),f}}}function o(e){return r(e,!0)}function i(e){return r(e)||o(e)}}(tn)),tn.exports)),rn={value:null};function on(e){return!!e&&"object"===c(e)&&"function"==typeof(null==e?void 0:e.request)}function an(){if(null!==rn.value)return rn.value;var e="undefined";return rn.value=("undefined"==typeof wx?"undefined":c(wx))!==e&&on(wx)&&{mp:wx,name:"WeChat"}||("undefined"==typeof my?"undefined":c(my))!==e&&on(my)&&{mp:my,name:"Alipay"}||("undefined"==typeof qq?"undefined":c(qq))!==e&&on(qq)&&{mp:qq,name:"QQ"}||("undefined"==typeof jd?"undefined":c(jd))!==e&&on(jd)&&{mp:jd,name:"JD"}||("undefined"==typeof swan?"undefined":c(swan))!==e&&on(swan)&&{mp:swan,name:"Baidu"}||("undefined"==typeof tt?"undefined":c(tt))!==e&&on(tt)&&{mp:tt,name:"ByteDance"}||("undefined"==typeof ks?"undefined":c(ks))!==e&&on(ks)&&{mp:ks,name:"Kwai"}||("undefined"==typeof qh?"undefined":c(qh))!==e&&on(qh)&&{mp:qh,name:"Qihu"}||("undefined"==typeof xhs?"undefined":c(xhs))!==e&&on(xhs)&&{mp:xhs,name:"RedNote"}||("undefined"==typeof dd?"undefined":c(dd))!==e&&(on(dd)||"function"==typeof(null===dd||void 0===dd?void 0:dd.httpRequest))&&{mp:dd,name:"DingTalk"}||("undefined"==typeof bl?"undefined":c(bl))!==e&&on(bl)&&{mp:bl,name:"BiliBili"}||("undefined"==typeof ft?"undefined":c(ft))!==e&&on(ft)&&{mp:ft,name:"FinClip"}||("undefined"==typeof has?"undefined":c(has))!==e&&on(has)&&{mp:has,name:"HarmonyASCF"}||("undefined"==typeof uni?"undefined":c(uni))!==e&&on(uni)&&{mp:uni,name:"UniApp"}||("undefined"==typeof Taro?"undefined":c(Taro))!==e&&on(Taro)&&{mp:Taro,name:"Taro"}||void 0,rn.value}var sn=an();var un={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Content Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},cn=function(n,o){function a(){var n;if(t(this,a),(n=e(this,a)).constructor===a)throw new TypeError("Failed to construct 'XMLHttpRequestEventTarget': Illegal constructor");return y(n,"__XMLHttpRequestEventTarget__",new ln(n)),n}return i(a,B),r(a,[{key:"onabort",get:function(){return fn(this).onabort},set:function(e){fn(this).onabort=e,fn(this).attach("abort")}},{key:"onerror",get:function(){return fn(this).onerror},set:function(e){fn(this).onerror=e,fn(this).attach("error")}},{key:"onload",get:function(){return fn(this).onload},set:function(e){fn(this).onload=e,fn(this).attach("load")}},{key:"onloadend",get:function(){return fn(this).onloadend},set:function(e){fn(this).onloadend=e,fn(this).attach("loadend")}},{key:"onloadstart",get:function(){return fn(this).onloadstart},set:function(e){fn(this).onloadstart=e,fn(this).attach("loadstart")}},{key:"onprogress",get:function(){return fn(this).onprogress},set:function(e){fn(this).onprogress=e,fn(this).attach("progress")}},{key:"ontimeout",get:function(){return fn(this).ontimeout},set:function(e){fn(this).ontimeout=e,fn(this).attach("timeout")}},{key:"toString",value:function(){return"[object XMLHttpRequestEventTarget]"}},{key:o,get:function(){return"XMLHttpRequestEventTarget"}},{key:"__MPHTTPX__",get:function(){return{chain:["XMLHttpRequestEventTarget","EventTarget"]}}}])}(0,f.toStringTag),ln=r(function e(n){var r;t(this,e),this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.attach=G(n,(r=n,{onabort:function(e){W(r,r.onabort,e)},onerror:function(e){W(r,r.onerror,e)},onload:function(e){W(r,r.onload,e)},onloadend:function(e){W(r,r.onloadend,e)},onloadstart:function(e){W(r,r.onloadstart,e)},onprogress:function(e){W(r,r.onprogress,e)},ontimeout:function(e){W(r,r.ontimeout,e)}}))});function fn(e){return e.__XMLHttpRequestEventTarget__}var hn=function(n,o){function a(){var n;if(t(this,a),(n=e(this,a)).constructor===a)throw new TypeError("Failed to construct 'XMLHttpRequestUpload': Illegal constructor");return n}return i(a,cn),r(a,[{key:"toString",value:function(){return"[object XMLHttpRequestUpload]"}},{key:o,get:function(){return"XMLHttpRequestUpload"}},{key:"__MPHTTPX__",get:function(){return{chain:["XMLHttpRequestUpload","XMLHttpRequestEventTarget","EventTarget"]}}}])}(0,f.toStringTag);var dn={request:function(e){return e&&(e.mp.request||e.mp.httpRequest)}(sn)||function(e){var t="NOT_SUPPORTED_ERR",n={errMsg:t,errno:9,exception:{retryCount:0,reasons:[{errMsg:t,errno:9}]},useHttpDNS:!1};throw Promise.resolve(n).then(function(t){try{e.fail&&e.fail(t)}catch(e){console.error(e)}e.complete&&e.complete(t)}),new ReferenceError("request is not defined")}};function pn(e){dn.request=e}var yn={get:null,set:null},vn=function(n,o){function a(){var n;return t(this,a),y(n=e(this,a),"__XMLHttpRequest__",new gn(n)),n}return i(a,cn),r(a,[{key:"UNSENT",get:function(){return 0}},{key:"OPENED",get:function(){return 1}},{key:"HEADERS_RECEIVED",get:function(){return 2}},{key:"LOADING",get:function(){return 3}},{key:"DONE",get:function(){return 4}},{key:"readyState",get:function(){return mn(this).readyState}},{key:"response",get:function(){return mn(this).response}},{key:"responseText",get:function(){return mn(this).responseText}},{key:"responseType",get:function(){return mn(this).responseType},set:function(e){if(mn(this).pos>9)throw new d("Failed to set the 'responseType' property on 'XMLHttpRequest': The response type cannot be set if the object's state is LOADING or DONE.","InvalidStateError");_n.indexOf(e)>-1&&(mn(this).responseType=e)}},{key:"responseURL",get:function(){return mn(this).responseURL}},{key:"responseXML",get:function(){return null}},{key:"status",get:function(){return mn(this).status}},{key:"statusText",get:function(){return mn(this).pos<9?"":mn(this).statusText||un[this.status]||"unknown"}},{key:"timeout",get:function(){return mn(this).timeout},set:function(e){mn(this).timeout=e>=0?e:0}},{key:"upload",get:function(){var e;return mn(this).upload||(mn(this).upload=(y(e=Object.create(hn.prototype),"__EventTarget__",{executors:[]}),y(e,"__XMLHttpRequestEventTarget__",new ln(e)),e)),mn(this).upload}},{key:"withCredentials",get:function(){return mn(this).withCredentials},set:function(e){if(!(mn(this).pos<2))throw new TypeError("Failed to set the 'withCredentials' property on 'XMLHttpRequest': The value may only be set if the object's state is UNSENT or OPENED.");mn(this).withCredentials=!!e}},{key:"abort",value:function(){var e=mn(this),t=e.requestTask;switch(e.pos){case 1:e.requestHeaders=new Et;break;case 2:case 3:!function(e){mn(e).pos=5,xn(e,4),mn(e).upload&&Pe(e.upload,"abort");Cn(e,"abort")}(this),Pn(this);break;case 4:case 8:case 9:case 10:An(this);case 11:Pn(this)}wn(e),Rn(t)}},{key:"getAllResponseHeaders",value:function(){var e=mn(this).responseHeaders;if(!e)return"";var t=[];return e.forEach(function(e,n){t.push("".concat(n,": ").concat(e,"\r\n"))}),t.join("")}},{key:"getResponseHeader",value:function(e){return w(arguments.length,1,"XMLHttpRequest","getResponseHeader"),mn(this).responseHeaders?mn(this).responseHeaders.get(e):null}},{key:"open",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;w(arguments.length,2,"XMLHttpRequest","open"),n||console.warn("Synchronous XMLHttpRequest is not supported because of its detrimental effects to the end user's experience.");var i,a=At(e),s=""+t,u=""+(null!=r?r:""),c=""+(null!=o?o:""),l=mn(this);if(wn(l),l.method=a,l.requestURL=s,l.requestHeaders=new Et,u.length>0||c.length>0){var f="Basic ".concat(je(ue(u+":"+c)));this.setRequestHeader("Authorization",f)}mn(i=this).pos=1,mn(i).requestId+=1,xn(i,1)}},{key:"overrideMimeType",value:function(e){w(arguments.length,1,"XMLHttpRequest","overrideMimeType"),1===mn(this).pos&&console.error("TypeError: Failed to execute 'overrideMimeType' on 'XMLHttpRequest': mimeType ('".concat(e,"') not implemented."))}},{key:"send",value:function(e){var t=mn(this),n=t.requestId;if(1!==t.pos)throw new d("Failed to execute 'send' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");var r={url:t.requestURL,method:t.method,header:bn(t.requestHeaders),dataType:"json"===this.responseType?"json":kn(this.responseType),responseType:kn(this.responseType),withCredentials:this.withCredentials,success:En.bind(this,n),fail:Sn.bind(this,n)};if(yn.get&&!t.requestHeaders.has("cookie")){var o=yn.get(r.url,this.withCredentials);o&&(r.enableCookie=!0,r.header.Cookie=o)}var i="GET"!==t.method&&"HEAD"!==t.method&&null!=e&&new it(e);i&&i.type&&!t.requestHeaders.has("Content-Type")&&(r.header["Content-Type"]=i.type);var a=function(e){n===t.requestId&&(2!==t.pos&&8!==t.pos||(r.data=""!==e?e:void 0,r.headers=r.header,t.requestTask=dn.request(r)))}.bind(this);!function(e){if(!e.timeout)return;var t=mn(e),n=function(){switch(t.pos){case 2:case 3:!function(e){mn(e).pos=7,xn(e,4),mn(e).upload&&Pe(e.upload,"timeout");Cn(e,"timeout")}(e);break;case 8:Ln(e)}};t.timeoutId=setTimeout(function(){var e=t.requestTask;n(),Rn(e)},e.timeout)}(this);var s=function(e,t){return mn(e).pos=2,Pe(e,"loadstart"),t&&function(e,t){var n=mn(e),r=n.requestId;if(2!==n.pos)return;n.pos=3,n.upload&&Pe(e.upload,"loadstart",0,t.size);return t.promise.then(function(o){if(r===n.requestId)return function(e,t,n){var r=mn(e);if(3!==r.pos)return;r.pos=4,r.upload&&t.size>0&&Pe(e.upload,"load",t.size,t.size);return Cn(e,"load",{payload:t,data:n})}(e,t,o)}).catch(function(t){r===n.requestId&&(!function(e){var t=mn(e);if(3!==t.pos)return;t.pos=6,xn(e,4),t.upload&&Pe(e.upload,"error");Cn(e,"error")}(e),console.error(t))})}(e,t)}(this,i||void 0);s?s.then(function(e){void 0!==e&&a(e)}):a()}},{key:"setRequestHeader",value:function(e,t){if(w(arguments.length,2,"XMLHttpRequest","setRequestHeader"),1!==mn(this).pos)throw new d("Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");var n=""+e,r=""+t;try{mn(this).requestHeaders.append(n,r)}catch(e){throw new SyntaxError("Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '".concat(n,"' is not a valid HTTP header field name."))}}},{key:"onreadystatechange",get:function(){return mn(this).onreadystatechange},set:function(e){mn(this).onreadystatechange=e,mn(this).attach("readystatechange")}},{key:"toString",value:function(){return"[object XMLHttpRequest]"}},{key:o,get:function(){return"XMLHttpRequest"}},{key:"__MPHTTPX__",get:function(){return{chain:["XMLHttpRequest","XMLHttpRequestEventTarget","EventTarget"]}}}],[{key:"UNSENT",get:function(){return 0}},{key:"OPENED",get:function(){return 1}},{key:"HEADERS_RECEIVED",get:function(){return 2}},{key:"LOADING",get:function(){return 3}},{key:"DONE",get:function(){return 4}}])}(0,f.toStringTag),gn=r(function e(n){var r;t(this,e),this.pos=0,this.readyState=0,this.response="",this.responseText="",this.responseType="",this.responseURL="",this.status=0,this.statusText="",this.timeout=0,this.withCredentials=!1,this.method="GET",this.requestURL="",this.requestHeaders=null,this.responseHeaders=null,this.timeoutId=0,this.requestId=0,this.requestTask=null,this.onreadystatechange=null,this.attach=G(n,(r=n,{onreadystatechange:function(e){W(r,r.onreadystatechange,e)}}))});function mn(e){return e.__XMLHttpRequest__}function bn(e){var t={};return e.forEach(function(e,n){t[n]=e}),t}var _n=["","arraybuffer","blob","document","json","text"];function kn(e){return"blob"===e||"arraybuffer"===e?"arraybuffer":"text"}function wn(e){e.requestTask=null,Tn(e),e.response="",e.responseText="",e.responseURL="",e.status=0,e.statusText="",e.requestHeaders=null,e.responseHeaders=null}function Tn(e){e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=0)}function En(e,t){e===mn(this).requestId&&function(e,t){var n=mn(e);if(2!==n.pos&&8!==n.pos)return;if(n.pos=9,n.responseURL=n.requestURL,n.status="statusCode"in t?t.statusCode:"status"in t?t.status:200,n.responseHeaders=new Et("header"in t?t.header:"headers"in t?t.headers:{}),yn.set){var r="cookies"in t&&Array.isArray(t.cookies)?t.cookies:n.responseHeaders.get("Set-Cookie")||"";r.length>0&&yn.set(e.responseURL,e.withCredentials,r)}xn(e,2),function(e,t){if(9!==mn(e).pos)return;mn(e).pos=10,xn(e,3),function(e,t){var n=mn(e);if(10!==n.pos)return;n.pos=11;var r=function(){var r;n.response=function(e,t){var n="string"==typeof t||A(t)?t:JSON.stringify(t);switch(e){case"":case"text":return"string"==typeof n?n:ce(n);case"arraybuffer":return A(n)?n:ue(n).buffer;case"json":return"string"==typeof t?JSON.parse(t):A(t)?JSON.parse(ce(t)):t;case"blob":return new me([n]);default:return n}}(e.responseType,null!==(r=t.data)&&void 0!==r?r:""),e.responseType&&"text"!==e.responseType||(n.responseText=e.response),xn(e,4),function(e){var t=mn(e);if(11!==t.pos)return;t.pos=12;var n=t.responseHeaders.get("Content-Length"),r=n&&parseInt(n)||0;Pe(e,"load",r,r),Hn(e,r)}(e)};try{r()}catch(t){qn(e),console.error(t)}}(e,t)}(e,t)}(this,t)}function Sn(e,t){if("header"in t&&"statusCode"in t||"headers"in t&&"status"in t)return En.call(this,e,{statusCode:"statusCode"in t?t.statusCode:t.status||0,header:"header"in t?t.header:t.headers||{},data:"data"in t&&t.data||""});e===mn(this).requestId&&qn(this,t)}function xn(e,t){if(e.readyState!==t){mn(e).readyState=t;var n=new L("readystatechange");n.__Event__.target=e,U(n,!0),z(e,n)}}function Rn(e){e&&"object"===c(e)&&"abort"in e&&"function"==typeof e.abort&&e.abort()}function Pn(e){mn(e).pos=0,mn(e).readyState=0}function Cn(e,t,n){var r=mn(e);if(("load"===t&&4===r.pos||"load"!==t)&&(r.pos=8),r.upload){var o=n?n.payload.size:0;Pe(e.upload,"loadend",o,o)}switch(t){case"load":return n&&n.data;case"abort":An(e);break;case"error":qn(e);break;case"timeout":Ln(e)}}function An(e){mn(e).pos=13,xn(e,4),Pe(e,"abort"),Hn(e)}function qn(e,t){var n=mn(e);switch(n.pos){case 2:case 8:case 11:break;default:return}n.pos=14,t&&(n.status=0,n.statusText="errMsg"in t?t.errMsg:"errorMessage"in t?t.errorMessage:""),xn(e,4),Pe(e,"error"),Hn(e)}function Ln(e){mn(e).pos=15,xn(e,4),Pe(e,"timeout"),Hn(e)}function Hn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=mn(e);n.pos=16,n.requestTask=null,Tn(n),Pe(e,"loadend",t,t)}var On="undefined"!=typeof XMLHttpRequest&&XMLHttpRequest||vn,jn={decodeValues:!0,map:!1,silent:!1,split:"auto"};function Mn(e){return"string"!=typeof e||e in{}}function Fn(){return Object.create(null)}function Un(e){return"string"==typeof e&&!!e.trim()}function Dn(e,t){var n=e.split(";").filter(Un),r=n.shift();if(!r)return null;var o=function(e){var t="",n="",r=e.split("=");r.length>1?(t=r.shift(),n=r.join("=")):n=e;return{name:t,value:n}}(r),i=o.name,a=o.value;if(t=t?Object.assign({},jn,t):jn,Mn(i))return null;try{a=t.decodeValues?decodeURIComponent(a):a}catch(e){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",e)}var s=Fn();return s.name=i,s.value=a,n.forEach(function(e){var t=e.split("="),n=t.shift().trim().toLowerCase();if(!Mn(n)){var r=t.join("=").trim();if("expires"===n)s.expires=new Date(r);else if("max-age"===n){var o=parseInt(r,10);Number.isNaN(o)||(s.maxAge=o)}else"secure"===n?s.secure=!0:"httponly"===n?s.httpOnly=!0:"samesite"===n?s.sameSite=r:"partitioned"===n?s.partitioned=!0:n&&(s[n]=r)}}),s}function Bn(e,t){if(t=t?Object.assign({},jn,t):jn,!e)return t.map?Fn():[];if(e.headers)if("function"==typeof e.headers.getSetCookie)e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var n=e.headers[Object.keys(e.headers).find(function(e){return"set-cookie"===e.toLowerCase()})];n||!e.headers.cookie||t.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=n}var r=t.split,o=Array.isArray(e);if("auto"===r&&(r=!o),o||(e=[e]),e=e.filter(Un),r&&(e=e.map(Nn).flat()),t.map){var i=Fn();return e.reduce(function(e,n){var r=Dn(n,t);return r&&!Mn(r.name)&&(e[r.name]=r),e},i)}return e.map(function(e){return Dn(e,t)}).filter(Boolean)}function Nn(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,n,r,o,i,a=[],s=0;function u(){for(;s<e.length&&/\s/.test(e.charAt(s));)s+=1;return s<e.length}function c(){return"="!==(n=e.charAt(s))&&";"!==n&&","!==n}for(;s<e.length;){for(t=s,i=!1;u();)if(","===(n=e.charAt(s))){for(r=s,s+=1,u(),o=s;s<e.length&&c();)s+=1;s<e.length&&"="===e.charAt(s)?(i=!0,s=o,a.push(e.substring(t,r)),t=s):s=r+1}else s+=1;(!i||s>=e.length)&&a.push(e.substring(t,e.length))}return a}Bn.parseSetCookie=Bn,Bn.parse=Bn,Bn.parseString=Dn,Bn.splitCookiesString=Nn;var In={url:new en("https://example.com")},Xn={value:null},zn=function(){return r(function e(){t(this,e),this.cookies=[],this.restore(),setTimeout(function(){this.persist()}.bind(this),0)},[{key:"storageKey",get:function(){return"__COOKIE_MPHTTPX__"}},{key:"restore",value:function(){if(sn){var e=function(){try{var e="Alipay"!==sn.name?sn.mp.getStorageSync(this.storageKey):sn.mp.getStorageSync({key:this.storageKey}).data,t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch(e){return[]}}.bind(this)();this.cookies=e.filter(function(e){return"object"===c(t=e)&&t&&"number"==typeof t._expires;var t}).map(function(e){var t=Wn(e);return t.expires=new Date(e._expires||0),t})}}},{key:"persist",value:function(){if(sn){var e=this.cookies.filter(function(e){return e.expires&&e.expires>new Date}).map(function(e){var t=Wn(e);return t._expires=e.expires.getTime(),t});sn.mp.setStorage({key:this.storageKey,data:JSON.stringify(e)})}}},{key:"getForUrl",value:function(e,t,n){var r=new en(Gn(t)),o=In.url.origin===r.origin;if(!e&&!o&&!n)return"";for(var i={valid:[],expired:[]},a=0;a<this.cookies.length;++a){var s=this.cookies[a];if(!e||!s.httpOnly){if(!e){if(!o&&s.sameSite&&"none"!==s.sameSite.toLowerCase())continue;if("127.0.0.1"!==r.hostname&&"localhost"!==r.hostname&&s.secure&&"https"!==r.protocol)continue}Jn(r.hostname,s.domain)&&Kn(r.pathname,s.path)&&(!s.expires||s.expires>new Date?i.valid.push(s):i.expired.push(s))}}return i.expired.length>0&&(this.cookies=this.cookies.filter(function(e){return!e.expires||e.expires>new Date}),setTimeout(function(){this.persist()}.bind(this),0)),i.valid.map(function(e){return e.name+"="+e.value}).join("; ")}},{key:"setForUrl",value:function(e,t,n,r){var o=this;if(r){var i=new en(Gn(t)),a=In.url.origin===i.origin;if(e||a||n){for(var s=e?Bn(""+r,{split:!1}):Bn(r),u=function(){var t=s[c];return t.name?e&&t.httpOnly||t.sameSite&&"none"===t.sameSite.toLowerCase()&&!t.secure?0:(t.domain?(t.domain=t.domain.toLowerCase(),t.domain.split(".").filter(function(e){return!!e}).length>=2&&(t.domain=Vn(t.domain))):t.domain=i.hostname,t.path||(t.path=i.pathname),"number"==typeof t.maxAge&&(t.expires=new Date((new Date).getTime()+1e3*t.maxAge)),void(Jn(i.hostname,t.domain)&&(o.cookies=o.cookies.filter(function(e){return r=t,!((n=e).domain===r.domain&&n.path===r.path&&n.name===r.name);var n,r}),(!t.expires||t.expires>new Date)&&(o.cookies=[t].concat(o.cookies))))):0},c=0;c<s.length;++c)u();this.cookies.sort(function(e,t){var n=Vn(e.domain),r=Vn(t.domain);if(n.length!==r.length)return r.length-n.length;var o=$n(e.path);return $n(t.path).length-o.length}),this.cookies=this.cookies.filter(function(e){return!e.expires||e.expires>new Date}),setTimeout(function(){this.persist()}.bind(this),0)}}}}])}();function Gn(e){return nn.isUri(e)?e:In.url.origin+("/"===e.substring(0,1)?"":"/")+e}function Wn(e){var t={name:e.name,value:e.value};return void 0!==e.domain&&(t.domain=e.domain),void 0!==e.path&&(t.path=e.path),void 0!==e.expires&&(t.expires=e.expires),void 0!==e.secure&&(t.secure=e.secure),void 0!==e.sameSite&&(t.sameSite=e.sameSite),void 0!==e.httpOnly&&(t.httpOnly=e.httpOnly),void 0!==e.partitioned&&(t.partitioned=e.partitioned),t}function Vn(e){return("."===e.substring(0,1)?"":".")+e}function $n(e){return e+("/"===e.slice(-1)?"":"/")}function Jn(e,t){if(t.split(".").filter(function(e){return!!e}).length<2)return e===t;var n=Vn(e),r=Vn(t);return n.slice(-r.length)===r}function Kn(e,t){var n=$n(e),r=$n(t);return n.slice(0,r.length)===r}var Yn=function(){Xn.value||(Xn.value=new zn);var e="undefined"!=typeof document&&document&&"cookie"in document;return{get:function(){return e?document.cookie:Xn.value.getForUrl(!0,In.url.href,!1)},set:function(t){e?document.cookie=t:Xn.value.setForUrl(!0,In.url.href,!1,t)}}}();var Qn=(Ft(On),[It,Ut]),Zn=Qn[0],er=Qn[1],tr=function(n,o){function a(n,r){var o;t(this,a),y(o=e(this,a,[n,r]),"__CloseEvent__",new nr);var i=rr(o),s=Number(null==r?void 0:r.code);return i.code=isNaN(s)?0:s,void 0!==(null==r?void 0:r.reason)&&(i.reason=""+r.reason),i.wasClean=!!(null==r?void 0:r.wasClean),o}return i(a,L),r(a,[{key:"code",get:function(){return rr(this).code}},{key:"reason",get:function(){return rr(this).reason}},{key:"wasClean",get:function(){return rr(this).wasClean}},{key:"toString",value:function(){return"[object CloseEvent]"}},{key:o,get:function(){return"CloseEvent"}},{key:"__MPHTTPX__",get:function(){return{chain:["CloseEvent","Event"]}}}])}(0,f.toStringTag),nr=r(function e(){t(this,e),this.code=0,this.reason="",this.wasClean=!1});function rr(e){return e.__CloseEvent__}var or=function(n,o){function a(n,r){var o,i;t(this,a),y(o=e(this,a,[n,r]),"__MessageEvent__",new ir);var s=ar(o);return s.data=null!==(i=null==r?void 0:r.data)&&void 0!==i?i:null,void 0!==(null==r?void 0:r.origin)&&(s.origin=""+r.origin),void 0!==(null==r?void 0:r.lastEventId)&&(s.lastEventId=""+r.lastEventId),void 0!==(null==r?void 0:r.source)&&(s.source=r.source),void 0!==(null==r?void 0:r.ports)&&(s.ports=r.ports),o}return i(a,L),r(a,[{key:"data",get:function(){return ar(this).data}},{key:"lastEventId",get:function(){return ar(this).lastEventId}},{key:"origin",get:function(){return ar(this).origin}},{key:"ports",get:function(){return ar(this).ports}},{key:"source",get:function(){return ar(this).source}},{key:"initMessageEvent",value:function(e,t,n,r,o,i,a,s){if(w(arguments.length,1,"MessageEvent","initMessageEvent"),!this.__Event__.eventDispatched){this.initEvent(e,t,n);var u=ar(this);u.data=null!=r?r:null,void 0!==o&&(u.origin=""+o),void 0!==i&&(u.lastEventId=""+i),void 0!==a&&(u.source=a),void 0!==s&&(u.ports=Array.from(s))}}},{key:"toString",value:function(){return"[object MessageEvent]"}},{key:o,get:function(){return"MessageEvent"}},{key:"__MPHTTPX__",get:function(){return{chain:["MessageEvent","Event"]}}}])}(0,f.toStringTag),ir=r(function e(){t(this,e),this.data=null,this.lastEventId="",this.origin="",this.ports=[],this.source=null});function ar(e){return e.__MessageEvent__}var sr=an();var ur={connectSocket:sr?sr.mp.connectSocket:function(e){return{send:function(e){},close:function(e){},onOpen:function(e){},onMessage:function(e){},onError:function(e){"function"==typeof e&&e({errMsg:"NOT_SUPPORTED_ERR"})},onClose:function(e){"function"==typeof e&&setTimeout(function(){e({code:3009,reason:"NOT_SUPPORTED_ERR"})},0)}}}};function cr(e){ur.connectSocket=e}var lr=function(n,o){function a(n,r){var o;t(this,a),w(arguments.length,1,"WebSocket"),o=e(this,a);var i=""+n,s={url:i,multiple:!0,fail:function(e){console.error(e)}};void 0!==r&&(s.protocols=_(r)?Array.isArray(r)?r:Array.from(r):[""+r]);var u,l,f=ur.connectSocket(s);if(y(o,"__WebSocket__",new fr(o,f)),hr(o).url=i,!f||"object"!==c(f))throw new Error("connectSocket can't establish a connection to the server at ".concat(i,"."));return(l=hr(u=o)).socketTask.onOpen(function(e){if("header"in e&&e.header&&"object"===c(e.header)){var t=new Et(e.header);l.protocol=t.get("Sec-WebSocket-Protocol")||""}l.readyState=1,dr(u,"open")}),function(e){var t=hr(e);t.socketTask.onClose(function(n){t.readyState=3;var r=new tr("close",{wasClean:!t.error,code:n.code,reason:n.reason});U(r,!0),z(e,r)})}(o),function(e){var t=hr(e);t.socketTask.onError(function(n){t.error=n,t.readyState=3,dr(e,"error"),console.error(n)})}(o),function(e){hr(e).socketTask.onMessage(function(t){var n,r=t.data;if(r&&"object"===c(r)&&"data"in r){if(n=r.data,"isBuffer"in r&&r.isBuffer&&"string"==typeof n)try{n=sr.mp.base64ToArrayBuffer(n)}catch(e){}}else n=r;A(n)&&"blob"===e.binaryType&&(n=new me([n]));var o=new or("message",{data:n,origin:e.url});U(o,!0),z(e,o)})}(o),o}return i(a,B),r(a,[{key:"CONNECTING",get:function(){return 0}},{key:"OPEN",get:function(){return 1}},{key:"CLOSING",get:function(){return 2}},{key:"CLOSED",get:function(){return 3}},{key:"binaryType",get:function(){return hr(this).binaryType},set:function(e){"blob"!==e&&"arraybuffer"!==e||(hr(this).binaryType=e)}},{key:"bufferedAmount",get:function(){return hr(this).bufferedAmount}},{key:"extensions",get:function(){return""}},{key:"protocol",get:function(){return hr(this).protocol}},{key:"readyState",get:function(){return hr(this).readyState}},{key:"url",get:function(){return hr(this).url}},{key:"close",value:function(e,t){var n=hr(this);2!==this.readyState&&3!==this.readyState&&(n.readyState=2,n.socketTask.close({code:e,reason:t,fail:function(e){console.error(e)},complete:function(){n.readyState=3}}))}},{key:"send",value:function(e){if(w(arguments.length,1,"WebSocket","send"),0===this.readyState)throw new d("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.","InvalidStateError");if(2===this.readyState||3===this.readyState)return console.error("WebSocket is already in CLOSING or CLOSED state.");var t=function(e){1===this.readyState&&hr(this).socketTask.send({data:e,fail:function(e){console.error(e)}})}.bind(this);if("string"!=typeof e&&!A(e)&&!ge(e)&&!ArrayBuffer.isView(e))return t(e);new it(e).promise.then(function(e){t(e)})}},{key:"onclose",get:function(){return hr(this).onclose},set:function(e){hr(this).onclose=e,hr(this).attach("close")}},{key:"onerror",get:function(){return hr(this).onerror},set:function(e){hr(this).onerror=e,hr(this).attach("error")}},{key:"onmessage",get:function(){return hr(this).onmessage},set:function(e){hr(this).onmessage=e,hr(this).attach("message")}},{key:"onopen",get:function(){return hr(this).onopen},set:function(e){hr(this).onopen=e,hr(this).attach("open")}},{key:"toString",value:function(){return"[object WebSocket]"}},{key:o,get:function(){return"WebSocket"}},{key:"__MPHTTPX__",get:function(){return{chain:["WebSocket","EventTarget"]}}}],[{key:"CONNECTING",get:function(){return 0}},{key:"OPEN",get:function(){return 1}},{key:"CLOSING",get:function(){return 2}},{key:"CLOSED",get:function(){return 3}}])}(0,f.toStringTag),fr=r(function e(n,r){var o;t(this,e),this.binaryType="blob",this.bufferedAmount=0,this.protocol="",this.readyState=0,this.url="",this.error=null,this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this.socketTask=r,this.attach=G(n,(o=n,{onclose:function(e){W(o,o.onclose,e)},onerror:function(e){W(o,o.onerror,e)},onmessage:function(e){W(o,o.onmessage,e)},onopen:function(e){W(o,o.onopen,e)}}))});function hr(e){return e.__WebSocket__}function dr(e,t){var n=new L(t);n.__Event__.target=e,U(n,!0),z(e,n)}var pr="undefined"!=typeof WebSocket&&WebSocket||lr;exports.AbortController=se,exports.AbortControllerP=ie,exports.AbortSignal=oe,exports.AbortSignalP=Z,exports.Blob=me,exports.BlobP=fe,exports.Cookie=Yn,exports.CustomEvent=Q,exports.CustomEventP=J,exports.Event=D,exports.EventP=L,exports.EventTarget=$,exports.EventTargetP=B,exports.File=Te,exports.FileP=we,exports.FileReader=Me,exports.FileReaderP=Ce,exports.FormData=ot,exports.FormDataP=We,exports.Headers=Et,exports.HeadersP=dt,exports.Request=qt,exports.RequestP=St,exports.Response=jt,exports.ResponseP=Lt,exports.TextDecoder=q,exports.TextDecoderP=R,exports.TextEncoder=S,exports.TextEncoderP=T,exports.URLSearchParams=Ge,exports.URLSearchParamsP=Fe,exports.WebSocket=pr,exports.WebSocketP=lr,exports.XMLHttpRequest=On,exports.XMLHttpRequestP=vn,exports.enableCookie=function(e){nn.isUri(e)&&(In.url=new en(e)),Xn.value||(Xn.value=new zn),yn.get||yn.set||(yn.get=zn.prototype.getForUrl.bind(Xn.value,!1),yn.set=zn.prototype.setForUrl.bind(Xn.value,!1))},exports.fetch=Zn,exports.fetchP=er,exports.fixFetch=function(e){var t=e||"undefined"!=typeof fetch&&fetch;if(!t||t===Ut)return Ut;if("__MPHTTPX__Polyfill__"in t)return t;function n(e,t){if(e.headers){if((f=e.headers)&&"object"===c(f)&&"has"in f&&"function"==typeof f.has&&"set"in f&&"function"==typeof f.set)e.headers.has("Content-Type")||e.headers.set("Content-Type",t);else if(_(e.headers)){for(var n=!1,r=Array.isArray(e.headers)?e.headers:Array.from(e.headers),o=0;o<r.length;++o){var i=r[o];if(_(i)){var a=Array.isArray(i)?i:Array.from(i);if(a.length>=2&&"content-type"===String(a[0]).toLowerCase()){n=!0;break}}}n||(r.push(["Content-Type",t]),e.headers=r)}else if("object"===c(e.headers)){for(var s=!1,u=Object.getOwnPropertyNames(e.headers),l=0;l<u.length;++l){if("content-type"===u[l].toLowerCase()){s=!0;break}}s||(e.headers["Content-Type"]=t)}}else e.headers={"Content-Type":t};var f}function r(e,r){if(m("Request",e)){var o=e,i=r||{};i.method||(i.method=o.method),i.headers||(i.headers=o.headers),i.mode||(i.mode=o.mode),i.cache||(i.cache=o.cache),i.credentials||(i.credentials=o.credentials),!i.signal&&o.__Request__.signal&&(i.signal=o.signal),i.body||(i.body=Pt(o)),e=o.url,r=i}if(r&&r.headers&&m("Headers",r.headers))if("undefined"!=typeof Headers&&Headers&&!("__MPHTTPX__"in Headers.prototype)){var a=new Headers;r.headers.forEach(function(e,t){a.append(t,e)}),r.headers=a}else{var s={};r.headers.forEach(function(e,t){s[t]=e}),r.headers=s}return new Promise(function(o,i){r&&r.body&&(Xt.value?Qe(r.body):m("FormData",r.body))&&(r.body=Ze(r.body));var a=r&&r.body&&((Xt.value?ge(r.body):m("Blob",r.body))&&new it(r.body)||it.prototype.isPrototypeOf(r.body)&&r.body);if(a){a.type&&n(r,a.type);var s=null,u=!1,l=!0;if(e&&"object"===c(e)&&"signal"in e&&V(e.signal)){var f=function(){l&&(u=!0),s()};s=function(){e.signal.removeEventListener("abort",f)},e.signal.addEventListener("abort",f)}a.promise.then(function(n){r.body=""!==n?n:null,u?i(new d("The user aborted a request.","AbortError")):o(t.call(this,e,r)),l=!1}.bind(this)).catch(function(e){i(new TypeError("Failed to fetch")),l=!1,console.error(e)}).then(function(){s&&s()})}else r&&r.body&&m("URLSearchParams",r.body)&&n(r,"application/x-www-form-urlencoded;charset=UTF-8"),o(t.call(this,e,r))}.bind(this))}return r.__MPHTTPX__Polyfill__=!0,r},exports.fixWebSocket=function(e){var t=e||"undefined"!=typeof WebSocket&&WebSocket;if(t&&!("__MPHTTPX__Polyfill__"in t)&&!("__MPHTTPX__"in t.prototype)){var n=t.prototype.send;t.prototype.send=function(e){(Xt.value?ge(e):m("Blob",e))?new it(e).promise.then(function(e){1===this.readyState&&n.call(this,e)}.bind(this)):n.call(this,e)},t.__MPHTTPX__Polyfill__=!0}},exports.fixXMLHttpRequest=function(e){var n=e||"undefined"!=typeof XMLHttpRequest&&XMLHttpRequest;if(n&&!("__MPHTTPX__Polyfill__"in n)&&!("__MPHTTPX__"in n.prototype)){var o=n.prototype.abort,i=n.prototype.open,a=n.prototype.send,s=n.prototype.setRequestHeader;n.prototype.abort=function(){c(this).processing&&(c(this).aborted=!0),o.call(this),c(this).hasContentType=!1},n.prototype.open=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;c(this).processing&&(c(this).aborted=!0),i.call(this,e,t,n,r,o),c(this).hasContentType=!1},n.prototype.send=function(e){if((Xt.value?Qe(e):m("FormData",e))&&(e=Ze(e),c(this).hasContentType||this.setRequestHeader("Content-Type",e.type)),Xt.value?ge(e):m("Blob",e)){var t=new it(e);t.type&&!c(this).hasContentType&&this.setRequestHeader("Content-Type",t.type);var n=this.withCredentials;c(this).processing=!0,t.promise.then(function(e){c(this).aborted||(n!==this.withCredentials&&(this.withCredentials=n,console.warn("Illegal to set the 'withCredentials' property on 'XMLHttpRequest': The value may only be set if the object's state is UNSENT or OPENED.")),a.call(this,""!==e?e:void 0)),c(this).aborted=!1,c(this).processing=!1}.bind(this)).catch(function(e){c(this).aborted=!1,c(this).processing=!1,console.error(e)}.bind(this))}else m("URLSearchParams",e)&&!c(this).hasContentType&&this.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"),a.call(this,e)},n.prototype.setRequestHeader=function(e,t){if(c(this).processing)throw new d("Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");s.call(this,e,t),"content-type"===String(e).toLowerCase()&&(c(this).hasContentType=!0)},n.__MPHTTPX__Polyfill__=!0;var u=r(function e(){t(this,e),this.aborted=!1,this.processing=!1,this.hasContentType=!1})}function c(e){var t="__XMLHttpRequest_Polyfill__";return t in e||y(e,t,new u),e[t]}},exports.getPlatform=an,exports.setConnectSocket=cr,exports.setConnectSocketFunc=cr,exports.setFullOverride=function(e){Xt.value=!!e},exports.setReadableStreamClass=function(e){le.ReadableStream=e},exports.setRequest=pn,exports.setRequestFunc=pn,exports.setXMLHttpRequest=Ft,exports.setXMLHttpRequestClass=Ft;
|
|
1
|
+
"use strict";function e(e,t,n){return t=o(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,a()?Reflect.construct(t,n||[],o(e).constructor):t.apply(e,n))}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var f={iterator:function(){return"function"==typeof Symbol&&Symbol.iterator||"Symbol(Symbol.iterator)"}(),toStringTag:function(){return"function"==typeof Symbol&&Symbol.toStringTag||"Symbol(Symbol.toStringTag)"}()},l=function(){return Error}(),h=function(n,o){function a(n,r){var o;return t(this,a),o=e(this,a,[n]),void 0!==r&&(o.name=""+r),o}return i(a,l),r(a,[{key:o,get:function(){return"DOMException"}},{key:"__MPHTTPX__",get:function(){return{chain:["DOMException"]}}}])}(0,f.toStringTag);function d(){return function(){try{return new DOMException,!0}catch(e){return!1}}()?DOMException:h}var p=d();function y(e){try{return e.__MPHTTPX__.chain[0]}catch(t){return Object.prototype.toString.call(e).slice(8,-1)}}function v(e,t,n){Object.defineProperty(e,t,{value:n})}function g(e){try{return String(e)}catch(e){return"[object Unknown]"}}function b(e,t){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")}function m(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o="__MPHTTPX__";return!!t&&"object"===c(t)&&o in t&&!!t[o]&&"object"===c(t[o])&&"chain"in t[o]&&Array.isArray(t[o].chain)&&(n=t[o].chain.indexOf(e),r?0===n:n>-1)}var _=function(){return"function"==typeof Symbol&&!!Symbol.iterator}();function T(e){return Array.isArray(e)||!!e&&"object"===c(e)&&_&&Symbol.iterator in e&&"function"==typeof e[Symbol.iterator]}function k(e){var t,n,r,o=0,i=(t={next:function(){return o<e.length?{value:e[o++],done:!1}:{value:void 0,done:!0}}},r=function(){return i},(n=s(n=f.iterator))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);return i}function E(e,t,n,r){if(e<t)throw new TypeError("Failed to ".concat(r?"execute '"+r+"' on":"construct"," '").concat(n,"': ").concat(t," argument").concat(t>1?"s":""," required, but only ").concat(e," present."))}var w=function(){return r(function e(){t(this,e)},[{key:"encoding",get:function(){return"utf-8"}},{key:"encode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return S("string"==typeof e?e:""+e).encoded}},{key:"encodeInto",value:function(e,t){if(E(arguments.length,2,"TextEncoder","encodeInto"),!Uint8Array.prototype.isPrototypeOf(t)&&!b("Uint8Array",t))throw new TypeError("Failed to execute 'encodeInto' on 'TextEncoder': parameter 2 is not of type 'Uint8Array'.");var n=S("string"==typeof e?e:""+e,t);return{read:n.read,written:n.written}}},{key:"toString",value:function(){return"[object TextEncoder]"}},{key:f.toStringTag,get:function(){return"TextEncoder"}},{key:"__MPHTTPX__",get:function(){return{chain:["TextEncoder"]}}}])}();function S(e,t){for(var n=void 0!==t,r=0,o=0,i=e.length,a=0,u=Math.max(32,i+(i>>1)+7),s=n?t:new Uint8Array(u>>3<<3),c=0,f=0,l=0;r<i;){if(f=1,(c=e.charCodeAt(r))>=55296&&c<=56319)if(r+1<i){var h=e.charCodeAt(r+1);56320==(64512&h)?(f=2,r+=2,c=((1023&c)<<10)+(1023&h)+65536):(r+=1,c=65533)}else r+=1,c=65533;else c>=56320&&c<=57343?(r+=1,c=65533):r+=1;if(!n&&a+4>s.length){u+=8,u=(u*=1+r/e.length*2)>>3<<3;var d=new Uint8Array(u);d.set(s),s=d}if(4294967168&c?4294965248&c?4294901760&c?4292870144&c?(c=65533,l=3):l=4:l=3:l=2:l=1,n&&a+l>s.length)break;switch(l){case 1:s[a++]=c;break;case 2:s[a++]=c>>6&31|192,s[a++]=63&c|128;break;case 3:s[a++]=c>>12&15|224,s[a++]=c>>6&63|128,s[a++]=63&c|128;break;case 4:s[a++]=c>>18&7|240,s[a++]=c>>12&63|128,s[a++]=c>>6&63|128,s[a++]=63&c|128}o+=f}return{encoded:n?t:s.slice(0,a),read:o,written:a}}var R=function(){return"undefined"!=typeof TextEncoder&&TextEncoder||w}(),P=["utf-8","utf8","unicode-1-1-utf-8"],x=function(){return r(function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"utf-8",r=arguments.length>1?arguments[1]:void 0;if(t(this,e),-1===P.indexOf(("string"==typeof n?n:""+n).toLowerCase()))throw new RangeError("Failed to construct 'TextDecoder': encoding ('".concat(n,"') not implemented."));v(this,"__TextDecoder__",new q(r))},[{key:"encoding",get:function(){return"utf-8"}},{key:"fatal",get:function(){return A(this).fatal}},{key:"ignoreBOM",get:function(){return A(this).ignoreBOM}},{key:"decode",value:function(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.stream,r=void 0!==n&&n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{fatal:!1,ignoreBOM:!1,partial:[]};if(void 0===e){if(o.partial.length>0&&o.fatal)throw o.partial=[],new TypeError("Incomplete UTF-8 sequence.");return""}var i=C(e)?new Uint8Array(e):H(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):function(){throw new TypeError("Input could not be converted to any of: ArrayBufferView, ArrayBuffer.")}();if(o.partial.length>0){var a=new Uint8Array(o.partial.length+i.length);a.set(o.partial,0),a.set(i,o.partial.length),i=a,o.partial=[]}!o.ignoreBOM&&i.length>=3&&239===i[0]&&187===i[1]&&191===i[2]&&(i=i.subarray(3));var u=i.length,s=[];if(r&&i.length>0){for(var c=i.length;c>0&&c>i.length-4;){var f=i[c-1];if(128!=(192&f)){(f>239?4:f>223?3:f>191?2:1)>i.length-(c-1)&&(u=c-1);break}--c}o.partial=Array.from(i.slice(u)),i=i.slice(0,u)}var l=0,h=0,d=0,p=0,y=0,v=0,g=0,b=0;for(;b<u;){if(l=0,b+(d=(p=i[b])>239?4:p>223?3:p>191?2:1)<=u)switch(d){case 1:p<128&&(l=p);break;case 2:128==(192&(y=i[b+1]))&&(h=(31&p)<<6|63&y)>127&&(l=h);break;case 3:y=i[b+1],v=i[b+2],128==(192&y)&&128==(192&v)&&(h=(15&p)<<12|(63&y)<<6|63&v)>2047&&(h<55296||h>57343)&&(l=h);break;case 4:y=i[b+1],v=i[b+2],g=i[b+3],128==(192&y)&&128==(192&v)&&128==(192&g)&&(h=(15&p)<<18|(63&y)<<12|(63&v)<<6|63&g)>65535&&h<1114112&&(l=h)}if(0===l&&(1===d&&0!==p||d>1)){if(o.fatal)throw o.partial=[],new TypeError("Decoding failed.");for(var m=1;b+m<u&&128==(192&i[b+m]);)m+=1;s.push(65533),b+=m}else l>65535&&(l-=65536,s.push(l>>>10&1023|55296),l=56320|1023&l),s.push(l),b+=d}return s.length>16384?function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(String.fromCharCode.apply(String,e.slice(n,n+4096)));return t.join("")}(s):function(e){for(var t="",n=0,r=e.length;n<r;n+=4096)t+=String.fromCharCode.apply(String,e.slice(n,n+4096));return t}(s)}(e,t,A(this))}},{key:"toString",value:function(){return"[object TextDecoder]"}},{key:f.toStringTag,get:function(){return"TextDecoder"}},{key:"__MPHTTPX__",get:function(){return{chain:["TextDecoder"]}}}])}(),q=r(function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.fatal,o=void 0!==r&&r,i=n.ignoreBOM,a=void 0!==i&&i;t(this,e),this.partial=[],this.fatal=!!o,this.ignoreBOM=!!a});function A(e){return e.__TextDecoder__}function C(e){return!!e&&"object"===c(e)&&ArrayBuffer.prototype.isPrototypeOf(e)||function(e){return!!e&&"object"===c(e)&&"byteLength"in e&&"number"==typeof e.byteLength&&(b("ArrayBuffer",e)||"[object ArrayBuffer]"===g(e))}(e)}function H(e){return ArrayBuffer.isView?ArrayBuffer.isView(e):function(e){return!!e&&"object"===c(e)&&(["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"].indexOf(Object.prototype.toString.call(e))>-1||"undefined"!=typeof DataView&&DataView.prototype.isPrototypeOf(e))}(e)}var L=function(){return"undefined"!=typeof TextDecoder&&TextDecoder||x}(),j=function(){return r(function e(n,r){t(this,e),E(arguments.length,1,"Event"),v(this,"__Event__",new M);var o=O(this);o.type=""+n,o.bubbles=!!(null==r?void 0:r.bubbles),o.cancelable=!!(null==r?void 0:r.cancelable),o.composed=!!(null==r?void 0:r.composed),Object.defineProperty(this,"isTrusted",{enumerable:!0,get:function(){return"YES"===o.isTrusted}})},[{key:"NONE",get:function(){return 0}},{key:"CAPTURING_PHASE",get:function(){return 1}},{key:"AT_TARGET",get:function(){return 2}},{key:"BUBBLING_PHASE",get:function(){return 3}},{key:"bubbles",get:function(){return O(this).bubbles}},{key:"cancelBubble",get:function(){return O(this).cancelBubble},set:function(e){e&&(O(this).cancelBubble=!0)}},{key:"cancelable",get:function(){return O(this).cancelable}},{key:"composed",get:function(){return O(this).composed}},{key:"currentTarget",get:function(){return O(this).currentTarget}},{key:"defaultPrevented",get:function(){return O(this).defaultPrevented}},{key:"eventPhase",get:function(){return O(this).eventPhase}},{key:"returnValue",get:function(){return O(this).returnValue},set:function(e){e||this.preventDefault()}},{key:"srcElement",get:function(){return O(this).target}},{key:"target",get:function(){return O(this).target}},{key:"timeStamp",get:function(){return O(this).timeStamp}},{key:"type",get:function(){return O(this).type}},{key:"composedPath",value:function(){var e=this.target?[this.target]:[];return this.currentTarget&&this.currentTarget!==this.target&&e.push(this.currentTarget),e}},{key:"initEvent",value:function(e,t,n){E(arguments.length,1,y(this),"initEvent");var r=O(this);r.eventDispatched||(r.type=""+e,r.bubbles=!!t,r.cancelable=!!n)}},{key:"preventDefault",value:function(){var e=O(this);if(e.passive)return console.warn("Ignoring 'preventDefault()' call on event of type '".concat(this.type,"' from a listener registered as 'passive'."));this.cancelable&&(e.defaultPrevented=!0,e.returnValue=!1)}},{key:"stopImmediatePropagation",value:function(){O(this).immediatePropagationStopped=!0,this.cancelBubble=!0}},{key:"stopPropagation",value:function(){this.cancelBubble=!0}},{key:"toString",value:function(){return"[object Event]"}},{key:f.toStringTag,get:function(){return"Event"}},{key:"__MPHTTPX__",get:function(){return{chain:["Event"]}}}],[{key:"NONE",get:function(){return 0}},{key:"CAPTURING_PHASE",get:function(){return 1}},{key:"AT_TARGET",get:function(){return 2}},{key:"BUBBLING_PHASE",get:function(){return 3}}])}(),M=r(function e(){t(this,e),this.bubbles=!1,this.cancelBubble=!1,this.cancelable=!1,this.composed=!1,this.currentTarget=null,this.defaultPrevented=!1,this.eventPhase=0,this.returnValue=!0,this.target=null,this.timeStamp=(new Date).getTime()-F,this.type="",this.passive=!1,this.eventDispatched=!1,this.immediatePropagationStopped=!1,Object.defineProperty(this,"isTrusted",D())});function O(e){return e.__Event__}var F=function(){return(new Date).getTime()}();function B(e){return"name"in e?e.name:"unknown"}function D(){var e=B(D),t=e.length,n="NO";return{configurable:!1,enumerable:!0,get:function(){return n},set:function(r){e===r.slice(0,t)&&(n=r.slice(t+1))}}}function U(e,t){(O(e)||{}).isTrusted="".concat(B(D),":").concat(t?"YES":"NO")}var N=function(){return"undefined"!=typeof Event&&Event||j}(),I=function(){return r(function e(){t(this,e),v(this,"__EventTarget__",new X)},[{key:"addEventListener",value:function(e,t,n){if(E(arguments.length,2,y(this),"addEventListener"),"function"!=typeof t&&"object"!==c(t)&&void 0!==t)throw new TypeError("Failed to execute 'addEventListener' on '".concat(y(this),"': parameter 2 is not of type 'Object'."));var r=z(this)||{executors:[]},o=new G(e,t),i=o.options.capture="boolean"==typeof n?n:!!(null==n?void 0:n.capture);if(!r.executors.some(function(e){return e.equals(o)})){if(r.executors.push(o),n&&"object"===c(n)){o.options.once=!!n.once,o.options.passive=!!n.passive;var a=n.signal;a&&Y(a)&&!a.aborted&&(o.options.signal=a,function(e,t,n){var r=function(){z(e).executors=z(e).executors.filter(function(e){return!e.equals(t)}),n.removeEventListener("abort",r)};n.addEventListener("abort",r)}(this,o,a))}if(i){var u=function(e){return e.options.capture?0:1};r.executors=r.executors.sort(function(e,t){return u(e)-u(t)})}}}},{key:"dispatchEvent",value:function(e){if(E(arguments.length,1,y(this),"dispatchEvent"),m("Event",e))U(e,!1);else{if(n=function(e){return"[object "===e.slice(0,8)&&"Event]"===e.slice(-6)},!(t=e)||"object"!==c(t)||!("type"in t)||"string"!=typeof t.type||!n(Object.prototype.toString.call(t))&&!n(g(t)))throw new TypeError("Failed to execute 'dispatchEvent' on '".concat(y(this),"': parameter 1 is not of type 'Event'."));console.warn("WARNING: undefined behavior when executing 'dispatchEvent' on '".concat(y(this),"': parameter 1 is not of type 'Event(P)'."))}var t,n;return W(this,e)}},{key:"removeEventListener",value:function(e,t,n){if(E(arguments.length,2,y(this),"removeEventListener"),"function"!=typeof t&&"object"!==c(t)&&void 0!==t)throw new TypeError("Failed to execute 'removeEventListener' on '".concat(y(this),"': parameter 2 is not of type 'Object'."));var r=z(this)||{executors:[]},o=new G(e,t);o.options.capture="boolean"==typeof n?n:!!(null==n?void 0:n.capture),r.executors.some(function(e){return e.equals(o)})&&(r.executors=r.executors.filter(function(e){return!e.equals(o)}))}},{key:"toString",value:function(){return"[object EventTarget]"}},{key:f.toStringTag,get:function(){return"EventTarget"}},{key:"__MPHTTPX__",get:function(){return{chain:["EventTarget"]}}}])}(),X=r(function e(){t(this,e),this.executors=[]});function z(e){return e.__EventTarget__}var G=function(){return r(function e(n,r){var o;t(this,e),this.options={},this.type=""+n,this.callback="function"==typeof(o=r)?o:function(e){return!!e&&"object"===c(e)&&"handleEvent"in e&&"function"==typeof e.handleEvent}(o)?o.handleEvent:o},[{key:"equals",value:function(e){return this.type===e.type&&this.callback===e.callback&&this.options.capture===e.options.capture}}])}();function W(e,t){var n=z(e)||{},r=t.__Event__||{};r.target=e,r.currentTarget=e,r.eventPhase=2,r.eventDispatched=!0;var o=[];Array.isArray(n.executors)||(n.executors=[]);for(var i=0;i<n.executors.length&&!r.immediatePropagationStopped;++i){var a=n.executors[i];if(a.type===t.type){a.options.once&&o.push(i),r.passive=!!a.options.passive;try{var u=a.callback;"function"==typeof u&&u.call(e,t)}catch(e){console.error(e)}r.passive=!1}}return o.length>0&&(n.executors=n.executors.reduce(function(e,t,n){return-1===o.indexOf(n)&&e.push(t),e},[])),r.currentTarget=null,r.eventPhase=0,r.eventDispatched=!1,!(t.cancelable&&t.defaultPrevented)}function V(e,t){return function(n){var r="on"+n,o=e[r],i=t[r];"function"==typeof o?I.prototype.addEventListener.call(e,n,i):I.prototype.removeEventListener.call(e,n,i)}}function J(e,t,n){"function"==typeof t&&t.call(e,n)}function Y(e){return m("EventTarget",e)||function(e){return!!e&&"object"===c(e)&&"addEventListener"in e&&"function"==typeof e.addEventListener&&"removeEventListener"in e&&"function"==typeof e.removeEventListener}(e)}var Q=function(){return"undefined"!=typeof EventTarget&&EventTarget||I}(),$=function(n,o){function a(n,r){var o,i;return t(this,a),E(arguments.length,1,"CustomEvent"),v(o=e(this,a,[n,r]),"__CustomEvent__",new K),Z(o).detail=null!==(i=null==r?void 0:r.detail)&&void 0!==i?i:null,o}return i(a,j),r(a,[{key:"detail",get:function(){return Z(this).detail}},{key:"initCustomEvent",value:function(e,t,n,r){E(arguments.length,1,"CustomEvent","initCustomEvent"),this.__Event__.eventDispatched||(this.initEvent(e,t,n),Z(this).detail=null!=r?r:null)}},{key:"toString",value:function(){return"[object CustomEvent]"}},{key:o,get:function(){return"CustomEvent"}},{key:"__MPHTTPX__",get:function(){return{chain:["CustomEvent","Event"]}}}])}(0,f.toStringTag),K=r(function e(){t(this,e)});function Z(e){return e.__CustomEvent__}var ee=function(){return"undefined"!=typeof CustomEvent&&CustomEvent||$}(),te=function(n,o){function a(){var n;if(t(this,a),(n=e(this,a)).constructor===a)throw new TypeError("Failed to construct 'AbortSignal': Illegal constructor");return v(n,"__AbortSignal__",new ne(n)),n}return i(a,I),r(a,[{key:"aborted",get:function(){return re(this).aborted}},{key:"reason",get:function(){return re(this).reason}},{key:"throwIfAborted",value:function(){if(this.aborted)throw this.reason}},{key:"onabort",get:function(){return re(this).onabort},set:function(e){re(this).onabort=e,re(this).attach("abort")}},{key:"toString",value:function(){return"[object AbortSignal]"}},{key:o,get:function(){return"AbortSignal"}},{key:"__MPHTTPX__",get:function(){return{chain:["AbortSignal","EventTarget"]}}}],[{key:"abort",value:function(e){var t=oe();return ie(t,!1,e),t}},{key:"any",value:function(e){if(E(arguments.length,1,"AbortSignal","any"),!T(e))throw new TypeError("Failed to execute 'any' on 'AbortSignal': The provided value cannot be converted to a sequence.");var t=Array.isArray(e)?e:Array.from(e);t.forEach(function(e){if(!Y(e))throw new TypeError("Failed to execute 'any' on 'AbortSignal': Failed to convert value to 'AbortSignal'.")});var n=oe(),r=function(){for(var e=0;e<t.length;++e){var n=t[e];if(n.aborted)return n}}();return r?ie(n,!1,r.reason):function(e,t){function n(){for(var r=0;r<t.length;++r){t[r].removeEventListener("abort",n)}ie(e,!0,this.reason)}for(var r=0;r<t.length;++r){t[r].addEventListener("abort",n)}}(n,t),n}},{key:"timeout",value:function(e){if(E(arguments.length,1,"AbortSignal","timeout"),!(e>=0))throw new TypeError("Failed to execute 'timeout' on 'AbortSignal': Value is outside the 'unsigned long long' value range.");var t=oe();return setTimeout(function(){ie(t,!0,new p("signal timed out","TimeoutError"))},e),t}}])}(0,f.toStringTag),ne=r(function e(n){var r;t(this,e),this.aborted=!1,this.reason=void 0,this.onabort=null,this.attach=V(n,(r=n,{onabort:function(e){J(r,r.onabort,e)}}))});function re(e){return e.__AbortSignal__}function oe(){var e=Object.create(te.prototype);return v(e,"__EventTarget__",{executors:[]}),v(e,"__AbortSignal__",new ne(e)),e}function ie(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;if(!e.aborted){var r=re(e)||{};if(r.aborted=!0,r.reason=void 0!==n?n:new p("signal is aborted without reason","AbortError"),t){var o=new j("abort");o.__Event__.target=e,U(o,!0),W(e,o)}}}var ae=function(){return"undefined"!=typeof AbortSignal&&AbortSignal||te}(),ue=function(){return r(function e(){t(this,e),v(this,"__AbortController__",new se)},[{key:"signal",get:function(){return(e=this,e.__AbortController__).signal;var e}},{key:"abort",value:function(e){ie(this.signal,!0,e)}},{key:"toString",value:function(){return"[object AbortController]"}},{key:f.toStringTag,get:function(){return"AbortController"}},{key:"__MPHTTPX__",get:function(){return{chain:["AbortController"]}}}])}(),se=r(function e(){t(this,e),this.signal=oe()});var ce=function(){return"undefined"!=typeof AbortController&&AbortController||ue}(),fe=function(){return R.prototype.encode.bind(new R)}(),le=function(){return L.prototype.decode.bind(new L)}(),he={ReadableStream:function(){return"undefined"!=typeof ReadableStream&&ReadableStream||void 0}()};var de=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(t(this,e),!T(n))throw new TypeError("Failed to construct 'Blob/File': The provided value cannot be converted to a sequence.");for(var o=Array.isArray(n)?n:Array.from(n),i=[],a=0,u=0;u<o.length;++u){var s=o[u];if(me(s))a+=s.size,i.push(s.arrayBuffer().then(function(e){return new Uint8Array(e)}));else{var c=C(s)||H(s)?ve(s):fe(s);a+=c.length,i.push(Promise.resolve(c))}}v(this,"__Blob__",new pe(Promise.all(i).then(function(e){return function(e){var t=e.reduce(function(e,t){return e+t.byteLength},0),n=new Uint8Array(t);return e.reduce(function(e,t){return n.set(t,e),e+t.byteLength},0),n}(e)}))),ye(this).size=a,ye(this).type=ge(null==r?void 0:r.type)}return r(e,[{key:"size",get:function(){return ye(this).size}},{key:"type",get:function(){return ye(this).type}},{key:"arrayBuffer",value:function(){return ye(this).promise.then(function(e){return be(e.buffer).buffer})}},{key:"bytes",value:function(){return ye(this).promise.then(function(e){return be(e.buffer)})}},{key:"slice",value:function(t,n,r){var o=null!=t?t:0,i=null!=n?n:this.size,a=Object.create(e.prototype);return v(a,"__Blob__",new pe(ye(this).promise.then(function(e){return be(e.slice(o,i))}))),ye(a).size=function(e,t,n){var r=function(t){var n=Number(t);return isNaN(n)&&(n=0),n=n>=0?Math.min(n,e):Math.max(0,n+e)};return Math.max(0,r(n)-r(t))}(this.size,o,i),ye(a).type=ge(r),a}},{key:"stream",value:function(){var e=he.ReadableStream||function(){throw new ReferenceError("ReadableStream is not defined")}(),t=0;try{return new e({type:"bytes",autoAllocateChunkSize:524288,pull:function(e){var n,r=null===(n=e.byobRequest)||void 0===n?void 0:n.view;return this.slice(t,(null==r?void 0:r.byteLength)?t+r.byteLength:void 0).arrayBuffer().then(function(n){var o,i=new Uint8Array(n),a=i.byteLength;t+=a,r.set(i),null===(o=e.byobRequest)||void 0===o||o.respond(a),t>=this.size&&e.close()}.bind(this))}.bind(this)})}catch(n){return new e({pull:function(e){return this.slice(t,t+524288).arrayBuffer().then(function(n){t+=n.byteLength;var r=new Uint8Array(n);e.enqueue(r),t==this.size&&e.close()}.bind(this))}.bind(this)})}}},{key:"text",value:function(){return ye(this).promise.then(function(e){return le(e)})}},{key:"toString",value:function(){return"[object Blob]"}},{key:f.toStringTag,get:function(){return"Blob"}},{key:"__MPHTTPX__",get:function(){return{chain:["Blob"]}}}])}(),pe=r(function e(n){t(this,e),this.size=0,this.type="",this.promise=n});function ye(e){return e.__Blob__}function ve(e){return C(e)?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function ge(e){var t=""+(void 0!==e?e:"");return/[^\u0020-\u007E]/.test(t)?"":t.toLowerCase()}function be(e){var t=ve(e),n=new Uint8Array(new ArrayBuffer(t.byteLength));return n.set(t),n}function me(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return m("Blob",e,t)||function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=["[object Blob]"];t||n.push("[object File]");return!!e&&"object"===c(e)&&"size"in e&&"number"==typeof e.size&&"arrayBuffer"in e&&"function"==typeof e.arrayBuffer&&(n.indexOf(Object.prototype.toString.call(e))>-1||n.indexOf(g(e))>-1)}(e,t)}function _e(){return function(){try{return 2===new Blob(["ä"]).size}catch(e){return!1}}()?Blob:de}var Te=_e();function ke(n){var o=function(n,o){function a(n,r,o){var i;return t(this,a),E(arguments.length,2,"File"),v(i=e(this,a,[n,o]),"__File__",new Ee),we(i).lastModified=+((null==o?void 0:o.lastModified)?new Date(o.lastModified):new Date)||0,we(i).name=""+r,i}return i(a,n),r(a,[{key:"lastModified",get:function(){return we(this).lastModified}},{key:"name",get:function(){return we(this).name}},{key:"webkitRelativePath",get:function(){return""}},{key:"toString",value:function(){return"[object File]"}},{key:o,get:function(){return"File"}}])}(n,f.toStringTag);return n===de&&Object.defineProperty(o.prototype,"__MPHTTPX__",{configurable:!0,get:function(){return{chain:["File","Blob"]}}}),o}var Ee=r(function e(){t(this,e),this.lastModified=0,this.name=""});function we(e){return e.__File__}var Se=ke(de);function Re(){return function(){try{return new File([],""),!0}catch(e){return!1}}()?File:Te===de?Se:ke(Te)}var Pe=Re(),xe=["loaded","total"],qe=function(n,o){function a(n,r){var o,i,u;t(this,a),v(o=e(this,a,[n,r]),"__ProgressEvent__",new Ae);var s=Ce(o);s.lengthComputable=!!(null==r?void 0:r.lengthComputable),s.loaded=Number(null!==(i=null==r?void 0:r.loaded)&&void 0!==i?i:0),s.total=Number(null!==(u=null==r?void 0:r.total)&&void 0!==u?u:0);for(var c=0;c<xe.length;++c){var f=xe[c];if(isNaN(o[f]))throw new TypeError("Failed to construct 'ProgressEvent': Failed to read the '".concat(f,"' property from 'ProgressEventInit': The provided double value is non-finite."))}return o}return i(a,j),r(a,[{key:"lengthComputable",get:function(){return Ce(this).lengthComputable}},{key:"loaded",get:function(){return Ce(this).loaded}},{key:"total",get:function(){return Ce(this).total}},{key:"toString",value:function(){return"[object ProgressEvent]"}},{key:o,get:function(){return"ProgressEvent"}},{key:"__MPHTTPX__",get:function(){return{chain:["ProgressEvent","Event"]}}}])}(0,f.toStringTag),Ae=r(function e(){t(this,e),this.lengthComputable=!1,this.loaded=0,this.total=0});function Ce(e){return e.__ProgressEvent__}function He(e,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=new qe(t,{lengthComputable:n>0,loaded:arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,total:n});r.__Event__.target=e,U(r,!0),W(e,r)}var Le=function(n,o){function a(){var n;return t(this,a),v(n=e(this,a),"__FileReader__",new je(n)),n}return i(a,I),r(a,[{key:"EMPTY",get:function(){return 0}},{key:"LOADING",get:function(){return 1}},{key:"DONE",get:function(){return 2}},{key:"error",get:function(){return Me(this).error}},{key:"readyState",get:function(){return Me(this).readyState}},{key:"result",get:function(){return Me(this).result}},{key:"abort",value:function(){var e,t;2===Me(this).pos&&((t=Me(e=this)).pos=5,t.error=new p("An ongoing operation was aborted, typically with a call to abort().","AbortError"),t.result=null,t.readyState=2,He(e,"abort"),Be(e))}},{key:"readAsArrayBuffer",value:function(e){Oe(this,"readAsArrayBuffer",arguments.length,e),Fe(this,e.size,function(){return e.arrayBuffer()})}},{key:"readAsBinaryString",value:function(e){Oe(this,"readAsBinaryString",arguments.length,e),Fe(this,e.size,function(){return e.arrayBuffer().then(function(e){for(var t=[],n=new Uint8Array(e),r=0;r<n.length;++r)t.push(String.fromCharCode(n[r]));return t.join("")})})}},{key:"readAsDataURL",value:function(e){Oe(this,"readAsDataURL",arguments.length,e),Fe(this,e.size,function(){return e.arrayBuffer().then(function(t){return"data:"+(e.type||"application/octet-stream")+";base64,"+De(new Uint8Array(t))})})}},{key:"readAsText",value:function(e,t){if(Oe(this,"readAsText",arguments.length,e),"function"==typeof TextDecoder){var n=new TextDecoder(t);Fe(this,e.size,function(){return e.arrayBuffer().then(function(e){return n.decode(e)})})}else{if(void 0!==t){var r=""+t;-1===["utf-8","utf8","unicode-1-1-utf-8"].indexOf(r.toLowerCase())&&console.warn("Ignoring the execution of 'readAsText' on 'FileReader': encoding ('".concat(r,"') not implemented."))}Fe(this,e.size,function(){return e.text()})}}},{key:"onabort",get:function(){return Me(this).onabort},set:function(e){Me(this).onabort=e,Me(this).attach("abort")}},{key:"onerror",get:function(){return Me(this).onerror},set:function(e){Me(this).onerror=e,Me(this).attach("error")}},{key:"onload",get:function(){return Me(this).onload},set:function(e){Me(this).onload=e,Me(this).attach("load")}},{key:"onloadend",get:function(){return Me(this).onloadend},set:function(e){Me(this).onloadend=e,Me(this).attach("loadend")}},{key:"onloadstart",get:function(){return Me(this).onloadstart},set:function(e){Me(this).onloadstart=e,Me(this).attach("loadstart")}},{key:"onprogress",get:function(){return Me(this).onprogress},set:function(e){Me(this).onprogress=e,Me(this).attach("progress")}},{key:"toString",value:function(){return"[object FileReader]"}},{key:o,get:function(){return"FileReader"}},{key:"__MPHTTPX__",get:function(){return{chain:["FileReader","EventTarget"]}}}],[{key:"EMPTY",get:function(){return 0}},{key:"LOADING",get:function(){return 1}},{key:"DONE",get:function(){return 2}}])}(0,f.toStringTag),je=r(function e(n){var r;t(this,e),this.pos=0,this.readyState=0,this.result=null,this.error=null,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.attach=V(n,(r=n,{onabort:function(e){J(r,r.onabort,e)},onerror:function(e){J(r,r.onerror,e)},onload:function(e){J(r,r.onload,e)},onloadend:function(e){J(r,r.onloadend,e)},onloadstart:function(e){J(r,r.onloadstart,e)},onprogress:function(e){J(r,r.onprogress,e)}}))});function Me(e){return e.__FileReader__}function Oe(e,t,n,r){if(E(n,1,"FileReader",t),!me(r))throw new TypeError("Failed to execute '"+t+"' on 'FileReader': parameter 1 is not of type 'Blob'.");if(1===e.readyState)throw new p("Failed to execute '".concat(t,"' on 'FileReader': The object is already busy reading Blobs."),"InvalidStateError")}function Fe(e,t,n){!function(e,t,n){var r=Me(e);r.pos=1,r.error=null,r.result=null;var o=function(){return He(e,"loadstart",0,t),n()};(function(e,t,n){var r=Me(e);r.pos=2,r.readyState=1,Promise.resolve().then(function(){if(2===r.pos)return n().then(function(n){return function(e,t,n){var r=Me(e);if(2!==r.pos)return;r.pos=3,r.result=n,r.readyState=2,function(e,t){Me(e).pos=4,He(e,"load",t,t),Be(e,t)}(e,t)}(e,t,n)}).catch(function(t){return function(e,t){var n=Me(e);if(2!==n.pos)return;n.pos=6,n.error=t,n.result=null,n.readyState=2,He(e,"error"),Be(e)}(e,t)})})})(e,t,o)}(e,t,n)}function Be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Me(e).pos=7,He(e,"loadend",t,t)}function De(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=[],r=0;r<e.length;r+=3){var o=e[r],i=r+1<e.length,a=i?e[r+1]:0,u=r+2<e.length,s=u?e[r+2]:0,c=o>>2,f=(3&o)<<4|a>>4,l=(15&a)<<2|s>>6,h=63&s;u||(h=64,i||(l=64)),n.push(t[c],t[f],t[l],t[h])}return n.join("")}var Ue=function(){return"undefined"!=typeof FileReader&&FileReader||Le}(),Ne=function(){return r(function e(n){if(t(this,e),v(this,"__URLSearchParams__",new Ie),void 0!==n)if(Je(n))n.forEach(function(e,t){this.append(t,e)}.bind(this),this);else if(n&&"object"===c(n))if(T(n))for(var r=Array.isArray(n)?n:Array.from(n),o=0;o<r.length;++o){var i=r[o];if(!T(i))throw new TypeError("Failed to construct 'URLSearchParams': The provided value cannot be converted to a sequence.");var a=Array.isArray(i)?i:Array.from(i);if(2!==a.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");this.append(a[0],a[1])}else Object.getOwnPropertyNames(n).forEach(function(e){this.append(e,n[e])}.bind(this),this);else{var u=""+n;0===u.indexOf("?")&&(u=u.slice(1));for(var s=u.split("&"),f=0;f<s.length;++f){var l=s[f],h=l.indexOf("=");h>-1?this.append(Ve(l.slice(0,h)),Ve(l.slice(h+1))):l&&this.append(Ve(l),"")}}},[{key:"size",get:function(){return Xe(this).array.length}},{key:"append",value:function(e,t){ze(arguments.length,2,"append"),Xe(this).array.push([""+e,Ge(t)])}},{key:"delete",value:function(e,t){ze(arguments.length,1,"delete");for(var n=""+e,r=-1,o=Xe(this).array,i=[],a=0;a<o.length;++a){var u=o[a];u[0]!==n?i.push(u):(1!==arguments.length&&u[1]!==Ge(t)&&i.push(u),r=a)}r>-1&&(Xe(this).array=i)}},{key:"get",value:function(e){ze(arguments.length,1,"get");for(var t=""+e,n=Xe(this).array,r=0;r<n.length;++r){var o=n[r];if(o[0]===t)return o[1]}return null}},{key:"getAll",value:function(e){ze(arguments.length,1,"getAll");for(var t=""+e,n=Xe(this).array,r=[],o=0;o<n.length;++o){var i=n[o];i[0]===t&&r.push(i[1])}return r}},{key:"has",value:function(e,t){ze(arguments.length,1,"has");for(var n=""+e,r=Xe(this).array,o=0;o<r.length;++o){var i=r[o];if(i[0]===n){if(1===arguments.length)return!0;if(i[1]===Ge(t))return!0}}return!1}},{key:"set",value:function(e,t){ze(arguments.length,2,"set");for(var n=""+e,r=Ge(t),o=-1,i=Xe(this).array,a=[],u=0;u<i.length;++u){var s=i[u];s[0]!==n?a.push(s):-1===o&&(o=u,a.push([n,r]))}-1===o&&a.push([n,r]),Xe(this).array=a}},{key:"sort",value:function(){Xe(this).array.sort(function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0})}},{key:"forEach",value:function(e,t){if(ze(arguments.length,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'URLSearchParams': parameter 1 is not of type 'Function'.");for(var n=Xe(this).array,r=0;r<n.length;++r){var o=n[r];e.call(t,o[1],o[0],this)}}},{key:"entries",value:function(){return k(Xe(this).array.map(function(e){return[e[0],e[1]]}))}},{key:"keys",value:function(){return k(Xe(this).array.map(function(e){return e[0]}))}},{key:"values",value:function(){return k(Xe(this).array.map(function(e){return e[1]}))}},{key:f.iterator,value:function(){return this.entries()}},{key:"toString",value:function(){for(var e=Xe(this).array,t=[],n=0;n<e.length;++n){var r=e[n];t.push(We(r[0])+"="+We(r[1]))}return t.join("&")}},{key:f.toStringTag,get:function(){return"URLSearchParams"}},{key:"__MPHTTPX__",get:function(){return{chain:["URLSearchParams"]}}}])}(),Ie=r(function e(){t(this,e),this.array=[]});function Xe(e){return e.__URLSearchParams__}function ze(e,t,n){E(e,t,"URLSearchParams",n)}function Ge(e){return"string"==typeof e?e:null!=e&&"function"==typeof e.toString?e.toString():JSON.stringify(e)}function We(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function Ve(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,function(e){return decodeURIComponent(e)})}function Je(e){return m("URLSearchParams",e)||function(e){return b("URLSearchParams",e)||!!e&&"object"===c(e)&&"size"in e&&"number"==typeof e.size&&"forEach"in e&&"function"==typeof e.forEach&&"function"==typeof URLSearchParams&&e instanceof URLSearchParams}(e)}var Ye=function(){return"undefined"!=typeof URLSearchParams&&URLSearchParams||Ne}(),Qe=function(){return r(function e(n,r){if(t(this,e),v(this,"__FormData__",new $e),void 0!==n)try{for(var o=n.elements,i=0;i<o.length;++i){var a=o[i];if(!a.name||a.disabled||"submit"===a.type||"button"===a.type||nt(a,"form fieldset[disabled] *"))return;if("file"===a.type)for(var u=a.files&&a.files.length?a.files:[new Pe([],"",{type:"application/octet-stream"})],s=0;s<u.length;++s)this.append(a.name,u[s]);else if("select-multiple"===a.type||"select-one"===a.type)for(var c=0;c<a.options.length;++c){var f=a.options[c];!f.disabled&&f.selected&&this.append(a.name,f.value)}else if("checkbox"===a.type||"radio"===a.type)a.checked&&this.append(a.name,a.value);else{var l="textarea"===a.type?it(a.value):a.value;this.append(a.name,l)}}}catch(e){throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}null!=r&&console.warn("Ignoring the 'submitter' of 'FormData' constructor: parameter 2 not implemented.")},[{key:"append",value:function(e,t,n){Ze(arguments.length,2,"append"),Ke(this).array.push(et(e,t,n))}},{key:"delete",value:function(e){Ze(arguments.length,1,"delete");for(var t=""+e,n=-1,r=Ke(this).array,o=[],i=0;i<r.length;++i){var a=r[i];a[0]!==t?o.push(a):n=i}n>-1&&(Ke(this).array=o)}},{key:"get",value:function(e){Ze(arguments.length,1,"get");for(var t=""+e,n=Ke(this).array,r=0;r<n.length;++r){var o=n[r];if(o[0]===t)return o[1]}return null}},{key:"getAll",value:function(e){Ze(arguments.length,1,"getAll");for(var t=""+e,n=Ke(this).array,r=[],o=0;o<n.length;++o){var i=n[o];i[0]===t&&r.push(i[1])}return r}},{key:"has",value:function(e){Ze(arguments.length,1,"has");for(var t=""+e,n=Ke(this).array,r=0;r<n.length;++r){if(n[r][0]===t)return!0}return!1}},{key:"set",value:function(e,t,n){Ze(arguments.length,2,"set");for(var r=""+e,o=et(e,t,n),i=-1,a=Ke(this).array,u=[],s=0;s<a.length;++s){var c=a[s];c[0]!==r?u.push(c):-1===i&&(i=s,u.push(o))}-1===i&&u.push(o),Ke(this).array=u}},{key:"forEach",value:function(e,t){if(Ze(arguments.length,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(var n=Ke(this).array,r=0;r<n.length;++r){var o=n[r];e.call(t,o[1],o[0],t)}}},{key:"entries",value:function(){return k(Ke(this).array.map(function(e){return[e[0],e[1]]}))}},{key:"keys",value:function(){return k(Ke(this).array.map(function(e){return e[0]}))}},{key:"values",value:function(){return k(Ke(this).array.map(function(e){return e[1]}))}},{key:f.iterator,value:function(){return this.entries()}},{key:"toString",value:function(){return"[object FormData]"}},{key:f.toStringTag,get:function(){return"FormData"}},{key:"__MPHTTPX__",get:function(){return{chain:["FormData"]}}}])}(),$e=r(function e(){t(this,e),this.array=[]});function Ke(e){return e.__FormData__}function Ze(e,t,n){return E(e,t,"FormData",n)}function et(e,t,n){if(me(t)){if(n=void 0!==n?""+n:"string"==typeof t.name?t.name:"blob",t.name!==n||me(t,!0))t=new(m("Blob",t)?Se:Pe)([t],n);return[""+e,t]}return[""+e,""+t]}function nt(e,t){var n="undefined"!=typeof Element&&Element&&Element.prototype;return n&&!n.matches&&(n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector||function(e){for(var t=(this.ownerDocument||this.document).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1}),!!n&&n.matches.call(e,t)}function rt(e){return m("FormData",e)||function(e){var t="[object FormData]";return!!e&&"object"===c(e)&&"forEach"in e&&"function"==typeof e.forEach&&(Object.prototype.toString.call(e)===t||g(e)===t)}(e)}function ot(e,t){var n=t||"----formdata-mphttpx-"+Math.random(),r="--".concat(n,'\r\nContent-Disposition: form-data; name="'),o=[],i=!0;return e.forEach(function(e,t){"string"==typeof e?o.push(r+at(it(t))+'"\r\n\r\n'.concat(it(e),"\r\n")):(i&&m("Blob",e)&&(i=!1),o.push(r+at(it(t))+'"; filename="'.concat(at(e.name),'"\r\nContent-Type: ').concat(e.type||"application/octet-stream","\r\n\r\n"),e,"\r\n"))}),o.push("--".concat(n,"--")),new(i?Te:de)(o,{type:"multipart/form-data; boundary="+n})}function it(e){return e.replace(/\r?\n|\r/g,"\r\n")}function at(e){return e.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")}function ut(e){if(e&&/multipart\/form-data/i.test(e)){var t=e.match(/boundary\s*=\s*([^;]+)/i);if(t&&t[1])return t[1].trim().replace(/^["']|["']$/g,"")}}var st=function(){return"undefined"!=typeof FormData&&FormData||Qe}(),ct=function(){return r(function e(n,r){if(t(this,e),this._type="",r&&(this.type=r),"string"==typeof n)this.promise=Promise.resolve(n),this.type="text/plain;charset=UTF-8",this.calcLength=function(){return fe(n).length};else if(Je(n)){var o=n.toString();this.promise=Promise.resolve(o),this.type="application/x-www-form-urlencoded;charset=UTF-8",this.calcLength=function(){return fe(o).length}}else if(C(n))this.promise=Promise.resolve(n.slice(0)),this.length=n.byteLength;else if(H(n)){var i=n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength);this.promise=Promise.resolve(i),this.length=i.byteLength}else if(me(n))this.promise=n.arrayBuffer(),this.type=n.type,this.length=n.size;else if(rt(n)){var a=ot(n,r?ut(r):void 0);this.promise=a.arrayBuffer(),this.type=a.type,this.length=a.size}else if(null==n)this.promise=Promise.resolve(""),this.length=0;else{var u=""+n;this.promise=Promise.resolve(u),this.type="text/plain;charset=UTF-8",this.calcLength=function(){return fe(u).length}}},[{key:"type",get:function(){return this._type},set:function(e){this._type||(this._type=e)}},{key:"size",get:function(){var e;return"number"!=typeof this.length&&this.calcLength&&(this.length=this.calcLength()),null!==(e=this.length)&&void 0!==e?e:0}},{key:"text",value:function(){return this.promise.then(function(e){return"string"==typeof e?e:le(e)})}},{key:"arrayBuffer",value:function(){return this.promise.then(function(e){return C(e)?e:fe(e).buffer})}}])}(),lt=function(){return r(function e(){if(t(this,e),this.constructor===e)throw new TypeError("Failed to construct 'Body': Illegal constructor");v(this,"__Body__",new ht)},[{key:"bodyUsed",get:function(){return dt(this).bodyUsed}},{key:"body",get:function(){throw new TypeError("Failed to access 'body' on '".concat(y(this),"': property not implemented."))}},{key:"arrayBuffer",value:function(){var e="arrayBuffer";return vt(this,e)||yt(this,e)}},{key:"blob",value:function(){var e="blob";return vt(this,e)||yt(this,e)}},{key:"bytes",value:function(){var e="bytes";return vt(this,e)||yt(this,e)}},{key:"formData",value:function(){var e="formData";return vt(this,e)||yt(this,e)}},{key:"json",value:function(){var e="json";return vt(this,e)||yt(this,e)}},{key:"text",value:function(){var e="text";return vt(this,e)||yt(this,e)}},{key:"toString",value:function(){return"[object Body]"}},{key:f.toStringTag,get:function(){return"Body"}},{key:"__MPHTTPX__",get:function(){return{chain:["Body"]}}}])}(),ht=r(function e(){t(this,e),this.bodyUsed=!1});function dt(e){return e.__Body__}function pt(e,t){var n,r,o=e;if(r="[object ReadableStream]",(n=t)&&"object"===c(n)&&"getReader"in n&&"function"==typeof n.getReader&&(Object.prototype.toString.call(n)===r||g(n)===r))throw new TypeError("Failed to construct '".concat(y(o),"': ReadableStream not implemented."));null!=t&&(dt(o).payload=new ct(t))}function yt(e,t){var n=dt(e).payload||new ct;return"json"===t?n.text().then(function(e){return JSON.parse(e)}):"text"===t?n.text():"arrayBuffer"===t?n.arrayBuffer():"bytes"===t?n.arrayBuffer().then(function(e){return new Uint8Array(e)}):"blob"===t?n.promise.then(function(e){return new Te([e])}):"formData"===t?n.text().then(function(e){return function(e,t){var n=function(){throw new TypeError("Could not parse content as FormData.")};"string"==typeof e&&""!==e.trim()||n();var r=e.indexOf("\r\n");-1===r&&n();var o=e.substring(2,r).trim();o||n(),void 0!==t&&t!==o&&n();var i=e.split("--".concat(o)).filter(function(e){var t=e.trim();return""!==t&&"--"!==t});0===i.length&&n();var a=[],u=!1;i.forEach(function(e){var t=e.indexOf("\r\n\r\n");-1===t&&n();var r=e.substring(0,t).trim(),o=r.match(/name="([^"]*)"/);(!o||o.length<2)&&n();var i=o[1],s=r.match(/filename="([^"]*)"/),c=e.substring(t+4);if(s){var f=s[1]||"",l=r.match(/Content-Type: ([^\r\n]+)/),h=l?(l[1]||"").trim():"text/plain",d=c.replace(/\r\n/g,"");u=!0,a.push([i,new Pe([d],f,{type:h})])}else a.push([i,c.replace(/^[\r\n]+|[\r\n]+$/g,"")])});var s=new(!u||function(){try{var e=new st;return e.append("file",new Pe([],"")),"string"!=typeof e.get("file")}catch(e){return!1}}()?st:Qe);return a.forEach(function(e){s.append(e[0],e[1])}),s}(e,ut(n.type))}):n.promise}function vt(e,t){if(dt(e).payload){if(e.bodyUsed)return Promise.reject(new TypeError("Failed to execute '".concat(t,"' on '").concat(y(e),"': body stream already read")));dt(e).bodyUsed=!0}}var gt=function(){return r(function e(n){if(t(this,e),v(this,"__Headers__",new bt),void 0!==n)if(Et(n))n.forEach(function(e,t){_t(this,t,e,"")}.bind(this),this);else if(T(n))for(var r=Array.isArray(n)?n:Array.from(n),o=0;o<r.length;++o){var i=r[o];if(!T(i))throw new TypeError("Failed to construct 'Headers': The provided value cannot be converted to a sequence.");var a=Array.isArray(i)?i:Array.from(i);if(2!==a.length)throw new TypeError("Failed to construct 'Headers': Invalid value");_t(this,a[0],a[1])}else{if(!n||"object"!==c(n))throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(record<ByteString, ByteString> or sequence<sequence<ByteString>>)'.");Object.getOwnPropertyNames(n).forEach(function(e){_t(this,e,n[e])}.bind(this),this)}},[{key:"append",value:function(e,t){kt(arguments.length,2,"append"),_t(this,e,t,"append")}},{key:"delete",value:function(e){kt(arguments.length,1,"delete"),delete mt(this).dict[wt(e,Tt("delete"))]}},{key:"get",value:function(e){var t;return kt(arguments.length,1,"get"),null!==(t=mt(this).dict[wt(e,Tt("get"))])&&void 0!==t?t:null}},{key:"getSetCookie",value:function(){var e=this.get("Set-Cookie");return e?e.split(", "):[]}},{key:"has",value:function(e){return kt(arguments.length,1,"has"),mt(this).dict.hasOwnProperty(wt(e,Tt("has")))}},{key:"set",value:function(e,t){kt(arguments.length,2,"set"),mt(this).dict[wt(e,Tt("set"))]=St(t)}},{key:"forEach",value:function(e,t){if(kt(arguments.length,1,"forEach"),"function"!=typeof e)throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.");for(var n=mt(this).dict,r=Object.getOwnPropertyNames(n),o=0;o<r.length;++o){var i=r[o];e.call(t,n[i],i,this)}}},{key:"entries",value:function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),k(e)}},{key:"keys",value:function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),k(e.map(function(e){return e[0]}))}},{key:"values",value:function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),k(e.map(function(e){return e[1]}))}},{key:f.iterator,value:function(){return this.entries()}},{key:"toString",value:function(){return"[object Headers]"}},{key:f.toStringTag,get:function(){return"Headers"}},{key:"__MPHTTPX__",get:function(){return{chain:["Headers"]}}}])}(),bt=r(function e(){t(this,e),this.dict={}});function mt(e){return e.__Headers__}function _t(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"constructor",o=wt(t,r?Tt(r):void 0),i=St(n),a=mt(e).dict,u=a[o];a[o]=void 0!==u?"".concat(u,", ").concat(i):i}function Tt(e){return function(){throw new TypeError("Failed to ".concat(e&&"constructor"!==e?"execute '"+e+"' on":"construct"," 'Headers': Invalid name"))}}function kt(e,t,n){E(e,t,"Headers",n)}function Et(e){return m("Headers",e)||function(e){var t="[object Headers]";return!!e&&"object"===c(e)&&"forEach"in e&&"function"==typeof e.forEach&&(Object.prototype.toString.call(e)===t||g(e)===t)}(e)}function wt(e,t){return"string"!=typeof e&&(e=""+e),t&&(/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)&&t(),e.toLowerCase()}function St(e){return"string"==typeof e?e:""+e}function Rt(e){var t=new xt;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substring(1,e.length):e}).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();try{t.append(r,o)}catch(e){console.warn("SyntaxError: Response.headers: '".concat(r,"' is not a valid HTTP header field name."))}}}),t}function Pt(e){if(m("Headers",e)&&xt!==gt){var t=new xt;return e.forEach(function(e,n){t.append(n,e)}),t}return new xt(e)}var xt=function(){return"undefined"!=typeof Headers&&Headers||gt}(),qt=function(n,o){function a(n,r){var o;t(this,a),E(arguments.length,1,"Request"),v(o=e(this,a),"__Request__",new At);var i=Ct(o),u=null!=r?r:{};if("object"!==c(u))throw new TypeError("Failed to construct 'Request': The provided value is not of type 'RequestInit'.");var s,f=u.body,l=!1;if(m("Request",s=n)||function(e){var t="[object Request]";return!!e&&"object"===c(e)&&"arrayBuffer"in e&&"function"==typeof e.arrayBuffer&&(Object.prototype.toString.call(e)===t||g(e)===t)}(s)){if(n.bodyUsed)throw new TypeError("Failed to construct 'Request': Cannot construct a Request with a Request object that has already been used.");i.cache=n.cache,i.credentials=n.credentials,void 0===u.headers&&(Ct(o).headers=Pt(n.headers)),i.method=n.method,i.mode=n.mode,i.signal=n.signal,i.url=n.url,f||(o.__Body__.payload=Ht(n),l=!0)}else i.url=""+n;if(u.cache&&(i.cache=u.cache),u.credentials&&(i.credentials=u.credentials),void 0!==u.headers&&(Ct(o).headers=Pt(u.headers)),u.method&&(i.method=jt(u.method)),u.mode&&(i.mode=u.mode),null!==u.signal&&void 0!==u.signal){if(!Y(u.signal))throw new TypeError("Failed to construct 'Request': Failed to read the 'signal' property from 'RequestInit': Failed to convert value to 'AbortSignal'.");i.signal=u.signal}if(("GET"===o.method||"HEAD"===o.method)&&null!=f)throw new TypeError("Failed to construct 'Request': Request with GET/HEAD method cannot have body.");pt(o,l?null:f);var h=o.__Body__.payload;return!o.headers.has("Content-Type")&&h&&h.type&&o.headers.set("Content-Type",h.type),"GET"!==o.method&&"HEAD"!==o.method||"no-cache"!==o.cache&&"no-store"!==o.cache||function(e){var t=/([?&])_=[^&]*/;if(t.test(e.url))Ct(e).url=e.url.replace(t,"$1_="+(new Date).getTime());else{var n=/\?/;Ct(e).url+=(n.test(e.url)?"&":"?")+"_="+(new Date).getTime()}}(o),o}return i(a,lt),r(a,[{key:"cache",get:function(){return Ct(this).cache}},{key:"credentials",get:function(){return Ct(this).credentials}},{key:"destination",get:function(){return""}},{key:"headers",get:function(){return Ct(this).headers||(Ct(this).headers=new xt),Ct(this).headers}},{key:"integrity",get:function(){return""}},{key:"keepalive",get:function(){return!1}},{key:"method",get:function(){return Ct(this).method}},{key:"mode",get:function(){return Ct(this).mode}},{key:"redirect",get:function(){return"follow"}},{key:"referrer",get:function(){return Ct(this).referrer}},{key:"referrerPolicy",get:function(){return""}},{key:"signal",get:function(){return Ct(this).signal||(Ct(this).signal=(new ce).signal),Ct(this).signal}},{key:"url",get:function(){return Ct(this).url}},{key:"clone",value:function(){if(this.bodyUsed)throw new TypeError("Failed to execute 'clone' on 'Request': Request body is already used");var e=new a(this);return this.__Body__.bodyUsed=!1,e}},{key:"toString",value:function(){return"[object Request]"}},{key:o,get:function(){return"Request"}},{key:"__MPHTTPX__",get:function(){return{chain:["Request","Body"]}}}])}(0,f.toStringTag),At=r(function e(){t(this,e),this.cache="default",this.credentials="same-origin",this.method="GET",this.mode="cors",this.referrer="about:client",this.url=""});function Ct(e){return e.__Request__}function Ht(e){var t=Object.create(ct.prototype);t.type=e.headers.get("Content-Type")||"";try{t.promise=e.arrayBuffer()}catch(n){try{t.promise=e.text()}catch(n){if("multipart/form-data"===t.type.slice(0,19).toLowerCase())try{t.promise=e.formData().then(function(e){return new ct(e,t.type).promise})}catch(e){}}}if(!t.promise)throw new TypeError("Failed to construct 'Request': Failed to read request body data, underlying data is in an invalid format.");return t}var Lt=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function jt(e){var t=e.toUpperCase();return Lt.indexOf(t)>-1?t:e}var Mt=function(){return"undefined"!=typeof Request&&Request||qt}(),Ot=function(n,o){function a(n,r){var o;t(this,a),v(o=e(this,a),"__Response__",new Ft);var i=Bt(o),u=null!=r?r:{};if("object"!==c(u))throw new TypeError("Failed to construct 'Response': The provided value is not of type 'ResponseInit'.");void 0!==u.headers&&(Bt(o).headers=Pt(u.headers));var s=void 0===u.status?200:u.status;if(s<200||s>599)throw new RangeError("Failed to construct 'Response': The status provided (".concat(+s,") is outside the range [200, 599]."));i.status=s,i.statusText=void 0===u.statusText?"":""+u.statusText,pt(o,n);var f=o.__Body__.payload;return!o.headers.has("Content-Type")&&f&&f.type&&o.headers.set("Content-Type",f.type),o}return i(a,lt),r(a,[{key:"headers",get:function(){return Bt(this).headers||(Bt(this).headers=new xt),Bt(this).headers}},{key:"ok",get:function(){return this.status>=200&&this.status<300}},{key:"redirected",get:function(){return!1}},{key:"status",get:function(){return Bt(this).status}},{key:"statusText",get:function(){return Bt(this).statusText}},{key:"type",get:function(){return Bt(this).type}},{key:"url",get:function(){return Bt(this).url}},{key:"clone",value:function(){if(this.bodyUsed)throw new TypeError("Failed to execute 'clone' on 'Response': Response body is already used");var e=new a(null,{headers:Pt(this.headers),status:this.status,statusText:this.statusText});return Bt(e).url=this.url,e.__Body__.payload=this.__Body__.payload,e}},{key:"toString",value:function(){return"[object Response]"}},{key:o,get:function(){return"Response"}},{key:"__MPHTTPX__",get:function(){return{chain:["Response","Body"]}}}],[{key:"json",value:function(e,t){E(arguments.length,1,"Response","json");var n=new a("string"==typeof e?e:JSON.stringify(e),t);return n.headers.set("Content-Type","application/json"),n}},{key:"error",value:function(){var e=new a(null,{status:200,statusText:""});return Bt(e).status=0,Bt(e).type="error",e}},{key:"redirect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:302;if(E(arguments.length,1,"Response","redirect"),-1===[301,302,303,307,308].indexOf(t))throw new RangeError("Failed to execute 'redirect' on 'Response': Invalid status code");return new a(null,{status:t,headers:{location:""+e}})}}])}(0,f.toStringTag),Ft=r(function e(){t(this,e),this.status=200,this.statusText="",this.type="default",this.url=""});function Bt(e){return e.__Response__}var Dt=function(){return"undefined"!=typeof Response&&Response||Ot}(),Ut={XMLHttpRequest:function(){return"undefined"!=typeof XMLHttpRequest&&XMLHttpRequest||void 0}()};function Nt(e){Ut.XMLHttpRequest=e}var It={value:!1};function Xt(e,t){if(this instanceof Xt)throw new TypeError("fetch is not a constructor");return E(arguments.length,1,"globalThis","fetch"),new Promise(function(n,r){var o=new qt(e,t),i=o.__Request__.signal;if(i&&i.aborted)return r(i.reason);var a,u,s=new(Ut.XMLHttpRequest||function(){throw new ReferenceError("XMLHttpRequest is not defined")}()),f=!1,l=o.__Body__.payload;if(s.onload=function(){var e={headers:Rt(s.getAllResponseHeaders()||""),status:s.status,statusText:s.statusText};0===o.url.indexOf("file://")&&(s.status<200||s.status>599)&&(e.status=200),setTimeout(function(){(a=new Ot("response"in s?s.response:s.responseText,e)).__Response__.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL")||"";var t=a.__Body__.payload,o=a.headers.get("Content-Type")||"";t&&o&&(t.type=o),f?r(zt()):n(a)},0)},s.onabort=function(){setTimeout(function(){r(zt())},0)},s.onerror=function(){setTimeout(function(){r(new TypeError("Failed to fetch"))},0)},s.ontimeout=function(){setTimeout(function(){r(new p("The request timed out.","TimeoutError"))},0)},s.open(o.method,""===(u=o.url)&&Gt&&(null===location||void 0===location?void 0:location.href)?location.href:u,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&(s.responseType="arraybuffer"),t&&"object"===c(t)&&t.headers&&"object"===c(t.headers)&&!Et(t.headers)){var h=t.headers,d=[];Object.getOwnPropertyNames(h).forEach(function(e){d.push(wt(e)),s.setRequestHeader(e,St(h[e]))}),o.headers.forEach(function(e,t){-1===d.indexOf(t)&&s.setRequestHeader(t,e)})}else o.headers.forEach(function(e,t){s.setRequestHeader(t,e)});if(i){var y=function(){a&&!a.bodyUsed&&((a.__Body__.payload=new ct).promise=Promise.reject(zt()));f=!0,s.abort(),v()},v=function(){i.removeEventListener("abort",y)};i.addEventListener("abort",y),s.onreadystatechange=function(){4===s.readyState&&v()}}l?l.promise.then(function(e){f?r(zt()):s.send(""!==e?Wt(e):void 0)}).catch(function(e){r(new TypeError("Failed to fetch")),console.error(e)}):s.send()})}function zt(){return new p("The user aborted a request.","AbortError")}var Gt=function(){return"undefined"!=typeof location&&!!location}();function Wt(e){return It.value&&"string"!=typeof e?le(e):e}var Vt=function(){return"undefined"!=typeof fetch&&fetch||Xt}(),Jt={value:!1};var Yt={value:null};function Qt(e){return!!e&&"object"===c(e)&&"function"==typeof(null==e?void 0:e.request)}function $t(){if(null!==Yt.value)return Yt.value;var e="undefined";return Yt.value=("undefined"==typeof wx?"undefined":c(wx))!==e&&Qt(wx)&&{mp:wx,name:"WeChat"}||("undefined"==typeof my?"undefined":c(my))!==e&&Qt(my)&&{mp:my,name:"Alipay"}||("undefined"==typeof qq?"undefined":c(qq))!==e&&Qt(qq)&&{mp:qq,name:"QQ"}||("undefined"==typeof jd?"undefined":c(jd))!==e&&Qt(jd)&&{mp:jd,name:"JD"}||("undefined"==typeof swan?"undefined":c(swan))!==e&&Qt(swan)&&{mp:swan,name:"Baidu"}||("undefined"==typeof tt?"undefined":c(tt))!==e&&Qt(tt)&&{mp:tt,name:"ByteDance"}||("undefined"==typeof ks?"undefined":c(ks))!==e&&Qt(ks)&&{mp:ks,name:"Kwai"}||("undefined"==typeof qh?"undefined":c(qh))!==e&&Qt(qh)&&{mp:qh,name:"Qihu"}||("undefined"==typeof xhs?"undefined":c(xhs))!==e&&Qt(xhs)&&{mp:xhs,name:"RedNote"}||("undefined"==typeof dd?"undefined":c(dd))!==e&&(Qt(dd)||"function"==typeof(null===dd||void 0===dd?void 0:dd.httpRequest))&&{mp:dd,name:"DingTalk"}||("undefined"==typeof bl?"undefined":c(bl))!==e&&Qt(bl)&&{mp:bl,name:"BiliBili"}||("undefined"==typeof ft?"undefined":c(ft))!==e&&Qt(ft)&&{mp:ft,name:"FinClip"}||("undefined"==typeof has?"undefined":c(has))!==e&&Qt(has)&&{mp:has,name:"HarmonyASCF"}||("undefined"==typeof uni?"undefined":c(uni))!==e&&Qt(uni)&&{mp:uni,name:"UniApp"}||("undefined"==typeof Taro?"undefined":c(Taro))!==e&&Qt(Taro)&&{mp:Taro,name:"Taro"}||void 0,Yt.value}var Kt=$t();function Zt(){return function(e){var t=e&&(e.mp.request||e.mp.httpRequest);return"function"==typeof t?t.bind(e.mp):t}(Kt)||function(e){var t="NOT_SUPPORTED_ERR",n={errMsg:t,errno:9,exception:{retryCount:0,reasons:[{errMsg:t,errno:9}]},useHttpDNS:!1};throw Promise.resolve(n).then(function(t){try{e.fail&&e.fail(t)}catch(e){console.error(e)}e.complete&&e.complete(t)}),new ReferenceError("request is not defined")}}var en={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Content Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},tn=function(n,o){function a(){var n;if(t(this,a),(n=e(this,a)).constructor===a)throw new TypeError("Failed to construct 'XMLHttpRequestEventTarget': Illegal constructor");return v(n,"__XMLHttpRequestEventTarget__",new nn(n)),n}return i(a,I),r(a,[{key:"onabort",get:function(){return rn(this).onabort},set:function(e){rn(this).onabort=e,rn(this).attach("abort")}},{key:"onerror",get:function(){return rn(this).onerror},set:function(e){rn(this).onerror=e,rn(this).attach("error")}},{key:"onload",get:function(){return rn(this).onload},set:function(e){rn(this).onload=e,rn(this).attach("load")}},{key:"onloadend",get:function(){return rn(this).onloadend},set:function(e){rn(this).onloadend=e,rn(this).attach("loadend")}},{key:"onloadstart",get:function(){return rn(this).onloadstart},set:function(e){rn(this).onloadstart=e,rn(this).attach("loadstart")}},{key:"onprogress",get:function(){return rn(this).onprogress},set:function(e){rn(this).onprogress=e,rn(this).attach("progress")}},{key:"ontimeout",get:function(){return rn(this).ontimeout},set:function(e){rn(this).ontimeout=e,rn(this).attach("timeout")}},{key:"toString",value:function(){return"[object XMLHttpRequestEventTarget]"}},{key:o,get:function(){return"XMLHttpRequestEventTarget"}},{key:"__MPHTTPX__",get:function(){return{chain:["XMLHttpRequestEventTarget","EventTarget"]}}}])}(0,f.toStringTag),nn=r(function e(n){var r;t(this,e),this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.attach=V(n,(r=n,{onabort:function(e){J(r,r.onabort,e)},onerror:function(e){J(r,r.onerror,e)},onload:function(e){J(r,r.onload,e)},onloadend:function(e){J(r,r.onloadend,e)},onloadstart:function(e){J(r,r.onloadstart,e)},onprogress:function(e){J(r,r.onprogress,e)},ontimeout:function(e){J(r,r.ontimeout,e)}}))});function rn(e){return e.__XMLHttpRequestEventTarget__}var on=function(n,o){function a(){var n;if(t(this,a),(n=e(this,a)).constructor===a)throw new TypeError("Failed to construct 'XMLHttpRequestUpload': Illegal constructor");return n}return i(a,tn),r(a,[{key:"toString",value:function(){return"[object XMLHttpRequestUpload]"}},{key:o,get:function(){return"XMLHttpRequestUpload"}},{key:"__MPHTTPX__",get:function(){return{chain:["XMLHttpRequestUpload","XMLHttpRequestEventTarget","EventTarget"]}}}])}(0,f.toStringTag);var an={request:Zt()};var un={get:null,set:null};var sn=function(n,o){function a(){var n;return t(this,a),v(n=e(this,a),"__XMLHttpRequest__",new cn(n)),n}return i(a,tn),r(a,[{key:"UNSENT",get:function(){return 0}},{key:"OPENED",get:function(){return 1}},{key:"HEADERS_RECEIVED",get:function(){return 2}},{key:"LOADING",get:function(){return 3}},{key:"DONE",get:function(){return 4}},{key:"readyState",get:function(){return fn(this).readyState}},{key:"response",get:function(){return fn(this).response}},{key:"responseText",get:function(){return fn(this).responseText}},{key:"responseType",get:function(){return fn(this).responseType},set:function(e){if(fn(this).pos>9)throw new p("Failed to set the 'responseType' property on 'XMLHttpRequest': The response type cannot be set if the object's state is LOADING or DONE.","InvalidStateError");hn.indexOf(e)>-1&&(fn(this).responseType=e)}},{key:"responseURL",get:function(){return fn(this).responseURL}},{key:"responseXML",get:function(){return null}},{key:"status",get:function(){return fn(this).status}},{key:"statusText",get:function(){return fn(this).pos<9?"":fn(this).statusText||en[this.status]||"unknown"}},{key:"timeout",get:function(){return fn(this).timeout},set:function(e){fn(this).timeout=e>=0?e:0}},{key:"upload",get:function(){var e;return fn(this).upload||(fn(this).upload=(v(e=Object.create(on.prototype),"__EventTarget__",{executors:[]}),v(e,"__XMLHttpRequestEventTarget__",new nn(e)),e)),fn(this).upload}},{key:"withCredentials",get:function(){return fn(this).withCredentials},set:function(e){if(!(fn(this).pos<2))throw new TypeError("Failed to set the 'withCredentials' property on 'XMLHttpRequest': The value may only be set if the object's state is UNSENT or OPENED.");fn(this).withCredentials=!!e}},{key:"abort",value:function(){var e=fn(this),t=e.requestTask;switch(e.pos){case 1:e.requestHeaders=new xt;break;case 2:case 3:!function(e){fn(e).pos=5,bn(e,4),fn(e).upload&&He(e.upload,"abort");Tn(e,"abort")}(this),_n(this);break;case 4:case 8:case 9:case 10:kn(this);case 11:_n(this)}pn(e),mn(t)}},{key:"getAllResponseHeaders",value:function(){var e=fn(this).responseHeaders;if(!e)return"";var t=[];return e.forEach(function(e,n){t.push("".concat(n,": ").concat(e,"\r\n"))}),t.join("")}},{key:"getResponseHeader",value:function(e){return E(arguments.length,1,"XMLHttpRequest","getResponseHeader"),fn(this).responseHeaders?fn(this).responseHeaders.get(e):null}},{key:"open",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;E(arguments.length,2,"XMLHttpRequest","open"),n||console.warn("Synchronous XMLHttpRequest is not supported because of its detrimental effects to the end user's experience.");var i,a=jt(e),u=""+t,s=""+(null!=r?r:""),c=""+(null!=o?o:""),f=fn(this);if(pn(f),f.method=a,f.requestURL=u,f.requestHeaders=new xt,s.length>0||c.length>0){var l="Basic ".concat(De(fe(s+":"+c)));this.setRequestHeader("Authorization",l)}fn(i=this).pos=1,fn(i).requestId+=1,bn(i,1)}},{key:"overrideMimeType",value:function(e){E(arguments.length,1,"XMLHttpRequest","overrideMimeType"),1===fn(this).pos&&console.error("TypeError: Failed to execute 'overrideMimeType' on 'XMLHttpRequest': mimeType ('".concat(e,"') not implemented."))}},{key:"send",value:function(e){var t=fn(this),n=t.requestId;if(1!==t.pos)throw new p("Failed to execute 'send' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");var r={url:t.requestURL,method:t.method,header:ln(t.requestHeaders),dataType:"json"===this.responseType?"json":dn(this.responseType),responseType:dn(this.responseType),withCredentials:this.withCredentials,success:vn.bind(this,n),fail:gn.bind(this,n)};if(un.get&&!t.requestHeaders.has("cookie")){var o=un.get(r.url,this.withCredentials);o&&(r.enableCookie=!0,r.header.Cookie=o)}var i="GET"!==t.method&&"HEAD"!==t.method&&null!=e&&new ct(e);i&&i.type&&!t.requestHeaders.has("Content-Type")&&(r.header["Content-Type"]=i.type);var a=function(e){n===t.requestId&&(2!==t.pos&&8!==t.pos||(r.headers=r.header,r.data=e?Wt(e):void 0,t.requestTask=an.request(r)))}.bind(this);!function(e){if(!e.timeout)return;var t=fn(e),n=function(){switch(t.pos){case 2:case 3:!function(e){fn(e).pos=7,bn(e,4),fn(e).upload&&He(e.upload,"timeout");Tn(e,"timeout")}(e);break;case 8:wn(e)}};t.timeoutId=setTimeout(function(){var e=t.requestTask;n(),mn(e)},e.timeout)}(this);var u=function(e,t){return fn(e).pos=2,He(e,"loadstart"),t&&function(e,t){var n=fn(e),r=n.requestId;if(2!==n.pos)return;n.pos=3,n.upload&&He(e.upload,"loadstart",0,t.size);return t.promise.then(function(o){if(r===n.requestId)return function(e,t,n){var r=fn(e);if(3!==r.pos)return;r.pos=4,r.upload&&t.size>0&&He(e.upload,"load",t.size,t.size);return Tn(e,"load",{payload:t,data:n})}(e,t,o)}).catch(function(t){r===n.requestId&&(!function(e){var t=fn(e);if(3!==t.pos)return;t.pos=6,bn(e,4),t.upload&&He(e.upload,"error");Tn(e,"error")}(e),console.error(t))})}(e,t)}(this,i||void 0);u?u.then(function(e){void 0!==e&&a(e)}):a()}},{key:"setRequestHeader",value:function(e,t){if(E(arguments.length,2,"XMLHttpRequest","setRequestHeader"),1!==fn(this).pos)throw new p("Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");var n=""+e,r=""+t;try{fn(this).requestHeaders.append(n,r)}catch(e){throw new SyntaxError("Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '".concat(n,"' is not a valid HTTP header field name."))}}},{key:"onreadystatechange",get:function(){return fn(this).onreadystatechange},set:function(e){fn(this).onreadystatechange=e,fn(this).attach("readystatechange")}},{key:"toString",value:function(){return"[object XMLHttpRequest]"}},{key:o,get:function(){return"XMLHttpRequest"}},{key:"__MPHTTPX__",get:function(){return{chain:["XMLHttpRequest","XMLHttpRequestEventTarget","EventTarget"]}}}],[{key:"UNSENT",get:function(){return 0}},{key:"OPENED",get:function(){return 1}},{key:"HEADERS_RECEIVED",get:function(){return 2}},{key:"LOADING",get:function(){return 3}},{key:"DONE",get:function(){return 4}}])}(0,f.toStringTag),cn=r(function e(n){var r;t(this,e),this.pos=0,this.readyState=0,this.response="",this.responseText="",this.responseType="",this.responseURL="",this.status=0,this.statusText="",this.timeout=0,this.withCredentials=!1,this.method="GET",this.requestURL="",this.requestHeaders=null,this.responseHeaders=null,this.timeoutId=0,this.requestId=0,this.requestTask=null,this.onreadystatechange=null,this.attach=V(n,(r=n,{onreadystatechange:function(e){J(r,r.onreadystatechange,e)}}))});function fn(e){return e.__XMLHttpRequest__}function ln(e){var t={};return e.forEach(function(e,n){t[n]=e}),t}var hn=["","arraybuffer","blob","document","json","text"];function dn(e){return"blob"===e||"arraybuffer"===e?"arraybuffer":"text"}function pn(e){e.requestTask=null,yn(e),e.response="",e.responseText="",e.responseURL="",e.status=0,e.statusText="",e.requestHeaders=null,e.responseHeaders=null}function yn(e){e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=0)}function vn(e,t){e===fn(this).requestId&&function(e,t){var n=fn(e);if(2!==n.pos&&8!==n.pos)return;if(n.pos=9,n.responseURL=n.requestURL,n.status="statusCode"in t?t.statusCode:"status"in t?t.status:200,n.responseHeaders=new xt("header"in t?t.header:"headers"in t?t.headers:{}),un.set){var r="cookies"in t&&Array.isArray(t.cookies)?t.cookies:n.responseHeaders.get("Set-Cookie")||"";r.length>0&&un.set(e.responseURL,e.withCredentials,r)}bn(e,2),function(e,t){if(9!==fn(e).pos)return;fn(e).pos=10,bn(e,3),function(e,t){var n=fn(e);if(10!==n.pos)return;n.pos=11;var r=function(){var r;n.response=function(e,t){var n="string"==typeof t||C(t)?t:JSON.stringify(t);switch(e){case"":case"text":return"string"==typeof n?n:le(n);case"arraybuffer":return C(n)?n:fe(n).buffer;case"json":return"string"==typeof t?JSON.parse(t):C(t)?JSON.parse(le(t)):t;case"blob":return new Te([n]);default:return n}}(e.responseType,null!==(r=t.data)&&void 0!==r?r:""),e.responseType&&"text"!==e.responseType||(n.responseText=e.response),bn(e,4),function(e){var t=fn(e);if(11!==t.pos)return;t.pos=12;var n=t.responseHeaders.get("Content-Length"),r=n&&parseInt(n)||0;He(e,"load",r,r),Sn(e,r)}(e)};try{r()}catch(t){En(e),console.error(t)}}(e,t)}(e,t)}(this,t)}function gn(e,t){if("header"in t&&"statusCode"in t||"headers"in t&&"status"in t)return vn.call(this,e,{statusCode:"statusCode"in t?t.statusCode:t.status||0,header:"header"in t?t.header:t.headers||{},data:"data"in t&&t.data||""});e===fn(this).requestId&&En(this,t)}function bn(e,t){if(e.readyState!==t){fn(e).readyState=t;var n=new j("readystatechange");n.__Event__.target=e,U(n,!0),W(e,n)}}function mn(e){e&&"object"===c(e)&&"abort"in e&&"function"==typeof e.abort&&e.abort()}function _n(e){fn(e).pos=0,fn(e).readyState=0}function Tn(e,t,n){var r=fn(e);if(("load"===t&&4===r.pos||"load"!==t)&&(r.pos=8),r.upload){var o=n?n.payload.size:0;He(e.upload,"loadend",o,o)}switch(t){case"load":return n&&n.data;case"abort":kn(e);break;case"error":En(e);break;case"timeout":wn(e)}}function kn(e){fn(e).pos=13,bn(e,4),He(e,"abort"),Sn(e)}function En(e,t){var n=fn(e);switch(n.pos){case 2:case 8:case 11:break;default:return}n.pos=14,t&&(n.status=0,n.statusText="errMsg"in t?t.errMsg:"errorMessage"in t?t.errorMessage:""),bn(e,4),He(e,"error"),Sn(e)}function wn(e){fn(e).pos=15,bn(e,4),He(e,"timeout"),Sn(e)}function Sn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=fn(e);n.pos=16,n.requestTask=null,yn(n),He(e,"loadend",t,t)}var Rn=function(){return"undefined"!=typeof XMLHttpRequest&&XMLHttpRequest||sn}(),Pn=function(){return Nt(Rn),[Vt,Xt]}(),xn=function(){return Pn[0]}(),qn=function(){return Pn[1]}(),An=function(n,o){function a(n,r){var o;t(this,a),v(o=e(this,a,[n,r]),"__CloseEvent__",new Cn);var i=Hn(o),u=Number(null==r?void 0:r.code);return i.code=isNaN(u)?0:u,void 0!==(null==r?void 0:r.reason)&&(i.reason=""+r.reason),i.wasClean=!!(null==r?void 0:r.wasClean),o}return i(a,j),r(a,[{key:"code",get:function(){return Hn(this).code}},{key:"reason",get:function(){return Hn(this).reason}},{key:"wasClean",get:function(){return Hn(this).wasClean}},{key:"toString",value:function(){return"[object CloseEvent]"}},{key:o,get:function(){return"CloseEvent"}},{key:"__MPHTTPX__",get:function(){return{chain:["CloseEvent","Event"]}}}])}(0,f.toStringTag),Cn=r(function e(){t(this,e),this.code=0,this.reason="",this.wasClean=!1});function Hn(e){return e.__CloseEvent__}var Ln=function(n,o){function a(n,r){var o,i;t(this,a),v(o=e(this,a,[n,r]),"__MessageEvent__",new jn);var u=Mn(o);return u.data=null!==(i=null==r?void 0:r.data)&&void 0!==i?i:null,void 0!==(null==r?void 0:r.origin)&&(u.origin=""+r.origin),void 0!==(null==r?void 0:r.lastEventId)&&(u.lastEventId=""+r.lastEventId),void 0!==(null==r?void 0:r.source)&&(u.source=r.source),void 0!==(null==r?void 0:r.ports)&&(u.ports=r.ports),o}return i(a,j),r(a,[{key:"data",get:function(){return Mn(this).data}},{key:"lastEventId",get:function(){return Mn(this).lastEventId}},{key:"origin",get:function(){return Mn(this).origin}},{key:"ports",get:function(){return Mn(this).ports}},{key:"source",get:function(){return Mn(this).source}},{key:"initMessageEvent",value:function(e,t,n,r,o,i,a,u){if(E(arguments.length,1,"MessageEvent","initMessageEvent"),!this.__Event__.eventDispatched){this.initEvent(e,t,n);var s=Mn(this);s.data=null!=r?r:null,void 0!==o&&(s.origin=""+o),void 0!==i&&(s.lastEventId=""+i),void 0!==a&&(s.source=a),void 0!==u&&(s.ports=Array.from(u))}}},{key:"toString",value:function(){return"[object MessageEvent]"}},{key:o,get:function(){return"MessageEvent"}},{key:"__MPHTTPX__",get:function(){return{chain:["MessageEvent","Event"]}}}])}(0,f.toStringTag),jn=r(function e(){t(this,e),this.data=null,this.lastEventId="",this.origin="",this.ports=[],this.source=null});function Mn(e){return e.__MessageEvent__}var On=$t();function Fn(){return function(e){var t=e&&e.mp.connectSocket;return"function"==typeof t?t.bind(e.mp):t}(On)||function(e){return{send:function(e){},close:function(e){},onOpen:function(e){},onMessage:function(e){},onError:function(e){"function"==typeof e&&(e({errMsg:"NOT_SUPPORTED_ERR",errno:9}),setTimeout(function(){throw new ReferenceError("connectSocket is not defined")},0))},onClose:function(e){"function"==typeof e&&setTimeout(function(){e({code:3009,reason:"NOT_SUPPORTED_ERR"})},0)}}}}var Bn={connectSocket:Fn()};var Dn=function(n,o){function a(n,r){var o;t(this,a),E(arguments.length,1,"WebSocket"),o=e(this,a);var i=""+n,u={url:i,multiple:!0,fail:function(e){console.error(e)}};void 0!==r&&(u.protocols=T(r)?Array.isArray(r)?r:Array.from(r):[""+r]);var s,f,l=Bn.connectSocket(u);if(v(o,"__WebSocket__",new Un(o,l)),Nn(o).url=i,!l||"object"!==c(l))throw new Error("connectSocket can't establish a connection to the server at ".concat(i,"."));return(f=Nn(s=o)).socketTask.onOpen(function(e){if("header"in e&&e.header&&"object"===c(e.header)){var t=new xt(e.header);f.protocol=t.get("Sec-WebSocket-Protocol")||""}f.readyState=1,In(s,"open")}),function(e){var t=Nn(e);t.socketTask.onClose(function(n){t.readyState=3;var r=new An("close",{wasClean:!t.error,code:n.code,reason:n.reason});U(r,!0),W(e,r)})}(o),function(e){var t=Nn(e);t.socketTask.onError(function(n){t.error=n,t.readyState=3,In(e,"error"),console.error(n)})}(o),function(e){Nn(e).socketTask.onMessage(function(t){var n,r=t.data;if(r&&"object"===c(r)&&"data"in r){if(n=r.data,"isBuffer"in r&&r.isBuffer&&"string"==typeof n)try{n=On.mp.base64ToArrayBuffer(n)}catch(e){}}else n=r;C(n)&&"blob"===e.binaryType&&(n=new Te([n]));var o=new Ln("message",{data:n,origin:e.url});U(o,!0),W(e,o)})}(o),o}return i(a,I),r(a,[{key:"CONNECTING",get:function(){return 0}},{key:"OPEN",get:function(){return 1}},{key:"CLOSING",get:function(){return 2}},{key:"CLOSED",get:function(){return 3}},{key:"binaryType",get:function(){return Nn(this).binaryType},set:function(e){"blob"!==e&&"arraybuffer"!==e||(Nn(this).binaryType=e)}},{key:"bufferedAmount",get:function(){return Nn(this).bufferedAmount}},{key:"extensions",get:function(){return""}},{key:"protocol",get:function(){return Nn(this).protocol}},{key:"readyState",get:function(){return Nn(this).readyState}},{key:"url",get:function(){return Nn(this).url}},{key:"close",value:function(e,t){var n=Nn(this);2!==this.readyState&&3!==this.readyState&&(n.readyState=2,n.socketTask.close({code:e,reason:t,fail:function(e){console.error(e)},complete:function(){n.readyState=3}}))}},{key:"send",value:function(e){if(E(arguments.length,1,"WebSocket","send"),0===this.readyState)throw new p("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.","InvalidStateError");if(2===this.readyState||3===this.readyState)return console.error("WebSocket is already in CLOSING or CLOSED state.");var t=function(e){1===this.readyState&&Nn(this).socketTask.send({data:e,fail:function(e){console.error(e)}})}.bind(this);if("string"!=typeof e&&!C(e)&&!me(e)&&!H(e))return t(e);var n=function(e){return"string"==typeof e?Promise.resolve(e):C(e)?Promise.resolve(e.slice(0)):H(e)?Promise.resolve(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)):me(e)?e.arrayBuffer():Promise.resolve(""+e)}(e);n.then(function(e){t(e)})}},{key:"onclose",get:function(){return Nn(this).onclose},set:function(e){Nn(this).onclose=e,Nn(this).attach("close")}},{key:"onerror",get:function(){return Nn(this).onerror},set:function(e){Nn(this).onerror=e,Nn(this).attach("error")}},{key:"onmessage",get:function(){return Nn(this).onmessage},set:function(e){Nn(this).onmessage=e,Nn(this).attach("message")}},{key:"onopen",get:function(){return Nn(this).onopen},set:function(e){Nn(this).onopen=e,Nn(this).attach("open")}},{key:"toString",value:function(){return"[object WebSocket]"}},{key:o,get:function(){return"WebSocket"}},{key:"__MPHTTPX__",get:function(){return{chain:["WebSocket","EventTarget"]}}}],[{key:"CONNECTING",get:function(){return 0}},{key:"OPEN",get:function(){return 1}},{key:"CLOSING",get:function(){return 2}},{key:"CLOSED",get:function(){return 3}}])}(0,f.toStringTag),Un=r(function e(n,r){var o;t(this,e),this.binaryType="blob",this.bufferedAmount=0,this.protocol="",this.readyState=0,this.url="",this.error=null,this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this.socketTask=r,this.attach=V(n,(o=n,{onclose:function(e){J(o,o.onclose,e)},onerror:function(e){J(o,o.onerror,e)},onmessage:function(e){J(o,o.onmessage,e)},onopen:function(e){J(o,o.onopen,e)}}))});function Nn(e){return e.__WebSocket__}function In(e,t){var n=new j(t);n.__Event__.target=e,U(n,!0),W(e,n)}var Xn=function(){return"undefined"!=typeof WebSocket&&WebSocket||Dn}();exports.AbortController=ce,exports.AbortControllerP=ue,exports.AbortSignal=ae,exports.AbortSignalP=te,exports.Blob=Te,exports.BlobP=de,exports.CustomEvent=ee,exports.CustomEventP=$,exports.Event=N,exports.EventP=j,exports.EventTarget=Q,exports.EventTargetP=I,exports.File=Pe,exports.FileP=Se,exports.FileReader=Ue,exports.FileReaderP=Le,exports.FormData=st,exports.FormDataP=Qe,exports.Headers=xt,exports.HeadersP=gt,exports.Request=Mt,exports.RequestP=qt,exports.Response=Dt,exports.ResponseP=Ot,exports.TextDecoder=L,exports.TextDecoderP=x,exports.TextEncoder=R,exports.TextEncoderP=w,exports.URLSearchParams=Ye,exports.URLSearchParamsP=Ne,exports.WebSocket=Xn,exports.WebSocketP=Dn,exports.XMLHttpRequest=Rn,exports.XMLHttpRequestP=sn,exports.fetch=xn,exports.fetchP=qn,exports.fixFetch=function(e){var t=e||"undefined"!=typeof fetch&&fetch;if(!t||t===Xt)return Xt;if("__MPHTTPX__Polyfill__"in t)return t;function n(e,t){if(e.headers){if((l=e.headers)&&"object"===c(l)&&"has"in l&&"function"==typeof l.has&&"set"in l&&"function"==typeof l.set)e.headers.has("Content-Type")||e.headers.set("Content-Type",t);else if(T(e.headers)){for(var n=!1,r=Array.isArray(e.headers)?e.headers:Array.from(e.headers),o=0;o<r.length;++o){var i=r[o];if(T(i)){var a=Array.isArray(i)?i:Array.from(i);if(a.length>=2&&"content-type"===String(a[0]).toLowerCase()){n=!0;break}}}n||(r.push(["Content-Type",t]),e.headers=r)}else if("object"===c(e.headers)){for(var u=!1,s=Object.getOwnPropertyNames(e.headers),f=0;f<s.length;++f){if("content-type"===s[f].toLowerCase()){u=!0;break}}u||(e.headers["Content-Type"]=t)}}else e.headers={"Content-Type":t};var l}function r(e){return!!e&&"object"===c(e)&&"signal"in e&&Y(e.signal)&&e.signal}function o(e,o){if(m("Request",e)){var i=e,a=null!=o?o:{};"object"!==c(a)&&(a={}),a.method||(a.method=i.method),a.headers||(a.headers=i.headers),a.mode||(a.mode=i.mode),a.cache||(a.cache=i.cache),a.credentials||(a.credentials=i.credentials),!a.signal&&i.__Request__.signal&&(a.signal=i.signal),a.body||(a.body=Ht(i)),e=i.url,o=a}if(o&&o.headers&&m("Headers",o.headers))if("undefined"!=typeof Headers&&Headers&&!("__MPHTTPX__"in Headers.prototype)){var u=new Headers;o.headers.forEach(function(e,t){u.append(t,e)}),o.headers=u}else{var s={};o.headers.forEach(function(e,t){s[t]=e}),o.headers=s}return new Promise(function(i,a){o&&o.body&&(Jt.value?rt(o.body):m("FormData",o.body))&&(o.body=ot(o.body));var u=o&&o.body&&((Jt.value?me(o.body):m("Blob",o.body))&&new ct(o.body)||ct.prototype.isPrototypeOf(o.body)&&o.body);if(u){u.type&&n(o,u.type);var s=r(o)||r(e),c=null,f=!1,l=!0;if(s){var h=function(){l&&(f=!0),c()};c=function(){s.removeEventListener("abort",h)},s.addEventListener("abort",h)}u.promise.then(function(n){o.body=""!==n?Wt(n):null,f?a(new p("The user aborted a request.","AbortError")):i(t.call(this,e,o)),l=!1}.bind(this)).catch(function(e){a(new TypeError("Failed to fetch")),l=!1,console.error(e)}).then(function(){c&&c()})}else o&&o.body&&(Jt.value?Je(o.body):m("URLSearchParams",o.body))&&(n(o,"application/x-www-form-urlencoded;charset=UTF-8"),o.body=o.body.toString()),i(t.call(this,e,o))}.bind(this))}return o.__MPHTTPX__Polyfill__=!0,o},exports.fixWebSocket=function(e){var t=e||"undefined"!=typeof WebSocket&&WebSocket;if(t&&!("__MPHTTPX__Polyfill__"in t)&&!("__MPHTTPX__"in t.prototype)){var n=t.prototype.send;t.prototype.send=function(e){if(Jt.value?me(e):m("Blob",e)){if(0===this.readyState)throw new p("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.","InvalidStateError");if(2===this.readyState||3===this.readyState)return console.error("WebSocket is already in CLOSING or CLOSED state.");e.arrayBuffer().then(function(e){1===this.readyState&&n.call(this,e)}.bind(this))}else n.call(this,e)},t.__MPHTTPX__Polyfill__=!0}},exports.fixXMLHttpRequest=function(e){var n=e||"undefined"!=typeof XMLHttpRequest&&XMLHttpRequest;if(n&&!("__MPHTTPX__Polyfill__"in n)&&!("__MPHTTPX__"in n.prototype)){var o=n.prototype.abort,i=n.prototype.open,a=n.prototype.send,u=n.prototype.setRequestHeader;n.prototype.abort=function(){c(this).processing&&(c(this).aborted=!0),o.call(this),c(this).hasContentType=!1},n.prototype.open=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;c(this).processing&&(c(this).aborted=!0),i.call(this,e,t,n,r,o),c(this).hasContentType=!1},n.prototype.send=function(e){if((Jt.value?rt(e):m("FormData",e))&&(e=ot(e),c(this).hasContentType||this.setRequestHeader("Content-Type",e.type)),Jt.value?me(e):m("Blob",e)){var t=new ct(e);t.type&&!c(this).hasContentType&&this.setRequestHeader("Content-Type",t.type);var n=this.withCredentials;c(this).processing=!0,t.promise.then(function(e){c(this).aborted||(n!==this.withCredentials&&(this.withCredentials=n,console.warn("Illegal to set the 'withCredentials' property on 'XMLHttpRequest': The value may only be set if the object's state is UNSENT or OPENED.")),a.call(this,""!==e?Wt(e):void 0)),c(this).aborted=!1,c(this).processing=!1}.bind(this)).catch(function(e){c(this).aborted=!1,c(this).processing=!1,console.error(e)}.bind(this))}else(Jt.value?Je(e):m("URLSearchParams",e))&&(c(this).hasContentType||this.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"),e=e.toString()),a.call(this,e)},n.prototype.setRequestHeader=function(e,t){if(c(this).processing)throw new p("Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");u.call(this,e,t),"content-type"===String(e).toLowerCase()&&(c(this).hasContentType=!0)},n.__MPHTTPX__Polyfill__=!0;var s=r(function e(){t(this,e),this.aborted=!1,this.processing=!1,this.hasContentType=!1})}function c(e){var t="__XMLHttpRequest_Polyfill__";return t in e||v(e,t,new s),e[t]}},exports.getPlatform=$t,exports.setConnectSocketFunc=function(e,t){Bn.connectSocket="function"==typeof e&&void 0!==t?e.bind(t):e},exports.setFullOverride=function(e){Jt.value=!!e},exports.setReadableStreamClass=function(e){he.ReadableStream=e},exports.setRequestFunc=function(e,t){an.request="function"==typeof e&&void 0!==t?e.bind(t):e},exports.setTextMode=function(e){It.value=!!e},exports.setXMLHttpRequestClass=Nt,exports.useCookie=function(e){un.get=function(t,n){return e.get(t,n)},un.set=function(t,n,r){return e.set(t,n,r)}};
|