mphttpx 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ const t=Symbol("isPolyfill"),e=Symbol("INTERNAL_STATE"),r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{};function s(t,e){return Object.prototype.toString.call(e)===`[object ${t}]`}function n(e,r){return!!r&&"object"==typeof r&&"isPolyfill"in r&&!!r.isPolyfill&&"object"==typeof r.isPolyfill&&"symbol"in r.isPolyfill&&r.isPolyfill.symbol===t&&"hierarchy"in r.isPolyfill&&Array.isArray(r.isPolyfill.hierarchy)&&r.isPolyfill.hierarchy.includes(e)}class o extends Error{constructor(t,e){super(),this.message=t??this.message,this.name=e??this.name}}function i(t,e){Object.defineProperty(t.prototype,Symbol.toStringTag,{configurable:!0,value:e})}class a{get encoding(){return"utf-8"}encode(t=""){return l(t).encoded}encodeInto(t,e){const r=l(t,e);return{read:r.read,written:r.written}}toString(){return"[object TextEncoder]"}get isPolyfill(){return{symbol:t,hierarchy:["TextEncoder"]}}}function l(t,e){const r=void 0!==e;let s=0,n=0,o=t.length,i=0,a=Math.max(32,o+(o>>1)+7),l=r?e:new Uint8Array(a>>3<<3);for(;s<o;){let e,h=t.charCodeAt(s++);if(h>=55296&&h<=56319)if(s<o){let e=t.charCodeAt(s);56320==(64512&e)?(++s,h=((1023&h)<<10)+(1023&e)+65536):h=65533}else h=65533;else h>=56320&&h<=57343&&(h=65533);if(!r&&i+4>l.length){a+=8,a*=1+s/t.length*2,a=a>>3<<3;let e=new Uint8Array(a);e.set(l),l=e}if(4294967168&h?4294965248&h?4294901760&h?4292870144&h?(h=65533,e=3):e=4:e=3:e=2:e=1,r&&i+e>l.length)break;1===e?l[i++]=h:2===e?(l[i++]=h>>6&31|192,l[i++]=63&h|128):3===e?(l[i++]=h>>12&15|224,l[i++]=h>>6&63|128,l[i++]=63&h|128):4===e&&(l[i++]=h>>18&7|240,l[i++]=h>>12&63|128,l[i++]=h>>6&63|128,l[i++]=63&h|128),n++}return{encoded:r?e.slice():l.slice(0,i),read:n,written:i}}i(a,"TextEncoder");const h=r.TextEncoder||a,u=Symbol("TextDecoderState");class c{constructor(t="utf-8",{fatal:e=!1,ignoreBOM:r=!1}={}){if(!f.includes(t.toLowerCase()))throw new RangeError("TextDecoder: The encoding label provided ('"+t+"') is invalid.");this[u]=new d,this[u].fatal=e,this[u].ignoreBOM=r}[u];get encoding(){return"utf-8"}get fatal(){return this[u].fatal}get ignoreBOM(){return this[u].ignoreBOM}decode(t,{stream:e=!1}={}){let r;if(void 0===t){if(this[u]._partial.length>0){if(this.fatal)throw new TypeError("TextDecoder: Incomplete UTF-8 sequence.");this[u]._partial=[]}return""}if(r=t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t),!this[u]._bomSeen&&this.ignoreBOM&&r.length>=3&&239===r[0]&&187===r[1]&&191===r[2]&&(r=r.subarray(3),this[u]._bomSeen=!0),this[u]._partial.length>0){let t=new Uint8Array(this[u]._partial.length+r.length);t.set(this[u]._partial,0),t.set(r,this[u]._partial.length),r=t,this[u]._partial=[]}let s=r.length,n=[];if(e&&r.length>0){let t=r.length;for(;t>0&&t>r.length-4;){let e=r[t-1];if(128!=(192&e)){g(e)>r.length-(t-1)&&(s=t-1);break}t--}this[u]._partial=Array.from(r.slice(s)),r=r.slice(0,s)}let o=0;for(;o<s;){let t=r[o],e=null,i=g(t);if(o+i<=s){let s,n,a,l;switch(i){case 1:t<128&&(e=t);break;case 2:s=r[o+1],128==(192&s)&&(l=(31&t)<<6|63&s,l>127&&(e=l));break;case 3:s=r[o+1],n=r[o+2],128==(192&s)&&128==(192&n)&&(l=(15&t)<<12|(63&s)<<6|63&n,l>2047&&(l<55296||l>57343)&&(e=l));break;case 4:s=r[o+1],n=r[o+2],a=r[o+3],128==(192&s)&&128==(192&n)&&128==(192&a)&&(l=(15&t)<<18|(63&s)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(e=l))}}if(null===e){if(this.fatal)throw new TypeError("TextDecoder.decode: Decoding failed.");e=65533,i=1}else e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e);n.push(e),o+=i}let i="";for(let t=0,e=n.length;t<e;t+=4096)i+=String.fromCharCode.apply(String,n.slice(t,t+4096));return i}toString(){return"[object TextDecoder]"}get isPolyfill(){return{symbol:t,hierarchy:["TextDecoder"]}}}i(c,"TextDecoder");class d{fatal=!1;ignoreBOM=!1;_bomSeen=!1;_partial=[]}const f=["utf-8","utf8","unicode-1-1-utf-8"];function g(t){return t>239?4:t>223?3:t>191?2:1}const p=r.TextDecoder||c;class y{static NONE=0;static CAPTURING_PHASE=1;static AT_TARGET=2;static BUBBLING_PHASE=3;constructor(t,r){this[e]=new b,this[e].type=String(t),this[e].bubbles=!!r?.bubbles,this[e].cancelable=!!r?.cancelable,this[e].composed=!!r?.composed}[e];get type(){return this[e].type}get bubbles(){return this[e].bubbles}get cancelable(){return this[e].cancelable}get composed(){return this[e].composed}get target(){return this[e].target}get currentTarget(){return this[e].currentTarget}get eventPhase(){return this[e].eventPhase}NONE=y.NONE;CAPTURING_PHASE=y.CAPTURING_PHASE;AT_TARGET=y.AT_TARGET;BUBBLING_PHASE=y.BUBBLING_PHASE;get srcElement(){return this[e].target}cancelBubble=!1;get defaultPrevented(){return this[e].defaultPrevented}get returnValue(){return this[e].returnValue}set returnValue(t){t||this.preventDefault()}get isTrusted(){return this[e].isTrusted}get timeStamp(){return this[e].timeStamp}composedPath(){const t=this.target?[this.target]:[];return this.currentTarget&&this.currentTarget!==this.target&&t.push(this.currentTarget),t}initEvent=(t,r,s)=>{this[e]._dispatched||(this[e].type=String(t),this[e].bubbles=!!r,this[e].cancelable=!!s)};preventDefault=()=>{this[e]._passive?console.warn(`Ignoring 'preventDefault()' call on event of type '${this.type}' from a listener registered as 'passive'.`):this.cancelable&&(this[e]._preventDefaultCalled=!0,this[e].defaultPrevented=!0,this[e].returnValue=!1)};stopImmediatePropagation=()=>{this[e]._stopImmediatePropagationCalled=!0,this.cancelBubble=!0};stopPropagation(){this.cancelBubble=!0}toString(){return"[object Event]"}get isPolyfill(){return{symbol:t,hierarchy:["Event"]}}}i(y,"Event");class b{static TimeStamp=(new Date).getTime();type="";bubbles=!1;cancelable=!1;composed=!1;target=null;currentTarget=null;eventPhase=y.NONE;defaultPrevented=!1;returnValue=!0;isTrusted=!1;timeStamp=(new Date).getTime()-b.TimeStamp;_passive=!1;_dispatched=!1;_preventDefaultCalled=!1;_stopImmediatePropagationCalled=!1}const m=r.EventTarget?r.Event:y,E=Symbol("EventTargetState");class T{constructor(){this[E]=new w(this)}[E];addEventListener(t,e,r){const s=new _(t,e);if(s.options.capture="boolean"==typeof r?r:!!r?.capture,!this[E].executors.some(t=>t.equals(s))){if("object"==typeof r){const{once:t,passive:e,signal:n}=r;s.options.once=!!t,s.options.passive=!!e,n&&(s.options.signal=n,this[E].reply(n,s))}this[E].executors.push(s);const t=t=>t.options.capture?0:1;this[E].executors=this[E].executors.sort((e,r)=>t(e)-t(r))}}dispatchEvent(t){if("object"!=typeof t)throw new TypeError("EventTarget.dispatchEvent: Argument 1 is not an object.");if(!(t instanceof y))throw new TypeError("EventTarget.dispatchEvent: Argument 1 does not implement interface Event.");const r=t[e];return r.target=this,r.isTrusted=!1,this[E].fire(t)}removeEventListener(t,e,r){const s=new _(t,e);s.options.capture="boolean"==typeof r?r:!!r?.capture,this[E].executors.some(t=>t.equals(s))&&(this[E].executors=this[E].executors.filter(t=>!t.equals(s)))}toString(){return"[object EventTarget]"}get isPolyfill(){return{symbol:t,hierarchy:["EventTarget"]}}}i(T,"EventTarget");class w{constructor(t){this.target=t}target;executors=[];fire(t){const r=t[e];t.target||(r.target=this.target),r.currentTarget=this.target,r.eventPhase=y.AT_TARGET,r._dispatched=!0;const s=[];for(let e=0;e<this.executors.length;++e){const n=this.executors[e];if(n.type===t.type){r._passive=!!n.options.passive,n.options.once&&s.push(e);try{const{callback:e}=n;"function"==typeof e&&e.call(this.target,t)}catch(t){console.error(t)}if(r._passive=!1,r._stopImmediatePropagationCalled)break}}return s.length>0&&(this.executors=this.executors.reduce((t,e,r)=>(s.includes(r)||t.push(e),t),[])),r.currentTarget=null,r.eventPhase=y.NONE,r._dispatched=!1,!(t.cancelable&&r._preventDefaultCalled)}reply(t,e){try{const r=()=>{this.executors=this.executors.filter(t=>!t.equals(e)),t.removeEventListener("abort",r)};t.addEventListener("abort",r)}catch(t){console.error(t)}}}class _{static extract(t){return"function"==typeof t?t:function(t){return!!t&&"handleEvent"in t&&"function"==typeof t.handleEvent}(t)?t.handleEvent:t}constructor(t,e){this.type=String(t),this.callback=_.extract(e)}type;callback;options={};equals(t){return Object.is(this.type,t.type)&&Object.is(this.callback,t.callback)&&Object.is(this.options.capture,t.options.capture)}}function S(t,e,r){"function"==typeof e?this.addEventListener(t,r):this.removeEventListener(t,r)}function v(t,e){"function"==typeof t&&t.call(this,e)}const R=r.EventTarget||T,P=Symbol("CustomEventState");class A extends y{constructor(t,e){super(t,e),this[P]=new q,this[P].detail=e?.detail??null}[P];get detail(){return this[P].detail}initCustomEvent(t,r,s,n){this[e]._dispatched||(this.initEvent(t,r,s),this[P].detail=n??null)}toString(){return"[object CustomEvent]"}get isPolyfill(){return{symbol:t,hierarchy:["CustomEvent","Event"]}}}i(A,"CustomEvent");class q{detail}const C=r.EventTarget?r.CustomEvent:A,x=Symbol("ProgressEventState");class L extends y{constructor(t,e){super(t,e),this[x]=new O,this[x].lengthComputable=!!e?.lengthComputable,this[x].loaded=e?.loaded??0,this[x].total=e?.total??0}[x];get lengthComputable(){return this[x].lengthComputable}get loaded(){return this[x].loaded}get total(){return this[x].total}toString(){return"[object ProgressEvent]"}get isPolyfill(){return{symbol:t,hierarchy:["ProgressEvent","Event"]}}}i(L,"ProgressEvent");class O{lengthComputable=!1;loaded=0;total=0}const N=r.EventTarget?r.ProgressEvent:L;class D{constructor(t=[],r){if(!Array.isArray(t))throw new TypeError("First argument to Blob constructor must be an Array.");let s=null,o=t.reduce((t,r)=>(n("Blob",r)?t.push(r[e]._u8array):r instanceof ArrayBuffer||ArrayBuffer.isView(r)?t.push(j(r)):(s||(s=new a),t.push(s.encode(String(r)))),t),[]);this[e]=new H(function(t){const e=t.reduce((t,e)=>t+e.byteLength,0),r=new Uint8Array(e);return t.reduce((t,e)=>(r.set(e,t),t+e.byteLength),0),r}(o)),this[e].size=this[e]._u8array.length;const i=r?.type||"";this[e].type=/[^\u0020-\u007E]/.test(i)?"":i.toLowerCase()}[e];get size(){return this[e].size}get type(){return this[e].type}arrayBuffer(){return Promise.resolve(U(this[e]._u8array.buffer).buffer)}bytes(){return Promise.resolve(U(this[e]._u8array.buffer))}slice(t,r,s){const n=this[e]._u8array.slice(t??0,r??this[e]._u8array.length);return new D([n],{type:s??""})}stream(){throw new ReferenceError("ReadableStream is not defined")}text(){const t=new c;return Promise.resolve(t.decode(this[e]._u8array))}toString(){return"[object Blob]"}get isPolyfill(){return{symbol:t,hierarchy:["Blob"]}}}i(D,"Blob");class H{constructor(t){this._u8array=t}size=0;type="";_u8array}function j(t){return t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}function U(t){const e=j(t),r=new Uint8Array(new ArrayBuffer(e.byteLength));return r.set(e),r}const B=r.Blob||D,F=Symbol("FileState");class M extends D{constructor(t,e,r){super(t,r),this[F]=new I,this[F].lastModified=+(r?.lastModified?new Date(r.lastModified):new Date),this[F].name=e.replace(/\//g,":")}[F];get lastModified(){return this[F].lastModified}get name(){return this[F].name}get webkitRelativePath(){return""}toString(){return"[object File]"}get isPolyfill(){return{symbol:t,hierarchy:["File","Blob"]}}}i(M,"File");class I{lastModified=0;name=""}const k=r.Blob?r.File:M,G=Symbol("FileReaderState");class X extends T{static EMPTY=0;static LOADING=1;static DONE=2;constructor(){super(),this[G]=new $(this)}[G];get readyState(){return this[G].readyState}get result(){return this[G].result}EMPTY=0;LOADING=1;DONE=2;get error(){return this[G].error}abort(){this.readyState===X.LOADING&&(this[G].readyState=X.DONE,this[G].result=null,this[G].emitProcessEvent("abort"))}readAsArrayBuffer=t=>{this[G].read("readAsArrayBuffer",t,()=>{this[G].result=t[e]._u8array.buffer.slice(0)})};readAsBinaryString=t=>{this[G].read("readAsBinaryString",t,()=>{this[G].result=t[e]._u8array.reduce((t,e)=>t+=String.fromCharCode(e),"")})};readAsDataURL=t=>{this[G].read("readAsDataURL",t,()=>{this[G].result="data:"+t.type+";base64,"+function(t){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=[];for(var s=0;s<t.length;s+=3){let n=t[s],o=s+1<t.length,i=o?t[s+1]:0,a=s+2<t.length,l=a?t[s+2]:0,h=n>>2,u=(3&n)<<4|i>>4,c=(15&i)<<2|l>>6,d=63&l;a||(d=64,o||(c=64)),r.push(e[h],e[u],e[c],e[d])}return r.join("")}(t[e]._u8array)})};readAsText=(t,r)=>{this[G].read("readAsText",t,()=>{this[G].result=new c(r).decode(t[e]._u8array)})};get onabort(){return this[G].onabort}set onabort(t){this[G].onabort=t,this[G].attach("abort")}get onerror(){return this[G].onerror}set onerror(t){this[G].onerror=t,this[G].attach("error")}get onload(){return this[G].onload}set onload(t){this[G].onload=t,this[G].attach("load")}get onloadend(){return this[G].onloadend}set onloadend(t){this[G].onloadend=t,this[G].attach("loadend")}get onloadstart(){return this[G].onloadstart}set onloadstart(t){this[G].onloadstart=t,this[G].attach("loadstart")}get onprogress(){return this[G].onprogress}set onprogress(t){this[G].onprogress=t,this[G].attach("progress")}toString(){return"[object FileReader]"}get isPolyfill(){return{symbol:t,hierarchy:["FileReader","EventTarget"]}}}i(X,"FileReader");class ${constructor(t){this.target=t}target;readyState=X.EMPTY;result=null;error=null;read(t,e,r){if(!n("Blob",e))throw new TypeError("Failed to execute '"+t+"' on 'FileReader': parameter 1 is not of type 'Blob'.");this.error=null,this.readyState=X.LOADING,this.emitProcessEvent("loadstart",0,e.size),setTimeout(()=>{if(this.readyState===X.LOADING){this.readyState=X.DONE;try{r(),this.emitProcessEvent("load",e.size,e.size)}catch(t){this.result=null,this.error=t,this.emitProcessEvent("error",0,e.size)}}this.emitProcessEvent("loadend",this.result?e.size:0,e.size)})}emitProcessEvent(t,r=0,s=0){const n=new L(t,{lengthComputable:s>0,loaded:r,total:s});n[e].target=this.target,n[e].isTrusted=!0,this.target[E].fire(n)}attach(t){const e=this["on"+t],r=this["_on"+t];S.call(this.target,t,e,r)}onabort=null;_onabort=t=>{v.call(this.target,this.onabort,t)};onerror=null;_onerror=t=>{v.call(this.target,this.onerror,t)};onload=null;_onload=t=>{v.call(this.target,this.onload,t)};onloadend=null;_onloadend=t=>{v.call(this.target,this.onloadend,t)};onloadstart=null;_onloadstart=t=>{v.call(this.target,this.onloadstart,t)};onprogress=null;_onprogress=t=>{v.call(this.target,this.onprogress,t)}}const z=r.Blob?r.FileReader:X;class V{constructor(t,r){if(void 0!==t)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type\t'HTMLFormElement'.");if(r)throw new TypeError("Failed to construct 'FormData': parameter 2 is not of type 'HTMLElement'.");this[e]=new J}[e];append(t,r,s){this[e]._data.push(Y(t,r,s))}delete(t){const r=[];t=String(t),Q(this[e]._data,e=>{e[0]!==t&&r.push(e)}),this[e]._data=r}get(t){const r=this[e]._data;t=String(t);for(let e=0;e<r.length;++e)if(r[e][0]===t)return r[e][1];return null}getAll(t){const r=[];return t=String(t),Q(this[e]._data,e=>{e[0]===t&&r.push(e[1])}),r}has(t){t=String(t);for(let r=0;r<this[e]._data.length;++r)if(this[e]._data[r][0]===t)return!0;return!1}set(t,r,s){t=String(t);const n=[],o=Y(t,r,s);let i=!0;Q(this[e]._data,e=>{e[0]===t?i&&(i=!n.push(o)):n.push(e)}),i&&n.push(o),this[e]._data=n}forEach(t,e){for(const[r,s]of this)t.call(e,s,r,e)}entries(){return this[e]._data.values()}keys(){return this[e]._data.map(t=>t[0]).values()}values(){return this[e]._data.map(t=>t[1]).values()}[Symbol.iterator](){return this.entries()}toString(){return"[object FormData]"}get isPolyfill(){return{symbol:t,hierarchy:["FormData"]}}}i(V,"FormData");class J{_data=[];toBlob(){const t="----formdata-polyfill-"+Math.random(),e=`--${t}\r\nContent-Disposition: form-data; name="`;let r=[];for(const[t,s]of this._data.values())"string"==typeof s?r.push(e+W(K(t))+`"\r\n\r\n${K(s)}\r\n`):r.push(e+W(K(t))+`"; filename="${W(s.name)}"\r\nContent-Type: ${s.type||"application/octet-stream"}\r\n\r\n`,s,"\r\n");return r.push(`--${t}--`),new D(r,{type:"multipart/form-data; boundary="+t})}}function Y(t,e,r){return n("Blob",e)?(r=void 0!==r?String(r+""):"string"==typeof e.name?e.name:"blob",e.name===r&&"[object Blob]"!==Object.prototype.toString.call(e)||(e=new M([e],r)),[String(t),e]):[String(t),String(e)]}function K(t){return t.replace(/\r?\n|\r/g,"\r\n")}function Q(t,e){for(let r=0;r<t.length;++r)e(t[r])}function W(t){return t.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")}const Z=r.FormData||V;class et{constructor(t){let r=t||"";s("URLSearchParams",r)&&(r=r.toString()),this[e]=new rt,this[e]._dict=function(t){let e={};if("object"==typeof t)if(Array.isArray(t))for(let r=0;r<t.length;++r){let s=t[r];if(!Array.isArray(s)||2!==s.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");st(e,s[0],s[1])}else for(const r in t)t.hasOwnProperty(r)&&st(e,r,t[r]);else{0===t.indexOf("?")&&(t=t.slice(1));let r=t.split("&");for(let t=0;t<r.length;++t){let s=r[t],n=s.indexOf("=");-1<n?st(e,ot(s.slice(0,n)),ot(s.slice(n+1))):s&&st(e,ot(s),"")}}return e}(r)}[e];get size(){return Object.values(this[e]._dict).reduce((t,e)=>t+e.length,0)}append(t,r){st(this[e]._dict,t,r)}delete(t,r){let s={};for(let[n,o]of Object.entries(this[e]._dict))if(n!==t)Object.assign(s,{[n]:o});else if(void 0!==r){let t=o.filter(t=>t!==""+r);t.length>0&&Object.assign(s,{[n]:t})}this[e]._dict=s}get(t){return this.has(t)?this[e]._dict[t][0]??null:null}getAll(t){return this.has(t)?this[e]._dict[t].slice(0):[]}has(t,r){return!!it(this[e]._dict,t)&&(void 0===r||this[e]._dict[t].includes(""+r))}set(t,r){this[e]._dict[t]=[""+r]}sort(){let t=Object.keys(this[e]._dict);t.sort();let r={};for(let s of t)Object.assign(r,{[s]:this[e]._dict[s]});this[e]._dict=r}forEach(t,r){Object.entries(this[e]._dict).forEach(([e,s])=>{s.forEach(s=>{t.call(r,s,e,this)})})}entries(){return Object.entries(this[e]._dict).map(([t,e])=>e.map(e=>[t,e])).flat().values()}keys(){return Object.keys(this[e]._dict).values()}values(){return Object.values(this[e]._dict).flat().values()}[Symbol.iterator](){return this.entries()}toString(){let t=[];for(let[r,s]of Object.entries(this[e]._dict)){let e=nt(r);for(let r of s)t.push(e+"="+nt(r))}return t.join("&")}get isPolyfill(){return{symbol:t,hierarchy:["URLSearchParams"]}}}i(et,"URLSearchParams");class rt{_dict={}}function st(t,e,r){let s="string"==typeof r?r:null!=r&&"function"==typeof r.toString?r.toString():JSON.stringify(r);it(t,e)?t[e].push(s):t[e]=[s]}function nt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'\(\)~]|%20|%00/g,t=>e[t])}function ot(t){return t.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,t=>decodeURIComponent(t))}function it(t,e){return Object.prototype.hasOwnProperty.call(t,e)}const at=r.URLSearchParams||et;class lt extends T{static abort(t){const r=ut();return r[e].abort(t,!1),r}static any(t){const r=ut(),s=t.find(t=>t.aborted);if(s)r[e].abort(s.reason,!1);else{function n(s){for(const e of t)e.removeEventListener("abort",n);r[e].abort(this.reason,!0,s.isTrusted)}for(const o of t)o.addEventListener("abort",n)}return r}static timeout(t){const r=ut();return setTimeout(()=>{r[e].abort(new o("signal timed out","TimeoutError"))},t),r}constructor(){if(new.target===lt)throw new TypeError("Failed to construct 'AbortSignal': Illegal constructor");super(),this[e]=new ht(this)}[e];get aborted(){return this[e].aborted}get reason(){return this[e].reason}throwIfAborted(){if(this.aborted)throw this.reason}get onabort(){return this[e].onabort}set onabort(t){this[e].onabort=t,S.call(this,"abort",t,this[e]._onabort)}toString(){return"[object AbortSignal]"}get isPolyfill(){return{symbol:t,hierarchy:["AbortSignal","EventTarget"]}}}i(lt,"AbortSignal");class ht{constructor(t){this.target=t}target;aborted=!1;reason=void 0;abort(t,r=!0,s=!0){if(!this.aborted&&(this.aborted=!0,this.reason=t??new o("signal is aborted without reason","AbortError"),r)){const t=new y("abort");t[e].target=this.target,t[e].isTrusted=s,this.target[E].fire(t)}}onabort=null;_onabort=t=>{v.call(this.target,this.onabort,t)}}function ut(){const t=Object.create(lt.prototype);return t[E]=new w(t),t[e]=new ht(t),t}const ct=r.AbortSignal||lt,dt=Symbol("AbortControllerState");class ft{constructor(){this[dt]=new gt}[dt];get signal(){return this[dt].signal}abort(t){this[dt].signal[e].abort(t)}toString(){return"[object AbortController]"}get isPolyfill(){return{symbol:t,hierarchy:["AbortController"]}}}i(ft,"AbortController");class gt{signal=ut()}const pt=r.AbortController||ft,yt=(()=>{let t,e="undefined",s="request",n="function";if(t=typeof wx!==e&&typeof wx?.[s]===n&&wx||typeof my!==e&&typeof my?.[s]===n&&my||typeof qq!==e&&typeof qq?.[s]===n&&qq||typeof jd!==e&&typeof jd?.[s]===n&&jd||typeof swan!==e&&typeof swan?.[s]===n&&swan||typeof tt!==e&&typeof tt?.[s]===n&&tt||typeof ks!==e&&typeof ks?.[s]===n&&ks||typeof qh!==e&&typeof qh?.[s]===n&&qh||void 0,typeof r.XMLHttpRequest!==n||typeof r.fetch!==n)return void 0===t&&(t=typeof uni!==e&&typeof uni?.[s]===n&&uni||typeof Taro!==e&&typeof Taro?.[s]===n&&Taro||void 0),t})();class bt extends T{constructor(){if(new.target===bt)throw new TypeError("Failed to construct 'XMLHttpRequestEventTarget': Illegal constructor");super(),this[e]=new mt(this)}[e];get onabort(){return this[e].onabort}set onabort(t){this[e].onabort=t,this[e].attach("abort")}get onerror(){return this[e].onerror}set onerror(t){this[e].onerror=t,this[e].attach("error")}get onload(){return this[e].onload}set onload(t){this[e].onload=t,this[e].attach("load")}get onloadend(){return this[e].onloadend}set onloadend(t){this[e].onloadend=t,this[e].attach("loadend")}get onloadstart(){return this[e].onloadstart}set onloadstart(t){this[e].onloadstart=t,this[e].attach("loadstart")}get onprogress(){return this[e].onprogress}set onprogress(t){this[e].onprogress=t,this[e].attach("progress")}get ontimeout(){return this[e].ontimeout}set ontimeout(t){this[e].ontimeout=t,this[e].attach("timeout")}toString(){return"[object XMLHttpRequestEventTarget]"}get isPolyfill(){return{symbol:t,hierarchy:["XMLHttpRequestEventTarget","EventTarget"]}}}i(bt,"XMLHttpRequestEventTarget");class mt{constructor(t){this.target=t}target;attach(t){const e=this["on"+t],r=this["_on"+t];S.call(this.target,t,e,r)}onabort=null;_onabort=t=>{v.call(this.target,this.onabort,t)};onerror=null;_onerror=t=>{v.call(this.target,this.onerror,t)};onload=null;_onload=t=>{v.call(this.target,this.onload,t)};onloadend=null;_onloadend=t=>{v.call(this.target,this.onloadend,t)};onloadstart=null;_onloadstart=t=>{v.call(this.target,this.onloadstart,t)};onprogress=null;_onprogress=t=>{v.call(this.target,this.onprogress,t)};ontimeout=null;_ontimeout=t=>{v.call(this.target,this.ontimeout,t)}}class Et extends bt{constructor(){if(new.target===Et)throw new TypeError("Failed to construct 'XMLHttpRequestUpload': Illegal constructor");super()}toString(){return"[object XMLHttpRequestUpload]"}get isPolyfill(){return{symbol:t,hierarchy:["XMLHttpRequestUpload","XMLHttpRequestEventTarget","EventTarget"]}}}i(Et,"XMLHttpRequestUpload");const Tt=yt?yt.request:function(t){const e="NOT_SUPPORTED_ERR",r={errMsg:e,errno:9,exception:{retryCount:0,reasons:[{errMsg:e,errno:9}]},useHttpDNS:!1};throw Promise.resolve(r).then(e=>{t.fail&&t.fail(e)}).finally(()=>{t.complete&&t.complete(r)}),new ReferenceError("request is not defined")},wt=Symbol("XMLHttpRequestState");class _t extends bt{static UNSENT=0;static OPENED=1;static HEADERS_RECEIVED=2;static LOADING=3;static DONE=4;constructor(){super(),this[wt]=new St(this)}[wt];UNSENT=0;OPENED=1;HEADERS_RECEIVED=2;LOADING=3;DONE=4;get readyState(){return this[wt].readyState}get response(){return this[wt].response}get responseText(){return this.responseType&&"text"!==this.responseType?"":this.response}get responseType(){return this[wt].responseType}set responseType(t){this[wt].responseType=t}get responseURL(){return this[wt].responseURL}get responseXML(){return null}get status(){return this[wt].status}get statusText(){return this.readyState===_t.UNSENT||this.readyState===_t.OPENED?"":this[wt].statusText||(t=this.status,xt[t]||"unknown");var t}get timeout(){return this[wt].timeout}set timeout(t){this[wt].timeout=t}get upload(){return this[wt].upload}get withCredentials(){return this[wt].withCredentials}set withCredentials(t){this[wt].withCredentials=t}abort(){this[wt].clearRequest()}getAllResponseHeaders(){return this[wt]._resHeaders?Object.entries(this[wt]._resHeaders||{}).map(([t,e])=>`${t}: ${e}\r\n`).join(""):""}getResponseHeader(t){return this[wt]._resHeaders?Object.entries(this[wt]._resHeaders||{}).find(e=>e[0].toLowerCase()===t.toLowerCase())?.[1]??null:null}open(...t){const[e,r,s=!0,n=null,o=null]=t;if(t.length<2)throw new TypeError(`Failed to execute 'open' on 'XMLHttpRequest': 2 arguments required, but only ${t.length} present.`);s||console.warn("Synchronous XMLHttpRequest is deprecated because of its detrimental effects to the end user's experience."),this[wt].clearRequest(!1),this[wt]._method=Rt(e),this[wt]._reqURL=String(r),this[wt]._reqCanSend=!0,this[wt].setReadyStateAndNotify(_t.OPENED)}overrideMimeType(t){}send(t){if(!this[wt]._reqCanSend||this.readyState!==_t.OPENED)throw new o("Failed to execute 'send' on 'XMLHttpRequest': The object's state must be OPENED.","InvalidStateError");this[wt]._reqCanSend=!1,this[wt].execRequest(t),this[wt].checkRequestTimeout()}setRequestHeader(t,e){!function(t,e,r){for(const s of Object.keys(t))if(s.toLowerCase()===e.toLowerCase())return void(t[s]=r);Object.assign(t,{[e]:r})}(this[wt]._reqHeaders,t,e)}get onreadystatechange(){return this[wt].onreadystatechange}set onreadystatechange(t){this[wt].onreadystatechange=t,S.call(this,"readystatechange",t,this[wt]._onreadystatechange)}toString(){return"[object XMLHttpRequest"}get isPolyfill(){return{symbol:t,hierarchy:["XMLHttpRequest","XMLHttpRequestEventTarget","EventTarget"]}}}i(_t,"XMLHttpRequest");class St{constructor(t){this.target=t,this.upload=function(){const t=Object.create(Et.prototype);return t[E]=new w(t),t[e]=new mt(t),t}()}target;readyState=_t.UNSENT;response="";responseType="";responseURL="";status=0;statusText="";timeout=0;upload;withCredentials=!1;_reqCanSend=!1;_resetPending=!1;_timeoutId=0;_reqURL="";_method="GET";_reqHeaders={Accept:"*/*"};_resHeaders=null;_resContLen=0;_requestTask=null;execRequest(t){const e=!["GET","HEAD"].includes(this._method),r=Object.keys(this._reqHeaders).map(t=>t.toLowerCase()).includes("Content-Type".toLowerCase()),s=e&&!r,n=this.upload[E].executors.length>0;let o={...this._reqHeaders},i=0,a=qt(t,s?t=>{o["Content-Type"]=t}:void 0,n?t=>{i=t}:void 0);if(this._requestTask=Tt({url:this._reqURL,method:this._method,header:o,data:a,dataType:"json"===this.responseType?"json":"text",responseType:"arraybuffer"===this.responseType?"arraybuffer":"text",success:this.requestSuccess.bind(this),fail:this.requestFail.bind(this),complete:this.requestComplete.bind(this)}),this.emitProcessEvent("loadstart"),n){const t=e&&i>0;t&&this.emitProcessEvent("loadstart",0,i,this.upload),setTimeout(()=>{const e=this._reqCanSend||this.readyState!==_t.OPENED,r=e?0:i;e?this.emitProcessEvent("abort",0,0,this.upload):t&&this.emitProcessEvent("load",r,r,this.upload),(e||t)&&this.emitProcessEvent("loadend",r,r,this.upload)})}}requestSuccess({statusCode:t,header:e,data:r}){this.responseURL=this._reqURL,this.status=t,this._resHeaders=e,this._resContLen=parseInt(this.target.getResponseHeader("Content-Length")||"0"),this.readyState===_t.OPENED&&(this.setReadyStateAndNotify(_t.HEADERS_RECEIVED),this.setReadyStateAndNotify(_t.LOADING),setTimeout(()=>{if(!this._reqCanSend){let t=this._resContLen;try{this.response=Ct(this.responseType,r),this.emitProcessEvent("load",t,t)}catch(t){console.error(t),this.emitProcessEvent("error")}}}))}requestFail(t){"status"in t?this.requestSuccess({statusCode:t.status,header:t.headers,data:t.data}):(this.status=0,this.statusText="errMsg"in t?t.errMsg:"errorMessage"in t?t.errorMessage:"",this._reqCanSend||this.readyState===_t.UNSENT||this.readyState===_t.DONE||(this.emitProcessEvent("error"),this.resetRequestTimeout()))}requestComplete(){this._requestTask=null,this._reqCanSend||this.readyState!==_t.OPENED&&this.readyState!==_t.LOADING||this.setReadyStateAndNotify(_t.DONE),setTimeout(()=>{if(!this._reqCanSend){let t=this._resContLen;this.emitProcessEvent("loadend",t,t)}})}clearRequest(t=!0){const e=t?setTimeout:t=>{t()};this._resetPending=!0,this._requestTask&&this.readyState!==_t.DONE&&(t&&this.setReadyStateAndNotify(_t.DONE),e(()=>{const e=this._requestTask;e&&e.abort(),t&&this.emitProcessEvent("abort"),t&&!e&&this.emitProcessEvent("loadend")})),e(()=>{this._resetPending&&(t&&(this.readyState=_t.UNSENT),this.resetXHR())})}checkRequestTimeout(){this.timeout&&(this._timeoutId=setTimeout(()=>{this.status||this.readyState===_t.DONE||(this._requestTask&&this._requestTask.abort(),this.setReadyStateAndNotify(_t.DONE),this.emitProcessEvent("timeout"))},this.timeout))}resetXHR(){this._resetPending=!1,this.resetRequestTimeout(),this.response="",this.responseURL="",this.status=0,this.statusText="",this._reqHeaders={},this._resHeaders=null,this._resContLen=0}resetRequestTimeout(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=0)}emitProcessEvent(t,r=0,s=0,n){const o=n??this.target,i=new L(t,{lengthComputable:s>0,loaded:r,total:s});i[e].target=o,i[e].isTrusted=!0,o[E].fire(i)}setReadyStateAndNotify(t){const r=t!==this.readyState;if(this.readyState=t,r){const t=new y("readystatechange");t[e].target=this.target,t[e].isTrusted=!0,this.target[E].fire(t)}}onreadystatechange=null;_onreadystatechange=t=>{v.call(this.target,this.onreadystatechange,t)}}const vt=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Rt(t){let e=t.toUpperCase();return vt.indexOf(e)>-1?e:t}const Pt=t=>(new a).encode(t).buffer,At=t=>(new c).decode(t);function qt(t,r,o){let i;if("string"==typeof t)i=t,r&&r("text/plain;charset=UTF-8");else if(s("URLSearchParams",t))i=t.toString(),r&&r("application/x-www-form-urlencoded;charset=UTF-8");else if(t instanceof ArrayBuffer)i=t.slice(0);else if(ArrayBuffer.isView(t))i=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);else if(n("Blob",t))i=t[e]._u8array.buffer.slice(0),r&&t.type&&r(t.type);else if(n("FormData",t)){const s=t[e].toBlob();i=s[e]._u8array.buffer,r&&r(s.type)}else i=t?String(t):"";return o&&o(("string"==typeof i?Pt(i):i).byteLength),i}function Ct(t,e){let r=e?"string"==typeof e||e instanceof ArrayBuffer?e:JSON.stringify(e):"";return t&&"text"!==t?"json"===t?JSON.parse("string"==typeof r?r:At(r)):"arraybuffer"===t?r instanceof ArrayBuffer?r.slice(0):Pt(r):"blob"===t?new D([r]):r:"string"==typeof r?r:At(r)}const xt={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"};const Lt=yt?_t:r.XMLHttpRequest,Ot=Symbol("BodyState");class Nt{constructor(){if(new.target===Nt)throw new TypeError("Failed to construct 'Body': Illegal constructor");this[Ot]=new Dt}[Ot];get body(){if(!this[Ot]._body)return null;throw new ReferenceError("ReadableStream is not defined")}get bodyUsed(){return this[Ot].bodyUsed}arrayBuffer(){const t="arrayBuffer";return this[Ot].consumed(t)||this[Ot].read(t)}blob(){const t="blob";return this[Ot].consumed(t)||this[Ot].read(t)}bytes(){const t="bytes";return this[Ot].consumed(t)||this[Ot].read(t)}formData(){const t="formData";return this[Ot].consumed(t)||this[Ot].read(t)}json(){const t="json";return this[Ot].consumed(t)||this[Ot].read(t)}text(){const t="text";return this[Ot].consumed(t)||this[Ot].read(t)}toString(){return"[object Body]"}get isPolyfill(){return{symbol:t,hierarchy:["Body"]}}}i(Nt,"Body");class Dt{bodyUsed=!1;_name="Body";_body="";init(t,e){if(s("ReadableStream",t))throw new ReferenceError("ReadableStream is not defined");this._body=qt(t,t=>{e&&!e.get("Content-Type")&&e.set("Content-Type",t)})}read(t){return new Promise((e,r)=>{try{if("arrayBuffer"===t)e(Ct("arraybuffer",this._body));else if("blob"===t)e(Ct("blob",this._body));else if("bytes"===t){let t=Ct("arraybuffer",this._body);e(new Uint8Array(t))}else if("formData"===t){e(function(t){const e=new V;if("string"!=typeof t||""===t.trim())return e;const r=t.indexOf("\r\n");if(-1===r)throw new TypeError("Failed to fetch");const s=t.substring(2,r).trim();if(!s)throw new TypeError("Invalid MIME type");const n=t.split(`--${s}`).filter(t=>{const e=t.trim();return""!==e&&"--"!==e});if(0===n.length)throw new TypeError("Failed to fetch");return n.forEach(t=>{const r=t.indexOf("\r\n\r\n");if(-1===r)throw new TypeError("Failed to fetch");const s=t.substring(0,r).trim(),n=t.substring(r+4),o=s.match(/name="([^"]+)"/),i=s.match(/filename="([^"]*)"/),l=s.match(/Content-Type: ([^\r\n]+)/);if(!o||!o[1])throw new TypeError("Failed to fetch");const h=o[1],u=!!i,c=l?(l[1]||"").trim():"application/octet-stream";if(u)try{const t=n.replace(/\r\n/g,""),r=(new a).encode(t),s=i[1]||"unknown-file",o=new M([r],s,{type:c});e.append(h,o,s)}catch(t){throw new TypeError("Failed to fetch")}else{const t=n.replace(/^[\r\n]+|[\r\n]+$/g,"");e.append(h,t)}}),e}(Ct("text",this._body)))}else e(Ct("json"===t?"json":"text",this._body))}catch(t){r(t)}})}consumed(t){if(this._body)return this.bodyUsed?Promise.reject(new TypeError(`TypeError: Failed to execute '${t}' on '${this._name}': body stream already read`)):void(this.bodyUsed=!0)}}class Ht{constructor(t){this[e]=new jt,s("Headers",t)?t.forEach((t,e)=>{this.append(e,t)}):Array.isArray(t)?t.forEach(t=>{if(!Array.isArray(t))throw new TypeError("Failed to construct 'Headers': The provided value cannot be converted to a sequence.");if(2!==t.length)throw new TypeError("Failed to construct 'Headers': Invalid value");this.append(t[0],t[1])}):t&&Object.entries(t).forEach(([t,e])=>{this.append(t,e)})}[e];append(t,r){let s=Ut(t,"append");r=Bt(r);let n=this[e]._map.get(s)?.[1];this[e]._map.set(s,[""+t,n?`${n}, ${r}`:r])}delete(t){let r=Ut(t,"delete");this[e]._map.delete(r)}get(t){let r=Ut(t,"get");return this[e]._map.get(r)?.[1]??null}getSetCookie(){let t=this.get("Set-Cookie");return t?t.split(", "):[]}has(t){let r=Ut(t,"has");return this[e]._map.has(r)}set(t,r){let s=Ut(t,"set");this[e]._map.set(s,[""+t,Bt(r)])}forEach(t,e){Array.from(this.entries()).forEach(([r,s])=>{t.call(e,s,r,this)})}entries(){return this[e]._map.values()}keys(){return Array.from(this.entries()).map(t=>t[0]).values()}values(){return Array.from(this.entries()).map(t=>t[1]).values()}[Symbol.iterator](){return this.entries()}toString(){return"[object Headers]"}get isPolyfill(){return{symbol:t,hierarchy:["Headers"]}}}i(Ht,"Headers");class jt{_map=new Map}function Ut(t,e=""){if("string"!=typeof t&&(t=String(t)),(/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)&&e)throw new TypeError(`Failed to execute '${e}' on 'Headers': Invalid name`);return t.toLowerCase()}function Bt(t){return"string"!=typeof t&&(t=String(t)),t}const Ft=r.Headers||Ht;class Mt extends Nt{constructor(t,r){super(),this[e]=new It,this[Ot]._name="Request";let s=r??{},o=s.body;if(n("Request",t)){if(t.bodyUsed)throw new TypeError("Failed to construct 'Request': Cannot construct a Request with a Request object that has already been used.");this[e].credentials=t.credentials,s.headers||(this[e].headers=new Ht(t.headers)),this[e].method=t.method,this[e].mode=t.mode,this[e].signal=t.signal,this[e].url=t.url;let r=t;o||null===r[Ot]._body||(o=r[Ot]._body,r[Ot].bodyUsed=!0)}else this[e].url=String(t);if(s.credentials&&(this[e].credentials=s.credentials),s.headers&&(this[e].headers=new Ht(s.headers)),s.method&&(this[e].method=Rt(s.method)),s.mode&&(this[e].mode=s.mode),s.signal&&(this[e].signal=s.signal),("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Failed to construct 'Request': Request with GET/HEAD method cannot have body.");if(this[Ot].init(o,this.headers),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==s.cache&&"no-cache"!==s.cache)){let t=/([?&])_=[^&]*/;if(t.test(this.url))this[e].url=this.url.replace(t,"$1_="+(new Date).getTime());else{let t=/\?/;this[e].url+=(t.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}[e];get cache(){return this[e].cache}get credentials(){return this[e].credentials}get destination(){return this[e].destination}get headers(){return this[e].headers}get integrity(){return this[e].integrity}get keepalive(){return this[e].keepalive}get method(){return this[e].method}get mode(){return this[e].mode}get redirect(){return this[e].redirect}get referrer(){return this[e].referrer}get referrerPolicy(){return this[e].referrerPolicy}get signal(){return this[e].signal}get url(){return this[e].url}clone(){return new Mt(this,{body:this[Ot]._body??null})}toString(){return"[object Request]"}get isPolyfill(){return{symbol:t,hierarchy:["Request"]}}}i(Mt,"Request");class It{cache="default";credentials="same-origin";destination="";headers=new Ht;integrity="";keepalive=!1;method="GET";mode="cors";redirect="follow";referrer="about:client";referrerPolicy="";signal=(new ft).signal;url=""}const kt=r.Request||Mt;class Gt extends Nt{constructor(t,r){super(),this[e]=new Xt,this[Ot]._name="Response";let s=r??{},n=void 0===s.status?200:s.status;if(n<200||n>500)throw new RangeError(`Failed to construct 'Response': The status provided (${+n}) is outside the range [200, 599].`);s.headers&&(this[e].headers=new Ht(s.headers)),this[e].ok=this.status>=200&&this.status<300,this[e].status=n,this[e].statusText=void 0===s.statusText?"":""+s.statusText,this[Ot].init(t,this.headers)}[e];get headers(){return this[e].headers}get ok(){return this[e].ok}get redirected(){return this[e].redirected}get status(){return this[e].status}get statusText(){return this[e].statusText}get type(){return this[e].type}get url(){return this[e].url}clone(){const t=new Gt(this[Ot]._body,{headers:new Ht(this.headers),status:this.status,statusText:this.statusText});return t[e].url=this.url,t}static json(t,e){return new Response(JSON.stringify(t),e)}static error(){const t=new Gt(null,{status:200,statusText:""});return t[e].ok=!1,t[e].status=0,t[e].type="error",t}static redirect(t,e=301){if(-1===[301,302,303,307,308].indexOf(e))throw new RangeError("Failed to execute 'redirect' on 'Response': Invalid status code");return new Response(null,{status:e,headers:{location:String(t)}})}toString(){return"[object Response]"}get isPolyfill(){return{symbol:t,hierarchy:["Response"]}}}i(Gt,"Response");class Xt{headers=new Ht;ok=!0;redirected=!1;status=200;statusText="";type="default";url=""}const $t=r.Response||Gt;function zt(t,r){if(new.target===zt)throw new TypeError("fetch is not a constructor");return new Promise(function(n,i){let a=new Mt(t,r);if(a.signal&&a.signal.aborted)return i(a.signal.reason);let l=new _t;if(l.onload=function(){let t={headers:new Ht(l[wt]._resHeaders||void 0),status:l.status,statusText:l.statusText};setTimeout(()=>{const r=new Gt(l.response,t);r[e].url=l.responseURL,n(r)})},l.onerror=function(){setTimeout(function(){i(new TypeError("Failed to fetch"))})},l.ontimeout=function(){setTimeout(function(){i(new o("request:fail timeout","TimeoutError"))})},l.onabort=function(){setTimeout(function(){i(new o("request:fail abort","AbortError"))})},l.open(a.method,a.url),"include"===a.credentials?l.withCredentials=!0:"omit"===a.credentials&&(l.withCredentials=!1),r&&("object"==typeof(h=r.headers)&&!s("Headers",h))){let t=r.headers,e=[];Object.entries(t).forEach(([t,r])=>{e.push(Ut(t)),l.setRequestHeader(t,Bt(r))}),a.headers.forEach(function(t,r){-1===e.indexOf(Ut(r))&&l.setRequestHeader(r,t)})}else a.headers.forEach(function(t,e){l.setRequestHeader(e,t)});var h;if(a.signal){const t=()=>{l.abort()};a.signal.addEventListener("abort",t),l.onreadystatechange=function(){4===l.readyState&&a.signal.removeEventListener("abort",t)}}l.send(a[Ot]._body)})}const Vt=yt?zt:r.fetch;export{pt as AbortController,ft as AbortControllerP,ct as AbortSignal,lt as AbortSignalP,B as Blob,D as BlobP,C as CustomEvent,A as CustomEventP,m as Event,y as EventP,R as EventTarget,T as EventTargetP,k as File,M as FileP,z as FileReader,X as FileReaderP,Z as FormData,V as FormDataP,Ft as Headers,Ht as HeadersP,N as ProgressEvent,L as ProgressEventP,kt as Request,Mt as RequestP,$t as Response,Gt as ResponseP,p as TextDecoder,c as TextDecoderP,h as TextEncoder,a as TextEncoderP,at as URLSearchParams,et as URLSearchParamsP,Lt as XMLHttpRequest,_t as XMLHttpRequestP,Vt as fetch,zt as fetchP};
@@ -0,0 +1,20 @@
1
+ declare const state: unique symbol;
2
+ export declare class AbortControllerP implements AbortController {
3
+ constructor();
4
+ [state]: AbortControllerState;
5
+ get signal(): AbortSignal;
6
+ abort(reason?: any): void;
7
+ toString(): string;
8
+ get isPolyfill(): {
9
+ symbol: symbol;
10
+ hierarchy: string[];
11
+ };
12
+ }
13
+ declare class AbortControllerState {
14
+ signal: import("./AbortSignalP").AbortSignalP;
15
+ }
16
+ declare const AbortControllerE: {
17
+ new (): AbortController;
18
+ prototype: AbortController;
19
+ };
20
+ export { AbortControllerE as AbortController };
@@ -0,0 +1,37 @@
1
+ import { state } from "./isPolyfill";
2
+ import { EventTargetP } from "./EventTargetP";
3
+ export declare class AbortSignalP extends EventTargetP implements AbortSignal {
4
+ static abort(reason?: any): AbortSignal;
5
+ static any(signals: AbortSignal[]): AbortSignal;
6
+ static timeout(milliseconds: number): AbortSignal;
7
+ constructor();
8
+ [state]: AbortSignalState;
9
+ get aborted(): boolean;
10
+ get reason(): any;
11
+ throwIfAborted(): void;
12
+ get onabort(): ((this: AbortSignal, ev: Event) => any) | null;
13
+ set onabort(value: ((this: AbortSignal, ev: Event) => any) | null);
14
+ toString(): string;
15
+ get isPolyfill(): {
16
+ symbol: symbol;
17
+ hierarchy: string[];
18
+ };
19
+ }
20
+ export declare class AbortSignalState {
21
+ constructor(target: AbortSignalP);
22
+ target: AbortSignalP;
23
+ aborted: boolean;
24
+ reason: any;
25
+ abort(reason: any, notify?: boolean, isTrusted?: boolean): void;
26
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
27
+ _onabort: (ev: Event) => void;
28
+ }
29
+ export declare function createAbortSignalP(): AbortSignalP;
30
+ declare const AbortSignalE: {
31
+ new (): AbortSignal;
32
+ prototype: AbortSignal;
33
+ abort(reason?: any): AbortSignal;
34
+ any(signals: AbortSignal[]): AbortSignal;
35
+ timeout(milliseconds: number): AbortSignal;
36
+ };
37
+ export { AbortSignalE as AbortSignal };
@@ -0,0 +1,30 @@
1
+ import { state } from "./isPolyfill";
2
+ export declare class BlobP implements Blob {
3
+ constructor(blobParts?: BlobPart[], options?: BlobPropertyBag);
4
+ [state]: BlobState;
5
+ get size(): number;
6
+ get type(): string;
7
+ arrayBuffer(): Promise<ArrayBuffer>;
8
+ bytes(): Promise<TUint8ArrayOfArrayBuffer>;
9
+ slice(start?: number, end?: number, contentType?: string): Blob;
10
+ stream(): ReadableStream<TUint8ArrayOfArrayBuffer>;
11
+ text(): Promise<string>;
12
+ toString(): string;
13
+ get isPolyfill(): {
14
+ symbol: symbol;
15
+ hierarchy: string[];
16
+ };
17
+ }
18
+ declare class BlobState {
19
+ constructor(buffer: TUint8ArrayOfArrayBuffer);
20
+ size: number;
21
+ type: string;
22
+ _u8array: TUint8ArrayOfArrayBuffer;
23
+ }
24
+ export type TUint8ArrayOfArrayBuffer = ReturnType<TextEncoder["encode"]>;
25
+ export declare function u8array2base64(input: TUint8ArrayOfArrayBuffer): string;
26
+ declare const BlobE: {
27
+ new (blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
28
+ prototype: Blob;
29
+ };
30
+ export { BlobE as Blob };
@@ -0,0 +1,33 @@
1
+ import type { TUint8ArrayOfArrayBuffer } from "./BlobP";
2
+ declare const state: unique symbol;
3
+ export { state as bodyState };
4
+ export declare class BodyP implements Body {
5
+ constructor();
6
+ [state]: BodyState;
7
+ get body(): ReadableStream<TUint8ArrayOfArrayBuffer> | null;
8
+ get bodyUsed(): boolean;
9
+ arrayBuffer(): Promise<ArrayBuffer>;
10
+ blob(): Promise<Blob>;
11
+ bytes(): Promise<TUint8ArrayOfArrayBuffer>;
12
+ formData(): Promise<FormData>;
13
+ json(): Promise<any>;
14
+ text(): Promise<string>;
15
+ toString(): string;
16
+ get isPolyfill(): {
17
+ symbol: symbol;
18
+ hierarchy: string[];
19
+ };
20
+ }
21
+ declare class BodyState {
22
+ bodyUsed: boolean;
23
+ _name: string;
24
+ _body: string | ArrayBuffer;
25
+ init(body?: ConstructorParameters<typeof Response>[0], headers?: Headers): void;
26
+ read(k: "arrayBuffer"): Promise<ArrayBuffer>;
27
+ read(k: "blob"): Promise<Blob>;
28
+ read(k: "bytes"): Promise<TUint8ArrayOfArrayBuffer>;
29
+ read(k: "formData"): Promise<FormData>;
30
+ read(k: "json"): Promise<any>;
31
+ read(k: "text"): Promise<string>;
32
+ consumed(kind: string): Promise<never> | undefined;
33
+ }
@@ -0,0 +1,21 @@
1
+ import { EventP } from "./EventP";
2
+ declare const state: unique symbol;
3
+ export declare class CustomEventP<T> extends EventP implements CustomEvent {
4
+ constructor(type: string, eventInitDict?: CustomEventInit<T>);
5
+ [state]: CustomEventState;
6
+ get detail(): T;
7
+ initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void;
8
+ toString(): string;
9
+ get isPolyfill(): {
10
+ symbol: symbol;
11
+ hierarchy: string[];
12
+ };
13
+ }
14
+ declare class CustomEventState {
15
+ detail: unknown;
16
+ }
17
+ declare const CustomEventE: {
18
+ new <T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
19
+ prototype: CustomEvent;
20
+ };
21
+ export { CustomEventE as CustomEvent };
@@ -0,0 +1,64 @@
1
+ import { state } from "./isPolyfill";
2
+ export declare class EventP implements Event {
3
+ static readonly NONE = 0;
4
+ static readonly CAPTURING_PHASE = 1;
5
+ static readonly AT_TARGET = 2;
6
+ static readonly BUBBLING_PHASE = 3;
7
+ constructor(type: string, eventInitDict?: EventInit);
8
+ [state]: EventState;
9
+ get type(): string;
10
+ get bubbles(): boolean;
11
+ get cancelable(): boolean;
12
+ get composed(): boolean;
13
+ get target(): EventTarget | null;
14
+ get currentTarget(): EventTarget | null;
15
+ get eventPhase(): number;
16
+ readonly NONE = 0;
17
+ readonly CAPTURING_PHASE = 1;
18
+ readonly AT_TARGET = 2;
19
+ readonly BUBBLING_PHASE = 3;
20
+ get srcElement(): EventTarget | null;
21
+ cancelBubble: boolean;
22
+ get defaultPrevented(): boolean;
23
+ get returnValue(): boolean;
24
+ set returnValue(value: boolean);
25
+ get isTrusted(): boolean;
26
+ get timeStamp(): number;
27
+ composedPath(): EventTarget[];
28
+ initEvent: (type: string, bubbles?: boolean, cancelable?: boolean) => void;
29
+ preventDefault: () => void;
30
+ stopImmediatePropagation: () => void;
31
+ stopPropagation(): void;
32
+ toString(): string;
33
+ get isPolyfill(): {
34
+ symbol: symbol;
35
+ hierarchy: string[];
36
+ };
37
+ }
38
+ declare class EventState {
39
+ static TimeStamp: number;
40
+ type: string;
41
+ bubbles: boolean;
42
+ cancelable: boolean;
43
+ composed: boolean;
44
+ target: EventTarget | null;
45
+ currentTarget: EventTarget | null;
46
+ eventPhase: number;
47
+ defaultPrevented: boolean;
48
+ returnValue: boolean;
49
+ isTrusted: boolean;
50
+ timeStamp: number;
51
+ _passive: boolean;
52
+ _dispatched: boolean;
53
+ _preventDefaultCalled: boolean;
54
+ _stopImmediatePropagationCalled: boolean;
55
+ }
56
+ declare const EventE: {
57
+ new (type: string, eventInitDict?: EventInit): Event;
58
+ prototype: Event;
59
+ readonly NONE: 0;
60
+ readonly CAPTURING_PHASE: 1;
61
+ readonly AT_TARGET: 2;
62
+ readonly BUBBLING_PHASE: 3;
63
+ };
64
+ export { EventE as Event };
@@ -0,0 +1,37 @@
1
+ import { EventP } from "./EventP";
2
+ declare const state: unique symbol;
3
+ export { state as eventTargetState };
4
+ export declare class EventTargetP implements EventTarget {
5
+ constructor();
6
+ [state]: EventTargetState;
7
+ addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
8
+ dispatchEvent(event: Event): boolean;
9
+ removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
10
+ toString(): string;
11
+ get isPolyfill(): {
12
+ symbol: symbol;
13
+ hierarchy: string[];
14
+ };
15
+ }
16
+ export declare class EventTargetState {
17
+ constructor(target: EventTargetP);
18
+ target: EventTargetP;
19
+ executors: Executor[];
20
+ fire(event: EventP): boolean;
21
+ reply(signal: AbortSignal, executor: Executor): void;
22
+ }
23
+ declare class Executor {
24
+ static extract(cb: EventListenerOrEventListenerObject | null): EventListener | null;
25
+ constructor(type: string, callback: EventListenerOrEventListenerObject | null);
26
+ type: string;
27
+ callback: EventListener | null;
28
+ options: AddEventListenerOptions;
29
+ equals(executor: Executor): boolean;
30
+ }
31
+ export declare function attachFn(this: EventTarget, type: string, cb: Function | null, listener: EventListener): void;
32
+ export declare function executeFn(this: EventTarget, cb: Function | null, ev: Event): void;
33
+ declare const EventTargetE: {
34
+ new (): EventTarget;
35
+ prototype: EventTarget;
36
+ };
37
+ export { EventTargetE as EventTarget };
@@ -0,0 +1,23 @@
1
+ import { BlobP } from "./BlobP";
2
+ declare const state: unique symbol;
3
+ export declare class FileP extends BlobP implements File {
4
+ constructor(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag);
5
+ [state]: FileState;
6
+ get lastModified(): number;
7
+ get name(): string;
8
+ get webkitRelativePath(): string;
9
+ toString(): string;
10
+ get isPolyfill(): {
11
+ symbol: symbol;
12
+ hierarchy: string[];
13
+ };
14
+ }
15
+ declare class FileState {
16
+ lastModified: number;
17
+ name: string;
18
+ }
19
+ declare const FileE: {
20
+ new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
21
+ prototype: File;
22
+ };
23
+ export { FileE as File };
@@ -0,0 +1,67 @@
1
+ import { EventTargetP } from "./EventTargetP";
2
+ declare const state: unique symbol;
3
+ export declare class FileReaderP extends EventTargetP implements FileReader {
4
+ static readonly EMPTY = 0;
5
+ static readonly LOADING = 1;
6
+ static readonly DONE = 2;
7
+ constructor();
8
+ [state]: FileReaderState;
9
+ get readyState(): 0 | 1 | 2;
10
+ get result(): string | ArrayBuffer | null;
11
+ readonly EMPTY = 0;
12
+ readonly LOADING = 1;
13
+ readonly DONE = 2;
14
+ get error(): DOMException | null;
15
+ abort(): void;
16
+ readAsArrayBuffer: (blob: Blob) => void;
17
+ readAsBinaryString: (blob: Blob) => void;
18
+ readAsDataURL: (blob: Blob) => void;
19
+ readAsText: (blob: Blob, encoding?: string) => void;
20
+ get onabort(): ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
21
+ set onabort(value: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null);
22
+ get onerror(): ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
23
+ set onerror(value: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null);
24
+ get onload(): ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
25
+ set onload(value: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null);
26
+ get onloadend(): ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
27
+ set onloadend(value: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null);
28
+ get onloadstart(): ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
29
+ set onloadstart(value: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null);
30
+ get onprogress(): ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
31
+ set onprogress(value: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null);
32
+ toString(): string;
33
+ get isPolyfill(): {
34
+ symbol: symbol;
35
+ hierarchy: string[];
36
+ };
37
+ }
38
+ declare class FileReaderState {
39
+ constructor(target: FileReaderP);
40
+ target: FileReaderP;
41
+ readyState: FileReader["readyState"];
42
+ result: string | ArrayBuffer | null;
43
+ error: DOMException | null;
44
+ read(kind: string, blob: Blob, setResult: () => void): void;
45
+ emitProcessEvent(type: string, loaded?: number, total?: number): void;
46
+ attach(type: keyof FileReaderEventMap): void;
47
+ onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
48
+ _onabort: (ev: ProgressEvent<FileReader>) => void;
49
+ onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
50
+ _onerror: (ev: ProgressEvent<FileReader>) => void;
51
+ onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
52
+ _onload: (ev: ProgressEvent<FileReader>) => void;
53
+ onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
54
+ _onloadend: (ev: ProgressEvent<FileReader>) => void;
55
+ onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
56
+ _onloadstart: (ev: ProgressEvent<FileReader>) => void;
57
+ onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
58
+ _onprogress: (ev: ProgressEvent<FileReader>) => void;
59
+ }
60
+ declare const FileReaderE: {
61
+ new (): FileReader;
62
+ prototype: FileReader;
63
+ readonly EMPTY: 0;
64
+ readonly LOADING: 1;
65
+ readonly DONE: 2;
66
+ };
67
+ export { FileReaderE as FileReader };
@@ -0,0 +1,37 @@
1
+ import { BlobP } from "./BlobP";
2
+ import { state } from "./isPolyfill";
3
+ export declare class FormDataP implements FormData {
4
+ constructor(form?: HTMLFormElement, submitter?: HTMLElement | null);
5
+ [state]: FormDataState;
6
+ append(name: string, value: string | Blob, filename?: string): void;
7
+ delete(name: string): void;
8
+ get(name: string): FormDataEntryValue | null;
9
+ getAll(name: string): FormDataEntryValue[];
10
+ has(name: string): boolean;
11
+ set(name: string, value: string | Blob, filename?: string): void;
12
+ forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
13
+ entries(): ArrayIterator<[string, FormDataEntryValue]>;
14
+ keys(): ArrayIterator<string>;
15
+ values(): ArrayIterator<FormDataEntryValue>;
16
+ [Symbol.iterator](): ArrayIterator<[string, FormDataEntryValue]>;
17
+ toString(): string;
18
+ get isPolyfill(): {
19
+ symbol: symbol;
20
+ hierarchy: string[];
21
+ };
22
+ }
23
+ declare class FormDataState {
24
+ _data: [string, FormDataEntryValue][];
25
+ toBlob(): BlobP;
26
+ }
27
+ /**
28
+ * Parses multipart/form-data binary data, supporting restoration of text fields and files
29
+ * @param body - Text in multipart/form-data format (including boundaries and data)
30
+ * @returns Parsed FormData object (text fields as strings, files as File objects)
31
+ */
32
+ export declare function createFormData(body: string): FormDataP;
33
+ declare const FormDataE: {
34
+ new (form?: HTMLFormElement, submitter?: HTMLElement | null): FormData;
35
+ prototype: FormData;
36
+ };
37
+ export { FormDataE as FormData };
@@ -0,0 +1,31 @@
1
+ import { state } from "./isPolyfill";
2
+ export declare class HeadersP implements Headers {
3
+ constructor(init?: HeadersInit);
4
+ [state]: HeadersState;
5
+ append(name: string, value: string): void;
6
+ delete(name: string): void;
7
+ get(name: string): string | null;
8
+ getSetCookie(): string[];
9
+ has(name: string): boolean;
10
+ set(name: string, value: string): void;
11
+ forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
12
+ entries(): MapIterator<[string, string]>;
13
+ keys(): ArrayIterator<string>;
14
+ values(): ArrayIterator<string>;
15
+ [Symbol.iterator](): MapIterator<[string, string]>;
16
+ toString(): string;
17
+ get isPolyfill(): {
18
+ symbol: symbol;
19
+ hierarchy: string[];
20
+ };
21
+ }
22
+ declare class HeadersState {
23
+ _map: Map<string, [string, string]>;
24
+ }
25
+ export declare function normalizeName(name: string, kind?: string): string;
26
+ export declare function normalizeValue(value: string): string;
27
+ declare const HeadersE: {
28
+ new (init?: HeadersInit): Headers;
29
+ prototype: Headers;
30
+ };
31
+ export { HeadersE as Headers };
@@ -0,0 +1,24 @@
1
+ import { EventP } from "./EventP";
2
+ declare const state: unique symbol;
3
+ export declare class ProgressEventP extends EventP implements ProgressEvent {
4
+ constructor(type: string, eventInitDict?: ProgressEventInit);
5
+ [state]: ProgressEventState;
6
+ get lengthComputable(): boolean;
7
+ get loaded(): number;
8
+ get total(): number;
9
+ toString(): string;
10
+ get isPolyfill(): {
11
+ symbol: symbol;
12
+ hierarchy: string[];
13
+ };
14
+ }
15
+ declare class ProgressEventState {
16
+ lengthComputable: boolean;
17
+ loaded: number;
18
+ total: number;
19
+ }
20
+ declare const ProgressEventE: {
21
+ new (type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
22
+ prototype: ProgressEvent;
23
+ };
24
+ export { ProgressEventE as ProgressEvent };
@@ -0,0 +1,45 @@
1
+ import { BodyP } from "./BodyP";
2
+ import { state } from "./isPolyfill";
3
+ export declare class RequestP extends BodyP implements Request {
4
+ constructor(input: RequestInfo | URL, init?: RequestInit);
5
+ [state]: RequestState;
6
+ get cache(): RequestCache;
7
+ get credentials(): RequestCredentials;
8
+ get destination(): RequestDestination;
9
+ get headers(): Headers;
10
+ get integrity(): string;
11
+ get keepalive(): boolean;
12
+ get method(): string;
13
+ get mode(): RequestMode;
14
+ get redirect(): RequestRedirect;
15
+ get referrer(): string;
16
+ get referrerPolicy(): ReferrerPolicy;
17
+ get signal(): AbortSignal;
18
+ get url(): string;
19
+ clone(): Request;
20
+ toString(): string;
21
+ get isPolyfill(): {
22
+ symbol: symbol;
23
+ hierarchy: string[];
24
+ };
25
+ }
26
+ declare class RequestState {
27
+ cache: RequestCache;
28
+ credentials: RequestCredentials;
29
+ destination: RequestDestination;
30
+ headers: Headers;
31
+ integrity: string;
32
+ keepalive: boolean;
33
+ method: string;
34
+ mode: RequestMode;
35
+ redirect: RequestRedirect;
36
+ referrer: string;
37
+ referrerPolicy: ReferrerPolicy;
38
+ signal: AbortSignal;
39
+ url: string;
40
+ }
41
+ declare const RequestE: {
42
+ new (input: RequestInfo | URL, init?: RequestInit): Request;
43
+ prototype: Request;
44
+ };
45
+ export { RequestE as Request };
@@ -0,0 +1,39 @@
1
+ import { BodyP } from "./BodyP";
2
+ import { state } from "./isPolyfill";
3
+ export declare class ResponseP extends BodyP implements Response {
4
+ constructor(body?: BodyInit | null, init?: ResponseInit);
5
+ [state]: ResponseState;
6
+ get headers(): Headers;
7
+ get ok(): boolean;
8
+ get redirected(): boolean;
9
+ get status(): number;
10
+ get statusText(): string;
11
+ get type(): ResponseType;
12
+ get url(): string;
13
+ clone(): Response;
14
+ static json(data: any, init?: ResponseInit): Response;
15
+ static error(): ResponseP;
16
+ static redirect(url: string | URL, status?: number): Response;
17
+ toString(): string;
18
+ get isPolyfill(): {
19
+ symbol: symbol;
20
+ hierarchy: string[];
21
+ };
22
+ }
23
+ declare class ResponseState {
24
+ headers: Headers;
25
+ ok: boolean;
26
+ redirected: boolean;
27
+ status: number;
28
+ statusText: string;
29
+ type: ResponseType;
30
+ url: string;
31
+ }
32
+ declare const ResponseE: {
33
+ new (body?: BodyInit | null, init?: ResponseInit): Response;
34
+ prototype: Response;
35
+ error(): Response;
36
+ json(data: any, init?: ResponseInit): Response;
37
+ redirect(url: string | URL, status?: number): Response;
38
+ };
39
+ export { ResponseE as Response };