hook-fetch 0.0.1-beta

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 JsonLee12138
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,16 @@
1
+
2
+ # Hook-Fetch 🚀
3
+
4
+ **[中文文档](https://github.com/JsonLee12138/hook-fetch/blob/main/README.md)**
5
+
6
+ Both usage documentation and development documentation are still under development.
7
+ Please refer to [unit tests](https://github.com/JsonLee12138/hook-fetch/blob/main/test/index.test.ts) for usage instructions.
8
+
9
+ Planned Development
10
+
11
+ - Support for static methods like get, post, etc.
12
+ - Support for request retry functionality
13
+ - More plugin support
14
+ ## 📄 License
15
+
16
+ MIT
package/README.md ADDED
@@ -0,0 +1,14 @@
1
+ # Hook-Fetch 🚀
2
+
3
+ **[English document](https://github.com/JsonLee12138/hook-fetch/blob/main/README.en.md)**
4
+
5
+ 当前使用文档和开发文档都还在开发中
6
+ 使用方法请先参阅[单元测试](https://github.com/JsonLee12138/hook-fetch/blob/main/test/index.test.ts)
7
+
8
+ 预计开发内容
9
+ - 支持`get`、`post`等等静态方法。
10
+ - 支持重新发送请求功能。
11
+ - 更多的插件支持
12
+ ## 📄 许可证
13
+
14
+ MIT
@@ -0,0 +1,2 @@
1
+ "use strict";var t,e,r,n,o,i,a,u,l,c,p,s,f,y,d,h,m,g,b,w,v,S,O,A,E,P,j,R,x=t=>{throw TypeError(t)},_=(t,e,r)=>e.has(t)||x("Cannot "+r),T=(t,e,r)=>(_(t,e,"read from private field"),r?r.call(t):e.get(t)),k=(t,e,r)=>e.has(t)?x("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),M=(t,e,r,n)=>(_(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),D=(t,e,r)=>(_(t,e,"access private method"),r),I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function F(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function N(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})})),r}function U(){return R?j:(R=1,j=TypeError)}const W=N(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var L,C,B,q,K,H,$,G,z,V,J,Q,X,Y,Z,tt,et,rt,nt,ot,it,at,ut,lt,ct,pt,st,ft,yt,dt,ht,mt,gt,bt,wt,vt,St,Ot,At,Et,Pt,jt,Rt,xt,_t,Tt,kt,Mt,Dt,It,Ft,Nt,Ut,Wt,Lt,Ct,Bt,qt,Kt,Ht,$t,Gt,zt,Vt,Jt,Qt,Xt,Yt,Zt,te,ee,re,ne,oe,ie,ae,ue,le,ce,pe,se,fe,ye,de,he,me,ge,be;function we(){if(C)return L;C=1;var t="function"==typeof Map&&Map.prototype,e=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=t&&e&&"function"==typeof e.get?e.get:null,n=t&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&"function"==typeof i.get?i.get:null,u=o&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,c="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,s=Boolean.prototype.valueOf,f=Object.prototype.toString,y=Function.prototype.toString,d=String.prototype.match,h=String.prototype.slice,m=String.prototype.replace,g=String.prototype.toUpperCase,b=String.prototype.toLowerCase,w=RegExp.prototype.test,v=Array.prototype.concat,S=Array.prototype.join,O=Array.prototype.slice,A=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,R="function"==typeof Symbol&&"object"==typeof Symbol.iterator,x="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===R||"symbol")?Symbol.toStringTag:null,_=Object.prototype.propertyIsEnumerable,T=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function k(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||w.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-A(-t):A(t);if(n!==t){var o=String(n),i=h.call(e,o.length+1);return m.call(o,r,"$&_")+"."+m.call(m.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(e,r,"$&_")}var M=W,D=M.custom,F=G(D)?D:null,N={__proto__:null,double:'"',single:"'"},U={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function B(t,e,r){var n=r.quoteStyle||e,o=N[n];return o+t+o}function q(t){return m.call(String(t),/"/g,"&quot;")}function K(t){return!x||!("object"==typeof t&&(x in t||void 0!==t[x]))}function H(t){return"[object Array]"===J(t)&&K(t)}function $(t){return"[object RegExp]"===J(t)&&K(t)}function G(t){if(R)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!j)return!1;try{return j.call(t),!0}catch(e){}return!1}L=function t(e,o,i,f){var g=o||{};if(V(g,"quoteStyle")&&!V(N,g.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(g,"maxStringLength")&&("number"==typeof g.maxStringLength?g.maxStringLength<0&&g.maxStringLength!==1/0:null!==g.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var w=!V(g,"customInspect")||g.customInspect;if("boolean"!=typeof w&&"symbol"!==w)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(g,"indent")&&null!==g.indent&&"\t"!==g.indent&&!(parseInt(g.indent,10)===g.indent&&g.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(g,"numericSeparator")&&"boolean"!=typeof g.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=g.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,g);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var P=String(e);return A?k(e,P):P}if("bigint"==typeof e){var D=String(e)+"n";return A?k(e,D):D}var U=void 0===g.depth?5:g.depth;if(void 0===i&&(i=0),i>=U&&U>0&&"object"==typeof e)return H(e)?"[Array]":"[Object]";var W=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=S.call(Array(t.indent+1)," ")}return{base:r,prev:S.call(Array(e+1),r)}}(g,i);if(void 0===f)f=[];else if(Q(f,e)>=0)return"[Circular]";function L(e,r,n){if(r&&(f=O.call(f)).push(r),n){var o={depth:g.depth};return V(g,"quoteStyle")&&(o.quoteStyle=g.quoteStyle),t(e,o,i+1,f)}return t(e,g,i+1,f)}if("function"==typeof e&&!$(e)){var C=function(t){if(t.name)return t.name;var e=d.call(y.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),z=nt(e,L);return"[Function"+(C?": "+C:" (anonymous)")+"]"+(z.length>0?" { "+S.call(z,", ")+" }":"")}if(G(e)){var Y=R?m.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):j.call(e);return"object"!=typeof e||R?Y:Z(Y)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var ot="<"+b.call(String(e.nodeName)),it=e.attributes||[],at=0;at<it.length;at++)ot+=" "+it[at].name+"="+B(q(it[at].value),"double",g);return ot+=">",e.childNodes&&e.childNodes.length&&(ot+="..."),ot+="</"+b.call(String(e.nodeName))+">"}if(H(e)){if(0===e.length)return"[]";var ut=nt(e,L);return W&&!function(t){for(var e=0;e<t.length;e++)if(Q(t[e],"\n")>=0)return!1;return!0}(ut)?"["+rt(ut,W)+"]":"[ "+S.call(ut,", ")+" ]"}if(function(t){return"[object Error]"===J(t)&&K(t)}(e)){var lt=nt(e,L);return"cause"in Error.prototype||!("cause"in e)||_.call(e,"cause")?0===lt.length?"["+String(e)+"]":"{ ["+String(e)+"] "+S.call(lt,", ")+" }":"{ ["+String(e)+"] "+S.call(v.call("[cause]: "+L(e.cause),lt),", ")+" }"}if("object"==typeof e&&w){if(F&&"function"==typeof e[F]&&M)return M(e,{depth:U-i});if("symbol"!==w&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!r||!t||"object"!=typeof t)return!1;try{r.call(t);try{a.call(t)}catch(ot){return!0}return t instanceof Map}catch(e){}return!1}(e)){var ct=[];return n&&n.call(e,(function(t,r){ct.push(L(r,e,!0)+" => "+L(t,e))})),et("Map",r.call(e),ct,W)}if(function(t){if(!a||!t||"object"!=typeof t)return!1;try{a.call(t);try{r.call(t)}catch(e){return!0}return t instanceof Set}catch(n){}return!1}(e)){var pt=[];return u&&u.call(e,(function(t){pt.push(L(t,e))})),et("Set",a.call(e),pt,W)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t,l);try{c.call(t,c)}catch(ot){return!0}return t instanceof WeakMap}catch(e){}return!1}(e))return tt("WeakMap");if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t,c);try{l.call(t,l)}catch(ot){return!0}return t instanceof WeakSet}catch(e){}return!1}(e))return tt("WeakSet");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{return p.call(t),!0}catch(e){}return!1}(e))return tt("WeakRef");if(function(t){return"[object Number]"===J(t)&&K(t)}(e))return Z(L(Number(e)));if(function(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(e){}return!1}(e))return Z(L(E.call(e)));if(function(t){return"[object Boolean]"===J(t)&&K(t)}(e))return Z(s.call(e));if(function(t){return"[object String]"===J(t)&&K(t)}(e))return Z(L(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==I&&e===I)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===J(t)&&K(t)}(e)&&!$(e)){var st=nt(e,L),ft=T?T(e)===Object.prototype:e instanceof Object||e.constructor===Object,yt=e instanceof Object?"":"null prototype",dt=!ft&&x&&Object(e)===e&&x in e?h.call(J(e),8,-1):yt?"Object":"",ht=(ft||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(dt||yt?"["+S.call(v.call([],dt||[],yt||[]),": ")+"] ":"");return 0===st.length?ht+"{}":W?ht+"{"+rt(st,W)+"}":ht+"{ "+S.call(st,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return z.call(t,e)}function J(t){return f.call(t)}function Q(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function X(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(h.call(t,0,e.maxStringLength),e)+n}var o=U[e.quoteStyle||"single"];return o.lastIndex=0,B(m.call(m.call(t,o,"\\$1"),/[\x00-\x1f]/g,Y),"single",e)}function Y(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+g.call(e.toString(16))}function Z(t){return"Object("+t+")"}function tt(t){return t+" { ? }"}function et(t,e,r,n){return t+" ("+e+") {"+(n?rt(r,n):S.call(r,", "))+"}"}function rt(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+S.call(t,","+r)+"\n"+e.prev}function nt(t,e){var r=H(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=V(t,o)?e(t[o],t):""}var i,a="function"==typeof P?P(t):[];if(R){i={};for(var u=0;u<a.length;u++)i["$"+a[u]]=a[u]}for(var l in t)V(t,l)&&(r&&String(Number(l))===l&&l<t.length||R&&i["$"+l]instanceof Symbol||(w.call(/[^\w$]/,l)?n.push(e(l,t)+": "+e(t[l],t)):n.push(l+": "+e(t[l],t))));if("function"==typeof P)for(var c=0;c<a.length;c++)_.call(t,a[c])&&n.push("["+e(a[c])+"]: "+e(t[a[c]],t));return n}return L}function ve(){if(q)return B;q=1;var t=we(),e=U(),r=function(t,e,r){for(var n,o=t;null!=(n=o.next);o=n)if(n.key===e)return o.next=n.next,r||(n.next=t.next,t.next=n),n};return B=function(){var n,o={assert:function(r){if(!o.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(t){var e=n&&n.next,o=function(t,e){if(t)return r(t,e,!0)}(n,t);return o&&e&&e===o&&(n=void 0),!!o},get:function(t){return function(t,e){if(t){var n=r(t,e);return n&&n.value}}(n,t)},has:function(t){return function(t,e){return!!t&&!!r(t,e)}(n,t)},set:function(t,e){n||(n={next:void 0}),function(t,e,n){var o=r(t,e);o?o.value=n:t.next={key:e,next:t.next,value:n}}(n,t,e)}};return o}}function Se(){return H?K:(H=1,K=Object)}function Oe(){return G?$:(G=1,$=Error)}function Ae(){return V?z:(V=1,z=EvalError)}function Ee(){return Q?J:(Q=1,J=RangeError)}function Pe(){return Y?X:(Y=1,X=ReferenceError)}function je(){return tt?Z:(tt=1,Z=SyntaxError)}function Re(){return rt?et:(rt=1,et=URIError)}function xe(){return ot?nt:(ot=1,nt=Math.abs)}function _e(){return at?it:(at=1,it=Math.floor)}function Te(){return lt?ut:(lt=1,ut=Math.max)}function ke(){return pt?ct:(pt=1,ct=Math.min)}function Me(){return ft?st:(ft=1,st=Math.pow)}function De(){return dt?yt:(dt=1,yt=Math.round)}function Ie(){return mt?ht:(mt=1,ht=Number.isNaN||function(t){return t!=t})}function Fe(){if(bt)return gt;bt=1;var t=Ie();return gt=function(e){return t(e)||0===e?e:e<0?-1:1}}function Ne(){return vt?wt:(vt=1,wt=Object.getOwnPropertyDescriptor)}function Ue(){if(Ot)return St;Ot=1;var t=Ne();if(t)try{t([],"length")}catch(e){t=null}return St=t}function We(){if(Et)return At;Et=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}return At=t}function Le(){if(xt)return Rt;xt=1;var t="undefined"!=typeof Symbol&&Symbol,e=jt?Pt:(jt=1,Pt=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0});return Rt=function(){return"function"==typeof t&&("function"==typeof Symbol&&("symbol"==typeof t("foo")&&("symbol"==typeof Symbol("bar")&&e())))}}function Ce(){return Tt?_t:(Tt=1,_t="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function Be(){return Mt?kt:(Mt=1,kt=Se().getPrototypeOf||null)}function qe(){if(Nt)return Ft;Nt=1;var t=function(){if(It)return Dt;It=1;var t=Object.prototype.toString,e=Math.max,r=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};return Dt=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(t){for(var e=[],r=1,n=0;r<t.length;r+=1,n+=1)e[n]=t[r];return e}(arguments),u=e(0,o.length-a.length),l=[],c=0;c<u;c++)l[c]="$"+c;if(i=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(l,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,r(a,arguments));return Object(t)===t?t:this}return o.apply(n,r(a,arguments))})),o.prototype){var p=function(){};p.prototype=o.prototype,i.prototype=new p,p.prototype=null}return i},Dt}();return Ft=Function.prototype.bind||t}function Ke(){return Wt?Ut:(Wt=1,Ut=Function.prototype.call)}function He(){return Ct?Lt:(Ct=1,Lt=Function.prototype.apply)}function $e(){if(Ht)return Kt;Ht=1;var t=qe(),e=He(),r=Ke(),n=qt?Bt:(qt=1,Bt="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return Kt=n||t.call(r,e)}function Ge(){if(Gt)return $t;Gt=1;var t=qe(),e=U(),r=Ke(),n=$e();return $t=function(o){if(o.length<1||"function"!=typeof o[0])throw new e("a function is required");return n(t,r,o)}}function ze(){if(Vt)return zt;Vt=1;var t,e=Ge(),r=Ue();try{t=[].__proto__===Array.prototype}catch(a){if(!a||"object"!=typeof a||!("code"in a)||"ERR_PROTO_ACCESS"!==a.code)throw a}var n=!!t&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return zt=n&&"function"==typeof n.get?e([n.get]):"function"==typeof i&&function(t){return i(null==t?t:o(t))}}function Ve(){if(Yt)return Xt;Yt=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=qe();return Xt=r.call(t,e)}function Je(){if(te)return Zt;var t;te=1;var e=Se(),r=Oe(),n=Ae(),o=Ee(),i=Pe(),a=je(),u=U(),l=Re(),c=xe(),p=_e(),s=Te(),f=ke(),y=Me(),d=De(),h=Fe(),m=Function,g=function(t){try{return m('"use strict"; return ('+t+").constructor;")()}catch(e){}},b=Ue(),w=We(),v=function(){throw new u},S=b?function(){try{return v}catch(t){try{return b(arguments,"callee").get}catch(e){return v}}}():v,O=Le()(),A=function(){if(Qt)return Jt;Qt=1;var t=Ce(),e=Be(),r=ze();return Jt=t?function(e){return t(e)}:e?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return e(t)}:r?function(t){return r(t)}:null}(),E=Be(),P=Ce(),j=He(),R=Ke(),x={},_="undefined"!=typeof Uint8Array&&A?A(Uint8Array):t,T={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?t:ArrayBuffer,"%ArrayIteratorPrototype%":O&&A?A([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":x,"%AsyncGenerator%":x,"%AsyncGeneratorFunction%":x,"%AsyncIteratorPrototype%":x,"%Atomics%":"undefined"==typeof Atomics?t:Atomics,"%BigInt%":"undefined"==typeof BigInt?t:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?t:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?t:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?t:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?t:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?t:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":x,"%Int8Array%":"undefined"==typeof Int8Array?t:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?t:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O&&A?A(A([][Symbol.iterator]())):t,"%JSON%":"object"==typeof JSON?JSON:t,"%Map%":"undefined"==typeof Map?t:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&O&&A?A((new Map)[Symbol.iterator]()):t,"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?t:Promise,"%Proxy%":"undefined"==typeof Proxy?t:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?t:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?t:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&O&&A?A((new Set)[Symbol.iterator]()):t,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O&&A?A(""[Symbol.iterator]()):t,"%Symbol%":O?Symbol:t,"%SyntaxError%":a,"%ThrowTypeError%":S,"%TypedArray%":_,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?t:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?t:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?t:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?t:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?t:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?t:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?t:WeakSet,"%Function.prototype.call%":R,"%Function.prototype.apply%":j,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":E,"%Math.abs%":c,"%Math.floor%":p,"%Math.max%":s,"%Math.min%":f,"%Math.pow%":y,"%Math.round%":d,"%Math.sign%":h,"%Reflect.getPrototypeOf%":P};if(A)try{null.error}catch($){var k=A(A($));T["%Error.prototype%"]=k}var M=function t(e){var r;if("%AsyncFunction%"===e)r=g("async function () {}");else if("%GeneratorFunction%"===e)r=g("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=g("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&A&&(r=A(o.prototype))}return T[e]=r,r},D={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},I=qe(),F=Ve(),N=I.call(R,Array.prototype.concat),W=I.call(j,Array.prototype.splice),L=I.call(R,String.prototype.replace),C=I.call(R,String.prototype.slice),B=I.call(R,RegExp.prototype.exec),q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,H=function(t,e){var r,n=t;if(F(D,n)&&(n="%"+(r=D[n])[0]+"%"),F(T,n)){var o=T[n];if(o===x&&(o=M(n)),void 0===o&&!e)throw new u("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new a("intrinsic "+t+" does not exist!")};return Zt=function(t,e){if("string"!=typeof t||0===t.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new u('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,t))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=C(t,0,1),r=C(t,-1);if("%"===e&&"%"!==r)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new a("invalid intrinsic syntax, expected opening `%`");var n=[];return L(t,q,(function(t,e,r,o){n[n.length]=r?L(o,K,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=H("%"+n+"%",e),i=o.name,l=o.value,c=!1,p=o.alias;p&&(n=p[0],W(r,N([0,1],p)));for(var s=1,f=!0;s<r.length;s+=1){var y=r[s],d=C(y,0,1),h=C(y,-1);if(('"'===d||"'"===d||"`"===d||'"'===h||"'"===h||"`"===h)&&d!==h)throw new a("property names with quotes must have matching quotes");if("constructor"!==y&&f||(c=!0),F(T,i="%"+(n+="."+y)+"%"))l=T[i];else if(null!=l){if(!(y in l)){if(!e)throw new u("base intrinsic for "+t+" exists, but the property is not available.");return}if(b&&s+1>=r.length){var m=b(l,y);l=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:l[y]}else f=F(l,y),l=l[y];f&&!c&&(T[i]=l)}}return l},Zt}function Qe(){if(re)return ee;re=1;var t=Je(),e=Ge(),r=e([t("%String.prototype.indexOf%")]);return ee=function(n,o){var i=t(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?e([i]):i}}function Xe(){if(oe)return ne;oe=1;var t=Je(),e=Qe(),r=we(),n=U(),o=t("%Map%",!0),i=e("Map.prototype.get",!0),a=e("Map.prototype.set",!0),u=e("Map.prototype.has",!0),l=e("Map.prototype.delete",!0),c=e("Map.prototype.size",!0);return ne=!!o&&function(){var t,e={assert:function(t){if(!e.has(t))throw new n("Side channel does not contain "+r(t))},delete:function(e){if(t){var r=l(t,e);return 0===c(t)&&(t=void 0),r}return!1},get:function(e){if(t)return i(t,e)},has:function(e){return!!t&&u(t,e)},set:function(e,r){t||(t=new o),a(t,e,r)}};return e}}function Ye(){if(le)return ue;le=1;var t=U(),e=we(),r=ve(),n=Xe(),o=function(){if(ae)return ie;ae=1;var t=Je(),e=Qe(),r=we(),n=Xe(),o=U(),i=t("%WeakMap%",!0),a=e("WeakMap.prototype.get",!0),u=e("WeakMap.prototype.set",!0),l=e("WeakMap.prototype.has",!0),c=e("WeakMap.prototype.delete",!0);return ie=i?function(){var t,e,p={assert:function(t){if(!p.has(t))throw new o("Side channel does not contain "+r(t))},delete:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(t)return c(t,r)}else if(n&&e)return e.delete(r);return!1},get:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?a(t,r):e&&e.get(r)},has:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?l(t,r):!!e&&e.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new i),u(t,r,o)):n&&(e||(e=n()),e.set(r,o))}};return p}:n}(),i=o||n||r;return ue=function(){var r,n={assert:function(r){if(!n.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(t){return!!r&&r.delete(t)},get:function(t){return r&&r.get(t)},has:function(t){return!!r&&r.has(t)},set:function(t,e){r||(r=i()),r.set(t,e)}};return n}}function Ze(){if(pe)return ce;pe=1;var t=String.prototype.replace,e=/%20/g,r="RFC3986";return ce={default:r,formatters:{RFC1738:function(r){return t.call(r,e,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:r}}function tr(){if(fe)return se;fe=1;var t=Ze(),e=Object.prototype.hasOwnProperty,r=Array.isArray,n=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),o=function(t,e){for(var r=e&&e.plainObjects?{__proto__:null}:{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r},i=1024;return se={arrayToObject:o,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],o=0;o<e.length;++o)for(var i=e[o],a=i.obj[i.prop],u=Object.keys(a),l=0;l<u.length;++l){var c=u[l],p=a[c];"object"==typeof p&&null!==p&&-1===n.indexOf(p)&&(e.push({obj:a,prop:c}),n.push(p))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(r(n)){for(var o=[],i=0;i<n.length;++i)void 0!==n[i]&&o.push(n[i]);e.obj[e.prop]=o}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(o){return n}},encode:function(e,r,o,a,u){if(0===e.length)return e;var l=e;if("symbol"==typeof e?l=Symbol.prototype.toString.call(e):"string"!=typeof e&&(l=String(e)),"iso-8859-1"===o)return escape(l).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var c="",p=0;p<l.length;p+=i){for(var s=l.length>=i?l.slice(p,p+i):l,f=[],y=0;y<s.length;++y){var d=s.charCodeAt(y);45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||u===t.RFC1738&&(40===d||41===d)?f[f.length]=s.charAt(y):d<128?f[f.length]=n[d]:d<2048?f[f.length]=n[192|d>>6]+n[128|63&d]:d<55296||d>=57344?f[f.length]=n[224|d>>12]+n[128|d>>6&63]+n[128|63&d]:(y+=1,d=65536+((1023&d)<<10|1023&s.charCodeAt(y)),f[f.length]=n[240|d>>18]+n[128|d>>12&63]+n[128|d>>6&63]+n[128|63&d])}c+=f.join("")}return c},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(r(t)){for(var n=[],o=0;o<t.length;o+=1)n.push(e(t[o]));return n}return e(t)},merge:function t(n,i,a){if(!i)return n;if("object"!=typeof i&&"function"!=typeof i){if(r(n))n.push(i);else{if(!n||"object"!=typeof n)return[n,i];(a&&(a.plainObjects||a.allowPrototypes)||!e.call(Object.prototype,i))&&(n[i]=!0)}return n}if(!n||"object"!=typeof n)return[n].concat(i);var u=n;return r(n)&&!r(i)&&(u=o(n,a)),r(n)&&r(i)?(i.forEach((function(r,o){if(e.call(n,o)){var i=n[o];i&&"object"==typeof i&&r&&"object"==typeof r?n[o]=t(i,r,a):n.push(r)}else n[o]=r})),n):Object.keys(i).reduce((function(r,n){var o=i[n];return e.call(r,n)?r[n]=t(r[n],o,a):r[n]=o,r}),u)}}}function er(){if(de)return ye;de=1;var t=Ye(),e=tr(),r=Ze(),n=Object.prototype.hasOwnProperty,o={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},i=Array.isArray,a=Array.prototype.push,u=function(t,e){a.apply(t,i(e)?e:[e])},l=Date.prototype.toISOString,c=r.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:r.formatters[c],indices:!1,serializeDate:function(t){return l.call(t)},skipNulls:!1,strictNullHandling:!1},s={},f=function r(n,o,a,l,c,f,y,d,h,m,g,b,w,v,S,O,A,E){for(var P,j=n,R=E,x=0,_=!1;void 0!==(R=R.get(s))&&!_;){var T=R.get(n);if(x+=1,void 0!==T){if(T===x)throw new RangeError("Cyclic object value");_=!0}void 0===R.get(s)&&(x=0)}if("function"==typeof m?j=m(o,j):j instanceof Date?j=w(j):"comma"===a&&i(j)&&(j=e.maybeMap(j,(function(t){return t instanceof Date?w(t):t}))),null===j){if(f)return h&&!O?h(o,p.encoder,A,"key",v):o;j=""}if("string"==typeof(P=j)||"number"==typeof P||"boolean"==typeof P||"symbol"==typeof P||"bigint"==typeof P||e.isBuffer(j))return h?[S(O?o:h(o,p.encoder,A,"key",v))+"="+S(h(j,p.encoder,A,"value",v))]:[S(o)+"="+S(String(j))];var k,M=[];if(void 0===j)return M;if("comma"===a&&i(j))O&&h&&(j=e.maybeMap(j,h)),k=[{value:j.length>0?j.join(",")||null:void 0}];else if(i(m))k=m;else{var D=Object.keys(j);k=g?D.sort(g):D}var I=d?String(o).replace(/\./g,"%2E"):String(o),F=l&&i(j)&&1===j.length?I+"[]":I;if(c&&i(j)&&0===j.length)return F+"[]";for(var N=0;N<k.length;++N){var U=k[N],W="object"==typeof U&&U&&void 0!==U.value?U.value:j[U];if(!y||null!==W){var L=b&&d?String(U).replace(/\./g,"%2E"):String(U),C=i(j)?"function"==typeof a?a(F,L):F:F+(b?"."+L:"["+L+"]");E.set(n,x);var B=t();B.set(s,E),u(M,r(W,C,a,l,c,f,y,d,"comma"===a&&O&&i(j)?null:h,m,g,b,w,v,S,O,A,B))}}return M};return ye=function(e,a){var l,c=e,s=function(t){if(!t)return p;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.encodeDotInKeys&&"boolean"!=typeof t.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||p.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=r.default;if(void 0!==t.format){if(!n.call(r.formatters,t.format))throw new TypeError("Unknown format option provided.");a=t.format}var u,l=r.formatters[a],c=p.filter;if(("function"==typeof t.filter||i(t.filter))&&(c=t.filter),u=t.arrayFormat in o?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":p.arrayFormat,"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=void 0===t.allowDots?!0===t.encodeDotInKeys||p.allowDots:!!t.allowDots;return{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:p.addQueryPrefix,allowDots:s,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:u,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:p.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:void 0===t.delimiter?p.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:p.encode,encodeDotInKeys:"boolean"==typeof t.encodeDotInKeys?t.encodeDotInKeys:p.encodeDotInKeys,encoder:"function"==typeof t.encoder?t.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:p.encodeValuesOnly,filter:c,format:a,formatter:l,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:p.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:p.strictNullHandling}}(a);"function"==typeof s.filter?c=(0,s.filter)("",c):i(s.filter)&&(l=s.filter);var y=[];if("object"!=typeof c||null===c)return"";var d=o[s.arrayFormat],h="comma"===d&&s.commaRoundTrip;l||(l=Object.keys(c)),s.sort&&l.sort(s.sort);for(var m=t(),g=0;g<l.length;++g){var b=l[g],w=c[b];s.skipNulls&&null===w||u(y,f(w,b,d,h,s.allowEmptyArrays,s.strictNullHandling,s.skipNulls,s.encodeDotInKeys,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.format,s.formatter,s.encodeValuesOnly,s.charset,m))}var v=y.join(s.delimiter),S=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&("iso-8859-1"===s.charset?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),v.length>0?S+v:""}}function rr(){if(me)return he;me=1;var t=tr(),e=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:t.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},i=function(t,e,r){if(t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");return t},a=function(r,n,o,a){if(r){var u=o.allowDots?r.replace(/\.([^.[]+)/g,"[$1]"):r,l=/(\[[^[\]]*])/g,c=o.depth>0&&/(\[[^[\]]*])/.exec(u),p=c?u.slice(0,c.index):u,s=[];if(p){if(!o.plainObjects&&e.call(Object.prototype,p)&&!o.allowPrototypes)return;s.push(p)}for(var f=0;o.depth>0&&null!==(c=l.exec(u))&&f<o.depth;){if(f+=1,!o.plainObjects&&e.call(Object.prototype,c[1].slice(1,-1))&&!o.allowPrototypes)return;s.push(c[1])}if(c){if(!0===o.strictDepth)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");s.push("["+u.slice(c.index)+"]")}return function(e,r,n,o){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var u=e.slice(0,-1).join("");a=Array.isArray(r)&&r[u]?r[u].length:0}for(var l=o?r:i(r,n,a),c=e.length-1;c>=0;--c){var p,s=e[c];if("[]"===s&&n.parseArrays)p=n.allowEmptyArrays&&(""===l||n.strictNullHandling&&null===l)?[]:t.combine([],l);else{p=n.plainObjects?{__proto__:null}:{};var f="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,y=n.decodeDotInKeys?f.replace(/%2E/g,"."):f,d=parseInt(y,10);n.parseArrays||""!==y?!isNaN(d)&&s!==y&&String(d)===y&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(p=[])[d]=l:"__proto__"!==y&&(p[y]=l):p={0:l}}l=p}return l}(s,n,o,a)}};return he=function(u,l){var c=function(e){if(!e)return n;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=void 0===e.charset?n.charset:e.charset,o=void 0===e.duplicates?n.duplicates:e.duplicates;if("combine"!==o&&"first"!==o&&"last"!==o)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||n.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:n.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:n.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:n.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:n.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:n.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:n.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:n.decoder,delimiter:"string"==typeof e.delimiter||t.isRegExp(e.delimiter)?e.delimiter:n.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:n.depth,duplicates:o,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:n.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:n.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:n.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(l);if(""===u||null==u)return c.plainObjects?{__proto__:null}:{};for(var p="string"==typeof u?function(a,u){var l={__proto__:null},c=u.ignoreQueryPrefix?a.replace(/^\?/,""):a;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var p=u.parameterLimit===1/0?void 0:u.parameterLimit,s=c.split(u.delimiter,u.throwOnLimitExceeded?p+1:p);if(u.throwOnLimitExceeded&&s.length>p)throw new RangeError("Parameter limit exceeded. Only "+p+" parameter"+(1===p?"":"s")+" allowed.");var f,y=-1,d=u.charset;if(u.charsetSentinel)for(f=0;f<s.length;++f)0===s[f].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[f]?d="utf-8":"utf8=%26%2310003%3B"===s[f]&&(d="iso-8859-1"),y=f,f=s.length);for(f=0;f<s.length;++f)if(f!==y){var h,m,g=s[f],b=g.indexOf("]="),w=-1===b?g.indexOf("="):b+1;-1===w?(h=u.decoder(g,n.decoder,d,"key"),m=u.strictNullHandling?null:""):(h=u.decoder(g.slice(0,w),n.decoder,d,"key"),m=t.maybeMap(i(g.slice(w+1),u,r(l[h])?l[h].length:0),(function(t){return u.decoder(t,n.decoder,d,"value")}))),m&&u.interpretNumericEntities&&"iso-8859-1"===d&&(m=o(String(m))),g.indexOf("[]=")>-1&&(m=r(m)?[m]:m);var v=e.call(l,h);v&&"combine"===u.duplicates?l[h]=t.combine(l[h],m):v&&"last"!==u.duplicates||(l[h]=m)}return l}(u,c):u,s=c.plainObjects?{__proto__:null}:{},f=Object.keys(p),y=0;y<f.length;++y){var d=f[y],h=a(d,p[d],c,"string"==typeof u);s=t.merge(s,h,c)}return!0===c.allowSparse?s:t.compact(s)}}function nr(){if(be)return ge;be=1;var t=er(),e=rr();return ge={formats:Ze(),parse:e,stringify:t}}const or=F(nr());var ir=(t=>(t.JSON="application/json",t.FORM_URLENCODED="application/x-www-form-urlencoded",t.FORM_DATA="multipart/form-data",t.TEXT="text/plain",t.HTML="text/html",t.XML="text/xml",t.CSV="text/csv",t.STREAM="application/octet-stream",t))(ir||{}),ar=(t=>(t[t.TIME_OUT=408]="TIME_OUT",t[t.ABORTED=499]="ABORTED",t[t.NETWORK_ERROR=599]="NETWORK_ERROR",t[t.BODY_NULL=502]="BODY_NULL",t[t.UNKNOWN=601]="UNKNOWN",t))(ar||{});class ur extends Error{constructor({message:a,status:u,statusText:l,response:c,config:p,name:s}){super(a),k(this,t),k(this,e),k(this,r),k(this,n),k(this,o),k(this,i),M(this,t,a),M(this,r,u),M(this,n,l),M(this,o,c),M(this,i,p),M(this,e,s??a)}get message(){return T(this,t)}get status(){return T(this,r)}get statusText(){return T(this,n)}get response(){return T(this,o)}get config(){return T(this,i)}get name(){return T(this,e)}}t=new WeakMap,e=new WeakMap,r=new WeakMap,n=new WeakMap,o=new WeakMap,i=new WeakMap;const lr=(t={},e={})=>{const r=t instanceof Headers?t:new Headers(t);var n;return(n=e)instanceof Headers||(n=new Headers(n)),n.forEach(((t,e)=>{r.set(e,t)})),r},cr=["PATCH","POST","PUT"],pr=["GET","HEAD","OPTIONS","DELETE"];class sr{constructor(t){k(this,s),k(this,a),k(this,u),k(this,l),k(this,c),k(this,p,!1);const{plugins:e=[],controller:r,url:n,baseURL:o="",params:i,data:y,qsArrayFormat:d="repeat",withCredentials:h,extra:m,method:g="GET",headers:b}=t;M(this,u,r??new AbortController),M(this,a,(t=>{const e=new Set;t.forEach((t=>{e.add(t)}));const r=Array.from(e).sort(((t,e)=>(t.priority??0)-(e.priority??0))),n=[],o=[],i=[],a=[],u=[];return r.forEach((t=>{t.beforeRequest&&n.push(t.beforeRequest),t.afterResponse&&o.push(t.afterResponse),t.onError&&i.push(t.onError),t.onFinally&&a.push(t.onFinally),t.transformStreamChunk&&u.push(t.transformStreamChunk)})),{beforeRequestPlugins:n,afterResponsePlugins:o,errorPlugins:i,finallyPlugins:a,transformStreamChunkPlugins:u}})(e)),M(this,l,{url:n,baseURL:o,params:i,data:y,withCredentials:h,extra:m,method:g,headers:b,qsArrayFormat:d}),M(this,c,D(this,s,f).call(this,t))}then(t,e){return T(this,s,h).then(t,e)}catch(t){return T(this,s,h).catch(t)}finally(t){return T(this,s,h).finally(t)}abort(){T(this,u).abort()}blob(){return T(this,s,m).then((t=>t.blob()))}text(){return T(this,s,m).then((t=>t.text()))}arrayBuffer(){return T(this,s,m).then((t=>t.arrayBuffer()))}formData(){return T(this,s,m).then((t=>t.formData()))}bytes(){return T(this,s,m).then((t=>t.bytes()))}async*stream(){var t,e;const r=null==(e=null==(t=(await T(this,c)).clone())?void 0:t.body)?void 0:e.getReader();if(r)for(;;){const{done:t,value:e}=await r.read();if(t)break;let o={source:e,result:e,error:null};try{for(const t of T(this,a).transformStreamChunkPlugins)o=await t(o);yield o}catch(n){o.error=n,o.result=null,yield o}}}}a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap,p=new WeakMap,s=new WeakSet,f=function({timeout:t}){return new Promise((async(e,r)=>{let n=T(this,l);const{beforeRequestPlugins:o}=T(this,a);for(const t of o)n=await t(n);const i=((t,e,r="repeat")=>{if(e){const n=or.stringify(e,{arrayFormat:r});n&&(t=t.includes("?")?`${t}&${n}`:`${t}?${n}`)}return t})(n.baseURL+n.url,n.params,n.qsArrayFormat),c=((t,e,r,n="repeat")=>{if(!t)return null;let o=null;if(cr.includes(e.toUpperCase())){const e=new Headers(r||{}).get("Content-Type")||"";if(e.includes(ir.JSON))o=JSON.stringify(t);else if(e.includes(ir.FORM_URLENCODED))o=or.stringify(t,{arrayFormat:n});else if(e.includes(ir.FORM_DATA)){const e=new FormData;if(!(t instanceof FormData)&&"object"==typeof t){const r=t;Object.keys(r).forEach((t=>{r.prototype.hasOwnProperty.call(t)&&e.append(t,r[t])})),o=e}}}return pr.includes(e.toUpperCase())&&(o=null),o})(n.data,n.method,n.headers,n.qsArrayFormat);var f,y;const h={...(y=["baseURL","data","extra","headers","method","params","url","withCredentials"],(f=n??{})?y&&0!==y.length?y.reduce(((t,e)=>(delete t[e],t)),{...f}):f:{}),method:n.method,headers:n.headers,signal:T(this,u).signal,credentials:n.withCredentials?"include":"omit",body:c};let m=[fetch(i,h)],g=null;if(t){const e=new Promise((e=>{g=setTimeout((()=>{var t;M(this,p,!0),null==(t=T(this,u))||t.abort()}),t)}));m.push(e)}try{const t=await Promise.race(m);return t?(t.ok&&e(t),r(new ur({message:"Fail Request",status:t.status,statusText:t.statusText,config:T(this,l),name:"Fail Request"}))):r(new ur({message:"NETWORK_ERROR",status:ar.NETWORK_ERROR,statusText:"Network Error",config:T(this,l),name:"Network Error"}))}catch(b){r(await D(this,s,d).call(this,b))}finally{g&&clearTimeout(g)}}))},y=async function(t){return t instanceof ur?t:t instanceof TypeError?"AbortError"===t.name?T(this,p)?new ur({message:"Request timeout",status:ar.TIME_OUT,statusText:"Request timeout",config:T(this,l),name:"Request timeout",response:await T(this,s,m)}):new ur({message:"Request aborted",status:ar.ABORTED,statusText:"Request aborted",config:T(this,l),name:"Request aborted",response:await T(this,s,m)}):new ur({message:t.message,status:ar.NETWORK_ERROR,statusText:"Unknown Request Error",config:T(this,l),name:t.name,response:await T(this,s,m)}):new ur({message:(null==t?void 0:t.message)??"Unknown Request Error",status:ar.UNKNOWN,statusText:"Unknown Request Error",config:T(this,l),name:"Unknown Request Error",response:await T(this,s,m)})},d=async function(t){let e=await D(this,s,y).call(this,t);for(const r of T(this,a).errorPlugins)e=await r(e);return e},h=function(){return new Promise(((t,e)=>{T(this,s,m).then((t=>t.json())).then((async e=>{let r=e;for(const t of T(this,a).afterResponsePlugins)r=await t(r);t(r)})).catch((async t=>{e(await D(this,s,d).call(this,t))})).finally((async()=>{const t={config:T(this,l),response:await T(this,s,m).then((t=>t.clone()))};for(const e of T(this,a).finallyPlugins)e(t)}))}))},m=function(){return T(this,c).then((t=>t.clone()))};const fr=t=>new sr(t);class yr{constructor({timeout:t=0,baseURL:e="",headers:r={},plugins:n=[],withCredentials:o=!1}){k(this,A),k(this,g),k(this,b),k(this,w),k(this,v,[]),k(this,S,[]),k(this,O),M(this,g,t),M(this,b,e),M(this,w,r),M(this,S,n),M(this,O,o)}use(t){return T(this,S).push(t),this}request(t,{timeout:e,headers:r,method:n="GET",params:o,data:i,qsArrayFormat:a,withCredentials:u,extra:l}={}){const c=new AbortController;T(this,v).push(c);const p=fr({url:t,baseURL:T(this,b),timeout:e??T(this,g),plugins:T(this,S),headers:lr(T(this,w),r),controller:c,method:n,params:o,data:i,qsArrayFormat:a,withCredentials:u??T(this,O),extra:l});return p.finally((()=>{M(this,v,T(this,v).filter((t=>t!==c)))})),p}get(t,e={},r){return D(this,A,E).call(this,t,e,r)}head(t,e={},r){return D(this,A,E).call(this,t,e,r)}options(t,e={},r){return D(this,A,E).call(this,t,e,r)}delete(t,e){return this.request(t,e)}post(t,e,r){return D(this,A,P).call(this,t,e,r)}put(t,e,r){return D(this,A,P).call(this,t,e,r)}patch(t,e,r){return D(this,A,P).call(this,t,e,r)}abortAll(){T(this,v).forEach((t=>t.abort())),M(this,v,[])}}g=new WeakMap,b=new WeakMap,w=new WeakMap,v=new WeakMap,S=new WeakMap,O=new WeakMap,A=new WeakSet,E=function(t,e={},r={}){return this.request(t,{...r,params:e})},P=function(t,e={},r={}){return this.request(t,{...r,data:e})};const dr=(t,e={})=>fr({url:t,baseURL:"",...e});dr.create=t=>new yr(t),module.exports=dr;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./sse.js");exports.sseTextDecoderPlugin=e.sseTextDecoderPlugin;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=new TextDecoder("utf-8");exports.sseTextDecoderPlugin=()=>({name:"sse",transformStreamChunk:async r=>(r.error||(r.result=e.decode(r.result,{stream:!0})),r)});
2
+ //# sourceMappingURL=sse.js.map