@bdky/aaas-pilot-kit 1.0.4 → 1.0.5

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.
Files changed (26) hide show
  1. package/dist/http.cjs.js +1 -1
  2. package/dist/http.esm.js +1 -1
  3. package/dist/http.umd.js +1 -1
  4. package/dist/index.cjs.js +30 -21
  5. package/dist/index.esm.js +29 -20
  6. package/dist/index.umd.js +30 -21
  7. package/dist/ky-aaas-pilot-kit.umd.js +30 -21
  8. package/dist/libs/aaas-pilot-kit/src/index.d.ts +2 -0
  9. package/dist/libs/aaas-pilot-kit/src/lib/controller.d.ts +40 -2
  10. package/dist/libs/aaas-pilot-kit/src/lib/error/codes.d.ts +6 -0
  11. package/dist/libs/aaas-pilot-kit/src/lib/error/services/AsrError.d.ts +18 -0
  12. package/dist/libs/aaas-pilot-kit/src/lib/service/agent/agentResponse.d.ts +174 -0
  13. package/dist/libs/aaas-pilot-kit/src/lib/service/agent/aiobAgentService.d.ts +1 -1
  14. package/dist/libs/aaas-pilot-kit/src/lib/service/agent/baseAgentService.d.ts +20 -2
  15. package/dist/libs/aaas-pilot-kit/src/lib/service/agent/cspAgentService.d.ts +1 -1
  16. package/dist/libs/aaas-pilot-kit/src/lib/service/digital-human/BaseDigitalHumanService.d.ts +16 -0
  17. package/dist/libs/aaas-pilot-kit/src/lib/service/digital-human/CloudDigitalHumanService.d.ts +12 -0
  18. package/dist/libs/aaas-pilot-kit/src/lib/service/digital-human/CloudNativeDigitalHumanService.d.ts +134 -0
  19. package/dist/libs/aaas-pilot-kit/src/lib/service/digital-human/PictureClientDigitalHumanService.d.ts +18 -0
  20. package/dist/libs/aaas-pilot-kit/src/lib/service/rtc-asr/asr/baseAsrService.d.ts +38 -3
  21. package/dist/libs/aaas-pilot-kit/src/lib/service/rtc-asr/asr/brtcAsrService.d.ts +2 -2
  22. package/dist/libs/aaas-pilot-kit/src/lib/utils/AudioDeviceDetector.d.ts +138 -0
  23. package/dist/libs/aaas-pilot-kit/src/lib/utils/agentResponseHelper.d.ts +42 -0
  24. package/dist/libs/aaas-pilot-kit/src/lib/utils/language-mapper.d.ts +70 -0
  25. package/dist/libs/aaas-pilot-kit/src/types/config.d.ts +175 -21
  26. package/package.json +7 -4
