@hexabot-ai/api 3.2.3 → 3.2.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.
- package/README.md +1 -3
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/mailer/mailer.service.d.ts +9 -1
- package/dist/mailer/mailer.service.js +3 -7
- package/dist/mailer/mailer.service.js.map +1 -1
- package/dist/static/assets/browser-ponyfill-Bj1wNsDw.js +2 -0
- package/dist/static/assets/{css.worker-BvV5MPou.js → css.worker-B4z49cGk.js} +7 -7
- package/dist/static/assets/cssMode-BMKUL7I_.js +1 -0
- package/dist/static/assets/editor.worker-DyuDvpVp.js +26 -0
- package/dist/static/assets/{freemarker2-QJMqt1-L.js → freemarker2-DIk3wF78.js} +1 -1
- package/dist/static/assets/{handlebars-D3-tp3q8.js → handlebars-Nrhd9n0w.js} +1 -1
- package/dist/static/assets/{html-BIVSAe2M.js → html-CwnzbLS6.js} +1 -1
- package/dist/static/assets/{html.worker-BLJhxQJQ.js → html.worker-DtiGdgqp.js} +28 -28
- package/dist/static/assets/htmlMode-ClLrVyGU.js +1 -0
- package/dist/static/assets/{index-Wtgr3A4p.js → index-CAZxQsUL.js} +2280 -2280
- package/dist/static/assets/{index-BbLr1ieK.css → index-D0A768T3.css} +1 -1
- package/dist/static/assets/{javascript-u87PO7ih.js → javascript-BX6TsZ6r.js} +1 -1
- package/dist/static/assets/json.worker-leyajbqV.js +58 -0
- package/dist/static/assets/{jsonMode-0Pf5oAfj.js → jsonMode-C-LGXH6f.js} +4 -4
- package/dist/static/assets/{liquid-CBQoZjUj.js → liquid-CaOm2I9P.js} +1 -1
- package/dist/static/assets/{lspLanguageFeatures-Bnt5qp-g.js → lspLanguageFeatures-BvcWhZLF.js} +1 -1
- package/dist/static/assets/{mdx-BOZSKWcy.js → mdx-Cxiw73My.js} +1 -1
- package/dist/static/assets/{python-CLk42i5f.js → python-CmySSdz5.js} +1 -1
- package/dist/static/assets/{razor-DDV6klIi.js → razor-BurbZC0s.js} +1 -1
- package/dist/static/assets/{ts.worker-DGHjMaqB.js → ts.worker-59MjiAqk.js} +63 -63
- package/dist/static/assets/{tsMode-Dgojz_8C.js → tsMode-BsTv7GDD.js} +1 -1
- package/dist/static/assets/{typescript-BAUzcnL_.js → typescript-DHhc1YTM.js} +1 -1
- package/dist/static/assets/{xml-D5KxV0OO.js → xml-A3EFC0Z7.js} +1 -1
- package/dist/static/assets/{yaml-CSq3AYM9.js → yaml-C4fLIe3k.js} +1 -1
- package/dist/static/assets/yaml.worker.entry-CsihCPlC.js +419 -0
- package/dist/static/index.html +2 -2
- package/dist/static/locales/en/translation.json +2 -1
- package/dist/static/locales/fr/translation.json +2 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/user/services/passwordReset.service.js +1 -1
- package/dist/user/services/validate-account.service.js +1 -1
- package/package.json +6 -5
- package/src/config/index.ts +1 -1
- package/src/mailer/mailer.service.ts +12 -8
- package/src/user/services/passwordReset.service.ts +1 -1
- package/src/user/services/validate-account.service.ts +1 -1
- package/dist/static/assets/browser-ponyfill-CnklMg-0.js +0 -2
- package/dist/static/assets/cssMode-BFc1s9d3.js +0 -1
- package/dist/static/assets/editor.worker-CKy7Pnvo.js +0 -26
- package/dist/static/assets/htmlMode-D9c0cJUu.js +0 -1
- package/dist/static/assets/json.worker-usMZ-FED.js +0 -58
- package/dist/static/assets/yaml.worker.entry-BB81z30Q.js +0 -419
package/README.md
CHANGED
|
@@ -46,7 +46,6 @@ The API is divided into several key modules, each responsible for specific funct
|
|
|
46
46
|
- Channel/helper runtime setting group keys and settings hook namespaces are now the extension `name` (kebab-case).
|
|
47
47
|
- Third-party channel/helper extensions must define settings groups and i18n namespaces with the same kebab-case extension `name`.
|
|
48
48
|
|
|
49
|
-
|
|
50
49
|
## Installation
|
|
51
50
|
|
|
52
51
|
```bash
|
|
@@ -102,7 +101,7 @@ pnpm --filter @hexabot-ai/api run cli migration migrate down [version]
|
|
|
102
101
|
|
|
103
102
|
Auto-migration runs outside production by default, or in production when `DB_AUTO_MIGRATE=true` and `API_IS_PRIMARY_NODE=true`.
|
|
104
103
|
|
|
105
|
-
Check the Migration README file for more: [Migration Module](
|
|
104
|
+
Check the Migration README file for more: [Migration Module](https://github.com/hexabot-ai/Hexabot/blob/main/packages/api/src/migration/README.md)
|
|
106
105
|
|
|
107
106
|
## Documentation
|
|
108
107
|
|
|
@@ -120,7 +119,6 @@ We welcome contributions from the community! Whether you want to report a bug, s
|
|
|
120
119
|
|
|
121
120
|
Feel free to join us on [Discord](https://discord.gg/rNb9t2MFkG)
|
|
122
121
|
|
|
123
|
-
|
|
124
122
|
## License
|
|
125
123
|
|
|
126
124
|
Copyright (c) 2025 Hexastack.
|
package/dist/config/index.js
CHANGED
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;AAMA,+BAA4B;AAE5B,kDAK+B;AAI/B,MAAM,YAAY,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;KACzD,WAAW,EAAE;KACb,QAAQ,CAAC,MAAM,CAAC,CAAC;AACpB,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;AACtD,MAAM,iBAAiB,GACrB,CAAC,iBAAiB,KAAK,MAAM;IAC3B,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,MAAM,CAAC,KAAK,MAAM,CAAC;IACzD,CAAC,YAAY,CAAC;AAChB,MAAM,aAAa,GAAG,IAAA,4BAAoB,EACxC,OAAO,CAAC,GAAG,CAAC,eAAe,EAC3B,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CACpB,CAAC;AACF,MAAM,mBAAmB,GAAG,IAAA,4BAAoB,EAC9C,OAAO,CAAC,GAAG,CAAC,qBAAqB,EACjC,CAAC,CACF,CA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iBAAiB;QAC9D,sBAAsB,EACpB,OAAO,CAAC,GAAG,CAAC,6BAA6B;YACzC,OAAO,CAAC,GAAG,CAAC,QAAQ;YACpB,aAAa;QACf,UAAU,EAAE,IAAA,gBAAQ,EAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE;YACtD,UAAU;YACV,YAAY;YACZ,aAAa;YACb,OAAO;YACP,QAAQ;YACR,eAAe;YACf,QAAQ;YACR,YAAY;YACZ,OAAO;SACR,CAAC;QACF,aAAa,EAAE;YACb,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB;YACnC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB;YAC7C,OAAO,EAAE,IAAA,yBAAiB,EAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;YAC9D,aAAa,EAAE,IAAA,wBAAgB,EAC7B,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAC1C;YACD,gBAAgB,EAAE,IAAA,wBAAgB,EAChC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAC7C;SACF;QACD,UAAU,EAAE;YACV,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB;YACzC,YAAY,EACV,OAAO,CAAC,GAAG,CAAC,6BAA6B,IAAI,kBAAkB;YACjE,UAAU,EAAE,IAAA,wBAAgB,EAC1B,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAClD;SACF;KACF;CACF,CAAC"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { SendMailOptions as NodemailerSendMailOptions } from 'nodemailer';
|
|
2
|
+
interface SendMailOptionsContext {
|
|
3
|
+
appName: string;
|
|
4
|
+
appUrl: string;
|
|
5
|
+
token: string;
|
|
6
|
+
first_name: string;
|
|
7
|
+
t: (key: string) => void;
|
|
8
|
+
}
|
|
2
9
|
export type SendMailOptions = NodemailerSendMailOptions & {
|
|
3
10
|
template?: string;
|
|
4
|
-
context?:
|
|
11
|
+
context?: SendMailOptionsContext;
|
|
5
12
|
};
|
|
6
13
|
export declare class MailerService {
|
|
7
14
|
private readonly transporter?;
|
|
@@ -10,3 +17,4 @@ export declare class MailerService {
|
|
|
10
17
|
verifyAllTransporters(): Promise<boolean>;
|
|
11
18
|
private renderTemplate;
|
|
12
19
|
}
|
|
20
|
+
export {};
|
|
@@ -51,15 +51,11 @@ let MailerService = class MailerService {
|
|
|
51
51
|
}
|
|
52
52
|
return await this.transporter.verify();
|
|
53
53
|
}
|
|
54
|
-
async renderTemplate(template, context
|
|
54
|
+
async renderTemplate(template, context) {
|
|
55
55
|
const templatePath = path_1.default.join(process.cwd(), 'dist', 'templates', template);
|
|
56
56
|
const content = await (0, promises_1.readFile)(templatePath, 'utf-8');
|
|
57
|
-
const compiledHandlebars = handlebars_1.default.compile(content)(
|
|
58
|
-
|
|
59
|
-
appUrl: config_1.config.uiBaseUrl,
|
|
60
|
-
...context,
|
|
61
|
-
});
|
|
62
|
-
const { errors, html } = (0, mjml_1.default)(compiledHandlebars);
|
|
57
|
+
const compiledHandlebars = handlebars_1.default.compile(content)(context);
|
|
58
|
+
const { errors, html } = await (0, mjml_1.default)(compiledHandlebars);
|
|
63
59
|
if (errors.length) {
|
|
64
60
|
throw new Error('Unable to compile mjml template');
|
|
65
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mailer.service.js","sourceRoot":"","sources":["../../src/mailer/mailer.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,0CAAuC;AACvC,gDAAwB;AAExB,2CAA4C;AAC5C,4DAAoC;AACpC,gDAA6B;AAC7B,4DAIoB;AACpB,mFAA0D;AAE1D,sCAAkC;
|
|
1
|
+
{"version":3,"file":"mailer.service.js","sourceRoot":"","sources":["../../src/mailer/mailer.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,0CAAuC;AACvC,gDAAwB;AAExB,2CAA4C;AAC5C,4DAAoC;AACpC,gDAA6B;AAC7B,4DAIoB;AACpB,mFAA0D;AAE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,EAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACtD,MAAM,kBAAkB,GAAG,oBAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;QAChE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAA,cAAS,EAAC,kBAAkB,CAAC,CAAC;QAE7D,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AA7DY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;;GACA,aAAa,CA6DzB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as A,g as X}from"./index-CAZxQsUL.js";function J(g,d){for(var b=0;b<d.length;b++){const y=d[b];if(typeof y!="string"&&!Array.isArray(y)){for(const l in y)if(l!=="default"&&!(l in g)){const p=Object.getOwnPropertyDescriptor(y,l);p&&Object.defineProperty(g,l,p.get?p:{enumerable:!0,get:()=>y[l]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}},H;function Z(){return H||(H=1,(function(g,d){var b=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof A<"u"&&A,y=(function(){function p(){this.fetch=!1,this.DOMException=b.DOMException}return p.prototype=b,new p})();(function(p){(function(h){var a=typeof p<"u"&&p||typeof self<"u"&&self||typeof A<"u"&&A||{},u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function F(e){return e&&DataView.prototype.isPrototypeOf(e)}if(u.arrayBuffer)var q=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],C=ArrayBuffer.isView||function(e){return e&&q.indexOf(Object.prototype.toString.call(e))>-1};function v(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function T(e){return typeof e!="string"&&(e=String(e)),e}function B(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return u.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(t,r){this.append(r,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}i.prototype.append=function(e,t){e=v(e),t=T(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},i.prototype.delete=function(e){delete this.map[v(e)]},i.prototype.get=function(e){return e=v(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(v(e))},i.prototype.set=function(e,t){this.map[v(e)]=T(t)},i.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),B(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),B(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),B(e)},u.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);function O(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function D(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function I(e){var t=new FileReader,r=D(t);return t.readAsArrayBuffer(e),r}function M(e){var t=new FileReader,r=D(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),s=n?n[1]:"utf-8";return t.readAsText(e,s),r}function L(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}function R(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function U(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:u.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:u.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u.arrayBuffer&&u.blob&&F(e)?(this._bodyArrayBuffer=R(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||C(e))?this._bodyArrayBuffer=R(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var e=O(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=O(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(u.blob)return this.blob().then(I);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=O(this);if(e)return e;if(this._bodyBlob)return M(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(L(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(z)}),this.json=function(){return this.text().then(JSON.parse)},this}var N=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function k(e){var t=e.toUpperCase();return N.indexOf(t)>-1?t:e}function w(e,t){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var r=t.body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&e._bodyInit!=null&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new i(t.headers)),this.method=k(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||(function(){if("AbortController"in a){var o=new AbortController;return o.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var s=/\?/;this.url+=(s.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})};function z(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var n=r.split("="),s=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(o))}}),t}function G(e){var t=new i,r=e.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(n){return n.indexOf(`
|
|
2
|
+
`)===0?n.substr(1,n.length):n}).forEach(function(n){var s=n.split(":"),o=s.shift().trim();if(o){var _=s.join(":").trim();try{t.append(o,_)}catch(x){console.warn("Response "+x.message)}}}),t}U.call(w.prototype);function c(e,t){if(!(this instanceof c))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}U.call(c.prototype),c.prototype.clone=function(){return new c(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},c.error=function(){var e=new c(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var V=[301,302,303,307,308];c.redirect=function(e,t){if(V.indexOf(t)===-1)throw new RangeError("Invalid status code");return new c(null,{status:t,headers:{location:e}})},h.DOMException=a.DOMException;try{new h.DOMException}catch{h.DOMException=function(t,r){this.message=t,this.name=r;var n=Error(t);this.stack=n.stack},h.DOMException.prototype=Object.create(Error.prototype),h.DOMException.prototype.constructor=h.DOMException}function P(e,t){return new Promise(function(r,n){var s=new w(e,t);if(s.signal&&s.signal.aborted)return n(new h.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function _(){o.abort()}o.onload=function(){var f={statusText:o.statusText,headers:G(o.getAllResponseHeaders()||"")};s.url.indexOf("file://")===0&&(o.status<200||o.status>599)?f.status=200:f.status=o.status,f.url="responseURL"in o?o.responseURL:f.headers.get("X-Request-URL");var m="response"in o?o.response:o.responseText;setTimeout(function(){r(new c(m,f))},0)},o.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request timed out"))},0)},o.onabort=function(){setTimeout(function(){n(new h.DOMException("Aborted","AbortError"))},0)};function x(f){try{return f===""&&a.location.href?a.location.href:f}catch{return f}}if(o.open(s.method,x(s.url),!0),s.credentials==="include"?o.withCredentials=!0:s.credentials==="omit"&&(o.withCredentials=!1),"responseType"in o&&(u.blob?o.responseType="blob":u.arrayBuffer&&(o.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof i||a.Headers&&t.headers instanceof a.Headers)){var j=[];Object.getOwnPropertyNames(t.headers).forEach(function(f){j.push(v(f)),o.setRequestHeader(f,T(t.headers[f]))}),s.headers.forEach(function(f,m){j.indexOf(m)===-1&&o.setRequestHeader(m,f)})}else s.headers.forEach(function(f,m){o.setRequestHeader(m,f)});s.signal&&(s.signal.addEventListener("abort",_),o.onreadystatechange=function(){o.readyState===4&&s.signal.removeEventListener("abort",_)}),o.send(typeof s._bodyInit>"u"?null:s._bodyInit)})}return P.polyfill=!0,a.fetch||(a.fetch=P,a.Headers=i,a.Request=w,a.Response=c),h.Headers=i,h.Request=w,h.Response=c,h.fetch=P,h})({})})(y),y.fetch.ponyfill=!0,delete y.fetch.polyfill;var l=b.fetch?b:y;d=l.fetch,d.default=l.fetch,d.fetch=l.fetch,d.Headers=l.Headers,d.Request=l.Request,d.Response=l.Response,g.exports=d})(E,E.exports)),E.exports}var S=Z();const K=X(S),W=J({__proto__:null,default:K},[S]);export{W as b};
|