@aikaara/chat-sdk 0.9.7 → 0.9.8
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/dist/{MountTenant-DwtICVv9.mjs → MountTenant-10ae8jdI.mjs} +760 -756
- package/dist/{MountTenant-7pu-Zp8Y.cjs → MountTenant-Ck6mdFAs.cjs} +38 -38
- package/dist/cdn/aikaara-chat.iife.js +44 -44
- package/dist/headless.cjs +1 -1
- package/dist/headless.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class ml {
|
|
2
2
|
identifier;
|
|
3
3
|
callbacks = {};
|
|
4
4
|
sendFn;
|
|
@@ -37,7 +37,7 @@ class pl {
|
|
|
37
37
|
this.callbacks.rejected?.();
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
class
|
|
40
|
+
class lo {
|
|
41
41
|
ws = null;
|
|
42
42
|
url;
|
|
43
43
|
subscriptions = /* @__PURE__ */ new Map();
|
|
@@ -63,7 +63,7 @@ class ao {
|
|
|
63
63
|
this.ws && (this.ws.onclose = null, this.ws.close(), this.ws = null), this.subscriptions.forEach((e) => e._notifyDisconnected()), this.subscriptions.clear();
|
|
64
64
|
}
|
|
65
65
|
subscribe(e) {
|
|
66
|
-
const t = JSON.stringify(e), r = new
|
|
66
|
+
const t = JSON.stringify(e), r = new ml(t, (a) => {
|
|
67
67
|
this.send({
|
|
68
68
|
command: "message",
|
|
69
69
|
identifier: t,
|
|
@@ -142,7 +142,7 @@ class ao {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
class
|
|
145
|
+
class Os {
|
|
146
146
|
handlers = /* @__PURE__ */ new Map();
|
|
147
147
|
on(e, t) {
|
|
148
148
|
return this.handlers.has(e) || this.handlers.set(e, /* @__PURE__ */ new Set()), this.handlers.get(e).add(t), () => this.off(e, t);
|
|
@@ -163,8 +163,8 @@ class Ts {
|
|
|
163
163
|
this.handlers.clear();
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
const
|
|
167
|
-
class
|
|
166
|
+
const bl = 1e3, yl = 10, vl = 400, wl = 600, co = "#6366f1", _l = 12, kl = "system-ui, -apple-system, sans-serif", uo = "Type a message...", Sl = "bottom-right", El = "light", xl = { x: 20, y: 20 }, Fr = "aikaara_conversation_id";
|
|
167
|
+
class Al extends Os {
|
|
168
168
|
client;
|
|
169
169
|
config;
|
|
170
170
|
state = "disconnected";
|
|
@@ -173,7 +173,7 @@ class El extends Ts {
|
|
|
173
173
|
constructor(e) {
|
|
174
174
|
super(), this.config = e;
|
|
175
175
|
const t = this.buildWsUrl(e.baseUrl, e.userToken);
|
|
176
|
-
this.client = new
|
|
176
|
+
this.client = new lo(t);
|
|
177
177
|
}
|
|
178
178
|
async connect() {
|
|
179
179
|
this.setState("connecting");
|
|
@@ -220,17 +220,17 @@ class El extends Ts {
|
|
|
220
220
|
this.state !== e && (this.state = e, this.emit("connection:state", e));
|
|
221
221
|
}
|
|
222
222
|
scheduleReconnect() {
|
|
223
|
-
const e = this.config.maxReconnectAttempts ??
|
|
223
|
+
const e = this.config.maxReconnectAttempts ?? yl;
|
|
224
224
|
if (this.reconnectAttempt >= e) {
|
|
225
225
|
this.emit("error", new Error("Max reconnection attempts reached"));
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
228
|
this.setState("reconnecting");
|
|
229
|
-
const r = (this.config.reconnectInterval ??
|
|
229
|
+
const r = (this.config.reconnectInterval ?? bl) * Math.pow(2, this.reconnectAttempt);
|
|
230
230
|
this.reconnectAttempt++, this.reconnectTimer = setTimeout(async () => {
|
|
231
231
|
try {
|
|
232
232
|
const a = this.buildWsUrl(this.config.baseUrl, this.config.userToken);
|
|
233
|
-
this.client = new
|
|
233
|
+
this.client = new lo(a), await this.connect();
|
|
234
234
|
} catch {
|
|
235
235
|
}
|
|
236
236
|
}, r);
|
|
@@ -246,7 +246,7 @@ class El extends Ts {
|
|
|
246
246
|
return `${e.replace(/^http/, "ws")}/cable?token=${t}`;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
class
|
|
249
|
+
class Il {
|
|
250
250
|
baseUrl;
|
|
251
251
|
apiKey;
|
|
252
252
|
authToken;
|
|
@@ -353,7 +353,7 @@ class xl {
|
|
|
353
353
|
return r && (n.body = JSON.stringify(r)), fetch(e, n);
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
class
|
|
356
|
+
class Tl {
|
|
357
357
|
_messages = [];
|
|
358
358
|
optimisticCounter = 0;
|
|
359
359
|
get messages() {
|
|
@@ -400,7 +400,7 @@ class Al {
|
|
|
400
400
|
const r = e.externalId ? this._messages.find((n) => n.externalId && n.externalId === e.externalId) : void 0;
|
|
401
401
|
if (r)
|
|
402
402
|
return Object.assign(r, e, { id: r.id }), { message: r, deduped: !0 };
|
|
403
|
-
const a =
|
|
403
|
+
const a = ho(this._messages, e);
|
|
404
404
|
return a ? (Object.assign(a, e, { id: a.id }), { message: a, deduped: !0 }) : (this._messages.push(e), { message: e, deduped: !1 });
|
|
405
405
|
}
|
|
406
406
|
updateMessageStatus(e, t) {
|
|
@@ -441,48 +441,75 @@ class Al {
|
|
|
441
441
|
this._messages.push(e);
|
|
442
442
|
}
|
|
443
443
|
setMessages(e) {
|
|
444
|
-
|
|
444
|
+
const t = [];
|
|
445
|
+
for (const r of e) {
|
|
446
|
+
const a = ho(t, r);
|
|
447
|
+
if (a) {
|
|
448
|
+
const n = Or(a), i = Or(r);
|
|
449
|
+
!n && i && Object.assign(a, r, { id: a.id });
|
|
450
|
+
continue;
|
|
451
|
+
}
|
|
452
|
+
t.push({ ...r });
|
|
453
|
+
}
|
|
454
|
+
this._messages = t;
|
|
445
455
|
}
|
|
446
456
|
clear() {
|
|
447
457
|
this._messages = [];
|
|
448
458
|
}
|
|
449
459
|
}
|
|
450
|
-
function
|
|
460
|
+
function ho(c, e, t = 15e3) {
|
|
451
461
|
const r = e.attachments && e.attachments[0], a = (e.metadata ?? {}).attributes;
|
|
452
462
|
if (!(!!r || !!(a && a.fileMessage))) return null;
|
|
453
|
-
const i =
|
|
463
|
+
const i = Or(e), o = fo(e), s = po(e);
|
|
454
464
|
if (!i && !o && !s) return null;
|
|
455
465
|
const l = new Date(e.createdAt).getTime();
|
|
456
466
|
for (let u = c.length - 1; u >= 0; u--) {
|
|
457
467
|
const d = c[u], p = d.attachments && d.attachments[0], y = (d.metadata ?? {}).attributes;
|
|
458
468
|
if (!(!!p || !!(y && y.fileMessage)) || Math.abs(l - new Date(d.createdAt).getTime()) > t) continue;
|
|
459
|
-
const m =
|
|
469
|
+
const m = Or(d);
|
|
460
470
|
if (i && m && i === m) return d;
|
|
461
|
-
const b =
|
|
471
|
+
const b = fo(d);
|
|
462
472
|
if (o && b && o === b) return d;
|
|
463
|
-
const k =
|
|
473
|
+
const k = po(d);
|
|
464
474
|
if (s && k && s === k) return d;
|
|
465
475
|
}
|
|
466
476
|
return null;
|
|
467
477
|
}
|
|
468
|
-
function
|
|
478
|
+
function fo(c) {
|
|
469
479
|
const e = c.attachments && c.attachments[0];
|
|
470
480
|
if (e && typeof e.fileUrl == "string")
|
|
471
481
|
return e.fileUrl;
|
|
482
|
+
const t = Cs(c);
|
|
483
|
+
if (t) return t;
|
|
472
484
|
}
|
|
473
|
-
function
|
|
485
|
+
function po(c) {
|
|
474
486
|
const e = c.attachments && c.attachments[0];
|
|
475
487
|
if (e && typeof e.fileName == "string")
|
|
476
488
|
return e.fileName;
|
|
489
|
+
const t = (c.metadata ?? {}).attributes;
|
|
490
|
+
if (t && typeof t.fileName == "string") return t.fileName;
|
|
491
|
+
const n = c.template?.payload?.elements?.[0]?.description;
|
|
492
|
+
if (typeof n == "string" && n) return n;
|
|
477
493
|
}
|
|
478
|
-
function
|
|
494
|
+
function Or(c) {
|
|
479
495
|
const e = c.attachments && c.attachments[0];
|
|
480
496
|
if (e && typeof e.cloudFileId == "string")
|
|
481
497
|
return e.cloudFileId;
|
|
482
498
|
const t = (c.metadata ?? {}).attributes;
|
|
483
499
|
if (t && typeof t.cloudFileId == "string") return t.cloudFileId;
|
|
500
|
+
const r = Cs(c);
|
|
501
|
+
if (r) {
|
|
502
|
+
const a = /[?&]cloudFileId=([^&]+)/.exec(r);
|
|
503
|
+
if (a) return decodeURIComponent(a[1]);
|
|
504
|
+
}
|
|
484
505
|
}
|
|
485
|
-
|
|
506
|
+
function Cs(c) {
|
|
507
|
+
const e = c.template;
|
|
508
|
+
if (e?.templateId !== "7") return;
|
|
509
|
+
const r = e.payload?.elements?.[0]?.action?.url;
|
|
510
|
+
return typeof r == "string" ? r : void 0;
|
|
511
|
+
}
|
|
512
|
+
class Ol {
|
|
486
513
|
_conversationId;
|
|
487
514
|
persist;
|
|
488
515
|
constructor(e, t = !0) {
|
|
@@ -497,42 +524,42 @@ class Tl {
|
|
|
497
524
|
clear() {
|
|
498
525
|
if (this._conversationId = null, this.persist)
|
|
499
526
|
try {
|
|
500
|
-
localStorage.removeItem(
|
|
527
|
+
localStorage.removeItem(Fr);
|
|
501
528
|
} catch {
|
|
502
529
|
}
|
|
503
530
|
}
|
|
504
531
|
loadFromStorage() {
|
|
505
532
|
if (!this.persist) return null;
|
|
506
533
|
try {
|
|
507
|
-
return localStorage.getItem(
|
|
534
|
+
return localStorage.getItem(Fr);
|
|
508
535
|
} catch {
|
|
509
536
|
return null;
|
|
510
537
|
}
|
|
511
538
|
}
|
|
512
539
|
saveToStorage(e) {
|
|
513
540
|
try {
|
|
514
|
-
localStorage.setItem(
|
|
541
|
+
localStorage.setItem(Fr, e);
|
|
515
542
|
} catch {
|
|
516
543
|
}
|
|
517
544
|
}
|
|
518
545
|
}
|
|
519
|
-
var
|
|
520
|
-
for (var t in e)
|
|
521
|
-
},
|
|
522
|
-
if (e && typeof e == "object" || typeof e == "function") for (let a of
|
|
546
|
+
var Vi = Object.defineProperty, Cl = Object.getOwnPropertyDescriptor, Pl = Object.getOwnPropertyNames, Ml = Object.prototype.hasOwnProperty, He = (c, e) => () => (c && (e = c(c = 0)), e), pe = (c, e) => () => (e || c((e = { exports: {} }).exports, e), e.exports), Lt = (c, e) => {
|
|
547
|
+
for (var t in e) Vi(c, t, { get: e[t], enumerable: !0 });
|
|
548
|
+
}, Rl = (c, e, t, r) => {
|
|
549
|
+
if (e && typeof e == "object" || typeof e == "function") for (let a of Pl(e)) !Ml.call(c, a) && a !== t && Vi(c, a, { get: () => e[a], enumerable: !(r = Cl(e, a)) || r.enumerable });
|
|
523
550
|
return c;
|
|
524
|
-
}, Ce = (c) =>
|
|
551
|
+
}, Ce = (c) => Rl(Vi({}, "__esModule", { value: !0 }), c), le = He(() => {
|
|
525
552
|
}), Pe = {};
|
|
526
|
-
Lt(Pe, { _debugEnd: () =>
|
|
527
|
-
function
|
|
553
|
+
Lt(Pe, { _debugEnd: () => Tn, _debugProcess: () => In, _events: () => qn, _eventsCount: () => Hn, _exiting: () => dn, _fatalExceptions: () => En, _getActiveHandles: () => Us, _getActiveRequests: () => Ns, _kill: () => mn, _linkedBinding: () => js, _maxListeners: () => Wn, _preload_modules: () => Dn, _rawDebug: () => un, _startProfilerIdleNotifier: () => On, _stopProfilerIdleNotifier: () => Cn, _tickCallback: () => An, abort: () => jn, addListener: () => zn, allowedNodeEnvironmentFlags: () => kn, arch: () => Yr, argv: () => Xr, argv0: () => Fn, assert: () => Bs, binding: () => nn, browser: () => cn, chdir: () => an, config: () => pn, cpuUsage: () => qt, cwd: () => sn, debugPort: () => Bn, default: () => Yi, dlopen: () => Ls, domain: () => fn, emit: () => Qn, emitWarning: () => rn, env: () => Jr, execArgv: () => Zr, execPath: () => Un, exit: () => wn, features: () => Sn, hasUncaughtExceptionCaptureCallback: () => Fs, hrtime: () => ir, kill: () => vn, listeners: () => $s, memoryUsage: () => yn, moduleLoadList: () => hn, nextTick: () => Ms, off: () => Vn, on: () => nt, once: () => Kn, openStdin: () => _n, pid: () => Ln, platform: () => Qr, ppid: () => Nn, prependListener: () => Jn, prependOnceListener: () => Xn, reallyExit: () => gn, release: () => ln, removeAllListeners: () => Yn, removeListener: () => Gn, resourceUsage: () => bn, setSourceMapsEnabled: () => $n, setUncaughtExceptionCaptureCallback: () => xn, stderr: () => Mn, stdin: () => Rn, stdout: () => Pn, title: () => Gr, umask: () => on, uptime: () => Ds, version: () => en, versions: () => tn });
|
|
554
|
+
function Gi(c) {
|
|
528
555
|
throw new Error("Node.js process " + c + " is not supported by JSPM core outside of Node.js");
|
|
529
556
|
}
|
|
530
|
-
function
|
|
531
|
-
!St || !_t || (St = !1, _t.length ? et = _t.concat(et) : Vt = -1, et.length &&
|
|
557
|
+
function jl() {
|
|
558
|
+
!St || !_t || (St = !1, _t.length ? et = _t.concat(et) : Vt = -1, et.length && Ps());
|
|
532
559
|
}
|
|
533
|
-
function
|
|
560
|
+
function Ps() {
|
|
534
561
|
if (!St) {
|
|
535
|
-
var c = setTimeout(
|
|
562
|
+
var c = setTimeout(jl, 0);
|
|
536
563
|
St = !0;
|
|
537
564
|
for (var e = et.length; e; ) {
|
|
538
565
|
for (_t = et, et = []; ++Vt < e; ) _t && _t[Vt].run();
|
|
@@ -541,35 +568,35 @@ function Os() {
|
|
|
541
568
|
_t = null, St = !1, clearTimeout(c);
|
|
542
569
|
}
|
|
543
570
|
}
|
|
544
|
-
function
|
|
571
|
+
function Ms(c) {
|
|
545
572
|
var e = new Array(arguments.length - 1);
|
|
546
573
|
if (arguments.length > 1) for (var t = 1; t < arguments.length; t++) e[t - 1] = arguments[t];
|
|
547
|
-
et.push(new
|
|
574
|
+
et.push(new Rs(c, e)), et.length === 1 && !St && setTimeout(Ps, 0);
|
|
548
575
|
}
|
|
549
|
-
function
|
|
576
|
+
function Rs(c, e) {
|
|
550
577
|
this.fun = c, this.array = e;
|
|
551
578
|
}
|
|
552
579
|
function Be() {
|
|
553
580
|
}
|
|
554
|
-
function
|
|
555
|
-
|
|
581
|
+
function js(c) {
|
|
582
|
+
Gi("_linkedBinding");
|
|
556
583
|
}
|
|
557
|
-
function
|
|
558
|
-
|
|
584
|
+
function Ls(c) {
|
|
585
|
+
Gi("dlopen");
|
|
559
586
|
}
|
|
560
|
-
function
|
|
587
|
+
function Ns() {
|
|
561
588
|
return [];
|
|
562
589
|
}
|
|
563
|
-
function
|
|
590
|
+
function Us() {
|
|
564
591
|
return [];
|
|
565
592
|
}
|
|
566
|
-
function
|
|
593
|
+
function Bs(c, e) {
|
|
567
594
|
if (!c) throw new Error(e || "assertion error");
|
|
568
595
|
}
|
|
569
|
-
function
|
|
596
|
+
function Fs() {
|
|
570
597
|
return !1;
|
|
571
598
|
}
|
|
572
|
-
function
|
|
599
|
+
function Ds() {
|
|
573
600
|
return ot.now() / 1e3;
|
|
574
601
|
}
|
|
575
602
|
function ir(c) {
|
|
@@ -577,35 +604,35 @@ function ir(c) {
|
|
|
577
604
|
return c && (r = r - c[0], a = a - c[1], a < 0 && (r--, a += or)), [r, a];
|
|
578
605
|
}
|
|
579
606
|
function nt() {
|
|
580
|
-
return
|
|
607
|
+
return Yi;
|
|
581
608
|
}
|
|
582
|
-
function
|
|
609
|
+
function $s(c) {
|
|
583
610
|
return [];
|
|
584
611
|
}
|
|
585
|
-
var et, St, _t, Vt,
|
|
586
|
-
le(), ue(), ce(), et = [], St = !1, Vt = -1,
|
|
612
|
+
var et, St, _t, Vt, Gr, Yr, Qr, Jr, Xr, Zr, en, tn, rn, nn, on, sn, an, ln, cn, un, hn, fn, dn, pn, gn, mn, qt, bn, yn, vn, wn, _n, kn, Sn, En, xn, An, In, Tn, On, Cn, Pn, Mn, Rn, jn, Ln, Nn, Un, Bn, Fn, Dn, $n, ot, Dr, or, Wn, qn, Hn, zn, Kn, Vn, Gn, Yn, Qn, Jn, Xn, Yi, Ll = He(() => {
|
|
613
|
+
le(), ue(), ce(), et = [], St = !1, Vt = -1, Rs.prototype.run = function() {
|
|
587
614
|
this.fun.apply(null, this.array);
|
|
588
|
-
},
|
|
615
|
+
}, Gr = "browser", Yr = "x64", Qr = "browser", Jr = { PATH: "/usr/bin", LANG: typeof navigator < "u" ? navigator.language + ".UTF-8" : void 0, PWD: "/", HOME: "/home", TMP: "/tmp" }, Xr = ["/usr/bin/node"], Zr = [], en = "v16.8.0", tn = {}, rn = function(c, e) {
|
|
589
616
|
console.warn((e ? e + ": " : "") + c);
|
|
590
|
-
}, rn = function(c) {
|
|
591
|
-
Vi("binding");
|
|
592
617
|
}, nn = function(c) {
|
|
618
|
+
Gi("binding");
|
|
619
|
+
}, on = function(c) {
|
|
593
620
|
return 0;
|
|
594
|
-
},
|
|
621
|
+
}, sn = function() {
|
|
595
622
|
return "/";
|
|
596
|
-
},
|
|
597
|
-
},
|
|
623
|
+
}, an = function(c) {
|
|
624
|
+
}, ln = { name: "node", sourceUrl: "", headersUrl: "", libUrl: "" }, cn = !0, un = Be, hn = [], fn = {}, dn = !1, pn = {}, gn = Be, mn = Be, qt = function() {
|
|
598
625
|
return {};
|
|
599
|
-
},
|
|
626
|
+
}, bn = qt, yn = qt, vn = Be, wn = Be, _n = Be, kn = {}, Sn = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, En = Be, xn = Be, An = Be, In = Be, Tn = Be, On = Be, Cn = Be, Pn = void 0, Mn = void 0, Rn = void 0, jn = Be, Ln = 2, Nn = 1, Un = "/bin/usr/node", Bn = 9229, Fn = "node", Dn = [], $n = Be, ot = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, ot.now === void 0 && (Dr = Date.now(), ot.timing && ot.timing.navigationStart && (Dr = ot.timing.navigationStart), ot.now = () => Date.now() - Dr), or = 1e9, ir.bigint = function(c) {
|
|
600
627
|
var e = ir(c);
|
|
601
628
|
return typeof BigInt > "u" ? e[0] * or + e[1] : BigInt(e[0] * or) + BigInt(e[1]);
|
|
602
|
-
},
|
|
629
|
+
}, Wn = 10, qn = {}, Hn = 0, zn = nt, Kn = nt, Vn = nt, Gn = nt, Yn = nt, Qn = Be, Jn = nt, Xn = nt, Yi = { version: en, versions: tn, arch: Yr, platform: Qr, browser: cn, release: ln, _rawDebug: un, moduleLoadList: hn, binding: nn, _linkedBinding: js, _events: qn, _eventsCount: Hn, _maxListeners: Wn, on: nt, addListener: zn, once: Kn, off: Vn, removeListener: Gn, removeAllListeners: Yn, emit: Qn, prependListener: Jn, prependOnceListener: Xn, listeners: $s, domain: fn, _exiting: dn, config: pn, dlopen: Ls, uptime: Ds, _getActiveRequests: Ns, _getActiveHandles: Us, reallyExit: gn, _kill: mn, cpuUsage: qt, resourceUsage: bn, memoryUsage: yn, kill: vn, exit: wn, openStdin: _n, allowedNodeEnvironmentFlags: kn, assert: Bs, features: Sn, _fatalExceptions: En, setUncaughtExceptionCaptureCallback: xn, hasUncaughtExceptionCaptureCallback: Fs, emitWarning: rn, nextTick: Ms, _tickCallback: An, _debugProcess: In, _debugEnd: Tn, _startProfilerIdleNotifier: On, _stopProfilerIdleNotifier: Cn, stdout: Pn, stdin: Rn, stderr: Mn, abort: jn, umask: on, chdir: an, cwd: sn, env: Jr, title: Gr, argv: Xr, execArgv: Zr, pid: Ln, ppid: Nn, execPath: Un, debugPort: Bn, hrtime: ir, argv0: Fn, _preload_modules: Dn, setSourceMapsEnabled: $n };
|
|
603
630
|
}), ce = He(() => {
|
|
604
|
-
|
|
631
|
+
Ll();
|
|
605
632
|
});
|
|
606
|
-
function
|
|
607
|
-
if (
|
|
608
|
-
|
|
633
|
+
function Nl() {
|
|
634
|
+
if (Zn) return Ct;
|
|
635
|
+
Zn = !0, Ct.byteLength = o, Ct.toByteArray = l, Ct.fromByteArray = p;
|
|
609
636
|
for (var c = [], e = [], t = typeof Uint8Array < "u" ? Uint8Array : Array, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = 0, n = r.length; a < n; ++a) c[a] = r[a], e[r.charCodeAt(a)] = a;
|
|
610
637
|
e[45] = 62, e[95] = 63;
|
|
611
638
|
function i(y) {
|
|
@@ -641,8 +668,8 @@ function Ll() {
|
|
|
641
668
|
}
|
|
642
669
|
return Ct;
|
|
643
670
|
}
|
|
644
|
-
function
|
|
645
|
-
return
|
|
671
|
+
function Ul() {
|
|
672
|
+
return ei ? Ht : (ei = !0, Ht.read = function(c, e, t, r, a) {
|
|
646
673
|
var n, i, o = a * 8 - r - 1, s = (1 << o) - 1, l = s >> 1, u = -7, d = t ? a - 1 : 0, p = t ? -1 : 1, y = c[e + d];
|
|
647
674
|
for (d += p, n = y & (1 << -u) - 1, y >>= -u, u += o; u > 0; n = n * 256 + c[e + d], d += p, u -= 8) ;
|
|
648
675
|
for (i = n & (1 << -u) - 1, n >>= -u, u += r; u > 0; i = i * 256 + c[e + d], d += p, u -= 8) ;
|
|
@@ -659,10 +686,10 @@ function Nl() {
|
|
|
659
686
|
c[t + y - f] |= m * 128;
|
|
660
687
|
}, Ht);
|
|
661
688
|
}
|
|
662
|
-
function
|
|
663
|
-
if (
|
|
664
|
-
|
|
665
|
-
let c =
|
|
689
|
+
function Bl() {
|
|
690
|
+
if (ti) return pt;
|
|
691
|
+
ti = !0;
|
|
692
|
+
let c = Nl(), e = Ul(), t = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
|
|
666
693
|
pt.Buffer = i, pt.SlowBuffer = k, pt.INSPECT_MAX_BYTES = 50;
|
|
667
694
|
let r = 2147483647;
|
|
668
695
|
pt.kMaxLength = r, i.TYPED_ARRAY_SUPPORT = a(), !i.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
|
|
@@ -1417,12 +1444,12 @@ function Ul() {
|
|
|
1417
1444
|
}
|
|
1418
1445
|
return pt;
|
|
1419
1446
|
}
|
|
1420
|
-
var Ct,
|
|
1421
|
-
le(), ue(), ce(), Ct = {},
|
|
1447
|
+
var Ct, Zn, Ht, ei, pt, ti, Fl = He(() => {
|
|
1448
|
+
le(), ue(), ce(), Ct = {}, Zn = !1, Ht = {}, ei = !1, pt = {}, ti = !1;
|
|
1422
1449
|
}), Le = {};
|
|
1423
|
-
Lt(Le, { Buffer: () =>
|
|
1424
|
-
var it,
|
|
1425
|
-
le(), ue(), ce(),
|
|
1450
|
+
Lt(Le, { Buffer: () => Cr, INSPECT_MAX_BYTES: () => Ws, default: () => it, kMaxLength: () => qs });
|
|
1451
|
+
var it, Cr, Ws, qs, Ne = He(() => {
|
|
1452
|
+
le(), ue(), ce(), Fl(), it = Bl(), it.Buffer, it.SlowBuffer, it.INSPECT_MAX_BYTES, it.kMaxLength, Cr = it.Buffer, Ws = it.INSPECT_MAX_BYTES, qs = it.kMaxLength;
|
|
1426
1453
|
}), ue = He(() => {
|
|
1427
1454
|
Ne();
|
|
1428
1455
|
}), Re = pe((c, e) => {
|
|
@@ -1487,7 +1514,7 @@ var it, Or, Ds, $s, Ne = He(() => {
|
|
|
1487
1514
|
}, Symbol, SymbolFor: Symbol.for, SymbolAsyncIterator: Symbol.asyncIterator, SymbolHasInstance: Symbol.hasInstance, SymbolIterator: Symbol.iterator, SymbolDispose: Symbol.dispose || /* @__PURE__ */ Symbol("Symbol.dispose"), SymbolAsyncDispose: Symbol.asyncDispose || /* @__PURE__ */ Symbol("Symbol.asyncDispose"), TypedArrayPrototypeSet(r, a, n) {
|
|
1488
1515
|
return r.set(a, n);
|
|
1489
1516
|
}, Boolean, Uint8Array };
|
|
1490
|
-
}),
|
|
1517
|
+
}), Hs = pe((c, e) => {
|
|
1491
1518
|
le(), ue(), ce(), e.exports = { format(t, ...r) {
|
|
1492
1519
|
return t.replace(/%([sdifj])/g, function(...[a, n]) {
|
|
1493
1520
|
let i = r.shift();
|
|
@@ -1513,7 +1540,7 @@ var it, Or, Ds, $s, Ne = He(() => {
|
|
|
1513
1540
|
} };
|
|
1514
1541
|
}), We = pe((c, e) => {
|
|
1515
1542
|
le(), ue(), ce();
|
|
1516
|
-
var { format: t, inspect: r } =
|
|
1543
|
+
var { format: t, inspect: r } = Hs(), { AggregateError: a } = Re(), n = globalThis.AggregateError || a, i = /* @__PURE__ */ Symbol("kIsNodeError"), o = ["string", "function", "number", "object", "Function", "Object", "boolean", "bigint", "symbol"], s = /^([A-Z][a-z0-9]*)+$/, l = "__node_internal_", u = {};
|
|
1517
1544
|
function d(g, _) {
|
|
1518
1545
|
if (!g) throw new u.ERR_INTERNAL_ASSERTION(_);
|
|
1519
1546
|
}
|
|
@@ -1668,10 +1695,10 @@ var it, Or, Ds, $s, Ne = He(() => {
|
|
|
1668
1695
|
var { AbortController: t, AbortSignal: r } = typeof self < "u" ? self : typeof window < "u" ? window : void 0;
|
|
1669
1696
|
e.exports = t, e.exports.AbortSignal = r, e.exports.default = t;
|
|
1670
1697
|
}), bt = {};
|
|
1671
|
-
Lt(bt, { EventEmitter: () =>
|
|
1672
|
-
function
|
|
1673
|
-
if (
|
|
1674
|
-
|
|
1698
|
+
Lt(bt, { EventEmitter: () => zs, default: () => Pt, defaultMaxListeners: () => Ks, init: () => Vs, listenerCount: () => Gs, on: () => Ys, once: () => Qs });
|
|
1699
|
+
function Dl() {
|
|
1700
|
+
if (ri) return zt;
|
|
1701
|
+
ri = !0;
|
|
1675
1702
|
var c = typeof Reflect == "object" ? Reflect : null, e = c && typeof c.apply == "function" ? c.apply : function(S, v, x) {
|
|
1676
1703
|
return Function.prototype.apply.call(S, v, x);
|
|
1677
1704
|
}, t;
|
|
@@ -1840,8 +1867,8 @@ function Fl() {
|
|
|
1840
1867
|
}
|
|
1841
1868
|
return zt;
|
|
1842
1869
|
}
|
|
1843
|
-
var zt,
|
|
1844
|
-
le(), ue(), ce(), zt = {},
|
|
1870
|
+
var zt, ri, Pt, zs, Ks, Vs, Gs, Ys, Qs, xt = He(() => {
|
|
1871
|
+
le(), ue(), ce(), zt = {}, ri = !1, Pt = Dl(), Pt.once, Pt.once = function(c, e) {
|
|
1845
1872
|
return new Promise((t, r) => {
|
|
1846
1873
|
function a(...i) {
|
|
1847
1874
|
n !== void 0 && c.removeListener("error", n), t(i);
|
|
@@ -1879,10 +1906,10 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
1879
1906
|
let u = r.shift();
|
|
1880
1907
|
u ? u.reject(l) : a = l, i.return();
|
|
1881
1908
|
}
|
|
1882
|
-
}, { EventEmitter:
|
|
1909
|
+
}, { EventEmitter: zs, defaultMaxListeners: Ks, init: Vs, listenerCount: Gs, on: Ys, once: Qs } = Pt;
|
|
1883
1910
|
}), qe = pe((c, e) => {
|
|
1884
1911
|
le(), ue(), ce();
|
|
1885
|
-
var t = (Ne(), Ce(Le)), { format: r, inspect: a } =
|
|
1912
|
+
var t = (Ne(), Ce(Le)), { format: r, inspect: a } = Hs(), { codes: { ERR_INVALID_ARG_TYPE: n } } = We(), { kResistStopPropagation: i, AggregateError: o, SymbolDispose: s } = Re(), l = globalThis.AbortSignal || Yt().AbortSignal, u = globalThis.AbortController || Yt().AbortController, d = Object.getPrototypeOf(async function() {
|
|
1886
1913
|
}).constructor, p = globalThis.Blob || t.Blob, y = typeof p < "u" ? function(b) {
|
|
1887
1914
|
return b instanceof p;
|
|
1888
1915
|
} : function(b) {
|
|
@@ -2417,7 +2444,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
2417
2444
|
!T || s(T) || (!W && !l(T) && (W = new n()), u(T) ? (T.socket = null, T.destroy(W)) : I(T) ? T.abort() : I(T.req) ? T.req.abort() : typeof T.destroy == "function" ? T.destroy(W) : typeof T.close == "function" ? T.close() : W ? t.nextTick(C, T, W) : t.nextTick(M, T), T.destroyed || (T[o] = !0));
|
|
2418
2445
|
}
|
|
2419
2446
|
e.exports = { construct: v, destroyer: B, destroy: f, undestroy: _, errorOrDestroy: S };
|
|
2420
|
-
}),
|
|
2447
|
+
}), Qi = pe((c, e) => {
|
|
2421
2448
|
le(), ue(), ce();
|
|
2422
2449
|
var { ArrayIsArray: t, ObjectSetPrototypeOf: r } = Re(), { EventEmitter: a } = (xt(), Ce(bt));
|
|
2423
2450
|
function n(o) {
|
|
@@ -2454,7 +2481,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
2454
2481
|
!o._events || !o._events[s] ? o.on(s, l) : t(o._events[s]) ? o._events[s].unshift(l) : o._events[s] = [l, o._events[s]];
|
|
2455
2482
|
}
|
|
2456
2483
|
e.exports = { Stream: n, prependListener: i };
|
|
2457
|
-
}),
|
|
2484
|
+
}), Rr = pe((c, e) => {
|
|
2458
2485
|
le(), ue(), ce();
|
|
2459
2486
|
var { SymbolDispose: t } = Re(), { AbortError: r, codes: a } = We(), { isNodeStream: n, isWebStream: i, kControllerErrorFunction: o } = ct(), s = yt(), { ERR_INVALID_ARG_TYPE: l } = a, u, d = (p, y) => {
|
|
2460
2487
|
if (typeof p != "object" || !("aborted" in p)) throw new l(y, "AbortSignal", p);
|
|
@@ -2477,7 +2504,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
2477
2504
|
}
|
|
2478
2505
|
return y;
|
|
2479
2506
|
};
|
|
2480
|
-
}),
|
|
2507
|
+
}), $l = pe((c, e) => {
|
|
2481
2508
|
le(), ue(), ce();
|
|
2482
2509
|
var { StringPrototypeSlice: t, SymbolIterator: r, TypedArrayPrototypeSet: a, Uint8Array: n } = Re(), { Buffer: i } = (Ne(), Ce(Le)), { inspect: o } = qe();
|
|
2483
2510
|
e.exports = class {
|
|
@@ -2556,7 +2583,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
2556
2583
|
return o(this, { ...l, depth: 0, customInspect: !1 });
|
|
2557
2584
|
}
|
|
2558
2585
|
};
|
|
2559
|
-
}),
|
|
2586
|
+
}), jr = pe((c, e) => {
|
|
2560
2587
|
le(), ue(), ce();
|
|
2561
2588
|
var { MathFloor: t, NumberIsInteger: r } = Re(), { validateInteger: a } = Qt(), { ERR_INVALID_ARG_VALUE: n } = We().codes, i = 16 * 1024, o = 16;
|
|
2562
2589
|
function s(p, y, f) {
|
|
@@ -2580,7 +2607,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
2580
2607
|
return l(p.objectMode);
|
|
2581
2608
|
}
|
|
2582
2609
|
e.exports = { getHighWaterMark: d, getDefaultHighWaterMark: l, setDefaultHighWaterMark: u };
|
|
2583
|
-
}),
|
|
2610
|
+
}), Wl = pe((c, e) => {
|
|
2584
2611
|
le(), ue(), ce();
|
|
2585
2612
|
var t = (Ne(), Ce(Le)), r = t.Buffer;
|
|
2586
2613
|
function a(i, o) {
|
|
@@ -2604,9 +2631,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
2604
2631
|
if (typeof i != "number") throw new TypeError("Argument must be a number");
|
|
2605
2632
|
return t.SlowBuffer(i);
|
|
2606
2633
|
};
|
|
2607
|
-
}),
|
|
2634
|
+
}), ql = pe((c) => {
|
|
2608
2635
|
le(), ue(), ce();
|
|
2609
|
-
var e =
|
|
2636
|
+
var e = Wl().Buffer, t = e.isEncoding || function(g) {
|
|
2610
2637
|
switch (g = "" + g, g && g.toLowerCase()) {
|
|
2611
2638
|
case "hex":
|
|
2612
2639
|
case "utf8":
|
|
@@ -2750,7 +2777,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
2750
2777
|
function k(g) {
|
|
2751
2778
|
return g && g.length ? this.write(g) : "";
|
|
2752
2779
|
}
|
|
2753
|
-
}),
|
|
2780
|
+
}), Js = pe((c, e) => {
|
|
2754
2781
|
le(), ue(), ce();
|
|
2755
2782
|
var t = At(), { PromisePrototypeThen: r, SymbolAsyncIterator: a, SymbolIterator: n } = Re(), { Buffer: i } = (Ne(), Ce(Le)), { ERR_INVALID_ARG_TYPE: o, ERR_STREAM_NULL_VALUES: s } = We().codes;
|
|
2756
2783
|
function l(u, d, p) {
|
|
@@ -2799,13 +2826,13 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
2799
2826
|
return m;
|
|
2800
2827
|
}
|
|
2801
2828
|
e.exports = l;
|
|
2802
|
-
}),
|
|
2829
|
+
}), Lr = pe((c, e) => {
|
|
2803
2830
|
le(), ue(), ce();
|
|
2804
2831
|
var t = At(), { ArrayPrototypeIndexOf: r, NumberIsInteger: a, NumberIsNaN: n, NumberParseInt: i, ObjectDefineProperties: o, ObjectKeys: s, ObjectSetPrototypeOf: l, Promise: u, SafeSet: d, SymbolAsyncDispose: p, SymbolAsyncIterator: y, Symbol: f } = Re();
|
|
2805
2832
|
e.exports = se, se.ReadableState = ve;
|
|
2806
|
-
var { EventEmitter: m } = (xt(), Ce(bt)), { Stream: b, prependListener: k } =
|
|
2833
|
+
var { EventEmitter: m } = (xt(), Ce(bt)), { Stream: b, prependListener: k } = Qi(), { Buffer: g } = (Ne(), Ce(Le)), { addAbortSignal: _ } = Rr(), S = yt(), v = qe().debuglog("stream", (O) => {
|
|
2807
2834
|
v = O;
|
|
2808
|
-
}), x =
|
|
2835
|
+
}), x = $l(), E = Nt(), { getHighWaterMark: I, getDefaultHighWaterMark: M } = jr(), { aggregateTwoErrors: C, codes: { ERR_INVALID_ARG_TYPE: B, ERR_METHOD_NOT_IMPLEMENTED: T, ERR_OUT_OF_RANGE: W, ERR_STREAM_PUSH_AFTER_EOF: F, ERR_STREAM_UNSHIFT_AFTER_END_EVENT: N }, AbortError: ae } = We(), { validateObject: Y } = Qt(), K = f("kPaused"), { StringDecoder: re } = ql(), D = Js();
|
|
2809
2836
|
l(se.prototype, b.prototype), l(se, b);
|
|
2810
2837
|
var Z = () => {
|
|
2811
2838
|
}, { errorOrDestroy: P } = E, J = 1, be = 2, te = 4, we = 8, V = 16, L = 32, ne = 64, H = 128, G = 256, Q = 512, me = 1024, oe = 2048, R = 4096, $ = 8192, ee = 16384, fe = 32768, de = 65536, ye = 1 << 17, q = 1 << 18;
|
|
@@ -3155,11 +3182,11 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
3155
3182
|
E.destroyer(O, Ee), je(Ee);
|
|
3156
3183
|
} }).wrap(O);
|
|
3157
3184
|
};
|
|
3158
|
-
}),
|
|
3185
|
+
}), Ji = pe((c, e) => {
|
|
3159
3186
|
le(), ue(), ce();
|
|
3160
3187
|
var t = At(), { ArrayPrototypeSlice: r, Error: a, FunctionPrototypeSymbolHasInstance: n, ObjectDefineProperty: i, ObjectDefineProperties: o, ObjectSetPrototypeOf: s, StringPrototypeToLowerCase: l, Symbol: u, SymbolHasInstance: d } = Re();
|
|
3161
3188
|
e.exports = Y, Y.WritableState = N;
|
|
3162
|
-
var { EventEmitter: p } = (xt(), Ce(bt)), y =
|
|
3189
|
+
var { EventEmitter: p } = (xt(), Ce(bt)), y = Qi().Stream, { Buffer: f } = (Ne(), Ce(Le)), m = Nt(), { addAbortSignal: b } = Rr(), { getHighWaterMark: k, getDefaultHighWaterMark: g } = jr(), { ERR_INVALID_ARG_TYPE: _, ERR_METHOD_NOT_IMPLEMENTED: S, ERR_MULTIPLE_CALLBACK: v, ERR_STREAM_CANNOT_PIPE: x, ERR_STREAM_DESTROYED: E, ERR_STREAM_ALREADY_FINISHED: I, ERR_STREAM_NULL_VALUES: M, ERR_STREAM_WRITE_AFTER_END: C, ERR_UNKNOWN_ENCODING: B } = We().codes, { errorOrDestroy: T } = m;
|
|
3163
3190
|
s(Y.prototype, y.prototype), s(Y, y);
|
|
3164
3191
|
function W() {
|
|
3165
3192
|
}
|
|
@@ -3385,9 +3412,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
3385
3412
|
}, Y.toWeb = function(R) {
|
|
3386
3413
|
return oe().newWritableStreamFromStreamWritable(R);
|
|
3387
3414
|
};
|
|
3388
|
-
}),
|
|
3415
|
+
}), Hl = pe((c, e) => {
|
|
3389
3416
|
le(), ue(), ce();
|
|
3390
|
-
var t = At(), r = (Ne(), Ce(Le)), { isReadable: a, isWritable: n, isIterable: i, isNodeStream: o, isReadableNodeStream: s, isWritableNodeStream: l, isDuplexNodeStream: u, isReadableStream: d, isWritableStream: p } = ct(), y = yt(), { AbortError: f, codes: { ERR_INVALID_ARG_TYPE: m, ERR_INVALID_RETURN_VALUE: b } } = We(), { destroyer: k } = Nt(), g = at(), _ =
|
|
3417
|
+
var t = At(), r = (Ne(), Ce(Le)), { isReadable: a, isWritable: n, isIterable: i, isNodeStream: o, isReadableNodeStream: s, isWritableNodeStream: l, isDuplexNodeStream: u, isReadableStream: d, isWritableStream: p } = ct(), y = yt(), { AbortError: f, codes: { ERR_INVALID_ARG_TYPE: m, ERR_INVALID_RETURN_VALUE: b } } = We(), { destroyer: k } = Nt(), g = at(), _ = Lr(), S = Ji(), { createDeferredPromise: v } = qe(), x = Js(), E = globalThis.Blob || r.Blob, I = typeof E < "u" ? function(F) {
|
|
3391
3418
|
return F instanceof E;
|
|
3392
3419
|
} : function(F) {
|
|
3393
3420
|
return !1;
|
|
@@ -3513,7 +3540,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
3513
3540
|
le(), ue(), ce();
|
|
3514
3541
|
var { ObjectDefineProperties: t, ObjectGetOwnPropertyDescriptor: r, ObjectKeys: a, ObjectSetPrototypeOf: n } = Re();
|
|
3515
3542
|
e.exports = s;
|
|
3516
|
-
var i =
|
|
3543
|
+
var i = Lr(), o = Ji();
|
|
3517
3544
|
n(s.prototype, i.prototype), n(s, i);
|
|
3518
3545
|
{
|
|
3519
3546
|
let p = a(o.prototype);
|
|
@@ -3542,13 +3569,13 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
3542
3569
|
};
|
|
3543
3570
|
var d;
|
|
3544
3571
|
s.from = function(p) {
|
|
3545
|
-
return d || (d =
|
|
3572
|
+
return d || (d = Hl()), d(p, "body");
|
|
3546
3573
|
};
|
|
3547
|
-
}),
|
|
3574
|
+
}), Xs = pe((c, e) => {
|
|
3548
3575
|
le(), ue(), ce();
|
|
3549
3576
|
var { ObjectSetPrototypeOf: t, Symbol: r } = Re();
|
|
3550
3577
|
e.exports = s;
|
|
3551
|
-
var { ERR_METHOD_NOT_IMPLEMENTED: a } = We().codes, n = at(), { getHighWaterMark: i } =
|
|
3578
|
+
var { ERR_METHOD_NOT_IMPLEMENTED: a } = We().codes, n = at(), { getHighWaterMark: i } = jr();
|
|
3552
3579
|
t(s.prototype, n.prototype), t(s, n);
|
|
3553
3580
|
var o = r("kCallback");
|
|
3554
3581
|
function s(d) {
|
|
@@ -3585,11 +3612,11 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
3585
3612
|
this[o] = null, d();
|
|
3586
3613
|
}
|
|
3587
3614
|
};
|
|
3588
|
-
}),
|
|
3615
|
+
}), Zs = pe((c, e) => {
|
|
3589
3616
|
le(), ue(), ce();
|
|
3590
3617
|
var { ObjectSetPrototypeOf: t } = Re();
|
|
3591
3618
|
e.exports = a;
|
|
3592
|
-
var r =
|
|
3619
|
+
var r = Xs();
|
|
3593
3620
|
t(a.prototype, r.prototype), t(a, r);
|
|
3594
3621
|
function a(n) {
|
|
3595
3622
|
if (!(this instanceof a)) return new a(n);
|
|
@@ -3598,7 +3625,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
3598
3625
|
a.prototype._transform = function(n, i, o) {
|
|
3599
3626
|
o(null, n);
|
|
3600
3627
|
};
|
|
3601
|
-
}),
|
|
3628
|
+
}), Xi = pe((c, e) => {
|
|
3602
3629
|
le(), ue(), ce();
|
|
3603
3630
|
var t = At(), { ArrayIsArray: r, Promise: a, SymbolAsyncIterator: n, SymbolDispose: i } = Re(), o = yt(), { once: s } = qe(), l = Nt(), u = at(), { aggregateTwoErrors: d, codes: { ERR_INVALID_ARG_TYPE: p, ERR_INVALID_RETURN_VALUE: y, ERR_MISSING_ARGS: f, ERR_STREAM_DESTROYED: m, ERR_STREAM_PREMATURE_CLOSE: b }, AbortError: k } = We(), { validateFunction: g, validateAbortSignal: _ } = Qt(), { isIterable: S, isReadable: v, isReadableNodeStream: x, isNodeStream: E, isTransformStream: I, isWebStream: M, isReadableStream: C, isReadableFinished: B } = ct(), T = globalThis.AbortController || Yt().AbortController, W, F, N;
|
|
3604
3631
|
function ae(te, we, V) {
|
|
@@ -3622,7 +3649,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
3622
3649
|
throw new p("val", ["Readable", "Iterable", "AsyncIterable"], te);
|
|
3623
3650
|
}
|
|
3624
3651
|
async function* re(te) {
|
|
3625
|
-
F || (F =
|
|
3652
|
+
F || (F = Lr()), yield* F.prototype[n].call(te);
|
|
3626
3653
|
}
|
|
3627
3654
|
async function D(te, we, V, { end: L }) {
|
|
3628
3655
|
let ne, H = null, G = (oe) => {
|
|
@@ -3713,7 +3740,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
3713
3740
|
if (!S(ye, !0)) throw new y("AsyncIterable", `transform[${ve - 1}]`, ye);
|
|
3714
3741
|
} else {
|
|
3715
3742
|
var ge;
|
|
3716
|
-
W || (W =
|
|
3743
|
+
W || (W = Zs());
|
|
3717
3744
|
let U = new W({ objectMode: !0 }), X = (ge = ye) === null || ge === void 0 ? void 0 : ge.then;
|
|
3718
3745
|
if (typeof X == "function") ee++, X.call(ye, (z) => {
|
|
3719
3746
|
R = z, z != null && U.write(z), w && U.end(), t.nextTick(fe);
|
|
@@ -3766,9 +3793,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
3766
3793
|
}), o(we, { readable: !1, writable: !0 }, V);
|
|
3767
3794
|
}
|
|
3768
3795
|
e.exports = { pipelineImpl: J, pipeline: P };
|
|
3769
|
-
}),
|
|
3796
|
+
}), ea = pe((c, e) => {
|
|
3770
3797
|
le(), ue(), ce();
|
|
3771
|
-
var { pipeline: t } =
|
|
3798
|
+
var { pipeline: t } = Xi(), r = at(), { destroyer: a } = Nt(), { isNodeStream: n, isReadable: i, isWritable: o, isWebStream: s, isTransformStream: l, isWritableStream: u, isReadableStream: d } = ct(), { AbortError: p, codes: { ERR_INVALID_ARG_VALUE: y, ERR_MISSING_ARGS: f } } = We(), m = yt();
|
|
3772
3799
|
e.exports = function(...b) {
|
|
3773
3800
|
if (b.length === 0) throw new f("streams");
|
|
3774
3801
|
if (b.length === 1) return r.from(b[0]);
|
|
@@ -3862,9 +3889,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
3862
3889
|
!T && v !== null && (T = new p()), S = null, g = null, _ = null, v === null ? W(T) : (v = W, n(M) && a(M, T));
|
|
3863
3890
|
}, x;
|
|
3864
3891
|
};
|
|
3865
|
-
}),
|
|
3892
|
+
}), zl = pe((c, e) => {
|
|
3866
3893
|
le(), ue(), ce();
|
|
3867
|
-
var t = globalThis.AbortController || Yt().AbortController, { codes: { ERR_INVALID_ARG_VALUE: r, ERR_INVALID_ARG_TYPE: a, ERR_MISSING_ARGS: n, ERR_OUT_OF_RANGE: i }, AbortError: o } = We(), { validateAbortSignal: s, validateInteger: l, validateObject: u } = Qt(), d = Re().Symbol("kWeak"), p = Re().Symbol("kResistStopPropagation"), { finished: y } = yt(), f =
|
|
3894
|
+
var t = globalThis.AbortController || Yt().AbortController, { codes: { ERR_INVALID_ARG_VALUE: r, ERR_INVALID_ARG_TYPE: a, ERR_MISSING_ARGS: n, ERR_OUT_OF_RANGE: i }, AbortError: o } = We(), { validateAbortSignal: s, validateInteger: l, validateObject: u } = Qt(), d = Re().Symbol("kWeak"), p = Re().Symbol("kResistStopPropagation"), { finished: y } = yt(), f = ea(), { addAbortSignalNoValidate: m } = Rr(), { isWritable: b, isNodeStream: k } = ct(), { deprecate: g } = qe(), { ArrayPrototypePush: _, Boolean: S, MathFloor: v, Number: x, NumberIsNaN: E, Promise: I, PromiseReject: M, PromiseResolve: C, PromisePrototypeThen: B, Symbol: T } = Re(), W = T("kEmpty"), F = T("kEof");
|
|
3868
3895
|
function N(H, G) {
|
|
3869
3896
|
if (G != null && u(G, "options"), G?.signal != null && s(G.signal, "options.signal"), k(H) && !b(H)) throw new r("stream", H, "must be writable");
|
|
3870
3897
|
let Q = f(this, H);
|
|
@@ -4040,10 +4067,10 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4040
4067
|
}).call(this);
|
|
4041
4068
|
}
|
|
4042
4069
|
e.exports.streamReturningOperators = { asIndexedPairs: g(Y, "readable.asIndexedPairs will be removed in a future version."), drop: L, filter: P, flatMap: we, map: ae, take: ne, compose: N }, e.exports.promiseReturningOperators = { every: re, forEach: Z, reduce: be, toArray: te, some: K, find: D };
|
|
4043
|
-
}),
|
|
4070
|
+
}), ta = pe((c, e) => {
|
|
4044
4071
|
le(), ue(), ce();
|
|
4045
|
-
var { ArrayPrototypePop: t, Promise: r } = Re(), { isIterable: a, isNodeStream: n, isWebStream: i } = ct(), { pipelineImpl: o } =
|
|
4046
|
-
|
|
4072
|
+
var { ArrayPrototypePop: t, Promise: r } = Re(), { isIterable: a, isNodeStream: n, isWebStream: i } = ct(), { pipelineImpl: o } = Xi(), { finished: s } = yt();
|
|
4073
|
+
ra();
|
|
4047
4074
|
function l(...u) {
|
|
4048
4075
|
return new r((d, p) => {
|
|
4049
4076
|
let y, f, m = u[u.length - 1];
|
|
@@ -4057,10 +4084,10 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4057
4084
|
});
|
|
4058
4085
|
}
|
|
4059
4086
|
e.exports = { finished: s, pipeline: l };
|
|
4060
|
-
}),
|
|
4087
|
+
}), ra = pe((c, e) => {
|
|
4061
4088
|
le(), ue(), ce();
|
|
4062
|
-
var { Buffer: t } = (Ne(), Ce(Le)), { ObjectDefineProperty: r, ObjectKeys: a, ReflectApply: n } = Re(), { promisify: { custom: i } } = qe(), { streamReturningOperators: o, promiseReturningOperators: s } =
|
|
4063
|
-
g.isDestroyed = k.isDestroyed, g.isDisturbed = k.isDisturbed, g.isErrored = k.isErrored, g.isReadable = k.isReadable, g.isWritable = k.isWritable, g.Readable =
|
|
4089
|
+
var { Buffer: t } = (Ne(), Ce(Le)), { ObjectDefineProperty: r, ObjectKeys: a, ReflectApply: n } = Re(), { promisify: { custom: i } } = qe(), { streamReturningOperators: o, promiseReturningOperators: s } = zl(), { codes: { ERR_ILLEGAL_CONSTRUCTOR: l } } = We(), u = ea(), { setDefaultHighWaterMark: d, getDefaultHighWaterMark: p } = jr(), { pipeline: y } = Xi(), { destroyer: f } = Nt(), m = yt(), b = ta(), k = ct(), g = e.exports = Qi().Stream;
|
|
4090
|
+
g.isDestroyed = k.isDestroyed, g.isDisturbed = k.isDisturbed, g.isErrored = k.isErrored, g.isReadable = k.isReadable, g.isWritable = k.isWritable, g.Readable = Lr();
|
|
4064
4091
|
for (let S of a(o)) {
|
|
4065
4092
|
let v = function(...E) {
|
|
4066
4093
|
if (new.target) throw l();
|
|
@@ -4075,8 +4102,8 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4075
4102
|
}, x = s[S];
|
|
4076
4103
|
r(v, "name", { __proto__: null, value: x.name }), r(v, "length", { __proto__: null, value: x.length }), r(g.Readable.prototype, S, { __proto__: null, value: v, enumerable: !1, configurable: !0, writable: !0 });
|
|
4077
4104
|
}
|
|
4078
|
-
g.Writable =
|
|
4079
|
-
var { addAbortSignal: _ } =
|
|
4105
|
+
g.Writable = Ji(), g.Duplex = at(), g.Transform = Xs(), g.PassThrough = Zs(), g.pipeline = y;
|
|
4106
|
+
var { addAbortSignal: _ } = Rr();
|
|
4080
4107
|
g.addAbortSignal = _, g.finished = m, g.destroy = f, g.compose = u, g.setDefaultHighWaterMark = d, g.getDefaultHighWaterMark = p, r(g, "promises", { __proto__: null, configurable: !0, enumerable: !0, get() {
|
|
4081
4108
|
return b;
|
|
4082
4109
|
} }), r(y, i, { __proto__: null, enumerable: !0, get() {
|
|
@@ -4090,11 +4117,11 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4090
4117
|
};
|
|
4091
4118
|
}), It = pe((c, e) => {
|
|
4092
4119
|
le(), ue(), ce();
|
|
4093
|
-
var t =
|
|
4120
|
+
var t = ra(), r = ta(), a = t.Readable.destroy;
|
|
4094
4121
|
e.exports = t.Readable, e.exports._uint8ArrayToBuffer = t._uint8ArrayToBuffer, e.exports._isUint8Array = t._isUint8Array, e.exports.isDisturbed = t.isDisturbed, e.exports.isErrored = t.isErrored, e.exports.isReadable = t.isReadable, e.exports.Readable = t.Readable, e.exports.Writable = t.Writable, e.exports.Duplex = t.Duplex, e.exports.Transform = t.Transform, e.exports.PassThrough = t.PassThrough, e.exports.addAbortSignal = t.addAbortSignal, e.exports.finished = t.finished, e.exports.destroy = t.destroy, e.exports.destroy = a, e.exports.pipeline = t.pipeline, e.exports.compose = t.compose, Object.defineProperty(t, "promises", { configurable: !0, enumerable: !0, get() {
|
|
4095
4122
|
return r;
|
|
4096
4123
|
} }), e.exports.Stream = t.Stream, e.exports.default = e.exports;
|
|
4097
|
-
}),
|
|
4124
|
+
}), Kl = pe((c, e) => {
|
|
4098
4125
|
le(), ue(), ce(), typeof Object.create == "function" ? e.exports = function(t, r) {
|
|
4099
4126
|
r && (t.super_ = r, t.prototype = Object.create(r.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }));
|
|
4100
4127
|
} : e.exports = function(t, r) {
|
|
@@ -4105,7 +4132,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4105
4132
|
a.prototype = r.prototype, t.prototype = new a(), t.prototype.constructor = t;
|
|
4106
4133
|
}
|
|
4107
4134
|
};
|
|
4108
|
-
}),
|
|
4135
|
+
}), Vl = pe((c, e) => {
|
|
4109
4136
|
le(), ue(), ce();
|
|
4110
4137
|
var { Buffer: t } = (Ne(), Ce(Le)), r = /* @__PURE__ */ Symbol.for("BufferList");
|
|
4111
4138
|
function a(n) {
|
|
@@ -4229,9 +4256,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4229
4256
|
}, a.isBufferList = function(n) {
|
|
4230
4257
|
return n != null && n[r];
|
|
4231
4258
|
}, e.exports = a;
|
|
4232
|
-
}),
|
|
4259
|
+
}), Gl = pe((c, e) => {
|
|
4233
4260
|
le(), ue(), ce();
|
|
4234
|
-
var t = It().Duplex, r =
|
|
4261
|
+
var t = It().Duplex, r = Kl(), a = Vl();
|
|
4235
4262
|
function n(i) {
|
|
4236
4263
|
if (!(this instanceof n)) return new n(i);
|
|
4237
4264
|
if (typeof i == "function") {
|
|
@@ -4261,7 +4288,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4261
4288
|
}, n.prototype._isBufferList = function(i) {
|
|
4262
4289
|
return i instanceof n || i instanceof a || n.isBufferList(i);
|
|
4263
4290
|
}, n.isBufferList = a.isBufferList, e.exports = n, e.exports.BufferListStream = n, e.exports.BufferList = a;
|
|
4264
|
-
}),
|
|
4291
|
+
}), Yl = pe((c, e) => {
|
|
4265
4292
|
le(), ue(), ce();
|
|
4266
4293
|
var t = class {
|
|
4267
4294
|
constructor() {
|
|
@@ -4269,7 +4296,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4269
4296
|
}
|
|
4270
4297
|
};
|
|
4271
4298
|
e.exports = t;
|
|
4272
|
-
}),
|
|
4299
|
+
}), na = pe((c, e) => {
|
|
4273
4300
|
le(), ue(), ce();
|
|
4274
4301
|
var t = e.exports, { Buffer: r } = (Ne(), Ce(Le));
|
|
4275
4302
|
t.types = { 0: "reserved", 1: "connect", 2: "connack", 3: "publish", 4: "puback", 5: "pubrec", 6: "pubrel", 7: "pubcomp", 8: "subscribe", 9: "suback", 10: "unsubscribe", 11: "unsuback", 12: "pingreq", 13: "pingresp", 14: "disconnect", 15: "auth" }, t.requiredHeaderFlags = { 1: 0, 2: 0, 4: 0, 5: 0, 6: 2, 7: 0, 8: 2, 9: 0, 10: 2, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0 }, t.requiredHeaderFlagsErrors = {};
|
|
@@ -4295,7 +4322,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4295
4322
|
})));
|
|
4296
4323
|
}
|
|
4297
4324
|
t.PUBLISH_HEADER = a("publish"), t.SUBSCRIBE_HEADER = a("subscribe"), t.SUBSCRIBE_OPTIONS_QOS_MASK = 3, t.SUBSCRIBE_OPTIONS_NL_MASK = 1, t.SUBSCRIBE_OPTIONS_NL_SHIFT = 2, t.SUBSCRIBE_OPTIONS_RAP_MASK = 1, t.SUBSCRIBE_OPTIONS_RAP_SHIFT = 3, t.SUBSCRIBE_OPTIONS_RH_MASK = 3, t.SUBSCRIBE_OPTIONS_RH_SHIFT = 4, t.SUBSCRIBE_OPTIONS_RH = [0, 16, 32], t.SUBSCRIBE_OPTIONS_NL = 4, t.SUBSCRIBE_OPTIONS_RAP = 8, t.SUBSCRIBE_OPTIONS_QOS = [0, 1, 2], t.UNSUBSCRIBE_HEADER = a("unsubscribe"), t.ACKS = { unsuback: a("unsuback"), puback: a("puback"), pubcomp: a("pubcomp"), pubrel: a("pubrel"), pubrec: a("pubrec") }, t.SUBACK_HEADER = r.from([t.codes.suback << t.CMD_SHIFT]), t.VERSION3 = r.from([3]), t.VERSION4 = r.from([4]), t.VERSION5 = r.from([5]), t.VERSION131 = r.from([131]), t.VERSION132 = r.from([132]), t.QOS = [0, 1, 2].map((n) => r.from([n])), t.EMPTY = { pingreq: r.from([t.codes.pingreq << 4, 0]), pingresp: r.from([t.codes.pingresp << 4, 0]), disconnect: r.from([t.codes.disconnect << 4, 0]) }, t.MQTT5_PUBACK_PUBREC_CODES = { 0: "Success", 16: "No matching subscribers", 128: "Unspecified error", 131: "Implementation specific error", 135: "Not authorized", 144: "Topic Name invalid", 145: "Packet identifier in use", 151: "Quota exceeded", 153: "Payload format invalid" }, t.MQTT5_PUBREL_PUBCOMP_CODES = { 0: "Success", 146: "Packet Identifier not found" }, t.MQTT5_SUBACK_CODES = { 0: "Granted QoS 0", 1: "Granted QoS 1", 2: "Granted QoS 2", 128: "Unspecified error", 131: "Implementation specific error", 135: "Not authorized", 143: "Topic Filter invalid", 145: "Packet Identifier in use", 151: "Quota exceeded", 158: "Shared Subscriptions not supported", 161: "Subscription Identifiers not supported", 162: "Wildcard Subscriptions not supported" }, t.MQTT5_UNSUBACK_CODES = { 0: "Success", 17: "No subscription existed", 128: "Unspecified error", 131: "Implementation specific error", 135: "Not authorized", 143: "Topic Filter invalid", 145: "Packet Identifier in use" }, t.MQTT5_DISCONNECT_CODES = { 0: "Normal disconnection", 4: "Disconnect with Will Message", 128: "Unspecified error", 129: "Malformed Packet", 130: "Protocol Error", 131: "Implementation specific error", 135: "Not authorized", 137: "Server busy", 139: "Server shutting down", 141: "Keep Alive timeout", 142: "Session taken over", 143: "Topic Filter invalid", 144: "Topic Name invalid", 147: "Receive Maximum exceeded", 148: "Topic Alias invalid", 149: "Packet too large", 150: "Message rate too high", 151: "Quota exceeded", 152: "Administrative action", 153: "Payload format invalid", 154: "Retain not supported", 155: "QoS not supported", 156: "Use another server", 157: "Server moved", 158: "Shared Subscriptions not supported", 159: "Connection rate exceeded", 160: "Maximum connect time", 161: "Subscription Identifiers not supported", 162: "Wildcard Subscriptions not supported" }, t.MQTT5_AUTH_CODES = { 0: "Success", 24: "Continue authentication", 25: "Re-authenticate" };
|
|
4298
|
-
}),
|
|
4325
|
+
}), Ql = pe((c, e) => {
|
|
4299
4326
|
le(), ue(), ce();
|
|
4300
4327
|
var t = 1e3, r = t * 60, a = r * 60, n = a * 24, i = n * 7, o = n * 365.25;
|
|
4301
4328
|
e.exports = function(p, y) {
|
|
@@ -4367,10 +4394,10 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4367
4394
|
var b = y >= f * 1.5;
|
|
4368
4395
|
return Math.round(p / f) + " " + m + (b ? "s" : "");
|
|
4369
4396
|
}
|
|
4370
|
-
}),
|
|
4397
|
+
}), Jl = pe((c, e) => {
|
|
4371
4398
|
le(), ue(), ce();
|
|
4372
4399
|
function t(r) {
|
|
4373
|
-
n.debug = n, n.default = n, n.coerce = d, n.disable = l, n.enable = o, n.enabled = u, n.humanize =
|
|
4400
|
+
n.debug = n, n.default = n, n.coerce = d, n.disable = l, n.enable = o, n.enabled = u, n.humanize = Ql(), n.destroy = p, Object.keys(r).forEach((y) => {
|
|
4374
4401
|
n[y] = r[y];
|
|
4375
4402
|
}), n.names = [], n.skips = [], n.formatters = {};
|
|
4376
4403
|
function a(y) {
|
|
@@ -4480,7 +4507,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4480
4507
|
} catch {
|
|
4481
4508
|
}
|
|
4482
4509
|
}
|
|
4483
|
-
e.exports =
|
|
4510
|
+
e.exports = Jl()(c);
|
|
4484
4511
|
var { formatters: o } = e.exports;
|
|
4485
4512
|
o.j = function(s) {
|
|
4486
4513
|
try {
|
|
@@ -4489,14 +4516,14 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4489
4516
|
return "[UnexpectedJSONParseError]: " + l.message;
|
|
4490
4517
|
}
|
|
4491
4518
|
};
|
|
4492
|
-
}),
|
|
4519
|
+
}), Xl = pe((c, e) => {
|
|
4493
4520
|
le(), ue(), ce();
|
|
4494
|
-
var t =
|
|
4521
|
+
var t = Gl(), { EventEmitter: r } = (xt(), Ce(bt)), a = Yl(), n = na(), i = lt()("mqtt-packet:parser"), o = class ni extends r {
|
|
4495
4522
|
constructor() {
|
|
4496
4523
|
super(), this.parser = this.constructor.parser;
|
|
4497
4524
|
}
|
|
4498
4525
|
static parser(l) {
|
|
4499
|
-
return this instanceof
|
|
4526
|
+
return this instanceof ni ? (this.settings = l || {}, this._states = ["_parseHeader", "_parseLength", "_parsePayload", "_newPacket"], this._resetState(), this) : new ni().parser(l);
|
|
4500
4527
|
}
|
|
4501
4528
|
_resetState() {
|
|
4502
4529
|
i("_resetState: resetting packet, error, _list, and _stateCounter"), this.packet = new a(), this.error = null, this._list = t(), this._stateCounter = 0;
|
|
@@ -4842,7 +4869,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4842
4869
|
}
|
|
4843
4870
|
};
|
|
4844
4871
|
e.exports = o;
|
|
4845
|
-
}),
|
|
4872
|
+
}), Zl = pe((c, e) => {
|
|
4846
4873
|
le(), ue(), ce();
|
|
4847
4874
|
var { Buffer: t } = (Ne(), Ce(Le)), r = 65536, a = {}, n = t.isBuffer(t.from([1, 2]).subarray(0, 1));
|
|
4848
4875
|
function i(u) {
|
|
@@ -4864,7 +4891,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4864
4891
|
return d.writeUInt32BE(u, 0), d;
|
|
4865
4892
|
}
|
|
4866
4893
|
e.exports = { cache: a, generateCache: o, generateNumber: i, genBufVariableByteInt: s, generate4ByteBuffer: l };
|
|
4867
|
-
}),
|
|
4894
|
+
}), ec = pe((c, e) => {
|
|
4868
4895
|
le(), ue(), ce(), typeof Pe > "u" || !Pe.version || Pe.version.indexOf("v0.") === 0 || Pe.version.indexOf("v1.") === 0 && Pe.version.indexOf("v1.8.") !== 0 ? e.exports = { nextTick: t } : e.exports = Pe;
|
|
4869
4896
|
function t(r, a, n, i) {
|
|
4870
4897
|
if (typeof r != "function") throw new TypeError('"callback" argument must be a function');
|
|
@@ -4892,9 +4919,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
4892
4919
|
});
|
|
4893
4920
|
}
|
|
4894
4921
|
}
|
|
4895
|
-
}),
|
|
4922
|
+
}), ia = pe((c, e) => {
|
|
4896
4923
|
le(), ue(), ce();
|
|
4897
|
-
var t =
|
|
4924
|
+
var t = na(), { Buffer: r } = (Ne(), Ce(Le)), a = r.allocUnsafe(0), n = r.from([0]), i = Zl(), o = ec().nextTick, s = lt()("mqtt-packet:writeToStream"), l = i.cache, u = i.generateNumber, d = i.generateCache, p = i.genBufVariableByteInt, y = i.generate4ByteBuffer, f = Y, m = !0;
|
|
4898
4925
|
function b(V, L, ne) {
|
|
4899
4926
|
switch (s("generate called"), L.cork && (L.cork(), o(k, L)), m && (m = !1, d()), s("generate: packet.cmd: %s", V.cmd), V.cmd) {
|
|
4900
4927
|
case "connect":
|
|
@@ -5275,9 +5302,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
5275
5302
|
return typeof V == "string" || V instanceof r;
|
|
5276
5303
|
}
|
|
5277
5304
|
e.exports = b;
|
|
5278
|
-
}),
|
|
5305
|
+
}), tc = pe((c, e) => {
|
|
5279
5306
|
le(), ue(), ce();
|
|
5280
|
-
var t =
|
|
5307
|
+
var t = ia(), { EventEmitter: r } = (xt(), Ce(bt)), { Buffer: a } = (Ne(), Ce(Le));
|
|
5281
5308
|
function n(o, s) {
|
|
5282
5309
|
let l = new i();
|
|
5283
5310
|
return t(o, l, s), l.concat();
|
|
@@ -5301,12 +5328,12 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
5301
5328
|
}
|
|
5302
5329
|
};
|
|
5303
5330
|
e.exports = n;
|
|
5304
|
-
}),
|
|
5305
|
-
le(), ue(), ce(), c.parser =
|
|
5306
|
-
}),
|
|
5331
|
+
}), rc = pe((c) => {
|
|
5332
|
+
le(), ue(), ce(), c.parser = Xl().parser, c.generate = tc(), c.writeToStream = ia();
|
|
5333
|
+
}), nc = pe((c, e) => {
|
|
5307
5334
|
le(), ue(), ce(), e.exports = r;
|
|
5308
5335
|
function t(n) {
|
|
5309
|
-
return n instanceof
|
|
5336
|
+
return n instanceof Cr ? Cr.from(n) : new n.constructor(n.buffer.slice(), n.byteOffset, n.length);
|
|
5310
5337
|
}
|
|
5311
5338
|
function r(n) {
|
|
5312
5339
|
if (n = n || {}, n.circles) return a(n);
|
|
@@ -5403,9 +5430,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
5403
5430
|
return i.pop(), o.pop(), f;
|
|
5404
5431
|
}
|
|
5405
5432
|
}
|
|
5406
|
-
}),
|
|
5407
|
-
le(), ue(), ce(), e.exports =
|
|
5408
|
-
}),
|
|
5433
|
+
}), ic = pe((c, e) => {
|
|
5434
|
+
le(), ue(), ce(), e.exports = nc()();
|
|
5435
|
+
}), oa = pe((c) => {
|
|
5409
5436
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 }), c.validateTopic = e, c.validateTopics = t;
|
|
5410
5437
|
function e(r) {
|
|
5411
5438
|
let a = r.split("/");
|
|
@@ -5420,7 +5447,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
5420
5447
|
for (let a = 0; a < r.length; a++) if (!e(r[a])) return r[a];
|
|
5421
5448
|
return null;
|
|
5422
5449
|
}
|
|
5423
|
-
}),
|
|
5450
|
+
}), sa = pe((c) => {
|
|
5424
5451
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
|
|
5425
5452
|
var e = It(), t = { objectMode: !0 }, r = { clean: !0 }, a = class {
|
|
5426
5453
|
options;
|
|
@@ -5456,7 +5483,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
5456
5483
|
}
|
|
5457
5484
|
};
|
|
5458
5485
|
c.default = a;
|
|
5459
|
-
}),
|
|
5486
|
+
}), oc = pe((c) => {
|
|
5460
5487
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
|
|
5461
5488
|
var e = [0, 16, 128, 131, 135, 144, 145, 151, 153], t = (r, a, n) => {
|
|
5462
5489
|
r.log("handlePublish: packet %o", a), n = typeof n < "u" ? n : r.noop;
|
|
@@ -5511,21 +5538,21 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
5511
5538
|
}
|
|
5512
5539
|
};
|
|
5513
5540
|
c.default = t;
|
|
5514
|
-
}),
|
|
5541
|
+
}), sc = pe((c, e) => {
|
|
5515
5542
|
e.exports = { version: "5.15.0" };
|
|
5516
5543
|
}), Ut = pe((c) => {
|
|
5517
5544
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 }), c.MQTTJS_VERSION = c.nextTick = c.ErrorWithSubackPacket = c.ErrorWithReasonCode = void 0, c.applyMixin = r;
|
|
5518
|
-
var e = class
|
|
5545
|
+
var e = class aa extends Error {
|
|
5519
5546
|
code;
|
|
5520
5547
|
constructor(n, i) {
|
|
5521
|
-
super(n), this.code = i, Object.setPrototypeOf(this,
|
|
5548
|
+
super(n), this.code = i, Object.setPrototypeOf(this, aa.prototype), Object.getPrototypeOf(this).name = "ErrorWithReasonCode";
|
|
5522
5549
|
}
|
|
5523
5550
|
};
|
|
5524
5551
|
c.ErrorWithReasonCode = e;
|
|
5525
|
-
var t = class
|
|
5552
|
+
var t = class la extends Error {
|
|
5526
5553
|
packet;
|
|
5527
5554
|
constructor(n, i) {
|
|
5528
|
-
super(n), this.packet = i, Object.setPrototypeOf(this,
|
|
5555
|
+
super(n), this.packet = i, Object.setPrototypeOf(this, la.prototype), Object.getPrototypeOf(this).name = "ErrorWithSubackPacket";
|
|
5529
5556
|
}
|
|
5530
5557
|
};
|
|
5531
5558
|
c.ErrorWithSubackPacket = t;
|
|
@@ -5540,8 +5567,8 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
5540
5567
|
}
|
|
5541
5568
|
c.nextTick = typeof Pe?.nextTick == "function" ? Pe.nextTick : (a) => {
|
|
5542
5569
|
setTimeout(a, 0);
|
|
5543
|
-
}, c.MQTTJS_VERSION =
|
|
5544
|
-
}),
|
|
5570
|
+
}, c.MQTTJS_VERSION = sc().version;
|
|
5571
|
+
}), Nr = pe((c) => {
|
|
5545
5572
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 }), c.ReasonCodes = void 0;
|
|
5546
5573
|
var e = Ut();
|
|
5547
5574
|
c.ReasonCodes = { 0: "", 1: "Unacceptable protocol version", 2: "Identifier rejected", 3: "Server unavailable", 4: "Bad username or password", 5: "Not authorized", 16: "No matching subscribers", 17: "No subscription existed", 128: "Unspecified error", 129: "Malformed Packet", 130: "Protocol Error", 131: "Implementation specific error", 132: "Unsupported Protocol Version", 133: "Client Identifier not valid", 134: "Bad User Name or Password", 135: "Not authorized", 136: "Server unavailable", 137: "Server busy", 138: "Banned", 139: "Server shutting down", 140: "Bad authentication method", 141: "Keep Alive timeout", 142: "Session taken over", 143: "Topic Filter invalid", 144: "Topic Name invalid", 145: "Packet identifier in use", 146: "Packet Identifier not found", 147: "Receive Maximum exceeded", 148: "Topic Alias invalid", 149: "Packet too large", 150: "Message rate too high", 151: "Quota exceeded", 152: "Administrative action", 153: "Payload format invalid", 154: "Retain not supported", 155: "QoS not supported", 156: "Use another server", 157: "Server moved", 158: "Shared Subscriptions not supported", 159: "Connection rate exceeded", 160: "Maximum connect time", 161: "Subscription Identifiers not supported", 162: "Wildcard Subscriptions not supported" };
|
|
@@ -5594,9 +5621,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
5594
5621
|
r.disconnecting && Object.keys(r.outgoing).length === 0 && r.emit("outgoingEmpty");
|
|
5595
5622
|
};
|
|
5596
5623
|
c.default = t;
|
|
5597
|
-
}),
|
|
5624
|
+
}), ac = pe((c) => {
|
|
5598
5625
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
|
|
5599
|
-
var e = Ut(), t =
|
|
5626
|
+
var e = Ut(), t = Nr(), r = (a, n) => {
|
|
5600
5627
|
let { options: i } = a, o = i.protocolVersion, s = o === 5 ? n.reasonCode : n.returnCode;
|
|
5601
5628
|
if (o !== 5) {
|
|
5602
5629
|
let l = new e.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${o}`, s);
|
|
@@ -5616,7 +5643,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
5616
5643
|
});
|
|
5617
5644
|
};
|
|
5618
5645
|
c.default = r;
|
|
5619
|
-
}),
|
|
5646
|
+
}), lc = pe((c) => {
|
|
5620
5647
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 }), c.LRUCache = void 0;
|
|
5621
5648
|
var e = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, t = /* @__PURE__ */ new Set(), r = typeof Pe == "object" && Pe ? Pe : {}, a = (y, f, m, b) => {
|
|
5622
5649
|
typeof r.emitWarning == "function" ? r.emitWarning(y, f, m, b) : console.error(`[${m}] ${f}: ${y}`);
|
|
@@ -5672,7 +5699,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
5672
5699
|
pop() {
|
|
5673
5700
|
return this.heap[--this.length];
|
|
5674
5701
|
}
|
|
5675
|
-
}, p = class
|
|
5702
|
+
}, p = class ca {
|
|
5676
5703
|
#l;
|
|
5677
5704
|
#h;
|
|
5678
5705
|
#g;
|
|
@@ -5765,7 +5792,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
5765
5792
|
if (this.#l === 0 && this.ttl === 0 && this.#h === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
5766
5793
|
if (!this.ttlAutopurge && !this.#l && !this.#h) {
|
|
5767
5794
|
let Z = "LRU_CACHE_UNBOUNDED";
|
|
5768
|
-
o(Z) && (t.add(Z), a("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", Z,
|
|
5795
|
+
o(Z) && (t.add(Z), a("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", Z, ca));
|
|
5769
5796
|
}
|
|
5770
5797
|
}
|
|
5771
5798
|
getRemainingTTL(f) {
|
|
@@ -6160,7 +6187,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
6160
6187
|
var r = class extends t {
|
|
6161
6188
|
};
|
|
6162
6189
|
c.Container = r;
|
|
6163
|
-
}),
|
|
6190
|
+
}), cc = pe((c) => {
|
|
6164
6191
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
6165
6192
|
var e = ut(), t = class extends e.Base {
|
|
6166
6193
|
constructor(a = []) {
|
|
@@ -6184,7 +6211,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
6184
6211
|
}
|
|
6185
6212
|
}, r = t;
|
|
6186
6213
|
c.default = r;
|
|
6187
|
-
}),
|
|
6214
|
+
}), uc = pe((c) => {
|
|
6188
6215
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
6189
6216
|
var e = ut(), t = class extends e.Base {
|
|
6190
6217
|
constructor(a = []) {
|
|
@@ -6216,7 +6243,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
6216
6243
|
}
|
|
6217
6244
|
}, r = t;
|
|
6218
6245
|
c.default = r;
|
|
6219
|
-
}),
|
|
6246
|
+
}), hc = pe((c) => {
|
|
6220
6247
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
6221
6248
|
var e = ut(), t = class extends e.Base {
|
|
6222
6249
|
constructor(a = [], n = function(o, s) {
|
|
@@ -6282,7 +6309,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
6282
6309
|
}
|
|
6283
6310
|
}, r = t;
|
|
6284
6311
|
c.default = r;
|
|
6285
|
-
}),
|
|
6312
|
+
}), Zi = pe((c) => {
|
|
6286
6313
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
6287
6314
|
var e = ut(), t = class extends e.Container {
|
|
6288
6315
|
}, r = t;
|
|
@@ -6292,7 +6319,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
6292
6319
|
function e() {
|
|
6293
6320
|
throw new RangeError("Iterator access denied!");
|
|
6294
6321
|
}
|
|
6295
|
-
}),
|
|
6322
|
+
}), ua = pe((c) => {
|
|
6296
6323
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.RandomIterator = void 0;
|
|
6297
6324
|
var e = ut(), t = ht(), r = class extends e.ContainerIterator {
|
|
6298
6325
|
constructor(a, n) {
|
|
@@ -6314,18 +6341,18 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
6314
6341
|
}
|
|
6315
6342
|
};
|
|
6316
6343
|
c.RandomIterator = r;
|
|
6317
|
-
}),
|
|
6344
|
+
}), fc = pe((c) => {
|
|
6318
6345
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
6319
|
-
var e = r(
|
|
6346
|
+
var e = r(Zi()), t = ua();
|
|
6320
6347
|
function r(o) {
|
|
6321
6348
|
return o && o.t ? o : { default: o };
|
|
6322
6349
|
}
|
|
6323
|
-
var a = class
|
|
6350
|
+
var a = class ha extends t.RandomIterator {
|
|
6324
6351
|
constructor(s, l, u) {
|
|
6325
6352
|
super(s, u), this.container = l;
|
|
6326
6353
|
}
|
|
6327
6354
|
copy() {
|
|
6328
|
-
return new
|
|
6355
|
+
return new ha(this.o, this.container, this.iteratorType);
|
|
6329
6356
|
}
|
|
6330
6357
|
}, n = class extends e.default {
|
|
6331
6358
|
constructor(o = [], s = !0) {
|
|
@@ -6415,13 +6442,13 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
6415
6442
|
}
|
|
6416
6443
|
}, i = n;
|
|
6417
6444
|
c.default = i;
|
|
6418
|
-
}),
|
|
6445
|
+
}), dc = pe((c) => {
|
|
6419
6446
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
6420
|
-
var e = a(
|
|
6447
|
+
var e = a(Zi()), t = ut(), r = ht();
|
|
6421
6448
|
function a(s) {
|
|
6422
6449
|
return s && s.t ? s : { default: s };
|
|
6423
6450
|
}
|
|
6424
|
-
var n = class
|
|
6451
|
+
var n = class fa extends t.ContainerIterator {
|
|
6425
6452
|
constructor(l, u, d, p) {
|
|
6426
6453
|
super(p), this.o = l, this.h = u, this.container = d, this.iteratorType === 0 ? (this.pre = function() {
|
|
6427
6454
|
return this.o.L === this.h && (0, r.throwIteratorAccessError)(), this.o = this.o.L, this;
|
|
@@ -6440,7 +6467,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
6440
6467
|
this.o === this.h && (0, r.throwIteratorAccessError)(), this.o.l = l;
|
|
6441
6468
|
}
|
|
6442
6469
|
copy() {
|
|
6443
|
-
return new
|
|
6470
|
+
return new fa(this.o, this.h, this.container, this.iteratorType);
|
|
6444
6471
|
}
|
|
6445
6472
|
}, i = class extends e.default {
|
|
6446
6473
|
constructor(s = []) {
|
|
@@ -6600,18 +6627,18 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
6600
6627
|
}
|
|
6601
6628
|
}, o = i;
|
|
6602
6629
|
c.default = o;
|
|
6603
|
-
}),
|
|
6630
|
+
}), pc = pe((c) => {
|
|
6604
6631
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
6605
|
-
var e = r(
|
|
6632
|
+
var e = r(Zi()), t = ua();
|
|
6606
6633
|
function r(o) {
|
|
6607
6634
|
return o && o.t ? o : { default: o };
|
|
6608
6635
|
}
|
|
6609
|
-
var a = class
|
|
6636
|
+
var a = class da extends t.RandomIterator {
|
|
6610
6637
|
constructor(s, l, u) {
|
|
6611
6638
|
super(s, u), this.container = l;
|
|
6612
6639
|
}
|
|
6613
6640
|
copy() {
|
|
6614
|
-
return new
|
|
6641
|
+
return new da(this.o, this.container, this.iteratorType);
|
|
6615
6642
|
}
|
|
6616
6643
|
}, n = class extends e.default {
|
|
6617
6644
|
constructor(o = [], s = 4096) {
|
|
@@ -6785,7 +6812,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
6785
6812
|
}
|
|
6786
6813
|
}, i = n;
|
|
6787
6814
|
c.default = i;
|
|
6788
|
-
}),
|
|
6815
|
+
}), gc = pe((c) => {
|
|
6789
6816
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.TreeNodeEnableIndex = c.TreeNode = void 0;
|
|
6790
6817
|
var e = class {
|
|
6791
6818
|
constructor(r, a) {
|
|
@@ -6840,9 +6867,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
6840
6867
|
}
|
|
6841
6868
|
};
|
|
6842
6869
|
c.TreeNodeEnableIndex = t;
|
|
6843
|
-
}),
|
|
6870
|
+
}), pa = pe((c) => {
|
|
6844
6871
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
6845
|
-
var e =
|
|
6872
|
+
var e = gc(), t = ut(), r = ht(), a = class extends t.Container {
|
|
6846
6873
|
constructor(i = function(s, l) {
|
|
6847
6874
|
return s < l ? -1 : s > l ? 1 : 0;
|
|
6848
6875
|
}, o = !1) {
|
|
@@ -7094,7 +7121,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7094
7121
|
}
|
|
7095
7122
|
}, n = a;
|
|
7096
7123
|
c.default = n;
|
|
7097
|
-
}),
|
|
7124
|
+
}), ga = pe((c) => {
|
|
7098
7125
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
7099
7126
|
var e = ut(), t = ht(), r = class extends e.ContainerIterator {
|
|
7100
7127
|
constructor(n, i, o) {
|
|
@@ -7120,13 +7147,13 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7120
7147
|
}
|
|
7121
7148
|
}, a = r;
|
|
7122
7149
|
c.default = a;
|
|
7123
|
-
}),
|
|
7150
|
+
}), mc = pe((c) => {
|
|
7124
7151
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
7125
|
-
var e = a(
|
|
7152
|
+
var e = a(pa()), t = a(ga()), r = ht();
|
|
7126
7153
|
function a(s) {
|
|
7127
7154
|
return s && s.t ? s : { default: s };
|
|
7128
7155
|
}
|
|
7129
|
-
var n = class
|
|
7156
|
+
var n = class ma extends t.default {
|
|
7130
7157
|
constructor(l, u, d, p) {
|
|
7131
7158
|
super(l, u, p), this.container = d;
|
|
7132
7159
|
}
|
|
@@ -7134,7 +7161,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7134
7161
|
return this.o === this.h && (0, r.throwIteratorAccessError)(), this.o.u;
|
|
7135
7162
|
}
|
|
7136
7163
|
copy() {
|
|
7137
|
-
return new
|
|
7164
|
+
return new ma(this.o, this.h, this.container, this.iteratorType);
|
|
7138
7165
|
}
|
|
7139
7166
|
}, i = class extends e.default {
|
|
7140
7167
|
constructor(s = [], l, u) {
|
|
@@ -7199,13 +7226,13 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7199
7226
|
}
|
|
7200
7227
|
}, o = i;
|
|
7201
7228
|
c.default = o;
|
|
7202
|
-
}),
|
|
7229
|
+
}), bc = pe((c) => {
|
|
7203
7230
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
7204
|
-
var e = a(
|
|
7231
|
+
var e = a(pa()), t = a(ga()), r = ht();
|
|
7205
7232
|
function a(s) {
|
|
7206
7233
|
return s && s.t ? s : { default: s };
|
|
7207
7234
|
}
|
|
7208
|
-
var n = class
|
|
7235
|
+
var n = class ba extends t.default {
|
|
7209
7236
|
constructor(l, u, d, p) {
|
|
7210
7237
|
super(l, u, p), this.container = d;
|
|
7211
7238
|
}
|
|
@@ -7221,7 +7248,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7221
7248
|
} });
|
|
7222
7249
|
}
|
|
7223
7250
|
copy() {
|
|
7224
|
-
return new
|
|
7251
|
+
return new ba(this.o, this.h, this.container, this.iteratorType);
|
|
7225
7252
|
}
|
|
7226
7253
|
}, i = class extends e.default {
|
|
7227
7254
|
constructor(s = [], l, u) {
|
|
@@ -7293,15 +7320,15 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7293
7320
|
}
|
|
7294
7321
|
}, o = i;
|
|
7295
7322
|
c.default = o;
|
|
7296
|
-
}),
|
|
7323
|
+
}), ya = pe((c) => {
|
|
7297
7324
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = e;
|
|
7298
7325
|
function e(t) {
|
|
7299
7326
|
let r = typeof t;
|
|
7300
7327
|
return r === "object" && t !== null || r === "function";
|
|
7301
7328
|
}
|
|
7302
|
-
}),
|
|
7329
|
+
}), va = pe((c) => {
|
|
7303
7330
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.HashContainerIterator = c.HashContainer = void 0;
|
|
7304
|
-
var e = ut(), t = a(
|
|
7331
|
+
var e = ut(), t = a(ya()), r = ht();
|
|
7305
7332
|
function a(o) {
|
|
7306
7333
|
return o && o.t ? o : { default: o };
|
|
7307
7334
|
}
|
|
@@ -7377,9 +7404,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7377
7404
|
}
|
|
7378
7405
|
};
|
|
7379
7406
|
c.HashContainer = i;
|
|
7380
|
-
}),
|
|
7407
|
+
}), yc = pe((c) => {
|
|
7381
7408
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
7382
|
-
var e =
|
|
7409
|
+
var e = va(), t = ht(), r = class wa extends e.HashContainerIterator {
|
|
7383
7410
|
constructor(o, s, l, u) {
|
|
7384
7411
|
super(o, s, u), this.container = l;
|
|
7385
7412
|
}
|
|
@@ -7387,7 +7414,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7387
7414
|
return this.o === this.h && (0, t.throwIteratorAccessError)(), this.o.u;
|
|
7388
7415
|
}
|
|
7389
7416
|
copy() {
|
|
7390
|
-
return new
|
|
7417
|
+
return new wa(this.o, this.h, this.container, this.iteratorType);
|
|
7391
7418
|
}
|
|
7392
7419
|
}, a = class extends e.HashContainer {
|
|
7393
7420
|
constructor(i = []) {
|
|
@@ -7440,13 +7467,13 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7440
7467
|
}
|
|
7441
7468
|
}, n = a;
|
|
7442
7469
|
c.default = n;
|
|
7443
|
-
}),
|
|
7470
|
+
}), vc = pe((c) => {
|
|
7444
7471
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
|
|
7445
|
-
var e =
|
|
7472
|
+
var e = va(), t = a(ya()), r = ht();
|
|
7446
7473
|
function a(s) {
|
|
7447
7474
|
return s && s.t ? s : { default: s };
|
|
7448
7475
|
}
|
|
7449
|
-
var n = class
|
|
7476
|
+
var n = class _a extends e.HashContainerIterator {
|
|
7450
7477
|
constructor(l, u, d, p) {
|
|
7451
7478
|
super(l, u, p), this.container = d;
|
|
7452
7479
|
}
|
|
@@ -7462,7 +7489,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7462
7489
|
} });
|
|
7463
7490
|
}
|
|
7464
7491
|
copy() {
|
|
7465
|
-
return new
|
|
7492
|
+
return new _a(this.o, this.h, this.container, this.iteratorType);
|
|
7466
7493
|
}
|
|
7467
7494
|
}, i = class extends e.HashContainer {
|
|
7468
7495
|
constructor(s = []) {
|
|
@@ -7523,7 +7550,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7523
7550
|
}
|
|
7524
7551
|
}, o = i;
|
|
7525
7552
|
c.default = o;
|
|
7526
|
-
}),
|
|
7553
|
+
}), wc = pe((c) => {
|
|
7527
7554
|
le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), Object.defineProperty(c, "Deque", { enumerable: !0, get: function() {
|
|
7528
7555
|
return i.default;
|
|
7529
7556
|
} }), Object.defineProperty(c, "HashMap", { enumerable: !0, get: function() {
|
|
@@ -7545,13 +7572,13 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7545
7572
|
} }), Object.defineProperty(c, "Vector", { enumerable: !0, get: function() {
|
|
7546
7573
|
return a.default;
|
|
7547
7574
|
} });
|
|
7548
|
-
var e = d(
|
|
7575
|
+
var e = d(cc()), t = d(uc()), r = d(hc()), a = d(fc()), n = d(dc()), i = d(pc()), o = d(mc()), s = d(bc()), l = d(yc()), u = d(vc());
|
|
7549
7576
|
function d(p) {
|
|
7550
7577
|
return p && p.t ? p : { default: p };
|
|
7551
7578
|
}
|
|
7552
|
-
}),
|
|
7579
|
+
}), _c = pe((c, e) => {
|
|
7553
7580
|
le(), ue(), ce();
|
|
7554
|
-
var t =
|
|
7581
|
+
var t = wc().OrderedSet, r = lt()("number-allocator:trace"), a = lt()("number-allocator:error");
|
|
7555
7582
|
function n(o, s) {
|
|
7556
7583
|
this.low = o, this.high = s;
|
|
7557
7584
|
}
|
|
@@ -7610,13 +7637,13 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7610
7637
|
console.log("length:" + this.ss.size());
|
|
7611
7638
|
for (let o of this.ss) console.log(o);
|
|
7612
7639
|
}, e.exports = i;
|
|
7613
|
-
}),
|
|
7640
|
+
}), ka = pe((c, e) => {
|
|
7614
7641
|
le(), ue(), ce();
|
|
7615
|
-
var t =
|
|
7642
|
+
var t = _c();
|
|
7616
7643
|
e.exports.NumberAllocator = t;
|
|
7617
|
-
}),
|
|
7644
|
+
}), kc = pe((c) => {
|
|
7618
7645
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
|
|
7619
|
-
var e =
|
|
7646
|
+
var e = lc(), t = ka(), r = class {
|
|
7620
7647
|
aliasToTopic;
|
|
7621
7648
|
topicToAlias;
|
|
7622
7649
|
max;
|
|
@@ -7645,13 +7672,13 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7645
7672
|
}
|
|
7646
7673
|
};
|
|
7647
7674
|
c.default = r;
|
|
7648
|
-
}),
|
|
7675
|
+
}), Sc = pe((c) => {
|
|
7649
7676
|
le(), ue(), ce();
|
|
7650
7677
|
var e = c && c.__importDefault || function(i) {
|
|
7651
7678
|
return i && i.__esModule ? i : { default: i };
|
|
7652
7679
|
};
|
|
7653
7680
|
Object.defineProperty(c, "__esModule", { value: !0 });
|
|
7654
|
-
var t =
|
|
7681
|
+
var t = Nr(), r = e(kc()), a = Ut(), n = (i, o) => {
|
|
7655
7682
|
i.log("_handleConnack");
|
|
7656
7683
|
let { options: s } = i, l = s.protocolVersion === 5 ? o.reasonCode : o.returnCode;
|
|
7657
7684
|
if (clearTimeout(i.connackTimer), delete i.topicAliasSend, o.properties) {
|
|
@@ -7671,7 +7698,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7671
7698
|
}
|
|
7672
7699
|
};
|
|
7673
7700
|
c.default = n;
|
|
7674
|
-
}),
|
|
7701
|
+
}), Ec = pe((c) => {
|
|
7675
7702
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
|
|
7676
7703
|
var e = (t, r, a) => {
|
|
7677
7704
|
t.log("handling pubrel packet");
|
|
@@ -7684,13 +7711,13 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7684
7711
|
});
|
|
7685
7712
|
};
|
|
7686
7713
|
c.default = e;
|
|
7687
|
-
}),
|
|
7714
|
+
}), xc = pe((c) => {
|
|
7688
7715
|
le(), ue(), ce();
|
|
7689
7716
|
var e = c && c.__importDefault || function(s) {
|
|
7690
7717
|
return s && s.__esModule ? s : { default: s };
|
|
7691
7718
|
};
|
|
7692
7719
|
Object.defineProperty(c, "__esModule", { value: !0 });
|
|
7693
|
-
var t = e(
|
|
7720
|
+
var t = e(oc()), r = e(ac()), a = e(Sc()), n = e(Nr()), i = e(Ec()), o = (s, l, u) => {
|
|
7694
7721
|
let { options: d } = s;
|
|
7695
7722
|
if (d.protocolVersion === 5 && d.properties && d.properties.maximumPacketSize && d.properties.maximumPacketSize < l.length) return s.emit("error", new Error(`exceeding packets size ${l.cmd}`)), s.end({ reasonCode: 149, properties: { reasonString: "Maximum packet size was exceeded" } }), s;
|
|
7696
7723
|
switch (s.log("_handlePacket :: emitting packetreceive"), s.emit("packetreceive", l), l.cmd) {
|
|
@@ -7725,7 +7752,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7725
7752
|
}
|
|
7726
7753
|
};
|
|
7727
7754
|
c.default = o;
|
|
7728
|
-
}),
|
|
7755
|
+
}), Sa = pe((c) => {
|
|
7729
7756
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
|
|
7730
7757
|
var e = class {
|
|
7731
7758
|
nextId;
|
|
@@ -7748,7 +7775,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7748
7775
|
}
|
|
7749
7776
|
};
|
|
7750
7777
|
c.default = e;
|
|
7751
|
-
}),
|
|
7778
|
+
}), Ac = pe((c) => {
|
|
7752
7779
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
|
|
7753
7780
|
var e = class {
|
|
7754
7781
|
aliasToTopic;
|
|
@@ -7768,7 +7795,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7768
7795
|
}
|
|
7769
7796
|
};
|
|
7770
7797
|
c.default = e;
|
|
7771
|
-
}),
|
|
7798
|
+
}), Ic = pe((c) => {
|
|
7772
7799
|
le(), ue(), ce();
|
|
7773
7800
|
var e = c && c.__importDefault || function(n) {
|
|
7774
7801
|
return n && n.__esModule ? n : { default: n };
|
|
@@ -7777,7 +7804,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7777
7804
|
var t = e((xt(), Ce(bt))), r = Ut(), a = class {
|
|
7778
7805
|
};
|
|
7779
7806
|
c.TypedEventEmitter = a, (0, r.applyMixin)(a, t.default);
|
|
7780
|
-
}),
|
|
7807
|
+
}), Ur = pe((c, e) => {
|
|
7781
7808
|
le(), ue(), ce();
|
|
7782
7809
|
function t(r) {
|
|
7783
7810
|
"@babel/helpers - typeof";
|
|
@@ -7788,9 +7815,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7788
7815
|
}, e.exports.__esModule = !0, e.exports.default = e.exports, t(r);
|
|
7789
7816
|
}
|
|
7790
7817
|
e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7791
|
-
}),
|
|
7818
|
+
}), Tc = pe((c, e) => {
|
|
7792
7819
|
le(), ue(), ce();
|
|
7793
|
-
var t =
|
|
7820
|
+
var t = Ur().default;
|
|
7794
7821
|
function r(a, n) {
|
|
7795
7822
|
if (t(a) != "object" || !a) return a;
|
|
7796
7823
|
var i = a[Symbol.toPrimitive];
|
|
@@ -7802,28 +7829,28 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7802
7829
|
return (n === "string" ? String : Number)(a);
|
|
7803
7830
|
}
|
|
7804
7831
|
e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7805
|
-
}),
|
|
7832
|
+
}), Oc = pe((c, e) => {
|
|
7806
7833
|
le(), ue(), ce();
|
|
7807
|
-
var t =
|
|
7834
|
+
var t = Ur().default, r = Tc();
|
|
7808
7835
|
function a(n) {
|
|
7809
7836
|
var i = r(n, "string");
|
|
7810
7837
|
return t(i) == "symbol" ? i : i + "";
|
|
7811
7838
|
}
|
|
7812
7839
|
e.exports = a, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7813
|
-
}),
|
|
7840
|
+
}), Cc = pe((c, e) => {
|
|
7814
7841
|
le(), ue(), ce();
|
|
7815
|
-
var t =
|
|
7842
|
+
var t = Oc();
|
|
7816
7843
|
function r(a, n, i) {
|
|
7817
7844
|
return (n = t(n)) in a ? Object.defineProperty(a, n, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : a[n] = i, a;
|
|
7818
7845
|
}
|
|
7819
7846
|
e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7820
|
-
}),
|
|
7847
|
+
}), Pc = pe((c, e) => {
|
|
7821
7848
|
le(), ue(), ce();
|
|
7822
7849
|
function t(r) {
|
|
7823
7850
|
if (Array.isArray(r)) return r;
|
|
7824
7851
|
}
|
|
7825
7852
|
e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7826
|
-
}),
|
|
7853
|
+
}), Mc = pe((c, e) => {
|
|
7827
7854
|
le(), ue(), ce();
|
|
7828
7855
|
function t(r, a) {
|
|
7829
7856
|
var n = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
|
|
@@ -7847,7 +7874,7 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7847
7874
|
}
|
|
7848
7875
|
}
|
|
7849
7876
|
e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7850
|
-
}),
|
|
7877
|
+
}), Rc = pe((c, e) => {
|
|
7851
7878
|
le(), ue(), ce();
|
|
7852
7879
|
function t(r, a) {
|
|
7853
7880
|
(a == null || a > r.length) && (a = r.length);
|
|
@@ -7855,9 +7882,9 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7855
7882
|
return i;
|
|
7856
7883
|
}
|
|
7857
7884
|
e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7858
|
-
}),
|
|
7885
|
+
}), jc = pe((c, e) => {
|
|
7859
7886
|
le(), ue(), ce();
|
|
7860
|
-
var t =
|
|
7887
|
+
var t = Rc();
|
|
7861
7888
|
function r(a, n) {
|
|
7862
7889
|
if (a) {
|
|
7863
7890
|
if (typeof a == "string") return t(a, n);
|
|
@@ -7866,21 +7893,21 @@ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
|
|
|
7866
7893
|
}
|
|
7867
7894
|
}
|
|
7868
7895
|
e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7869
|
-
}),
|
|
7896
|
+
}), Lc = pe((c, e) => {
|
|
7870
7897
|
le(), ue(), ce();
|
|
7871
7898
|
function t() {
|
|
7872
7899
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
7873
7900
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
7874
7901
|
}
|
|
7875
7902
|
e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7876
|
-
}),
|
|
7903
|
+
}), Nc = pe((c, e) => {
|
|
7877
7904
|
le(), ue(), ce();
|
|
7878
|
-
var t =
|
|
7905
|
+
var t = Pc(), r = Mc(), a = jc(), n = Lc();
|
|
7879
7906
|
function i(o, s) {
|
|
7880
7907
|
return t(o) || r(o, s) || a(o, s) || n();
|
|
7881
7908
|
}
|
|
7882
7909
|
e.exports = i, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7883
|
-
}),
|
|
7910
|
+
}), Ea = pe((c, e) => {
|
|
7884
7911
|
le(), ue(), ce(), (function(t, r) {
|
|
7885
7912
|
typeof c == "object" && typeof e < "u" ? r(c) : typeof define == "function" && define.amd ? define(["exports"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.fastUniqueNumbers = {}));
|
|
7886
7913
|
})(c, function(t) {
|
|
@@ -7908,7 +7935,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7908
7935
|
}, l = /* @__PURE__ */ new WeakMap(), u = a(l), d = s(u, l), p = r(d);
|
|
7909
7936
|
t.addUniqueNumber = p, t.generateUniqueNumber = d;
|
|
7910
7937
|
});
|
|
7911
|
-
}),
|
|
7938
|
+
}), Uc = pe((c, e) => {
|
|
7912
7939
|
le(), ue(), ce();
|
|
7913
7940
|
function t(a, n, i, o, s, l, u) {
|
|
7914
7941
|
try {
|
|
@@ -7934,13 +7961,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7934
7961
|
};
|
|
7935
7962
|
}
|
|
7936
7963
|
e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7937
|
-
}),
|
|
7964
|
+
}), xa = pe((c, e) => {
|
|
7938
7965
|
le(), ue(), ce();
|
|
7939
7966
|
function t(r, a) {
|
|
7940
7967
|
this.v = r, this.k = a;
|
|
7941
7968
|
}
|
|
7942
7969
|
e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7943
|
-
}),
|
|
7970
|
+
}), Aa = pe((c, e) => {
|
|
7944
7971
|
le(), ue(), ce();
|
|
7945
7972
|
function t(r, a, n, i) {
|
|
7946
7973
|
var o = Object.defineProperty;
|
|
@@ -7959,9 +7986,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7959
7986
|
}, e.exports.__esModule = !0, e.exports.default = e.exports, t(r, a, n, i);
|
|
7960
7987
|
}
|
|
7961
7988
|
e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
7962
|
-
}),
|
|
7989
|
+
}), Ia = pe((c, e) => {
|
|
7963
7990
|
le(), ue(), ce();
|
|
7964
|
-
var t =
|
|
7991
|
+
var t = Aa();
|
|
7965
7992
|
function r() {
|
|
7966
7993
|
var a, n, i = typeof Symbol == "function" ? Symbol : {}, o = i.iterator || "@@iterator", s = i.toStringTag || "@@toStringTag";
|
|
7967
7994
|
function l(k, g, _, S) {
|
|
@@ -8024,9 +8051,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8024
8051
|
}, e.exports.__esModule = !0, e.exports.default = e.exports)();
|
|
8025
8052
|
}
|
|
8026
8053
|
e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
8027
|
-
}),
|
|
8054
|
+
}), Ta = pe((c, e) => {
|
|
8028
8055
|
le(), ue(), ce();
|
|
8029
|
-
var t =
|
|
8056
|
+
var t = xa(), r = Aa();
|
|
8030
8057
|
function a(n, i) {
|
|
8031
8058
|
function o(l, u, d, p) {
|
|
8032
8059
|
try {
|
|
@@ -8057,16 +8084,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8057
8084
|
}, !0);
|
|
8058
8085
|
}
|
|
8059
8086
|
e.exports = a, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
8060
|
-
}),
|
|
8087
|
+
}), Oa = pe((c, e) => {
|
|
8061
8088
|
le(), ue(), ce();
|
|
8062
|
-
var t =
|
|
8089
|
+
var t = Ia(), r = Ta();
|
|
8063
8090
|
function a(n, i, o, s, l) {
|
|
8064
8091
|
return new r(t().w(n, i, o, s), l || Promise);
|
|
8065
8092
|
}
|
|
8066
8093
|
e.exports = a, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
8067
|
-
}),
|
|
8094
|
+
}), Bc = pe((c, e) => {
|
|
8068
8095
|
le(), ue(), ce();
|
|
8069
|
-
var t =
|
|
8096
|
+
var t = Oa();
|
|
8070
8097
|
function r(a, n, i, o, s) {
|
|
8071
8098
|
var l = t(a, n, i, o, s);
|
|
8072
8099
|
return l.next().then(function(u) {
|
|
@@ -8074,7 +8101,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8074
8101
|
});
|
|
8075
8102
|
}
|
|
8076
8103
|
e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
8077
|
-
}),
|
|
8104
|
+
}), Fc = pe((c, e) => {
|
|
8078
8105
|
le(), ue(), ce();
|
|
8079
8106
|
function t(r) {
|
|
8080
8107
|
var a = Object(r), n = [];
|
|
@@ -8085,9 +8112,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8085
8112
|
};
|
|
8086
8113
|
}
|
|
8087
8114
|
e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
8088
|
-
}),
|
|
8115
|
+
}), Dc = pe((c, e) => {
|
|
8089
8116
|
le(), ue(), ce();
|
|
8090
|
-
var t =
|
|
8117
|
+
var t = Ur().default;
|
|
8091
8118
|
function r(a) {
|
|
8092
8119
|
if (a != null) {
|
|
8093
8120
|
var n = a[typeof Symbol == "function" && Symbol.iterator || "@@iterator"], i = 0;
|
|
@@ -8100,9 +8127,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8100
8127
|
throw new TypeError(t(a) + " is not iterable");
|
|
8101
8128
|
}
|
|
8102
8129
|
e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
8103
|
-
}),
|
|
8130
|
+
}), $c = pe((c, e) => {
|
|
8104
8131
|
le(), ue(), ce();
|
|
8105
|
-
var t =
|
|
8132
|
+
var t = xa(), r = Ia(), a = Bc(), n = Oa(), i = Ta(), o = Fc(), s = Dc();
|
|
8106
8133
|
function l() {
|
|
8107
8134
|
var u = r(), d = u.m(l), p = (Object.getPrototypeOf ? Object.getPrototypeOf(d) : d.__proto__).constructor;
|
|
8108
8135
|
function y(b) {
|
|
@@ -8149,18 +8176,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8149
8176
|
}, e.exports.__esModule = !0, e.exports.default = e.exports)();
|
|
8150
8177
|
}
|
|
8151
8178
|
e.exports = l, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
8152
|
-
}),
|
|
8179
|
+
}), Wc = pe((c, e) => {
|
|
8153
8180
|
le(), ue(), ce();
|
|
8154
|
-
var t =
|
|
8181
|
+
var t = $c()();
|
|
8155
8182
|
e.exports = t;
|
|
8156
8183
|
try {
|
|
8157
8184
|
regeneratorRuntime = t;
|
|
8158
8185
|
} catch {
|
|
8159
8186
|
typeof globalThis == "object" ? globalThis.regeneratorRuntime = t : Function("r", "regeneratorRuntime = r")(t);
|
|
8160
8187
|
}
|
|
8161
|
-
}),
|
|
8188
|
+
}), qc = pe((c, e) => {
|
|
8162
8189
|
le(), ue(), ce(), (function(t, r) {
|
|
8163
|
-
typeof c == "object" && typeof e < "u" ? r(c,
|
|
8190
|
+
typeof c == "object" && typeof e < "u" ? r(c, Cc(), Nc(), Ea(), Uc(), Wc()) : typeof define == "function" && define.amd ? define(["exports", "@babel/runtime/helpers/defineProperty", "@babel/runtime/helpers/slicedToArray", "fast-unique-numbers", "@babel/runtime/helpers/asyncToGenerator", "@babel/runtime/regenerator"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.brokerFactory = {}, t._defineProperty, t._slicedToArray, t.fastUniqueNumbers, t._asyncToGenerator, t._regeneratorRuntime));
|
|
8164
8191
|
})(c, function(t, r, a, n, i, o) {
|
|
8165
8192
|
var s = function(g) {
|
|
8166
8193
|
return typeof g.start == "function";
|
|
@@ -8289,9 +8316,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8289
8316
|
};
|
|
8290
8317
|
t.createBroker = k;
|
|
8291
8318
|
});
|
|
8292
|
-
}),
|
|
8319
|
+
}), Hc = pe((c, e) => {
|
|
8293
8320
|
le(), ue(), ce(), (function(t, r) {
|
|
8294
|
-
typeof c == "object" && typeof e < "u" ? r(c,
|
|
8321
|
+
typeof c == "object" && typeof e < "u" ? r(c, Ur(), qc(), Ea()) : typeof define == "function" && define.amd ? define(["exports", "@babel/runtime/helpers/typeof", "broker-factory", "fast-unique-numbers"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.workerTimersBroker = {}, t._typeof, t.brokerFactory, t.fastUniqueNumbers));
|
|
8295
8322
|
})(c, function(t, r, a, n) {
|
|
8296
8323
|
var i = /* @__PURE__ */ new Map([[0, null]]), o = /* @__PURE__ */ new Map([[0, null]]), s = a.createBroker({ clearInterval: function(u) {
|
|
8297
8324
|
var d = u.call;
|
|
@@ -8339,9 +8366,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8339
8366
|
};
|
|
8340
8367
|
t.load = l, t.wrap = s;
|
|
8341
8368
|
});
|
|
8342
|
-
}),
|
|
8369
|
+
}), zc = pe((c, e) => {
|
|
8343
8370
|
le(), ue(), ce(), (function(t, r) {
|
|
8344
|
-
typeof c == "object" && typeof e < "u" ? r(c,
|
|
8371
|
+
typeof c == "object" && typeof e < "u" ? r(c, Hc()) : typeof define == "function" && define.amd ? define(["exports", "worker-timers-broker"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.workerTimers = {}, t.workerTimersBroker));
|
|
8345
8372
|
})(c, function(t, r) {
|
|
8346
8373
|
var a = function(d, p) {
|
|
8347
8374
|
var y = null;
|
|
@@ -8365,11 +8392,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8365
8392
|
};
|
|
8366
8393
|
t.clearInterval = o, t.clearTimeout = s, t.setInterval = l, t.setTimeout = u;
|
|
8367
8394
|
});
|
|
8368
|
-
}),
|
|
8395
|
+
}), Br = pe((c) => {
|
|
8369
8396
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 }), c.isReactNativeBrowser = c.isWebWorker = void 0;
|
|
8370
8397
|
var e = () => typeof window < "u" ? typeof navigator < "u" && navigator.userAgent?.toLowerCase().indexOf(" electron/") > -1 && Pe?.versions ? !Object.prototype.hasOwnProperty.call(Pe.versions, "electron") : typeof window.document < "u" : !1, t = () => !!(typeof self == "object" && self?.constructor?.name?.includes("WorkerGlobalScope") && typeof Deno > "u"), r = () => typeof navigator < "u" && navigator.product === "ReactNative", a = e() || t() || r();
|
|
8371
8398
|
c.isWebWorker = t(), c.isReactNativeBrowser = r(), c.default = a;
|
|
8372
|
-
}),
|
|
8399
|
+
}), Kc = pe((c) => {
|
|
8373
8400
|
le(), ue(), ce();
|
|
8374
8401
|
var e = c && c.__createBinding || (Object.create ? function(l, u, d, p) {
|
|
8375
8402
|
p === void 0 && (p = d);
|
|
@@ -8399,7 +8426,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8399
8426
|
};
|
|
8400
8427
|
})();
|
|
8401
8428
|
Object.defineProperty(c, "__esModule", { value: !0 });
|
|
8402
|
-
var a =
|
|
8429
|
+
var a = zc(), n = r(Br()), i = { set: a.setInterval, clear: a.clearInterval }, o = { set: (l, u) => setInterval(l, u), clear: (l) => clearInterval(l) }, s = (l) => {
|
|
8403
8430
|
switch (l) {
|
|
8404
8431
|
case "native":
|
|
8405
8432
|
return o;
|
|
@@ -8410,13 +8437,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8410
8437
|
}
|
|
8411
8438
|
};
|
|
8412
8439
|
c.default = s;
|
|
8413
|
-
}),
|
|
8440
|
+
}), Ca = pe((c) => {
|
|
8414
8441
|
le(), ue(), ce();
|
|
8415
8442
|
var e = c && c.__importDefault || function(a) {
|
|
8416
8443
|
return a && a.__esModule ? a : { default: a };
|
|
8417
8444
|
};
|
|
8418
8445
|
Object.defineProperty(c, "__esModule", { value: !0 });
|
|
8419
|
-
var t = e(
|
|
8446
|
+
var t = e(Kc()), r = class {
|
|
8420
8447
|
_keepalive;
|
|
8421
8448
|
timerId;
|
|
8422
8449
|
timer;
|
|
@@ -8457,7 +8484,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8457
8484
|
}
|
|
8458
8485
|
};
|
|
8459
8486
|
c.default = r;
|
|
8460
|
-
}),
|
|
8487
|
+
}), ii = pe((c) => {
|
|
8461
8488
|
le(), ue(), ce();
|
|
8462
8489
|
var e = c && c.__createBinding || (Object.create ? function(v, x, E, I) {
|
|
8463
8490
|
I === void 0 && (I = E);
|
|
@@ -8489,12 +8516,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8489
8516
|
return v && v.__esModule ? v : { default: v };
|
|
8490
8517
|
};
|
|
8491
8518
|
Object.defineProperty(c, "__esModule", { value: !0 });
|
|
8492
|
-
var n = a(
|
|
8519
|
+
var n = a(rc()), i = It(), o = a(ic()), s = a(lt()), l = r(oa()), u = a(sa()), d = a(xc()), p = a(Sa()), y = a(Ac()), f = Ut(), m = Ic(), b = a(Ca()), k = r(Br()), g = globalThis.setImmediate || ((...v) => {
|
|
8493
8520
|
let x = v.shift();
|
|
8494
8521
|
(0, f.nextTick)(() => {
|
|
8495
8522
|
x(...v);
|
|
8496
8523
|
});
|
|
8497
|
-
}), _ = { keepalive: 60, reschedulePings: !0, protocolId: "MQTT", protocolVersion: 4, reconnectPeriod: 1e3, connectTimeout: 30 * 1e3, clean: !0, resubscribe: !0, subscribeBatchSize: null, writeCache: !0, timerVariant: "auto" }, S = class
|
|
8524
|
+
}), _ = { keepalive: 60, reschedulePings: !0, protocolId: "MQTT", protocolVersion: 4, reconnectPeriod: 1e3, connectTimeout: 30 * 1e3, clean: !0, resubscribe: !0, subscribeBatchSize: null, writeCache: !0, timerVariant: "auto" }, S = class oi extends m.TypedEventEmitter {
|
|
8498
8525
|
static VERSION = f.MQTTJS_VERSION;
|
|
8499
8526
|
connected;
|
|
8500
8527
|
disconnecting;
|
|
@@ -8531,7 +8558,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8531
8558
|
constructor(x, E) {
|
|
8532
8559
|
super(), this.options = E || {};
|
|
8533
8560
|
for (let I in _) typeof this.options[I] > "u" ? this.options[I] = _[I] : this.options[I] = E[I];
|
|
8534
|
-
this.log = this.options.log || (0, s.default)("mqttjs:client"), this.noop = this._noop.bind(this), this.log("MqttClient :: version:",
|
|
8561
|
+
this.log = this.options.log || (0, s.default)("mqttjs:client"), this.noop = this._noop.bind(this), this.log("MqttClient :: version:", oi.VERSION), k.isWebWorker ? this.log("MqttClient :: environment", "webworker") : this.log("MqttClient :: environment", k.default ? "browser" : "node"), this.log("MqttClient :: options.protocol", E.protocol), this.log("MqttClient :: options.protocolVersion", E.protocolVersion), this.log("MqttClient :: options.username", E.username), this.log("MqttClient :: options.keepalive", E.keepalive), this.log("MqttClient :: options.reconnectPeriod", E.reconnectPeriod), this.log("MqttClient :: options.rejectUnauthorized", E.rejectUnauthorized), this.log("MqttClient :: options.properties.topicAliasMaximum", E.properties ? E.properties.topicAliasMaximum : void 0), this.options.clientId = typeof E.clientId == "string" ? E.clientId : oi.defaultId(), this.log("MqttClient :: clientId", this.options.clientId), this.options.customHandleAcks = E.protocolVersion === 5 && E.customHandleAcks ? E.customHandleAcks : (...I) => {
|
|
8535
8562
|
I[3](null, 0);
|
|
8536
8563
|
}, this.options.writeCache || (n.default.writeToStream.cacheNumbers = !1), this.streamBuilder = x, this.messageIdProvider = typeof this.options.messageIdProvider > "u" ? new p.default() : this.options.messageIdProvider, this.outgoingStore = E.outgoingStore || new u.default(), this.incomingStore = E.incomingStore || new u.default(), this.queueQoSZero = E.queueQoSZero === void 0 ? !0 : E.queueQoSZero, this._resubscribeTopics = {}, this.messageIdToTopic = {}, this.keepaliveManager = null, this.connected = !1, this.disconnecting = !1, this.reconnecting = !1, this.queue = [], this.connackTimer = null, this.reconnectTimer = null, this._storeProcessing = !1, this._packetIdsDuringStoreProcessing = {}, this._storeProcessingQueue = [], this.outgoing = {}, this._firstConnection = !0, E.properties && E.properties.topicAliasMaximum > 0 && (E.properties.topicAliasMaximum > 65535 ? this.log("MqttClient :: options.properties.topicAliasMaximum is out of range") : this.topicAliasRecv = new y.default(E.properties.topicAliasMaximum)), this.on("connect", () => {
|
|
8537
8564
|
let { queue: I } = this, M = () => {
|
|
@@ -8991,9 +9018,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8991
9018
|
}
|
|
8992
9019
|
};
|
|
8993
9020
|
c.default = S;
|
|
8994
|
-
}),
|
|
9021
|
+
}), Vc = pe((c) => {
|
|
8995
9022
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
|
|
8996
|
-
var e =
|
|
9023
|
+
var e = ka(), t = class {
|
|
8997
9024
|
numberAllocator;
|
|
8998
9025
|
lastId;
|
|
8999
9026
|
constructor() {
|
|
@@ -9017,9 +9044,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
9017
9044
|
};
|
|
9018
9045
|
c.default = t;
|
|
9019
9046
|
});
|
|
9020
|
-
function
|
|
9021
|
-
if (
|
|
9022
|
-
|
|
9047
|
+
function Gc() {
|
|
9048
|
+
if (si) return sr;
|
|
9049
|
+
si = !0;
|
|
9023
9050
|
let c = 2147483647, e = 36, t = 1, r = 26, a = 38, n = 700, i = 72, o = 128, s = "-", l = /^xn--/, u = /[^\0-\x7F]/, d = /[\x2E\u3002\uFF0E\uFF61]/g, p = { overflow: "Overflow: input needs wider integers to process", "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input" }, y = e - t, f = Math.floor, m = String.fromCharCode;
|
|
9024
9051
|
function b(C) {
|
|
9025
9052
|
throw new RangeError(p[C]);
|
|
@@ -9108,11 +9135,11 @@ function Vc() {
|
|
|
9108
9135
|
});
|
|
9109
9136
|
} }, sr;
|
|
9110
9137
|
}
|
|
9111
|
-
var sr,
|
|
9112
|
-
le(), ue(), ce(), sr = {},
|
|
9138
|
+
var sr, si, gt, Yc = He(() => {
|
|
9139
|
+
le(), ue(), ce(), sr = {}, si = !1, gt = Gc(), gt.decode, gt.encode, gt.toASCII, gt.toUnicode, gt.ucs2, gt.version;
|
|
9113
9140
|
});
|
|
9114
|
-
function
|
|
9115
|
-
return
|
|
9141
|
+
function Qc() {
|
|
9142
|
+
return li || (li = !0, ai = function() {
|
|
9116
9143
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1;
|
|
9117
9144
|
if (typeof Symbol.iterator == "symbol") return !0;
|
|
9118
9145
|
var c = {}, e = /* @__PURE__ */ Symbol("test"), t = Object(e);
|
|
@@ -9128,48 +9155,48 @@ function Yc() {
|
|
|
9128
9155
|
if (n.value !== r || n.enumerable !== !0) return !1;
|
|
9129
9156
|
}
|
|
9130
9157
|
return !0;
|
|
9131
|
-
}),
|
|
9132
|
-
}
|
|
9133
|
-
function Qc() {
|
|
9134
|
-
return ci || (ci = !0, li = Error), li;
|
|
9158
|
+
}), ai;
|
|
9135
9159
|
}
|
|
9136
9160
|
function Jc() {
|
|
9137
|
-
return
|
|
9161
|
+
return ui || (ui = !0, ci = Error), ci;
|
|
9138
9162
|
}
|
|
9139
9163
|
function Xc() {
|
|
9140
|
-
return
|
|
9164
|
+
return fi || (fi = !0, hi = EvalError), hi;
|
|
9141
9165
|
}
|
|
9142
9166
|
function Zc() {
|
|
9143
|
-
return
|
|
9167
|
+
return pi || (pi = !0, di = RangeError), di;
|
|
9144
9168
|
}
|
|
9145
|
-
function
|
|
9146
|
-
return
|
|
9169
|
+
function eu() {
|
|
9170
|
+
return mi || (mi = !0, gi = ReferenceError), gi;
|
|
9147
9171
|
}
|
|
9148
|
-
function
|
|
9149
|
-
return
|
|
9172
|
+
function Pa() {
|
|
9173
|
+
return yi || (yi = !0, bi = SyntaxError), bi;
|
|
9150
9174
|
}
|
|
9151
|
-
function
|
|
9152
|
-
return
|
|
9175
|
+
function Jt() {
|
|
9176
|
+
return wi || (wi = !0, vi = TypeError), vi;
|
|
9153
9177
|
}
|
|
9154
9178
|
function tu() {
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9179
|
+
return ki || (ki = !0, _i = URIError), _i;
|
|
9180
|
+
}
|
|
9181
|
+
function ru() {
|
|
9182
|
+
if (Si) return ar;
|
|
9183
|
+
Si = !0;
|
|
9184
|
+
var c = typeof Symbol < "u" && Symbol, e = Qc();
|
|
9158
9185
|
return ar = function() {
|
|
9159
9186
|
return typeof c != "function" || typeof Symbol != "function" || typeof c("foo") != "symbol" || typeof /* @__PURE__ */ Symbol("bar") != "symbol" ? !1 : e();
|
|
9160
9187
|
}, ar;
|
|
9161
9188
|
}
|
|
9162
|
-
function
|
|
9163
|
-
if (
|
|
9164
|
-
|
|
9189
|
+
function nu() {
|
|
9190
|
+
if (Ei) return lr;
|
|
9191
|
+
Ei = !0;
|
|
9165
9192
|
var c = { __proto__: null, foo: {} }, e = Object;
|
|
9166
9193
|
return lr = function() {
|
|
9167
9194
|
return { __proto__: c }.foo === c.foo && !(c instanceof e);
|
|
9168
9195
|
}, lr;
|
|
9169
9196
|
}
|
|
9170
|
-
function
|
|
9171
|
-
if (
|
|
9172
|
-
|
|
9197
|
+
function iu() {
|
|
9198
|
+
if (xi) return cr;
|
|
9199
|
+
xi = !0;
|
|
9173
9200
|
var c = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, t = Math.max, r = "[object Function]", a = function(o, s) {
|
|
9174
9201
|
for (var l = [], u = 0; u < o.length; u += 1) l[u] = o[u];
|
|
9175
9202
|
for (var d = 0; d < s.length; d += 1) l[d + o.length] = s[d];
|
|
@@ -9199,22 +9226,22 @@ function nu() {
|
|
|
9199
9226
|
return u;
|
|
9200
9227
|
}, cr;
|
|
9201
9228
|
}
|
|
9202
|
-
function
|
|
9203
|
-
if (
|
|
9204
|
-
|
|
9205
|
-
var c =
|
|
9229
|
+
function eo() {
|
|
9230
|
+
if (Ai) return ur;
|
|
9231
|
+
Ai = !0;
|
|
9232
|
+
var c = iu();
|
|
9206
9233
|
return ur = Function.prototype.bind || c, ur;
|
|
9207
9234
|
}
|
|
9208
|
-
function
|
|
9209
|
-
if (
|
|
9210
|
-
|
|
9211
|
-
var c = Function.prototype.call, e = Object.prototype.hasOwnProperty, t =
|
|
9235
|
+
function ou() {
|
|
9236
|
+
if (Ii) return hr;
|
|
9237
|
+
Ii = !0;
|
|
9238
|
+
var c = Function.prototype.call, e = Object.prototype.hasOwnProperty, t = eo();
|
|
9212
9239
|
return hr = t.call(c, e), hr;
|
|
9213
9240
|
}
|
|
9214
9241
|
function Bt() {
|
|
9215
|
-
if (
|
|
9216
|
-
|
|
9217
|
-
var c, e =
|
|
9242
|
+
if (Ti) return fr;
|
|
9243
|
+
Ti = !0;
|
|
9244
|
+
var c, e = Jc(), t = Xc(), r = Zc(), a = eu(), n = Pa(), i = Jt(), o = tu(), s = Function, l = function(Y) {
|
|
9218
9245
|
try {
|
|
9219
9246
|
return s('"use strict"; return (' + Y + ").constructor;")();
|
|
9220
9247
|
} catch {
|
|
@@ -9237,7 +9264,7 @@ function Bt() {
|
|
|
9237
9264
|
return d;
|
|
9238
9265
|
}
|
|
9239
9266
|
}
|
|
9240
|
-
})() : d, y =
|
|
9267
|
+
})() : d, y = ru()(), f = nu()(), m = Object.getPrototypeOf || (f ? function(Y) {
|
|
9241
9268
|
return Y.__proto__;
|
|
9242
9269
|
} : null), b = {}, k = typeof Uint8Array > "u" || !m ? c : m(Uint8Array), g = { __proto__: null, "%AggregateError%": typeof AggregateError > "u" ? c : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer > "u" ? c : ArrayBuffer, "%ArrayIteratorPrototype%": y && m ? m([][Symbol.iterator]()) : c, "%AsyncFromSyncIteratorPrototype%": c, "%AsyncFunction%": b, "%AsyncGenerator%": b, "%AsyncGeneratorFunction%": b, "%AsyncIteratorPrototype%": b, "%Atomics%": typeof Atomics > "u" ? c : Atomics, "%BigInt%": typeof BigInt > "u" ? c : BigInt, "%BigInt64Array%": typeof BigInt64Array > "u" ? c : BigInt64Array, "%BigUint64Array%": typeof BigUint64Array > "u" ? c : BigUint64Array, "%Boolean%": Boolean, "%DataView%": typeof DataView > "u" ? c : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": e, "%eval%": eval, "%EvalError%": t, "%Float32Array%": typeof Float32Array > "u" ? c : Float32Array, "%Float64Array%": typeof Float64Array > "u" ? c : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? c : FinalizationRegistry, "%Function%": s, "%GeneratorFunction%": b, "%Int8Array%": typeof Int8Array > "u" ? c : Int8Array, "%Int16Array%": typeof Int16Array > "u" ? c : Int16Array, "%Int32Array%": typeof Int32Array > "u" ? c : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": y && m ? m(m([][Symbol.iterator]())) : c, "%JSON%": typeof JSON == "object" ? JSON : c, "%Map%": typeof Map > "u" ? c : Map, "%MapIteratorPrototype%": typeof Map > "u" || !y || !m ? c : m((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise > "u" ? c : Promise, "%Proxy%": typeof Proxy > "u" ? c : Proxy, "%RangeError%": r, "%ReferenceError%": a, "%Reflect%": typeof Reflect > "u" ? c : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set > "u" ? c : Set, "%SetIteratorPrototype%": typeof Set > "u" || !y || !m ? c : m((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? c : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": y && m ? m(""[Symbol.iterator]()) : c, "%Symbol%": y ? Symbol : c, "%SyntaxError%": n, "%ThrowTypeError%": p, "%TypedArray%": k, "%TypeError%": i, "%Uint8Array%": typeof Uint8Array > "u" ? c : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? c : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array > "u" ? c : Uint16Array, "%Uint32Array%": typeof Uint32Array > "u" ? c : Uint32Array, "%URIError%": o, "%WeakMap%": typeof WeakMap > "u" ? c : WeakMap, "%WeakRef%": typeof WeakRef > "u" ? c : WeakRef, "%WeakSet%": typeof WeakSet > "u" ? c : WeakSet };
|
|
9243
9270
|
if (m) try {
|
|
@@ -9259,7 +9286,7 @@ function Bt() {
|
|
|
9259
9286
|
Z && m && (re = m(Z.prototype));
|
|
9260
9287
|
}
|
|
9261
9288
|
return g[K] = re, re;
|
|
9262
|
-
}, v = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, x =
|
|
9289
|
+
}, v = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, x = eo(), E = ou(), I = x.call(Function.call, Array.prototype.concat), M = x.call(Function.apply, Array.prototype.splice), C = x.call(Function.call, String.prototype.replace), B = x.call(Function.call, String.prototype.slice), T = x.call(Function.call, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, F = /\\(\\)?/g, N = function(Y) {
|
|
9263
9290
|
var K = B(Y, 0, 1), re = B(Y, -1);
|
|
9264
9291
|
if (K === "%" && re !== "%") throw new n("invalid intrinsic syntax, expected closing `%`");
|
|
9265
9292
|
if (re === "%" && K !== "%") throw new n("invalid intrinsic syntax, expected opening `%`");
|
|
@@ -9301,9 +9328,9 @@ function Bt() {
|
|
|
9301
9328
|
return J;
|
|
9302
9329
|
}, fr;
|
|
9303
9330
|
}
|
|
9304
|
-
function
|
|
9305
|
-
if (
|
|
9306
|
-
|
|
9331
|
+
function to() {
|
|
9332
|
+
if (Oi) return dr;
|
|
9333
|
+
Oi = !0;
|
|
9307
9334
|
var c = Bt(), e = c("%Object.defineProperty%", !0) || !1;
|
|
9308
9335
|
if (e) try {
|
|
9309
9336
|
e({}, "a", { value: 1 });
|
|
@@ -9312,9 +9339,9 @@ function eo() {
|
|
|
9312
9339
|
}
|
|
9313
9340
|
return dr = e, dr;
|
|
9314
9341
|
}
|
|
9315
|
-
function
|
|
9316
|
-
if (
|
|
9317
|
-
|
|
9342
|
+
function Ma() {
|
|
9343
|
+
if (Ci) return pr;
|
|
9344
|
+
Ci = !0;
|
|
9318
9345
|
var c = Bt(), e = c("%Object.getOwnPropertyDescriptor%", !0);
|
|
9319
9346
|
if (e) try {
|
|
9320
9347
|
e([], "length");
|
|
@@ -9323,10 +9350,10 @@ function Ca() {
|
|
|
9323
9350
|
}
|
|
9324
9351
|
return pr = e, pr;
|
|
9325
9352
|
}
|
|
9326
|
-
function
|
|
9327
|
-
if (
|
|
9328
|
-
|
|
9329
|
-
var c =
|
|
9353
|
+
function su() {
|
|
9354
|
+
if (Pi) return gr;
|
|
9355
|
+
Pi = !0;
|
|
9356
|
+
var c = to(), e = Pa(), t = Jt(), r = Ma();
|
|
9330
9357
|
return gr = function(a, n, i) {
|
|
9331
9358
|
if (!a || typeof a != "object" && typeof a != "function") throw new t("`obj` must be an object or a function`");
|
|
9332
9359
|
if (typeof n != "string" && typeof n != "symbol") throw new t("`property` must be a string or a symbol`");
|
|
@@ -9340,10 +9367,10 @@ function ou() {
|
|
|
9340
9367
|
else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
9341
9368
|
}, gr;
|
|
9342
9369
|
}
|
|
9343
|
-
function
|
|
9344
|
-
if (
|
|
9345
|
-
|
|
9346
|
-
var c =
|
|
9370
|
+
function au() {
|
|
9371
|
+
if (Mi) return mr;
|
|
9372
|
+
Mi = !0;
|
|
9373
|
+
var c = to(), e = function() {
|
|
9347
9374
|
return !!c;
|
|
9348
9375
|
};
|
|
9349
9376
|
return e.hasArrayLengthDefineBug = function() {
|
|
@@ -9355,10 +9382,10 @@ function su() {
|
|
|
9355
9382
|
}
|
|
9356
9383
|
}, mr = e, mr;
|
|
9357
9384
|
}
|
|
9358
|
-
function
|
|
9359
|
-
if (
|
|
9360
|
-
|
|
9361
|
-
var c = Bt(), e =
|
|
9385
|
+
function lu() {
|
|
9386
|
+
if (Ri) return br;
|
|
9387
|
+
Ri = !0;
|
|
9388
|
+
var c = Bt(), e = su(), t = au()(), r = Ma(), a = Jt(), n = c("%Math.floor%");
|
|
9362
9389
|
return br = function(i, o) {
|
|
9363
9390
|
if (typeof i != "function") throw new a("`fn` is not a function");
|
|
9364
9391
|
if (typeof o != "number" || o < 0 || o > 4294967295 || n(o) !== o) throw new a("`length` must be a positive 32-bit integer");
|
|
@@ -9370,10 +9397,10 @@ function au() {
|
|
|
9370
9397
|
return (l || u || !s) && (t ? e(i, "length", o, !0, !0) : e(i, "length", o)), i;
|
|
9371
9398
|
}, br;
|
|
9372
9399
|
}
|
|
9373
|
-
function
|
|
9374
|
-
if (
|
|
9375
|
-
|
|
9376
|
-
var c =
|
|
9400
|
+
function cu() {
|
|
9401
|
+
if (ji) return Mt;
|
|
9402
|
+
ji = !0;
|
|
9403
|
+
var c = eo(), e = Bt(), t = lu(), r = Jt(), a = e("%Function.prototype.apply%"), n = e("%Function.prototype.call%"), i = e("%Reflect.apply%", !0) || c.call(n, a), o = to(), s = e("%Math.max%");
|
|
9377
9404
|
Mt = function(u) {
|
|
9378
9405
|
if (typeof u != "function") throw new r("a function is required");
|
|
9379
9406
|
var d = i(c, n, arguments);
|
|
@@ -9384,27 +9411,27 @@ function lu() {
|
|
|
9384
9411
|
};
|
|
9385
9412
|
return o ? o(Mt, "apply", { value: l }) : Mt.apply = l, Mt;
|
|
9386
9413
|
}
|
|
9387
|
-
function
|
|
9388
|
-
if (
|
|
9389
|
-
|
|
9390
|
-
var c = Bt(), e =
|
|
9414
|
+
function uu() {
|
|
9415
|
+
if (Li) return yr;
|
|
9416
|
+
Li = !0;
|
|
9417
|
+
var c = Bt(), e = cu(), t = e(c("String.prototype.indexOf"));
|
|
9391
9418
|
return yr = function(r, a) {
|
|
9392
9419
|
var n = c(r, !!a);
|
|
9393
9420
|
return typeof n == "function" && t(r, ".prototype.") > -1 ? e(n) : n;
|
|
9394
9421
|
}, yr;
|
|
9395
9422
|
}
|
|
9396
|
-
var
|
|
9397
|
-
le(), ue(), ce(),
|
|
9423
|
+
var ai, li, ci, ui, hi, fi, di, pi, gi, mi, bi, yi, vi, wi, _i, ki, ar, Si, lr, Ei, cr, xi, ur, Ai, hr, Ii, fr, Ti, dr, Oi, pr, Ci, gr, Pi, mr, Mi, br, Ri, Mt, ji, yr, Li, hu = He(() => {
|
|
9424
|
+
le(), ue(), ce(), ai = {}, li = !1, ci = {}, ui = !1, hi = {}, fi = !1, di = {}, pi = !1, gi = {}, mi = !1, bi = {}, yi = !1, vi = {}, wi = !1, _i = {}, ki = !1, ar = {}, Si = !1, lr = {}, Ei = !1, cr = {}, xi = !1, ur = {}, Ai = !1, hr = {}, Ii = !1, fr = {}, Ti = !1, dr = {}, Oi = !1, pr = {}, Ci = !1, gr = {}, Pi = !1, mr = {}, Mi = !1, br = {}, Ri = !1, Mt = {}, ji = !1, yr = {}, Li = !1;
|
|
9398
9425
|
});
|
|
9399
|
-
function
|
|
9426
|
+
function ro(c) {
|
|
9400
9427
|
throw new Error("Node.js process " + c + " is not supported by JSPM core outside of Node.js");
|
|
9401
9428
|
}
|
|
9402
|
-
function
|
|
9403
|
-
!Et || !kt || (Et = !1, kt.length ? tt = kt.concat(tt) : Gt = -1, tt.length &&
|
|
9429
|
+
function fu() {
|
|
9430
|
+
!Et || !kt || (Et = !1, kt.length ? tt = kt.concat(tt) : Gt = -1, tt.length && Ra());
|
|
9404
9431
|
}
|
|
9405
|
-
function
|
|
9432
|
+
function Ra() {
|
|
9406
9433
|
if (!Et) {
|
|
9407
|
-
var c = setTimeout(
|
|
9434
|
+
var c = setTimeout(fu, 0);
|
|
9408
9435
|
Et = !0;
|
|
9409
9436
|
for (var e = tt.length; e; ) {
|
|
9410
9437
|
for (kt = tt, tt = []; ++Gt < e; ) kt && kt[Gt].run();
|
|
@@ -9413,70 +9440,70 @@ function Pa() {
|
|
|
9413
9440
|
kt = null, Et = !1, clearTimeout(c);
|
|
9414
9441
|
}
|
|
9415
9442
|
}
|
|
9416
|
-
function
|
|
9443
|
+
function du(c) {
|
|
9417
9444
|
var e = new Array(arguments.length - 1);
|
|
9418
9445
|
if (arguments.length > 1) for (var t = 1; t < arguments.length; t++) e[t - 1] = arguments[t];
|
|
9419
|
-
tt.push(new
|
|
9446
|
+
tt.push(new ja(c, e)), tt.length === 1 && !Et && setTimeout(Ra, 0);
|
|
9420
9447
|
}
|
|
9421
|
-
function
|
|
9448
|
+
function ja(c, e) {
|
|
9422
9449
|
this.fun = c, this.array = e;
|
|
9423
9450
|
}
|
|
9424
9451
|
function Fe() {
|
|
9425
9452
|
}
|
|
9426
|
-
function du(c) {
|
|
9427
|
-
to("_linkedBinding");
|
|
9428
|
-
}
|
|
9429
9453
|
function pu(c) {
|
|
9430
|
-
|
|
9454
|
+
ro("_linkedBinding");
|
|
9431
9455
|
}
|
|
9432
|
-
function gu() {
|
|
9433
|
-
|
|
9456
|
+
function gu(c) {
|
|
9457
|
+
ro("dlopen");
|
|
9434
9458
|
}
|
|
9435
9459
|
function mu() {
|
|
9436
9460
|
return [];
|
|
9437
9461
|
}
|
|
9438
|
-
function bu(
|
|
9462
|
+
function bu() {
|
|
9463
|
+
return [];
|
|
9464
|
+
}
|
|
9465
|
+
function yu(c, e) {
|
|
9439
9466
|
if (!c) throw new Error(e || "assertion error");
|
|
9440
9467
|
}
|
|
9441
|
-
function
|
|
9468
|
+
function vu() {
|
|
9442
9469
|
return !1;
|
|
9443
9470
|
}
|
|
9444
|
-
function
|
|
9471
|
+
function wu() {
|
|
9445
9472
|
return st.now() / 1e3;
|
|
9446
9473
|
}
|
|
9447
|
-
function
|
|
9474
|
+
function $r(c) {
|
|
9448
9475
|
var e = Math.floor((Date.now() - st.now()) * 1e-3), t = st.now() * 1e-3, r = Math.floor(t) + e, a = Math.floor(t % 1 * 1e9);
|
|
9449
9476
|
return c && (r = r - c[0], a = a - c[1], a < 0 && (r--, a += vr)), [r, a];
|
|
9450
9477
|
}
|
|
9451
9478
|
function dt() {
|
|
9452
|
-
return
|
|
9479
|
+
return no;
|
|
9453
9480
|
}
|
|
9454
|
-
function
|
|
9481
|
+
function _u(c) {
|
|
9455
9482
|
return [];
|
|
9456
9483
|
}
|
|
9457
|
-
var tt, Et, kt, Gt,
|
|
9458
|
-
le(), ue(), ce(), tt = [], Et = !1, Gt = -1,
|
|
9484
|
+
var tt, Et, kt, Gt, go, mo, bo, yo, vo, wo, _o, ko, So, Eo, xo, Ao, Io, To, Oo, Co, Po, Mo, Ro, jo, Lo, er, No, Uo, Bo, Fo, Do, $o, Wo, qo, Ho, zo, Ko, Vo, Go, Yo, Qo, Jo, Xo, Zo, es, ts, rs, ns, is, os, ss, st, Wr, vr, as, ls, cs, us, hs, fs, ds, ps, gs, ms, bs, no, La = He(() => {
|
|
9485
|
+
le(), ue(), ce(), tt = [], Et = !1, Gt = -1, ja.prototype.run = function() {
|
|
9459
9486
|
this.fun.apply(null, this.array);
|
|
9460
|
-
},
|
|
9487
|
+
}, go = "browser", mo = "x64", bo = "browser", yo = { PATH: "/usr/bin", LANG: navigator.language + ".UTF-8", PWD: "/", HOME: "/home", TMP: "/tmp" }, vo = ["/usr/bin/node"], wo = [], _o = "v16.8.0", ko = {}, So = function(c, e) {
|
|
9461
9488
|
console.warn((e ? e + ": " : "") + c);
|
|
9462
|
-
}, So = function(c) {
|
|
9463
|
-
to("binding");
|
|
9464
9489
|
}, Eo = function(c) {
|
|
9490
|
+
ro("binding");
|
|
9491
|
+
}, xo = function(c) {
|
|
9465
9492
|
return 0;
|
|
9466
|
-
},
|
|
9493
|
+
}, Ao = function() {
|
|
9467
9494
|
return "/";
|
|
9468
|
-
},
|
|
9469
|
-
},
|
|
9495
|
+
}, Io = function(c) {
|
|
9496
|
+
}, To = { name: "node", sourceUrl: "", headersUrl: "", libUrl: "" }, Oo = Fe, Co = [], Po = {}, Mo = !1, Ro = {}, jo = Fe, Lo = Fe, er = function() {
|
|
9470
9497
|
return {};
|
|
9471
|
-
},
|
|
9472
|
-
var e =
|
|
9498
|
+
}, No = er, Uo = er, Bo = Fe, Fo = Fe, Do = Fe, $o = {}, Wo = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, qo = Fe, Ho = Fe, zo = Fe, Ko = Fe, Vo = Fe, Go = Fe, Yo = Fe, Qo = void 0, Jo = void 0, Xo = void 0, Zo = Fe, es = 2, ts = 1, rs = "/bin/usr/node", ns = 9229, is = "node", os = [], ss = Fe, st = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, st.now === void 0 && (Wr = Date.now(), st.timing && st.timing.navigationStart && (Wr = st.timing.navigationStart), st.now = () => Date.now() - Wr), vr = 1e9, $r.bigint = function(c) {
|
|
9499
|
+
var e = $r(c);
|
|
9473
9500
|
return typeof BigInt > "u" ? e[0] * vr + e[1] : BigInt(e[0] * vr) + BigInt(e[1]);
|
|
9474
|
-
},
|
|
9501
|
+
}, as = 10, ls = {}, cs = 0, us = dt, hs = dt, fs = dt, ds = dt, ps = dt, gs = Fe, ms = dt, bs = dt, no = { version: _o, versions: ko, arch: mo, platform: bo, release: To, _rawDebug: Oo, moduleLoadList: Co, binding: Eo, _linkedBinding: pu, _events: ls, _eventsCount: cs, _maxListeners: as, on: dt, addListener: us, once: hs, off: fs, removeListener: ds, removeAllListeners: ps, emit: gs, prependListener: ms, prependOnceListener: bs, listeners: _u, domain: Po, _exiting: Mo, config: Ro, dlopen: gu, uptime: wu, _getActiveRequests: mu, _getActiveHandles: bu, reallyExit: jo, _kill: Lo, cpuUsage: er, resourceUsage: No, memoryUsage: Uo, kill: Bo, exit: Fo, openStdin: Do, allowedNodeEnvironmentFlags: $o, assert: yu, features: Wo, _fatalExceptions: qo, setUncaughtExceptionCaptureCallback: Ho, hasUncaughtExceptionCaptureCallback: vu, emitWarning: So, nextTick: du, _tickCallback: zo, _debugProcess: Ko, _debugEnd: Vo, _startProfilerIdleNotifier: Go, _stopProfilerIdleNotifier: Yo, stdout: Qo, stdin: Xo, stderr: Jo, abort: Zo, umask: xo, chdir: Io, cwd: Ao, env: yo, title: go, argv: vo, execArgv: wo, pid: es, ppid: ts, execPath: rs, debugPort: ns, hrtime: $r, argv0: is, _preload_modules: os, setSourceMapsEnabled: ss };
|
|
9475
9502
|
});
|
|
9476
|
-
function
|
|
9477
|
-
if (
|
|
9478
|
-
|
|
9479
|
-
var c =
|
|
9503
|
+
function ku() {
|
|
9504
|
+
if (Ni) return wr;
|
|
9505
|
+
Ni = !0;
|
|
9506
|
+
var c = no;
|
|
9480
9507
|
function e(n) {
|
|
9481
9508
|
if (typeof n != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(n));
|
|
9482
9509
|
}
|
|
@@ -9624,13 +9651,13 @@ function _u() {
|
|
|
9624
9651
|
}, sep: "/", delimiter: ":", win32: null, posix: null };
|
|
9625
9652
|
return a.posix = a, wr = a, wr;
|
|
9626
9653
|
}
|
|
9627
|
-
var wr,
|
|
9628
|
-
le(), ue(), ce(),
|
|
9629
|
-
}),
|
|
9630
|
-
Lt(
|
|
9631
|
-
function
|
|
9632
|
-
if (
|
|
9633
|
-
|
|
9654
|
+
var wr, Ni, Ui, Su = He(() => {
|
|
9655
|
+
le(), ue(), ce(), La(), wr = {}, Ni = !1, Ui = ku();
|
|
9656
|
+
}), Na = {};
|
|
9657
|
+
Lt(Na, { URL: () => Ka, Url: () => $a, default: () => De, fileURLToPath: () => Ba, format: () => Wa, parse: () => za, pathToFileURL: () => Fa, resolve: () => qa, resolveObject: () => Ha });
|
|
9658
|
+
function Eu() {
|
|
9659
|
+
if (Bi) return _r;
|
|
9660
|
+
Bi = !0;
|
|
9634
9661
|
var c = typeof Map == "function" && Map.prototype, e = Object.getOwnPropertyDescriptor && c ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = c && e && typeof e.get == "function" ? e.get : null, r = c && Map.prototype.forEach, a = typeof Set == "function" && Set.prototype, n = Object.getOwnPropertyDescriptor && a ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, i = a && n && typeof n.get == "function" ? n.get : null, o = a && Set.prototype.forEach, s = typeof WeakMap == "function" && WeakMap.prototype, l = s ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, d = u ? WeakSet.prototype.has : null, p = typeof WeakRef == "function" && WeakRef.prototype, y = p ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, m = Object.prototype.toString, b = Function.prototype.toString, k = String.prototype.match, g = String.prototype.slice, _ = String.prototype.replace, S = String.prototype.toUpperCase, v = String.prototype.toLowerCase, x = RegExp.prototype.test, E = Array.prototype.concat, I = Array.prototype.join, M = Array.prototype.slice, C = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, T = Object.getOwnPropertySymbols, W = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, F = typeof Symbol == "function" && typeof Symbol.iterator == "object", N = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === F || !0) ? Symbol.toStringTag : null, ae = Object.prototype.propertyIsEnumerable, Y = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(z) {
|
|
9635
9662
|
return z.__proto__;
|
|
9636
9663
|
} : null);
|
|
@@ -9646,7 +9673,7 @@ function Su() {
|
|
|
9646
9673
|
}
|
|
9647
9674
|
return _.call(ie, xe, "$&_");
|
|
9648
9675
|
}
|
|
9649
|
-
var re =
|
|
9676
|
+
var re = Da, D = re.custom, Z = G(D) ? D : null;
|
|
9650
9677
|
_r = function z(ie, xe, Ae, Ie) {
|
|
9651
9678
|
var Oe = xe || {};
|
|
9652
9679
|
if (oe(Oe, "quoteStyle") && Oe.quoteStyle !== "single" && Oe.quoteStyle !== "double") throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
@@ -9923,10 +9950,10 @@ function Su() {
|
|
|
9923
9950
|
}
|
|
9924
9951
|
return _r;
|
|
9925
9952
|
}
|
|
9926
|
-
function
|
|
9927
|
-
if (
|
|
9928
|
-
|
|
9929
|
-
var c = Bt(), e =
|
|
9953
|
+
function xu() {
|
|
9954
|
+
if (Fi) return Sr;
|
|
9955
|
+
Fi = !0;
|
|
9956
|
+
var c = Bt(), e = uu(), t = Eu(), r = Jt(), a = c("%WeakMap%", !0), n = c("%Map%", !0), i = e("WeakMap.prototype.get", !0), o = e("WeakMap.prototype.set", !0), s = e("WeakMap.prototype.has", !0), l = e("Map.prototype.get", !0), u = e("Map.prototype.set", !0), d = e("Map.prototype.has", !0), p = function(b, k) {
|
|
9930
9957
|
for (var g = b, _; (_ = g.next) !== null; g = _) if (_.key === k) return g.next = _.next, _.next = b.next, b.next = _, _;
|
|
9931
9958
|
}, y = function(b, k) {
|
|
9932
9959
|
var g = p(b, k);
|
|
@@ -9959,9 +9986,9 @@ function Eu() {
|
|
|
9959
9986
|
return _;
|
|
9960
9987
|
}, Sr;
|
|
9961
9988
|
}
|
|
9962
|
-
function
|
|
9963
|
-
if (
|
|
9964
|
-
|
|
9989
|
+
function io() {
|
|
9990
|
+
if (Di) return Er;
|
|
9991
|
+
Di = !0;
|
|
9965
9992
|
var c = String.prototype.replace, e = /%20/g, t = { RFC1738: "RFC1738", RFC3986: "RFC3986" };
|
|
9966
9993
|
return Er = { default: t.RFC3986, formatters: { RFC1738: function(r) {
|
|
9967
9994
|
return c.call(r, e, "+");
|
|
@@ -9969,10 +9996,10 @@ function no() {
|
|
|
9969
9996
|
return String(r);
|
|
9970
9997
|
} }, RFC1738: t.RFC1738, RFC3986: t.RFC3986 }, Er;
|
|
9971
9998
|
}
|
|
9972
|
-
function
|
|
9973
|
-
if (
|
|
9974
|
-
|
|
9975
|
-
var c =
|
|
9999
|
+
function Ua() {
|
|
10000
|
+
if ($i) return xr;
|
|
10001
|
+
$i = !0;
|
|
10002
|
+
var c = io(), e = Object.prototype.hasOwnProperty, t = Array.isArray, r = (function() {
|
|
9976
10003
|
for (var b = [], k = 0; k < 256; ++k) b.push("%" + ((k < 16 ? "0" : "") + k.toString(16)).toUpperCase());
|
|
9977
10004
|
return b;
|
|
9978
10005
|
})(), a = function(b) {
|
|
@@ -10068,10 +10095,10 @@ function La() {
|
|
|
10068
10095
|
};
|
|
10069
10096
|
return xr = { arrayToObject: n, assign: o, combine: f, compact: d, decode: s, encode: u, isBuffer: y, isRegExp: p, maybeMap: m, merge: i }, xr;
|
|
10070
10097
|
}
|
|
10071
|
-
function
|
|
10072
|
-
if (
|
|
10073
|
-
|
|
10074
|
-
var c =
|
|
10098
|
+
function Au() {
|
|
10099
|
+
if (Wi) return Ar;
|
|
10100
|
+
Wi = !0;
|
|
10101
|
+
var c = xu(), e = Ua(), t = io(), r = Object.prototype.hasOwnProperty, a = { brackets: function(m) {
|
|
10075
10102
|
return m + "[]";
|
|
10076
10103
|
}, comma: "comma", indices: function(m, b) {
|
|
10077
10104
|
return m + "[" + b + "]";
|
|
@@ -10160,10 +10187,10 @@ function xu() {
|
|
|
10160
10187
|
return g.charsetSentinel && (g.charset === "iso-8859-1" ? T += "utf8=%26%2310003%3B&" : T += "utf8=%E2%9C%93&"), B.length > 0 ? T + B : "";
|
|
10161
10188
|
}, Ar;
|
|
10162
10189
|
}
|
|
10163
|
-
function
|
|
10164
|
-
if (
|
|
10165
|
-
|
|
10166
|
-
var c =
|
|
10190
|
+
function Iu() {
|
|
10191
|
+
if (qi) return Ir;
|
|
10192
|
+
qi = !0;
|
|
10193
|
+
var c = Ua(), e = Object.prototype.hasOwnProperty, t = Array.isArray, r = { allowDots: !1, allowEmptyArrays: !1, allowPrototypes: !1, allowSparse: !1, arrayLimit: 20, charset: "utf-8", charsetSentinel: !1, comma: !1, decodeDotInKeys: !1, decoder: c.decode, delimiter: "&", depth: 5, duplicates: "combine", ignoreQueryPrefix: !1, interpretNumericEntities: !1, parameterLimit: 1e3, parseArrays: !0, plainObjects: !1, strictDepth: !1, strictNullHandling: !1 }, a = function(p) {
|
|
10167
10194
|
return p.replace(/&#(\d+);/g, function(y, f) {
|
|
10168
10195
|
return String.fromCharCode(parseInt(f, 10));
|
|
10169
10196
|
});
|
|
@@ -10233,21 +10260,21 @@ function Au() {
|
|
|
10233
10260
|
return f.allowSparse === !0 ? b : c.compact(b);
|
|
10234
10261
|
}, Ir;
|
|
10235
10262
|
}
|
|
10236
|
-
function Iu() {
|
|
10237
|
-
if (qi) return Tr;
|
|
10238
|
-
qi = !0;
|
|
10239
|
-
var c = xu(), e = Au(), t = no();
|
|
10240
|
-
return Tr = { formats: t, parse: e, stringify: c }, Tr;
|
|
10241
|
-
}
|
|
10242
10263
|
function Tu() {
|
|
10243
|
-
if (Hi) return
|
|
10264
|
+
if (Hi) return Tr;
|
|
10244
10265
|
Hi = !0;
|
|
10266
|
+
var c = Au(), e = Iu(), t = io();
|
|
10267
|
+
return Tr = { formats: t, parse: e, stringify: c }, Tr;
|
|
10268
|
+
}
|
|
10269
|
+
function Ou() {
|
|
10270
|
+
if (zi) return mt;
|
|
10271
|
+
zi = !0;
|
|
10245
10272
|
var c = gt;
|
|
10246
10273
|
function e() {
|
|
10247
10274
|
this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
|
|
10248
10275
|
}
|
|
10249
10276
|
var t = /^([a-z0-9.+-]+:)/i, r = /:[0-9]*$/, a = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, n = ["<", ">", '"', "`", " ", "\r", `
|
|
10250
|
-
`, " "], i = ["{", "}", "|", "\\", "^", "`"].concat(n), o = ["'"].concat(i), s = ["%", "/", "?", ";", "#"].concat(o), l = ["/", "?", "#"], u = 255, d = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, y = { javascript: !0, "javascript:": !0 }, f = { javascript: !0, "javascript:": !0 }, m = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, b =
|
|
10277
|
+
`, " "], i = ["{", "}", "|", "\\", "^", "`"].concat(n), o = ["'"].concat(i), s = ["%", "/", "?", ";", "#"].concat(o), l = ["/", "?", "#"], u = 255, d = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, y = { javascript: !0, "javascript:": !0 }, f = { javascript: !0, "javascript:": !0 }, m = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, b = Tu();
|
|
10251
10278
|
function k(v, x, E) {
|
|
10252
10279
|
if (v && typeof v == "object" && v instanceof e) return v;
|
|
10253
10280
|
var I = new e();
|
|
@@ -10400,26 +10427,26 @@ function Tu() {
|
|
|
10400
10427
|
x && (x = x[0], x !== ":" && (this.port = x.substr(1)), v = v.substr(0, v.length - x.length)), v && (this.hostname = v);
|
|
10401
10428
|
}, mt.parse = k, mt.resolve = _, mt.resolveObject = S, mt.format = g, mt.Url = e, mt;
|
|
10402
10429
|
}
|
|
10403
|
-
function
|
|
10430
|
+
function Ba(c) {
|
|
10404
10431
|
if (typeof c == "string") c = new URL(c);
|
|
10405
10432
|
else if (!(c instanceof URL)) throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");
|
|
10406
10433
|
if (c.protocol !== "file:") throw new Deno.errors.InvalidData("invalid url scheme");
|
|
10407
|
-
return
|
|
10434
|
+
return Pr ? Cu(c) : Pu(c);
|
|
10408
10435
|
}
|
|
10409
|
-
function
|
|
10436
|
+
function Cu(c) {
|
|
10410
10437
|
let e = c.hostname, t = c.pathname;
|
|
10411
10438
|
for (let r = 0; r < t.length; r++) if (t[r] === "%") {
|
|
10412
10439
|
let a = t.codePointAt(r + 2) || 32;
|
|
10413
10440
|
if (t[r + 1] === "2" && a === 102 || t[r + 1] === "5" && a === 99) throw new Deno.errors.InvalidData("must not include encoded \\ or / characters");
|
|
10414
10441
|
}
|
|
10415
|
-
if (t = t.replace(
|
|
10442
|
+
if (t = t.replace(Ja, "\\"), t = decodeURIComponent(t), e !== "") return `\\\\${e}${t}`;
|
|
10416
10443
|
{
|
|
10417
10444
|
let r = t.codePointAt(1) | 32, a = t[2];
|
|
10418
|
-
if (r <
|
|
10445
|
+
if (r < Ya || r > Qa || a !== ":") throw new Deno.errors.InvalidData("file url path must be absolute");
|
|
10419
10446
|
return t.slice(1);
|
|
10420
10447
|
}
|
|
10421
10448
|
}
|
|
10422
|
-
function
|
|
10449
|
+
function Pu(c) {
|
|
10423
10450
|
if (c.hostname !== "") throw new Deno.errors.InvalidData("invalid file url hostname");
|
|
10424
10451
|
let e = c.pathname;
|
|
10425
10452
|
for (let t = 0; t < e.length; t++) if (e[t] === "%") {
|
|
@@ -10428,20 +10455,20 @@ function Cu(c) {
|
|
|
10428
10455
|
}
|
|
10429
10456
|
return decodeURIComponent(e);
|
|
10430
10457
|
}
|
|
10431
|
-
function
|
|
10432
|
-
let e =
|
|
10433
|
-
(t ===
|
|
10458
|
+
function Fa(c) {
|
|
10459
|
+
let e = Ui.resolve(c), t = c.charCodeAt(c.length - 1);
|
|
10460
|
+
(t === Ga || Pr && t === Va) && e[e.length - 1] !== Ui.sep && (e += "/");
|
|
10434
10461
|
let r = new URL("file://");
|
|
10435
|
-
return e.includes("%") && (e = e.replace(
|
|
10436
|
-
`) && (e = e.replace(
|
|
10462
|
+
return e.includes("%") && (e = e.replace(Xa, "%25")), !Pr && e.includes("\\") && (e = e.replace(Za, "%5C")), e.includes(`
|
|
10463
|
+
`) && (e = e.replace(el, "%0A")), e.includes("\r") && (e = e.replace(tl, "%0D")), e.includes(" ") && (e = e.replace(rl, "%09")), r.pathname = e, r;
|
|
10437
10464
|
}
|
|
10438
|
-
var
|
|
10439
|
-
le(), ue(), ce(),
|
|
10440
|
-
}),
|
|
10465
|
+
var Da, _r, Bi, kr, Sr, Fi, Er, Di, xr, $i, Ar, Wi, Ir, qi, Tr, Hi, mt, zi, De, ys, $a, Wa, qa, Ha, za, Ka, Va, Ga, Ya, Qa, Pr, Ja, Xa, Za, el, tl, rl, Mu = He(() => {
|
|
10466
|
+
le(), ue(), ce(), Yc(), hu(), Su(), La(), Da = Object.freeze(/* @__PURE__ */ Object.create(null)), _r = {}, Bi = !1, kr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : global, Sr = {}, Fi = !1, Er = {}, Di = !1, xr = {}, $i = !1, Ar = {}, Wi = !1, Ir = {}, qi = !1, Tr = {}, Hi = !1, mt = {}, zi = !1, De = Ou(), De.parse, De.resolve, De.resolveObject, De.format, De.Url, ys = typeof Deno < "u" ? Deno.build.os === "windows" ? "win32" : Deno.build.os : void 0, De.URL = typeof URL < "u" ? URL : null, De.pathToFileURL = Fa, De.fileURLToPath = Ba, $a = De.Url, Wa = De.format, qa = De.resolve, Ha = De.resolveObject, za = De.parse, Ka = De.URL, Va = 92, Ga = 47, Ya = 97, Qa = 122, Pr = ys === "win32", Ja = /\//g, Xa = /%/g, Za = /\\/g, el = /\n/g, tl = /\r/g, rl = /\t/g;
|
|
10467
|
+
}), Ru = pe((c, e) => {
|
|
10441
10468
|
le(), ue(), ce(), e.exports = function() {
|
|
10442
10469
|
throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object");
|
|
10443
10470
|
};
|
|
10444
|
-
}),
|
|
10471
|
+
}), oo = pe((c) => {
|
|
10445
10472
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 }), c.BufferedDuplex = void 0, c.writev = r;
|
|
10446
10473
|
var e = It(), t = (Ne(), Ce(Le));
|
|
10447
10474
|
function r(n, i) {
|
|
@@ -10491,7 +10518,7 @@ var Ba, _r, Ui, kr, Sr, Bi, Er, Fi, xr, Di, Ar, $i, Ir, Wi, Tr, qi, mt, Hi, De,
|
|
|
10491
10518
|
return k && k.__esModule ? k : { default: k };
|
|
10492
10519
|
};
|
|
10493
10520
|
Object.defineProperty(c, "__esModule", { value: !0 }), c.streamBuilder = c.browserStreamBuilder = void 0;
|
|
10494
|
-
var t = (Ne(), Ce(Le)), r = e(
|
|
10521
|
+
var t = (Ne(), Ce(Le)), r = e(Ru()), a = e(lt()), n = It(), i = e(Br()), o = oo(), s = (0, a.default)("mqttjs:ws"), l = ["rejectUnauthorized", "ca", "cert", "key", "pfx", "passphrase"];
|
|
10495
10522
|
function u(k, g) {
|
|
10496
10523
|
let _ = `${k.protocol}://${k.hostname}:${k.port}${k.path}`;
|
|
10497
10524
|
return typeof k.transformWsUrl == "function" && (_ = k.transformWsUrl(_, k, g)), _;
|
|
@@ -10579,38 +10606,38 @@ var Ba, _r, Ui, kr, Sr, Bi, Er, Fi, xr, Di, Ar, $i, Ir, Wi, Tr, qi, mt, Hi, De,
|
|
|
10579
10606
|
return _;
|
|
10580
10607
|
};
|
|
10581
10608
|
c.browserStreamBuilder = b;
|
|
10582
|
-
}),
|
|
10583
|
-
Lt(
|
|
10609
|
+
}), so = {};
|
|
10610
|
+
Lt(so, { Server: () => Me, Socket: () => Me, Stream: () => Me, _createServerHandle: () => Me, _normalizeArgs: () => Me, _setSimultaneousAccepts: () => Me, connect: () => Me, createConnection: () => Me, createServer: () => Me, default: () => nl, isIP: () => Me, isIPv4: () => Me, isIPv6: () => Me });
|
|
10584
10611
|
function Me() {
|
|
10585
10612
|
throw new Error("Node.js net module is not supported by JSPM core outside of Node.js");
|
|
10586
10613
|
}
|
|
10587
|
-
var
|
|
10588
|
-
le(), ue(), ce(),
|
|
10589
|
-
}),
|
|
10614
|
+
var nl, il = He(() => {
|
|
10615
|
+
le(), ue(), ce(), nl = { _createServerHandle: Me, _normalizeArgs: Me, _setSimultaneousAccepts: Me, connect: Me, createConnection: Me, createServer: Me, isIP: Me, isIPv4: Me, isIPv6: Me, Server: Me, Socket: Me, Stream: Me };
|
|
10616
|
+
}), ol = pe((c, e) => {
|
|
10590
10617
|
le(), ue(), ce(), e.exports = {};
|
|
10591
|
-
}),
|
|
10618
|
+
}), vs = pe((c) => {
|
|
10592
10619
|
le(), ue(), ce();
|
|
10593
10620
|
var e = c && c.__importDefault || function(o) {
|
|
10594
10621
|
return o && o.__esModule ? o : { default: o };
|
|
10595
10622
|
};
|
|
10596
10623
|
Object.defineProperty(c, "__esModule", { value: !0 });
|
|
10597
|
-
var t = e((
|
|
10624
|
+
var t = e((il(), Ce(so))), r = e(lt()), a = e(ol()), n = (0, r.default)("mqttjs:tcp"), i = (o, s) => {
|
|
10598
10625
|
if (s.port = s.port || 1883, s.hostname = s.hostname || s.host || "localhost", s.socksProxy) return (0, a.default)(s.hostname, s.port, s.socksProxy, { timeout: s.socksTimeout });
|
|
10599
10626
|
let { port: l, path: u } = s, d = s.hostname;
|
|
10600
10627
|
return n("port %d and host %s", l, d), t.default.createConnection({ port: l, host: d, path: u });
|
|
10601
10628
|
};
|
|
10602
10629
|
c.default = i;
|
|
10603
|
-
}),
|
|
10604
|
-
Lt(
|
|
10605
|
-
var
|
|
10606
|
-
le(), ue(), ce(),
|
|
10607
|
-
}),
|
|
10630
|
+
}), sl = {};
|
|
10631
|
+
Lt(sl, { default: () => al });
|
|
10632
|
+
var al, ju = He(() => {
|
|
10633
|
+
le(), ue(), ce(), al = {};
|
|
10634
|
+
}), ws = pe((c) => {
|
|
10608
10635
|
le(), ue(), ce();
|
|
10609
10636
|
var e = c && c.__importDefault || function(l) {
|
|
10610
10637
|
return l && l.__esModule ? l : { default: l };
|
|
10611
10638
|
};
|
|
10612
10639
|
Object.defineProperty(c, "__esModule", { value: !0 });
|
|
10613
|
-
var t = (
|
|
10640
|
+
var t = (ju(), Ce(sl)), r = e((il(), Ce(so))), a = e(lt()), n = e(ol()), i = (0, a.default)("mqttjs:tls");
|
|
10614
10641
|
function o(l) {
|
|
10615
10642
|
let { host: u, port: d, socksProxy: p, ...y } = l;
|
|
10616
10643
|
if (p !== void 0) {
|
|
@@ -10631,9 +10658,9 @@ var ol, Ru = He(() => {
|
|
|
10631
10658
|
return d.on("error", p), d;
|
|
10632
10659
|
};
|
|
10633
10660
|
c.default = s;
|
|
10634
|
-
}),
|
|
10661
|
+
}), _s = pe((c) => {
|
|
10635
10662
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
|
|
10636
|
-
var e = (Ne(), Ce(Le)), t = It(), r =
|
|
10663
|
+
var e = (Ne(), Ce(Le)), t = It(), r = oo(), a, n, i;
|
|
10637
10664
|
function o() {
|
|
10638
10665
|
let p = new t.Transform();
|
|
10639
10666
|
return p._write = (y, f, m) => {
|
|
@@ -10686,9 +10713,9 @@ var ol, Ru = He(() => {
|
|
|
10686
10713
|
}, 0), i), u(), i;
|
|
10687
10714
|
};
|
|
10688
10715
|
c.default = d;
|
|
10689
|
-
}),
|
|
10716
|
+
}), ks = pe((c) => {
|
|
10690
10717
|
le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
|
|
10691
|
-
var e = (Ne(), Ce(Le)), t = It(), r =
|
|
10718
|
+
var e = (Ne(), Ce(Le)), t = It(), r = oo(), a, n, i, o = !1;
|
|
10692
10719
|
function s() {
|
|
10693
10720
|
let y = new t.Transform();
|
|
10694
10721
|
return y._write = (f, m, b) => {
|
|
@@ -10741,13 +10768,13 @@ var ol, Ru = He(() => {
|
|
|
10741
10768
|
return a = f.my, a.connectSocket({ url: b, protocols: m }), n = s(), i = new r.BufferedDuplex(f, n, a), d(), i;
|
|
10742
10769
|
};
|
|
10743
10770
|
c.default = p;
|
|
10744
|
-
}),
|
|
10771
|
+
}), Lu = pe((c) => {
|
|
10745
10772
|
le(), ue(), ce();
|
|
10746
10773
|
var e = c && c.__importDefault || function(d) {
|
|
10747
10774
|
return d && d.__esModule ? d : { default: d };
|
|
10748
10775
|
};
|
|
10749
10776
|
Object.defineProperty(c, "__esModule", { value: !0 }), c.connectAsync = u;
|
|
10750
|
-
var t = e(lt()), r = e((
|
|
10777
|
+
var t = e(lt()), r = e((Mu(), Ce(Na))), a = e(ii()), n = e(Br());
|
|
10751
10778
|
typeof Pe?.nextTick != "function" && (Pe.nextTick = setImmediate);
|
|
10752
10779
|
var i = (0, t.default)("mqttjs"), o = null;
|
|
10753
10780
|
function s(d) {
|
|
@@ -10781,7 +10808,7 @@ var ol, Ru = He(() => {
|
|
|
10781
10808
|
throw new Error(`Unknown protocol for secure connection: "${p.protocol}"!`);
|
|
10782
10809
|
}
|
|
10783
10810
|
} else throw new Error("Missing secure protocol key");
|
|
10784
|
-
if (o || (o = {}, !n.default && !p.forceNativeWebSocket ? (o.ws = tr().streamBuilder, o.wss = tr().streamBuilder, o.mqtt =
|
|
10811
|
+
if (o || (o = {}, !n.default && !p.forceNativeWebSocket ? (o.ws = tr().streamBuilder, o.wss = tr().streamBuilder, o.mqtt = vs().default, o.tcp = vs().default, o.ssl = ws().default, o.tls = o.ssl, o.mqtts = ws().default) : (o.ws = tr().browserStreamBuilder, o.wss = tr().browserStreamBuilder, o.wx = _s().default, o.wxs = _s().default, o.ali = ks().default, o.alis = ks().default)), !o[p.protocol]) {
|
|
10785
10812
|
let m = ["mqtts", "wss"].indexOf(p.protocol) !== -1;
|
|
10786
10813
|
p.protocol = ["mqtt", "mqtts", "ws", "wss", "wx", "wxs", "ali", "alis"].filter((b, k) => m && k % 2 === 0 ? !1 : typeof o[b] == "function")[0];
|
|
10787
10814
|
}
|
|
@@ -10817,7 +10844,7 @@ var ol, Ru = He(() => {
|
|
|
10817
10844
|
});
|
|
10818
10845
|
}
|
|
10819
10846
|
c.default = l;
|
|
10820
|
-
}),
|
|
10847
|
+
}), Ss = pe((c) => {
|
|
10821
10848
|
le(), ue(), ce();
|
|
10822
10849
|
var e = c && c.__createBinding || (Object.create ? function(y, f, m, b) {
|
|
10823
10850
|
b === void 0 && (b = m);
|
|
@@ -10851,25 +10878,25 @@ var ol, Ru = He(() => {
|
|
|
10851
10878
|
return y && y.__esModule ? y : { default: y };
|
|
10852
10879
|
};
|
|
10853
10880
|
Object.defineProperty(c, "__esModule", { value: !0 }), c.ReasonCodes = c.KeepaliveManager = c.UniqueMessageIdProvider = c.DefaultMessageIdProvider = c.Store = c.MqttClient = c.connectAsync = c.connect = c.Client = void 0;
|
|
10854
|
-
var i = n(
|
|
10881
|
+
var i = n(ii());
|
|
10855
10882
|
c.MqttClient = i.default;
|
|
10856
|
-
var o = n(
|
|
10883
|
+
var o = n(Sa());
|
|
10857
10884
|
c.DefaultMessageIdProvider = o.default;
|
|
10858
|
-
var s = n(
|
|
10885
|
+
var s = n(Vc());
|
|
10859
10886
|
c.UniqueMessageIdProvider = s.default;
|
|
10860
|
-
var l = n(
|
|
10887
|
+
var l = n(sa());
|
|
10861
10888
|
c.Store = l.default;
|
|
10862
|
-
var u = r(
|
|
10889
|
+
var u = r(Lu());
|
|
10863
10890
|
c.connect = u.default, Object.defineProperty(c, "connectAsync", { enumerable: !0, get: function() {
|
|
10864
10891
|
return u.connectAsync;
|
|
10865
10892
|
} });
|
|
10866
|
-
var d = n(
|
|
10867
|
-
c.KeepaliveManager = d.default, c.Client = i.default, a(
|
|
10868
|
-
var p =
|
|
10893
|
+
var d = n(Ca());
|
|
10894
|
+
c.KeepaliveManager = d.default, c.Client = i.default, a(ii(), c), a(Ut(), c), a(oa(), c);
|
|
10895
|
+
var p = Nr();
|
|
10869
10896
|
Object.defineProperty(c, "ReasonCodes", { enumerable: !0, get: function() {
|
|
10870
10897
|
return p.ReasonCodes;
|
|
10871
10898
|
} });
|
|
10872
|
-
}),
|
|
10899
|
+
}), Nu = pe((c) => {
|
|
10873
10900
|
le(), ue(), ce();
|
|
10874
10901
|
var e = c && c.__createBinding || (Object.create ? function(i, o, s, l) {
|
|
10875
10902
|
l === void 0 && (l = s);
|
|
@@ -10901,28 +10928,28 @@ var ol, Ru = He(() => {
|
|
|
10901
10928
|
for (var s in i) s !== "default" && !Object.prototype.hasOwnProperty.call(o, s) && e(o, i, s);
|
|
10902
10929
|
};
|
|
10903
10930
|
Object.defineProperty(c, "__esModule", { value: !0 });
|
|
10904
|
-
var n = r(
|
|
10905
|
-
c.default = n, a(
|
|
10931
|
+
var n = r(Ss());
|
|
10932
|
+
c.default = n, a(Ss(), c);
|
|
10906
10933
|
});
|
|
10907
|
-
const
|
|
10908
|
-
const
|
|
10934
|
+
const Uu = Nu();
|
|
10935
|
+
const Bu = {
|
|
10909
10936
|
inbound: "apps/{appId}/users/{userId}/messages/{conversationId}/clientadded",
|
|
10910
10937
|
inboundUpdate: "apps/{appId}/users/{userId}/messages/{conversationId}/{messageId}/update",
|
|
10911
10938
|
outbound: "apps/{appId}/outgoing/users/{userId}/messages/{conversationId}/outgoing",
|
|
10912
10939
|
presence: "apps/{appId}/users/{userId}/presence/{clientId}",
|
|
10913
10940
|
wildcardSubscribe: "apps/{appId}/users/{userId}/#"
|
|
10914
|
-
},
|
|
10941
|
+
}, Fu = 300, Du = {
|
|
10915
10942
|
templateId: "7",
|
|
10916
10943
|
type: "link",
|
|
10917
10944
|
isDeepLink: !0
|
|
10918
|
-
},
|
|
10945
|
+
}, $u = {
|
|
10919
10946
|
channelType: "group",
|
|
10920
10947
|
channel: "chat21",
|
|
10921
10948
|
requestChannel: "chat21",
|
|
10922
10949
|
platform: "WEBSITE",
|
|
10923
10950
|
medium: "CHATBUDDY"
|
|
10924
10951
|
};
|
|
10925
|
-
class
|
|
10952
|
+
class Wu {
|
|
10926
10953
|
client = null;
|
|
10927
10954
|
config;
|
|
10928
10955
|
currentToken;
|
|
@@ -10941,7 +10968,7 @@ class $u {
|
|
|
10941
10968
|
inboundRegex;
|
|
10942
10969
|
inboundUpdateRegex;
|
|
10943
10970
|
constructor(e) {
|
|
10944
|
-
this.config = e, this.currentToken = e.jwtToken, this.appId = e.appId ?? "tilechat", this.clientId = e.clientId ?? `aikaara_${e.userId}_${Date.now()}`, this.topics = { ...
|
|
10971
|
+
this.config = e, this.currentToken = e.jwtToken, this.appId = e.appId ?? "tilechat", this.clientId = e.clientId ?? `aikaara_${e.userId}_${Date.now()}`, this.topics = { ...Bu, ...e.topicTemplates ?? {} }, this.maxReconnectAttempts = e.maxReconnectAttempts ?? 10, this.reconnectMaxDelayMs = e.reconnectMaxDelayMs ?? 3e4, this.inboundRegex = this.buildTopicRegex(
|
|
10945
10972
|
this.topics.inbound,
|
|
10946
10973
|
["conversationId"]
|
|
10947
10974
|
), this.inboundUpdateRegex = this.buildTopicRegex(
|
|
@@ -10971,7 +10998,7 @@ class $u {
|
|
|
10971
10998
|
qos: 0,
|
|
10972
10999
|
retain: !1
|
|
10973
11000
|
}), new Promise((a, n) => {
|
|
10974
|
-
this.client =
|
|
11001
|
+
this.client = Uu.connect(this.config.mqttEndpoint, r), this.client.on("connect", () => {
|
|
10975
11002
|
if (this.reconnectAttempt = 0, this.debugLog("CONNECT", { endpoint: this.config.mqttEndpoint, clientId: this.clientId }), this.notifyStateChange(!0), this.config.enablePresence !== !1) {
|
|
10976
11003
|
const i = this.config.presencePayloadConnected ?? { connected: !0 };
|
|
10977
11004
|
this.client.publish(e, JSON.stringify(i), { qos: 0, retain: !1 }), this.debugLog("PUBLISH", { topic: e, payload: i });
|
|
@@ -11022,9 +11049,9 @@ class $u {
|
|
|
11022
11049
|
publishFileMessage(e, t) {
|
|
11023
11050
|
if (!this.client) return;
|
|
11024
11051
|
const r = {
|
|
11025
|
-
...
|
|
11052
|
+
...Du,
|
|
11026
11053
|
...this.config.fileTemplate ?? {},
|
|
11027
|
-
...
|
|
11054
|
+
...qu(t)
|
|
11028
11055
|
}, a = {
|
|
11029
11056
|
metadata: {
|
|
11030
11057
|
contentType: "300",
|
|
@@ -11063,7 +11090,7 @@ class $u {
|
|
|
11063
11090
|
* Send a read receipt for a message. Tiledesk widgets publish
|
|
11064
11091
|
* `{"status":300}` to apps/{appId}/users/{userId}/messages/{convId}/{msgId}/update.
|
|
11065
11092
|
*/
|
|
11066
|
-
publishReadReceipt(e, t, r =
|
|
11093
|
+
publishReadReceipt(e, t, r = Fu) {
|
|
11067
11094
|
if (!this.client) return;
|
|
11068
11095
|
const a = this.renderTemplate(this.topics.inboundUpdate, { conversationId: e, messageId: t });
|
|
11069
11096
|
this.client.publish(a, JSON.stringify({ status: r }), {
|
|
@@ -11171,7 +11198,7 @@ class $u {
|
|
|
11171
11198
|
this.messageHandlers.forEach((l) => l(a, s));
|
|
11172
11199
|
}
|
|
11173
11200
|
buildOutgoingEnvelope(e, t) {
|
|
11174
|
-
const r = {
|
|
11201
|
+
const r = { ...$u, ...this.config.messageDefaults ?? {} }, a = this.config.senderFullname ?? this.config.userName ?? this.config.userId, n = this.config.recipientFullnameResolver?.(e), i = {
|
|
11175
11202
|
projectId: this.config.projectId,
|
|
11176
11203
|
...r.departmentId ? { departmentId: r.departmentId } : {},
|
|
11177
11204
|
...this.config.userName ? { userFullname: this.config.userName } : {},
|
|
@@ -11245,20 +11272,20 @@ class $u {
|
|
|
11245
11272
|
return new RegExp(`^${r}$`);
|
|
11246
11273
|
}
|
|
11247
11274
|
}
|
|
11248
|
-
function
|
|
11275
|
+
function qu(c) {
|
|
11249
11276
|
const e = {};
|
|
11250
11277
|
for (const [t, r] of Object.entries(c))
|
|
11251
11278
|
r !== void 0 && (e[t] = r);
|
|
11252
11279
|
return e;
|
|
11253
11280
|
}
|
|
11254
|
-
function
|
|
11281
|
+
function Hu(c, e) {
|
|
11255
11282
|
return (c.sender ?? "").toString() === e;
|
|
11256
11283
|
}
|
|
11257
|
-
function
|
|
11284
|
+
function zu(c, e) {
|
|
11258
11285
|
const t = (c.sender ?? "").toString(), r = e.systemSenders ?? ["metadata", "system"], a = e.botSenderPrefix ?? "bot_";
|
|
11259
11286
|
return t ? t === e.userId ? "user" : t.startsWith(a) ? "assistant" : r.includes(t) ? "system" : "agent" : "system";
|
|
11260
11287
|
}
|
|
11261
|
-
function
|
|
11288
|
+
function ll(c) {
|
|
11262
11289
|
const e = { raw: c }, t = c.metadata;
|
|
11263
11290
|
if (t && typeof t == "object" && (typeof t.contentType == "string" && (e.contentType = t.contentType), typeof t.templateId == "string" && (e.templateId = t.templateId), t.payload !== void 0 && (e.payload = t.payload)), typeof c.text == "string" && c.text.trim().startsWith("{"))
|
|
11264
11291
|
try {
|
|
@@ -11275,8 +11302,8 @@ function sl(c) {
|
|
|
11275
11302
|
}
|
|
11276
11303
|
return e;
|
|
11277
11304
|
}
|
|
11278
|
-
function
|
|
11279
|
-
const e =
|
|
11305
|
+
function Ku(c) {
|
|
11306
|
+
const e = ll(c);
|
|
11280
11307
|
if (e.contentType !== "300") return null;
|
|
11281
11308
|
const t = e.payload, r = t && Array.isArray(t.elements) ? t.elements : null;
|
|
11282
11309
|
if (!r || r.length === 0) return null;
|
|
@@ -11288,11 +11315,11 @@ function zu(c) {
|
|
|
11288
11315
|
templateId: e.templateId
|
|
11289
11316
|
};
|
|
11290
11317
|
}
|
|
11291
|
-
function
|
|
11292
|
-
const r =
|
|
11318
|
+
function Es(c, e, t) {
|
|
11319
|
+
const r = zu(c, t), a = ll(c), n = Ku(c);
|
|
11293
11320
|
let i = "";
|
|
11294
11321
|
a.innerMessage ? i = a.innerMessage : typeof c.text == "string" && (c.text.trim().startsWith("{") ? a.contentType !== "300" && (i = c.text) : i = c.text);
|
|
11295
|
-
const o = typeof c.message_id == "string" ? c.message_id : `td_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`, s = typeof c.timestamp == "number" ? new Date(c.timestamp).toISOString() : (/* @__PURE__ */ new Date()).toISOString(), l = r === "assistant" ? "assistant" : r === "agent" ? "agent" : r === "system" ? "system" : "user", u = typeof c.status == "number" ?
|
|
11322
|
+
const o = typeof c.message_id == "string" ? c.message_id : `td_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`, s = typeof c.timestamp == "number" ? new Date(c.timestamp).toISOString() : (/* @__PURE__ */ new Date()).toISOString(), l = r === "assistant" ? "assistant" : r === "agent" ? "agent" : r === "system" ? "system" : "user", u = typeof c.status == "number" ? Vu(c.status) : "delivered", d = {
|
|
11296
11323
|
id: o,
|
|
11297
11324
|
externalId: o,
|
|
11298
11325
|
conversationId: e,
|
|
@@ -11319,10 +11346,10 @@ function Ss(c, e, t) {
|
|
|
11319
11346
|
}
|
|
11320
11347
|
]), { message: d, template: a };
|
|
11321
11348
|
}
|
|
11322
|
-
function
|
|
11349
|
+
function Vu(c) {
|
|
11323
11350
|
return c < 0 ? "error" : c >= 250 ? "read" : c >= 150 ? "delivered" : "sent";
|
|
11324
11351
|
}
|
|
11325
|
-
class
|
|
11352
|
+
class Gu extends Os {
|
|
11326
11353
|
connection = null;
|
|
11327
11354
|
tiledesk = null;
|
|
11328
11355
|
api;
|
|
@@ -11335,7 +11362,7 @@ class Vu extends Ts {
|
|
|
11335
11362
|
historyAdapter;
|
|
11336
11363
|
tiledeskUnsubs = [];
|
|
11337
11364
|
constructor(e, t) {
|
|
11338
|
-
super(), this.config = e, this.mode = e.transport ?? "aikaara", this.uploadAdapter = t?.uploadAdapter ?? null, this.historyAdapter = t?.historyAdapter ?? null, this.api = new
|
|
11365
|
+
super(), this.config = e, this.mode = e.transport ?? "aikaara", this.uploadAdapter = t?.uploadAdapter ?? null, this.historyAdapter = t?.historyAdapter ?? null, this.api = new Il(e.baseUrl, e.userToken, e.apiKey, e.authToken), this.messageStore = new Tl(), this.conversationManager = new Ol(e.conversationId), this.usesAikaara() && (this.connection = new Al(e), this.connection.on("connection:state", (r) => {
|
|
11339
11366
|
this.emit("connection:state", r), this.config.onConnectionStateChange?.(r);
|
|
11340
11367
|
}), this.connection.on("error", (r) => {
|
|
11341
11368
|
this.emit("error", r), this.config.onError?.(r);
|
|
@@ -11353,7 +11380,7 @@ class Vu extends Ts {
|
|
|
11353
11380
|
throw new Error("AikaaraChatClient: tiledesk transport requires `config.tiledesk` (TiledeskTransportConfig)");
|
|
11354
11381
|
if (!t?.userId)
|
|
11355
11382
|
throw new Error("AikaaraChatClient: tiledesk transport requires `config.tiledeskIdentity.userId`");
|
|
11356
|
-
this.tiledesk = new
|
|
11383
|
+
this.tiledesk = new Wu({
|
|
11357
11384
|
...e,
|
|
11358
11385
|
userId: t.userId,
|
|
11359
11386
|
userName: t.userName ?? e.userName,
|
|
@@ -11412,7 +11439,7 @@ class Vu extends Ts {
|
|
|
11412
11439
|
return this.config.onError?.(o instanceof Error ? o : new Error(String(o))), "unknown";
|
|
11413
11440
|
}
|
|
11414
11441
|
if (!r.length) return "empty";
|
|
11415
|
-
const a = r.map((o) =>
|
|
11442
|
+
const a = r.map((o) => Es(o, e, { userId: t }).message).sort((o, s) => new Date(o.createdAt).getTime() - new Date(s.createdAt).getTime()), n = this.messageStore.messages, i = [...a, ...n.filter((o) => !a.some((s) => s.externalId && s.externalId === o.externalId))];
|
|
11416
11443
|
if (this.messageStore.setMessages(i), this.config.onMessage)
|
|
11417
11444
|
for (const o of a)
|
|
11418
11445
|
try {
|
|
@@ -11543,12 +11570,12 @@ class Vu extends Ts {
|
|
|
11543
11570
|
if (t.kind === "update") return;
|
|
11544
11571
|
const r = t.conversationId ?? this.conversationManager.conversationId;
|
|
11545
11572
|
if (!r) return;
|
|
11546
|
-
const a = this.config.tiledeskIdentity?.userId ?? "", { message: n, template: i } =
|
|
11573
|
+
const a = this.config.tiledeskIdentity?.userId ?? "", { message: n, template: i } = Es(e, r, {
|
|
11547
11574
|
userId: a,
|
|
11548
11575
|
systemSenders: this.config.tiledesk?.messageDefaults?.attributes?.systemSenders
|
|
11549
11576
|
});
|
|
11550
11577
|
if (this.mode === "dual" && n.role === "assistant") return;
|
|
11551
|
-
if (
|
|
11578
|
+
if (Hu(e, a)) {
|
|
11552
11579
|
const l = this.messageStore.reconcileOptimistic(n);
|
|
11553
11580
|
if (l) {
|
|
11554
11581
|
this.emit("message:updated", l);
|
|
@@ -11657,7 +11684,7 @@ class Vu extends Ts {
|
|
|
11657
11684
|
}
|
|
11658
11685
|
}
|
|
11659
11686
|
}
|
|
11660
|
-
const
|
|
11687
|
+
const xs = {
|
|
11661
11688
|
txt: "text/plain",
|
|
11662
11689
|
pdf: "application/pdf",
|
|
11663
11690
|
jpg: "image/jpeg",
|
|
@@ -11667,20 +11694,20 @@ const Es = {
|
|
|
11667
11694
|
doc: "application/msword",
|
|
11668
11695
|
json: "application/json"
|
|
11669
11696
|
};
|
|
11670
|
-
function
|
|
11697
|
+
function Yu(c) {
|
|
11671
11698
|
const e = c.lastIndexOf(".");
|
|
11672
11699
|
return e < 0 || e === c.length - 1 ? "" : c.slice(e + 1).toLowerCase();
|
|
11673
11700
|
}
|
|
11674
|
-
function
|
|
11675
|
-
const r =
|
|
11701
|
+
function Qu(c, e, t) {
|
|
11702
|
+
const r = Yu(c.name || "");
|
|
11676
11703
|
if (r && e && e[r]) return e[r];
|
|
11677
11704
|
const a = c.type;
|
|
11678
|
-
return a && a.trim().length > 0 ? a : r &&
|
|
11705
|
+
return a && a.trim().length > 0 ? a : r && xs[r] ? xs[r] : t;
|
|
11679
11706
|
}
|
|
11680
|
-
function
|
|
11707
|
+
function qr(c, e) {
|
|
11681
11708
|
return c.replace(/\{(\w+)\}/g, (t, r) => e[r] ?? "");
|
|
11682
11709
|
}
|
|
11683
|
-
function
|
|
11710
|
+
function Ju(c, e) {
|
|
11684
11711
|
const t = e.split(".");
|
|
11685
11712
|
let r = c;
|
|
11686
11713
|
for (const a of t)
|
|
@@ -11689,7 +11716,7 @@ function Qu(c, e) {
|
|
|
11689
11716
|
else return "";
|
|
11690
11717
|
return typeof r == "string" ? r : "";
|
|
11691
11718
|
}
|
|
11692
|
-
function
|
|
11719
|
+
function Xu(c) {
|
|
11693
11720
|
const e = c.signedUrlPath ?? "data.s3SignedUrl";
|
|
11694
11721
|
return {
|
|
11695
11722
|
async upload(t, r) {
|
|
@@ -11702,7 +11729,7 @@ function Ju(c) {
|
|
|
11702
11729
|
accept: "application/json",
|
|
11703
11730
|
...c.extraHeaders ?? {},
|
|
11704
11731
|
...i ? { authorization: i } : {}
|
|
11705
|
-
}, s =
|
|
11732
|
+
}, s = qr(
|
|
11706
11733
|
c.signEndpoint.includes("{") ? c.signEndpoint : `${c.signEndpoint}?fileName={fileName}`,
|
|
11707
11734
|
n
|
|
11708
11735
|
), l = await fetch(s, {
|
|
@@ -11711,9 +11738,9 @@ function Ju(c) {
|
|
|
11711
11738
|
});
|
|
11712
11739
|
if (!l.ok)
|
|
11713
11740
|
throw new Error(`Sign request failed: ${l.status}`);
|
|
11714
|
-
const u = await l.json().catch(() => ({})), d =
|
|
11741
|
+
const u = await l.json().catch(() => ({})), d = Ju(u, e);
|
|
11715
11742
|
if (!d) throw new Error(`Sign response missing path "${e}"`);
|
|
11716
|
-
const p =
|
|
11743
|
+
const p = Qu(
|
|
11717
11744
|
t,
|
|
11718
11745
|
c.contentTypeMap,
|
|
11719
11746
|
c.contentTypeFallback ?? "application/octet-stream"
|
|
@@ -11728,7 +11755,7 @@ function Ju(c) {
|
|
|
11728
11755
|
}
|
|
11729
11756
|
if (c.registerEndpoint) {
|
|
11730
11757
|
const b = JSON.parse(
|
|
11731
|
-
|
|
11758
|
+
qr(JSON.stringify(c.registerBody ?? {}), n)
|
|
11732
11759
|
), k = await fetch(c.registerEndpoint, {
|
|
11733
11760
|
method: "POST",
|
|
11734
11761
|
headers: { ...o, "content-type": "application/json" },
|
|
@@ -11740,7 +11767,7 @@ function Ju(c) {
|
|
|
11740
11767
|
}
|
|
11741
11768
|
}
|
|
11742
11769
|
return {
|
|
11743
|
-
url: c.viewerTemplate ?
|
|
11770
|
+
url: c.viewerTemplate ? qr(c.viewerTemplate, n) : d.split("?")[0],
|
|
11744
11771
|
fileName: a,
|
|
11745
11772
|
contentType: p,
|
|
11746
11773
|
byteSize: t.size,
|
|
@@ -11749,7 +11776,7 @@ function Ju(c) {
|
|
|
11749
11776
|
}
|
|
11750
11777
|
};
|
|
11751
11778
|
}
|
|
11752
|
-
function
|
|
11779
|
+
function cl(c) {
|
|
11753
11780
|
return {
|
|
11754
11781
|
async upload(e, t) {
|
|
11755
11782
|
const r = new FormData(), a = c.fieldName ?? "file";
|
|
@@ -11782,9 +11809,9 @@ function al(c) {
|
|
|
11782
11809
|
}
|
|
11783
11810
|
};
|
|
11784
11811
|
}
|
|
11785
|
-
const
|
|
11786
|
-
function
|
|
11787
|
-
const e = c.apiBase.replace(/\/$/, ""), t = c.pageSize ?? 200, r = c.pathTemplate ??
|
|
11812
|
+
const Zu = "/tilechat/{userId}/conversations/{conversationId}/messages?pageSize={pageSize}";
|
|
11813
|
+
function eh(c) {
|
|
11814
|
+
const e = c.apiBase.replace(/\/$/, ""), t = c.pageSize ?? 200, r = c.pathTemplate ?? Zu;
|
|
11788
11815
|
return {
|
|
11789
11816
|
async fetchMessages(a, n) {
|
|
11790
11817
|
const i = r.replace("{userId}", encodeURIComponent(n.userId)).replace("{conversationId}", encodeURIComponent(a)).replace("{appId}", encodeURIComponent(n.appId ?? "tilechat")).replace("{projectId}", encodeURIComponent(n.projectId ?? "")).replace("{pageSize}", String(t)), o = i.startsWith("http") ? i : `${e}${i.startsWith("/") ? i : `/${i}`}`, s = {
|
|
@@ -11808,7 +11835,7 @@ function Zu(c) {
|
|
|
11808
11835
|
}
|
|
11809
11836
|
};
|
|
11810
11837
|
}
|
|
11811
|
-
class
|
|
11838
|
+
class th {
|
|
11812
11839
|
client;
|
|
11813
11840
|
panel;
|
|
11814
11841
|
bubble;
|
|
@@ -11819,7 +11846,7 @@ class eh {
|
|
|
11819
11846
|
isOpen = !1;
|
|
11820
11847
|
isEmbed = !1;
|
|
11821
11848
|
constructor(e, t, r) {
|
|
11822
|
-
this.client = new
|
|
11849
|
+
this.client = new Gu(e, {
|
|
11823
11850
|
uploadAdapter: r?.uploadAdapter,
|
|
11824
11851
|
historyAdapter: r?.historyAdapter
|
|
11825
11852
|
}), this.isEmbed = e.display === "embed", this.bubble = t.querySelector("aikaara-chat-bubble"), this.panel = t.querySelector(".aikaara-panel"), this.header = t.querySelector("aikaara-chat-header"), this.messageList = t.querySelector("aikaara-message-list"), this.input = t.querySelector("aikaara-chat-input"), this.errorBanner = t.querySelector("aikaara-error-banner"), e.welcomeMessage && this.messageList.setWelcomeMessage(e.welcomeMessage), e.showTimestamps !== void 0 && this.messageList.setShowTimestamps(e.showTimestamps), (e.linkHandlers || e.getLinkBearer) && this.messageList.setLinkConfig(e.linkHandlers ?? [], e.getLinkBearer), this.wireEvents();
|
|
@@ -11910,7 +11937,7 @@ class eh {
|
|
|
11910
11937
|
}, 200)));
|
|
11911
11938
|
}
|
|
11912
11939
|
}
|
|
11913
|
-
class
|
|
11940
|
+
class rh extends HTMLElement {
|
|
11914
11941
|
shadow;
|
|
11915
11942
|
controller = null;
|
|
11916
11943
|
_config = {};
|
|
@@ -11956,14 +11983,14 @@ class th extends HTMLElement {
|
|
|
11956
11983
|
apiKey: this.getAttribute("api-key") || this._config.apiKey,
|
|
11957
11984
|
title: this.getAttribute("title") || this._config.title || "Chat",
|
|
11958
11985
|
subtitle: this.getAttribute("subtitle") || this._config.subtitle,
|
|
11959
|
-
theme: this.getAttribute("theme") || this._config.theme ||
|
|
11960
|
-
primaryColor: this.getAttribute("primary-color") || this._config.primaryColor ||
|
|
11961
|
-
position: this.getAttribute("position") || this._config.position ||
|
|
11962
|
-
width: Number(this.getAttribute("width")) || this._config.width ||
|
|
11963
|
-
height: Number(this.getAttribute("height")) || this._config.height ||
|
|
11964
|
-
fontFamily: this._config.fontFamily ||
|
|
11965
|
-
borderRadius: this._config.borderRadius ??
|
|
11966
|
-
placeholder: this.getAttribute("placeholder") || this._config.placeholder ||
|
|
11986
|
+
theme: this.getAttribute("theme") || this._config.theme || El,
|
|
11987
|
+
primaryColor: this.getAttribute("primary-color") || this._config.primaryColor || co,
|
|
11988
|
+
position: this.getAttribute("position") || this._config.position || Sl,
|
|
11989
|
+
width: Number(this.getAttribute("width")) || this._config.width || vl,
|
|
11990
|
+
height: Number(this.getAttribute("height")) || this._config.height || wl,
|
|
11991
|
+
fontFamily: this._config.fontFamily || kl,
|
|
11992
|
+
borderRadius: this._config.borderRadius ?? _l,
|
|
11993
|
+
placeholder: this.getAttribute("placeholder") || this._config.placeholder || uo,
|
|
11967
11994
|
welcomeMessage: this.getAttribute("welcome-message") || this._config.welcomeMessage,
|
|
11968
11995
|
avatarUrl: this.getAttribute("avatar-url") || this._config.avatarUrl,
|
|
11969
11996
|
showTimestamps: this._config.showTimestamps ?? !0,
|
|
@@ -11975,7 +12002,7 @@ class th extends HTMLElement {
|
|
|
11975
12002
|
templateLayout: this._config.templateLayout,
|
|
11976
12003
|
showBubble: this._config.showBubble ?? !0,
|
|
11977
12004
|
display: (this.getAttribute("display") || this._config.display) ?? "popup",
|
|
11978
|
-
offset: this._config.offset ||
|
|
12005
|
+
offset: this._config.offset || xl,
|
|
11979
12006
|
conversationId: this._config.conversationId,
|
|
11980
12007
|
systemPromptId: this._config.systemPromptId,
|
|
11981
12008
|
channel: this._config.channel,
|
|
@@ -12090,7 +12117,7 @@ class th extends HTMLElement {
|
|
|
12090
12117
|
<style>
|
|
12091
12118
|
:host {
|
|
12092
12119
|
--aikaara-primary: ${e.primaryColor};
|
|
12093
|
-
--aikaara-primary-hover: ${this.darkenColor(e.primaryColor ||
|
|
12120
|
+
--aikaara-primary-hover: ${this.darkenColor(e.primaryColor || co)};
|
|
12094
12121
|
/* Cascade through descriptor.theme.surface / surfaceMuted /
|
|
12095
12122
|
* text / textMuted / border when those are present (themeVars
|
|
12096
12123
|
* sets the canonical token below). When the descriptor doesn't
|
|
@@ -12161,7 +12188,7 @@ class th extends HTMLElement {
|
|
|
12161
12188
|
></aikaara-chat-header>`}
|
|
12162
12189
|
<aikaara-message-list></aikaara-message-list>
|
|
12163
12190
|
<aikaara-chat-input
|
|
12164
|
-
placeholder="${e.placeholder ||
|
|
12191
|
+
placeholder="${e.placeholder || uo}"
|
|
12165
12192
|
${this._config.uploadAdapter ? "" : "disable-attach"}
|
|
12166
12193
|
${e.input?.attachPosition === "right" ? 'attach-position="right"' : ""}
|
|
12167
12194
|
${e.input?.sendButtonShape === "square" ? 'send-shape="square"' : ""}
|
|
@@ -12178,7 +12205,7 @@ class th extends HTMLElement {
|
|
|
12178
12205
|
}
|
|
12179
12206
|
async initController() {
|
|
12180
12207
|
const e = this.getConfig(), t = e.transport ?? "aikaara";
|
|
12181
|
-
(t === "aikaara" || t === "dual") && (!e.baseUrl || !e.userToken) || (this.controller?.disconnect(), this.controller = new
|
|
12208
|
+
(t === "aikaara" || t === "dual") && (!e.baseUrl || !e.userToken) || (this.controller?.disconnect(), this.controller = new th(e, this.shadow, {
|
|
12182
12209
|
uploadAdapter: this._config.uploadAdapter,
|
|
12183
12210
|
historyAdapter: this._config.historyAdapter
|
|
12184
12211
|
}), await this.controller.connect());
|
|
@@ -12198,7 +12225,7 @@ class th extends HTMLElement {
|
|
|
12198
12225
|
}
|
|
12199
12226
|
}
|
|
12200
12227
|
}
|
|
12201
|
-
class
|
|
12228
|
+
class nh extends HTMLElement {
|
|
12202
12229
|
shadow;
|
|
12203
12230
|
constructor() {
|
|
12204
12231
|
super(), this.shadow = this.attachShadow({ mode: "open" });
|
|
@@ -12251,7 +12278,7 @@ class rh extends HTMLElement {
|
|
|
12251
12278
|
t && (t.innerHTML = e);
|
|
12252
12279
|
}
|
|
12253
12280
|
}
|
|
12254
|
-
class
|
|
12281
|
+
class ih extends HTMLElement {
|
|
12255
12282
|
shadow;
|
|
12256
12283
|
static get observedAttributes() {
|
|
12257
12284
|
return ["title", "subtitle", "avatar-url", "status"];
|
|
@@ -12372,17 +12399,17 @@ class nh extends HTMLElement {
|
|
|
12372
12399
|
this.setAttribute("status", e);
|
|
12373
12400
|
}
|
|
12374
12401
|
}
|
|
12375
|
-
const
|
|
12402
|
+
const oh = /<\s*(br|i|b|em|strong|small|sub|sup|p|div|span|ul|ol|li|a|img|code|pre)\b/i;
|
|
12376
12403
|
function Rt(c) {
|
|
12377
|
-
if (
|
|
12404
|
+
if (oh.test(c))
|
|
12378
12405
|
return c;
|
|
12379
|
-
let e =
|
|
12406
|
+
let e = sh(c);
|
|
12380
12407
|
return e = e.replace(/```(\w*)\n([\s\S]*?)```/g, (t, r, a) => `<pre><code>${a.trim()}</code></pre>`), e = e.replace(/`([^`]+)`/g, "<code>$1</code>"), e = e.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>"), e = e.replace(/\*(.+?)\*/g, "<em>$1</em>"), e = e.replace(
|
|
12381
12408
|
/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
|
|
12382
12409
|
'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'
|
|
12383
12410
|
), e = e.replace(/\n/g, "<br>"), e;
|
|
12384
12411
|
}
|
|
12385
|
-
function
|
|
12412
|
+
function sh(c) {
|
|
12386
12413
|
const e = {
|
|
12387
12414
|
"&": "&",
|
|
12388
12415
|
"<": "<",
|
|
@@ -12392,7 +12419,7 @@ function oh(c) {
|
|
|
12392
12419
|
};
|
|
12393
12420
|
return c.replace(/[&<>"']/g, (t) => e[t]);
|
|
12394
12421
|
}
|
|
12395
|
-
const
|
|
12422
|
+
const ah = /* @__PURE__ */ new Set([
|
|
12396
12423
|
"p",
|
|
12397
12424
|
"br",
|
|
12398
12425
|
"hr",
|
|
@@ -12427,7 +12454,7 @@ const sh = /* @__PURE__ */ new Set([
|
|
|
12427
12454
|
"tr",
|
|
12428
12455
|
"th",
|
|
12429
12456
|
"td"
|
|
12430
|
-
]),
|
|
12457
|
+
]), lh = {
|
|
12431
12458
|
a: /* @__PURE__ */ new Set(["href", "target", "rel"]),
|
|
12432
12459
|
img: /* @__PURE__ */ new Set(["src", "alt", "width", "height"]),
|
|
12433
12460
|
code: /* @__PURE__ */ new Set(["class"]),
|
|
@@ -12437,51 +12464,29 @@ const sh = /* @__PURE__ */ new Set([
|
|
|
12437
12464
|
};
|
|
12438
12465
|
function jt(c) {
|
|
12439
12466
|
const e = document.createElement("template");
|
|
12440
|
-
return e.innerHTML = c,
|
|
12467
|
+
return e.innerHTML = c, ul(e.content), e.innerHTML;
|
|
12441
12468
|
}
|
|
12442
|
-
function
|
|
12469
|
+
function ul(c) {
|
|
12443
12470
|
const e = Array.from(c.childNodes);
|
|
12444
12471
|
for (const t of e)
|
|
12445
12472
|
if (t.nodeType === Node.ELEMENT_NODE) {
|
|
12446
12473
|
const r = t, a = r.tagName.toLowerCase();
|
|
12447
|
-
if (!
|
|
12474
|
+
if (!ah.has(a)) {
|
|
12448
12475
|
const o = document.createTextNode(r.textContent || "");
|
|
12449
12476
|
c.replaceChild(o, t);
|
|
12450
12477
|
continue;
|
|
12451
12478
|
}
|
|
12452
|
-
const n =
|
|
12479
|
+
const n = lh[a] || /* @__PURE__ */ new Set(), i = Array.from(r.attributes);
|
|
12453
12480
|
for (const o of i)
|
|
12454
12481
|
n.has(o.name) || r.removeAttribute(o.name);
|
|
12455
12482
|
if (r.hasAttribute("href")) {
|
|
12456
12483
|
const o = r.getAttribute("href") || "";
|
|
12457
12484
|
!o.startsWith("http://") && !o.startsWith("https://") && !o.startsWith("/") && r.removeAttribute("href");
|
|
12458
12485
|
}
|
|
12459
|
-
|
|
12486
|
+
ul(t);
|
|
12460
12487
|
}
|
|
12461
12488
|
}
|
|
12462
|
-
function lh(c) {
|
|
12463
|
-
const e = ch(c);
|
|
12464
|
-
return e == null ? !1 : !e.includes("cloudFileId=");
|
|
12465
|
-
}
|
|
12466
12489
|
function ch(c) {
|
|
12467
|
-
const e = c.template;
|
|
12468
|
-
if (e?.templateId === "7") {
|
|
12469
|
-
const a = e.payload?.elements?.[0]?.action?.url;
|
|
12470
|
-
if (typeof a == "string") return a;
|
|
12471
|
-
}
|
|
12472
|
-
const t = (c.content || "").trim();
|
|
12473
|
-
if (t.startsWith("{") && t.includes('"templateId"') && t.includes('"7"'))
|
|
12474
|
-
try {
|
|
12475
|
-
const r = JSON.parse(t);
|
|
12476
|
-
if (r?.metadata?.templateId === "7") {
|
|
12477
|
-
const a = r.metadata.payload?.elements?.[0]?.action?.url;
|
|
12478
|
-
if (typeof a == "string") return a;
|
|
12479
|
-
}
|
|
12480
|
-
} catch {
|
|
12481
|
-
}
|
|
12482
|
-
return null;
|
|
12483
|
-
}
|
|
12484
|
-
function uh(c) {
|
|
12485
12490
|
const e = Date.now() - c.getTime(), t = Math.round(e / 1e3);
|
|
12486
12491
|
if (t < 5) return "just now";
|
|
12487
12492
|
if (t < 60) return `${t}s ago`;
|
|
@@ -12492,7 +12497,7 @@ function uh(c) {
|
|
|
12492
12497
|
const n = Math.round(a / 24);
|
|
12493
12498
|
return n === 1 ? "Yesterday" : n < 7 ? `${n} d ago` : c.toLocaleDateString(void 0, { month: "short", day: "2-digit" });
|
|
12494
12499
|
}
|
|
12495
|
-
class
|
|
12500
|
+
class uh extends HTMLElement {
|
|
12496
12501
|
shadow;
|
|
12497
12502
|
container;
|
|
12498
12503
|
welcomeMessage = "";
|
|
@@ -12519,7 +12524,6 @@ class hh extends HTMLElement {
|
|
|
12519
12524
|
* once before the cloud upload finishes (no cloudFileId in the url)
|
|
12520
12525
|
* and once after. We render only the canonical one. */
|
|
12521
12526
|
shouldHideMessage(e) {
|
|
12522
|
-
if (lh(e)) return !0;
|
|
12523
12527
|
const t = e.content;
|
|
12524
12528
|
if (!t) return !1;
|
|
12525
12529
|
const r = t.trim().toLowerCase();
|
|
@@ -12860,7 +12864,7 @@ class hh extends HTMLElement {
|
|
|
12860
12864
|
case "date":
|
|
12861
12865
|
return r;
|
|
12862
12866
|
case "relative":
|
|
12863
|
-
return
|
|
12867
|
+
return ch(t);
|
|
12864
12868
|
case "time-24":
|
|
12865
12869
|
return t.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit", hour12: !1 });
|
|
12866
12870
|
case "time-seconds":
|
|
@@ -12880,7 +12884,7 @@ class hh extends HTMLElement {
|
|
|
12880
12884
|
* data, or opens in a new tab depending on the matched handler.
|
|
12881
12885
|
*/
|
|
12882
12886
|
async handleLinkClick(e, t) {
|
|
12883
|
-
const r = this.linkHandlers.find((y) =>
|
|
12887
|
+
const r = this.linkHandlers.find((y) => hh(e, y.match)), a = r?.target ?? "iframe";
|
|
12884
12888
|
if (a === "tab") {
|
|
12885
12889
|
window.open(e, "_blank", "noopener,noreferrer");
|
|
12886
12890
|
return;
|
|
@@ -12890,7 +12894,7 @@ class hh extends HTMLElement {
|
|
|
12890
12894
|
requestAnimationFrame(() => n.show?.(e, i));
|
|
12891
12895
|
return;
|
|
12892
12896
|
}
|
|
12893
|
-
const o =
|
|
12897
|
+
const o = fh(e), s = hl(r.fetch.url, o), l = {
|
|
12894
12898
|
accept: "application/json",
|
|
12895
12899
|
...r.fetch.headers ?? {}
|
|
12896
12900
|
}, u = r.fetch.authHeader ?? "session";
|
|
@@ -12899,7 +12903,7 @@ class hh extends HTMLElement {
|
|
|
12899
12903
|
y && (l.authorization = `Bearer ${y}`);
|
|
12900
12904
|
}
|
|
12901
12905
|
const d = { method: r.fetch.method ?? "GET", headers: l };
|
|
12902
|
-
r.fetch.body && (l["content-type"] = "application/json", d.body = JSON.stringify(
|
|
12906
|
+
r.fetch.body && (l["content-type"] = "application/json", d.body = JSON.stringify(Ki(r.fetch.body, o)));
|
|
12903
12907
|
let p = null;
|
|
12904
12908
|
try {
|
|
12905
12909
|
const y = await fetch(s, d);
|
|
@@ -12936,11 +12940,11 @@ class hh extends HTMLElement {
|
|
|
12936
12940
|
return e || (e = document.createElement("aikaara-link-modal"), document.body.appendChild(e)), e;
|
|
12937
12941
|
}
|
|
12938
12942
|
}
|
|
12939
|
-
function
|
|
12943
|
+
function hh(c, e) {
|
|
12940
12944
|
const t = e.replace(/[.+^${}()|[\]\\]/g, "\\$&");
|
|
12941
12945
|
return new RegExp("^" + t.replace(/\*/g, ".*").replace(/\?/g, ".") + "$", "i").test(c);
|
|
12942
12946
|
}
|
|
12943
|
-
function
|
|
12947
|
+
function fh(c) {
|
|
12944
12948
|
try {
|
|
12945
12949
|
const e = new URL(c), t = {};
|
|
12946
12950
|
return e.searchParams.forEach((r, a) => {
|
|
@@ -12950,20 +12954,20 @@ function dh(c) {
|
|
|
12950
12954
|
return {};
|
|
12951
12955
|
}
|
|
12952
12956
|
}
|
|
12953
|
-
function
|
|
12957
|
+
function hl(c, e) {
|
|
12954
12958
|
return c.replace(/\{(\w+)\}/g, (t, r) => e[r] ?? "");
|
|
12955
12959
|
}
|
|
12956
|
-
function
|
|
12957
|
-
if (typeof c == "string") return
|
|
12958
|
-
if (Array.isArray(c)) return c.map((t) =>
|
|
12960
|
+
function Ki(c, e) {
|
|
12961
|
+
if (typeof c == "string") return hl(c, e);
|
|
12962
|
+
if (Array.isArray(c)) return c.map((t) => Ki(t, e));
|
|
12959
12963
|
if (c && typeof c == "object") {
|
|
12960
12964
|
const t = {};
|
|
12961
|
-
for (const [r, a] of Object.entries(c)) t[r] =
|
|
12965
|
+
for (const [r, a] of Object.entries(c)) t[r] = Ki(a, e);
|
|
12962
12966
|
return t;
|
|
12963
12967
|
}
|
|
12964
12968
|
return c;
|
|
12965
12969
|
}
|
|
12966
|
-
class
|
|
12970
|
+
class dh extends HTMLElement {
|
|
12967
12971
|
shadow;
|
|
12968
12972
|
templatePayload = null;
|
|
12969
12973
|
attachments = [];
|
|
@@ -13055,7 +13059,7 @@ class ph extends HTMLElement {
|
|
|
13055
13059
|
${n ? `<aikaara-template-renderer
|
|
13056
13060
|
content-type="${n}"
|
|
13057
13061
|
template-id="${i}"
|
|
13058
|
-
inner-message="${
|
|
13062
|
+
inner-message="${As(o)}"
|
|
13059
13063
|
></aikaara-template-renderer>` : ""}
|
|
13060
13064
|
${this.renderAttachments()}
|
|
13061
13065
|
</div>
|
|
@@ -13078,19 +13082,19 @@ class ph extends HTMLElement {
|
|
|
13078
13082
|
}
|
|
13079
13083
|
renderAttachments() {
|
|
13080
13084
|
return this.attachments.length ? `<div class="attachments">${this.attachments.map(
|
|
13081
|
-
(t) => `<a class="attachment" href="${
|
|
13082
|
-
📎 ${
|
|
13085
|
+
(t) => `<a class="attachment" href="${As(t.fileUrl)}" target="_blank" rel="noopener noreferrer">
|
|
13086
|
+
📎 ${ph(t.fileName)}
|
|
13083
13087
|
</a>`
|
|
13084
13088
|
).join("")}</div>` : "";
|
|
13085
13089
|
}
|
|
13086
13090
|
}
|
|
13087
|
-
function
|
|
13091
|
+
function As(c) {
|
|
13088
13092
|
return String(c).replace(/[&<>"']/g, (e) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[e]);
|
|
13089
13093
|
}
|
|
13090
|
-
function
|
|
13094
|
+
function ph(c) {
|
|
13091
13095
|
return String(c).replace(/[&<>]/g, (e) => ({ "&": "&", "<": "<", ">": ">" })[e]);
|
|
13092
13096
|
}
|
|
13093
|
-
class
|
|
13097
|
+
class gh extends HTMLElement {
|
|
13094
13098
|
shadow;
|
|
13095
13099
|
textarea;
|
|
13096
13100
|
sendBtn;
|
|
@@ -13241,7 +13245,7 @@ class mh extends HTMLElement {
|
|
|
13241
13245
|
this.textarea.style.height = "auto", this.textarea.style.height = Math.min(this.textarea.scrollHeight, 120) + "px";
|
|
13242
13246
|
}
|
|
13243
13247
|
}
|
|
13244
|
-
class
|
|
13248
|
+
class mh extends HTMLElement {
|
|
13245
13249
|
shadow;
|
|
13246
13250
|
constructor() {
|
|
13247
13251
|
super(), this.shadow = this.attachShadow({ mode: "open" });
|
|
@@ -13290,7 +13294,7 @@ class bh extends HTMLElement {
|
|
|
13290
13294
|
this.removeAttribute("visible");
|
|
13291
13295
|
}
|
|
13292
13296
|
}
|
|
13293
|
-
class
|
|
13297
|
+
class bh extends HTMLElement {
|
|
13294
13298
|
shadow;
|
|
13295
13299
|
bubble;
|
|
13296
13300
|
constructor() {
|
|
@@ -13355,7 +13359,7 @@ class yh extends HTMLElement {
|
|
|
13355
13359
|
this.bubble?.classList.remove("cursor");
|
|
13356
13360
|
}
|
|
13357
13361
|
}
|
|
13358
|
-
class
|
|
13362
|
+
class yh extends HTMLElement {
|
|
13359
13363
|
shadow;
|
|
13360
13364
|
container;
|
|
13361
13365
|
dismissTimer = null;
|
|
@@ -13401,9 +13405,9 @@ class vh extends HTMLElement {
|
|
|
13401
13405
|
this.container.classList.remove("visible"), this.dismissTimer && (clearTimeout(this.dismissTimer), this.dismissTimer = null);
|
|
13402
13406
|
}
|
|
13403
13407
|
}
|
|
13404
|
-
const
|
|
13405
|
-
function
|
|
13406
|
-
const e =
|
|
13408
|
+
const Hr = /* @__PURE__ */ new Map();
|
|
13409
|
+
function fl(c) {
|
|
13410
|
+
const e = Hr.get(c);
|
|
13407
13411
|
if (e) return e;
|
|
13408
13412
|
const t = new Promise((r, a) => {
|
|
13409
13413
|
const n = document.querySelector(`script[data-aikaara-src="${CSS.escape(c)}"]`);
|
|
@@ -13421,14 +13425,14 @@ function ul(c) {
|
|
|
13421
13425
|
), i.addEventListener(
|
|
13422
13426
|
"error",
|
|
13423
13427
|
() => {
|
|
13424
|
-
|
|
13428
|
+
Hr.delete(c), a(new Error(`Failed to load ${c}`));
|
|
13425
13429
|
},
|
|
13426
13430
|
{ once: !0 }
|
|
13427
13431
|
), document.head.appendChild(i);
|
|
13428
13432
|
});
|
|
13429
|
-
return
|
|
13433
|
+
return Hr.set(c, t), t;
|
|
13430
13434
|
}
|
|
13431
|
-
function
|
|
13435
|
+
function vh(c, e = 5e3) {
|
|
13432
13436
|
return new Promise((t, r) => {
|
|
13433
13437
|
const a = setTimeout(() => r(new Error(`Custom element <${c}> not registered within ${e}ms`)), e);
|
|
13434
13438
|
customElements.whenDefined(c).then(() => {
|
|
@@ -13436,11 +13440,11 @@ function wh(c, e = 5e3) {
|
|
|
13436
13440
|
});
|
|
13437
13441
|
});
|
|
13438
13442
|
}
|
|
13439
|
-
function
|
|
13443
|
+
function wh(c) {
|
|
13440
13444
|
const e = `template:${c}`, t = window.__aikaara_descriptor__?.components?.[e];
|
|
13441
13445
|
return t && t.kind === "iife-element" ? { render: t.tag, scriptUrl: t.scriptUrl, props: t.props } : window.__aikaara_descriptor__?.templates?.[c];
|
|
13442
13446
|
}
|
|
13443
|
-
class
|
|
13447
|
+
class _h extends HTMLElement {
|
|
13444
13448
|
shadow;
|
|
13445
13449
|
payloadData = null;
|
|
13446
13450
|
innerMessage = "";
|
|
@@ -13478,8 +13482,8 @@ class kh extends HTMLElement {
|
|
|
13478
13482
|
<slot></slot>
|
|
13479
13483
|
`; this.firstChild; ) this.removeChild(this.firstChild);
|
|
13480
13484
|
if (!e) return;
|
|
13481
|
-
const r = t ?
|
|
13482
|
-
if (r?.scriptUrl && !customElements.get(a) &&
|
|
13485
|
+
const r = t ? wh(t) : void 0, a = r?.render ?? (t ? `aikaara-template-${t}` : `aikaara-template-${e}`);
|
|
13486
|
+
if (r?.scriptUrl && !customElements.get(a) && fl(r.scriptUrl).then(() => vh(a)).then(() => this.render()).catch((n) => console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`, n)), customElements.get(a)) {
|
|
13483
13487
|
const n = document.createElement(a);
|
|
13484
13488
|
if (r?.props) {
|
|
13485
13489
|
for (const [i, o] of Object.entries(r.props))
|
|
@@ -13569,7 +13573,7 @@ class kh extends HTMLElement {
|
|
|
13569
13573
|
url: e.url ?? "",
|
|
13570
13574
|
openLinkInNewTab: e.openLinkInNewTab,
|
|
13571
13575
|
orderId: e.orderId,
|
|
13572
|
-
extra:
|
|
13576
|
+
extra: Sh(e),
|
|
13573
13577
|
messageId: this.getAttribute("message-id") ?? void 0
|
|
13574
13578
|
}), this.appendChild(n);
|
|
13575
13579
|
});
|
|
@@ -13579,20 +13583,20 @@ class kh extends HTMLElement {
|
|
|
13579
13583
|
t.setPayload(e), this.appendChild(t);
|
|
13580
13584
|
}
|
|
13581
13585
|
}
|
|
13582
|
-
const
|
|
13586
|
+
const kh = /* @__PURE__ */ new Set([
|
|
13583
13587
|
"type",
|
|
13584
13588
|
"url",
|
|
13585
13589
|
"name",
|
|
13586
13590
|
"openLinkInNewTab",
|
|
13587
13591
|
"orderId"
|
|
13588
13592
|
]);
|
|
13589
|
-
function
|
|
13593
|
+
function Sh(c) {
|
|
13590
13594
|
const e = {};
|
|
13591
13595
|
for (const [t, r] of Object.entries(c))
|
|
13592
|
-
|
|
13596
|
+
kh.has(t) || (e[t] = r);
|
|
13593
13597
|
return e;
|
|
13594
13598
|
}
|
|
13595
|
-
class
|
|
13599
|
+
class Eh extends HTMLElement {
|
|
13596
13600
|
shadow;
|
|
13597
13601
|
static get observedAttributes() {
|
|
13598
13602
|
return ["text", "subtext"];
|
|
@@ -13633,15 +13637,15 @@ class xh extends HTMLElement {
|
|
|
13633
13637
|
color: var(--aikaara-text-secondary, #9ca3af);
|
|
13634
13638
|
}
|
|
13635
13639
|
</style>
|
|
13636
|
-
<span class="pill">${
|
|
13637
|
-
${t ? `<span class="sub">${
|
|
13640
|
+
<span class="pill">${Is(e)}</span>
|
|
13641
|
+
${t ? `<span class="sub">${Is(t)}</span>` : ""}
|
|
13638
13642
|
`;
|
|
13639
13643
|
}
|
|
13640
13644
|
}
|
|
13641
|
-
function
|
|
13645
|
+
function Is(c) {
|
|
13642
13646
|
return String(c).replace(/[&<>]/g, (e) => ({ "&": "&", "<": "<", ">": ">" })[e]);
|
|
13643
13647
|
}
|
|
13644
|
-
class
|
|
13648
|
+
class xh extends HTMLElement {
|
|
13645
13649
|
shadow;
|
|
13646
13650
|
data = null;
|
|
13647
13651
|
selected = /* @__PURE__ */ new Set();
|
|
@@ -13718,7 +13722,7 @@ class Ah extends HTMLElement {
|
|
|
13718
13722
|
.row[aria-checked="true"] .check { opacity: 1; }
|
|
13719
13723
|
.text { flex: 1; }
|
|
13720
13724
|
</style>
|
|
13721
|
-
<div class="row" role="checkbox" tabindex="0" aria-checked="${o}" data-value="${
|
|
13725
|
+
<div class="row" role="checkbox" tabindex="0" aria-checked="${o}" data-value="${Ts(i.value)}">
|
|
13722
13726
|
<span class="box" aria-hidden="true">
|
|
13723
13727
|
<svg class="check" viewBox="0 0 16 16" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
13724
13728
|
<path d="M3 8 L7 12 L13 4" />
|
|
@@ -13774,7 +13778,7 @@ class Ah extends HTMLElement {
|
|
|
13774
13778
|
${t.map(
|
|
13775
13779
|
(i) => `
|
|
13776
13780
|
<button class="opt" type="button"
|
|
13777
|
-
data-value="${
|
|
13781
|
+
data-value="${Ts(i.value)}"
|
|
13778
13782
|
role="${a ? "checkbox" : "radio"}"
|
|
13779
13783
|
aria-pressed="${this.selected.has(i.value)}">
|
|
13780
13784
|
${rr(i.label)}
|
|
@@ -13789,10 +13793,10 @@ class Ah extends HTMLElement {
|
|
|
13789
13793
|
function rr(c) {
|
|
13790
13794
|
return String(c).replace(/[&<>]/g, (e) => ({ "&": "&", "<": "<", ">": ">" })[e]);
|
|
13791
13795
|
}
|
|
13792
|
-
function
|
|
13796
|
+
function Ts(c) {
|
|
13793
13797
|
return String(c).replace(/[&<>"']/g, (e) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[e]);
|
|
13794
13798
|
}
|
|
13795
|
-
class
|
|
13799
|
+
class Ah extends HTMLElement {
|
|
13796
13800
|
shadow;
|
|
13797
13801
|
data = null;
|
|
13798
13802
|
constructor() {
|
|
@@ -13852,14 +13856,14 @@ class Ih extends HTMLElement {
|
|
|
13852
13856
|
button:hover { background: var(--aikaara-submit-hover-bg, var(--aikaara-primary-hover, #4f46e5)); }
|
|
13853
13857
|
button:disabled { opacity: var(--aikaara-submit-disabled-opacity, 0.5); cursor: not-allowed; }
|
|
13854
13858
|
</style>
|
|
13855
|
-
<button type="button">${
|
|
13859
|
+
<button type="button">${Ih(e)}</button>
|
|
13856
13860
|
`, this.shadow.querySelector("button").addEventListener("click", () => this.handleClick());
|
|
13857
13861
|
}
|
|
13858
13862
|
}
|
|
13859
|
-
function
|
|
13863
|
+
function Ih(c) {
|
|
13860
13864
|
return String(c).replace(/[&<>]/g, (e) => ({ "&": "&", "<": "<", ">": ">" })[e]);
|
|
13861
13865
|
}
|
|
13862
|
-
class
|
|
13866
|
+
class Th extends HTMLElement {
|
|
13863
13867
|
shadow;
|
|
13864
13868
|
data = null;
|
|
13865
13869
|
dismissed = !1;
|
|
@@ -13938,20 +13942,20 @@ class Oh extends HTMLElement {
|
|
|
13938
13942
|
</style>
|
|
13939
13943
|
<div class="overlay" role="dialog" aria-modal="true">
|
|
13940
13944
|
<div class="modal">
|
|
13941
|
-
<div class="msg">${
|
|
13945
|
+
<div class="msg">${zr(this.data.message)}</div>
|
|
13942
13946
|
<div class="actions">
|
|
13943
|
-
${t ? `<button class="cancel" type="button">${
|
|
13944
|
-
<button class="ok" type="button">${
|
|
13947
|
+
${t ? `<button class="cancel" type="button">${zr(t)}</button>` : ""}
|
|
13948
|
+
<button class="ok" type="button">${zr(e)}</button>
|
|
13945
13949
|
</div>
|
|
13946
13950
|
</div>
|
|
13947
13951
|
</div>
|
|
13948
13952
|
`, this.shadow.querySelector("button.ok").addEventListener("click", () => this.handleOk()), this.shadow.querySelector("button.cancel")?.addEventListener("click", () => this.dismiss());
|
|
13949
13953
|
}
|
|
13950
13954
|
}
|
|
13951
|
-
function
|
|
13955
|
+
function zr(c) {
|
|
13952
13956
|
return String(c).replace(/[&<>]/g, (e) => ({ "&": "&", "<": "<", ">": ">" })[e]);
|
|
13953
13957
|
}
|
|
13954
|
-
class
|
|
13958
|
+
class Oh extends HTMLElement {
|
|
13955
13959
|
static get observedAttributes() {
|
|
13956
13960
|
return ["slug", "user-id", "user-name", "user-token", "department-id", "config-base", "api-key"];
|
|
13957
13961
|
}
|
|
@@ -14005,7 +14009,7 @@ class Ch extends HTMLElement {
|
|
|
14005
14009
|
const s = Object.keys(n).length > 0 ? n : void 0;
|
|
14006
14010
|
return this.mountInflight = (async () => {
|
|
14007
14011
|
try {
|
|
14008
|
-
this.mounted = await
|
|
14012
|
+
this.mounted = await hf({
|
|
14009
14013
|
container: this,
|
|
14010
14014
|
slug: e,
|
|
14011
14015
|
configBase: this.getAttribute("config-base") ?? void 0,
|
|
@@ -14034,7 +14038,7 @@ class Ch extends HTMLElement {
|
|
|
14034
14038
|
})(), this.mountInflight;
|
|
14035
14039
|
}
|
|
14036
14040
|
}
|
|
14037
|
-
class
|
|
14041
|
+
class Ch extends HTMLElement {
|
|
14038
14042
|
shadow;
|
|
14039
14043
|
root = null;
|
|
14040
14044
|
iframe = null;
|
|
@@ -14151,7 +14155,7 @@ class Ph extends HTMLElement {
|
|
|
14151
14155
|
});
|
|
14152
14156
|
}
|
|
14153
14157
|
}
|
|
14154
|
-
const
|
|
14158
|
+
const Ph = [
|
|
14155
14159
|
{ label: "Self-filing guidance" },
|
|
14156
14160
|
{ label: "Smart tax suggestions" },
|
|
14157
14161
|
{ label: "Auto-fetch 26AS / AIS" },
|
|
@@ -14159,7 +14163,7 @@ const Mh = [
|
|
|
14159
14163
|
{ label: "Dedicated tax expert" },
|
|
14160
14164
|
{ label: "End-to-end filing" },
|
|
14161
14165
|
{ label: "Document handling" }
|
|
14162
|
-
],
|
|
14166
|
+
], Mh = [
|
|
14163
14167
|
{
|
|
14164
14168
|
label: "DIY",
|
|
14165
14169
|
match: ["DIY", "DIY_SALARY"],
|
|
@@ -14182,11 +14186,11 @@ const Mh = [
|
|
|
14182
14186
|
features: [!0, !0, !0, !0, !0, !0, !0]
|
|
14183
14187
|
}
|
|
14184
14188
|
];
|
|
14185
|
-
class
|
|
14189
|
+
class Rh extends HTMLElement {
|
|
14186
14190
|
shadow;
|
|
14187
14191
|
data = null;
|
|
14188
|
-
columns =
|
|
14189
|
-
features =
|
|
14192
|
+
columns = Mh;
|
|
14193
|
+
features = Ph;
|
|
14190
14194
|
constructor() {
|
|
14191
14195
|
super(), this.shadow = this.attachShadow({ mode: "open" });
|
|
14192
14196
|
}
|
|
@@ -14268,14 +14272,14 @@ class jh extends HTMLElement {
|
|
|
14268
14272
|
<thead>
|
|
14269
14273
|
<tr>
|
|
14270
14274
|
<th>Feature</th>
|
|
14271
|
-
${e.map((r) => `<th>${
|
|
14275
|
+
${e.map((r) => `<th>${Kr(r.label)}</th>`).join("")}
|
|
14272
14276
|
</tr>
|
|
14273
14277
|
</thead>
|
|
14274
14278
|
<tbody>
|
|
14275
14279
|
${t.map(
|
|
14276
14280
|
(r, a) => `
|
|
14277
14281
|
<tr>
|
|
14278
|
-
<td>${
|
|
14282
|
+
<td>${Kr(r.label)}</td>
|
|
14279
14283
|
${e.map(
|
|
14280
14284
|
(n) => n.features[a] ? '<td><span class="check">✓</span></td>' : '<td><span class="cross">✕</span></td>'
|
|
14281
14285
|
).join("")}
|
|
@@ -14294,7 +14298,7 @@ class jh extends HTMLElement {
|
|
|
14294
14298
|
${e.map((r, a) => {
|
|
14295
14299
|
const n = this.priceFor(r), i = r.selectLabel.replace("{price}", n != null ? String(Math.round(n)) : "—");
|
|
14296
14300
|
return `<button class="action" data-col="${a}" type="button">
|
|
14297
|
-
<span>${
|
|
14301
|
+
<span>${Kr(i)}</span>
|
|
14298
14302
|
<small>Tap to select</small>
|
|
14299
14303
|
</button>`;
|
|
14300
14304
|
}).join("")}
|
|
@@ -14313,37 +14317,37 @@ class jh extends HTMLElement {
|
|
|
14313
14317
|
});
|
|
14314
14318
|
}
|
|
14315
14319
|
}
|
|
14316
|
-
function
|
|
14320
|
+
function Kr(c) {
|
|
14317
14321
|
return c.replace(
|
|
14318
14322
|
/[&<>"']/g,
|
|
14319
14323
|
(e) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[e]
|
|
14320
14324
|
);
|
|
14321
14325
|
}
|
|
14322
|
-
function
|
|
14326
|
+
function jh() {
|
|
14323
14327
|
const c = [
|
|
14324
|
-
["aikaara-chat-widget",
|
|
14325
|
-
["aikaara-chat-bubble",
|
|
14326
|
-
["aikaara-chat-header",
|
|
14327
|
-
["aikaara-message-list",
|
|
14328
|
-
["aikaara-message-bubble",
|
|
14329
|
-
["aikaara-chat-input",
|
|
14330
|
-
["aikaara-typing-indicator",
|
|
14331
|
-
["aikaara-streaming-message",
|
|
14332
|
-
["aikaara-error-banner",
|
|
14333
|
-
["aikaara-template-renderer",
|
|
14334
|
-
["aikaara-system-pill",
|
|
14335
|
-
["aikaara-option-list",
|
|
14336
|
-
["aikaara-submit-action",
|
|
14337
|
-
["aikaara-modal-action",
|
|
14338
|
-
["aikaara-chat",
|
|
14339
|
-
["aikaara-link-modal",
|
|
14340
|
-
["aikaara-compare-plans",
|
|
14328
|
+
["aikaara-chat-widget", rh],
|
|
14329
|
+
["aikaara-chat-bubble", nh],
|
|
14330
|
+
["aikaara-chat-header", ih],
|
|
14331
|
+
["aikaara-message-list", uh],
|
|
14332
|
+
["aikaara-message-bubble", dh],
|
|
14333
|
+
["aikaara-chat-input", gh],
|
|
14334
|
+
["aikaara-typing-indicator", mh],
|
|
14335
|
+
["aikaara-streaming-message", bh],
|
|
14336
|
+
["aikaara-error-banner", yh],
|
|
14337
|
+
["aikaara-template-renderer", _h],
|
|
14338
|
+
["aikaara-system-pill", Eh],
|
|
14339
|
+
["aikaara-option-list", xh],
|
|
14340
|
+
["aikaara-submit-action", Ah],
|
|
14341
|
+
["aikaara-modal-action", Th],
|
|
14342
|
+
["aikaara-chat", Oh],
|
|
14343
|
+
["aikaara-link-modal", Ch],
|
|
14344
|
+
["aikaara-compare-plans", Rh]
|
|
14341
14345
|
];
|
|
14342
14346
|
for (const [e, t] of c)
|
|
14343
14347
|
customElements.get(e) || customElements.define(e, t);
|
|
14344
14348
|
}
|
|
14345
|
-
|
|
14346
|
-
function
|
|
14349
|
+
jh();
|
|
14350
|
+
function Vr(c, e, t = "") {
|
|
14347
14351
|
if (!e) return t;
|
|
14348
14352
|
const r = e.split(".");
|
|
14349
14353
|
let a = c;
|
|
@@ -14353,7 +14357,7 @@ function Kr(c, e, t = "") {
|
|
|
14353
14357
|
else return t;
|
|
14354
14358
|
return typeof a == "string" ? a : t;
|
|
14355
14359
|
}
|
|
14356
|
-
function
|
|
14360
|
+
function Lh(c) {
|
|
14357
14361
|
try {
|
|
14358
14362
|
const e = c.split(".")[1];
|
|
14359
14363
|
if (!e) return 0;
|
|
@@ -14365,10 +14369,10 @@ function Nh(c) {
|
|
|
14365
14369
|
return 0;
|
|
14366
14370
|
}
|
|
14367
14371
|
}
|
|
14368
|
-
async function
|
|
14372
|
+
async function Mr(c) {
|
|
14369
14373
|
return typeof c == "function" ? await c() : c;
|
|
14370
14374
|
}
|
|
14371
|
-
class
|
|
14375
|
+
class Nh {
|
|
14372
14376
|
constructor(e, t) {
|
|
14373
14377
|
this.descriptor = e, this.sessionToken = t;
|
|
14374
14378
|
}
|
|
@@ -14385,7 +14389,7 @@ class Uh {
|
|
|
14385
14389
|
}), this.inflight);
|
|
14386
14390
|
}
|
|
14387
14391
|
async fetchOnce() {
|
|
14388
|
-
const e = await
|
|
14392
|
+
const e = await Mr(this.sessionToken), t = this.descriptor.authHeader ?? "Authorization", r = this.descriptor.authHeaderTemplate ?? "Bearer {token}", a = {
|
|
14389
14393
|
accept: "application/json",
|
|
14390
14394
|
...this.descriptor.headers ?? {},
|
|
14391
14395
|
[t]: r.replace("{token}", e)
|
|
@@ -14396,18 +14400,18 @@ class Uh {
|
|
|
14396
14400
|
const b = await o.text().catch(() => "");
|
|
14397
14401
|
throw new Error(`Session auth failed: ${o.status} ${b.slice(0, 200)}`);
|
|
14398
14402
|
}
|
|
14399
|
-
const s = await o.json().catch(() => ({})), l =
|
|
14403
|
+
const s = await o.json().catch(() => ({})), l = Vr(s, this.descriptor.tokenPath ?? "data.token"), u = this.descriptor.tokenStripPrefix, d = u ? l.replace(new RegExp(`^${u}`, "i"), "").trim() : l;
|
|
14400
14404
|
if (!d) throw new Error("Session auth response missing token");
|
|
14401
|
-
const p =
|
|
14405
|
+
const p = Vr(s, this.descriptor.requestIdPath ?? "data.requestId"), y = this.cache?.requestId || p;
|
|
14402
14406
|
if (!y) throw new Error("Session auth response missing requestId");
|
|
14403
|
-
const f =
|
|
14407
|
+
const f = Vr(s, this.descriptor.fullNamePath ?? "data.fullName"), m = Lh(d) || Date.now() + 3600 * 1e3;
|
|
14404
14408
|
return this.cache = { token: d, requestId: y, fullName: f, expiresAt: m }, this.cache;
|
|
14405
14409
|
}
|
|
14406
14410
|
}
|
|
14407
|
-
async function
|
|
14411
|
+
async function Uh(c) {
|
|
14408
14412
|
const e = {};
|
|
14409
14413
|
for (const t of c.spec) {
|
|
14410
|
-
const r = await
|
|
14414
|
+
const r = await Bh(t, c.providers);
|
|
14411
14415
|
if (r !== void 0 && r !== "")
|
|
14412
14416
|
e[t.name] = r;
|
|
14413
14417
|
else {
|
|
@@ -14420,11 +14424,11 @@ async function Bh(c) {
|
|
|
14420
14424
|
}
|
|
14421
14425
|
return e;
|
|
14422
14426
|
}
|
|
14423
|
-
async function
|
|
14427
|
+
async function Bh(c, e) {
|
|
14424
14428
|
const t = c.key ?? c.name;
|
|
14425
14429
|
switch (c.source) {
|
|
14426
14430
|
case "cookie":
|
|
14427
|
-
return
|
|
14431
|
+
return Fh(t);
|
|
14428
14432
|
case "localStorage":
|
|
14429
14433
|
return nr(() => window.localStorage.getItem(t) ?? void 0);
|
|
14430
14434
|
case "sessionStorage":
|
|
@@ -14432,7 +14436,7 @@ async function Fh(c, e) {
|
|
|
14432
14436
|
case "url_param":
|
|
14433
14437
|
return nr(() => new URL(window.location.href).searchParams.get(t) ?? void 0);
|
|
14434
14438
|
case "header_meta":
|
|
14435
|
-
return nr(() => document.querySelector(`meta[name="${
|
|
14439
|
+
return nr(() => document.querySelector(`meta[name="${Dh(t)}"]`)?.content ?? void 0);
|
|
14436
14440
|
case "callback": {
|
|
14437
14441
|
const r = e?.[c.name];
|
|
14438
14442
|
if (!r) return;
|
|
@@ -14443,7 +14447,7 @@ async function Fh(c, e) {
|
|
|
14443
14447
|
return;
|
|
14444
14448
|
}
|
|
14445
14449
|
}
|
|
14446
|
-
function
|
|
14450
|
+
function Fh(c) {
|
|
14447
14451
|
if (typeof document > "u") return;
|
|
14448
14452
|
const e = encodeURIComponent(c), t = document.cookie ? document.cookie.split("; ") : [];
|
|
14449
14453
|
for (const r of t) {
|
|
@@ -14465,11 +14469,11 @@ function nr(c) {
|
|
|
14465
14469
|
return;
|
|
14466
14470
|
}
|
|
14467
14471
|
}
|
|
14468
|
-
function
|
|
14472
|
+
function Dh(c) {
|
|
14469
14473
|
return c.replace(/["\\]/g, "\\$&");
|
|
14470
14474
|
}
|
|
14471
|
-
const
|
|
14472
|
-
class
|
|
14475
|
+
const $h = 1800;
|
|
14476
|
+
class Wh {
|
|
14473
14477
|
constructor(e) {
|
|
14474
14478
|
this.opts = e, this.cache = this.loadCache();
|
|
14475
14479
|
}
|
|
@@ -14498,7 +14502,7 @@ class qh {
|
|
|
14498
14502
|
throw new Error(
|
|
14499
14503
|
"[aikaara-chat-sdk] SsoExchangeAdapter.exchange() requires descriptor.sso.collect; v2 partner-token flow should be handled by TokenDiscoveryReader instead."
|
|
14500
14504
|
);
|
|
14501
|
-
const e = await
|
|
14505
|
+
const e = await Uh({
|
|
14502
14506
|
spec: this.opts.descriptor.collect,
|
|
14503
14507
|
providers: this.opts.providers
|
|
14504
14508
|
}), t = JSON.stringify({ credentials: e }), r = {
|
|
@@ -14536,7 +14540,7 @@ class qh {
|
|
|
14536
14540
|
return this.cache = u, this.persistCache(u), u;
|
|
14537
14541
|
}
|
|
14538
14542
|
computeExpiry() {
|
|
14539
|
-
const e = this.opts.descriptor.cacheTtlSec ??
|
|
14543
|
+
const e = this.opts.descriptor.cacheTtlSec ?? $h;
|
|
14540
14544
|
if (!(!this.opts.descriptor.cacheKey || e <= 0))
|
|
14541
14545
|
return Date.now() + e * 1e3;
|
|
14542
14546
|
}
|
|
@@ -14569,8 +14573,8 @@ class qh {
|
|
|
14569
14573
|
}
|
|
14570
14574
|
}
|
|
14571
14575
|
}
|
|
14572
|
-
const
|
|
14573
|
-
async function
|
|
14576
|
+
const qh = 3e4, Hh = 2e3, zh = 100;
|
|
14577
|
+
async function Kh(c) {
|
|
14574
14578
|
const { descriptor: e } = c, t = e.tokenSourceConfig ?? {};
|
|
14575
14579
|
switch (e.tokenSource) {
|
|
14576
14580
|
case "init": {
|
|
@@ -14579,37 +14583,37 @@ async function Vh(c) {
|
|
|
14579
14583
|
return { token: c.initToken, source: "init" };
|
|
14580
14584
|
}
|
|
14581
14585
|
case "query": {
|
|
14582
|
-
const r = typeof t.key == "string" && t.key ? t.key : "token", a =
|
|
14586
|
+
const r = typeof t.key == "string" && t.key ? t.key : "token", a = Gh(r);
|
|
14583
14587
|
if (!a) throw new Ke("query", `?${r}= not present`);
|
|
14584
14588
|
return { token: a, source: "query" };
|
|
14585
14589
|
}
|
|
14586
14590
|
case "hash": {
|
|
14587
|
-
const r = typeof t.key == "string" && t.key ? t.key : "token", a =
|
|
14591
|
+
const r = typeof t.key == "string" && t.key ? t.key : "token", a = Yh(r);
|
|
14588
14592
|
if (!a) throw new Ke("hash", `#${r}= not present`);
|
|
14589
14593
|
return { token: a, source: "hash" };
|
|
14590
14594
|
}
|
|
14591
14595
|
case "postmsg": {
|
|
14592
|
-
const r = typeof t.type == "string" ? t.type : "", a = typeof t.key == "string" && t.key ? t.key : "token", n =
|
|
14593
|
-
return { token: await
|
|
14596
|
+
const r = typeof t.type == "string" ? t.type : "", a = typeof t.key == "string" && t.key ? t.key : "token", n = ef(typeof t.origins == "string" ? t.origins : ""), i = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : qh;
|
|
14597
|
+
return { token: await Zh({ type: r, key: a, origins: n, timeoutMs: i }), source: "postmsg" };
|
|
14594
14598
|
}
|
|
14595
14599
|
case "cookie": {
|
|
14596
14600
|
const r = typeof t.name == "string" && t.name ? t.name : "";
|
|
14597
14601
|
if (!r) throw new Ke("cookie", "cookie.name not configured");
|
|
14598
|
-
const a =
|
|
14602
|
+
const a = Qh(r);
|
|
14599
14603
|
if (!a) throw new Ke("cookie", `cookie "${r}" not set`);
|
|
14600
14604
|
return { token: a, source: "cookie" };
|
|
14601
14605
|
}
|
|
14602
14606
|
case "storage": {
|
|
14603
14607
|
const r = t.store === "session" ? "session" : "local", a = typeof t.key == "string" && t.key ? t.key : "", n = typeof t.path == "string" ? t.path : "";
|
|
14604
14608
|
if (!a) throw new Ke("storage", "storage.key not configured");
|
|
14605
|
-
const i =
|
|
14609
|
+
const i = Jh(r, a, n);
|
|
14606
14610
|
if (!i) throw new Ke("storage", `${r}Storage["${a}"] not set`);
|
|
14607
14611
|
return { token: i, source: "storage" };
|
|
14608
14612
|
}
|
|
14609
14613
|
case "global": {
|
|
14610
14614
|
const r = typeof t.path == "string" ? t.path : "";
|
|
14611
14615
|
if (!r) throw new Ke("global", "global.path not configured");
|
|
14612
|
-
const a = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs :
|
|
14616
|
+
const a = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : Hh, n = typeof t.intervalMs == "number" && t.intervalMs > 0 ? t.intervalMs : zh, i = await Xh(r, a, n);
|
|
14613
14617
|
if (!i) throw new Ke("global", `window.${r} not present`);
|
|
14614
14618
|
return { token: i, source: "global" };
|
|
14615
14619
|
}
|
|
@@ -14622,7 +14626,7 @@ async function Vh(c) {
|
|
|
14622
14626
|
}
|
|
14623
14627
|
}
|
|
14624
14628
|
}
|
|
14625
|
-
class
|
|
14629
|
+
class Vh {
|
|
14626
14630
|
constructor(e) {
|
|
14627
14631
|
this.opts = e;
|
|
14628
14632
|
}
|
|
@@ -14633,7 +14637,7 @@ class Gh {
|
|
|
14633
14637
|
/** Resolve the token. Returns cache if present. */
|
|
14634
14638
|
async get() {
|
|
14635
14639
|
if (this.cached) return this.cached;
|
|
14636
|
-
const e = await
|
|
14640
|
+
const e = await Kh(this.opts);
|
|
14637
14641
|
return this.cached = e, e;
|
|
14638
14642
|
}
|
|
14639
14643
|
/**
|
|
@@ -14650,7 +14654,7 @@ class Ke extends Error {
|
|
|
14650
14654
|
super(`[aikaara-chat-sdk] token-discovery (${e}): ${t}`), this.source = e, this.name = "TokenDiscoveryError";
|
|
14651
14655
|
}
|
|
14652
14656
|
}
|
|
14653
|
-
function
|
|
14657
|
+
function Gh(c) {
|
|
14654
14658
|
if (!(typeof window > "u"))
|
|
14655
14659
|
try {
|
|
14656
14660
|
return new URL(window.location.href).searchParams.get(c) ?? void 0;
|
|
@@ -14658,7 +14662,7 @@ function Yh(c) {
|
|
|
14658
14662
|
return;
|
|
14659
14663
|
}
|
|
14660
14664
|
}
|
|
14661
|
-
function
|
|
14665
|
+
function Yh(c) {
|
|
14662
14666
|
if (!(typeof window > "u"))
|
|
14663
14667
|
try {
|
|
14664
14668
|
const e = window.location.hash.replace(/^#/, "");
|
|
@@ -14667,7 +14671,7 @@ function Qh(c) {
|
|
|
14667
14671
|
return;
|
|
14668
14672
|
}
|
|
14669
14673
|
}
|
|
14670
|
-
function
|
|
14674
|
+
function Qh(c) {
|
|
14671
14675
|
if (typeof document > "u") return;
|
|
14672
14676
|
const e = encodeURIComponent(c), t = document.cookie ? document.cookie.split("; ") : [];
|
|
14673
14677
|
for (const r of t) {
|
|
@@ -14682,7 +14686,7 @@ function Jh(c) {
|
|
|
14682
14686
|
}
|
|
14683
14687
|
}
|
|
14684
14688
|
}
|
|
14685
|
-
function
|
|
14689
|
+
function Jh(c, e, t) {
|
|
14686
14690
|
if (!(typeof window > "u"))
|
|
14687
14691
|
try {
|
|
14688
14692
|
const a = (c === "session" ? window.sessionStorage : window.localStorage).getItem(e);
|
|
@@ -14694,17 +14698,17 @@ function Xh(c, e, t) {
|
|
|
14694
14698
|
} catch {
|
|
14695
14699
|
return a;
|
|
14696
14700
|
}
|
|
14697
|
-
const i =
|
|
14701
|
+
const i = dl(n, t);
|
|
14698
14702
|
return typeof i == "string" ? i : void 0;
|
|
14699
14703
|
} catch {
|
|
14700
14704
|
return;
|
|
14701
14705
|
}
|
|
14702
14706
|
}
|
|
14703
|
-
async function
|
|
14707
|
+
async function Xh(c, e, t) {
|
|
14704
14708
|
if (typeof window > "u") return;
|
|
14705
14709
|
const r = Date.now() + e;
|
|
14706
14710
|
for (; Date.now() < r; ) {
|
|
14707
|
-
const a =
|
|
14711
|
+
const a = dl(window, c);
|
|
14708
14712
|
if (typeof a == "string" && a.length > 0) return a;
|
|
14709
14713
|
if (typeof a == "function")
|
|
14710
14714
|
try {
|
|
@@ -14715,7 +14719,7 @@ async function Zh(c, e, t) {
|
|
|
14715
14719
|
await new Promise((n) => setTimeout(n, t));
|
|
14716
14720
|
}
|
|
14717
14721
|
}
|
|
14718
|
-
function
|
|
14722
|
+
function Zh(c) {
|
|
14719
14723
|
return new Promise((e, t) => {
|
|
14720
14724
|
if (typeof window > "u") {
|
|
14721
14725
|
t(new Ke("postmsg", "no window"));
|
|
@@ -14737,10 +14741,10 @@ function ef(c) {
|
|
|
14737
14741
|
window.addEventListener("message", n);
|
|
14738
14742
|
});
|
|
14739
14743
|
}
|
|
14740
|
-
function
|
|
14744
|
+
function ef(c) {
|
|
14741
14745
|
return c ? c.split(/[,\s]+/).map((e) => e.trim()).filter(Boolean) : [];
|
|
14742
14746
|
}
|
|
14743
|
-
function
|
|
14747
|
+
function dl(c, e) {
|
|
14744
14748
|
if (!e) return c;
|
|
14745
14749
|
const t = e.split(".").filter(Boolean);
|
|
14746
14750
|
let r = c;
|
|
@@ -14751,7 +14755,7 @@ function hl(c, e) {
|
|
|
14751
14755
|
return;
|
|
14752
14756
|
return r;
|
|
14753
14757
|
}
|
|
14754
|
-
function
|
|
14758
|
+
function tf() {
|
|
14755
14759
|
const c = typeof crypto < "u" ? crypto : null;
|
|
14756
14760
|
if (c?.randomUUID) return c.randomUUID();
|
|
14757
14761
|
if (c?.getRandomValues) {
|
|
@@ -14765,30 +14769,30 @@ function rf() {
|
|
|
14765
14769
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
14766
14770
|
});
|
|
14767
14771
|
}
|
|
14768
|
-
const
|
|
14769
|
-
function
|
|
14770
|
-
return `${
|
|
14772
|
+
const rf = "aikaara_chat:requestId";
|
|
14773
|
+
function ao(c, e) {
|
|
14774
|
+
return `${rf}:${c}:${e}`;
|
|
14771
14775
|
}
|
|
14772
|
-
function
|
|
14776
|
+
function nf(c, e) {
|
|
14773
14777
|
try {
|
|
14774
|
-
return localStorage.getItem(
|
|
14778
|
+
return localStorage.getItem(ao(c, e));
|
|
14775
14779
|
} catch {
|
|
14776
14780
|
return null;
|
|
14777
14781
|
}
|
|
14778
14782
|
}
|
|
14779
|
-
function
|
|
14783
|
+
function of(c, e, t) {
|
|
14780
14784
|
try {
|
|
14781
|
-
localStorage.setItem(
|
|
14785
|
+
localStorage.setItem(ao(c, e), t);
|
|
14782
14786
|
} catch {
|
|
14783
14787
|
}
|
|
14784
14788
|
}
|
|
14785
|
-
function
|
|
14789
|
+
function ff(c, e) {
|
|
14786
14790
|
try {
|
|
14787
|
-
localStorage.removeItem(
|
|
14791
|
+
localStorage.removeItem(ao(c, e));
|
|
14788
14792
|
} catch {
|
|
14789
14793
|
}
|
|
14790
14794
|
}
|
|
14791
|
-
async function
|
|
14795
|
+
async function sf(c, e) {
|
|
14792
14796
|
console.log("[aikaara-chat-sdk] preflight running", c.length, "steps");
|
|
14793
14797
|
const t = {
|
|
14794
14798
|
userId: e.userId,
|
|
@@ -14807,7 +14811,7 @@ async function af(c, e) {
|
|
|
14807
14811
|
return s;
|
|
14808
14812
|
}
|
|
14809
14813
|
return o;
|
|
14810
|
-
}, n = await
|
|
14814
|
+
}, n = await Mr(e.sessionToken), i = [800, 1500, 3e3, 5e3, 8e3];
|
|
14811
14815
|
for (let o = 0; o < c.length; o++) {
|
|
14812
14816
|
const s = c[o], l = r(s.url), u = s.method ?? (s.body ? "POST" : "GET"), d = { accept: "application/json", ...s.headers ?? {} };
|
|
14813
14817
|
if ((s.authHeader ?? "session") === "session") {
|
|
@@ -14821,7 +14825,7 @@ async function af(c, e) {
|
|
|
14821
14825
|
try {
|
|
14822
14826
|
const b = await fetch(l, p);
|
|
14823
14827
|
if (b.ok) break;
|
|
14824
|
-
if (y = b.status, f = await b.text().catch(() => ""), m < i.length &&
|
|
14828
|
+
if (y = b.status, f = await b.text().catch(() => ""), m < i.length && af(y, f)) {
|
|
14825
14829
|
const g = i[m++];
|
|
14826
14830
|
console.warn(
|
|
14827
14831
|
`[aikaara-chat-sdk] preflight #${o} ${u} ${l} → ${y} (transient). Retry #${m} in ${g}ms.`
|
|
@@ -14851,7 +14855,7 @@ async function af(c, e) {
|
|
|
14851
14855
|
}
|
|
14852
14856
|
}
|
|
14853
14857
|
}
|
|
14854
|
-
function
|
|
14858
|
+
function af(c, e) {
|
|
14855
14859
|
if (c === 503 || c === 504 || c === 502) return !0;
|
|
14856
14860
|
if (c === 401 || c === 403) return e.trim().length === 0;
|
|
14857
14861
|
if (c === 500) {
|
|
@@ -14860,7 +14864,7 @@ function lf(c, e) {
|
|
|
14860
14864
|
}
|
|
14861
14865
|
return !1;
|
|
14862
14866
|
}
|
|
14863
|
-
async function
|
|
14867
|
+
async function pl(c, e) {
|
|
14864
14868
|
const t = await fetch(c, {
|
|
14865
14869
|
method: "GET",
|
|
14866
14870
|
headers: { accept: "application/json", ...e ?? {} }
|
|
@@ -14876,10 +14880,10 @@ async function fl(c, e) {
|
|
|
14876
14880
|
}
|
|
14877
14881
|
return r;
|
|
14878
14882
|
}
|
|
14879
|
-
function
|
|
14880
|
-
return c.replace("{projectId}", e).replace("{uuid}",
|
|
14883
|
+
function lf(c, e) {
|
|
14884
|
+
return c.replace("{projectId}", e).replace("{uuid}", tf().replace(/-/g, ""));
|
|
14881
14885
|
}
|
|
14882
|
-
function
|
|
14886
|
+
function gl(c) {
|
|
14883
14887
|
const e = c._preload;
|
|
14884
14888
|
if (!Array.isArray(e) || e.length === 0) return;
|
|
14885
14889
|
const t = Array.from(
|
|
@@ -14887,19 +14891,19 @@ function dl(c) {
|
|
|
14887
14891
|
e.map((r) => r && typeof r == "object" ? r.scriptUrl : null).filter((r) => typeof r == "string" && r.length > 0)
|
|
14888
14892
|
)
|
|
14889
14893
|
);
|
|
14890
|
-
t.length !== 0 && Promise.allSettled(t.map((r) =>
|
|
14894
|
+
t.length !== 0 && Promise.allSettled(t.map((r) => fl(r)));
|
|
14891
14895
|
}
|
|
14892
|
-
async function
|
|
14896
|
+
async function cf(c) {
|
|
14893
14897
|
const e = {
|
|
14894
|
-
...c.config ?? (c.configUrl ? await
|
|
14898
|
+
...c.config ?? (c.configUrl ? await pl(c.configUrl, c.configHeaders) : {}),
|
|
14895
14899
|
...c.overrides ?? {}
|
|
14896
14900
|
};
|
|
14897
|
-
|
|
14901
|
+
gl(e);
|
|
14898
14902
|
const t = e.transport ?? "tiledesk", r = e.tiledesk;
|
|
14899
14903
|
if ((t === "tiledesk" || t === "dual") && !r)
|
|
14900
14904
|
throw new Error("mount: descriptor.tiledesk is required for tiledesk/dual transport");
|
|
14901
|
-
const a = r?.projectId ?? "", n = c.identity.userId, i = c.forceNewConversation ? null :
|
|
14902
|
-
(!i || c.forceNewConversation) && a &&
|
|
14905
|
+
const a = r?.projectId ?? "", n = c.identity.userId, i = c.forceNewConversation ? null : nf(n, a), o = r?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", s = c.conversationId ?? i ?? lf(o, a);
|
|
14906
|
+
(!i || c.forceNewConversation) && a && of(n, a, s);
|
|
14903
14907
|
const l = await c.tokenProvider(), u = c.tokenProvider, d = c.historyTokenProvider ?? u, p = r ? {
|
|
14904
14908
|
mqttEndpoint: r.mqttEndpoint,
|
|
14905
14909
|
jwtToken: l,
|
|
@@ -14927,11 +14931,11 @@ async function uf(c) {
|
|
|
14927
14931
|
debug: r.debug,
|
|
14928
14932
|
senderFullname: c.identity.senderFullname ?? c.identity.userName,
|
|
14929
14933
|
tokenProvider: u
|
|
14930
|
-
} : void 0, y = c.uploadAdapter ?? (e.uploadEndpoint ?
|
|
14934
|
+
} : void 0, y = c.uploadAdapter ?? (e.uploadEndpoint ? cl({
|
|
14931
14935
|
endpoint: e.uploadEndpoint,
|
|
14932
14936
|
fieldName: e.uploadFieldName,
|
|
14933
14937
|
extraFields: e.uploadExtraFields
|
|
14934
|
-
}) : void 0), f = c.historyAdapter ?? (e.historyApiBase ?
|
|
14938
|
+
}) : void 0), f = c.historyAdapter ?? (e.historyApiBase ? eh({
|
|
14935
14939
|
apiBase: e.historyApiBase,
|
|
14936
14940
|
pageSize: e.historyPageSize ?? 200,
|
|
14937
14941
|
pathTemplate: e.historyPathTemplate,
|
|
@@ -14986,17 +14990,17 @@ async function uf(c) {
|
|
|
14986
14990
|
}
|
|
14987
14991
|
};
|
|
14988
14992
|
}
|
|
14989
|
-
function
|
|
14993
|
+
function uf(c) {
|
|
14990
14994
|
if (typeof c != "string") return c;
|
|
14991
14995
|
const e = document.querySelector(c);
|
|
14992
14996
|
if (!e) throw new Error(`mountFromSlug: container "${c}" not found`);
|
|
14993
14997
|
return e;
|
|
14994
14998
|
}
|
|
14995
|
-
async function
|
|
14999
|
+
async function hf(c) {
|
|
14996
15000
|
const e = (c.configBase ?? "https://api.aikaara.com").replace(/\/$/, ""), t = `${e}/api/v1/widget_configs/${encodeURIComponent(c.slug)}`;
|
|
14997
15001
|
let r = null;
|
|
14998
15002
|
try {
|
|
14999
|
-
r = await
|
|
15003
|
+
r = await pl(t, c.configHeaders);
|
|
15000
15004
|
} catch (S) {
|
|
15001
15005
|
if (!c.fallbackConfig) throw S;
|
|
15002
15006
|
console.warn(
|
|
@@ -15009,7 +15013,7 @@ async function ff(c) {
|
|
|
15009
15013
|
...r ?? {},
|
|
15010
15014
|
...c.overrides ?? {}
|
|
15011
15015
|
};
|
|
15012
|
-
if (
|
|
15016
|
+
if (gl(a), a.templates && Object.keys(a.templates).length > 0) {
|
|
15013
15017
|
a.components = { ...a.components ?? {} };
|
|
15014
15018
|
for (const [S, v] of Object.entries(a.templates)) {
|
|
15015
15019
|
const x = `template:${S}`;
|
|
@@ -15037,7 +15041,7 @@ async function ff(c) {
|
|
|
15037
15041
|
);
|
|
15038
15042
|
let i = null, o = c.user.id, s = c.user.name, l = "", u = c.user.token, d = null;
|
|
15039
15043
|
if (a.sso?.tokenSource) {
|
|
15040
|
-
d = new
|
|
15044
|
+
d = new Vh({
|
|
15041
15045
|
descriptor: {
|
|
15042
15046
|
provider: a.sso.provider,
|
|
15043
15047
|
flow: a.sso.flow,
|
|
@@ -15054,20 +15058,20 @@ async function ff(c) {
|
|
|
15054
15058
|
u = async () => (await d.get()).token, c.user.identity && !c.user.identity.partnerToken && (c.user.identity.partnerToken = S.token);
|
|
15055
15059
|
} else if (a.sso && a.sso.collect && a.sso.collect.length > 0) {
|
|
15056
15060
|
const S = `${e}/api/v1/projects/by-slug/${encodeURIComponent(c.slug)}/sso_exchange`;
|
|
15057
|
-
i = await new
|
|
15061
|
+
i = await new Wh({
|
|
15058
15062
|
descriptor: a.sso,
|
|
15059
15063
|
providers: c.user.credentialProviders,
|
|
15060
15064
|
exchangeUrl: S
|
|
15061
15065
|
}).get(), o = i.extUid || o, s = s ?? i.displayName, l = i.userToken;
|
|
15062
15066
|
}
|
|
15063
|
-
a.preflight && a.preflight.length && await
|
|
15067
|
+
a.preflight && a.preflight.length && await sf(a.preflight, {
|
|
15064
15068
|
sessionToken: u,
|
|
15065
15069
|
userId: o,
|
|
15066
15070
|
projectId: a.tiledesk?.projectId ?? "",
|
|
15067
15071
|
slug: c.slug,
|
|
15068
15072
|
identity: c.user.identity
|
|
15069
15073
|
});
|
|
15070
|
-
const p = new
|
|
15074
|
+
const p = new Nh(a.auth, u), y = await p.get(), f = y.fullName || s || o;
|
|
15071
15075
|
window.__aikaara_runtime__ = {
|
|
15072
15076
|
getChatJwt: async () => (await p.get()).token,
|
|
15073
15077
|
identity: c.user.identity,
|
|
@@ -15079,16 +15083,16 @@ async function ff(c) {
|
|
|
15079
15083
|
} catch (S) {
|
|
15080
15084
|
return console.warn("[aikaara-chat-sdk] partner auto-refresh failed", S), null;
|
|
15081
15085
|
}
|
|
15082
|
-
} : null, b = a.upload, k = async () => `Bearer ${b && "tokenSource" in b && b.tokenSource === "chat" ? (await p.get()).token : await
|
|
15086
|
+
} : null, b = a.upload, k = async () => `Bearer ${b && "tokenSource" in b && b.tokenSource === "chat" ? (await p.get()).token : await Mr(c.user.token)}`, g = c.hooks?.upload ?? (b && b.mode === "presigned-3step" ? Xu({
|
|
15083
15087
|
...b,
|
|
15084
15088
|
authHeader: k
|
|
15085
|
-
}) : b && b.mode === "direct" ?
|
|
15089
|
+
}) : b && b.mode === "direct" ? cl({
|
|
15086
15090
|
endpoint: b.endpoint,
|
|
15087
15091
|
fieldName: b.fieldName,
|
|
15088
15092
|
extraFields: b.extraFields,
|
|
15089
15093
|
headers: async () => ({ authorization: await k() })
|
|
15090
|
-
}) : void 0), _ = await
|
|
15091
|
-
container:
|
|
15094
|
+
}) : void 0), _ = await cf({
|
|
15095
|
+
container: uf(c.container),
|
|
15092
15096
|
config: a,
|
|
15093
15097
|
// SSO-issued Aikaara user token, used by the ActionCable transport.
|
|
15094
15098
|
// Tiledesk-only widgets ignore this; falls back to `userId` inside `mount`.
|
|
@@ -15106,7 +15110,7 @@ async function ff(c) {
|
|
|
15106
15110
|
conversationId: y.requestId,
|
|
15107
15111
|
onError: c.hooks?.onError,
|
|
15108
15112
|
onMessage: c.hooks?.onMessage,
|
|
15109
|
-
getLinkBearer: async (S) => S === "none" ? null : S === "chat" ? (await p.get()).token :
|
|
15113
|
+
getLinkBearer: async (S) => S === "none" ? null : S === "chat" ? (await p.get()).token : Mr(c.user.token)
|
|
15110
15114
|
});
|
|
15111
15115
|
return Object.assign(_, {
|
|
15112
15116
|
fullName: f,
|
|
@@ -15121,47 +15125,47 @@ async function ff(c) {
|
|
|
15121
15125
|
});
|
|
15122
15126
|
}
|
|
15123
15127
|
export {
|
|
15124
|
-
|
|
15125
|
-
|
|
15126
|
-
|
|
15127
|
-
|
|
15128
|
-
|
|
15129
|
-
|
|
15130
|
-
|
|
15131
|
-
|
|
15132
|
-
|
|
15133
|
-
|
|
15134
|
-
|
|
15135
|
-
|
|
15136
|
-
|
|
15137
|
-
|
|
15138
|
-
|
|
15139
|
-
|
|
15140
|
-
|
|
15141
|
-
|
|
15142
|
-
|
|
15143
|
-
|
|
15144
|
-
|
|
15145
|
-
|
|
15146
|
-
|
|
15147
|
-
|
|
15148
|
-
|
|
15149
|
-
|
|
15150
|
-
|
|
15151
|
-
|
|
15152
|
-
|
|
15153
|
-
|
|
15154
|
-
|
|
15128
|
+
lo as A,
|
|
15129
|
+
hf as B,
|
|
15130
|
+
ml as C,
|
|
15131
|
+
cf as D,
|
|
15132
|
+
Os as E,
|
|
15133
|
+
ll as F,
|
|
15134
|
+
Oh as G,
|
|
15135
|
+
Rh as H,
|
|
15136
|
+
Ch as I,
|
|
15137
|
+
Th as J,
|
|
15138
|
+
xh as K,
|
|
15139
|
+
Ah as L,
|
|
15140
|
+
Tl as M,
|
|
15141
|
+
Eh as N,
|
|
15142
|
+
_h as O,
|
|
15143
|
+
Nh as S,
|
|
15144
|
+
Wu as T,
|
|
15145
|
+
nh as a,
|
|
15146
|
+
Gu as b,
|
|
15147
|
+
ih as c,
|
|
15148
|
+
gh as d,
|
|
15149
|
+
rh as e,
|
|
15150
|
+
yh as f,
|
|
15151
|
+
dh as g,
|
|
15152
|
+
uh as h,
|
|
15153
|
+
bh as i,
|
|
15154
|
+
mh as j,
|
|
15155
|
+
Il as k,
|
|
15156
|
+
Al as l,
|
|
15157
|
+
Ol as m,
|
|
15158
|
+
Wh as n,
|
|
15155
15159
|
Ke as o,
|
|
15156
|
-
|
|
15157
|
-
|
|
15158
|
-
|
|
15159
|
-
|
|
15160
|
-
|
|
15161
|
-
|
|
15162
|
-
|
|
15163
|
-
|
|
15164
|
-
|
|
15165
|
-
|
|
15166
|
-
|
|
15160
|
+
Vh as p,
|
|
15161
|
+
ff as q,
|
|
15162
|
+
jh as r,
|
|
15163
|
+
Uh as s,
|
|
15164
|
+
cl as t,
|
|
15165
|
+
Xu as u,
|
|
15166
|
+
eh as v,
|
|
15167
|
+
Kh as w,
|
|
15168
|
+
Ku as x,
|
|
15169
|
+
zu as y,
|
|
15170
|
+
Hu as z
|
|
15167
15171
|
};
|