package/dist/http.umd.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see http.umd.js.LICENSE.txt */
2
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.KyDigitalHuman=o():e.KyDigitalHuman=o()}(globalThis,()=>(()=>{"use strict";var e={"../../node_modules/core-js/internals/a-callable.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/is-callable.js"),r=n("../../node_modules/core-js/internals/try-to-string.js"),s=TypeError;e.exports=function(e){if(t(e))return e;throw new s(r(e)+" is not a function")}},"../../node_modules/core-js/internals/a-possible-prototype.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/is-possible-prototype.js"),r=String,s=TypeError;e.exports=function(e){if(t(e))return e;throw new s("Can't set "+r(e)+" as a prototype")}},"../../node_modules/core-js/internals/add-to-unscopables.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/well-known-symbol.js"),r=n("../../node_modules/core-js/internals/object-create.js"),s=n("../../node_modules/core-js/internals/object-define-property.js").f,i=t("unscopables"),l=Array.prototype;void 0===l[i]&&s(l,i,{configurable:!0,value:r(null)}),e.exports=function(e){l[i][e]=!0}},"../../node_modules/core-js/internals/an-object.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/is-object.js"),r=String,s=TypeError;e.exports=function(e){if(t(e))return e;throw new s(r(e)+" is not an object")}},"../../node_modules/core-js/internals/array-buffer-basic-detection.js":function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},"../../node_modules/core-js/internals/array-buffer-view-core.js":function(e,o,n){var t,r,s,i=n("../../node_modules/core-js/internals/array-buffer-basic-detection.js"),l=n("../../node_modules/core-js/internals/descriptors.js"),a=n("../../node_modules/core-js/internals/global-this.js"),u=n("../../node_modules/core-js/internals/is-callable.js"),c=n("../../node_modules/core-js/internals/is-object.js"),d=n("../../node_modules/core-js/internals/has-own-property.js"),j=n("../../node_modules/core-js/internals/classof.js"),f=n("../../node_modules/core-js/internals/try-to-string.js"),p=n("../../node_modules/core-js/internals/create-non-enumerable-property.js"),m=n("../../node_modules/core-js/internals/define-built-in.js"),y=n("../../node_modules/core-js/internals/define-built-in-accessor.js"),h=n("../../node_modules/core-js/internals/object-is-prototype-of.js"),_=n("../../node_modules/core-js/internals/object-get-prototype-of.js"),b=n("../../node_modules/core-js/internals/object-set-prototype-of.js"),g=n("../../node_modules/core-js/internals/well-known-symbol.js"),v=n("../../node_modules/core-js/internals/uid.js"),w=n("../../node_modules/core-js/internals/internal-state.js"),x=w.enforce,T=w.get,R=a.Int8Array,O=R&&R.prototype,S=a.Uint8ClampedArray,A=S&&S.prototype,E=R&&_(R),P=O&&_(O),k=Object.prototype,q=a.TypeError,C=g("toStringTag"),I=v("TYPED_ARRAY_TAG"),U="TypedArrayConstructor",D=i&&!!b&&"Opera"!==j(a.opera),F=!1,L={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},N={BigInt64Array:8,BigUint64Array:8},M=function(e){var o=_(e);if(c(o)){var n=T(o);return n&&d(n,U)?n[U]:M(o)}},B=function(e){if(!c(e))return!1;var o=j(e);return d(L,o)||d(N,o)};for(t in L)(s=(r=a[t])&&r.prototype)?x(s)[U]=r:D=!1;for(t in N)(s=(r=a[t])&&r.prototype)&&(x(s)[U]=r);if((!D||!u(E)||E===Function.prototype)&&(E=function(){throw new q("Incorrect invocation")},D))for(t in L)a[t]&&b(a[t],E);if((!D||!P||P===k)&&(P=E.prototype,D))for(t in L)a[t]&&b(a[t].prototype,P);if(D&&_(A)!==P&&b(A,P),l&&!d(P,C))for(t in F=!0,y(P,C,{configurable:!0,get:function(){return c(this)?this[I]:void 0}}),L)a[t]&&p(a[t],I,t);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_TAG:F&&I,aTypedArray:function(e){if(B(e))return e;throw new q("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!b||h(E,e)))return e;throw new q(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,o,n,t){if(l){if(n)for(var r in L){var s=a[r];if(s&&d(s.prototype,e))try{delete s.prototype[e]}catch(n){try{s.prototype[e]=o}catch(e){}}}(!P[e]||n)&&m(P,e,n?o:D&&O[e]||o,t)}},exportTypedArrayStaticMethod:function(e,o,n){var t,r;if(l){if(b){if(n){for(t in L)if((r=a[t])&&d(r,e))try{delete r[e]}catch(e){}}if(E[e]&&!n)return;try{return m(E,e,n?o:D&&E[e]||o)}catch(e){}}for(t in L)(r=a[t])&&(!r[e]||n)&&m(r,e,o)}},getTypedArrayConstructor:M,isView:function(e){if(!c(e))return!1;var o=j(e);return"DataView"===o||d(L,o)||d(N,o)},isTypedArray:B,TypedArray:E,TypedArrayPrototype:P}},"../../node_modules/core-js/internals/array-includes.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/to-indexed-object.js"),r=n("../../node_modules/core-js/internals/to-absolute-index.js"),s=n("../../node_modules/core-js/internals/length-of-array-like.js"),i=function(e){return function(o,n,i){var l,a=t(o),u=s(a);if(0===u)return!e&&-1;var c=r(i,u);if(e&&n!=n){for(;u>c;)if((l=a[c++])!=l)return!0}else for(;u>c;c++)if((e||c in a)&&a[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},"../../node_modules/core-js/internals/classof-raw.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-uncurry-this.js"),r=t({}.toString),s=t("".slice);e.exports=function(e){return s(r(e),8,-1)}},"../../node_modules/core-js/internals/classof.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/to-string-tag-support.js"),r=n("../../node_modules/core-js/internals/is-callable.js"),s=n("../../node_modules/core-js/internals/classof-raw.js"),i=n("../../node_modules/core-js/internals/well-known-symbol.js")("toStringTag"),l=Object,a="Arguments"===s(function(){return arguments}()),u=function(e,o){try{return e[o]}catch(e){}};e.exports=t?s:function(e){var o,n,t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=u(o=l(e),i))?n:a?s(o):"Object"===(t=s(o))&&r(o.callee)?"Arguments":t}},"../../node_modules/core-js/internals/copy-constructor-properties.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/has-own-property.js"),r=n("../../node_modules/core-js/internals/own-keys.js"),s=n("../../node_modules/core-js/internals/object-get-own-property-descriptor.js"),i=n("../../node_modules/core-js/internals/object-define-property.js");e.exports=function(e,o,n){for(var l=r(o),a=i.f,u=s.f,c=0;c<l.length;c++){var d=l[c];t(e,d)||n&&t(n,d)||a(e,d,u(o,d))}}},"../../node_modules/core-js/internals/correct-prototype-getter.js":function(e,o,n){e.exports=!n("../../node_modules/core-js/internals/fails.js")(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},"../../node_modules/core-js/internals/create-non-enumerable-property.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/descriptors.js"),r=n("../../node_modules/core-js/internals/object-define-property.js"),s=n("../../node_modules/core-js/internals/create-property-descriptor.js");e.exports=t?function(e,o,n){return r.f(e,o,s(1,n))}:function(e,o,n){return e[o]=n,e}},"../../node_modules/core-js/internals/create-property-descriptor.js":function(e){e.exports=function(e,o){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:o}}},"../../node_modules/core-js/internals/define-built-in-accessor.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/make-built-in.js"),r=n("../../node_modules/core-js/internals/object-define-property.js");e.exports=function(e,o,n){return n.get&&t(n.get,o,{getter:!0}),n.set&&t(n.set,o,{setter:!0}),r.f(e,o,n)}},"../../node_modules/core-js/internals/define-built-in.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/is-callable.js"),r=n("../../node_modules/core-js/internals/object-define-property.js"),s=n("../../node_modules/core-js/internals/make-built-in.js"),i=n("../../node_modules/core-js/internals/define-global-property.js");e.exports=function(e,o,n,l){l||(l={});var a=l.enumerable,u=void 0!==l.name?l.name:o;if(t(n)&&s(n,u,l),l.global)a?e[o]=n:i(o,n);else{try{l.unsafe?e[o]&&(a=!0):delete e[o]}catch(e){}a?e[o]=n:r.f(e,o,{value:n,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return e}},"../../node_modules/core-js/internals/define-global-property.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/global-this.js"),r=Object.defineProperty;e.exports=function(e,o){try{r(t,e,{value:o,configurable:!0,writable:!0})}catch(n){t[e]=o}return o}},"../../node_modules/core-js/internals/descriptors.js":function(e,o,n){e.exports=!n("../../node_modules/core-js/internals/fails.js")(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},"../../node_modules/core-js/internals/document-create-element.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/global-this.js"),r=n("../../node_modules/core-js/internals/is-object.js"),s=t.document,i=r(s)&&r(s.createElement);e.exports=function(e){return i?s.createElement(e):{}}},"../../node_modules/core-js/internals/enum-bug-keys.js":function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"../../node_modules/core-js/internals/environment-user-agent.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/global-this.js").navigator,r=t&&t.userAgent;e.exports=r?String(r):""},"../../node_modules/core-js/internals/environment-v8-version.js":function(e,o,n){var t,r,s=n("../../node_modules/core-js/internals/global-this.js"),i=n("../../node_modules/core-js/internals/environment-user-agent.js"),l=s.process,a=s.Deno,u=l&&l.versions||a&&a.version,c=u&&u.v8;c&&(r=(t=c.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!r&&i&&(!(t=i.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=i.match(/Chrome\/(\d+)/))&&(r=+t[1]),e.exports=r},"../../node_modules/core-js/internals/export.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/global-this.js"),r=n("../../node_modules/core-js/internals/object-get-own-property-descriptor.js").f,s=n("../../node_modules/core-js/internals/create-non-enumerable-property.js"),i=n("../../node_modules/core-js/internals/define-built-in.js"),l=n("../../node_modules/core-js/internals/define-global-property.js"),a=n("../../node_modules/core-js/internals/copy-constructor-properties.js"),u=n("../../node_modules/core-js/internals/is-forced.js");e.exports=function(e,o){var n,c,d,j,f,p=e.target,m=e.global,y=e.stat;if(n=m?t:y?t[p]||l(p,{}):t[p]&&t[p].prototype)for(c in o){if(j=o[c],d=e.dontCallGetSet?(f=r(n,c))&&f.value:n[c],!u(m?c:p+(y?".":"#")+c,e.forced)&&void 0!==d){if(typeof j==typeof d)continue;a(j,d)}(e.sham||d&&d.sham)&&s(j,"sham",!0),i(n,c,j,e)}}},"../../node_modules/core-js/internals/fails.js":function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"../../node_modules/core-js/internals/function-bind-native.js":function(e,o,n){e.exports=!n("../../node_modules/core-js/internals/fails.js")(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},"../../node_modules/core-js/internals/function-call.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-bind-native.js"),r=Function.prototype.call;e.exports=t?r.bind(r):function(){return r.apply(r,arguments)}},"../../node_modules/core-js/internals/function-name.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/descriptors.js"),r=n("../../node_modules/core-js/internals/has-own-property.js"),s=Function.prototype,i=t&&Object.getOwnPropertyDescriptor,l=r(s,"name"),a=l&&(!t||t&&i(s,"name").configurable);e.exports={EXISTS:l,PROPER:l&&"something"===(function(){}).name,CONFIGURABLE:a}},"../../node_modules/core-js/internals/function-uncurry-this-accessor.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-uncurry-this.js"),r=n("../../node_modules/core-js/internals/a-callable.js");e.exports=function(e,o,n){try{return t(r(Object.getOwnPropertyDescriptor(e,o)[n]))}catch(e){}}},"../../node_modules/core-js/internals/function-uncurry-this.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-bind-native.js"),r=Function.prototype,s=r.call,i=t&&r.bind.bind(s,s);e.exports=t?i:function(e){return function(){return s.apply(e,arguments)}}},"../../node_modules/core-js/internals/get-built-in.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/global-this.js"),r=n("../../node_modules/core-js/internals/is-callable.js");e.exports=function(e,o){var n;return arguments.length<2?r(n=t[e])?n:void 0:t[e]&&t[e][o]}},"../../node_modules/core-js/internals/get-method.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/a-callable.js"),r=n("../../node_modules/core-js/internals/is-null-or-undefined.js");e.exports=function(e,o){var n=e[o];return r(n)?void 0:t(n)}},"../../node_modules/core-js/internals/global-this.js":function(e,o,n){var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof n.g&&n.g)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},"../../node_modules/core-js/internals/has-own-property.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-uncurry-this.js"),r=n("../../node_modules/core-js/internals/to-object.js"),s=t({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,o){return s(r(e),o)}},"../../node_modules/core-js/internals/hidden-keys.js":function(e){e.exports={}},"../../node_modules/core-js/internals/html.js":function(e,o,n){e.exports=n("../../node_modules/core-js/internals/get-built-in.js")("document","documentElement")},"../../node_modules/core-js/internals/ie8-dom-define.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/descriptors.js"),r=n("../../node_modules/core-js/internals/fails.js"),s=n("../../node_modules/core-js/internals/document-create-element.js");e.exports=!t&&!r(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},"../../node_modules/core-js/internals/indexed-object.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-uncurry-this.js"),r=n("../../node_modules/core-js/internals/fails.js"),s=n("../../node_modules/core-js/internals/classof-raw.js"),i=Object,l=t("".split);e.exports=r(function(){return!i("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?l(e,""):i(e)}:i},"../../node_modules/core-js/internals/inspect-source.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-uncurry-this.js"),r=n("../../node_modules/core-js/internals/is-callable.js"),s=n("../../node_modules/core-js/internals/shared-store.js"),i=t(Function.toString);r(s.inspectSource)||(s.inspectSource=function(e){return i(e)}),e.exports=s.inspectSource},"../../node_modules/core-js/internals/internal-state.js":function(e,o,n){var t,r,s,i=n("../../node_modules/core-js/internals/weak-map-basic-detection.js"),l=n("../../node_modules/core-js/internals/global-this.js"),a=n("../../node_modules/core-js/internals/is-object.js"),u=n("../../node_modules/core-js/internals/create-non-enumerable-property.js"),c=n("../../node_modules/core-js/internals/has-own-property.js"),d=n("../../node_modules/core-js/internals/shared-store.js"),j=n("../../node_modules/core-js/internals/shared-key.js"),f=n("../../node_modules/core-js/internals/hidden-keys.js"),p="Object already initialized",m=l.TypeError,y=l.WeakMap;if(i||d.state){var h=d.state||(d.state=new y);h.get=h.get,h.has=h.has,h.set=h.set,t=function(e,o){if(h.has(e))throw new m(p);return o.facade=e,h.set(e,o),o},r=function(e){return h.get(e)||{}},s=function(e){return h.has(e)}}else{var _=j("state");f[_]=!0,t=function(e,o){if(c(e,_))throw new m(p);return o.facade=e,u(e,_,o),o},r=function(e){return c(e,_)?e[_]:{}},s=function(e){return c(e,_)}}e.exports={set:t,get:r,has:s,enforce:function(e){return s(e)?r(e):t(e,{})},getterFor:function(e){return function(o){var n;if(!a(o)||(n=r(o)).type!==e)throw new m("Incompatible receiver, "+e+" required");return n}}}},"../../node_modules/core-js/internals/is-callable.js":function(e){var o="object"==typeof document&&document.all;e.exports=void 0===o&&void 0!==o?function(e){return"function"==typeof e||e===o}:function(e){return"function"==typeof e}},"../../node_modules/core-js/internals/is-forced.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/fails.js"),r=n("../../node_modules/core-js/internals/is-callable.js"),s=/#|\.prototype\./,i=function(e,o){var n=a[l(e)];return n===c||n!==u&&(r(o)?t(o):!!o)},l=i.normalize=function(e){return String(e).replace(s,".").toLowerCase()},a=i.data={},u=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},"../../node_modules/core-js/internals/is-null-or-undefined.js":function(e){e.exports=function(e){return null==e}},"../../node_modules/core-js/internals/is-object.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/is-callable.js");e.exports=function(e){return"object"==typeof e?null!==e:t(e)}},"../../node_modules/core-js/internals/is-possible-prototype.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/is-object.js");e.exports=function(e){return t(e)||null===e}},"../../node_modules/core-js/internals/is-pure.js":function(e){e.exports=!1},"../../node_modules/core-js/internals/is-symbol.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/get-built-in.js"),r=n("../../node_modules/core-js/internals/is-callable.js"),s=n("../../node_modules/core-js/internals/object-is-prototype-of.js"),i=n("../../node_modules/core-js/internals/use-symbol-as-uid.js"),l=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var o=t("Symbol");return r(o)&&s(o.prototype,l(e))}},"../../node_modules/core-js/internals/length-of-array-like.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/to-length.js");e.exports=function(e){return t(e.length)}},"../../node_modules/core-js/internals/make-built-in.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-uncurry-this.js"),r=n("../../node_modules/core-js/internals/fails.js"),s=n("../../node_modules/core-js/internals/is-callable.js"),i=n("../../node_modules/core-js/internals/has-own-property.js"),l=n("../../node_modules/core-js/internals/descriptors.js"),a=n("../../node_modules/core-js/internals/function-name.js").CONFIGURABLE,u=n("../../node_modules/core-js/internals/inspect-source.js"),c=n("../../node_modules/core-js/internals/internal-state.js"),d=c.enforce,j=c.get,f=String,p=Object.defineProperty,m=t("".slice),y=t("".replace),h=t([].join),_=l&&!r(function(){return 8!==p(function(){},"length",{value:8}).length}),b=String(String).split("String"),g=e.exports=function(e,o,n){"Symbol("===m(f(o),0,7)&&(o="["+y(f(o),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(o="get "+o),n&&n.setter&&(o="set "+o),(!i(e,"name")||a&&e.name!==o)&&(l?p(e,"name",{value:o,configurable:!0}):e.name=o),_&&n&&i(n,"arity")&&e.length!==n.arity&&p(e,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?l&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var t=d(e);return i(t,"source")||(t.source=h(b,"string"==typeof o?o:"")),e};Function.prototype.toString=g(function(){return s(this)&&j(this).source||u(this)},"toString")},"../../node_modules/core-js/internals/math-trunc.js":function(e){var o=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var t=+e;return(t>0?n:o)(t)}},"../../node_modules/core-js/internals/object-create.js":function(e,o,n){var t,r=n("../../node_modules/core-js/internals/an-object.js"),s=n("../../node_modules/core-js/internals/object-define-properties.js"),i=n("../../node_modules/core-js/internals/enum-bug-keys.js"),l=n("../../node_modules/core-js/internals/hidden-keys.js"),a=n("../../node_modules/core-js/internals/html.js"),u=n("../../node_modules/core-js/internals/document-create-element.js"),c=n("../../node_modules/core-js/internals/shared-key.js"),d="prototype",j="script",f=c("IE_PROTO"),p=function(){},m=function(e){return"<"+j+">"+e+"</"+j+">"},y=function(e){e.write(m("")),e.close();var o=e.parentWindow.Object;return e=null,o},h=function(){var e,o=u("iframe");return o.style.display="none",a.appendChild(o),o.src=String("java"+j+":"),(e=o.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F},_=function(){try{t=new ActiveXObject("htmlfile")}catch(e){}_="undefined"!=typeof document?document.domain&&t?y(t):h():y(t);for(var e=i.length;e--;)delete _[d][i[e]];return _()};l[f]=!0,e.exports=Object.create||function(e,o){var n;return null!==e?(p[d]=r(e),n=new p,p[d]=null,n[f]=e):n=_(),void 0===o?n:s.f(n,o)}},"../../node_modules/core-js/internals/object-define-properties.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/descriptors.js"),r=n("../../node_modules/core-js/internals/v8-prototype-define-bug.js"),s=n("../../node_modules/core-js/internals/object-define-property.js"),i=n("../../node_modules/core-js/internals/an-object.js"),l=n("../../node_modules/core-js/internals/to-indexed-object.js"),a=n("../../node_modules/core-js/internals/object-keys.js");o.f=t&&!r?Object.defineProperties:function(e,o){i(e);for(var n,t=l(o),r=a(o),u=r.length,c=0;u>c;)s.f(e,n=r[c++],t[n]);return e}},"../../node_modules/core-js/internals/object-define-property.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/descriptors.js"),r=n("../../node_modules/core-js/internals/ie8-dom-define.js"),s=n("../../node_modules/core-js/internals/v8-prototype-define-bug.js"),i=n("../../node_modules/core-js/internals/an-object.js"),l=n("../../node_modules/core-js/internals/to-property-key.js"),a=TypeError,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d="enumerable",j="configurable",f="writable";o.f=t?s?function(e,o,n){if(i(e),o=l(o),i(n),"function"==typeof e&&"prototype"===o&&"value"in n&&f in n&&!n[f]){var t=c(e,o);t&&t[f]&&(e[o]=n.value,n={configurable:j in n?n[j]:t[j],enumerable:d in n?n[d]:t[d],writable:!1})}return u(e,o,n)}:u:function(e,o,n){if(i(e),o=l(o),i(n),r)try{return u(e,o,n)}catch(e){}if("get"in n||"set"in n)throw new a("Accessors not supported");return"value"in n&&(e[o]=n.value),e}},"../../node_modules/core-js/internals/object-get-own-property-descriptor.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/descriptors.js"),r=n("../../node_modules/core-js/internals/function-call.js"),s=n("../../node_modules/core-js/internals/object-property-is-enumerable.js"),i=n("../../node_modules/core-js/internals/create-property-descriptor.js"),l=n("../../node_modules/core-js/internals/to-indexed-object.js"),a=n("../../node_modules/core-js/internals/to-property-key.js"),u=n("../../node_modules/core-js/internals/has-own-property.js"),c=n("../../node_modules/core-js/internals/ie8-dom-define.js"),d=Object.getOwnPropertyDescriptor;o.f=t?d:function(e,o){if(e=l(e),o=a(o),c)try{return d(e,o)}catch(e){}if(u(e,o))return i(!r(s.f,e,o),e[o])}},"../../node_modules/core-js/internals/object-get-own-property-names.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/object-keys-internal.js"),r=n("../../node_modules/core-js/internals/enum-bug-keys.js").concat("length","prototype");o.f=Object.getOwnPropertyNames||function(e){return t(e,r)}},"../../node_modules/core-js/internals/object-get-own-property-symbols.js":function(e,o){o.f=Object.getOwnPropertySymbols},"../../node_modules/core-js/internals/object-get-prototype-of.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/has-own-property.js"),r=n("../../node_modules/core-js/internals/is-callable.js"),s=n("../../node_modules/core-js/internals/to-object.js"),i=n("../../node_modules/core-js/internals/shared-key.js"),l=n("../../node_modules/core-js/internals/correct-prototype-getter.js"),a=i("IE_PROTO"),u=Object,c=u.prototype;e.exports=l?u.getPrototypeOf:function(e){var o=s(e);if(t(o,a))return o[a];var n=o.constructor;return r(n)&&o instanceof n?n.prototype:o instanceof u?c:null}},"../../node_modules/core-js/internals/object-is-prototype-of.js":function(e,o,n){e.exports=n("../../node_modules/core-js/internals/function-uncurry-this.js")({}.isPrototypeOf)},"../../node_modules/core-js/internals/object-keys-internal.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-uncurry-this.js"),r=n("../../node_modules/core-js/internals/has-own-property.js"),s=n("../../node_modules/core-js/internals/to-indexed-object.js"),i=n("../../node_modules/core-js/internals/array-includes.js").indexOf,l=n("../../node_modules/core-js/internals/hidden-keys.js"),a=t([].push);e.exports=function(e,o){var n,t=s(e),u=0,c=[];for(n in t)!r(l,n)&&r(t,n)&&a(c,n);for(;o.length>u;)r(t,n=o[u++])&&(~i(c,n)||a(c,n));return c}},"../../node_modules/core-js/internals/object-keys.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/object-keys-internal.js"),r=n("../../node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(e){return t(e,r)}},"../../node_modules/core-js/internals/object-property-is-enumerable.js":function(e,o){var n={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;o.f=t&&!n.call({1:2},1)?function(e){var o=t(this,e);return!!o&&o.enumerable}:n},"../../node_modules/core-js/internals/object-set-prototype-of.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-uncurry-this-accessor.js"),r=n("../../node_modules/core-js/internals/is-object.js"),s=n("../../node_modules/core-js/internals/require-object-coercible.js"),i=n("../../node_modules/core-js/internals/a-possible-prototype.js");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,o=!1,n={};try{(e=t(Object.prototype,"__proto__","set"))(n,[]),o=n instanceof Array}catch(e){}return function(n,t){return s(n),i(t),r(n)&&(o?e(n,t):n.__proto__=t),n}}():void 0)},"../../node_modules/core-js/internals/ordinary-to-primitive.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-call.js"),r=n("../../node_modules/core-js/internals/is-callable.js"),s=n("../../node_modules/core-js/internals/is-object.js"),i=TypeError;e.exports=function(e,o){var n,l;if("string"===o&&r(n=e.toString)&&!s(l=t(n,e))||r(n=e.valueOf)&&!s(l=t(n,e))||"string"!==o&&r(n=e.toString)&&!s(l=t(n,e)))return l;throw new i("Can't convert object to primitive value")}},"../../node_modules/core-js/internals/own-keys.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/get-built-in.js"),r=n("../../node_modules/core-js/internals/function-uncurry-this.js"),s=n("../../node_modules/core-js/internals/object-get-own-property-names.js"),i=n("../../node_modules/core-js/internals/object-get-own-property-symbols.js"),l=n("../../node_modules/core-js/internals/an-object.js"),a=r([].concat);e.exports=t("Reflect","ownKeys")||function(e){var o=s.f(l(e)),n=i.f;return n?a(o,n(e)):o}},"../../node_modules/core-js/internals/require-object-coercible.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/is-null-or-undefined.js"),r=TypeError;e.exports=function(e){if(t(e))throw new r("Can't call method on "+e);return e}},"../../node_modules/core-js/internals/shared-key.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/shared.js"),r=n("../../node_modules/core-js/internals/uid.js"),s=t("keys");e.exports=function(e){return s[e]||(s[e]=r(e))}},"../../node_modules/core-js/internals/shared-store.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/is-pure.js"),r=n("../../node_modules/core-js/internals/global-this.js"),s=n("../../node_modules/core-js/internals/define-global-property.js"),i="__core-js_shared__",l=e.exports=r[i]||s(i,{});(l.versions||(l.versions=[])).push({version:"3.44.0",mode:t?"pure":"global",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"})},"../../node_modules/core-js/internals/shared.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/shared-store.js");e.exports=function(e,o){return t[e]||(t[e]=o||{})}},"../../node_modules/core-js/internals/symbol-constructor-detection.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/environment-v8-version.js"),r=n("../../node_modules/core-js/internals/fails.js"),s=n("../../node_modules/core-js/internals/global-this.js").String;e.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41})},"../../node_modules/core-js/internals/to-absolute-index.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/to-integer-or-infinity.js"),r=Math.max,s=Math.min;e.exports=function(e,o){var n=t(e);return n<0?r(n+o,0):s(n,o)}},"../../node_modules/core-js/internals/to-indexed-object.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/indexed-object.js"),r=n("../../node_modules/core-js/internals/require-object-coercible.js");e.exports=function(e){return t(r(e))}},"../../node_modules/core-js/internals/to-integer-or-infinity.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/math-trunc.js");e.exports=function(e){var o=+e;return o!=o||0===o?0:t(o)}},"../../node_modules/core-js/internals/to-length.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/to-integer-or-infinity.js"),r=Math.min;e.exports=function(e){var o=t(e);return o>0?r(o,0x1fffffffffffff):0}},"../../node_modules/core-js/internals/to-object.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/require-object-coercible.js"),r=Object;e.exports=function(e){return r(t(e))}},"../../node_modules/core-js/internals/to-offset.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/to-positive-integer.js"),r=RangeError;e.exports=function(e,o){var n=t(e);if(n%o)throw new r("Wrong offset");return n}},"../../node_modules/core-js/internals/to-positive-integer.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/to-integer-or-infinity.js"),r=RangeError;e.exports=function(e){var o=t(e);if(o<0)throw new r("The argument can't be less than 0");return o}},"../../node_modules/core-js/internals/to-primitive.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-call.js"),r=n("../../node_modules/core-js/internals/is-object.js"),s=n("../../node_modules/core-js/internals/is-symbol.js"),i=n("../../node_modules/core-js/internals/get-method.js"),l=n("../../node_modules/core-js/internals/ordinary-to-primitive.js"),a=n("../../node_modules/core-js/internals/well-known-symbol.js"),u=TypeError,c=a("toPrimitive");e.exports=function(e,o){if(!r(e)||s(e))return e;var n,a=i(e,c);if(a){if(void 0===o&&(o="default"),!r(n=t(a,e,o))||s(n))return n;throw new u("Can't convert object to primitive value")}return void 0===o&&(o="number"),l(e,o)}},"../../node_modules/core-js/internals/to-property-key.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/to-primitive.js"),r=n("../../node_modules/core-js/internals/is-symbol.js");e.exports=function(e){var o=t(e,"string");return r(o)?o:o+""}},"../../node_modules/core-js/internals/to-string-tag-support.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/well-known-symbol.js")("toStringTag"),r={};r[t]="z",e.exports="[object z]"===String(r)},"../../node_modules/core-js/internals/try-to-string.js":function(e){var o=String;e.exports=function(e){try{return o(e)}catch(e){return"Object"}}},"../../node_modules/core-js/internals/uid.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/function-uncurry-this.js"),r=0,s=Math.random(),i=t(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++r+s,36)}},"../../node_modules/core-js/internals/use-symbol-as-uid.js":function(e,o,n){e.exports=n("../../node_modules/core-js/internals/symbol-constructor-detection.js")&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"../../node_modules/core-js/internals/v8-prototype-define-bug.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/descriptors.js"),r=n("../../node_modules/core-js/internals/fails.js");e.exports=t&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},"../../node_modules/core-js/internals/weak-map-basic-detection.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/global-this.js"),r=n("../../node_modules/core-js/internals/is-callable.js"),s=t.WeakMap;e.exports=r(s)&&/native code/.test(String(s))},"../../node_modules/core-js/internals/well-known-symbol.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/global-this.js"),r=n("../../node_modules/core-js/internals/shared.js"),s=n("../../node_modules/core-js/internals/has-own-property.js"),i=n("../../node_modules/core-js/internals/uid.js"),l=n("../../node_modules/core-js/internals/symbol-constructor-detection.js"),a=n("../../node_modules/core-js/internals/use-symbol-as-uid.js"),u=t.Symbol,c=r("wks"),d=a?u.for||u:u&&u.withoutSetter||i;e.exports=function(e){return s(c,e)||(c[e]=l&&s(u,e)?u[e]:d("Symbol."+e)),c[e]}},"../../node_modules/core-js/modules/es.array.includes.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/export.js"),r=n("../../node_modules/core-js/internals/array-includes.js").includes,s=n("../../node_modules/core-js/internals/fails.js"),i=n("../../node_modules/core-js/internals/add-to-unscopables.js");t({target:"Array",proto:!0,forced:s(function(){return![,].includes()})},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},"../../node_modules/core-js/modules/es.object.has-own.js":function(e,o,n){n("../../node_modules/core-js/internals/export.js")({target:"Object",stat:!0},{hasOwn:n("../../node_modules/core-js/internals/has-own-property.js")})},"../../node_modules/core-js/modules/es.typed-array.set.js":function(e,o,n){var t=n("../../node_modules/core-js/internals/global-this.js"),r=n("../../node_modules/core-js/internals/function-call.js"),s=n("../../node_modules/core-js/internals/array-buffer-view-core.js"),i=n("../../node_modules/core-js/internals/length-of-array-like.js"),l=n("../../node_modules/core-js/internals/to-offset.js"),a=n("../../node_modules/core-js/internals/to-object.js"),u=n("../../node_modules/core-js/internals/fails.js"),c=t.RangeError,d=t.Int8Array,j=d&&d.prototype,f=j&&j.set,p=s.aTypedArray,m=s.exportTypedArrayMethod,y=!u(function(){var e=new Uint8ClampedArray(2);return r(f,e,{length:1,0:3},1),3!==e[1]}),h=y&&s.NATIVE_ARRAY_BUFFER_VIEWS&&u(function(){var e=new d(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]});m("set",function(e){p(this);var o=l(arguments.length>1?arguments[1]:void 0,1),n=a(e);if(y)return r(f,this,n,o);var t=this.length,s=i(n),u=0;if(s+o>t)throw new c("Wrong length");for(;u<s;)this[o+u]=n[u++]},!y||h)}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var s=o[t]={exports:{}};return e[t].call(s.exports,s,s.exports,n),s.exports}n.d=(e,o)=>{for(var t in o)n.o(o,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},n.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};return(()=>{n.r(t),n.d(t,{TimeoutError:()=>r,ky:()=>q,sseHook:()=>e,HTTPError:()=>o});var e={};n.r(e),n.d(e,{createHook:()=>I}),n("../../node_modules/core-js/modules/es.object.has-own.js"),n("../../node_modules/core-js/modules/es.array.includes.js");class o extends Error{constructor(e,o,n){let t=e.status||0===e.status?e.status:"",r=e.statusText||"",s=`${t} ${r}`.trim();super(`Request failed with ${s?`status code ${s}`:"an unknown error"}: ${o.method} ${o.url}`),this.name="HTTPError",this.response=e,this.request=o,this.options=n}}class r extends Error{constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}n("../../node_modules/core-js/modules/es.typed-array.set.js");let s=(()=>{let e=!1,o=!1,n="function"==typeof globalThis.Request;if("function"==typeof globalThis.ReadableStream&&n)try{o=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(e){if(e instanceof Error&&"unsupported BodyInit type"===e.message)return!1;throw e}return e&&!o})(),i="function"==typeof globalThis.AbortController,l="function"==typeof globalThis.ReadableStream,a="function"==typeof globalThis.FormData,u=["get","post","put","patch","head","delete"],c={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},d=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,j=Symbol("stop"),f={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},p={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},m=e=>{if(!e)return 0;if(e instanceof FormData){let o=0;for(let[n,t]of e)o+=d,o+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,o+="string"==typeof t?new TextEncoder().encode(t).length:t.size;return o}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if("string"==typeof e)return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if("object"==typeof e&&null!==e)try{let o=JSON.stringify(e);return new TextEncoder().encode(o).length}catch{}return 0},y=(e,o)=>{let n=Number(e.headers.get("content-length"))||0,t=0;return 204===e.status?(o&&o({percent:1,totalBytes:n,transferredBytes:t},new Uint8Array),new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new Response(new ReadableStream({async start(r){let s=e.body.getReader();async function i(){let{done:e,value:l}=await s.read();if(e)return void r.close();o&&(t+=l.byteLength,o({percent:0===n?0:t/n,transferredBytes:t,totalBytes:n},l)),r.enqueue(l),await i()}o&&o({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array),await i()}}),{status:e.status,statusText:e.statusText,headers:e.headers})},h=(e,o)=>{let n=m(e.body),t=0;return new Request(e,{duplex:"half",body:new ReadableStream({async start(r){let s=e.body instanceof ReadableStream?e.body.getReader():new Response("").body.getReader();async function i(){let{done:e,value:l}=await s.read();if(e){o&&o({percent:1,transferredBytes:t,totalBytes:Math.max(n,t)},new Uint8Array),r.close();return}t+=l.byteLength;let a=0===n?0:t/n;(n<t||1===a)&&(a=.99),o&&o({percent:Number(a.toFixed(2)),transferredBytes:t,totalBytes:n},l),r.enqueue(l),await i()}await i()}})})},_=e=>null!==e&&"object"==typeof e,b=function(){for(var e=arguments.length,o=Array(e),n=0;n<e;n++)o[n]=arguments[n];for(let e of o)if((!_(e)||Array.isArray(e))&&void 0!==e)throw TypeError("The `options` argument must be an object");return x({},...o)},g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new globalThis.Headers(e),t=o instanceof globalThis.Headers;for(let[e,r]of new globalThis.Headers(o).entries())t&&"undefined"===r||void 0===r?n.delete(e):n.set(e,r);return n};function v(e,o,n){var t,r;return Object.hasOwn(o,n)&&void 0===o[n]?[]:x(null!=(t=e[n])?t:[],null!=(r=o[n])?r:[])}let w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{beforeRequest:v(e,o,"beforeRequest"),beforeRetry:v(e,o,"beforeRetry"),afterResponse:v(e,o,"afterResponse"),beforeError:v(e,o,"beforeError")}},x=function(){for(var e=arguments.length,o=Array(e),n=0;n<e;n++)o[n]=arguments[n];let t={},r={},s={};for(let e of o)if(Array.isArray(e))Array.isArray(t)||(t=[]),t=[...t,...e];else if(_(e)){for(let[o,n]of Object.entries(e))_(n)&&o in t&&(n=x(t[o],n)),t={...t,[o]:n};_(e.hooks)&&(s=w(s,e.hooks),t.hooks=s),_(e.headers)&&(r=g(r,e.headers),t.headers=r)}return t},T=e=>u.includes(e)?e.toUpperCase():e,R={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("number"==typeof e)return{...R,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw Error("retry.statusCodes must be an array");return{...R,...e}};async function S(e,o,n,t){return new Promise((s,i)=>{let l=setTimeout(()=>{n&&n.abort(),i(new r(e))},t.timeout);t.fetch(e,o).then(s).catch(i).then(()=>{clearTimeout(l)})})}async function A(e,o){let{signal:n}=o;return new Promise((o,t)=>{function r(){clearTimeout(s),t(n.reason)}n&&(n.throwIfAborted(),n.addEventListener("abort",r,{once:!0}));let s=setTimeout(()=>{null==n||n.removeEventListener("abort",r),o()},e)})}let E=(e,o)=>{let n={};for(let t in o)t in p||t in f||t in e||(n[t]=o[t]);return n};class P{static create(e,n){let t=new P(e,n),r=async()=>{if("number"==typeof t._options.timeout&&t._options.timeout>0x7fffffff)throw RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await t._fetch();for(let o of t._options.hooks.afterResponse){let n=await o(t.request,t._options,t._decorateResponse(e.clone()));n instanceof globalThis.Response&&(e=n)}if(t._decorateResponse(e),!e.ok&&t._options.throwHttpErrors){let n=new o(e,t.request,t._options);for(let e of t._options.hooks.beforeError)n=await e(n);throw n}if(t._options.onDownloadProgress){if("function"!=typeof t._options.onDownloadProgress)throw TypeError("The `onDownloadProgress` option must be a function");if(!l)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");return y(e.clone(),t._options.onDownloadProgress)}return e},s=(t._options.retry.methods.includes(t.request.method.toLowerCase())?t._retry(r):r()).finally(async()=>{if(!t.request.bodyUsed){var e;await (null==(e=t.request.body)?void 0:e.cancel())}});for(let[e,o]of Object.entries(c))s[e]=async()=>{t.request.headers.set("accept",t.request.headers.get("accept")||o);let r=await s;if("json"===e){if(204===r.status||0===(await r.clone().arrayBuffer()).byteLength)return"";if(n.parseJson)return n.parseJson(await r.text())}return r[e]()};return s}constructor(e,o={}){var n,t,r,l,u,c,d,j,f;if(this._retryCount=0,this._input=e,this._options={...o,headers:g(this._input.headers,o.headers),hooks:w({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},o.hooks),method:T(null!=(t=null!=(n=o.method)?n:this._input.method)?t:"GET"),prefixUrl:String(o.prefixUrl||""),retry:O(o.retry),throwHttpErrors:!1!==o.throwHttpErrors,timeout:null!=(r=o.timeout)?r:1e4,fetch:null!=(l=o.fetch)?l:globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(i){let e=null!=(u=this._options.signal)?u:this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=e?AbortSignal.any([e,this.abortController.signal]):this.abortController.signal}if(s&&(this._options.duplex="half"),void 0!==this._options.json&&(this._options.body=null!=(j=null==(c=(d=this._options).stringifyJson)?void 0:c.call(d,this._options.json))?j:JSON.stringify(this._options.json),this._options.headers.set("content-type",null!=(f=this._options.headers.get("content-type"))?f:"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let e="string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString(),o=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,"?"+e);(a&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(o,{...this.request}),this._options)}if(this._options.onUploadProgress){if("function"!=typeof this._options.onUploadProgress)throw TypeError("The `onUploadProgress` option must be a function");if(!s)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=h(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof r)throw e;if(e instanceof o){var n,t,s,i;if(!this._options.retry.statusCodes.includes(e.response.status))throw e;let o=null!=(s=null!=(t=null!=(n=e.response.headers.get("Retry-After"))?n:e.response.headers.get("RateLimit-Reset"))?t:e.response.headers.get("X-RateLimit-Reset"))?s:e.response.headers.get("X-Rate-Limit-Reset");if(o&&this._options.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(o);Number.isNaN(e)?e=Date.parse(o)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now());let n=null!=(i=this._options.retry.maxRetryAfter)?i:e;return e<n?e:n}if(413===e.response.status)throw e}let l=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,l)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(n){let o=Math.min(this._calculateRetryDelay(n),0x7fffffff);if(this._retryCount<1)throw n;for(let e of(await A(o,{signal:this._options.signal}),this._options.hooks.beforeRetry))if(await e({request:this.request,options:this._options,error:n,retryCount:this._retryCount})===j)return;return this._retry(e)}}async _fetch(){for(let e of this._options.hooks.beforeRequest){let o=await e(this.request,this._options);if(o instanceof Request){this.request=o;break}if(o instanceof Response)return o}let e=E(this.request,this._options),o=this.request;return(this.request=o.clone(),!1===this._options.timeout)?this._options.fetch(o,e):S(o,e,this.abortController,this._options)}}let k=e=>{let o=(o,n)=>P.create(o,b(e,n));for(let n of u)o[n]=(o,t)=>P.create(o,b(e,t,{method:n}));return o.create=e=>k(b(e)),o.extend=o=>("function"==typeof o&&(o=o(null!=e?e:{})),k(b(e,o))),o.stop=j,o},q=k(),C=[239,187,191],I=e=>async(o,n,t)=>{if(!t.ok||!t.body)return;let r=!1,s=o=>{var n;r||(r=!0,null==(n=e.onCompleted)||n.call(e,o))},i=t.body.getReader(),l=new TextDecoder("utf8"),a=function(e){let o,n,t,r,s,i,l;return a(),{feed:function(a){var u;n=n?n+a:a,o&&(u=n,C.every((e,o)=>u.charCodeAt(o)===e))&&(n=n.slice(C.length)),o=!1;let c=n.length,d=0,j=!1;for(;d<c;){let o;j&&("\n"===n[d]&&++d,j=!1);let a=-1,u=r;for(let e=t;a<0&&e<c;++e)":"===(o=n[e])&&u<0?u=e-d:"\r"===o?(j=!0,a=e-d):"\n"===o&&(a=e-d);if(a<0){t=c-d,r=u;break}t=0,r=-1,function(o,n,t,r){if(0===r){l.length>0&&(e({type:"event",id:s,event:i||void 0,data:l.slice(0,-1)}),l="",s=void 0),i=void 0;return}let a=t<0,u=o.slice(n,n+(a?r:t)),c=0;c=a?r:" "===o[n+t+1]?t+2:t+1;let d=n+c,j=r-c,f=o.slice(d,d+j).toString();if("data"===u)l+=f?"".concat(f,"\n"):"\n";else if("event"===u)i=f;else if("id"!==u||f.includes("\0")){if("retry"===u){let o=parseInt(f,10);Number.isNaN(o)||e({type:"reconnect-interval",value:o})}}else s=f}(n,d,u,a),d+=a+1}d===c?n="":d>0&&(n=n.slice(d))},reset:a};function a(){o=!0,n="",t=0,r=-1,s=void 0,i=void 0,l=""}}(o=>{var n,t,r;if("event"===o.type&&(null==(n=e.onMessage)||n.call(e,o)),"event"===o.type&&o.data)for(let n of(null==(t=e.onEvent)||t.call(e,o),o.data.split("\n")))e.onData(n);else"reconnect-interval"===o.type&&(null==(r=e.onReconnectInterval)||r.call(e,o.value))}),u=()=>{i.read().then(e=>{if(e.done)return void s();a.feed(l.decode(e.value,{stream:!0})),u()}).catch(n=>{var t;if(o.signal.aborted){null==(t=e.onAborted)||t.call(e);return}s(n)})};return u(),t}})(),t})());
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.KyDigitalHuman=t():e.KyDigitalHuman=t()}(globalThis,()=>(()=>{"use strict";var e={"../../node_modules/core-js/internals/a-callable.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/is-callable.js"),r=o("../../node_modules/core-js/internals/try-to-string.js"),s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not a function")}},"../../node_modules/core-js/internals/add-to-unscopables.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/well-known-symbol.js"),r=o("../../node_modules/core-js/internals/object-create.js"),s=o("../../node_modules/core-js/internals/object-define-property.js").f,i=n("unscopables"),l=Array.prototype;void 0===l[i]&&s(l,i,{configurable:!0,value:r(null)}),e.exports=function(e){l[i][e]=!0}},"../../node_modules/core-js/internals/an-object.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/is-object.js"),r=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not an object")}},"../../node_modules/core-js/internals/array-includes.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/to-indexed-object.js"),r=o("../../node_modules/core-js/internals/to-absolute-index.js"),s=o("../../node_modules/core-js/internals/length-of-array-like.js"),i=function(e){return function(t,o,i){var l,a=n(t),u=s(a);if(0===u)return!e&&-1;var c=r(i,u);if(e&&o!=o){for(;u>c;)if((l=a[c++])!=l)return!0}else for(;u>c;c++)if((e||c in a)&&a[c]===o)return e||c||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},"../../node_modules/core-js/internals/classof-raw.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/function-uncurry-this.js"),r=n({}.toString),s=n("".slice);e.exports=function(e){return s(r(e),8,-1)}},"../../node_modules/core-js/internals/copy-constructor-properties.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/has-own-property.js"),r=o("../../node_modules/core-js/internals/own-keys.js"),s=o("../../node_modules/core-js/internals/object-get-own-property-descriptor.js"),i=o("../../node_modules/core-js/internals/object-define-property.js");e.exports=function(e,t,o){for(var l=r(t),a=i.f,u=s.f,c=0;c<l.length;c++){var d=l[c];n(e,d)||o&&n(o,d)||a(e,d,u(t,d))}}},"../../node_modules/core-js/internals/create-non-enumerable-property.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/descriptors.js"),r=o("../../node_modules/core-js/internals/object-define-property.js"),s=o("../../node_modules/core-js/internals/create-property-descriptor.js");e.exports=n?function(e,t,o){return r.f(e,t,s(1,o))}:function(e,t,o){return e[t]=o,e}},"../../node_modules/core-js/internals/create-property-descriptor.js":function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"../../node_modules/core-js/internals/define-built-in.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/is-callable.js"),r=o("../../node_modules/core-js/internals/object-define-property.js"),s=o("../../node_modules/core-js/internals/make-built-in.js"),i=o("../../node_modules/core-js/internals/define-global-property.js");e.exports=function(e,t,o,l){l||(l={});var a=l.enumerable,u=void 0!==l.name?l.name:t;if(n(o)&&s(o,u,l),l.global)a?e[t]=o:i(t,o);else{try{l.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=o:r.f(e,t,{value:o,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return e}},"../../node_modules/core-js/internals/define-global-property.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/global-this.js"),r=Object.defineProperty;e.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(o){n[e]=t}return t}},"../../node_modules/core-js/internals/descriptors.js":function(e,t,o){e.exports=!o("../../node_modules/core-js/internals/fails.js")(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},"../../node_modules/core-js/internals/document-create-element.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/global-this.js"),r=o("../../node_modules/core-js/internals/is-object.js"),s=n.document,i=r(s)&&r(s.createElement);e.exports=function(e){return i?s.createElement(e):{}}},"../../node_modules/core-js/internals/enum-bug-keys.js":function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"../../node_modules/core-js/internals/environment-user-agent.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/global-this.js").navigator,r=n&&n.userAgent;e.exports=r?String(r):""},"../../node_modules/core-js/internals/environment-v8-version.js":function(e,t,o){var n,r,s=o("../../node_modules/core-js/internals/global-this.js"),i=o("../../node_modules/core-js/internals/environment-user-agent.js"),l=s.process,a=s.Deno,u=l&&l.versions||a&&a.version,c=u&&u.v8;c&&(r=(n=c.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&i&&(!(n=i.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=i.match(/Chrome\/(\d+)/))&&(r=+n[1]),e.exports=r},"../../node_modules/core-js/internals/export.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/global-this.js"),r=o("../../node_modules/core-js/internals/object-get-own-property-descriptor.js").f,s=o("../../node_modules/core-js/internals/create-non-enumerable-property.js"),i=o("../../node_modules/core-js/internals/define-built-in.js"),l=o("../../node_modules/core-js/internals/define-global-property.js"),a=o("../../node_modules/core-js/internals/copy-constructor-properties.js"),u=o("../../node_modules/core-js/internals/is-forced.js");e.exports=function(e,t){var o,c,d,f,j,p=e.target,m=e.global,h=e.stat;if(o=m?n:h?n[p]||l(p,{}):n[p]&&n[p].prototype)for(c in t){if(f=t[c],d=e.dontCallGetSet?(j=r(o,c))&&j.value:o[c],!u(m?c:p+(h?".":"#")+c,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;a(f,d)}(e.sham||d&&d.sham)&&s(f,"sham",!0),i(o,c,f,e)}}},"../../node_modules/core-js/internals/fails.js":function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"../../node_modules/core-js/internals/function-bind-native.js":function(e,t,o){e.exports=!o("../../node_modules/core-js/internals/fails.js")(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},"../../node_modules/core-js/internals/function-call.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/function-bind-native.js"),r=Function.prototype.call;e.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},"../../node_modules/core-js/internals/function-name.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/descriptors.js"),r=o("../../node_modules/core-js/internals/has-own-property.js"),s=Function.prototype,i=n&&Object.getOwnPropertyDescriptor,l=r(s,"name"),a=l&&(!n||n&&i(s,"name").configurable);e.exports={EXISTS:l,PROPER:l&&"something"===(function(){}).name,CONFIGURABLE:a}},"../../node_modules/core-js/internals/function-uncurry-this.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/function-bind-native.js"),r=Function.prototype,s=r.call,i=n&&r.bind.bind(s,s);e.exports=n?i:function(e){return function(){return s.apply(e,arguments)}}},"../../node_modules/core-js/internals/get-built-in.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/global-this.js"),r=o("../../node_modules/core-js/internals/is-callable.js");e.exports=function(e,t){var o;return arguments.length<2?r(o=n[e])?o:void 0:n[e]&&n[e][t]}},"../../node_modules/core-js/internals/get-method.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/a-callable.js"),r=o("../../node_modules/core-js/internals/is-null-or-undefined.js");e.exports=function(e,t){var o=e[t];return r(o)?void 0:n(o)}},"../../node_modules/core-js/internals/global-this.js":function(e,t,o){var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof o.g&&o.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},"../../node_modules/core-js/internals/has-own-property.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/function-uncurry-this.js"),r=o("../../node_modules/core-js/internals/to-object.js"),s=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(r(e),t)}},"../../node_modules/core-js/internals/hidden-keys.js":function(e){e.exports={}},"../../node_modules/core-js/internals/html.js":function(e,t,o){e.exports=o("../../node_modules/core-js/internals/get-built-in.js")("document","documentElement")},"../../node_modules/core-js/internals/ie8-dom-define.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/descriptors.js"),r=o("../../node_modules/core-js/internals/fails.js"),s=o("../../node_modules/core-js/internals/document-create-element.js");e.exports=!n&&!r(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},"../../node_modules/core-js/internals/indexed-object.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/function-uncurry-this.js"),r=o("../../node_modules/core-js/internals/fails.js"),s=o("../../node_modules/core-js/internals/classof-raw.js"),i=Object,l=n("".split);e.exports=r(function(){return!i("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?l(e,""):i(e)}:i},"../../node_modules/core-js/internals/inspect-source.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/function-uncurry-this.js"),r=o("../../node_modules/core-js/internals/is-callable.js"),s=o("../../node_modules/core-js/internals/shared-store.js"),i=n(Function.toString);r(s.inspectSource)||(s.inspectSource=function(e){return i(e)}),e.exports=s.inspectSource},"../../node_modules/core-js/internals/internal-state.js":function(e,t,o){var n,r,s,i=o("../../node_modules/core-js/internals/weak-map-basic-detection.js"),l=o("../../node_modules/core-js/internals/global-this.js"),a=o("../../node_modules/core-js/internals/is-object.js"),u=o("../../node_modules/core-js/internals/create-non-enumerable-property.js"),c=o("../../node_modules/core-js/internals/has-own-property.js"),d=o("../../node_modules/core-js/internals/shared-store.js"),f=o("../../node_modules/core-js/internals/shared-key.js"),j=o("../../node_modules/core-js/internals/hidden-keys.js"),p="Object already initialized",m=l.TypeError,h=l.WeakMap;if(i||d.state){var y=d.state||(d.state=new h);y.get=y.get,y.has=y.has,y.set=y.set,n=function(e,t){if(y.has(e))throw new m(p);return t.facade=e,y.set(e,t),t},r=function(e){return y.get(e)||{}},s=function(e){return y.has(e)}}else{var b=f("state");j[b]=!0,n=function(e,t){if(c(e,b))throw new m(p);return t.facade=e,u(e,b,t),t},r=function(e){return c(e,b)?e[b]:{}},s=function(e){return c(e,b)}}e.exports={set:n,get:r,has:s,enforce:function(e){return s(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var o;if(!a(t)||(o=r(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return o}}}},"../../node_modules/core-js/internals/is-callable.js":function(e){var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},"../../node_modules/core-js/internals/is-forced.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/fails.js"),r=o("../../node_modules/core-js/internals/is-callable.js"),s=/#|\.prototype\./,i=function(e,t){var o=a[l(e)];return o===c||o!==u&&(r(t)?n(t):!!t)},l=i.normalize=function(e){return String(e).replace(s,".").toLowerCase()},a=i.data={},u=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},"../../node_modules/core-js/internals/is-null-or-undefined.js":function(e){e.exports=function(e){return null==e}},"../../node_modules/core-js/internals/is-object.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/is-callable.js");e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},"../../node_modules/core-js/internals/is-pure.js":function(e){e.exports=!1},"../../node_modules/core-js/internals/is-symbol.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/get-built-in.js"),r=o("../../node_modules/core-js/internals/is-callable.js"),s=o("../../node_modules/core-js/internals/object-is-prototype-of.js"),i=o("../../node_modules/core-js/internals/use-symbol-as-uid.js"),l=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&s(t.prototype,l(e))}},"../../node_modules/core-js/internals/length-of-array-like.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/to-length.js");e.exports=function(e){return n(e.length)}},"../../node_modules/core-js/internals/make-built-in.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/function-uncurry-this.js"),r=o("../../node_modules/core-js/internals/fails.js"),s=o("../../node_modules/core-js/internals/is-callable.js"),i=o("../../node_modules/core-js/internals/has-own-property.js"),l=o("../../node_modules/core-js/internals/descriptors.js"),a=o("../../node_modules/core-js/internals/function-name.js").CONFIGURABLE,u=o("../../node_modules/core-js/internals/inspect-source.js"),c=o("../../node_modules/core-js/internals/internal-state.js"),d=c.enforce,f=c.get,j=String,p=Object.defineProperty,m=n("".slice),h=n("".replace),y=n([].join),b=l&&!r(function(){return 8!==p(function(){},"length",{value:8}).length}),g=String(String).split("String"),v=e.exports=function(e,t,o){"Symbol("===m(j(t),0,7)&&(t="["+h(j(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),o&&o.getter&&(t="get "+t),o&&o.setter&&(t="set "+t),(!i(e,"name")||a&&e.name!==t)&&(l?p(e,"name",{value:t,configurable:!0}):e.name=t),b&&o&&i(o,"arity")&&e.length!==o.arity&&p(e,"length",{value:o.arity});try{o&&i(o,"constructor")&&o.constructor?l&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=d(e);return i(n,"source")||(n.source=y(g,"string"==typeof t?t:"")),e};Function.prototype.toString=v(function(){return s(this)&&f(this).source||u(this)},"toString")},"../../node_modules/core-js/internals/math-trunc.js":function(e){var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?o:t)(n)}},"../../node_modules/core-js/internals/object-create.js":function(e,t,o){var n,r=o("../../node_modules/core-js/internals/an-object.js"),s=o("../../node_modules/core-js/internals/object-define-properties.js"),i=o("../../node_modules/core-js/internals/enum-bug-keys.js"),l=o("../../node_modules/core-js/internals/hidden-keys.js"),a=o("../../node_modules/core-js/internals/html.js"),u=o("../../node_modules/core-js/internals/document-create-element.js"),c=o("../../node_modules/core-js/internals/shared-key.js"),d="prototype",f="script",j=c("IE_PROTO"),p=function(){},m=function(e){return"<"+f+">"+e+"</"+f+">"},h=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},y=function(){var e,t=u("iframe");return t.style.display="none",a.appendChild(t),t.src=String("java"+f+":"),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F},b=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}b="undefined"!=typeof document?document.domain&&n?h(n):y():h(n);for(var e=i.length;e--;)delete b[d][i[e]];return b()};l[j]=!0,e.exports=Object.create||function(e,t){var o;return null!==e?(p[d]=r(e),o=new p,p[d]=null,o[j]=e):o=b(),void 0===t?o:s.f(o,t)}},"../../node_modules/core-js/internals/object-define-properties.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/descriptors.js"),r=o("../../node_modules/core-js/internals/v8-prototype-define-bug.js"),s=o("../../node_modules/core-js/internals/object-define-property.js"),i=o("../../node_modules/core-js/internals/an-object.js"),l=o("../../node_modules/core-js/internals/to-indexed-object.js"),a=o("../../node_modules/core-js/internals/object-keys.js");t.f=n&&!r?Object.defineProperties:function(e,t){i(e);for(var o,n=l(t),r=a(t),u=r.length,c=0;u>c;)s.f(e,o=r[c++],n[o]);return e}},"../../node_modules/core-js/internals/object-define-property.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/descriptors.js"),r=o("../../node_modules/core-js/internals/ie8-dom-define.js"),s=o("../../node_modules/core-js/internals/v8-prototype-define-bug.js"),i=o("../../node_modules/core-js/internals/an-object.js"),l=o("../../node_modules/core-js/internals/to-property-key.js"),a=TypeError,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d="enumerable",f="configurable",j="writable";t.f=n?s?function(e,t,o){if(i(e),t=l(t),i(o),"function"==typeof e&&"prototype"===t&&"value"in o&&j in o&&!o[j]){var n=c(e,t);n&&n[j]&&(e[t]=o.value,o={configurable:f in o?o[f]:n[f],enumerable:d in o?o[d]:n[d],writable:!1})}return u(e,t,o)}:u:function(e,t,o){if(i(e),t=l(t),i(o),r)try{return u(e,t,o)}catch(e){}if("get"in o||"set"in o)throw new a("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},"../../node_modules/core-js/internals/object-get-own-property-descriptor.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/descriptors.js"),r=o("../../node_modules/core-js/internals/function-call.js"),s=o("../../node_modules/core-js/internals/object-property-is-enumerable.js"),i=o("../../node_modules/core-js/internals/create-property-descriptor.js"),l=o("../../node_modules/core-js/internals/to-indexed-object.js"),a=o("../../node_modules/core-js/internals/to-property-key.js"),u=o("../../node_modules/core-js/internals/has-own-property.js"),c=o("../../node_modules/core-js/internals/ie8-dom-define.js"),d=Object.getOwnPropertyDescriptor;t.f=n?d:function(e,t){if(e=l(e),t=a(t),c)try{return d(e,t)}catch(e){}if(u(e,t))return i(!r(s.f,e,t),e[t])}},"../../node_modules/core-js/internals/object-get-own-property-names.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/object-keys-internal.js"),r=o("../../node_modules/core-js/internals/enum-bug-keys.js").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,r)}},"../../node_modules/core-js/internals/object-get-own-property-symbols.js":function(e,t){t.f=Object.getOwnPropertySymbols},"../../node_modules/core-js/internals/object-is-prototype-of.js":function(e,t,o){e.exports=o("../../node_modules/core-js/internals/function-uncurry-this.js")({}.isPrototypeOf)},"../../node_modules/core-js/internals/object-keys-internal.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/function-uncurry-this.js"),r=o("../../node_modules/core-js/internals/has-own-property.js"),s=o("../../node_modules/core-js/internals/to-indexed-object.js"),i=o("../../node_modules/core-js/internals/array-includes.js").indexOf,l=o("../../node_modules/core-js/internals/hidden-keys.js"),a=n([].push);e.exports=function(e,t){var o,n=s(e),u=0,c=[];for(o in n)!r(l,o)&&r(n,o)&&a(c,o);for(;t.length>u;)r(n,o=t[u++])&&(~i(c,o)||a(c,o));return c}},"../../node_modules/core-js/internals/object-keys.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/object-keys-internal.js"),r=o("../../node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(e){return n(e,r)}},"../../node_modules/core-js/internals/object-property-is-enumerable.js":function(e,t){var o={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor;t.f=n&&!o.call({1:2},1)?function(e){var t=n(this,e);return!!t&&t.enumerable}:o},"../../node_modules/core-js/internals/ordinary-to-primitive.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/function-call.js"),r=o("../../node_modules/core-js/internals/is-callable.js"),s=o("../../node_modules/core-js/internals/is-object.js"),i=TypeError;e.exports=function(e,t){var o,l;if("string"===t&&r(o=e.toString)&&!s(l=n(o,e))||r(o=e.valueOf)&&!s(l=n(o,e))||"string"!==t&&r(o=e.toString)&&!s(l=n(o,e)))return l;throw new i("Can't convert object to primitive value")}},"../../node_modules/core-js/internals/own-keys.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/get-built-in.js"),r=o("../../node_modules/core-js/internals/function-uncurry-this.js"),s=o("../../node_modules/core-js/internals/object-get-own-property-names.js"),i=o("../../node_modules/core-js/internals/object-get-own-property-symbols.js"),l=o("../../node_modules/core-js/internals/an-object.js"),a=r([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=s.f(l(e)),o=i.f;return o?a(t,o(e)):t}},"../../node_modules/core-js/internals/require-object-coercible.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/is-null-or-undefined.js"),r=TypeError;e.exports=function(e){if(n(e))throw new r("Can't call method on "+e);return e}},"../../node_modules/core-js/internals/shared-key.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/shared.js"),r=o("../../node_modules/core-js/internals/uid.js"),s=n("keys");e.exports=function(e){return s[e]||(s[e]=r(e))}},"../../node_modules/core-js/internals/shared-store.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/is-pure.js"),r=o("../../node_modules/core-js/internals/global-this.js"),s=o("../../node_modules/core-js/internals/define-global-property.js"),i="__core-js_shared__",l=e.exports=r[i]||s(i,{});(l.versions||(l.versions=[])).push({version:"3.44.0",mode:n?"pure":"global",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"})},"../../node_modules/core-js/internals/shared.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/shared-store.js");e.exports=function(e,t){return n[e]||(n[e]=t||{})}},"../../node_modules/core-js/internals/symbol-constructor-detection.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/environment-v8-version.js"),r=o("../../node_modules/core-js/internals/fails.js"),s=o("../../node_modules/core-js/internals/global-this.js").String;e.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},"../../node_modules/core-js/internals/to-absolute-index.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/to-integer-or-infinity.js"),r=Math.max,s=Math.min;e.exports=function(e,t){var o=n(e);return o<0?r(o+t,0):s(o,t)}},"../../node_modules/core-js/internals/to-indexed-object.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/indexed-object.js"),r=o("../../node_modules/core-js/internals/require-object-coercible.js");e.exports=function(e){return n(r(e))}},"../../node_modules/core-js/internals/to-integer-or-infinity.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/math-trunc.js");e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},"../../node_modules/core-js/internals/to-length.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/to-integer-or-infinity.js"),r=Math.min;e.exports=function(e){var t=n(e);return t>0?r(t,0x1fffffffffffff):0}},"../../node_modules/core-js/internals/to-object.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/require-object-coercible.js"),r=Object;e.exports=function(e){return r(n(e))}},"../../node_modules/core-js/internals/to-primitive.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/function-call.js"),r=o("../../node_modules/core-js/internals/is-object.js"),s=o("../../node_modules/core-js/internals/is-symbol.js"),i=o("../../node_modules/core-js/internals/get-method.js"),l=o("../../node_modules/core-js/internals/ordinary-to-primitive.js"),a=o("../../node_modules/core-js/internals/well-known-symbol.js"),u=TypeError,c=a("toPrimitive");e.exports=function(e,t){if(!r(e)||s(e))return e;var o,a=i(e,c);if(a){if(void 0===t&&(t="default"),!r(o=n(a,e,t))||s(o))return o;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},"../../node_modules/core-js/internals/to-property-key.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/to-primitive.js"),r=o("../../node_modules/core-js/internals/is-symbol.js");e.exports=function(e){var t=n(e,"string");return r(t)?t:t+""}},"../../node_modules/core-js/internals/try-to-string.js":function(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},"../../node_modules/core-js/internals/uid.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/function-uncurry-this.js"),r=0,s=Math.random(),i=n(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++r+s,36)}},"../../node_modules/core-js/internals/use-symbol-as-uid.js":function(e,t,o){e.exports=o("../../node_modules/core-js/internals/symbol-constructor-detection.js")&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"../../node_modules/core-js/internals/v8-prototype-define-bug.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/descriptors.js"),r=o("../../node_modules/core-js/internals/fails.js");e.exports=n&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},"../../node_modules/core-js/internals/weak-map-basic-detection.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/global-this.js"),r=o("../../node_modules/core-js/internals/is-callable.js"),s=n.WeakMap;e.exports=r(s)&&/native code/.test(String(s))},"../../node_modules/core-js/internals/well-known-symbol.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/global-this.js"),r=o("../../node_modules/core-js/internals/shared.js"),s=o("../../node_modules/core-js/internals/has-own-property.js"),i=o("../../node_modules/core-js/internals/uid.js"),l=o("../../node_modules/core-js/internals/symbol-constructor-detection.js"),a=o("../../node_modules/core-js/internals/use-symbol-as-uid.js"),u=n.Symbol,c=r("wks"),d=a?u.for||u:u&&u.withoutSetter||i;e.exports=function(e){return s(c,e)||(c[e]=l&&s(u,e)?u[e]:d("Symbol."+e)),c[e]}},"../../node_modules/core-js/modules/es.array.includes.js":function(e,t,o){var n=o("../../node_modules/core-js/internals/export.js"),r=o("../../node_modules/core-js/internals/array-includes.js").includes,s=o("../../node_modules/core-js/internals/fails.js"),i=o("../../node_modules/core-js/internals/add-to-unscopables.js");n({target:"Array",proto:!0,forced:s(function(){return![,].includes()})},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},"../../node_modules/core-js/modules/es.object.has-own.js":function(e,t,o){o("../../node_modules/core-js/internals/export.js")({target:"Object",stat:!0},{hasOwn:o("../../node_modules/core-js/internals/has-own-property.js")})}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,o),s.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{ky:()=>D,TimeoutError:()=>q,HTTPError:()=>t,sseHook:()=>e});var e={};o.r(e),o.d(e,{createHook:()=>U}),o("../../node_modules/core-js/modules/es.object.has-own.js"),o("../../node_modules/core-js/modules/es.array.includes.js");class t extends Error{constructor(e,t,o){var n;const r=e.status||0===e.status?e.status:"",s=null!=(n=e.statusText)?n:"",i=`${r} ${s}`.trim();super(`Request failed with ${i?`status code ${i}`:"an unknown error"}: ${t.method} ${t.url}`),this.name="HTTPError",this.response=e,this.request=t,this.options=o}}class r extends Error{constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.name="NonError",this.value=e}}class s extends Error{constructor(e){const t=(null==e?void 0:e.cause)?e.cause instanceof Error?e.cause:new r(e.cause):void 0;super((null==e?void 0:e.code)?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.name="ForceRetryError",this.customDelay=null==e?void 0:e.delay,this.code=null==e?void 0:e.code,this.customRequest=null==e?void 0:e.request}}let i=(()=>{let e=!1,t=!1,o="function"==typeof globalThis.Request;if("function"==typeof globalThis.ReadableStream&&o)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(e){if(e instanceof Error&&"unsupported BodyInit type"===e.message)return!1;throw e}return e&&!t})(),l="function"==typeof globalThis.AbortController,a="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,u="function"==typeof globalThis.ReadableStream,c="function"==typeof globalThis.FormData,d=["get","post","put","patch","head","delete"],f={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},j=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,p=Symbol("stop");class m{constructor(e){this.options=e}}let h=e=>new m(e),y={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},b={next:!0},g={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},v=(e,t,o)=>{let n,r=0;return e.pipeThrough(new TransformStream({transform(e,s){if(s.enqueue(e),n){r+=n.byteLength;let e=0===t?0:r/t;e>=1&&(e=1-Number.EPSILON),null==o||o({percent:e,totalBytes:Math.max(t,r),transferredBytes:r},n)}n=e},flush(){n&&(r+=n.byteLength,null==o||o({percent:1,totalBytes:Math.max(t,r),transferredBytes:r},n))}}))},_=e=>null!==e&&"object"==typeof e,w=function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];for(let e of t)if((!_(e)||Array.isArray(e))&&void 0!==e)throw TypeError("The `options` argument must be an object");return O({},...t)},x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=new globalThis.Headers(e),n=t instanceof globalThis.Headers;for(let[e,r]of new globalThis.Headers(t).entries())n&&"undefined"===r||void 0===r?o.delete(e):o.set(e,r);return o};function R(e,t,o){var n,r;return Object.hasOwn(t,o)&&void 0===t[o]?[]:O(null!=(n=e[o])?n:[],null!=(r=t[o])?r:[])}let S=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{beforeRequest:R(e,t,"beforeRequest"),beforeRetry:R(e,t,"beforeRetry"),afterResponse:R(e,t,"afterResponse"),beforeError:R(e,t,"beforeError")}},T=(e,t)=>{let o=new URLSearchParams;for(let n of[e,t])if(void 0!==n)if(n instanceof URLSearchParams)for(let[e,t]of n.entries())o.append(e,t);else if(Array.isArray(n))for(let e of n){if(!Array.isArray(e)||2!==e.length)throw TypeError("Array search parameters must be provided in [[key, value], ...] format");o.append(String(e[0]),String(e[1]))}else if(_(n))for(let[e,t]of Object.entries(n))void 0!==t&&o.append(e,String(t));else for(let[e,t]of new URLSearchParams(n).entries())o.append(e,t);return o},O=function(){let e;for(var t=arguments.length,o=Array(t),n=0;n<t;n++)o[n]=arguments[n];let r={},s={},i={},l=[];for(let t of o)if(Array.isArray(t))Array.isArray(r)||(r=[]),r=[...r,...t];else if(_(t)){for(let[o,n]of Object.entries(t)){if("signal"===o&&n instanceof globalThis.AbortSignal){l.push(n);continue}if("context"===o){if(null!=n&&(!_(n)||Array.isArray(n)))throw TypeError("The `context` option must be an object");r={...r,context:null==n?{}:{...r.context,...n}};continue}if("searchParams"===o){e=null==n?void 0:void 0===e?n:T(e,n);continue}_(n)&&o in r&&(n=O(r[o],n)),r={...r,[o]:n}}_(t.hooks)&&(i=S(i,t.hooks),r.hooks=i),_(t.headers)&&(s=x(s,t.headers),r.headers=s)}return void 0!==e&&(r.searchParams=e),l.length>0&&(1===l.length?r.signal=l[0]:a?r.signal=AbortSignal.any(l):r.signal=l.at(-1)),void 0===r.context&&(r.context={}),r},P={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("number"==typeof e)return{...P,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw Error("retry.statusCodes must be an array");return{...P,...e}};class q extends Error{constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}async function k(e,t,o,n){return new Promise((r,s)=>{let i=setTimeout(()=>{o&&o.abort(),s(new q(e))},n.timeout);n.fetch(e,t).then(r).catch(s).then(()=>{clearTimeout(i)})})}async function A(e,t){let{signal:o}=t;return new Promise((t,n)=>{function r(){clearTimeout(s),n(o.reason)}o&&(o.throwIfAborted(),o.addEventListener("abort",r,{once:!0}));let s=setTimeout(()=>{null==o||o.removeEventListener("abort",r),t()},e)})}class C{static create(e,o){let n=new C(e,o),r=async()=>{if("number"==typeof n.#e.timeout&&n.#e.timeout>0x7fffffff)throw RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await n.#t();for(let t of n.#e.hooks.afterResponse){let i=n.#o(e.clone()),l=await t(n.request,n.#n(),i,{retryCount:n.#r});if(l instanceof globalThis.Response&&(e=l),l instanceof m){var o,r;throw await Promise.all([null==(o=i.body)?void 0:o.cancel(),null==(r=e.body)?void 0:r.cancel()]),new s(l.options)}}if(n.#o(e),!e.ok&&("function"==typeof n.#e.throwHttpErrors?n.#e.throwHttpErrors(e.status):n.#e.throwHttpErrors)){let o=new t(e,n.request,n.#n());for(let e of n.#e.hooks.beforeError)o=await e(o,{retryCount:n.#r});throw o}if(n.#e.onDownloadProgress){if("function"!=typeof n.#e.onDownloadProgress)throw TypeError("The `onDownloadProgress` option must be a function");if(!u)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");return((e,t)=>{if(!e.body)return e;if(204===e.status)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});let o=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(v(e.body,o,t),{status:e.status,statusText:e.statusText,headers:e.headers})})(e.clone(),n.#e.onDownloadProgress)}return e},i=n.#s(r).finally(async()=>{var e,t;let o=n.#i,r=[];o&&!o.bodyUsed&&r.push(null==(e=o.body)?void 0:e.cancel()),n.request.bodyUsed||r.push(null==(t=n.request.body)?void 0:t.cancel()),await Promise.all(r)});for(let[e,t]of Object.entries(f)){var l,a;("bytes"!==e||"function"==typeof(null==(a=globalThis.Response)||null==(l=a.prototype)?void 0:l.bytes))&&(i[e]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||t);let r=await i;if("json"===e){if(204===r.status)return"";let e=await r.text();return""===e?"":o.parseJson?o.parseJson(e):JSON.parse(e)}return r[e]()})}return i}static #l(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(e=>{let[,t]=e;return void 0!==t}))}#a;#r;#u;#e;#i;#c;#d;constructor(e,t={}){var o,n,r,s,u,f,j,p,m,h,y,b;if(this.#r=0,this.#u=e,this.#e={...t,headers:x(this.#u.headers,t.headers),hooks:S({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:(e=>d.includes(e)?e.toUpperCase():e)(null!=(n=null!=(o=t.method)?o:this.#u.method)?n:"GET"),prefixUrl:String(t.prefixUrl||""),retry:E(t.retry),throwHttpErrors:null==(r=t.throwHttpErrors)||r,timeout:null!=(s=t.timeout)?s:1e4,fetch:null!=(u=t.fetch)?u:globalThis.fetch.bind(globalThis),context:null!=(f=t.context)?f:{}},"string"!=typeof this.#u&&!(this.#u instanceof URL||this.#u instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(this.#e.prefixUrl&&"string"==typeof this.#u){if(this.#u.startsWith("/"))throw Error("`input` must not begin with a slash when using `prefixUrl`");this.#e.prefixUrl.endsWith("/")||(this.#e.prefixUrl+="/"),this.#u=this.#e.prefixUrl+this.#u}l&&a&&(this.#c=null!=(j=this.#e.signal)?j:this.#u.signal,this.#a=new globalThis.AbortController,this.#e.signal=this.#c?AbortSignal.any([this.#c,this.#a.signal]):this.#a.signal),i&&(this.#e.duplex="half"),void 0!==this.#e.json&&(this.#e.body=null!=(h=null==(p=(m=this.#e).stringifyJson)?void 0:p.call(m,this.#e.json))?h:JSON.stringify(this.#e.json),this.#e.headers.set("content-type",null!=(y=this.#e.headers.get("content-type"))?y:"application/json"));const g=t.headers&&new globalThis.Headers(t.headers).has("content-type");if(this.#u instanceof globalThis.Request&&(c&&this.#e.body instanceof globalThis.FormData||this.#e.body instanceof URLSearchParams)&&!g&&this.#e.headers.delete("content-type"),this.request=new globalThis.Request(this.#u,this.#e),(e=>void 0!==e&&(Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:"object"==typeof e?Object.keys(e).length>0:"string"==typeof e?e.trim().length>0:!!e))(this.#e.searchParams)){const e="string"==typeof this.#e.searchParams?this.#e.searchParams.replace(/^\?/,""):new URLSearchParams(C.#l(this.#e.searchParams)).toString(),t=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,"?"+e);this.request=new globalThis.Request(t,this.#e)}if(this.#e.onUploadProgress){if("function"!=typeof this.#e.onUploadProgress)throw TypeError("The `onUploadProgress` option must be a function");if(!i)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#f(this.request,null!=(b=this.#e.body)?b:void 0)}}#j(){let e=this.#e.retry.delay(this.#r),t=e;return!0===this.#e.retry.jitter?t=Math.random()*e:"function"==typeof this.#e.retry.jitter&&(!Number.isFinite(t=this.#e.retry.jitter(e))||t<0)&&(t=e),Math.min(this.#e.retry.backoffLimit,t)}async #p(e){var o,n,i,l,a,u;if(this.#r++,this.#r>this.#e.retry.limit)throw e;let c=e instanceof Error?e:new r(e);if(c instanceof s)return null!=(o=c.customDelay)?o:this.#j();if(!this.#e.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#e.retry.shouldRetry){let t=await this.#e.retry.shouldRetry({error:c,retryCount:this.#r});if(!1===t)throw e;if(!0===t)return this.#j()}if((e instanceof q||(null==e?void 0:e.name)===q.name)&&!this.#e.retry.retryOnTimeout)throw e;if(e instanceof t||(null==e?void 0:e.name)===t.name){if(!this.#e.retry.statusCodes.includes(e.response.status))throw e;let t=null!=(a=null!=(l=null!=(i=null!=(n=e.response.headers.get("Retry-After"))?n:e.response.headers.get("RateLimit-Reset"))?i:e.response.headers.get("X-RateLimit-Retry-After"))?l:e.response.headers.get("X-RateLimit-Reset"))?a:e.response.headers.get("X-Rate-Limit-Reset");if(t&&this.#e.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now());let o=null!=(u=this.#e.retry.maxRetryAfter)?u:e;return e<o?e:o}if(413===e.response.status)throw e}return this.#j()}#o(e){return this.#e.parseJson&&(e.json=async()=>this.#e.parseJson(await e.text())),e}async #s(e){try{return await e()}catch(o){let t=Math.min(await this.#p(o),0x7fffffff);if(this.#r<1)throw o;if(await A(t,this.#c?{signal:this.#c}:{}),o instanceof s&&o.customRequest){let e=this.#e.signal?new globalThis.Request(o.customRequest,{signal:this.#e.signal}):new globalThis.Request(o.customRequest);this.#m(e)}for(let e of this.#e.hooks.beforeRetry){let t=await e({request:this.request,options:this.#n(),error:o,retryCount:this.#r});if(t instanceof globalThis.Request){this.#m(t);break}if(t instanceof globalThis.Response)return t;if(t===p)return}return this.#s(e)}}async #t(){var e;for(let t of((null==(e=this.#a)?void 0:e.signal.aborted)&&(this.#a=new globalThis.AbortController,this.#e.signal=this.#c?AbortSignal.any([this.#c,this.#a.signal]):this.#a.signal,this.request=new globalThis.Request(this.request,{signal:this.#e.signal})),this.#e.hooks.beforeRequest)){let e=await t(this.request,this.#n(),{retryCount:this.#r});if(e instanceof Response)return e;if(e instanceof globalThis.Request){this.#m(e);break}}let t=((e,t)=>{let o={};for(let n in t)Object.hasOwn(t,n)&&(n in g||n in y||n in e&&!(n in b)||(o[n]=t[n]));return o})(this.request,this.#e);return(this.#i=this.request,this.request=this.#i.clone(),!1===this.#e.timeout)?this.#e.fetch(this.#i,t):k(this.#i,t,this.#a,this.#e)}#n(){if(!this.#d){let{hooks:e,...t}=this.#e;this.#d=Object.freeze(t)}return this.#d}#m(e){this.#d=void 0,this.request=this.#f(e)}#f(e,t){var o;return this.#e.onUploadProgress&&e.body?((e,t,o)=>{if(!e.body)return e;let n=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[o,n]of e)t+=j,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${o}"`).length,t+="string"==typeof n?new TextEncoder().encode(n).length:n.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if("string"==typeof e)return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if("object"==typeof e&&null!==e)try{let t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{}return 0})(null!=o?o:e.body);return new Request(e,{duplex:"half",body:v(e.body,n,t)})})(e,this.#e.onUploadProgress,null!=(o=null!=t?t:this.#e.body)?o:void 0):e}}let L=e=>{let t=(t,o)=>C.create(t,w(e,o));for(let o of d)t[o]=(t,n)=>C.create(t,w(e,n,{method:o}));return t.create=e=>L(w(e)),t.extend=t=>("function"==typeof t&&(t=t(null!=e?e:{})),L(w(e,t))),t.stop=p,t.retry=h,t},D=L(),N=[239,187,191],U=e=>async(t,o,n)=>{if(!n.ok||!n.body)return;let r=!1,s=t=>{var o;r||(r=!0,null==(o=e.onCompleted)||o.call(e,t))},i=n.body.getReader(),l=new TextDecoder("utf8"),a=function(e){let t,o,n,r,s,i,l;return a(),{feed:function(a){var u;o=o?o+a:a,t&&(u=o,N.every((e,t)=>u.charCodeAt(t)===e))&&(o=o.slice(N.length)),t=!1;let c=o.length,d=0,f=!1;for(;d<c;){let t;f&&("\n"===o[d]&&++d,f=!1);let a=-1,u=r;for(let e=n;a<0&&e<c;++e)":"===(t=o[e])&&u<0?u=e-d:"\r"===t?(f=!0,a=e-d):"\n"===t&&(a=e-d);if(a<0){n=c-d,r=u;break}n=0,r=-1,function(t,o,n,r){if(0===r){l.length>0&&(e({type:"event",id:s,event:i||void 0,data:l.slice(0,-1)}),l="",s=void 0),i=void 0;return}let a=n<0,u=t.slice(o,o+(a?r:n)),c=0;c=a?r:" "===t[o+n+1]?n+2:n+1;let d=o+c,f=r-c,j=t.slice(d,d+f).toString();if("data"===u)l+=j?"".concat(j,"\n"):"\n";else if("event"===u)i=j;else if("id"!==u||j.includes("\0")){if("retry"===u){let t=parseInt(j,10);Number.isNaN(t)||e({type:"reconnect-interval",value:t})}}else s=j}(o,d,u,a),d+=a+1}d===c?o="":d>0&&(o=o.slice(d))},reset:a};function a(){t=!0,o="",n=0,r=-1,s=void 0,i=void 0,l=""}}(t=>{var o,n,r;if("event"===t.type&&(null==(o=e.onMessage)||o.call(e,t)),"event"===t.type&&t.data)for(let o of(null==(n=e.onEvent)||n.call(e,t),t.data.split("\n")))e.onData(o);else"reconnect-interval"===t.type&&(null==(r=e.onReconnectInterval)||r.call(e,t.value))}),u=()=>{i.read().then(e=>{e.done?s():(a.feed(l.decode(e.value,{stream:!0})),u())}).catch(o=>{var n;if(t.signal.aborted){null==(n=e.onAborted)||n.call(e);return}s(o)})};return u(),n}})(),n})());