commerce-sdk-isomorphic 4.0.1-preview-shopper-test.0 → 4.1.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.
- package/README.md +57 -0
- package/lib/clientConfig.cjs.d.ts +4 -2
- package/lib/clientConfig.cjs.js +1 -1
- package/lib/clientConfig.d.ts +4 -2
- package/lib/clientConfig.js +1 -1
- package/lib/helpers.cjs.d.ts +9 -9
- package/lib/helpers.cjs.js +1 -1
- package/lib/helpers.d.ts +9 -9
- package/lib/helpers.js +1 -1
- package/lib/index.cjs.d.ts +57 -24
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +57 -24
- package/lib/index.esm.js +1 -1
- package/lib/shopperBaskets.cjs.d.ts +6 -1
- package/lib/shopperBaskets.cjs.js +1 -1
- package/lib/shopperBaskets.d.ts +6 -1
- package/lib/shopperBaskets.js +1 -1
- package/lib/shopperBasketsv2.cjs.d.ts +6 -1
- package/lib/shopperBasketsv2.cjs.js +1 -1
- package/lib/shopperBasketsv2.d.ts +6 -1
- package/lib/shopperBasketsv2.js +1 -1
- package/lib/shopperConsents.cjs.d.ts +6 -1
- package/lib/shopperConsents.cjs.js +1 -1
- package/lib/shopperConsents.d.ts +6 -1
- package/lib/shopperConsents.js +1 -1
- package/lib/shopperContext.cjs.d.ts +6 -1
- package/lib/shopperContext.cjs.js +1 -1
- package/lib/shopperContext.d.ts +6 -1
- package/lib/shopperContext.js +1 -1
- package/lib/shopperCustomers.cjs.d.ts +6 -1
- package/lib/shopperCustomers.cjs.js +1 -1
- package/lib/shopperCustomers.d.ts +6 -1
- package/lib/shopperCustomers.js +1 -1
- package/lib/shopperExperience.cjs.d.ts +6 -1
- package/lib/shopperExperience.cjs.js +1 -1
- package/lib/shopperExperience.d.ts +6 -1
- package/lib/shopperExperience.js +1 -1
- package/lib/shopperGiftCertificates.cjs.d.ts +6 -1
- package/lib/shopperGiftCertificates.cjs.js +1 -1
- package/lib/shopperGiftCertificates.d.ts +6 -1
- package/lib/shopperGiftCertificates.js +1 -1
- package/lib/shopperLogin.cjs.d.ts +6 -1
- package/lib/shopperLogin.cjs.js +1 -1
- package/lib/shopperLogin.d.ts +6 -1
- package/lib/shopperLogin.js +1 -1
- package/lib/shopperOrders.cjs.d.ts +6 -1
- package/lib/shopperOrders.cjs.js +1 -1
- package/lib/shopperOrders.d.ts +6 -1
- package/lib/shopperOrders.js +1 -1
- package/lib/shopperProducts.cjs.d.ts +6 -1
- package/lib/shopperProducts.cjs.js +1 -1
- package/lib/shopperProducts.d.ts +6 -1
- package/lib/shopperProducts.js +1 -1
- package/lib/shopperPromotions.cjs.d.ts +6 -1
- package/lib/shopperPromotions.cjs.js +1 -1
- package/lib/shopperPromotions.d.ts +6 -1
- package/lib/shopperPromotions.js +1 -1
- package/lib/shopperSearch.cjs.d.ts +6 -1
- package/lib/shopperSearch.cjs.js +1 -1
- package/lib/shopperSearch.d.ts +6 -1
- package/lib/shopperSearch.js +1 -1
- package/lib/shopperSeo.cjs.d.ts +6 -1
- package/lib/shopperSeo.cjs.js +1 -1
- package/lib/shopperSeo.d.ts +6 -1
- package/lib/shopperSeo.js +1 -1
- package/lib/shopperStores.cjs.d.ts +6 -1
- package/lib/shopperStores.cjs.js +1 -1
- package/lib/shopperStores.d.ts +6 -1
- package/lib/shopperStores.js +1 -1
- package/lib/version.cjs.d.ts +1 -1
- package/lib/version.cjs.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -149,6 +149,45 @@ const helpers = require('commerce-sdk-isomorphic/helpers');
|
|
|
149
149
|
|
|
150
150
|
**Note:** While subpath imports reduce initial bundle size, using them for all APIs will result in a larger total bundle size due to duplicated dependencies required for standalone operation.
|
|
151
151
|
|
|
152
|
+
#### Custom Fetch function
|
|
153
|
+
|
|
154
|
+
You can provide your own custom fetch function to intercept, log, or modify all SDK requests. This is useful for:
|
|
155
|
+
- **Request/Response Logging**: Track all API calls for debugging and monitoring
|
|
156
|
+
- **Request Interception**: Add custom headers, modify request URLs, or implement custom retry logic
|
|
157
|
+
- **Error Handling**: Add custom error processing or transformation before responses reach your application
|
|
158
|
+
- **Performance Monitoring**: Measure request/response times and track API performance metrics
|
|
159
|
+
|
|
160
|
+
**Example with Logging:**
|
|
161
|
+
```javascript
|
|
162
|
+
// Custom fetch function with detailed logging
|
|
163
|
+
const customFetch = async (url, options) => {
|
|
164
|
+
console.log(`[SDK Request] ${options?.method || 'GET'} ${url}`);
|
|
165
|
+
console.log('[SDK Request Headers]', options?.headers);
|
|
166
|
+
if (options?.body) {
|
|
167
|
+
console.log('[SDK Request Body]', options.body);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const startTime = Date.now();
|
|
171
|
+
const response = await fetch(url, options);
|
|
172
|
+
const duration = Date.now() - startTime;
|
|
173
|
+
|
|
174
|
+
console.log(`[SDK Response] ${response.status} ${response.statusText} (${duration}ms)`);
|
|
175
|
+
console.log('[SDK Response Headers]', Object.fromEntries(response.headers.entries()));
|
|
176
|
+
|
|
177
|
+
return response;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const config = {
|
|
181
|
+
parameters: {
|
|
182
|
+
clientId: '<your-client-id>',
|
|
183
|
+
organizationId: '<your-org-id>',
|
|
184
|
+
shortCode: '<your-short-code>',
|
|
185
|
+
siteId: '<your-site-id>',
|
|
186
|
+
},
|
|
187
|
+
fetch: customFetch,
|
|
188
|
+
};
|
|
189
|
+
```
|
|
190
|
+
|
|
152
191
|
#### Fetch Options
|
|
153
192
|
|
|
154
193
|
You can configure how the SDK makes requests using the `fetchOptions` parameter. It is passed to [node-fetch](https://github.com/node-fetch/node-fetch/1#api) on the server and [whatwg-fetch](https://github.github.io/fetch/) on browser.
|
|
@@ -340,6 +379,24 @@ console.log("categoriesResult: ", categoriesResult);
|
|
|
340
379
|
|
|
341
380
|
**NOTE: In the next major version release, path parameters will be single encoded by default**
|
|
342
381
|
|
|
382
|
+
## Unstable Releases
|
|
383
|
+
|
|
384
|
+
**⚠️ Important: Unstable/preview releases are experimental and not officially supported.**
|
|
385
|
+
|
|
386
|
+
Preview releases (e.g., preview, unstable, or pre-release versions) are provided for experimental purposes and early testing of upcoming features. These releases:
|
|
387
|
+
|
|
388
|
+
- **Are not intended for production use** - Do not use unstable releases in production environments
|
|
389
|
+
- **May contain breaking changes** - API signatures, behavior, and structure may change without notice
|
|
390
|
+
- **Are not officially supported** - No support, bug fixes, or security patches are guaranteed
|
|
391
|
+
- **May have incomplete features** - Functionality may be partially implemented or subject to change
|
|
392
|
+
|
|
393
|
+
**Use stable releases for production applications.** Only use unstable releases for:
|
|
394
|
+
- Testing upcoming features in development environments
|
|
395
|
+
- Providing feedback on new functionality before official release
|
|
396
|
+
- Experimental integrations that are not mission-critical
|
|
397
|
+
|
|
398
|
+
For production deployments, always use the latest stable release version available on npm.
|
|
399
|
+
|
|
343
400
|
## License Information
|
|
344
401
|
|
|
345
402
|
The Commerce SDK Isomorphic is licensed under BSD-3-Clause license. See the [license](./LICENSE.txt) for details.
|
|
@@ -16,6 +16,7 @@ type BrowserRequestInit = RequestInit;
|
|
|
16
16
|
* Using the right properties in the right context is left to the user.
|
|
17
17
|
*/
|
|
18
18
|
type FetchOptions = NodeRequestInit & BrowserRequestInit;
|
|
19
|
+
type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
|
|
19
20
|
/**
|
|
20
21
|
* Base options that can be passed to the `ClientConfig` class.
|
|
21
22
|
*/
|
|
@@ -27,12 +28,12 @@ interface ClientConfigInit<Params extends BaseUriParameters> {
|
|
|
27
28
|
};
|
|
28
29
|
parameters: Params;
|
|
29
30
|
fetchOptions?: FetchOptions;
|
|
31
|
+
fetch?: FetchFunction;
|
|
30
32
|
transformRequest?: (data: unknown, headers: {
|
|
31
33
|
[key: string]: string;
|
|
32
34
|
}) => Required<FetchOptions>['body'];
|
|
33
35
|
throwOnBadResponse?: boolean;
|
|
34
36
|
}
|
|
35
|
-
type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
|
|
36
37
|
/**
|
|
37
38
|
* Configuration parameters common to Commerce SDK clients
|
|
38
39
|
*/
|
|
@@ -44,9 +45,10 @@ declare class ClientConfig<Params extends BaseUriParameters> implements ClientCo
|
|
|
44
45
|
};
|
|
45
46
|
parameters: Params;
|
|
46
47
|
fetchOptions: FetchOptions;
|
|
48
|
+
fetch?: FetchFunction;
|
|
47
49
|
transformRequest: NonNullable<ClientConfigInit<Params>['transformRequest']>;
|
|
48
50
|
throwOnBadResponse: boolean;
|
|
49
51
|
constructor(config: ClientConfigInit<Params>);
|
|
50
52
|
static readonly defaults: Pick<Required<ClientConfigInit<never>>, 'transformRequest'>;
|
|
51
53
|
}
|
|
52
|
-
export { FetchOptions,
|
|
54
|
+
export { FetchOptions, FetchFunction, ClientConfigInit, ClientConfig as default };
|
package/lib/clientConfig.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var r,n,o=function(t){return t&&t.Math==Math&&t},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),u=function(t){try{return!!t()}catch(t){return!0}},a=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!u((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),f=Function.prototype.call,s=c?f.bind(f):function(){return f.apply(f,arguments)},l={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,y={f:p&&!l.call({1:2},1)?function(t){var e=p(this,t);return!!e&&e.enumerable}:l},h=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v=Function.prototype,d=v.bind,g=v.call,b=c&&d.bind(g,g),m=c?function(t){return t&&b(t)}:function(t){return t&&function(){return g.apply(t,arguments)}},O=m({}.toString),w=m("".slice),S=function(t){return w(O(t),8,-1)},j=Object,P=m("".split),L=u((function(){return!j("z").propertyIsEnumerable(0)}))?function(t){return"String"==S(t)?P(t,""):j(t)}:j,R=TypeError,E=function(t){if(null==t)throw R("Can't call method on "+t);return t},k=function(t){return L(E(t))},T=function(t){return"function"==typeof t},A=function(t){return"object"==typeof t?null!==t:T(t)},x=function(t){return T(t)?t:void 0},F=function(t,e){return arguments.length<2?x(i[t]):i[t]&&i[t][e]},I=m({}.isPrototypeOf),U=F("navigator","userAgent")||"",C=i.process,_=i.Deno,D=C&&C.versions||_&&_.version,M=D&&D.v8;M&&(n=(r=M.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!n&&U&&(!(r=U.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=U.match(/Chrome\/(\d+)/))&&(n=+r[1]);var N=n,G=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&N&&N<41})),q=G&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,B=Object,z=q?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return T(e)&&I(e.prototype,B(t))},V=String,W=function(t){try{return V(t)}catch(t){return"Object"}},H=TypeError,Q=function(t){if(T(t))return t;throw H(W(t)+" is not a function")},J=function(t,e){var r=t[e];return null==r?void 0:Q(r)},Y=TypeError,$=Object.defineProperty,X=function(t,e){try{$(i,t,{value:e,configurable:!0,writable:!0})}catch(r){i[t]=e}return e},K=i["__core-js_shared__"]||X("__core-js_shared__",{}),Z=e((function(t){(t.exports=function(t,e){return K[t]||(K[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.23.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),tt=Object,et=function(t){return tt(E(t))},rt=m({}.hasOwnProperty),nt=Object.hasOwn||function(t,e){return rt(et(t),e)},ot=0,it=Math.random(),ut=m(1..toString),at=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ut(++ot+it,36)},ct=Z("wks"),ft=i.Symbol,st=ft&&ft.for,lt=q?ft:ft&&ft.withoutSetter||at,pt=function(t){if(!nt(ct,t)||!G&&"string"!=typeof ct[t]){var e="Symbol."+t;G&&nt(ft,t)?ct[t]=ft[t]:ct[t]=q&&st?st(e):lt(e)}return ct[t]},yt=TypeError,ht=pt("toPrimitive"),vt=function(t,e){if(!A(t)||z(t))return t;var r,n=J(t,ht);if(n){if(void 0===e&&(e="default"),r=s(n,t,e),!A(r)||z(r))return r;throw yt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&T(r=t.toString)&&!A(n=s(r,t)))return n;if(T(r=t.valueOf)&&!A(n=s(r,t)))return n;if("string"!==e&&T(r=t.toString)&&!A(n=s(r,t)))return n;throw Y("Can't convert object to primitive value")}(t,e)},dt=function(t){var e=vt(t,"string");return z(e)?e:e+""},gt=i.document,bt=A(gt)&&A(gt.createElement),mt=function(t){return bt?gt.createElement(t):{}},Ot=!a&&!u((function(){return 7!=Object.defineProperty(mt("div"),"a",{get:function(){return 7}}).a})),wt=Object.getOwnPropertyDescriptor,St={f:a?wt:function(t,e){if(t=k(t),e=dt(e),Ot)try{return wt(t,e)}catch(t){}if(nt(t,e))return h(!s(y.f,t,e),t[e])}},jt=a&&u((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Pt=String,Lt=TypeError,Rt=function(t){if(A(t))return t;throw Lt(Pt(t)+" is not an object")},Et=TypeError,kt=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,At={f:a?jt?function(t,e,r){if(Rt(t),e=dt(e),Rt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=Tt(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return kt(t,e,r)}:kt:function(t,e,r){if(Rt(t),e=dt(e),Rt(r),Ot)try{return kt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Et("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},xt=a?function(t,e,r){return At.f(t,e,h(1,r))}:function(t,e,r){return t[e]=r,t},Ft=Function.prototype,It=a&&Object.getOwnPropertyDescriptor,Ut=nt(Ft,"name"),Ct={EXISTS:Ut,PROPER:Ut&&"something"===function(){}.name,CONFIGURABLE:Ut&&(!a||a&&It(Ft,"name").configurable)},_t=m(Function.toString);T(K.inspectSource)||(K.inspectSource=function(t){return _t(t)});var Dt,Mt,Nt,Gt=K.inspectSource,qt=i.WeakMap,Bt=T(qt)&&/native code/.test(Gt(qt)),zt=Z("keys"),Vt=function(t){return zt[t]||(zt[t]=at(t))},Wt={},Ht=i.TypeError,Qt=i.WeakMap;if(Bt||K.state){var Jt=K.state||(K.state=new Qt),Yt=m(Jt.get),$t=m(Jt.has),Xt=m(Jt.set);Dt=function(t,e){if($t(Jt,t))throw new Ht("Object already initialized");return e.facade=t,Xt(Jt,t,e),e},Mt=function(t){return Yt(Jt,t)||{}},Nt=function(t){return $t(Jt,t)}}else{var Kt=Vt("state");Wt[Kt]=!0,Dt=function(t,e){if(nt(t,Kt))throw new Ht("Object already initialized");return e.facade=t,xt(t,Kt,e),e},Mt=function(t){return nt(t,Kt)?t[Kt]:{}},Nt=function(t){return nt(t,Kt)}}var Zt={set:Dt,get:Mt,has:Nt,enforce:function(t){return Nt(t)?Mt(t):Dt(t,{})},getterFor:function(t){return function(e){var r;if(!A(e)||(r=Mt(e)).type!==t)throw Ht("Incompatible receiver, "+t+" required");return r}}},te=e((function(t){var e=Ct.CONFIGURABLE,r=Zt.enforce,n=Zt.get,o=Object.defineProperty,i=a&&!u((function(){return 8!==o((function(){}),"length",{value:8}).length})),c=String(String).split("String"),f=t.exports=function(t,n,u){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),u&&u.getter&&(n="get "+n),u&&u.setter&&(n="set "+n),(!nt(t,"name")||e&&t.name!==n)&&(a?o(t,"name",{value:n,configurable:!0}):t.name=n),i&&u&&nt(u,"arity")&&t.length!==u.arity&&o(t,"length",{value:u.arity});try{u&&nt(u,"constructor")&&u.constructor?a&&o(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var f=r(t);return nt(f,"source")||(f.source=c.join("string"==typeof n?n:"")),t};Function.prototype.toString=f((function(){return T(this)&&n(this).source||Gt(this)}),"toString")})),ee=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(T(r)&&te(r,i,n),n.global)o?t[e]=r:X(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:At.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},re=Math.ceil,ne=Math.floor,oe=Math.trunc||function(t){var e=+t;return(e>0?ne:re)(e)},ie=function(t){var e=+t;return e!=e||0===e?0:oe(e)},ue=Math.max,ae=Math.min,ce=function(t,e){var r=ie(t);return r<0?ue(r+e,0):ae(r,e)},fe=Math.min,se=function(t){return(e=t.length)>0?fe(ie(e),9007199254740991):0;var e},le=function(t){return function(e,r,n){var o,i=k(e),u=se(i),a=ce(n,u);if(t&&r!=r){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},pe={includes:le(!0),indexOf:le(!1)}.indexOf,ye=m([].push),he=function(t,e){var r,n=k(t),o=0,i=[];for(r in n)!nt(Wt,r)&&nt(n,r)&&ye(i,r);for(;e.length>o;)nt(n,r=e[o++])&&(~pe(i,r)||ye(i,r));return i},ve=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],de=ve.concat("length","prototype"),ge={f:Object.getOwnPropertyNames||function(t){return he(t,de)}},be={f:Object.getOwnPropertySymbols},me=m([].concat),Oe=F("Reflect","ownKeys")||function(t){var e=ge.f(Rt(t)),r=be.f;return r?me(e,r(t)):e},we=function(t,e,r){for(var n=Oe(e),o=At.f,i=St.f,u=0;u<n.length;u++){var a=n[u];nt(t,a)||r&&nt(r,a)||o(t,a,i(e,a))}},Se=/#|\.prototype\./,je=function(t,e){var r=Le[Pe(t)];return r==Ee||r!=Re&&(T(e)?u(e):!!e)},Pe=je.normalize=function(t){return String(t).replace(Se,".").toLowerCase()},Le=je.data={},Re=je.NATIVE="N",Ee=je.POLYFILL="P",ke=je,Te=St.f,Ae=function(t,e){var r,n,o,u,a,c=t.target,f=t.global,s=t.stat;if(r=f?i:s?i[c]||X(c,{}):(i[c]||{}).prototype)for(n in e){if(u=e[n],o=t.dontCallGetSet?(a=Te(r,n))&&a.value:r[n],!ke(f?n:c+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof u==typeof o)continue;we(u,o)}(t.sham||o&&o.sham)&&xt(u,"sham",!0),ee(r,n,u,t)}},xe=Object.keys||function(t){return he(t,ve)},Fe=u((function(){xe(1)}));Ae({target:"Object",stat:!0,forced:Fe},{keys:function(t){return xe(et(t))}});var Ie={};Ie[pt("toStringTag")]="z";var Ue,Ce="[object z]"===String(Ie),_e=pt("toStringTag"),De=Object,Me="Arguments"==S(function(){return arguments}()),Ne=Ce?S:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=De(t),_e))?r:Me?S(e):"Object"==(n=S(e))&&T(e.callee)?"Arguments":n},Ge=String,qe=function(t){if("Symbol"===Ne(t))throw TypeError("Cannot convert a Symbol value to a string");return Ge(t)},Be={f:a&&!jt?Object.defineProperties:function(t,e){Rt(t);for(var r,n=k(e),o=xe(e),i=o.length,u=0;i>u;)At.f(t,r=o[u++],n[r]);return t}},ze=F("document","documentElement"),Ve=Vt("IE_PROTO"),We=function(){},He=function(t){return"<script>"+t+"<\/script>"},Qe=function(t){t.write(He("")),t.close();var e=t.parentWindow.Object;return t=null,e},Je=function(){try{Ue=new ActiveXObject("htmlfile")}catch(t){}var t,e;Je="undefined"!=typeof document?document.domain&&Ue?Qe(Ue):((e=mt("iframe")).style.display="none",ze.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(He("document.F=Object")),t.close(),t.F):Qe(Ue);for(var r=ve.length;r--;)delete Je.prototype[ve[r]];return Je()};Wt[Ve]=!0;var Ye=Object.create||function(t,e){var r;return null!==t?(We.prototype=Rt(t),r=new We,We.prototype=null,r[Ve]=t):r=Je(),void 0===e?r:Be.f(r,e)},$e=function(t,e,r){var n=dt(e);n in t?At.f(t,n,h(0,r)):t[n]=r},Xe=Array,Ke=Math.max,Ze=function(t,e,r){for(var n=se(t),o=ce(e,n),i=ce(void 0===r?n:r,n),u=Xe(Ke(i-o,0)),a=0;o<i;o++,a++)$e(u,a,t[o]);return u.length=a,u},tr=ge.f,er="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],rr={f:function(t){return er&&"Window"==S(t)?function(t){try{return tr(t)}catch(t){return Ze(er)}}(t):tr(k(t))}},nr={f:pt},or=i,ir=At.f,ur=At.f,ar=pt("toStringTag"),cr=function(t,e,r){t&&!r&&(t=t.prototype),t&&!nt(t,ar)&&ur(t,ar,{configurable:!0,value:e})},fr=m(m.bind),sr=function(t,e){return Q(t),void 0===e?t:c?fr(t,e):function(){return t.apply(e,arguments)}},lr=Array.isArray||function(t){return"Array"==S(t)},pr=function(){},yr=[],hr=F("Reflect","construct"),vr=/^\s*(?:class|function)\b/,dr=m(vr.exec),gr=!vr.exec(pr),br=function(t){if(!T(t))return!1;try{return hr(pr,yr,t),!0}catch(t){return!1}},mr=function(t){if(!T(t))return!1;switch(Ne(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gr||!!dr(vr,Gt(t))}catch(t){return!0}};mr.sham=!0;var Or=!hr||u((function(){var t;return br(br.call)||!br(Object)||!br((function(){t=!0}))||t}))?mr:br,wr=pt("species"),Sr=Array,jr=function(t,e){return new(function(t){var e;return lr(t)&&(e=t.constructor,(Or(e)&&(e===Sr||lr(e.prototype))||A(e)&&null===(e=e[wr]))&&(e=void 0)),void 0===e?Sr:e}(t))(0===e?0:e)},Pr=m([].push),Lr=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,f,s,l){for(var p,y,h=et(c),v=L(h),d=sr(f,s),g=se(v),b=0,m=l||jr,O=e?m(c,g):r||u?m(c,0):void 0;g>b;b++)if((a||b in v)&&(y=d(p=v[b],b,h),t))if(e)O[b]=y;else if(y)switch(t){case 3:return!0;case 5:return p;case 6:return b;case 2:Pr(O,p)}else switch(t){case 4:return!1;case 7:Pr(O,p)}return i?-1:n||o?o:O}},Rr={forEach:Lr(0),map:Lr(1),filter:Lr(2),some:Lr(3),every:Lr(4),find:Lr(5),findIndex:Lr(6),filterReject:Lr(7)},Er=Rr.forEach,kr=Vt("hidden"),Tr=Zt.set,Ar=Zt.getterFor("Symbol"),xr=Object.prototype,Fr=i.Symbol,Ir=Fr&&Fr.prototype,Ur=i.TypeError,Cr=i.QObject,_r=St.f,Dr=At.f,Mr=rr.f,Nr=y.f,Gr=m([].push),qr=Z("symbols"),Br=Z("op-symbols"),zr=Z("wks"),Vr=!Cr||!Cr.prototype||!Cr.prototype.findChild,Wr=a&&u((function(){return 7!=Ye(Dr({},"a",{get:function(){return Dr(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=_r(xr,e);n&&delete xr[e],Dr(t,e,r),n&&t!==xr&&Dr(xr,e,n)}:Dr,Hr=function(t,e){var r=qr[t]=Ye(Ir);return Tr(r,{type:"Symbol",tag:t,description:e}),a||(r.description=e),r},Qr=function(t,e,r){t===xr&&Qr(Br,e,r),Rt(t);var n=dt(e);return Rt(r),nt(qr,n)?(r.enumerable?(nt(t,kr)&&t[kr][n]&&(t[kr][n]=!1),r=Ye(r,{enumerable:h(0,!1)})):(nt(t,kr)||Dr(t,kr,h(1,{})),t[kr][n]=!0),Wr(t,n,r)):Dr(t,n,r)},Jr=function(t,e){Rt(t);var r=k(e),n=xe(r).concat(Kr(r));return Er(n,(function(e){a&&!s(Yr,r,e)||Qr(t,e,r[e])})),t},Yr=function(t){var e=dt(t),r=s(Nr,this,e);return!(this===xr&&nt(qr,e)&&!nt(Br,e))&&(!(r||!nt(this,e)||!nt(qr,e)||nt(this,kr)&&this[kr][e])||r)},$r=function(t,e){var r=k(t),n=dt(e);if(r!==xr||!nt(qr,n)||nt(Br,n)){var o=_r(r,n);return!o||!nt(qr,n)||nt(r,kr)&&r[kr][n]||(o.enumerable=!0),o}},Xr=function(t){var e=Mr(k(t)),r=[];return Er(e,(function(t){nt(qr,t)||nt(Wt,t)||Gr(r,t)})),r},Kr=function(t){var e=t===xr,r=Mr(e?Br:k(t)),n=[];return Er(r,(function(t){!nt(qr,t)||e&&!nt(xr,t)||Gr(n,qr[t])})),n};G||(Ir=(Fr=function(){if(I(Ir,this))throw Ur("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?qe(arguments[0]):void 0,e=at(t),r=function(t){this===xr&&s(r,Br,t),nt(this,kr)&&nt(this[kr],e)&&(this[kr][e]=!1),Wr(this,e,h(1,t))};return a&&Vr&&Wr(xr,e,{configurable:!0,set:r}),Hr(e,t)}).prototype,ee(Ir,"toString",(function(){return Ar(this).tag})),ee(Fr,"withoutSetter",(function(t){return Hr(at(t),t)})),y.f=Yr,At.f=Qr,Be.f=Jr,St.f=$r,ge.f=rr.f=Xr,be.f=Kr,nr.f=function(t){return Hr(pt(t),t)},a&&(Dr(Ir,"description",{configurable:!0,get:function(){return Ar(this).description}}),ee(xr,"propertyIsEnumerable",Yr,{unsafe:!0}))),Ae({global:!0,constructor:!0,wrap:!0,forced:!G,sham:!G},{Symbol:Fr}),Er(xe(zr),(function(t){!function(t){var e=or.Symbol||(or.Symbol={});nt(e,t)||ir(e,t,{value:nr.f(t)})}(t)})),Ae({target:"Symbol",stat:!0,forced:!G},{useSetter:function(){Vr=!0},useSimple:function(){Vr=!1}}),Ae({target:"Object",stat:!0,forced:!G,sham:!a},{create:function(t,e){return void 0===e?Ye(t):Jr(Ye(t),e)},defineProperty:Qr,defineProperties:Jr,getOwnPropertyDescriptor:$r}),Ae({target:"Object",stat:!0,forced:!G},{getOwnPropertyNames:Xr}),function(){var t=F("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,n=pt("toPrimitive");e&&!e[n]&&ee(e,n,(function(t){return s(r,this)}),{arity:1})}(),cr(Fr,"Symbol"),Wt[kr]=!0;var Zr=G&&!!Symbol.for&&!!Symbol.keyFor,tn=Z("string-to-symbol-registry"),en=Z("symbol-to-string-registry");Ae({target:"Symbol",stat:!0,forced:!Zr},{for:function(t){var e=qe(t);if(nt(tn,e))return tn[e];var r=F("Symbol")(e);return tn[e]=r,en[r]=e,r}});var rn=Z("symbol-to-string-registry");Ae({target:"Symbol",stat:!0,forced:!Zr},{keyFor:function(t){if(!z(t))throw TypeError(W(t)+" is not a symbol");if(nt(rn,t))return rn[t]}});var nn=Function.prototype,on=nn.apply,un=nn.call,an="object"==typeof Reflect&&Reflect.apply||(c?un.bind(on):function(){return un.apply(on,arguments)}),cn=m([].slice),fn=F("JSON","stringify"),sn=m(/./.exec),ln=m("".charAt),pn=m("".charCodeAt),yn=m("".replace),hn=m(1..toString),vn=/[\uD800-\uDFFF]/g,dn=/^[\uD800-\uDBFF]$/,gn=/^[\uDC00-\uDFFF]$/,bn=!G||u((function(){var t=F("Symbol")();return"[null]"!=fn([t])||"{}"!=fn({a:t})||"{}"!=fn(Object(t))})),mn=u((function(){return'"\\udf06\\ud834"'!==fn("\udf06\ud834")||'"\\udead"'!==fn("\udead")})),On=function(t,e){var r=cn(arguments),n=e;if((A(e)||void 0!==t)&&!z(t))return lr(e)||(e=function(t,e){if(T(n)&&(e=s(n,this,t,e)),!z(e))return e}),r[1]=e,an(fn,null,r)},wn=function(t,e,r){var n=ln(r,e-1),o=ln(r,e+1);return sn(dn,t)&&!sn(gn,o)||sn(gn,t)&&!sn(dn,n)?"\\u"+hn(pn(t,0),16):t};fn&&Ae({target:"JSON",stat:!0,arity:3,forced:bn||mn},{stringify:function(t,e,r){var n=cn(arguments),o=an(bn?On:fn,null,n);return mn&&"string"==typeof o?yn(o,vn,wn):o}});var Sn=!G||u((function(){be.f(1)}));Ae({target:"Object",stat:!0,forced:Sn},{getOwnPropertySymbols:function(t){var e=be.f;return e?e(et(t)):[]}});var jn,Pn=pt("species"),Ln=Rr.filter,Rn=(jn="filter",N>=51||!u((function(){var t=[];return(t.constructor={})[Pn]=function(){return{foo:1}},1!==t[jn](Boolean).foo})));Ae({target:"Array",proto:!0,forced:!Rn},{filter:function(t){return Ln(this,t,arguments.length>1?arguments[1]:void 0)}});var En=Ce?{}.toString:function(){return"[object "+Ne(this)+"]"};Ce||ee(Object.prototype,"toString",En,{unsafe:!0});var kn=St.f,Tn=u((function(){kn(1)}));Ae({target:"Object",stat:!0,forced:!a||Tn,sham:!a},{getOwnPropertyDescriptor:function(t,e){return kn(k(t),e)}});var An={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},xn=mt("span").classList,Fn=xn&&xn.constructor&&xn.constructor.prototype,In=Fn===Object.prototype?void 0:Fn,Un=Rr.forEach,Cn=function(t,e){var r=[][t];return!!r&&u((function(){r.call(null,e||function(){return 1},1)}))}("forEach")?[].forEach:function(t){return Un(this,t,arguments.length>1?arguments[1]:void 0)},_n=function(t){if(t&&t.forEach!==Cn)try{xt(t,"forEach",Cn)}catch(e){t.forEach=Cn}};for(var Dn in An)An[Dn]&&_n(i[Dn]&&i[Dn].prototype);_n(In),Ae({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(t){for(var e,r,n=k(t),o=St.f,i=Oe(n),u={},a=0;i.length>a;)void 0!==(r=o(n,e=i[a++]))&&$e(u,e,r);return u}});var Mn=Be.f;Ae({target:"Object",stat:!0,forced:Object.defineProperties!==Mn,sham:!a},{defineProperties:Mn});var Nn=At.f;Ae({target:"Object",stat:!0,forced:Object.defineProperty!==Nn,sham:!a},{defineProperty:Nn});var Gn=At.f,qn=pt("unscopables"),Bn=Array.prototype;null==Bn[qn]&&Gn(Bn,qn,{configurable:!0,value:Ye(null)});var zn,Vn,Wn,Hn=function(t){Bn[qn][t]=!0},Qn={},Jn=!u((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Yn=Vt("IE_PROTO"),$n=Object,Xn=$n.prototype,Kn=Jn?$n.getPrototypeOf:function(t){var e=et(t);if(nt(e,Yn))return e[Yn];var r=e.constructor;return T(r)&&e instanceof r?r.prototype:e instanceof $n?Xn:null},Zn=pt("iterator"),to=!1;[].keys&&("next"in(Wn=[].keys())?(Vn=Kn(Kn(Wn)))!==Object.prototype&&(zn=Vn):to=!0),(null==zn||u((function(){var t={};return zn[Zn].call(t)!==t})))&&(zn={}),T(zn[Zn])||ee(zn,Zn,(function(){return this}));var eo={IteratorPrototype:zn,BUGGY_SAFARI_ITERATORS:to},ro=eo.IteratorPrototype,no=function(){return this},oo=function(t,e,r,n){var o=e+" Iterator";return t.prototype=Ye(ro,{next:h(+!n,r)}),cr(t,o,!1),Qn[o]=no,t},io=String,uo=TypeError,ao=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=m(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Rt(r),function(t){if("object"==typeof t||T(t))return t;throw uo("Can't set "+io(t)+" as a prototype")}(n),e?t(r,n):r.__proto__=n,r}}():void 0),co=Ct.PROPER,fo=Ct.CONFIGURABLE,so=eo.IteratorPrototype,lo=eo.BUGGY_SAFARI_ITERATORS,po=pt("iterator"),yo=function(){return this},ho=function(t,e,r,n,o,i,u){oo(r,e,n);var a,c,f,l=function(t){if(t===o&&d)return d;if(!lo&&t in h)return h[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},p=e+" Iterator",y=!1,h=t.prototype,v=h[po]||h["@@iterator"]||o&&h[o],d=!lo&&v||l(o),g="Array"==e&&h.entries||v;if(g&&(a=Kn(g.call(new t)))!==Object.prototype&&a.next&&(Kn(a)!==so&&(ao?ao(a,so):T(a[po])||ee(a,po,yo)),cr(a,p,!0)),co&&"values"==o&&v&&"values"!==v.name&&(fo?xt(h,"name","values"):(y=!0,d=function(){return s(v,this)})),o)if(c={values:l("values"),keys:i?d:l("keys"),entries:l("entries")},u)for(f in c)(lo||y||!(f in h))&&ee(h,f,c[f]);else Ae({target:e,proto:!0,forced:lo||y},c);return h[po]!==d&&ee(h,po,d,{name:o}),Qn[e]=d,c},vo=At.f,go=Zt.set,bo=Zt.getterFor("Array Iterator"),mo=ho(Array,"Array",(function(t,e){go(this,{type:"Array Iterator",target:k(t),index:0,kind:e})}),(function(){var t=bo(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),Oo=Qn.Arguments=Qn.Array;if(Hn("keys"),Hn("values"),Hn("entries"),a&&"values"!==Oo.name)try{vo(Oo,"name",{value:"values"})}catch(t){}var wo=m("".charAt),So=m("".charCodeAt),jo=m("".slice),Po=function(t){return function(e,r){var n,o,i=qe(E(e)),u=ie(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=So(i,u))<55296||n>56319||u+1===a||(o=So(i,u+1))<56320||o>57343?t?wo(i,u):n:t?jo(i,u,u+2):o-56320+(n-55296<<10)+65536}},Lo={codeAt:Po(!1),charAt:Po(!0)}.charAt,Ro=Zt.set,Eo=Zt.getterFor("String Iterator");ho(String,"String",(function(t){Ro(this,{type:"String Iterator",string:qe(t),index:0})}),(function(){var t,e=Eo(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Lo(r,n),e.index+=t.length,{value:t,done:!1})}));var ko=pt("iterator"),To=pt("toStringTag"),Ao=mo.values,xo=function(t,e){if(t){if(t[ko]!==Ao)try{xt(t,ko,Ao)}catch(e){t[ko]=Ao}if(t[To]||xt(t,To,e),An[e])for(var r in mo)if(t[r]!==mo[r])try{xt(t,r,mo[r])}catch(e){t[r]=mo[r]}}};for(var Fo in An)xo(i[Fo]&&i[Fo].prototype,Fo);xo(In,"DOMTokenList");var Io=pt("iterator"),Uo=!u((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[Io]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),Co=TypeError,_o=function(t,e){if(I(e,t))return t;throw Co("Incorrect invocation")},Do=pt("iterator"),Mo=function(t){if(null!=t)return J(t,Do)||J(t,"@@iterator")||Qn[Ne(t)]},No=TypeError,Go=function(t,e){var r=arguments.length<2?Mo(t):e;if(Q(r))return Rt(s(r,t));throw No(W(t)+" is not iterable")},qo=TypeError,Bo=function(t,e){if(t<e)throw qo("Not enough arguments");return t},zo=Math.floor,Vo=function(t,e){var r=t.length,n=zo(r/2);return r<8?Wo(t,e):Ho(t,Vo(Ze(t,0,n),e),Vo(Ze(t,n),e),e)},Wo=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},Ho=function(t,e,r,n){for(var o=e.length,i=r.length,u=0,a=0;u<o||a<i;)t[u+a]=u<o&&a<i?n(e[u],r[a])<=0?e[u++]:r[a++]:u<o?e[u++]:r[a++];return t},Qo=Vo,Jo=pt("iterator"),Yo=Zt.set,$o=Zt.getterFor("URLSearchParams"),Xo=Zt.getterFor("URLSearchParamsIterator"),Ko=Object.getOwnPropertyDescriptor,Zo=function(t){if(!a)return i[t];var e=Ko(i,t);return e&&e.value},ti=Zo("fetch"),ei=Zo("Request"),ri=Zo("Headers"),ni=ei&&ei.prototype,oi=ri&&ri.prototype,ii=i.RegExp,ui=i.TypeError,ai=i.decodeURIComponent,ci=i.encodeURIComponent,fi=m("".charAt),si=m([].join),li=m([].push),pi=m("".replace),yi=m([].shift),hi=m([].splice),vi=m("".split),di=m("".slice),gi=/\+/g,bi=Array(4),mi=function(t){return bi[t-1]||(bi[t-1]=ii("((?:%[\\da-f]{2}){"+t+"})","gi"))},Oi=function(t){try{return ai(t)}catch(e){return t}},wi=function(t){var e=pi(t,gi," "),r=4;try{return ai(e)}catch(t){for(;r;)e=pi(e,mi(r--),Oi);return e}},Si=/[!'()~]|%20/g,ji={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Pi=function(t){return ji[t]},Li=function(t){return pi(ci(t),Si,Pi)},Ri=oo((function(t,e){Yo(this,{type:"URLSearchParamsIterator",iterator:Go($o(t).entries),kind:e})}),"Iterator",(function(){var t=Xo(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r}),!0),Ei=function(t){this.entries=[],this.url=null,void 0!==t&&(A(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===fi(t,0)?di(t,1):t:qe(t)))};Ei.prototype={type:"URLSearchParams",bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,o,i,u,a,c=Mo(t);if(c)for(r=(e=Go(t,c)).next;!(n=s(r,e)).done;){if(i=(o=Go(Rt(n.value))).next,(u=s(i,o)).done||(a=s(i,o)).done||!s(i,o).done)throw ui("Expected sequence with length 2");li(this.entries,{key:qe(u.value),value:qe(a.value)})}else for(var f in t)nt(t,f)&&li(this.entries,{key:f,value:qe(t[f])})},parseQuery:function(t){if(t)for(var e,r,n=vi(t,"&"),o=0;o<n.length;)(e=n[o++]).length&&(r=vi(e,"="),li(this.entries,{key:wi(yi(r)),value:wi(si(r,"="))}))},serialize:function(){for(var t,e=this.entries,r=[],n=0;n<e.length;)t=e[n++],li(r,Li(t.key)+"="+Li(t.value));return si(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ki=function(){_o(this,Ti);var t=arguments.length>0?arguments[0]:void 0;Yo(this,new Ei(t))},Ti=ki.prototype;if(function(t,e,r){for(var n in e)ee(t,n,e[n],r)}(Ti,{append:function(t,e){Bo(arguments.length,2);var r=$o(this);li(r.entries,{key:qe(t),value:qe(e)}),r.updateURL()},delete:function(t){Bo(arguments.length,1);for(var e=$o(this),r=e.entries,n=qe(t),o=0;o<r.length;)r[o].key===n?hi(r,o,1):o++;e.updateURL()},get:function(t){Bo(arguments.length,1);for(var e=$o(this).entries,r=qe(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){Bo(arguments.length,1);for(var e=$o(this).entries,r=qe(t),n=[],o=0;o<e.length;o++)e[o].key===r&&li(n,e[o].value);return n},has:function(t){Bo(arguments.length,1);for(var e=$o(this).entries,r=qe(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){Bo(arguments.length,1);for(var r,n=$o(this),o=n.entries,i=!1,u=qe(t),a=qe(e),c=0;c<o.length;c++)(r=o[c]).key===u&&(i?hi(o,c--,1):(i=!0,r.value=a));i||li(o,{key:u,value:a}),n.updateURL()},sort:function(){var t=$o(this);Qo(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=$o(this).entries,n=sr(t,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new Ri(this,"keys")},values:function(){return new Ri(this,"values")},entries:function(){return new Ri(this,"entries")}},{enumerable:!0}),ee(Ti,Jo,Ti.entries,{name:"entries"}),ee(Ti,"toString",(function(){return $o(this).serialize()}),{enumerable:!0}),cr(ki,"URLSearchParams"),Ae({global:!0,constructor:!0,forced:!Uo},{URLSearchParams:ki}),!Uo&&T(ri)){var Ai=m(oi.has),xi=m(oi.set),Fi=function(t){if(A(t)){var e,r=t.body;if("URLSearchParams"===Ne(r))return e=t.headers?new ri(t.headers):new ri,Ai(e,"content-type")||xi(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ye(t,{body:h(0,qe(r)),headers:h(0,e)})}return t};if(T(ti)&&Ae({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return ti(t,arguments.length>1?Fi(arguments[1]):{})}}),T(ei)){var Ii=function(t){return _o(this,ni),new ei(t,arguments.length>1?Fi(arguments[1]):{})};ni.constructor=Ii,Ii.prototype=ni,Ae({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ii})}}function Ui(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ci(t,e,r){return e&&Ui(t.prototype,e),r&&Ui(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function _i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Di(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Mi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Di(Object(r),!0).forEach((function(e){_i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Di(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Ni=Ci((function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),_i(this,"baseUri",void 0),_i(this,"proxy",void 0),_i(this,"headers",void 0),_i(this,"parameters",void 0),_i(this,"fetchOptions",void 0),_i(this,"transformRequest",void 0),_i(this,"throwOnBadResponse",void 0),this.headers=Mi({},e.headers),this.parameters=Mi({},e.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Mi({credentials:"omit"},e.fetchOptions),this.transformRequest=e.transformRequest||t.defaults.transformRequest,e.baseUri&&(this.baseUri=e.baseUri),e.proxy&&(this.proxy=e.proxy),this.throwOnBadResponse=!!e.throwOnBadResponse}));_i(Ni,"defaults",{transformRequest:function(t,e){switch(e["Content-Type"]){case"application/json":return JSON.stringify(t);case"application/x-www-form-urlencoded":return new URLSearchParams(t);default:return t}}}),exports.default=Ni;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var r,n,o=function(t){return t&&t.Math==Math&&t},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),u=function(t){try{return!!t()}catch(t){return!0}},a=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!u((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),f=Function.prototype.call,s=c?f.bind(f):function(){return f.apply(f,arguments)},l={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,h={f:p&&!l.call({1:2},1)?function(t){var e=p(this,t);return!!e&&e.enumerable}:l},y=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v=Function.prototype,d=v.bind,g=v.call,b=c&&d.bind(g,g),m=c?function(t){return t&&b(t)}:function(t){return t&&function(){return g.apply(t,arguments)}},O=m({}.toString),w=m("".slice),S=function(t){return w(O(t),8,-1)},j=Object,P=m("".split),L=u((function(){return!j("z").propertyIsEnumerable(0)}))?function(t){return"String"==S(t)?P(t,""):j(t)}:j,R=TypeError,E=function(t){if(null==t)throw R("Can't call method on "+t);return t},k=function(t){return L(E(t))},T=function(t){return"function"==typeof t},A=function(t){return"object"==typeof t?null!==t:T(t)},x=function(t){return T(t)?t:void 0},F=function(t,e){return arguments.length<2?x(i[t]):i[t]&&i[t][e]},I=m({}.isPrototypeOf),U=F("navigator","userAgent")||"",C=i.process,_=i.Deno,D=C&&C.versions||_&&_.version,M=D&&D.v8;M&&(n=(r=M.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!n&&U&&(!(r=U.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=U.match(/Chrome\/(\d+)/))&&(n=+r[1]);var N=n,G=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&N&&N<41})),q=G&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,B=Object,z=q?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return T(e)&&I(e.prototype,B(t))},V=String,W=function(t){try{return V(t)}catch(t){return"Object"}},H=TypeError,Q=function(t){if(T(t))return t;throw H(W(t)+" is not a function")},J=function(t,e){var r=t[e];return null==r?void 0:Q(r)},Y=TypeError,$=Object.defineProperty,X=function(t,e){try{$(i,t,{value:e,configurable:!0,writable:!0})}catch(r){i[t]=e}return e},K=i["__core-js_shared__"]||X("__core-js_shared__",{}),Z=e((function(t){(t.exports=function(t,e){return K[t]||(K[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.23.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),tt=Object,et=function(t){return tt(E(t))},rt=m({}.hasOwnProperty),nt=Object.hasOwn||function(t,e){return rt(et(t),e)},ot=0,it=Math.random(),ut=m(1..toString),at=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ut(++ot+it,36)},ct=Z("wks"),ft=i.Symbol,st=ft&&ft.for,lt=q?ft:ft&&ft.withoutSetter||at,pt=function(t){if(!nt(ct,t)||!G&&"string"!=typeof ct[t]){var e="Symbol."+t;G&&nt(ft,t)?ct[t]=ft[t]:ct[t]=q&&st?st(e):lt(e)}return ct[t]},ht=TypeError,yt=pt("toPrimitive"),vt=function(t,e){if(!A(t)||z(t))return t;var r,n=J(t,yt);if(n){if(void 0===e&&(e="default"),r=s(n,t,e),!A(r)||z(r))return r;throw ht("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&T(r=t.toString)&&!A(n=s(r,t)))return n;if(T(r=t.valueOf)&&!A(n=s(r,t)))return n;if("string"!==e&&T(r=t.toString)&&!A(n=s(r,t)))return n;throw Y("Can't convert object to primitive value")}(t,e)},dt=function(t){var e=vt(t,"string");return z(e)?e:e+""},gt=i.document,bt=A(gt)&&A(gt.createElement),mt=function(t){return bt?gt.createElement(t):{}},Ot=!a&&!u((function(){return 7!=Object.defineProperty(mt("div"),"a",{get:function(){return 7}}).a})),wt=Object.getOwnPropertyDescriptor,St={f:a?wt:function(t,e){if(t=k(t),e=dt(e),Ot)try{return wt(t,e)}catch(t){}if(nt(t,e))return y(!s(h.f,t,e),t[e])}},jt=a&&u((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Pt=String,Lt=TypeError,Rt=function(t){if(A(t))return t;throw Lt(Pt(t)+" is not an object")},Et=TypeError,kt=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,At={f:a?jt?function(t,e,r){if(Rt(t),e=dt(e),Rt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=Tt(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return kt(t,e,r)}:kt:function(t,e,r){if(Rt(t),e=dt(e),Rt(r),Ot)try{return kt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Et("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},xt=a?function(t,e,r){return At.f(t,e,y(1,r))}:function(t,e,r){return t[e]=r,t},Ft=Function.prototype,It=a&&Object.getOwnPropertyDescriptor,Ut=nt(Ft,"name"),Ct={EXISTS:Ut,PROPER:Ut&&"something"===function(){}.name,CONFIGURABLE:Ut&&(!a||a&&It(Ft,"name").configurable)},_t=m(Function.toString);T(K.inspectSource)||(K.inspectSource=function(t){return _t(t)});var Dt,Mt,Nt,Gt=K.inspectSource,qt=i.WeakMap,Bt=T(qt)&&/native code/.test(Gt(qt)),zt=Z("keys"),Vt=function(t){return zt[t]||(zt[t]=at(t))},Wt={},Ht=i.TypeError,Qt=i.WeakMap;if(Bt||K.state){var Jt=K.state||(K.state=new Qt),Yt=m(Jt.get),$t=m(Jt.has),Xt=m(Jt.set);Dt=function(t,e){if($t(Jt,t))throw new Ht("Object already initialized");return e.facade=t,Xt(Jt,t,e),e},Mt=function(t){return Yt(Jt,t)||{}},Nt=function(t){return $t(Jt,t)}}else{var Kt=Vt("state");Wt[Kt]=!0,Dt=function(t,e){if(nt(t,Kt))throw new Ht("Object already initialized");return e.facade=t,xt(t,Kt,e),e},Mt=function(t){return nt(t,Kt)?t[Kt]:{}},Nt=function(t){return nt(t,Kt)}}var Zt={set:Dt,get:Mt,has:Nt,enforce:function(t){return Nt(t)?Mt(t):Dt(t,{})},getterFor:function(t){return function(e){var r;if(!A(e)||(r=Mt(e)).type!==t)throw Ht("Incompatible receiver, "+t+" required");return r}}},te=e((function(t){var e=Ct.CONFIGURABLE,r=Zt.enforce,n=Zt.get,o=Object.defineProperty,i=a&&!u((function(){return 8!==o((function(){}),"length",{value:8}).length})),c=String(String).split("String"),f=t.exports=function(t,n,u){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),u&&u.getter&&(n="get "+n),u&&u.setter&&(n="set "+n),(!nt(t,"name")||e&&t.name!==n)&&(a?o(t,"name",{value:n,configurable:!0}):t.name=n),i&&u&&nt(u,"arity")&&t.length!==u.arity&&o(t,"length",{value:u.arity});try{u&&nt(u,"constructor")&&u.constructor?a&&o(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var f=r(t);return nt(f,"source")||(f.source=c.join("string"==typeof n?n:"")),t};Function.prototype.toString=f((function(){return T(this)&&n(this).source||Gt(this)}),"toString")})),ee=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(T(r)&&te(r,i,n),n.global)o?t[e]=r:X(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:At.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},re=Math.ceil,ne=Math.floor,oe=Math.trunc||function(t){var e=+t;return(e>0?ne:re)(e)},ie=function(t){var e=+t;return e!=e||0===e?0:oe(e)},ue=Math.max,ae=Math.min,ce=function(t,e){var r=ie(t);return r<0?ue(r+e,0):ae(r,e)},fe=Math.min,se=function(t){return(e=t.length)>0?fe(ie(e),9007199254740991):0;var e},le=function(t){return function(e,r,n){var o,i=k(e),u=se(i),a=ce(n,u);if(t&&r!=r){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},pe={includes:le(!0),indexOf:le(!1)}.indexOf,he=m([].push),ye=function(t,e){var r,n=k(t),o=0,i=[];for(r in n)!nt(Wt,r)&&nt(n,r)&&he(i,r);for(;e.length>o;)nt(n,r=e[o++])&&(~pe(i,r)||he(i,r));return i},ve=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],de=ve.concat("length","prototype"),ge={f:Object.getOwnPropertyNames||function(t){return ye(t,de)}},be={f:Object.getOwnPropertySymbols},me=m([].concat),Oe=F("Reflect","ownKeys")||function(t){var e=ge.f(Rt(t)),r=be.f;return r?me(e,r(t)):e},we=function(t,e,r){for(var n=Oe(e),o=At.f,i=St.f,u=0;u<n.length;u++){var a=n[u];nt(t,a)||r&&nt(r,a)||o(t,a,i(e,a))}},Se=/#|\.prototype\./,je=function(t,e){var r=Le[Pe(t)];return r==Ee||r!=Re&&(T(e)?u(e):!!e)},Pe=je.normalize=function(t){return String(t).replace(Se,".").toLowerCase()},Le=je.data={},Re=je.NATIVE="N",Ee=je.POLYFILL="P",ke=je,Te=St.f,Ae=function(t,e){var r,n,o,u,a,c=t.target,f=t.global,s=t.stat;if(r=f?i:s?i[c]||X(c,{}):(i[c]||{}).prototype)for(n in e){if(u=e[n],o=t.dontCallGetSet?(a=Te(r,n))&&a.value:r[n],!ke(f?n:c+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof u==typeof o)continue;we(u,o)}(t.sham||o&&o.sham)&&xt(u,"sham",!0),ee(r,n,u,t)}},xe=Object.keys||function(t){return ye(t,ve)},Fe=u((function(){xe(1)}));Ae({target:"Object",stat:!0,forced:Fe},{keys:function(t){return xe(et(t))}});var Ie={};Ie[pt("toStringTag")]="z";var Ue,Ce="[object z]"===String(Ie),_e=pt("toStringTag"),De=Object,Me="Arguments"==S(function(){return arguments}()),Ne=Ce?S:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=De(t),_e))?r:Me?S(e):"Object"==(n=S(e))&&T(e.callee)?"Arguments":n},Ge=String,qe=function(t){if("Symbol"===Ne(t))throw TypeError("Cannot convert a Symbol value to a string");return Ge(t)},Be={f:a&&!jt?Object.defineProperties:function(t,e){Rt(t);for(var r,n=k(e),o=xe(e),i=o.length,u=0;i>u;)At.f(t,r=o[u++],n[r]);return t}},ze=F("document","documentElement"),Ve=Vt("IE_PROTO"),We=function(){},He=function(t){return"<script>"+t+"<\/script>"},Qe=function(t){t.write(He("")),t.close();var e=t.parentWindow.Object;return t=null,e},Je=function(){try{Ue=new ActiveXObject("htmlfile")}catch(t){}var t,e;Je="undefined"!=typeof document?document.domain&&Ue?Qe(Ue):((e=mt("iframe")).style.display="none",ze.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(He("document.F=Object")),t.close(),t.F):Qe(Ue);for(var r=ve.length;r--;)delete Je.prototype[ve[r]];return Je()};Wt[Ve]=!0;var Ye=Object.create||function(t,e){var r;return null!==t?(We.prototype=Rt(t),r=new We,We.prototype=null,r[Ve]=t):r=Je(),void 0===e?r:Be.f(r,e)},$e=function(t,e,r){var n=dt(e);n in t?At.f(t,n,y(0,r)):t[n]=r},Xe=Array,Ke=Math.max,Ze=function(t,e,r){for(var n=se(t),o=ce(e,n),i=ce(void 0===r?n:r,n),u=Xe(Ke(i-o,0)),a=0;o<i;o++,a++)$e(u,a,t[o]);return u.length=a,u},tr=ge.f,er="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],rr={f:function(t){return er&&"Window"==S(t)?function(t){try{return tr(t)}catch(t){return Ze(er)}}(t):tr(k(t))}},nr={f:pt},or=i,ir=At.f,ur=At.f,ar=pt("toStringTag"),cr=function(t,e,r){t&&!r&&(t=t.prototype),t&&!nt(t,ar)&&ur(t,ar,{configurable:!0,value:e})},fr=m(m.bind),sr=function(t,e){return Q(t),void 0===e?t:c?fr(t,e):function(){return t.apply(e,arguments)}},lr=Array.isArray||function(t){return"Array"==S(t)},pr=function(){},hr=[],yr=F("Reflect","construct"),vr=/^\s*(?:class|function)\b/,dr=m(vr.exec),gr=!vr.exec(pr),br=function(t){if(!T(t))return!1;try{return yr(pr,hr,t),!0}catch(t){return!1}},mr=function(t){if(!T(t))return!1;switch(Ne(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gr||!!dr(vr,Gt(t))}catch(t){return!0}};mr.sham=!0;var Or=!yr||u((function(){var t;return br(br.call)||!br(Object)||!br((function(){t=!0}))||t}))?mr:br,wr=pt("species"),Sr=Array,jr=function(t,e){return new(function(t){var e;return lr(t)&&(e=t.constructor,(Or(e)&&(e===Sr||lr(e.prototype))||A(e)&&null===(e=e[wr]))&&(e=void 0)),void 0===e?Sr:e}(t))(0===e?0:e)},Pr=m([].push),Lr=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,f,s,l){for(var p,h,y=et(c),v=L(y),d=sr(f,s),g=se(v),b=0,m=l||jr,O=e?m(c,g):r||u?m(c,0):void 0;g>b;b++)if((a||b in v)&&(h=d(p=v[b],b,y),t))if(e)O[b]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return b;case 2:Pr(O,p)}else switch(t){case 4:return!1;case 7:Pr(O,p)}return i?-1:n||o?o:O}},Rr={forEach:Lr(0),map:Lr(1),filter:Lr(2),some:Lr(3),every:Lr(4),find:Lr(5),findIndex:Lr(6),filterReject:Lr(7)},Er=Rr.forEach,kr=Vt("hidden"),Tr=Zt.set,Ar=Zt.getterFor("Symbol"),xr=Object.prototype,Fr=i.Symbol,Ir=Fr&&Fr.prototype,Ur=i.TypeError,Cr=i.QObject,_r=St.f,Dr=At.f,Mr=rr.f,Nr=h.f,Gr=m([].push),qr=Z("symbols"),Br=Z("op-symbols"),zr=Z("wks"),Vr=!Cr||!Cr.prototype||!Cr.prototype.findChild,Wr=a&&u((function(){return 7!=Ye(Dr({},"a",{get:function(){return Dr(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=_r(xr,e);n&&delete xr[e],Dr(t,e,r),n&&t!==xr&&Dr(xr,e,n)}:Dr,Hr=function(t,e){var r=qr[t]=Ye(Ir);return Tr(r,{type:"Symbol",tag:t,description:e}),a||(r.description=e),r},Qr=function(t,e,r){t===xr&&Qr(Br,e,r),Rt(t);var n=dt(e);return Rt(r),nt(qr,n)?(r.enumerable?(nt(t,kr)&&t[kr][n]&&(t[kr][n]=!1),r=Ye(r,{enumerable:y(0,!1)})):(nt(t,kr)||Dr(t,kr,y(1,{})),t[kr][n]=!0),Wr(t,n,r)):Dr(t,n,r)},Jr=function(t,e){Rt(t);var r=k(e),n=xe(r).concat(Kr(r));return Er(n,(function(e){a&&!s(Yr,r,e)||Qr(t,e,r[e])})),t},Yr=function(t){var e=dt(t),r=s(Nr,this,e);return!(this===xr&&nt(qr,e)&&!nt(Br,e))&&(!(r||!nt(this,e)||!nt(qr,e)||nt(this,kr)&&this[kr][e])||r)},$r=function(t,e){var r=k(t),n=dt(e);if(r!==xr||!nt(qr,n)||nt(Br,n)){var o=_r(r,n);return!o||!nt(qr,n)||nt(r,kr)&&r[kr][n]||(o.enumerable=!0),o}},Xr=function(t){var e=Mr(k(t)),r=[];return Er(e,(function(t){nt(qr,t)||nt(Wt,t)||Gr(r,t)})),r},Kr=function(t){var e=t===xr,r=Mr(e?Br:k(t)),n=[];return Er(r,(function(t){!nt(qr,t)||e&&!nt(xr,t)||Gr(n,qr[t])})),n};G||(Ir=(Fr=function(){if(I(Ir,this))throw Ur("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?qe(arguments[0]):void 0,e=at(t),r=function(t){this===xr&&s(r,Br,t),nt(this,kr)&&nt(this[kr],e)&&(this[kr][e]=!1),Wr(this,e,y(1,t))};return a&&Vr&&Wr(xr,e,{configurable:!0,set:r}),Hr(e,t)}).prototype,ee(Ir,"toString",(function(){return Ar(this).tag})),ee(Fr,"withoutSetter",(function(t){return Hr(at(t),t)})),h.f=Yr,At.f=Qr,Be.f=Jr,St.f=$r,ge.f=rr.f=Xr,be.f=Kr,nr.f=function(t){return Hr(pt(t),t)},a&&(Dr(Ir,"description",{configurable:!0,get:function(){return Ar(this).description}}),ee(xr,"propertyIsEnumerable",Yr,{unsafe:!0}))),Ae({global:!0,constructor:!0,wrap:!0,forced:!G,sham:!G},{Symbol:Fr}),Er(xe(zr),(function(t){!function(t){var e=or.Symbol||(or.Symbol={});nt(e,t)||ir(e,t,{value:nr.f(t)})}(t)})),Ae({target:"Symbol",stat:!0,forced:!G},{useSetter:function(){Vr=!0},useSimple:function(){Vr=!1}}),Ae({target:"Object",stat:!0,forced:!G,sham:!a},{create:function(t,e){return void 0===e?Ye(t):Jr(Ye(t),e)},defineProperty:Qr,defineProperties:Jr,getOwnPropertyDescriptor:$r}),Ae({target:"Object",stat:!0,forced:!G},{getOwnPropertyNames:Xr}),function(){var t=F("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,n=pt("toPrimitive");e&&!e[n]&&ee(e,n,(function(t){return s(r,this)}),{arity:1})}(),cr(Fr,"Symbol"),Wt[kr]=!0;var Zr=G&&!!Symbol.for&&!!Symbol.keyFor,tn=Z("string-to-symbol-registry"),en=Z("symbol-to-string-registry");Ae({target:"Symbol",stat:!0,forced:!Zr},{for:function(t){var e=qe(t);if(nt(tn,e))return tn[e];var r=F("Symbol")(e);return tn[e]=r,en[r]=e,r}});var rn=Z("symbol-to-string-registry");Ae({target:"Symbol",stat:!0,forced:!Zr},{keyFor:function(t){if(!z(t))throw TypeError(W(t)+" is not a symbol");if(nt(rn,t))return rn[t]}});var nn=Function.prototype,on=nn.apply,un=nn.call,an="object"==typeof Reflect&&Reflect.apply||(c?un.bind(on):function(){return un.apply(on,arguments)}),cn=m([].slice),fn=F("JSON","stringify"),sn=m(/./.exec),ln=m("".charAt),pn=m("".charCodeAt),hn=m("".replace),yn=m(1..toString),vn=/[\uD800-\uDFFF]/g,dn=/^[\uD800-\uDBFF]$/,gn=/^[\uDC00-\uDFFF]$/,bn=!G||u((function(){var t=F("Symbol")();return"[null]"!=fn([t])||"{}"!=fn({a:t})||"{}"!=fn(Object(t))})),mn=u((function(){return'"\\udf06\\ud834"'!==fn("\udf06\ud834")||'"\\udead"'!==fn("\udead")})),On=function(t,e){var r=cn(arguments),n=e;if((A(e)||void 0!==t)&&!z(t))return lr(e)||(e=function(t,e){if(T(n)&&(e=s(n,this,t,e)),!z(e))return e}),r[1]=e,an(fn,null,r)},wn=function(t,e,r){var n=ln(r,e-1),o=ln(r,e+1);return sn(dn,t)&&!sn(gn,o)||sn(gn,t)&&!sn(dn,n)?"\\u"+yn(pn(t,0),16):t};fn&&Ae({target:"JSON",stat:!0,arity:3,forced:bn||mn},{stringify:function(t,e,r){var n=cn(arguments),o=an(bn?On:fn,null,n);return mn&&"string"==typeof o?hn(o,vn,wn):o}});var Sn=!G||u((function(){be.f(1)}));Ae({target:"Object",stat:!0,forced:Sn},{getOwnPropertySymbols:function(t){var e=be.f;return e?e(et(t)):[]}});var jn,Pn=pt("species"),Ln=Rr.filter,Rn=(jn="filter",N>=51||!u((function(){var t=[];return(t.constructor={})[Pn]=function(){return{foo:1}},1!==t[jn](Boolean).foo})));Ae({target:"Array",proto:!0,forced:!Rn},{filter:function(t){return Ln(this,t,arguments.length>1?arguments[1]:void 0)}});var En=Ce?{}.toString:function(){return"[object "+Ne(this)+"]"};Ce||ee(Object.prototype,"toString",En,{unsafe:!0});var kn=St.f,Tn=u((function(){kn(1)}));Ae({target:"Object",stat:!0,forced:!a||Tn,sham:!a},{getOwnPropertyDescriptor:function(t,e){return kn(k(t),e)}});var An={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},xn=mt("span").classList,Fn=xn&&xn.constructor&&xn.constructor.prototype,In=Fn===Object.prototype?void 0:Fn,Un=Rr.forEach,Cn=function(t,e){var r=[][t];return!!r&&u((function(){r.call(null,e||function(){return 1},1)}))}("forEach")?[].forEach:function(t){return Un(this,t,arguments.length>1?arguments[1]:void 0)},_n=function(t){if(t&&t.forEach!==Cn)try{xt(t,"forEach",Cn)}catch(e){t.forEach=Cn}};for(var Dn in An)An[Dn]&&_n(i[Dn]&&i[Dn].prototype);_n(In),Ae({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(t){for(var e,r,n=k(t),o=St.f,i=Oe(n),u={},a=0;i.length>a;)void 0!==(r=o(n,e=i[a++]))&&$e(u,e,r);return u}});var Mn=Be.f;Ae({target:"Object",stat:!0,forced:Object.defineProperties!==Mn,sham:!a},{defineProperties:Mn});var Nn=At.f;Ae({target:"Object",stat:!0,forced:Object.defineProperty!==Nn,sham:!a},{defineProperty:Nn});var Gn=At.f,qn=pt("unscopables"),Bn=Array.prototype;null==Bn[qn]&&Gn(Bn,qn,{configurable:!0,value:Ye(null)});var zn,Vn,Wn,Hn=function(t){Bn[qn][t]=!0},Qn={},Jn=!u((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Yn=Vt("IE_PROTO"),$n=Object,Xn=$n.prototype,Kn=Jn?$n.getPrototypeOf:function(t){var e=et(t);if(nt(e,Yn))return e[Yn];var r=e.constructor;return T(r)&&e instanceof r?r.prototype:e instanceof $n?Xn:null},Zn=pt("iterator"),to=!1;[].keys&&("next"in(Wn=[].keys())?(Vn=Kn(Kn(Wn)))!==Object.prototype&&(zn=Vn):to=!0),(null==zn||u((function(){var t={};return zn[Zn].call(t)!==t})))&&(zn={}),T(zn[Zn])||ee(zn,Zn,(function(){return this}));var eo={IteratorPrototype:zn,BUGGY_SAFARI_ITERATORS:to},ro=eo.IteratorPrototype,no=function(){return this},oo=function(t,e,r,n){var o=e+" Iterator";return t.prototype=Ye(ro,{next:y(+!n,r)}),cr(t,o,!1),Qn[o]=no,t},io=String,uo=TypeError,ao=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=m(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Rt(r),function(t){if("object"==typeof t||T(t))return t;throw uo("Can't set "+io(t)+" as a prototype")}(n),e?t(r,n):r.__proto__=n,r}}():void 0),co=Ct.PROPER,fo=Ct.CONFIGURABLE,so=eo.IteratorPrototype,lo=eo.BUGGY_SAFARI_ITERATORS,po=pt("iterator"),ho=function(){return this},yo=function(t,e,r,n,o,i,u){oo(r,e,n);var a,c,f,l=function(t){if(t===o&&d)return d;if(!lo&&t in y)return y[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},p=e+" Iterator",h=!1,y=t.prototype,v=y[po]||y["@@iterator"]||o&&y[o],d=!lo&&v||l(o),g="Array"==e&&y.entries||v;if(g&&(a=Kn(g.call(new t)))!==Object.prototype&&a.next&&(Kn(a)!==so&&(ao?ao(a,so):T(a[po])||ee(a,po,ho)),cr(a,p,!0)),co&&"values"==o&&v&&"values"!==v.name&&(fo?xt(y,"name","values"):(h=!0,d=function(){return s(v,this)})),o)if(c={values:l("values"),keys:i?d:l("keys"),entries:l("entries")},u)for(f in c)(lo||h||!(f in y))&&ee(y,f,c[f]);else Ae({target:e,proto:!0,forced:lo||h},c);return y[po]!==d&&ee(y,po,d,{name:o}),Qn[e]=d,c},vo=At.f,go=Zt.set,bo=Zt.getterFor("Array Iterator"),mo=yo(Array,"Array",(function(t,e){go(this,{type:"Array Iterator",target:k(t),index:0,kind:e})}),(function(){var t=bo(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),Oo=Qn.Arguments=Qn.Array;if(Hn("keys"),Hn("values"),Hn("entries"),a&&"values"!==Oo.name)try{vo(Oo,"name",{value:"values"})}catch(t){}var wo=m("".charAt),So=m("".charCodeAt),jo=m("".slice),Po=function(t){return function(e,r){var n,o,i=qe(E(e)),u=ie(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=So(i,u))<55296||n>56319||u+1===a||(o=So(i,u+1))<56320||o>57343?t?wo(i,u):n:t?jo(i,u,u+2):o-56320+(n-55296<<10)+65536}},Lo={codeAt:Po(!1),charAt:Po(!0)}.charAt,Ro=Zt.set,Eo=Zt.getterFor("String Iterator");yo(String,"String",(function(t){Ro(this,{type:"String Iterator",string:qe(t),index:0})}),(function(){var t,e=Eo(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Lo(r,n),e.index+=t.length,{value:t,done:!1})}));var ko=pt("iterator"),To=pt("toStringTag"),Ao=mo.values,xo=function(t,e){if(t){if(t[ko]!==Ao)try{xt(t,ko,Ao)}catch(e){t[ko]=Ao}if(t[To]||xt(t,To,e),An[e])for(var r in mo)if(t[r]!==mo[r])try{xt(t,r,mo[r])}catch(e){t[r]=mo[r]}}};for(var Fo in An)xo(i[Fo]&&i[Fo].prototype,Fo);xo(In,"DOMTokenList");var Io=pt("iterator"),Uo=!u((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[Io]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),Co=TypeError,_o=function(t,e){if(I(e,t))return t;throw Co("Incorrect invocation")},Do=pt("iterator"),Mo=function(t){if(null!=t)return J(t,Do)||J(t,"@@iterator")||Qn[Ne(t)]},No=TypeError,Go=function(t,e){var r=arguments.length<2?Mo(t):e;if(Q(r))return Rt(s(r,t));throw No(W(t)+" is not iterable")},qo=TypeError,Bo=function(t,e){if(t<e)throw qo("Not enough arguments");return t},zo=Math.floor,Vo=function(t,e){var r=t.length,n=zo(r/2);return r<8?Wo(t,e):Ho(t,Vo(Ze(t,0,n),e),Vo(Ze(t,n),e),e)},Wo=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},Ho=function(t,e,r,n){for(var o=e.length,i=r.length,u=0,a=0;u<o||a<i;)t[u+a]=u<o&&a<i?n(e[u],r[a])<=0?e[u++]:r[a++]:u<o?e[u++]:r[a++];return t},Qo=Vo,Jo=pt("iterator"),Yo=Zt.set,$o=Zt.getterFor("URLSearchParams"),Xo=Zt.getterFor("URLSearchParamsIterator"),Ko=Object.getOwnPropertyDescriptor,Zo=function(t){if(!a)return i[t];var e=Ko(i,t);return e&&e.value},ti=Zo("fetch"),ei=Zo("Request"),ri=Zo("Headers"),ni=ei&&ei.prototype,oi=ri&&ri.prototype,ii=i.RegExp,ui=i.TypeError,ai=i.decodeURIComponent,ci=i.encodeURIComponent,fi=m("".charAt),si=m([].join),li=m([].push),pi=m("".replace),hi=m([].shift),yi=m([].splice),vi=m("".split),di=m("".slice),gi=/\+/g,bi=Array(4),mi=function(t){return bi[t-1]||(bi[t-1]=ii("((?:%[\\da-f]{2}){"+t+"})","gi"))},Oi=function(t){try{return ai(t)}catch(e){return t}},wi=function(t){var e=pi(t,gi," "),r=4;try{return ai(e)}catch(t){for(;r;)e=pi(e,mi(r--),Oi);return e}},Si=/[!'()~]|%20/g,ji={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Pi=function(t){return ji[t]},Li=function(t){return pi(ci(t),Si,Pi)},Ri=oo((function(t,e){Yo(this,{type:"URLSearchParamsIterator",iterator:Go($o(t).entries),kind:e})}),"Iterator",(function(){var t=Xo(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r}),!0),Ei=function(t){this.entries=[],this.url=null,void 0!==t&&(A(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===fi(t,0)?di(t,1):t:qe(t)))};Ei.prototype={type:"URLSearchParams",bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,o,i,u,a,c=Mo(t);if(c)for(r=(e=Go(t,c)).next;!(n=s(r,e)).done;){if(i=(o=Go(Rt(n.value))).next,(u=s(i,o)).done||(a=s(i,o)).done||!s(i,o).done)throw ui("Expected sequence with length 2");li(this.entries,{key:qe(u.value),value:qe(a.value)})}else for(var f in t)nt(t,f)&&li(this.entries,{key:f,value:qe(t[f])})},parseQuery:function(t){if(t)for(var e,r,n=vi(t,"&"),o=0;o<n.length;)(e=n[o++]).length&&(r=vi(e,"="),li(this.entries,{key:wi(hi(r)),value:wi(si(r,"="))}))},serialize:function(){for(var t,e=this.entries,r=[],n=0;n<e.length;)t=e[n++],li(r,Li(t.key)+"="+Li(t.value));return si(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ki=function(){_o(this,Ti);var t=arguments.length>0?arguments[0]:void 0;Yo(this,new Ei(t))},Ti=ki.prototype;if(function(t,e,r){for(var n in e)ee(t,n,e[n],r)}(Ti,{append:function(t,e){Bo(arguments.length,2);var r=$o(this);li(r.entries,{key:qe(t),value:qe(e)}),r.updateURL()},delete:function(t){Bo(arguments.length,1);for(var e=$o(this),r=e.entries,n=qe(t),o=0;o<r.length;)r[o].key===n?yi(r,o,1):o++;e.updateURL()},get:function(t){Bo(arguments.length,1);for(var e=$o(this).entries,r=qe(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){Bo(arguments.length,1);for(var e=$o(this).entries,r=qe(t),n=[],o=0;o<e.length;o++)e[o].key===r&&li(n,e[o].value);return n},has:function(t){Bo(arguments.length,1);for(var e=$o(this).entries,r=qe(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){Bo(arguments.length,1);for(var r,n=$o(this),o=n.entries,i=!1,u=qe(t),a=qe(e),c=0;c<o.length;c++)(r=o[c]).key===u&&(i?yi(o,c--,1):(i=!0,r.value=a));i||li(o,{key:u,value:a}),n.updateURL()},sort:function(){var t=$o(this);Qo(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=$o(this).entries,n=sr(t,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new Ri(this,"keys")},values:function(){return new Ri(this,"values")},entries:function(){return new Ri(this,"entries")}},{enumerable:!0}),ee(Ti,Jo,Ti.entries,{name:"entries"}),ee(Ti,"toString",(function(){return $o(this).serialize()}),{enumerable:!0}),cr(ki,"URLSearchParams"),Ae({global:!0,constructor:!0,forced:!Uo},{URLSearchParams:ki}),!Uo&&T(ri)){var Ai=m(oi.has),xi=m(oi.set),Fi=function(t){if(A(t)){var e,r=t.body;if("URLSearchParams"===Ne(r))return e=t.headers?new ri(t.headers):new ri,Ai(e,"content-type")||xi(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ye(t,{body:y(0,qe(r)),headers:y(0,e)})}return t};if(T(ti)&&Ae({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return ti(t,arguments.length>1?Fi(arguments[1]):{})}}),T(ei)){var Ii=function(t){return _o(this,ni),new ei(t,arguments.length>1?Fi(arguments[1]):{})};ni.constructor=Ii,Ii.prototype=ni,Ae({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ii})}}function Ui(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ci(t,e,r){return e&&Ui(t.prototype,e),r&&Ui(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function _i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Di(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Mi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Di(Object(r),!0).forEach((function(e){_i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Di(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Ni=Ci((function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),_i(this,"baseUri",void 0),_i(this,"proxy",void 0),_i(this,"headers",void 0),_i(this,"parameters",void 0),_i(this,"fetchOptions",void 0),_i(this,"fetch",void 0),_i(this,"transformRequest",void 0),_i(this,"throwOnBadResponse",void 0),this.headers=Mi({},e.headers),this.parameters=Mi({},e.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Mi({credentials:"omit"},e.fetchOptions),this.transformRequest=e.transformRequest||t.defaults.transformRequest,this.fetch=e.fetch,e.baseUri&&(this.baseUri=e.baseUri),e.proxy&&(this.proxy=e.proxy),this.throwOnBadResponse=!!e.throwOnBadResponse}));_i(Ni,"defaults",{transformRequest:function(t,e){switch(e["Content-Type"]){case"application/json":return JSON.stringify(t);case"application/x-www-form-urlencoded":return new URLSearchParams(t);default:return t}}}),exports.default=Ni;
|
package/lib/clientConfig.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ type BrowserRequestInit = RequestInit;
|
|
|
16
16
|
* Using the right properties in the right context is left to the user.
|
|
17
17
|
*/
|
|
18
18
|
type FetchOptions = NodeRequestInit & BrowserRequestInit;
|
|
19
|
+
type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
|
|
19
20
|
/**
|
|
20
21
|
* Base options that can be passed to the `ClientConfig` class.
|
|
21
22
|
*/
|
|
@@ -27,12 +28,12 @@ interface ClientConfigInit<Params extends BaseUriParameters> {
|
|
|
27
28
|
};
|
|
28
29
|
parameters: Params;
|
|
29
30
|
fetchOptions?: FetchOptions;
|
|
31
|
+
fetch?: FetchFunction;
|
|
30
32
|
transformRequest?: (data: unknown, headers: {
|
|
31
33
|
[key: string]: string;
|
|
32
34
|
}) => Required<FetchOptions>['body'];
|
|
33
35
|
throwOnBadResponse?: boolean;
|
|
34
36
|
}
|
|
35
|
-
type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
|
|
36
37
|
/**
|
|
37
38
|
* Configuration parameters common to Commerce SDK clients
|
|
38
39
|
*/
|
|
@@ -44,9 +45,10 @@ declare class ClientConfig<Params extends BaseUriParameters> implements ClientCo
|
|
|
44
45
|
};
|
|
45
46
|
parameters: Params;
|
|
46
47
|
fetchOptions: FetchOptions;
|
|
48
|
+
fetch?: FetchFunction;
|
|
47
49
|
transformRequest: NonNullable<ClientConfigInit<Params>['transformRequest']>;
|
|
48
50
|
throwOnBadResponse: boolean;
|
|
49
51
|
constructor(config: ClientConfigInit<Params>);
|
|
50
52
|
static readonly defaults: Pick<Required<ClientConfigInit<never>>, 'transformRequest'>;
|
|
51
53
|
}
|
|
52
|
-
export { FetchOptions,
|
|
54
|
+
export { FetchOptions, FetchFunction, ClientConfigInit, ClientConfig as default };
|
package/lib/clientConfig.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var r,n,o=function(t){return t&&t.Math==Math&&t},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),u=function(t){try{return!!t()}catch(t){return!0}},a=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!u((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),f=Function.prototype.call,s=c?f.bind(f):function(){return f.apply(f,arguments)},l={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,h={f:p&&!l.call({1:2},1)?function(t){var e=p(this,t);return!!e&&e.enumerable}:l},y=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v=Function.prototype,d=v.bind,g=v.call,b=c&&d.bind(g,g),m=c?function(t){return t&&b(t)}:function(t){return t&&function(){return g.apply(t,arguments)}},O=m({}.toString),w=m("".slice),S=function(t){return w(O(t),8,-1)},j=Object,P=m("".split),L=u((function(){return!j("z").propertyIsEnumerable(0)}))?function(t){return"String"==S(t)?P(t,""):j(t)}:j,R=TypeError,E=function(t){if(null==t)throw R("Can't call method on "+t);return t},k=function(t){return L(E(t))},T=function(t){return"function"==typeof t},A=function(t){return"object"==typeof t?null!==t:T(t)},x=function(t){return T(t)?t:void 0},F=function(t,e){return arguments.length<2?x(i[t]):i[t]&&i[t][e]},I=m({}.isPrototypeOf),U=F("navigator","userAgent")||"",C=i.process,D=i.Deno,_=C&&C.versions||D&&D.version,M=_&&_.v8;M&&(n=(r=M.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!n&&U&&(!(r=U.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=U.match(/Chrome\/(\d+)/))&&(n=+r[1]);var N=n,G=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&N&&N<41})),q=G&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,B=Object,z=q?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return T(e)&&I(e.prototype,B(t))},V=String,W=function(t){try{return V(t)}catch(t){return"Object"}},H=TypeError,Q=function(t){if(T(t))return t;throw H(W(t)+" is not a function")},J=function(t,e){var r=t[e];return null==r?void 0:Q(r)},Y=TypeError,$=Object.defineProperty,X=function(t,e){try{$(i,t,{value:e,configurable:!0,writable:!0})}catch(r){i[t]=e}return e},K=i["__core-js_shared__"]||X("__core-js_shared__",{}),Z=e((function(t){(t.exports=function(t,e){return K[t]||(K[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.23.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),tt=Object,et=function(t){return tt(E(t))},rt=m({}.hasOwnProperty),nt=Object.hasOwn||function(t,e){return rt(et(t),e)},ot=0,it=Math.random(),ut=m(1..toString),at=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ut(++ot+it,36)},ct=Z("wks"),ft=i.Symbol,st=ft&&ft.for,lt=q?ft:ft&&ft.withoutSetter||at,pt=function(t){if(!nt(ct,t)||!G&&"string"!=typeof ct[t]){var e="Symbol."+t;G&&nt(ft,t)?ct[t]=ft[t]:ct[t]=q&&st?st(e):lt(e)}return ct[t]},ht=TypeError,yt=pt("toPrimitive"),vt=function(t,e){if(!A(t)||z(t))return t;var r,n=J(t,yt);if(n){if(void 0===e&&(e="default"),r=s(n,t,e),!A(r)||z(r))return r;throw ht("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&T(r=t.toString)&&!A(n=s(r,t)))return n;if(T(r=t.valueOf)&&!A(n=s(r,t)))return n;if("string"!==e&&T(r=t.toString)&&!A(n=s(r,t)))return n;throw Y("Can't convert object to primitive value")}(t,e)},dt=function(t){var e=vt(t,"string");return z(e)?e:e+""},gt=i.document,bt=A(gt)&&A(gt.createElement),mt=function(t){return bt?gt.createElement(t):{}},Ot=!a&&!u((function(){return 7!=Object.defineProperty(mt("div"),"a",{get:function(){return 7}}).a})),wt=Object.getOwnPropertyDescriptor,St={f:a?wt:function(t,e){if(t=k(t),e=dt(e),Ot)try{return wt(t,e)}catch(t){}if(nt(t,e))return y(!s(h.f,t,e),t[e])}},jt=a&&u((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Pt=String,Lt=TypeError,Rt=function(t){if(A(t))return t;throw Lt(Pt(t)+" is not an object")},Et=TypeError,kt=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,At={f:a?jt?function(t,e,r){if(Rt(t),e=dt(e),Rt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=Tt(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return kt(t,e,r)}:kt:function(t,e,r){if(Rt(t),e=dt(e),Rt(r),Ot)try{return kt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Et("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},xt=a?function(t,e,r){return At.f(t,e,y(1,r))}:function(t,e,r){return t[e]=r,t},Ft=Function.prototype,It=a&&Object.getOwnPropertyDescriptor,Ut=nt(Ft,"name"),Ct={EXISTS:Ut,PROPER:Ut&&"something"===function(){}.name,CONFIGURABLE:Ut&&(!a||a&&It(Ft,"name").configurable)},Dt=m(Function.toString);T(K.inspectSource)||(K.inspectSource=function(t){return Dt(t)});var _t,Mt,Nt,Gt=K.inspectSource,qt=i.WeakMap,Bt=T(qt)&&/native code/.test(Gt(qt)),zt=Z("keys"),Vt=function(t){return zt[t]||(zt[t]=at(t))},Wt={},Ht=i.TypeError,Qt=i.WeakMap;if(Bt||K.state){var Jt=K.state||(K.state=new Qt),Yt=m(Jt.get),$t=m(Jt.has),Xt=m(Jt.set);_t=function(t,e){if($t(Jt,t))throw new Ht("Object already initialized");return e.facade=t,Xt(Jt,t,e),e},Mt=function(t){return Yt(Jt,t)||{}},Nt=function(t){return $t(Jt,t)}}else{var Kt=Vt("state");Wt[Kt]=!0,_t=function(t,e){if(nt(t,Kt))throw new Ht("Object already initialized");return e.facade=t,xt(t,Kt,e),e},Mt=function(t){return nt(t,Kt)?t[Kt]:{}},Nt=function(t){return nt(t,Kt)}}var Zt={set:_t,get:Mt,has:Nt,enforce:function(t){return Nt(t)?Mt(t):_t(t,{})},getterFor:function(t){return function(e){var r;if(!A(e)||(r=Mt(e)).type!==t)throw Ht("Incompatible receiver, "+t+" required");return r}}},te=e((function(t){var e=Ct.CONFIGURABLE,r=Zt.enforce,n=Zt.get,o=Object.defineProperty,i=a&&!u((function(){return 8!==o((function(){}),"length",{value:8}).length})),c=String(String).split("String"),f=t.exports=function(t,n,u){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),u&&u.getter&&(n="get "+n),u&&u.setter&&(n="set "+n),(!nt(t,"name")||e&&t.name!==n)&&(a?o(t,"name",{value:n,configurable:!0}):t.name=n),i&&u&&nt(u,"arity")&&t.length!==u.arity&&o(t,"length",{value:u.arity});try{u&&nt(u,"constructor")&&u.constructor?a&&o(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var f=r(t);return nt(f,"source")||(f.source=c.join("string"==typeof n?n:"")),t};Function.prototype.toString=f((function(){return T(this)&&n(this).source||Gt(this)}),"toString")})),ee=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(T(r)&&te(r,i,n),n.global)o?t[e]=r:X(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:At.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},re=Math.ceil,ne=Math.floor,oe=Math.trunc||function(t){var e=+t;return(e>0?ne:re)(e)},ie=function(t){var e=+t;return e!=e||0===e?0:oe(e)},ue=Math.max,ae=Math.min,ce=function(t,e){var r=ie(t);return r<0?ue(r+e,0):ae(r,e)},fe=Math.min,se=function(t){return(e=t.length)>0?fe(ie(e),9007199254740991):0;var e},le=function(t){return function(e,r,n){var o,i=k(e),u=se(i),a=ce(n,u);if(t&&r!=r){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},pe={includes:le(!0),indexOf:le(!1)}.indexOf,he=m([].push),ye=function(t,e){var r,n=k(t),o=0,i=[];for(r in n)!nt(Wt,r)&&nt(n,r)&&he(i,r);for(;e.length>o;)nt(n,r=e[o++])&&(~pe(i,r)||he(i,r));return i},ve=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],de=ve.concat("length","prototype"),ge={f:Object.getOwnPropertyNames||function(t){return ye(t,de)}},be={f:Object.getOwnPropertySymbols},me=m([].concat),Oe=F("Reflect","ownKeys")||function(t){var e=ge.f(Rt(t)),r=be.f;return r?me(e,r(t)):e},we=function(t,e,r){for(var n=Oe(e),o=At.f,i=St.f,u=0;u<n.length;u++){var a=n[u];nt(t,a)||r&&nt(r,a)||o(t,a,i(e,a))}},Se=/#|\.prototype\./,je=function(t,e){var r=Le[Pe(t)];return r==Ee||r!=Re&&(T(e)?u(e):!!e)},Pe=je.normalize=function(t){return String(t).replace(Se,".").toLowerCase()},Le=je.data={},Re=je.NATIVE="N",Ee=je.POLYFILL="P",ke=je,Te=St.f,Ae=function(t,e){var r,n,o,u,a,c=t.target,f=t.global,s=t.stat;if(r=f?i:s?i[c]||X(c,{}):(i[c]||{}).prototype)for(n in e){if(u=e[n],o=t.dontCallGetSet?(a=Te(r,n))&&a.value:r[n],!ke(f?n:c+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof u==typeof o)continue;we(u,o)}(t.sham||o&&o.sham)&&xt(u,"sham",!0),ee(r,n,u,t)}},xe=Object.keys||function(t){return ye(t,ve)},Fe=u((function(){xe(1)}));Ae({target:"Object",stat:!0,forced:Fe},{keys:function(t){return xe(et(t))}});var Ie={};Ie[pt("toStringTag")]="z";var Ue,Ce="[object z]"===String(Ie),De=pt("toStringTag"),_e=Object,Me="Arguments"==S(function(){return arguments}()),Ne=Ce?S:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=_e(t),De))?r:Me?S(e):"Object"==(n=S(e))&&T(e.callee)?"Arguments":n},Ge=String,qe=function(t){if("Symbol"===Ne(t))throw TypeError("Cannot convert a Symbol value to a string");return Ge(t)},Be={f:a&&!jt?Object.defineProperties:function(t,e){Rt(t);for(var r,n=k(e),o=xe(e),i=o.length,u=0;i>u;)At.f(t,r=o[u++],n[r]);return t}},ze=F("document","documentElement"),Ve=Vt("IE_PROTO"),We=function(){},He=function(t){return"<script>"+t+"<\/script>"},Qe=function(t){t.write(He("")),t.close();var e=t.parentWindow.Object;return t=null,e},Je=function(){try{Ue=new ActiveXObject("htmlfile")}catch(t){}var t,e;Je="undefined"!=typeof document?document.domain&&Ue?Qe(Ue):((e=mt("iframe")).style.display="none",ze.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(He("document.F=Object")),t.close(),t.F):Qe(Ue);for(var r=ve.length;r--;)delete Je.prototype[ve[r]];return Je()};Wt[Ve]=!0;var Ye=Object.create||function(t,e){var r;return null!==t?(We.prototype=Rt(t),r=new We,We.prototype=null,r[Ve]=t):r=Je(),void 0===e?r:Be.f(r,e)},$e=function(t,e,r){var n=dt(e);n in t?At.f(t,n,y(0,r)):t[n]=r},Xe=Array,Ke=Math.max,Ze=function(t,e,r){for(var n=se(t),o=ce(e,n),i=ce(void 0===r?n:r,n),u=Xe(Ke(i-o,0)),a=0;o<i;o++,a++)$e(u,a,t[o]);return u.length=a,u},tr=ge.f,er="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],rr={f:function(t){return er&&"Window"==S(t)?function(t){try{return tr(t)}catch(t){return Ze(er)}}(t):tr(k(t))}},nr={f:pt},or=i,ir=At.f,ur=At.f,ar=pt("toStringTag"),cr=function(t,e,r){t&&!r&&(t=t.prototype),t&&!nt(t,ar)&&ur(t,ar,{configurable:!0,value:e})},fr=m(m.bind),sr=function(t,e){return Q(t),void 0===e?t:c?fr(t,e):function(){return t.apply(e,arguments)}},lr=Array.isArray||function(t){return"Array"==S(t)},pr=function(){},hr=[],yr=F("Reflect","construct"),vr=/^\s*(?:class|function)\b/,dr=m(vr.exec),gr=!vr.exec(pr),br=function(t){if(!T(t))return!1;try{return yr(pr,hr,t),!0}catch(t){return!1}},mr=function(t){if(!T(t))return!1;switch(Ne(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gr||!!dr(vr,Gt(t))}catch(t){return!0}};mr.sham=!0;var Or=!yr||u((function(){var t;return br(br.call)||!br(Object)||!br((function(){t=!0}))||t}))?mr:br,wr=pt("species"),Sr=Array,jr=function(t,e){return new(function(t){var e;return lr(t)&&(e=t.constructor,(Or(e)&&(e===Sr||lr(e.prototype))||A(e)&&null===(e=e[wr]))&&(e=void 0)),void 0===e?Sr:e}(t))(0===e?0:e)},Pr=m([].push),Lr=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,f,s,l){for(var p,h,y=et(c),v=L(y),d=sr(f,s),g=se(v),b=0,m=l||jr,O=e?m(c,g):r||u?m(c,0):void 0;g>b;b++)if((a||b in v)&&(h=d(p=v[b],b,y),t))if(e)O[b]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return b;case 2:Pr(O,p)}else switch(t){case 4:return!1;case 7:Pr(O,p)}return i?-1:n||o?o:O}},Rr={forEach:Lr(0),map:Lr(1),filter:Lr(2),some:Lr(3),every:Lr(4),find:Lr(5),findIndex:Lr(6),filterReject:Lr(7)},Er=Rr.forEach,kr=Vt("hidden"),Tr=Zt.set,Ar=Zt.getterFor("Symbol"),xr=Object.prototype,Fr=i.Symbol,Ir=Fr&&Fr.prototype,Ur=i.TypeError,Cr=i.QObject,Dr=St.f,_r=At.f,Mr=rr.f,Nr=h.f,Gr=m([].push),qr=Z("symbols"),Br=Z("op-symbols"),zr=Z("wks"),Vr=!Cr||!Cr.prototype||!Cr.prototype.findChild,Wr=a&&u((function(){return 7!=Ye(_r({},"a",{get:function(){return _r(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Dr(xr,e);n&&delete xr[e],_r(t,e,r),n&&t!==xr&&_r(xr,e,n)}:_r,Hr=function(t,e){var r=qr[t]=Ye(Ir);return Tr(r,{type:"Symbol",tag:t,description:e}),a||(r.description=e),r},Qr=function(t,e,r){t===xr&&Qr(Br,e,r),Rt(t);var n=dt(e);return Rt(r),nt(qr,n)?(r.enumerable?(nt(t,kr)&&t[kr][n]&&(t[kr][n]=!1),r=Ye(r,{enumerable:y(0,!1)})):(nt(t,kr)||_r(t,kr,y(1,{})),t[kr][n]=!0),Wr(t,n,r)):_r(t,n,r)},Jr=function(t,e){Rt(t);var r=k(e),n=xe(r).concat(Kr(r));return Er(n,(function(e){a&&!s(Yr,r,e)||Qr(t,e,r[e])})),t},Yr=function(t){var e=dt(t),r=s(Nr,this,e);return!(this===xr&&nt(qr,e)&&!nt(Br,e))&&(!(r||!nt(this,e)||!nt(qr,e)||nt(this,kr)&&this[kr][e])||r)},$r=function(t,e){var r=k(t),n=dt(e);if(r!==xr||!nt(qr,n)||nt(Br,n)){var o=Dr(r,n);return!o||!nt(qr,n)||nt(r,kr)&&r[kr][n]||(o.enumerable=!0),o}},Xr=function(t){var e=Mr(k(t)),r=[];return Er(e,(function(t){nt(qr,t)||nt(Wt,t)||Gr(r,t)})),r},Kr=function(t){var e=t===xr,r=Mr(e?Br:k(t)),n=[];return Er(r,(function(t){!nt(qr,t)||e&&!nt(xr,t)||Gr(n,qr[t])})),n};G||(Ir=(Fr=function(){if(I(Ir,this))throw Ur("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?qe(arguments[0]):void 0,e=at(t),r=function(t){this===xr&&s(r,Br,t),nt(this,kr)&&nt(this[kr],e)&&(this[kr][e]=!1),Wr(this,e,y(1,t))};return a&&Vr&&Wr(xr,e,{configurable:!0,set:r}),Hr(e,t)}).prototype,ee(Ir,"toString",(function(){return Ar(this).tag})),ee(Fr,"withoutSetter",(function(t){return Hr(at(t),t)})),h.f=Yr,At.f=Qr,Be.f=Jr,St.f=$r,ge.f=rr.f=Xr,be.f=Kr,nr.f=function(t){return Hr(pt(t),t)},a&&(_r(Ir,"description",{configurable:!0,get:function(){return Ar(this).description}}),ee(xr,"propertyIsEnumerable",Yr,{unsafe:!0}))),Ae({global:!0,constructor:!0,wrap:!0,forced:!G,sham:!G},{Symbol:Fr}),Er(xe(zr),(function(t){!function(t){var e=or.Symbol||(or.Symbol={});nt(e,t)||ir(e,t,{value:nr.f(t)})}(t)})),Ae({target:"Symbol",stat:!0,forced:!G},{useSetter:function(){Vr=!0},useSimple:function(){Vr=!1}}),Ae({target:"Object",stat:!0,forced:!G,sham:!a},{create:function(t,e){return void 0===e?Ye(t):Jr(Ye(t),e)},defineProperty:Qr,defineProperties:Jr,getOwnPropertyDescriptor:$r}),Ae({target:"Object",stat:!0,forced:!G},{getOwnPropertyNames:Xr}),function(){var t=F("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,n=pt("toPrimitive");e&&!e[n]&&ee(e,n,(function(t){return s(r,this)}),{arity:1})}(),cr(Fr,"Symbol"),Wt[kr]=!0;var Zr=G&&!!Symbol.for&&!!Symbol.keyFor,tn=Z("string-to-symbol-registry"),en=Z("symbol-to-string-registry");Ae({target:"Symbol",stat:!0,forced:!Zr},{for:function(t){var e=qe(t);if(nt(tn,e))return tn[e];var r=F("Symbol")(e);return tn[e]=r,en[r]=e,r}});var rn=Z("symbol-to-string-registry");Ae({target:"Symbol",stat:!0,forced:!Zr},{keyFor:function(t){if(!z(t))throw TypeError(W(t)+" is not a symbol");if(nt(rn,t))return rn[t]}});var nn=Function.prototype,on=nn.apply,un=nn.call,an="object"==typeof Reflect&&Reflect.apply||(c?un.bind(on):function(){return un.apply(on,arguments)}),cn=m([].slice),fn=F("JSON","stringify"),sn=m(/./.exec),ln=m("".charAt),pn=m("".charCodeAt),hn=m("".replace),yn=m(1..toString),vn=/[\uD800-\uDFFF]/g,dn=/^[\uD800-\uDBFF]$/,gn=/^[\uDC00-\uDFFF]$/,bn=!G||u((function(){var t=F("Symbol")();return"[null]"!=fn([t])||"{}"!=fn({a:t})||"{}"!=fn(Object(t))})),mn=u((function(){return'"\\udf06\\ud834"'!==fn("\udf06\ud834")||'"\\udead"'!==fn("\udead")})),On=function(t,e){var r=cn(arguments),n=e;if((A(e)||void 0!==t)&&!z(t))return lr(e)||(e=function(t,e){if(T(n)&&(e=s(n,this,t,e)),!z(e))return e}),r[1]=e,an(fn,null,r)},wn=function(t,e,r){var n=ln(r,e-1),o=ln(r,e+1);return sn(dn,t)&&!sn(gn,o)||sn(gn,t)&&!sn(dn,n)?"\\u"+yn(pn(t,0),16):t};fn&&Ae({target:"JSON",stat:!0,arity:3,forced:bn||mn},{stringify:function(t,e,r){var n=cn(arguments),o=an(bn?On:fn,null,n);return mn&&"string"==typeof o?hn(o,vn,wn):o}});var Sn=!G||u((function(){be.f(1)}));Ae({target:"Object",stat:!0,forced:Sn},{getOwnPropertySymbols:function(t){var e=be.f;return e?e(et(t)):[]}});var jn,Pn=pt("species"),Ln=Rr.filter,Rn=(jn="filter",N>=51||!u((function(){var t=[];return(t.constructor={})[Pn]=function(){return{foo:1}},1!==t[jn](Boolean).foo})));Ae({target:"Array",proto:!0,forced:!Rn},{filter:function(t){return Ln(this,t,arguments.length>1?arguments[1]:void 0)}});var En=Ce?{}.toString:function(){return"[object "+Ne(this)+"]"};Ce||ee(Object.prototype,"toString",En,{unsafe:!0});var kn=St.f,Tn=u((function(){kn(1)}));Ae({target:"Object",stat:!0,forced:!a||Tn,sham:!a},{getOwnPropertyDescriptor:function(t,e){return kn(k(t),e)}});var An={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},xn=mt("span").classList,Fn=xn&&xn.constructor&&xn.constructor.prototype,In=Fn===Object.prototype?void 0:Fn,Un=Rr.forEach,Cn=function(t,e){var r=[][t];return!!r&&u((function(){r.call(null,e||function(){return 1},1)}))}("forEach")?[].forEach:function(t){return Un(this,t,arguments.length>1?arguments[1]:void 0)},Dn=function(t){if(t&&t.forEach!==Cn)try{xt(t,"forEach",Cn)}catch(e){t.forEach=Cn}};for(var _n in An)An[_n]&&Dn(i[_n]&&i[_n].prototype);Dn(In),Ae({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(t){for(var e,r,n=k(t),o=St.f,i=Oe(n),u={},a=0;i.length>a;)void 0!==(r=o(n,e=i[a++]))&&$e(u,e,r);return u}});var Mn=Be.f;Ae({target:"Object",stat:!0,forced:Object.defineProperties!==Mn,sham:!a},{defineProperties:Mn});var Nn=At.f;Ae({target:"Object",stat:!0,forced:Object.defineProperty!==Nn,sham:!a},{defineProperty:Nn});var Gn=At.f,qn=pt("unscopables"),Bn=Array.prototype;null==Bn[qn]&&Gn(Bn,qn,{configurable:!0,value:Ye(null)});var zn,Vn,Wn,Hn=function(t){Bn[qn][t]=!0},Qn={},Jn=!u((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Yn=Vt("IE_PROTO"),$n=Object,Xn=$n.prototype,Kn=Jn?$n.getPrototypeOf:function(t){var e=et(t);if(nt(e,Yn))return e[Yn];var r=e.constructor;return T(r)&&e instanceof r?r.prototype:e instanceof $n?Xn:null},Zn=pt("iterator"),to=!1;[].keys&&("next"in(Wn=[].keys())?(Vn=Kn(Kn(Wn)))!==Object.prototype&&(zn=Vn):to=!0),(null==zn||u((function(){var t={};return zn[Zn].call(t)!==t})))&&(zn={}),T(zn[Zn])||ee(zn,Zn,(function(){return this}));var eo={IteratorPrototype:zn,BUGGY_SAFARI_ITERATORS:to},ro=eo.IteratorPrototype,no=function(){return this},oo=function(t,e,r,n){var o=e+" Iterator";return t.prototype=Ye(ro,{next:y(+!n,r)}),cr(t,o,!1),Qn[o]=no,t},io=String,uo=TypeError,ao=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=m(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Rt(r),function(t){if("object"==typeof t||T(t))return t;throw uo("Can't set "+io(t)+" as a prototype")}(n),e?t(r,n):r.__proto__=n,r}}():void 0),co=Ct.PROPER,fo=Ct.CONFIGURABLE,so=eo.IteratorPrototype,lo=eo.BUGGY_SAFARI_ITERATORS,po=pt("iterator"),ho=function(){return this},yo=function(t,e,r,n,o,i,u){oo(r,e,n);var a,c,f,l=function(t){if(t===o&&d)return d;if(!lo&&t in y)return y[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},p=e+" Iterator",h=!1,y=t.prototype,v=y[po]||y["@@iterator"]||o&&y[o],d=!lo&&v||l(o),g="Array"==e&&y.entries||v;if(g&&(a=Kn(g.call(new t)))!==Object.prototype&&a.next&&(Kn(a)!==so&&(ao?ao(a,so):T(a[po])||ee(a,po,ho)),cr(a,p,!0)),co&&"values"==o&&v&&"values"!==v.name&&(fo?xt(y,"name","values"):(h=!0,d=function(){return s(v,this)})),o)if(c={values:l("values"),keys:i?d:l("keys"),entries:l("entries")},u)for(f in c)(lo||h||!(f in y))&&ee(y,f,c[f]);else Ae({target:e,proto:!0,forced:lo||h},c);return y[po]!==d&&ee(y,po,d,{name:o}),Qn[e]=d,c},vo=At.f,go=Zt.set,bo=Zt.getterFor("Array Iterator"),mo=yo(Array,"Array",(function(t,e){go(this,{type:"Array Iterator",target:k(t),index:0,kind:e})}),(function(){var t=bo(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),Oo=Qn.Arguments=Qn.Array;if(Hn("keys"),Hn("values"),Hn("entries"),a&&"values"!==Oo.name)try{vo(Oo,"name",{value:"values"})}catch(t){}var wo=m("".charAt),So=m("".charCodeAt),jo=m("".slice),Po=function(t){return function(e,r){var n,o,i=qe(E(e)),u=ie(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=So(i,u))<55296||n>56319||u+1===a||(o=So(i,u+1))<56320||o>57343?t?wo(i,u):n:t?jo(i,u,u+2):o-56320+(n-55296<<10)+65536}},Lo={codeAt:Po(!1),charAt:Po(!0)}.charAt,Ro=Zt.set,Eo=Zt.getterFor("String Iterator");yo(String,"String",(function(t){Ro(this,{type:"String Iterator",string:qe(t),index:0})}),(function(){var t,e=Eo(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Lo(r,n),e.index+=t.length,{value:t,done:!1})}));var ko=pt("iterator"),To=pt("toStringTag"),Ao=mo.values,xo=function(t,e){if(t){if(t[ko]!==Ao)try{xt(t,ko,Ao)}catch(e){t[ko]=Ao}if(t[To]||xt(t,To,e),An[e])for(var r in mo)if(t[r]!==mo[r])try{xt(t,r,mo[r])}catch(e){t[r]=mo[r]}}};for(var Fo in An)xo(i[Fo]&&i[Fo].prototype,Fo);xo(In,"DOMTokenList");var Io=pt("iterator"),Uo=!u((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[Io]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),Co=TypeError,Do=function(t,e){if(I(e,t))return t;throw Co("Incorrect invocation")},_o=pt("iterator"),Mo=function(t){if(null!=t)return J(t,_o)||J(t,"@@iterator")||Qn[Ne(t)]},No=TypeError,Go=function(t,e){var r=arguments.length<2?Mo(t):e;if(Q(r))return Rt(s(r,t));throw No(W(t)+" is not iterable")},qo=TypeError,Bo=function(t,e){if(t<e)throw qo("Not enough arguments");return t},zo=Math.floor,Vo=function(t,e){var r=t.length,n=zo(r/2);return r<8?Wo(t,e):Ho(t,Vo(Ze(t,0,n),e),Vo(Ze(t,n),e),e)},Wo=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},Ho=function(t,e,r,n){for(var o=e.length,i=r.length,u=0,a=0;u<o||a<i;)t[u+a]=u<o&&a<i?n(e[u],r[a])<=0?e[u++]:r[a++]:u<o?e[u++]:r[a++];return t},Qo=Vo,Jo=pt("iterator"),Yo=Zt.set,$o=Zt.getterFor("URLSearchParams"),Xo=Zt.getterFor("URLSearchParamsIterator"),Ko=Object.getOwnPropertyDescriptor,Zo=function(t){if(!a)return i[t];var e=Ko(i,t);return e&&e.value},ti=Zo("fetch"),ei=Zo("Request"),ri=Zo("Headers"),ni=ei&&ei.prototype,oi=ri&&ri.prototype,ii=i.RegExp,ui=i.TypeError,ai=i.decodeURIComponent,ci=i.encodeURIComponent,fi=m("".charAt),si=m([].join),li=m([].push),pi=m("".replace),hi=m([].shift),yi=m([].splice),vi=m("".split),di=m("".slice),gi=/\+/g,bi=Array(4),mi=function(t){return bi[t-1]||(bi[t-1]=ii("((?:%[\\da-f]{2}){"+t+"})","gi"))},Oi=function(t){try{return ai(t)}catch(e){return t}},wi=function(t){var e=pi(t,gi," "),r=4;try{return ai(e)}catch(t){for(;r;)e=pi(e,mi(r--),Oi);return e}},Si=/[!'()~]|%20/g,ji={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Pi=function(t){return ji[t]},Li=function(t){return pi(ci(t),Si,Pi)},Ri=oo((function(t,e){Yo(this,{type:"URLSearchParamsIterator",iterator:Go($o(t).entries),kind:e})}),"Iterator",(function(){var t=Xo(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r}),!0),Ei=function(t){this.entries=[],this.url=null,void 0!==t&&(A(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===fi(t,0)?di(t,1):t:qe(t)))};Ei.prototype={type:"URLSearchParams",bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,o,i,u,a,c=Mo(t);if(c)for(r=(e=Go(t,c)).next;!(n=s(r,e)).done;){if(i=(o=Go(Rt(n.value))).next,(u=s(i,o)).done||(a=s(i,o)).done||!s(i,o).done)throw ui("Expected sequence with length 2");li(this.entries,{key:qe(u.value),value:qe(a.value)})}else for(var f in t)nt(t,f)&&li(this.entries,{key:f,value:qe(t[f])})},parseQuery:function(t){if(t)for(var e,r,n=vi(t,"&"),o=0;o<n.length;)(e=n[o++]).length&&(r=vi(e,"="),li(this.entries,{key:wi(hi(r)),value:wi(si(r,"="))}))},serialize:function(){for(var t,e=this.entries,r=[],n=0;n<e.length;)t=e[n++],li(r,Li(t.key)+"="+Li(t.value));return si(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ki=function(){Do(this,Ti);var t=arguments.length>0?arguments[0]:void 0;Yo(this,new Ei(t))},Ti=ki.prototype;if(function(t,e,r){for(var n in e)ee(t,n,e[n],r)}(Ti,{append:function(t,e){Bo(arguments.length,2);var r=$o(this);li(r.entries,{key:qe(t),value:qe(e)}),r.updateURL()},delete:function(t){Bo(arguments.length,1);for(var e=$o(this),r=e.entries,n=qe(t),o=0;o<r.length;)r[o].key===n?yi(r,o,1):o++;e.updateURL()},get:function(t){Bo(arguments.length,1);for(var e=$o(this).entries,r=qe(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){Bo(arguments.length,1);for(var e=$o(this).entries,r=qe(t),n=[],o=0;o<e.length;o++)e[o].key===r&&li(n,e[o].value);return n},has:function(t){Bo(arguments.length,1);for(var e=$o(this).entries,r=qe(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){Bo(arguments.length,1);for(var r,n=$o(this),o=n.entries,i=!1,u=qe(t),a=qe(e),c=0;c<o.length;c++)(r=o[c]).key===u&&(i?yi(o,c--,1):(i=!0,r.value=a));i||li(o,{key:u,value:a}),n.updateURL()},sort:function(){var t=$o(this);Qo(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=$o(this).entries,n=sr(t,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new Ri(this,"keys")},values:function(){return new Ri(this,"values")},entries:function(){return new Ri(this,"entries")}},{enumerable:!0}),ee(Ti,Jo,Ti.entries,{name:"entries"}),ee(Ti,"toString",(function(){return $o(this).serialize()}),{enumerable:!0}),cr(ki,"URLSearchParams"),Ae({global:!0,constructor:!0,forced:!Uo},{URLSearchParams:ki}),!Uo&&T(ri)){var Ai=m(oi.has),xi=m(oi.set),Fi=function(t){if(A(t)){var e,r=t.body;if("URLSearchParams"===Ne(r))return e=t.headers?new ri(t.headers):new ri,Ai(e,"content-type")||xi(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ye(t,{body:y(0,qe(r)),headers:y(0,e)})}return t};if(T(ti)&&Ae({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return ti(t,arguments.length>1?Fi(arguments[1]):{})}}),T(ei)){var Ii=function(t){return Do(this,ni),new ei(t,arguments.length>1?Fi(arguments[1]):{})};ni.constructor=Ii,Ii.prototype=ni,Ae({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ii})}}function Ui(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ci(t,e,r){return e&&Ui(t.prototype,e),r&&Ui(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Di(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Mi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_i(Object(r),!0).forEach((function(e){Di(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Ni=Ci((function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Di(this,"baseUri",void 0),Di(this,"proxy",void 0),Di(this,"headers",void 0),Di(this,"parameters",void 0),Di(this,"fetchOptions",void 0),Di(this,"transformRequest",void 0),Di(this,"throwOnBadResponse",void 0),this.headers=Mi({},e.headers),this.parameters=Mi({},e.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Mi({credentials:"omit"},e.fetchOptions),this.transformRequest=e.transformRequest||t.defaults.transformRequest,e.baseUri&&(this.baseUri=e.baseUri),e.proxy&&(this.proxy=e.proxy),this.throwOnBadResponse=!!e.throwOnBadResponse}));Di(Ni,"defaults",{transformRequest:function(t,e){switch(e["Content-Type"]){case"application/json":return JSON.stringify(t);case"application/x-www-form-urlencoded":return new URLSearchParams(t);default:return t}}});export{Ni as default};
|
|
1
|
+
var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var r,n,o=function(t){return t&&t.Math==Math&&t},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),u=function(t){try{return!!t()}catch(t){return!0}},a=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!u((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),f=Function.prototype.call,s=c?f.bind(f):function(){return f.apply(f,arguments)},l={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,h={f:p&&!l.call({1:2},1)?function(t){var e=p(this,t);return!!e&&e.enumerable}:l},y=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v=Function.prototype,d=v.bind,g=v.call,b=c&&d.bind(g,g),m=c?function(t){return t&&b(t)}:function(t){return t&&function(){return g.apply(t,arguments)}},O=m({}.toString),w=m("".slice),S=function(t){return w(O(t),8,-1)},j=Object,P=m("".split),L=u((function(){return!j("z").propertyIsEnumerable(0)}))?function(t){return"String"==S(t)?P(t,""):j(t)}:j,R=TypeError,E=function(t){if(null==t)throw R("Can't call method on "+t);return t},k=function(t){return L(E(t))},T=function(t){return"function"==typeof t},A=function(t){return"object"==typeof t?null!==t:T(t)},x=function(t){return T(t)?t:void 0},F=function(t,e){return arguments.length<2?x(i[t]):i[t]&&i[t][e]},I=m({}.isPrototypeOf),U=F("navigator","userAgent")||"",C=i.process,D=i.Deno,_=C&&C.versions||D&&D.version,M=_&&_.v8;M&&(n=(r=M.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!n&&U&&(!(r=U.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=U.match(/Chrome\/(\d+)/))&&(n=+r[1]);var N=n,G=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&N&&N<41})),q=G&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,B=Object,z=q?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return T(e)&&I(e.prototype,B(t))},V=String,W=function(t){try{return V(t)}catch(t){return"Object"}},H=TypeError,Q=function(t){if(T(t))return t;throw H(W(t)+" is not a function")},J=function(t,e){var r=t[e];return null==r?void 0:Q(r)},Y=TypeError,$=Object.defineProperty,X=function(t,e){try{$(i,t,{value:e,configurable:!0,writable:!0})}catch(r){i[t]=e}return e},K=i["__core-js_shared__"]||X("__core-js_shared__",{}),Z=e((function(t){(t.exports=function(t,e){return K[t]||(K[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.23.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),tt=Object,et=function(t){return tt(E(t))},rt=m({}.hasOwnProperty),nt=Object.hasOwn||function(t,e){return rt(et(t),e)},ot=0,it=Math.random(),ut=m(1..toString),at=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ut(++ot+it,36)},ct=Z("wks"),ft=i.Symbol,st=ft&&ft.for,lt=q?ft:ft&&ft.withoutSetter||at,pt=function(t){if(!nt(ct,t)||!G&&"string"!=typeof ct[t]){var e="Symbol."+t;G&&nt(ft,t)?ct[t]=ft[t]:ct[t]=q&&st?st(e):lt(e)}return ct[t]},ht=TypeError,yt=pt("toPrimitive"),vt=function(t,e){if(!A(t)||z(t))return t;var r,n=J(t,yt);if(n){if(void 0===e&&(e="default"),r=s(n,t,e),!A(r)||z(r))return r;throw ht("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&T(r=t.toString)&&!A(n=s(r,t)))return n;if(T(r=t.valueOf)&&!A(n=s(r,t)))return n;if("string"!==e&&T(r=t.toString)&&!A(n=s(r,t)))return n;throw Y("Can't convert object to primitive value")}(t,e)},dt=function(t){var e=vt(t,"string");return z(e)?e:e+""},gt=i.document,bt=A(gt)&&A(gt.createElement),mt=function(t){return bt?gt.createElement(t):{}},Ot=!a&&!u((function(){return 7!=Object.defineProperty(mt("div"),"a",{get:function(){return 7}}).a})),wt=Object.getOwnPropertyDescriptor,St={f:a?wt:function(t,e){if(t=k(t),e=dt(e),Ot)try{return wt(t,e)}catch(t){}if(nt(t,e))return y(!s(h.f,t,e),t[e])}},jt=a&&u((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Pt=String,Lt=TypeError,Rt=function(t){if(A(t))return t;throw Lt(Pt(t)+" is not an object")},Et=TypeError,kt=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,At={f:a?jt?function(t,e,r){if(Rt(t),e=dt(e),Rt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=Tt(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return kt(t,e,r)}:kt:function(t,e,r){if(Rt(t),e=dt(e),Rt(r),Ot)try{return kt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Et("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},xt=a?function(t,e,r){return At.f(t,e,y(1,r))}:function(t,e,r){return t[e]=r,t},Ft=Function.prototype,It=a&&Object.getOwnPropertyDescriptor,Ut=nt(Ft,"name"),Ct={EXISTS:Ut,PROPER:Ut&&"something"===function(){}.name,CONFIGURABLE:Ut&&(!a||a&&It(Ft,"name").configurable)},Dt=m(Function.toString);T(K.inspectSource)||(K.inspectSource=function(t){return Dt(t)});var _t,Mt,Nt,Gt=K.inspectSource,qt=i.WeakMap,Bt=T(qt)&&/native code/.test(Gt(qt)),zt=Z("keys"),Vt=function(t){return zt[t]||(zt[t]=at(t))},Wt={},Ht=i.TypeError,Qt=i.WeakMap;if(Bt||K.state){var Jt=K.state||(K.state=new Qt),Yt=m(Jt.get),$t=m(Jt.has),Xt=m(Jt.set);_t=function(t,e){if($t(Jt,t))throw new Ht("Object already initialized");return e.facade=t,Xt(Jt,t,e),e},Mt=function(t){return Yt(Jt,t)||{}},Nt=function(t){return $t(Jt,t)}}else{var Kt=Vt("state");Wt[Kt]=!0,_t=function(t,e){if(nt(t,Kt))throw new Ht("Object already initialized");return e.facade=t,xt(t,Kt,e),e},Mt=function(t){return nt(t,Kt)?t[Kt]:{}},Nt=function(t){return nt(t,Kt)}}var Zt={set:_t,get:Mt,has:Nt,enforce:function(t){return Nt(t)?Mt(t):_t(t,{})},getterFor:function(t){return function(e){var r;if(!A(e)||(r=Mt(e)).type!==t)throw Ht("Incompatible receiver, "+t+" required");return r}}},te=e((function(t){var e=Ct.CONFIGURABLE,r=Zt.enforce,n=Zt.get,o=Object.defineProperty,i=a&&!u((function(){return 8!==o((function(){}),"length",{value:8}).length})),c=String(String).split("String"),f=t.exports=function(t,n,u){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),u&&u.getter&&(n="get "+n),u&&u.setter&&(n="set "+n),(!nt(t,"name")||e&&t.name!==n)&&(a?o(t,"name",{value:n,configurable:!0}):t.name=n),i&&u&&nt(u,"arity")&&t.length!==u.arity&&o(t,"length",{value:u.arity});try{u&&nt(u,"constructor")&&u.constructor?a&&o(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var f=r(t);return nt(f,"source")||(f.source=c.join("string"==typeof n?n:"")),t};Function.prototype.toString=f((function(){return T(this)&&n(this).source||Gt(this)}),"toString")})),ee=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(T(r)&&te(r,i,n),n.global)o?t[e]=r:X(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:At.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},re=Math.ceil,ne=Math.floor,oe=Math.trunc||function(t){var e=+t;return(e>0?ne:re)(e)},ie=function(t){var e=+t;return e!=e||0===e?0:oe(e)},ue=Math.max,ae=Math.min,ce=function(t,e){var r=ie(t);return r<0?ue(r+e,0):ae(r,e)},fe=Math.min,se=function(t){return(e=t.length)>0?fe(ie(e),9007199254740991):0;var e},le=function(t){return function(e,r,n){var o,i=k(e),u=se(i),a=ce(n,u);if(t&&r!=r){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},pe={includes:le(!0),indexOf:le(!1)}.indexOf,he=m([].push),ye=function(t,e){var r,n=k(t),o=0,i=[];for(r in n)!nt(Wt,r)&&nt(n,r)&&he(i,r);for(;e.length>o;)nt(n,r=e[o++])&&(~pe(i,r)||he(i,r));return i},ve=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],de=ve.concat("length","prototype"),ge={f:Object.getOwnPropertyNames||function(t){return ye(t,de)}},be={f:Object.getOwnPropertySymbols},me=m([].concat),Oe=F("Reflect","ownKeys")||function(t){var e=ge.f(Rt(t)),r=be.f;return r?me(e,r(t)):e},we=function(t,e,r){for(var n=Oe(e),o=At.f,i=St.f,u=0;u<n.length;u++){var a=n[u];nt(t,a)||r&&nt(r,a)||o(t,a,i(e,a))}},Se=/#|\.prototype\./,je=function(t,e){var r=Le[Pe(t)];return r==Ee||r!=Re&&(T(e)?u(e):!!e)},Pe=je.normalize=function(t){return String(t).replace(Se,".").toLowerCase()},Le=je.data={},Re=je.NATIVE="N",Ee=je.POLYFILL="P",ke=je,Te=St.f,Ae=function(t,e){var r,n,o,u,a,c=t.target,f=t.global,s=t.stat;if(r=f?i:s?i[c]||X(c,{}):(i[c]||{}).prototype)for(n in e){if(u=e[n],o=t.dontCallGetSet?(a=Te(r,n))&&a.value:r[n],!ke(f?n:c+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof u==typeof o)continue;we(u,o)}(t.sham||o&&o.sham)&&xt(u,"sham",!0),ee(r,n,u,t)}},xe=Object.keys||function(t){return ye(t,ve)},Fe=u((function(){xe(1)}));Ae({target:"Object",stat:!0,forced:Fe},{keys:function(t){return xe(et(t))}});var Ie={};Ie[pt("toStringTag")]="z";var Ue,Ce="[object z]"===String(Ie),De=pt("toStringTag"),_e=Object,Me="Arguments"==S(function(){return arguments}()),Ne=Ce?S:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=_e(t),De))?r:Me?S(e):"Object"==(n=S(e))&&T(e.callee)?"Arguments":n},Ge=String,qe=function(t){if("Symbol"===Ne(t))throw TypeError("Cannot convert a Symbol value to a string");return Ge(t)},Be={f:a&&!jt?Object.defineProperties:function(t,e){Rt(t);for(var r,n=k(e),o=xe(e),i=o.length,u=0;i>u;)At.f(t,r=o[u++],n[r]);return t}},ze=F("document","documentElement"),Ve=Vt("IE_PROTO"),We=function(){},He=function(t){return"<script>"+t+"<\/script>"},Qe=function(t){t.write(He("")),t.close();var e=t.parentWindow.Object;return t=null,e},Je=function(){try{Ue=new ActiveXObject("htmlfile")}catch(t){}var t,e;Je="undefined"!=typeof document?document.domain&&Ue?Qe(Ue):((e=mt("iframe")).style.display="none",ze.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(He("document.F=Object")),t.close(),t.F):Qe(Ue);for(var r=ve.length;r--;)delete Je.prototype[ve[r]];return Je()};Wt[Ve]=!0;var Ye=Object.create||function(t,e){var r;return null!==t?(We.prototype=Rt(t),r=new We,We.prototype=null,r[Ve]=t):r=Je(),void 0===e?r:Be.f(r,e)},$e=function(t,e,r){var n=dt(e);n in t?At.f(t,n,y(0,r)):t[n]=r},Xe=Array,Ke=Math.max,Ze=function(t,e,r){for(var n=se(t),o=ce(e,n),i=ce(void 0===r?n:r,n),u=Xe(Ke(i-o,0)),a=0;o<i;o++,a++)$e(u,a,t[o]);return u.length=a,u},tr=ge.f,er="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],rr={f:function(t){return er&&"Window"==S(t)?function(t){try{return tr(t)}catch(t){return Ze(er)}}(t):tr(k(t))}},nr={f:pt},or=i,ir=At.f,ur=At.f,ar=pt("toStringTag"),cr=function(t,e,r){t&&!r&&(t=t.prototype),t&&!nt(t,ar)&&ur(t,ar,{configurable:!0,value:e})},fr=m(m.bind),sr=function(t,e){return Q(t),void 0===e?t:c?fr(t,e):function(){return t.apply(e,arguments)}},lr=Array.isArray||function(t){return"Array"==S(t)},pr=function(){},hr=[],yr=F("Reflect","construct"),vr=/^\s*(?:class|function)\b/,dr=m(vr.exec),gr=!vr.exec(pr),br=function(t){if(!T(t))return!1;try{return yr(pr,hr,t),!0}catch(t){return!1}},mr=function(t){if(!T(t))return!1;switch(Ne(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gr||!!dr(vr,Gt(t))}catch(t){return!0}};mr.sham=!0;var Or=!yr||u((function(){var t;return br(br.call)||!br(Object)||!br((function(){t=!0}))||t}))?mr:br,wr=pt("species"),Sr=Array,jr=function(t,e){return new(function(t){var e;return lr(t)&&(e=t.constructor,(Or(e)&&(e===Sr||lr(e.prototype))||A(e)&&null===(e=e[wr]))&&(e=void 0)),void 0===e?Sr:e}(t))(0===e?0:e)},Pr=m([].push),Lr=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,f,s,l){for(var p,h,y=et(c),v=L(y),d=sr(f,s),g=se(v),b=0,m=l||jr,O=e?m(c,g):r||u?m(c,0):void 0;g>b;b++)if((a||b in v)&&(h=d(p=v[b],b,y),t))if(e)O[b]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return b;case 2:Pr(O,p)}else switch(t){case 4:return!1;case 7:Pr(O,p)}return i?-1:n||o?o:O}},Rr={forEach:Lr(0),map:Lr(1),filter:Lr(2),some:Lr(3),every:Lr(4),find:Lr(5),findIndex:Lr(6),filterReject:Lr(7)},Er=Rr.forEach,kr=Vt("hidden"),Tr=Zt.set,Ar=Zt.getterFor("Symbol"),xr=Object.prototype,Fr=i.Symbol,Ir=Fr&&Fr.prototype,Ur=i.TypeError,Cr=i.QObject,Dr=St.f,_r=At.f,Mr=rr.f,Nr=h.f,Gr=m([].push),qr=Z("symbols"),Br=Z("op-symbols"),zr=Z("wks"),Vr=!Cr||!Cr.prototype||!Cr.prototype.findChild,Wr=a&&u((function(){return 7!=Ye(_r({},"a",{get:function(){return _r(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Dr(xr,e);n&&delete xr[e],_r(t,e,r),n&&t!==xr&&_r(xr,e,n)}:_r,Hr=function(t,e){var r=qr[t]=Ye(Ir);return Tr(r,{type:"Symbol",tag:t,description:e}),a||(r.description=e),r},Qr=function(t,e,r){t===xr&&Qr(Br,e,r),Rt(t);var n=dt(e);return Rt(r),nt(qr,n)?(r.enumerable?(nt(t,kr)&&t[kr][n]&&(t[kr][n]=!1),r=Ye(r,{enumerable:y(0,!1)})):(nt(t,kr)||_r(t,kr,y(1,{})),t[kr][n]=!0),Wr(t,n,r)):_r(t,n,r)},Jr=function(t,e){Rt(t);var r=k(e),n=xe(r).concat(Kr(r));return Er(n,(function(e){a&&!s(Yr,r,e)||Qr(t,e,r[e])})),t},Yr=function(t){var e=dt(t),r=s(Nr,this,e);return!(this===xr&&nt(qr,e)&&!nt(Br,e))&&(!(r||!nt(this,e)||!nt(qr,e)||nt(this,kr)&&this[kr][e])||r)},$r=function(t,e){var r=k(t),n=dt(e);if(r!==xr||!nt(qr,n)||nt(Br,n)){var o=Dr(r,n);return!o||!nt(qr,n)||nt(r,kr)&&r[kr][n]||(o.enumerable=!0),o}},Xr=function(t){var e=Mr(k(t)),r=[];return Er(e,(function(t){nt(qr,t)||nt(Wt,t)||Gr(r,t)})),r},Kr=function(t){var e=t===xr,r=Mr(e?Br:k(t)),n=[];return Er(r,(function(t){!nt(qr,t)||e&&!nt(xr,t)||Gr(n,qr[t])})),n};G||(Ir=(Fr=function(){if(I(Ir,this))throw Ur("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?qe(arguments[0]):void 0,e=at(t),r=function(t){this===xr&&s(r,Br,t),nt(this,kr)&&nt(this[kr],e)&&(this[kr][e]=!1),Wr(this,e,y(1,t))};return a&&Vr&&Wr(xr,e,{configurable:!0,set:r}),Hr(e,t)}).prototype,ee(Ir,"toString",(function(){return Ar(this).tag})),ee(Fr,"withoutSetter",(function(t){return Hr(at(t),t)})),h.f=Yr,At.f=Qr,Be.f=Jr,St.f=$r,ge.f=rr.f=Xr,be.f=Kr,nr.f=function(t){return Hr(pt(t),t)},a&&(_r(Ir,"description",{configurable:!0,get:function(){return Ar(this).description}}),ee(xr,"propertyIsEnumerable",Yr,{unsafe:!0}))),Ae({global:!0,constructor:!0,wrap:!0,forced:!G,sham:!G},{Symbol:Fr}),Er(xe(zr),(function(t){!function(t){var e=or.Symbol||(or.Symbol={});nt(e,t)||ir(e,t,{value:nr.f(t)})}(t)})),Ae({target:"Symbol",stat:!0,forced:!G},{useSetter:function(){Vr=!0},useSimple:function(){Vr=!1}}),Ae({target:"Object",stat:!0,forced:!G,sham:!a},{create:function(t,e){return void 0===e?Ye(t):Jr(Ye(t),e)},defineProperty:Qr,defineProperties:Jr,getOwnPropertyDescriptor:$r}),Ae({target:"Object",stat:!0,forced:!G},{getOwnPropertyNames:Xr}),function(){var t=F("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,n=pt("toPrimitive");e&&!e[n]&&ee(e,n,(function(t){return s(r,this)}),{arity:1})}(),cr(Fr,"Symbol"),Wt[kr]=!0;var Zr=G&&!!Symbol.for&&!!Symbol.keyFor,tn=Z("string-to-symbol-registry"),en=Z("symbol-to-string-registry");Ae({target:"Symbol",stat:!0,forced:!Zr},{for:function(t){var e=qe(t);if(nt(tn,e))return tn[e];var r=F("Symbol")(e);return tn[e]=r,en[r]=e,r}});var rn=Z("symbol-to-string-registry");Ae({target:"Symbol",stat:!0,forced:!Zr},{keyFor:function(t){if(!z(t))throw TypeError(W(t)+" is not a symbol");if(nt(rn,t))return rn[t]}});var nn=Function.prototype,on=nn.apply,un=nn.call,an="object"==typeof Reflect&&Reflect.apply||(c?un.bind(on):function(){return un.apply(on,arguments)}),cn=m([].slice),fn=F("JSON","stringify"),sn=m(/./.exec),ln=m("".charAt),pn=m("".charCodeAt),hn=m("".replace),yn=m(1..toString),vn=/[\uD800-\uDFFF]/g,dn=/^[\uD800-\uDBFF]$/,gn=/^[\uDC00-\uDFFF]$/,bn=!G||u((function(){var t=F("Symbol")();return"[null]"!=fn([t])||"{}"!=fn({a:t})||"{}"!=fn(Object(t))})),mn=u((function(){return'"\\udf06\\ud834"'!==fn("\udf06\ud834")||'"\\udead"'!==fn("\udead")})),On=function(t,e){var r=cn(arguments),n=e;if((A(e)||void 0!==t)&&!z(t))return lr(e)||(e=function(t,e){if(T(n)&&(e=s(n,this,t,e)),!z(e))return e}),r[1]=e,an(fn,null,r)},wn=function(t,e,r){var n=ln(r,e-1),o=ln(r,e+1);return sn(dn,t)&&!sn(gn,o)||sn(gn,t)&&!sn(dn,n)?"\\u"+yn(pn(t,0),16):t};fn&&Ae({target:"JSON",stat:!0,arity:3,forced:bn||mn},{stringify:function(t,e,r){var n=cn(arguments),o=an(bn?On:fn,null,n);return mn&&"string"==typeof o?hn(o,vn,wn):o}});var Sn=!G||u((function(){be.f(1)}));Ae({target:"Object",stat:!0,forced:Sn},{getOwnPropertySymbols:function(t){var e=be.f;return e?e(et(t)):[]}});var jn,Pn=pt("species"),Ln=Rr.filter,Rn=(jn="filter",N>=51||!u((function(){var t=[];return(t.constructor={})[Pn]=function(){return{foo:1}},1!==t[jn](Boolean).foo})));Ae({target:"Array",proto:!0,forced:!Rn},{filter:function(t){return Ln(this,t,arguments.length>1?arguments[1]:void 0)}});var En=Ce?{}.toString:function(){return"[object "+Ne(this)+"]"};Ce||ee(Object.prototype,"toString",En,{unsafe:!0});var kn=St.f,Tn=u((function(){kn(1)}));Ae({target:"Object",stat:!0,forced:!a||Tn,sham:!a},{getOwnPropertyDescriptor:function(t,e){return kn(k(t),e)}});var An={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},xn=mt("span").classList,Fn=xn&&xn.constructor&&xn.constructor.prototype,In=Fn===Object.prototype?void 0:Fn,Un=Rr.forEach,Cn=function(t,e){var r=[][t];return!!r&&u((function(){r.call(null,e||function(){return 1},1)}))}("forEach")?[].forEach:function(t){return Un(this,t,arguments.length>1?arguments[1]:void 0)},Dn=function(t){if(t&&t.forEach!==Cn)try{xt(t,"forEach",Cn)}catch(e){t.forEach=Cn}};for(var _n in An)An[_n]&&Dn(i[_n]&&i[_n].prototype);Dn(In),Ae({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(t){for(var e,r,n=k(t),o=St.f,i=Oe(n),u={},a=0;i.length>a;)void 0!==(r=o(n,e=i[a++]))&&$e(u,e,r);return u}});var Mn=Be.f;Ae({target:"Object",stat:!0,forced:Object.defineProperties!==Mn,sham:!a},{defineProperties:Mn});var Nn=At.f;Ae({target:"Object",stat:!0,forced:Object.defineProperty!==Nn,sham:!a},{defineProperty:Nn});var Gn=At.f,qn=pt("unscopables"),Bn=Array.prototype;null==Bn[qn]&&Gn(Bn,qn,{configurable:!0,value:Ye(null)});var zn,Vn,Wn,Hn=function(t){Bn[qn][t]=!0},Qn={},Jn=!u((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Yn=Vt("IE_PROTO"),$n=Object,Xn=$n.prototype,Kn=Jn?$n.getPrototypeOf:function(t){var e=et(t);if(nt(e,Yn))return e[Yn];var r=e.constructor;return T(r)&&e instanceof r?r.prototype:e instanceof $n?Xn:null},Zn=pt("iterator"),to=!1;[].keys&&("next"in(Wn=[].keys())?(Vn=Kn(Kn(Wn)))!==Object.prototype&&(zn=Vn):to=!0),(null==zn||u((function(){var t={};return zn[Zn].call(t)!==t})))&&(zn={}),T(zn[Zn])||ee(zn,Zn,(function(){return this}));var eo={IteratorPrototype:zn,BUGGY_SAFARI_ITERATORS:to},ro=eo.IteratorPrototype,no=function(){return this},oo=function(t,e,r,n){var o=e+" Iterator";return t.prototype=Ye(ro,{next:y(+!n,r)}),cr(t,o,!1),Qn[o]=no,t},io=String,uo=TypeError,ao=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=m(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Rt(r),function(t){if("object"==typeof t||T(t))return t;throw uo("Can't set "+io(t)+" as a prototype")}(n),e?t(r,n):r.__proto__=n,r}}():void 0),co=Ct.PROPER,fo=Ct.CONFIGURABLE,so=eo.IteratorPrototype,lo=eo.BUGGY_SAFARI_ITERATORS,po=pt("iterator"),ho=function(){return this},yo=function(t,e,r,n,o,i,u){oo(r,e,n);var a,c,f,l=function(t){if(t===o&&d)return d;if(!lo&&t in y)return y[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},p=e+" Iterator",h=!1,y=t.prototype,v=y[po]||y["@@iterator"]||o&&y[o],d=!lo&&v||l(o),g="Array"==e&&y.entries||v;if(g&&(a=Kn(g.call(new t)))!==Object.prototype&&a.next&&(Kn(a)!==so&&(ao?ao(a,so):T(a[po])||ee(a,po,ho)),cr(a,p,!0)),co&&"values"==o&&v&&"values"!==v.name&&(fo?xt(y,"name","values"):(h=!0,d=function(){return s(v,this)})),o)if(c={values:l("values"),keys:i?d:l("keys"),entries:l("entries")},u)for(f in c)(lo||h||!(f in y))&&ee(y,f,c[f]);else Ae({target:e,proto:!0,forced:lo||h},c);return y[po]!==d&&ee(y,po,d,{name:o}),Qn[e]=d,c},vo=At.f,go=Zt.set,bo=Zt.getterFor("Array Iterator"),mo=yo(Array,"Array",(function(t,e){go(this,{type:"Array Iterator",target:k(t),index:0,kind:e})}),(function(){var t=bo(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),Oo=Qn.Arguments=Qn.Array;if(Hn("keys"),Hn("values"),Hn("entries"),a&&"values"!==Oo.name)try{vo(Oo,"name",{value:"values"})}catch(t){}var wo=m("".charAt),So=m("".charCodeAt),jo=m("".slice),Po=function(t){return function(e,r){var n,o,i=qe(E(e)),u=ie(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=So(i,u))<55296||n>56319||u+1===a||(o=So(i,u+1))<56320||o>57343?t?wo(i,u):n:t?jo(i,u,u+2):o-56320+(n-55296<<10)+65536}},Lo={codeAt:Po(!1),charAt:Po(!0)}.charAt,Ro=Zt.set,Eo=Zt.getterFor("String Iterator");yo(String,"String",(function(t){Ro(this,{type:"String Iterator",string:qe(t),index:0})}),(function(){var t,e=Eo(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Lo(r,n),e.index+=t.length,{value:t,done:!1})}));var ko=pt("iterator"),To=pt("toStringTag"),Ao=mo.values,xo=function(t,e){if(t){if(t[ko]!==Ao)try{xt(t,ko,Ao)}catch(e){t[ko]=Ao}if(t[To]||xt(t,To,e),An[e])for(var r in mo)if(t[r]!==mo[r])try{xt(t,r,mo[r])}catch(e){t[r]=mo[r]}}};for(var Fo in An)xo(i[Fo]&&i[Fo].prototype,Fo);xo(In,"DOMTokenList");var Io=pt("iterator"),Uo=!u((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[Io]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),Co=TypeError,Do=function(t,e){if(I(e,t))return t;throw Co("Incorrect invocation")},_o=pt("iterator"),Mo=function(t){if(null!=t)return J(t,_o)||J(t,"@@iterator")||Qn[Ne(t)]},No=TypeError,Go=function(t,e){var r=arguments.length<2?Mo(t):e;if(Q(r))return Rt(s(r,t));throw No(W(t)+" is not iterable")},qo=TypeError,Bo=function(t,e){if(t<e)throw qo("Not enough arguments");return t},zo=Math.floor,Vo=function(t,e){var r=t.length,n=zo(r/2);return r<8?Wo(t,e):Ho(t,Vo(Ze(t,0,n),e),Vo(Ze(t,n),e),e)},Wo=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},Ho=function(t,e,r,n){for(var o=e.length,i=r.length,u=0,a=0;u<o||a<i;)t[u+a]=u<o&&a<i?n(e[u],r[a])<=0?e[u++]:r[a++]:u<o?e[u++]:r[a++];return t},Qo=Vo,Jo=pt("iterator"),Yo=Zt.set,$o=Zt.getterFor("URLSearchParams"),Xo=Zt.getterFor("URLSearchParamsIterator"),Ko=Object.getOwnPropertyDescriptor,Zo=function(t){if(!a)return i[t];var e=Ko(i,t);return e&&e.value},ti=Zo("fetch"),ei=Zo("Request"),ri=Zo("Headers"),ni=ei&&ei.prototype,oi=ri&&ri.prototype,ii=i.RegExp,ui=i.TypeError,ai=i.decodeURIComponent,ci=i.encodeURIComponent,fi=m("".charAt),si=m([].join),li=m([].push),pi=m("".replace),hi=m([].shift),yi=m([].splice),vi=m("".split),di=m("".slice),gi=/\+/g,bi=Array(4),mi=function(t){return bi[t-1]||(bi[t-1]=ii("((?:%[\\da-f]{2}){"+t+"})","gi"))},Oi=function(t){try{return ai(t)}catch(e){return t}},wi=function(t){var e=pi(t,gi," "),r=4;try{return ai(e)}catch(t){for(;r;)e=pi(e,mi(r--),Oi);return e}},Si=/[!'()~]|%20/g,ji={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Pi=function(t){return ji[t]},Li=function(t){return pi(ci(t),Si,Pi)},Ri=oo((function(t,e){Yo(this,{type:"URLSearchParamsIterator",iterator:Go($o(t).entries),kind:e})}),"Iterator",(function(){var t=Xo(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r}),!0),Ei=function(t){this.entries=[],this.url=null,void 0!==t&&(A(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===fi(t,0)?di(t,1):t:qe(t)))};Ei.prototype={type:"URLSearchParams",bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,o,i,u,a,c=Mo(t);if(c)for(r=(e=Go(t,c)).next;!(n=s(r,e)).done;){if(i=(o=Go(Rt(n.value))).next,(u=s(i,o)).done||(a=s(i,o)).done||!s(i,o).done)throw ui("Expected sequence with length 2");li(this.entries,{key:qe(u.value),value:qe(a.value)})}else for(var f in t)nt(t,f)&&li(this.entries,{key:f,value:qe(t[f])})},parseQuery:function(t){if(t)for(var e,r,n=vi(t,"&"),o=0;o<n.length;)(e=n[o++]).length&&(r=vi(e,"="),li(this.entries,{key:wi(hi(r)),value:wi(si(r,"="))}))},serialize:function(){for(var t,e=this.entries,r=[],n=0;n<e.length;)t=e[n++],li(r,Li(t.key)+"="+Li(t.value));return si(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ki=function(){Do(this,Ti);var t=arguments.length>0?arguments[0]:void 0;Yo(this,new Ei(t))},Ti=ki.prototype;if(function(t,e,r){for(var n in e)ee(t,n,e[n],r)}(Ti,{append:function(t,e){Bo(arguments.length,2);var r=$o(this);li(r.entries,{key:qe(t),value:qe(e)}),r.updateURL()},delete:function(t){Bo(arguments.length,1);for(var e=$o(this),r=e.entries,n=qe(t),o=0;o<r.length;)r[o].key===n?yi(r,o,1):o++;e.updateURL()},get:function(t){Bo(arguments.length,1);for(var e=$o(this).entries,r=qe(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){Bo(arguments.length,1);for(var e=$o(this).entries,r=qe(t),n=[],o=0;o<e.length;o++)e[o].key===r&&li(n,e[o].value);return n},has:function(t){Bo(arguments.length,1);for(var e=$o(this).entries,r=qe(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){Bo(arguments.length,1);for(var r,n=$o(this),o=n.entries,i=!1,u=qe(t),a=qe(e),c=0;c<o.length;c++)(r=o[c]).key===u&&(i?yi(o,c--,1):(i=!0,r.value=a));i||li(o,{key:u,value:a}),n.updateURL()},sort:function(){var t=$o(this);Qo(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=$o(this).entries,n=sr(t,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new Ri(this,"keys")},values:function(){return new Ri(this,"values")},entries:function(){return new Ri(this,"entries")}},{enumerable:!0}),ee(Ti,Jo,Ti.entries,{name:"entries"}),ee(Ti,"toString",(function(){return $o(this).serialize()}),{enumerable:!0}),cr(ki,"URLSearchParams"),Ae({global:!0,constructor:!0,forced:!Uo},{URLSearchParams:ki}),!Uo&&T(ri)){var Ai=m(oi.has),xi=m(oi.set),Fi=function(t){if(A(t)){var e,r=t.body;if("URLSearchParams"===Ne(r))return e=t.headers?new ri(t.headers):new ri,Ai(e,"content-type")||xi(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ye(t,{body:y(0,qe(r)),headers:y(0,e)})}return t};if(T(ti)&&Ae({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return ti(t,arguments.length>1?Fi(arguments[1]):{})}}),T(ei)){var Ii=function(t){return Do(this,ni),new ei(t,arguments.length>1?Fi(arguments[1]):{})};ni.constructor=Ii,Ii.prototype=ni,Ae({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ii})}}function Ui(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ci(t,e,r){return e&&Ui(t.prototype,e),r&&Ui(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Di(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Mi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_i(Object(r),!0).forEach((function(e){Di(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Ni=Ci((function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Di(this,"baseUri",void 0),Di(this,"proxy",void 0),Di(this,"headers",void 0),Di(this,"parameters",void 0),Di(this,"fetchOptions",void 0),Di(this,"fetch",void 0),Di(this,"transformRequest",void 0),Di(this,"throwOnBadResponse",void 0),this.headers=Mi({},e.headers),this.parameters=Mi({},e.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Mi({credentials:"omit"},e.fetchOptions),this.transformRequest=e.transformRequest||t.defaults.transformRequest,this.fetch=e.fetch,e.baseUri&&(this.baseUri=e.baseUri),e.proxy&&(this.proxy=e.proxy),this.throwOnBadResponse=!!e.throwOnBadResponse}));Di(Ni,"defaults",{transformRequest:function(t,e){switch(e["Content-Type"]){case"application/json":return JSON.stringify(t);case"application/x-www-form-urlencoded":return new URLSearchParams(t);default:return t}}});export{Ni as default};
|
package/lib/helpers.cjs.d.ts
CHANGED
|
@@ -81,6 +81,7 @@ type BrowserRequestInit = RequestInit;
|
|
|
81
81
|
* Using the right properties in the right context is left to the user.
|
|
82
82
|
*/
|
|
83
83
|
type FetchOptions = NodeRequestInit & BrowserRequestInit;
|
|
84
|
+
type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
|
|
84
85
|
/**
|
|
85
86
|
* Base options that can be passed to the `ClientConfig` class.
|
|
86
87
|
*/
|
|
@@ -92,12 +93,12 @@ interface ClientConfigInit<Params extends BaseUriParameters> {
|
|
|
92
93
|
};
|
|
93
94
|
parameters: Params;
|
|
94
95
|
fetchOptions?: FetchOptions;
|
|
96
|
+
fetch?: FetchFunction;
|
|
95
97
|
transformRequest?: (data: unknown, headers: {
|
|
96
98
|
[key: string]: string;
|
|
97
99
|
}) => Required<FetchOptions>["body"];
|
|
98
100
|
throwOnBadResponse?: boolean;
|
|
99
101
|
}
|
|
100
|
-
type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
|
|
101
102
|
/**
|
|
102
103
|
* Configuration parameters common to Commerce SDK clients
|
|
103
104
|
*/
|
|
@@ -109,23 +110,22 @@ declare class ClientConfig<Params extends BaseUriParameters> implements ClientCo
|
|
|
109
110
|
};
|
|
110
111
|
parameters: Params;
|
|
111
112
|
fetchOptions: FetchOptions;
|
|
113
|
+
fetch?: FetchFunction;
|
|
112
114
|
transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
|
|
113
115
|
throwOnBadResponse: boolean;
|
|
114
116
|
constructor(config: ClientConfigInit<Params>);
|
|
115
117
|
static readonly defaults: Pick<Required<ClientConfigInit<never>>, "transformRequest">;
|
|
116
118
|
}
|
|
117
|
-
/*
|
|
118
|
-
* Copyright (c) 2022, Salesforce, Inc.
|
|
119
|
-
* All rights reserved.
|
|
120
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
121
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
122
|
-
*/
|
|
123
119
|
declare const isBrowser: boolean;
|
|
124
120
|
declare const isNode: boolean;
|
|
125
121
|
declare const globalObject: typeof globalThis;
|
|
126
122
|
declare const hasFetchAvailable: boolean;
|
|
127
|
-
// TODO:
|
|
128
|
-
//
|
|
123
|
+
// TODO: Adopt native fetch in the next major version.
|
|
124
|
+
// Using the built-in fetch (Node 18+) caused downstream unit tests that rely on
|
|
125
|
+
// `nock` to fail because `nock` hooks into the core HTTP/HTTPS modules, while
|
|
126
|
+
// the native fetch implementation leverages undici instead. Until we can roll
|
|
127
|
+
// out a coordinated breaking change, we continue to use the node-fetch
|
|
128
|
+
// polyfill so existing tests keep passing.
|
|
129
129
|
declare const fetch: FetchFunction;
|
|
130
130
|
/**
|
|
131
131
|
* Grant Type
|