ai-client-sdk 4.1.2 → 4.1.3

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.
@@ -0,0 +1,2519 @@
1
+ import { a as e, t } from "./rolldown-runtime-DC4cgjXG.mjs";
2
+ import { a as n, c as r, i, n as a, o, r as s, s as c, t as l } from "./vendor-react-dom-Dt3jXKg5.mjs";
3
+ import { a as u, i as d, n as f, r as p, t as m } from "./vendor-markdown-CMw5eKCm.mjs";
4
+ import { t as h } from "./vendor-chrono-node-CYhWNUSM.mjs";
5
+ import { t as g } from "./vendor-ajv-BgE6aqKX.mjs";
6
+ var _ = new class {
7
+ events = {
8
+ send: [],
9
+ create: [],
10
+ stop: []
11
+ };
12
+ on = (e, t) => {
13
+ this.events[e].push(t);
14
+ };
15
+ emit = async (e, ...t) => {
16
+ for (let n of this.events[e]) try {
17
+ await n(...t);
18
+ } catch (t) {
19
+ console.error(`Error in event listener for ${e}:`, t);
20
+ }
21
+ };
22
+ }(), v = typeof global == "object" && global && global.Object === Object && global, y = typeof self == "object" && self && self.Object === Object && self, b = v || y || Function("return this")(), x = b.Symbol, S = Object.prototype, C = S.hasOwnProperty, w = S.toString, T = x ? x.toStringTag : void 0;
23
+ function E(e) {
24
+ var t = C.call(e, T), n = e[T];
25
+ try {
26
+ e[T] = void 0;
27
+ var r = !0;
28
+ } catch {}
29
+ var i = w.call(e);
30
+ return r && (t ? e[T] = n : delete e[T]), i;
31
+ }
32
+ //#endregion
33
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js
34
+ var D = Object.prototype.toString;
35
+ function ee(e) {
36
+ return D.call(e);
37
+ }
38
+ //#endregion
39
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js
40
+ var O = "[object Null]", k = "[object Undefined]", A = x ? x.toStringTag : void 0;
41
+ function j(e) {
42
+ return e == null ? e === void 0 ? k : O : A && A in Object(e) ? E(e) : ee(e);
43
+ }
44
+ //#endregion
45
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js
46
+ function M(e) {
47
+ return typeof e == "object" && !!e;
48
+ }
49
+ //#endregion
50
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js
51
+ var te = "[object Symbol]";
52
+ function ne(e) {
53
+ return typeof e == "symbol" || M(e) && j(e) == te;
54
+ }
55
+ //#endregion
56
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArray.js
57
+ var re = Array.isArray, ie = /\s/;
58
+ function ae(e) {
59
+ for (var t = e.length; t-- && ie.test(e.charAt(t)););
60
+ return t;
61
+ }
62
+ //#endregion
63
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js
64
+ var N = /^\s+/;
65
+ function oe(e) {
66
+ return e && e.slice(0, ae(e) + 1).replace(N, "");
67
+ }
68
+ //#endregion
69
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObject.js
70
+ function P(e) {
71
+ var t = typeof e;
72
+ return e != null && (t == "object" || t == "function");
73
+ }
74
+ //#endregion
75
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js
76
+ var se = NaN, F = /^[-+]0x[0-9a-f]+$/i, ce = /^0b[01]+$/i, le = /^0o[0-7]+$/i, ue = parseInt;
77
+ function de(e) {
78
+ if (typeof e == "number") return e;
79
+ if (ne(e)) return se;
80
+ if (P(e)) {
81
+ var t = typeof e.valueOf == "function" ? e.valueOf() : e;
82
+ e = P(t) ? t + "" : t;
83
+ }
84
+ if (typeof e != "string") return e === 0 ? e : +e;
85
+ e = oe(e);
86
+ var n = ce.test(e);
87
+ return n || le.test(e) ? ue(e.slice(2), n ? 2 : 8) : F.test(e) ? se : +e;
88
+ }
89
+ //#endregion
90
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/identity.js
91
+ function fe(e) {
92
+ return e;
93
+ }
94
+ //#endregion
95
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js
96
+ var pe = "[object AsyncFunction]", me = "[object Function]", he = "[object GeneratorFunction]", ge = "[object Proxy]";
97
+ function I(e) {
98
+ if (!P(e)) return !1;
99
+ var t = j(e);
100
+ return t == me || t == he || t == pe || t == ge;
101
+ }
102
+ //#endregion
103
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js
104
+ var _e = b["__core-js_shared__"], ve = function() {
105
+ var e = /[^.]+$/.exec(_e && _e.keys && _e.keys.IE_PROTO || "");
106
+ return e ? "Symbol(src)_1." + e : "";
107
+ }();
108
+ function ye(e) {
109
+ return !!ve && ve in e;
110
+ }
111
+ //#endregion
112
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js
113
+ var be = Function.prototype.toString;
114
+ function xe(e) {
115
+ if (e != null) {
116
+ try {
117
+ return be.call(e);
118
+ } catch {}
119
+ try {
120
+ return e + "";
121
+ } catch {}
122
+ }
123
+ return "";
124
+ }
125
+ //#endregion
126
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js
127
+ var Se = /[\\^$.*+?()[\]{}|]/g, Ce = /^\[object .+?Constructor\]$/, we = Function.prototype, Te = Object.prototype, Ee = we.toString, De = Te.hasOwnProperty, L = RegExp("^" + Ee.call(De).replace(Se, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
128
+ function Oe(e) {
129
+ return !P(e) || ye(e) ? !1 : (I(e) ? L : Ce).test(xe(e));
130
+ }
131
+ //#endregion
132
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js
133
+ function ke(e, t) {
134
+ return e?.[t];
135
+ }
136
+ //#endregion
137
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js
138
+ function Ae(e, t) {
139
+ var n = ke(e, t);
140
+ return Oe(n) ? n : void 0;
141
+ }
142
+ //#endregion
143
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js
144
+ var je = Object.create, Me = function() {
145
+ function e() {}
146
+ return function(t) {
147
+ if (!P(t)) return {};
148
+ if (je) return je(t);
149
+ e.prototype = t;
150
+ var n = new e();
151
+ return e.prototype = void 0, n;
152
+ };
153
+ }();
154
+ //#endregion
155
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_apply.js
156
+ function Ne(e, t, n) {
157
+ switch (n.length) {
158
+ case 0: return e.call(t);
159
+ case 1: return e.call(t, n[0]);
160
+ case 2: return e.call(t, n[0], n[1]);
161
+ case 3: return e.call(t, n[0], n[1], n[2]);
162
+ }
163
+ return e.apply(t, n);
164
+ }
165
+ //#endregion
166
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js
167
+ function Pe(e, t) {
168
+ var n = -1, r = e.length;
169
+ for (t ||= Array(r); ++n < r;) t[n] = e[n];
170
+ return t;
171
+ }
172
+ //#endregion
173
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js
174
+ var R = 800, Fe = 16, Ie = Date.now;
175
+ function Le(e) {
176
+ var t = 0, n = 0;
177
+ return function() {
178
+ var r = Ie(), i = Fe - (r - n);
179
+ if (n = r, i > 0) {
180
+ if (++t >= R) return arguments[0];
181
+ } else t = 0;
182
+ return e.apply(void 0, arguments);
183
+ };
184
+ }
185
+ //#endregion
186
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/constant.js
187
+ function Re(e) {
188
+ return function() {
189
+ return e;
190
+ };
191
+ }
192
+ //#endregion
193
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js
194
+ var ze = function() {
195
+ try {
196
+ var e = Ae(Object, "defineProperty");
197
+ return e({}, "", {}), e;
198
+ } catch {}
199
+ }(), Be = Le(ze ? function(e, t) {
200
+ return ze(e, "toString", {
201
+ configurable: !0,
202
+ enumerable: !1,
203
+ value: Re(t),
204
+ writable: !0
205
+ });
206
+ } : fe), Ve = 9007199254740991, He = /^(?:0|[1-9]\d*)$/;
207
+ function Ue(e, t) {
208
+ var n = typeof e;
209
+ return t ??= Ve, !!t && (n == "number" || n != "symbol" && He.test(e)) && e > -1 && e % 1 == 0 && e < t;
210
+ }
211
+ //#endregion
212
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js
213
+ function z(e, t, n) {
214
+ t == "__proto__" && ze ? ze(e, t, {
215
+ configurable: !0,
216
+ enumerable: !0,
217
+ value: n,
218
+ writable: !0
219
+ }) : e[t] = n;
220
+ }
221
+ //#endregion
222
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/eq.js
223
+ function B(e, t) {
224
+ return e === t || e !== e && t !== t;
225
+ }
226
+ //#endregion
227
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js
228
+ var We = Object.prototype.hasOwnProperty;
229
+ function Ge(e, t, n) {
230
+ var r = e[t];
231
+ (!(We.call(e, t) && B(r, n)) || n === void 0 && !(t in e)) && z(e, t, n);
232
+ }
233
+ //#endregion
234
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js
235
+ function Ke(e, t, n, r) {
236
+ var i = !n;
237
+ n ||= {};
238
+ for (var a = -1, o = t.length; ++a < o;) {
239
+ var s = t[a], c = r ? r(n[s], e[s], s, n, e) : void 0;
240
+ c === void 0 && (c = e[s]), i ? z(n, s, c) : Ge(n, s, c);
241
+ }
242
+ return n;
243
+ }
244
+ //#endregion
245
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js
246
+ var qe = Math.max;
247
+ function Je(e, t, n) {
248
+ return t = qe(t === void 0 ? e.length - 1 : t, 0), function() {
249
+ for (var r = arguments, i = -1, a = qe(r.length - t, 0), o = Array(a); ++i < a;) o[i] = r[t + i];
250
+ i = -1;
251
+ for (var s = Array(t + 1); ++i < t;) s[i] = r[i];
252
+ return s[t] = n(o), Ne(e, this, s);
253
+ };
254
+ }
255
+ //#endregion
256
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js
257
+ function Ye(e, t) {
258
+ return Be(Je(e, t, fe), e + "");
259
+ }
260
+ //#endregion
261
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isLength.js
262
+ var Xe = 9007199254740991;
263
+ function V(e) {
264
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Xe;
265
+ }
266
+ //#endregion
267
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js
268
+ function Ze(e) {
269
+ return e != null && V(e.length) && !I(e);
270
+ }
271
+ //#endregion
272
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js
273
+ function Qe(e, t, n) {
274
+ if (!P(n)) return !1;
275
+ var r = typeof t;
276
+ return (r == "number" ? Ze(n) && Ue(t, n.length) : r == "string" && t in n) ? B(n[t], e) : !1;
277
+ }
278
+ //#endregion
279
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js
280
+ function $e(e) {
281
+ return Ye(function(t, n) {
282
+ var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
283
+ for (a = e.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && Qe(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), t = Object(t); ++r < i;) {
284
+ var s = n[r];
285
+ s && e(t, s, r, a);
286
+ }
287
+ return t;
288
+ });
289
+ }
290
+ //#endregion
291
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js
292
+ var et = Object.prototype;
293
+ function H(e) {
294
+ var t = e && e.constructor;
295
+ return e === (typeof t == "function" && t.prototype || et);
296
+ }
297
+ //#endregion
298
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js
299
+ function tt(e, t) {
300
+ for (var n = -1, r = Array(e); ++n < e;) r[n] = t(n);
301
+ return r;
302
+ }
303
+ //#endregion
304
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js
305
+ var nt = "[object Arguments]";
306
+ function rt(e) {
307
+ return M(e) && j(e) == nt;
308
+ }
309
+ //#endregion
310
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js
311
+ var it = Object.prototype, at = it.hasOwnProperty, ot = it.propertyIsEnumerable, st = rt(function() {
312
+ return arguments;
313
+ }()) ? rt : function(e) {
314
+ return M(e) && at.call(e, "callee") && !ot.call(e, "callee");
315
+ };
316
+ //#endregion
317
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js
318
+ function ct() {
319
+ return !1;
320
+ }
321
+ //#endregion
322
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js
323
+ var lt = typeof exports == "object" && exports && !exports.nodeType && exports, ut = lt && typeof module == "object" && module && !module.nodeType && module, dt = ut && ut.exports === lt ? b.Buffer : void 0, ft = (dt ? dt.isBuffer : void 0) || ct, pt = "[object Arguments]", mt = "[object Array]", ht = "[object Boolean]", gt = "[object Date]", _t = "[object Error]", vt = "[object Function]", yt = "[object Map]", bt = "[object Number]", xt = "[object Object]", St = "[object RegExp]", Ct = "[object Set]", wt = "[object String]", Tt = "[object WeakMap]", Et = "[object ArrayBuffer]", Dt = "[object DataView]", Ot = "[object Float32Array]", kt = "[object Float64Array]", At = "[object Int8Array]", jt = "[object Int16Array]", Mt = "[object Int32Array]", Nt = "[object Uint8Array]", Pt = "[object Uint8ClampedArray]", Ft = "[object Uint16Array]", It = "[object Uint32Array]", U = {};
324
+ U[Ot] = U[kt] = U[At] = U[jt] = U[Mt] = U[Nt] = U[Pt] = U[Ft] = U[It] = !0, U[pt] = U[mt] = U[Et] = U[ht] = U[Dt] = U[gt] = U[_t] = U[vt] = U[yt] = U[bt] = U[xt] = U[St] = U[Ct] = U[wt] = U[Tt] = !1;
325
+ function Lt(e) {
326
+ return M(e) && V(e.length) && !!U[j(e)];
327
+ }
328
+ //#endregion
329
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js
330
+ function Rt(e) {
331
+ return function(t) {
332
+ return e(t);
333
+ };
334
+ }
335
+ //#endregion
336
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js
337
+ var zt = typeof exports == "object" && exports && !exports.nodeType && exports, Bt = zt && typeof module == "object" && module && !module.nodeType && module, Vt = Bt && Bt.exports === zt && v.process, Ht = function() {
338
+ try {
339
+ return Bt && Bt.require && Bt.require("util").types || Vt && Vt.binding && Vt.binding("util");
340
+ } catch {}
341
+ }(), Ut = Ht && Ht.isTypedArray, Wt = Ut ? Rt(Ut) : Lt, Gt = Object.prototype.hasOwnProperty;
342
+ function Kt(e, t) {
343
+ var n = re(e), r = !n && st(e), i = !n && !r && ft(e), a = !n && !r && !i && Wt(e), o = n || r || i || a, s = o ? tt(e.length, String) : [], c = s.length;
344
+ for (var l in e) (t || Gt.call(e, l)) && !(o && (l == "length" || i && (l == "offset" || l == "parent") || a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || Ue(l, c))) && s.push(l);
345
+ return s;
346
+ }
347
+ //#endregion
348
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js
349
+ function qt(e, t) {
350
+ return function(n) {
351
+ return e(t(n));
352
+ };
353
+ }
354
+ //#endregion
355
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js
356
+ function Jt(e) {
357
+ var t = [];
358
+ if (e != null) for (var n in Object(e)) t.push(n);
359
+ return t;
360
+ }
361
+ //#endregion
362
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js
363
+ var Yt = Object.prototype.hasOwnProperty;
364
+ function Xt(e) {
365
+ if (!P(e)) return Jt(e);
366
+ var t = H(e), n = [];
367
+ for (var r in e) r == "constructor" && (t || !Yt.call(e, r)) || n.push(r);
368
+ return n;
369
+ }
370
+ //#endregion
371
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js
372
+ function Zt(e) {
373
+ return Ze(e) ? Kt(e, !0) : Xt(e);
374
+ }
375
+ //#endregion
376
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js
377
+ var Qt = Ae(Object, "create");
378
+ //#endregion
379
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js
380
+ function $t() {
381
+ this.__data__ = Qt ? Qt(null) : {}, this.size = 0;
382
+ }
383
+ //#endregion
384
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js
385
+ function en(e) {
386
+ var t = this.has(e) && delete this.__data__[e];
387
+ return this.size -= +!!t, t;
388
+ }
389
+ //#endregion
390
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js
391
+ var tn = "__lodash_hash_undefined__", nn = Object.prototype.hasOwnProperty;
392
+ function rn(e) {
393
+ var t = this.__data__;
394
+ if (Qt) {
395
+ var n = t[e];
396
+ return n === tn ? void 0 : n;
397
+ }
398
+ return nn.call(t, e) ? t[e] : void 0;
399
+ }
400
+ //#endregion
401
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js
402
+ var an = Object.prototype.hasOwnProperty;
403
+ function on(e) {
404
+ var t = this.__data__;
405
+ return Qt ? t[e] !== void 0 : an.call(t, e);
406
+ }
407
+ //#endregion
408
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js
409
+ var sn = "__lodash_hash_undefined__";
410
+ function cn(e, t) {
411
+ var n = this.__data__;
412
+ return this.size += +!this.has(e), n[e] = Qt && t === void 0 ? sn : t, this;
413
+ }
414
+ //#endregion
415
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js
416
+ function ln(e) {
417
+ var t = -1, n = e == null ? 0 : e.length;
418
+ for (this.clear(); ++t < n;) {
419
+ var r = e[t];
420
+ this.set(r[0], r[1]);
421
+ }
422
+ }
423
+ ln.prototype.clear = $t, ln.prototype.delete = en, ln.prototype.get = rn, ln.prototype.has = on, ln.prototype.set = cn;
424
+ //#endregion
425
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js
426
+ function un() {
427
+ this.__data__ = [], this.size = 0;
428
+ }
429
+ //#endregion
430
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js
431
+ function dn(e, t) {
432
+ for (var n = e.length; n--;) if (B(e[n][0], t)) return n;
433
+ return -1;
434
+ }
435
+ //#endregion
436
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js
437
+ var fn = Array.prototype.splice;
438
+ function pn(e) {
439
+ var t = this.__data__, n = dn(t, e);
440
+ return n < 0 ? !1 : (n == t.length - 1 ? t.pop() : fn.call(t, n, 1), --this.size, !0);
441
+ }
442
+ //#endregion
443
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js
444
+ function mn(e) {
445
+ var t = this.__data__, n = dn(t, e);
446
+ return n < 0 ? void 0 : t[n][1];
447
+ }
448
+ //#endregion
449
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js
450
+ function hn(e) {
451
+ return dn(this.__data__, e) > -1;
452
+ }
453
+ //#endregion
454
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js
455
+ function gn(e, t) {
456
+ var n = this.__data__, r = dn(n, e);
457
+ return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
458
+ }
459
+ //#endregion
460
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js
461
+ function _n(e) {
462
+ var t = -1, n = e == null ? 0 : e.length;
463
+ for (this.clear(); ++t < n;) {
464
+ var r = e[t];
465
+ this.set(r[0], r[1]);
466
+ }
467
+ }
468
+ _n.prototype.clear = un, _n.prototype.delete = pn, _n.prototype.get = mn, _n.prototype.has = hn, _n.prototype.set = gn;
469
+ //#endregion
470
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Map.js
471
+ var vn = Ae(b, "Map");
472
+ //#endregion
473
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js
474
+ function yn() {
475
+ this.size = 0, this.__data__ = {
476
+ hash: new ln(),
477
+ map: new (vn || _n)(),
478
+ string: new ln()
479
+ };
480
+ }
481
+ //#endregion
482
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js
483
+ function bn(e) {
484
+ var t = typeof e;
485
+ return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
486
+ }
487
+ //#endregion
488
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js
489
+ function xn(e, t) {
490
+ var n = e.__data__;
491
+ return bn(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
492
+ }
493
+ //#endregion
494
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js
495
+ function Sn(e) {
496
+ var t = xn(this, e).delete(e);
497
+ return this.size -= +!!t, t;
498
+ }
499
+ //#endregion
500
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js
501
+ function Cn(e) {
502
+ return xn(this, e).get(e);
503
+ }
504
+ //#endregion
505
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js
506
+ function wn(e) {
507
+ return xn(this, e).has(e);
508
+ }
509
+ //#endregion
510
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js
511
+ function Tn(e, t) {
512
+ var n = xn(this, e), r = n.size;
513
+ return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
514
+ }
515
+ //#endregion
516
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js
517
+ function En(e) {
518
+ var t = -1, n = e == null ? 0 : e.length;
519
+ for (this.clear(); ++t < n;) {
520
+ var r = e[t];
521
+ this.set(r[0], r[1]);
522
+ }
523
+ }
524
+ En.prototype.clear = yn, En.prototype.delete = Sn, En.prototype.get = Cn, En.prototype.has = wn, En.prototype.set = Tn;
525
+ //#endregion
526
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js
527
+ var Dn = qt(Object.getPrototypeOf, Object), On = "[object Object]", kn = Function.prototype, An = Object.prototype, jn = kn.toString, Mn = An.hasOwnProperty, Nn = jn.call(Object);
528
+ function Pn(e) {
529
+ if (!M(e) || j(e) != On) return !1;
530
+ var t = Dn(e);
531
+ if (t === null) return !0;
532
+ var n = Mn.call(t, "constructor") && t.constructor;
533
+ return typeof n == "function" && n instanceof n && jn.call(n) == Nn;
534
+ }
535
+ //#endregion
536
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js
537
+ function Fn() {
538
+ this.__data__ = new _n(), this.size = 0;
539
+ }
540
+ //#endregion
541
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js
542
+ function In(e) {
543
+ var t = this.__data__, n = t.delete(e);
544
+ return this.size = t.size, n;
545
+ }
546
+ //#endregion
547
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js
548
+ function Ln(e) {
549
+ return this.__data__.get(e);
550
+ }
551
+ //#endregion
552
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js
553
+ function Rn(e) {
554
+ return this.__data__.has(e);
555
+ }
556
+ //#endregion
557
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js
558
+ var zn = 200;
559
+ function Bn(e, t) {
560
+ var n = this.__data__;
561
+ if (n instanceof _n) {
562
+ var r = n.__data__;
563
+ if (!vn || r.length < zn - 1) return r.push([e, t]), this.size = ++n.size, this;
564
+ n = this.__data__ = new En(r);
565
+ }
566
+ return n.set(e, t), this.size = n.size, this;
567
+ }
568
+ //#endregion
569
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js
570
+ function Vn(e) {
571
+ var t = this.__data__ = new _n(e);
572
+ this.size = t.size;
573
+ }
574
+ Vn.prototype.clear = Fn, Vn.prototype.delete = In, Vn.prototype.get = Ln, Vn.prototype.has = Rn, Vn.prototype.set = Bn;
575
+ //#endregion
576
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js
577
+ var Hn = typeof exports == "object" && exports && !exports.nodeType && exports, Un = Hn && typeof module == "object" && module && !module.nodeType && module, Wn = Un && Un.exports === Hn ? b.Buffer : void 0, Gn = Wn ? Wn.allocUnsafe : void 0;
578
+ function Kn(e, t) {
579
+ if (t) return e.slice();
580
+ var n = e.length, r = Gn ? Gn(n) : new e.constructor(n);
581
+ return e.copy(r), r;
582
+ }
583
+ //#endregion
584
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js
585
+ var qn = b.Uint8Array;
586
+ //#endregion
587
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js
588
+ function Jn(e) {
589
+ var t = new e.constructor(e.byteLength);
590
+ return new qn(t).set(new qn(e)), t;
591
+ }
592
+ //#endregion
593
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js
594
+ function Yn(e, t) {
595
+ var n = t ? Jn(e.buffer) : e.buffer;
596
+ return new e.constructor(n, e.byteOffset, e.length);
597
+ }
598
+ //#endregion
599
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js
600
+ function Xn(e) {
601
+ return typeof e.constructor == "function" && !H(e) ? Me(Dn(e)) : {};
602
+ }
603
+ //#endregion
604
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js
605
+ function Zn(e) {
606
+ return function(t, n, r) {
607
+ for (var i = -1, a = Object(t), o = r(t), s = o.length; s--;) {
608
+ var c = o[e ? s : ++i];
609
+ if (n(a[c], c, a) === !1) break;
610
+ }
611
+ return t;
612
+ };
613
+ }
614
+ //#endregion
615
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js
616
+ var Qn = Zn(), $n = function() {
617
+ return b.Date.now();
618
+ }, er = "Expected a function", tr = Math.max, nr = Math.min;
619
+ function rr(e, t, n) {
620
+ var r, i, a, o, s, c, l = 0, u = !1, d = !1, f = !0;
621
+ if (typeof e != "function") throw TypeError(er);
622
+ t = de(t) || 0, P(n) && (u = !!n.leading, d = "maxWait" in n, a = d ? tr(de(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f);
623
+ function p(t) {
624
+ var n = r, a = i;
625
+ return r = i = void 0, l = t, o = e.apply(a, n), o;
626
+ }
627
+ function m(e) {
628
+ return l = e, s = setTimeout(_, t), u ? p(e) : o;
629
+ }
630
+ function h(e) {
631
+ var n = e - c, r = e - l, i = t - n;
632
+ return d ? nr(i, a - r) : i;
633
+ }
634
+ function g(e) {
635
+ var n = e - c, r = e - l;
636
+ return c === void 0 || n >= t || n < 0 || d && r >= a;
637
+ }
638
+ function _() {
639
+ var e = $n();
640
+ if (g(e)) return v(e);
641
+ s = setTimeout(_, h(e));
642
+ }
643
+ function v(e) {
644
+ return s = void 0, f && r ? p(e) : (r = i = void 0, o);
645
+ }
646
+ function y() {
647
+ s !== void 0 && clearTimeout(s), l = 0, r = c = i = s = void 0;
648
+ }
649
+ function b() {
650
+ return s === void 0 ? o : v($n());
651
+ }
652
+ function x() {
653
+ var e = $n(), n = g(e);
654
+ if (r = arguments, i = this, c = e, n) {
655
+ if (s === void 0) return m(c);
656
+ if (d) return clearTimeout(s), s = setTimeout(_, t), p(c);
657
+ }
658
+ return s === void 0 && (s = setTimeout(_, t)), o;
659
+ }
660
+ return x.cancel = y, x.flush = b, x;
661
+ }
662
+ //#endregion
663
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js
664
+ function ir(e, t, n) {
665
+ (n !== void 0 && !B(e[t], n) || n === void 0 && !(t in e)) && z(e, t, n);
666
+ }
667
+ //#endregion
668
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js
669
+ function ar(e) {
670
+ return M(e) && Ze(e);
671
+ }
672
+ //#endregion
673
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js
674
+ function or(e, t) {
675
+ if (!(t === "constructor" && typeof e[t] == "function") && t != "__proto__") return e[t];
676
+ }
677
+ //#endregion
678
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js
679
+ function sr(e) {
680
+ return Ke(e, Zt(e));
681
+ }
682
+ //#endregion
683
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js
684
+ function cr(e, t, n, r, i, a, o) {
685
+ var s = or(e, n), c = or(t, n), l = o.get(c);
686
+ if (l) {
687
+ ir(e, n, l);
688
+ return;
689
+ }
690
+ var u = a ? a(s, c, n + "", e, t, o) : void 0, d = u === void 0;
691
+ if (d) {
692
+ var f = re(c), p = !f && ft(c), m = !f && !p && Wt(c);
693
+ u = c, f || p || m ? re(s) ? u = s : ar(s) ? u = Pe(s) : p ? (d = !1, u = Kn(c, !0)) : m ? (d = !1, u = Yn(c, !0)) : u = [] : Pn(c) || st(c) ? (u = s, st(s) ? u = sr(s) : (!P(s) || I(s)) && (u = Xn(c))) : d = !1;
694
+ }
695
+ d && (o.set(c, u), i(u, c, r, a, o), o.delete(c)), ir(e, n, u);
696
+ }
697
+ //#endregion
698
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js
699
+ function lr(e, t, n, r, i) {
700
+ e !== t && Qn(t, function(a, o) {
701
+ if (i ||= new Vn(), P(a)) cr(e, t, o, n, lr, r, i);
702
+ else {
703
+ var s = r ? r(or(e, o), a, o + "", e, t, i) : void 0;
704
+ s === void 0 && (s = a), ir(e, o, s);
705
+ }
706
+ }, Zt);
707
+ }
708
+ //#endregion
709
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/mergeWith.js
710
+ var ur = $e(function(e, t, n, r) {
711
+ lr(e, t, n, r);
712
+ }), dr = /* @__PURE__ */ t(((e, t) => {
713
+ (function(n, r) {
714
+ typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs = r();
715
+ })(e, (function() {
716
+ var e = 1e3, t = 6e4, n = 36e5, r = "millisecond", i = "second", a = "minute", o = "hour", s = "day", c = "week", l = "month", u = "quarter", d = "year", f = "date", p = "Invalid Date", m = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, h = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = {
717
+ name: "en",
718
+ weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
719
+ months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
720
+ ordinal: function(e) {
721
+ var t = [
722
+ "th",
723
+ "st",
724
+ "nd",
725
+ "rd"
726
+ ], n = e % 100;
727
+ return "[" + e + (t[(n - 20) % 10] || t[n] || t[0]) + "]";
728
+ }
729
+ }, _ = function(e, t, n) {
730
+ var r = String(e);
731
+ return !r || r.length >= t ? e : "" + Array(t + 1 - r.length).join(n) + e;
732
+ }, v = {
733
+ s: _,
734
+ z: function(e) {
735
+ var t = -e.utcOffset(), n = Math.abs(t), r = Math.floor(n / 60), i = n % 60;
736
+ return (t <= 0 ? "+" : "-") + _(r, 2, "0") + ":" + _(i, 2, "0");
737
+ },
738
+ m: function e(t, n) {
739
+ if (t.date() < n.date()) return -e(n, t);
740
+ var r = 12 * (n.year() - t.year()) + (n.month() - t.month()), i = t.clone().add(r, l), a = n - i < 0, o = t.clone().add(r + (a ? -1 : 1), l);
741
+ return +(-(r + (n - i) / (a ? i - o : o - i)) || 0);
742
+ },
743
+ a: function(e) {
744
+ return e < 0 ? Math.ceil(e) || 0 : Math.floor(e);
745
+ },
746
+ p: function(e) {
747
+ return {
748
+ M: l,
749
+ y: d,
750
+ w: c,
751
+ d: s,
752
+ D: f,
753
+ h: o,
754
+ m: a,
755
+ s: i,
756
+ ms: r,
757
+ Q: u
758
+ }[e] || String(e || "").toLowerCase().replace(/s$/, "");
759
+ },
760
+ u: function(e) {
761
+ return e === void 0;
762
+ }
763
+ }, y = "en", b = {};
764
+ b[y] = g;
765
+ var x = "$isDayjsObject", S = function(e) {
766
+ return e instanceof E || !(!e || !e[x]);
767
+ }, C = function e(t, n, r) {
768
+ var i;
769
+ if (!t) return y;
770
+ if (typeof t == "string") {
771
+ var a = t.toLowerCase();
772
+ b[a] && (i = a), n && (b[a] = n, i = a);
773
+ var o = t.split("-");
774
+ if (!i && o.length > 1) return e(o[0]);
775
+ } else {
776
+ var s = t.name;
777
+ b[s] = t, i = s;
778
+ }
779
+ return !r && i && (y = i), i || !r && y;
780
+ }, w = function(e, t) {
781
+ if (S(e)) return e.clone();
782
+ var n = typeof t == "object" ? t : {};
783
+ return n.date = e, n.args = arguments, new E(n);
784
+ }, T = v;
785
+ T.l = C, T.i = S, T.w = function(e, t) {
786
+ return w(e, {
787
+ locale: t.$L,
788
+ utc: t.$u,
789
+ x: t.$x,
790
+ $offset: t.$offset
791
+ });
792
+ };
793
+ var E = function() {
794
+ function g(e) {
795
+ this.$L = C(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[x] = !0;
796
+ }
797
+ var _ = g.prototype;
798
+ return _.parse = function(e) {
799
+ this.$d = function(e) {
800
+ var t = e.date, n = e.utc;
801
+ if (t === null) return /* @__PURE__ */ new Date(NaN);
802
+ if (T.u(t)) return /* @__PURE__ */ new Date();
803
+ if (t instanceof Date) return new Date(t);
804
+ if (typeof t == "string" && !/Z$/i.test(t)) {
805
+ var r = t.match(m);
806
+ if (r) {
807
+ var i = r[2] - 1 || 0, a = (r[7] || "0").substring(0, 3);
808
+ return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, a)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, a);
809
+ }
810
+ }
811
+ return new Date(t);
812
+ }(e), this.init();
813
+ }, _.init = function() {
814
+ var e = this.$d;
815
+ this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
816
+ }, _.$utils = function() {
817
+ return T;
818
+ }, _.isValid = function() {
819
+ return this.$d.toString() !== p;
820
+ }, _.isSame = function(e, t) {
821
+ var n = w(e);
822
+ return this.startOf(t) <= n && n <= this.endOf(t);
823
+ }, _.isAfter = function(e, t) {
824
+ return w(e) < this.startOf(t);
825
+ }, _.isBefore = function(e, t) {
826
+ return this.endOf(t) < w(e);
827
+ }, _.$g = function(e, t, n) {
828
+ return T.u(e) ? this[t] : this.set(n, e);
829
+ }, _.unix = function() {
830
+ return Math.floor(this.valueOf() / 1e3);
831
+ }, _.valueOf = function() {
832
+ return this.$d.getTime();
833
+ }, _.startOf = function(e, t) {
834
+ var n = this, r = !!T.u(t) || t, u = T.p(e), p = function(e, t) {
835
+ var i = T.w(n.$u ? Date.UTC(n.$y, t, e) : new Date(n.$y, t, e), n);
836
+ return r ? i : i.endOf(s);
837
+ }, m = function(e, t) {
838
+ return T.w(n.toDate()[e].apply(n.toDate("s"), (r ? [
839
+ 0,
840
+ 0,
841
+ 0,
842
+ 0
843
+ ] : [
844
+ 23,
845
+ 59,
846
+ 59,
847
+ 999
848
+ ]).slice(t)), n);
849
+ }, h = this.$W, g = this.$M, _ = this.$D, v = "set" + (this.$u ? "UTC" : "");
850
+ switch (u) {
851
+ case d: return r ? p(1, 0) : p(31, 11);
852
+ case l: return r ? p(1, g) : p(0, g + 1);
853
+ case c:
854
+ var y = this.$locale().weekStart || 0, b = (h < y ? h + 7 : h) - y;
855
+ return p(r ? _ - b : _ + (6 - b), g);
856
+ case s:
857
+ case f: return m(v + "Hours", 0);
858
+ case o: return m(v + "Minutes", 1);
859
+ case a: return m(v + "Seconds", 2);
860
+ case i: return m(v + "Milliseconds", 3);
861
+ default: return this.clone();
862
+ }
863
+ }, _.endOf = function(e) {
864
+ return this.startOf(e, !1);
865
+ }, _.$set = function(e, t) {
866
+ var n, c = T.p(e), u = "set" + (this.$u ? "UTC" : ""), p = (n = {}, n[s] = u + "Date", n[f] = u + "Date", n[l] = u + "Month", n[d] = u + "FullYear", n[o] = u + "Hours", n[a] = u + "Minutes", n[i] = u + "Seconds", n[r] = u + "Milliseconds", n)[c], m = c === s ? this.$D + (t - this.$W) : t;
867
+ if (c === l || c === d) {
868
+ var h = this.clone().set(f, 1);
869
+ h.$d[p](m), h.init(), this.$d = h.set(f, Math.min(this.$D, h.daysInMonth())).$d;
870
+ } else p && this.$d[p](m);
871
+ return this.init(), this;
872
+ }, _.set = function(e, t) {
873
+ return this.clone().$set(e, t);
874
+ }, _.get = function(e) {
875
+ return this[T.p(e)]();
876
+ }, _.add = function(r, u) {
877
+ var f, p = this;
878
+ r = Number(r);
879
+ var m = T.p(u), h = function(e) {
880
+ var t = w(p);
881
+ return T.w(t.date(t.date() + Math.round(e * r)), p);
882
+ };
883
+ if (m === l) return this.set(l, this.$M + r);
884
+ if (m === d) return this.set(d, this.$y + r);
885
+ if (m === s) return h(1);
886
+ if (m === c) return h(7);
887
+ var g = (f = {}, f[a] = t, f[o] = n, f[i] = e, f)[m] || 1, _ = this.$d.getTime() + r * g;
888
+ return T.w(_, this);
889
+ }, _.subtract = function(e, t) {
890
+ return this.add(-1 * e, t);
891
+ }, _.format = function(e) {
892
+ var t = this, n = this.$locale();
893
+ if (!this.isValid()) return n.invalidDate || p;
894
+ var r = e || "YYYY-MM-DDTHH:mm:ssZ", i = T.z(this), a = this.$H, o = this.$m, s = this.$M, c = n.weekdays, l = n.months, u = n.meridiem, d = function(e, n, i, a) {
895
+ return e && (e[n] || e(t, r)) || i[n].slice(0, a);
896
+ }, f = function(e) {
897
+ return T.s(a % 12 || 12, e, "0");
898
+ }, m = u || function(e, t, n) {
899
+ var r = e < 12 ? "AM" : "PM";
900
+ return n ? r.toLowerCase() : r;
901
+ };
902
+ return r.replace(h, (function(e, r) {
903
+ return r || function(e) {
904
+ switch (e) {
905
+ case "YY": return String(t.$y).slice(-2);
906
+ case "YYYY": return T.s(t.$y, 4, "0");
907
+ case "M": return s + 1;
908
+ case "MM": return T.s(s + 1, 2, "0");
909
+ case "MMM": return d(n.monthsShort, s, l, 3);
910
+ case "MMMM": return d(l, s);
911
+ case "D": return t.$D;
912
+ case "DD": return T.s(t.$D, 2, "0");
913
+ case "d": return String(t.$W);
914
+ case "dd": return d(n.weekdaysMin, t.$W, c, 2);
915
+ case "ddd": return d(n.weekdaysShort, t.$W, c, 3);
916
+ case "dddd": return c[t.$W];
917
+ case "H": return String(a);
918
+ case "HH": return T.s(a, 2, "0");
919
+ case "h": return f(1);
920
+ case "hh": return f(2);
921
+ case "a": return m(a, o, !0);
922
+ case "A": return m(a, o, !1);
923
+ case "m": return String(o);
924
+ case "mm": return T.s(o, 2, "0");
925
+ case "s": return String(t.$s);
926
+ case "ss": return T.s(t.$s, 2, "0");
927
+ case "SSS": return T.s(t.$ms, 3, "0");
928
+ case "Z": return i;
929
+ }
930
+ return null;
931
+ }(e) || i.replace(":", "");
932
+ }));
933
+ }, _.utcOffset = function() {
934
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
935
+ }, _.diff = function(r, f, p) {
936
+ var m, h = this, g = T.p(f), _ = w(r), v = (_.utcOffset() - this.utcOffset()) * t, y = this - _, b = function() {
937
+ return T.m(h, _);
938
+ };
939
+ switch (g) {
940
+ case d:
941
+ m = b() / 12;
942
+ break;
943
+ case l:
944
+ m = b();
945
+ break;
946
+ case u:
947
+ m = b() / 3;
948
+ break;
949
+ case c:
950
+ m = (y - v) / 6048e5;
951
+ break;
952
+ case s:
953
+ m = (y - v) / 864e5;
954
+ break;
955
+ case o:
956
+ m = y / n;
957
+ break;
958
+ case a:
959
+ m = y / t;
960
+ break;
961
+ case i:
962
+ m = y / e;
963
+ break;
964
+ default: m = y;
965
+ }
966
+ return p ? m : T.a(m);
967
+ }, _.daysInMonth = function() {
968
+ return this.endOf(l).$D;
969
+ }, _.$locale = function() {
970
+ return b[this.$L];
971
+ }, _.locale = function(e, t) {
972
+ if (!e) return this.$L;
973
+ var n = this.clone(), r = C(e, t, !0);
974
+ return r && (n.$L = r), n;
975
+ }, _.clone = function() {
976
+ return T.w(this.$d, this);
977
+ }, _.toDate = function() {
978
+ return new Date(this.valueOf());
979
+ }, _.toJSON = function() {
980
+ return this.isValid() ? this.toISOString() : null;
981
+ }, _.toISOString = function() {
982
+ return this.$d.toISOString();
983
+ }, _.toString = function() {
984
+ return this.$d.toUTCString();
985
+ }, g;
986
+ }(), D = E.prototype;
987
+ return w.prototype = D, [
988
+ ["$ms", r],
989
+ ["$s", i],
990
+ ["$m", a],
991
+ ["$H", o],
992
+ ["$W", s],
993
+ ["$M", l],
994
+ ["$y", d],
995
+ ["$D", f]
996
+ ].forEach((function(e) {
997
+ D[e[1]] = function(t) {
998
+ return this.$g(t, e[0], e[1]);
999
+ };
1000
+ })), w.extend = function(e, t) {
1001
+ return e.$i ||= (e(t, E, w), !0), w;
1002
+ }, w.locale = C, w.isDayjs = S, w.unix = function(e) {
1003
+ return w(1e3 * e);
1004
+ }, w.en = b[y], w.Ls = b, w.p = {}, w;
1005
+ }));
1006
+ })), fr = /* @__PURE__ */ t(((e) => {
1007
+ var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
1008
+ function r(e, n, r) {
1009
+ var i = null;
1010
+ if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) for (var a in r = {}, n) a !== "key" && (r[a] = n[a]);
1011
+ else r = n;
1012
+ return n = r.ref, {
1013
+ $$typeof: t,
1014
+ type: e,
1015
+ key: i,
1016
+ ref: n === void 0 ? null : n,
1017
+ props: r
1018
+ };
1019
+ }
1020
+ e.Fragment = n, e.jsx = r, e.jsxs = r;
1021
+ })), pr = /* @__PURE__ */ t(((e) => {
1022
+ process.env.NODE_ENV !== "production" && (function() {
1023
+ function t(e) {
1024
+ if (e == null) return null;
1025
+ if (typeof e == "function") return e.$$typeof === O ? null : e.displayName || e.name || null;
1026
+ if (typeof e == "string") return e;
1027
+ switch (e) {
1028
+ case v: return "Fragment";
1029
+ case b: return "Profiler";
1030
+ case y: return "StrictMode";
1031
+ case w: return "Suspense";
1032
+ case T: return "SuspenseList";
1033
+ case ee: return "Activity";
1034
+ }
1035
+ if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
1036
+ case _: return "Portal";
1037
+ case S: return e.displayName || "Context";
1038
+ case x: return (e._context.displayName || "Context") + ".Consumer";
1039
+ case C:
1040
+ var n = e.render;
1041
+ return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
1042
+ case E: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
1043
+ case D:
1044
+ n = e._payload, e = e._init;
1045
+ try {
1046
+ return t(e(n));
1047
+ } catch {}
1048
+ }
1049
+ return null;
1050
+ }
1051
+ function n(e) {
1052
+ return "" + e;
1053
+ }
1054
+ function i(e) {
1055
+ try {
1056
+ n(e);
1057
+ var t = !1;
1058
+ } catch {
1059
+ t = !0;
1060
+ }
1061
+ if (t) {
1062
+ t = console;
1063
+ var r = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
1064
+ return r.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), n(e);
1065
+ }
1066
+ }
1067
+ function a(e) {
1068
+ if (e === v) return "<>";
1069
+ if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
1070
+ try {
1071
+ var n = t(e);
1072
+ return n ? "<" + n + ">" : "<...>";
1073
+ } catch {
1074
+ return "<...>";
1075
+ }
1076
+ }
1077
+ function o() {
1078
+ var e = k.A;
1079
+ return e === null ? null : e.getOwner();
1080
+ }
1081
+ function s() {
1082
+ return Error("react-stack-top-frame");
1083
+ }
1084
+ function c(e) {
1085
+ if (A.call(e, "key")) {
1086
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
1087
+ if (t && t.isReactWarning) return !1;
1088
+ }
1089
+ return e.key !== void 0;
1090
+ }
1091
+ function l(e, t) {
1092
+ function n() {
1093
+ te || (te = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
1094
+ }
1095
+ n.isReactWarning = !0, Object.defineProperty(e, "key", {
1096
+ get: n,
1097
+ configurable: !0
1098
+ });
1099
+ }
1100
+ function u() {
1101
+ var e = t(this.type);
1102
+ return ne[e] || (ne[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
1103
+ }
1104
+ function d(e, t, n, r, i, a) {
1105
+ var o = n.ref;
1106
+ return e = {
1107
+ $$typeof: g,
1108
+ type: e,
1109
+ key: t,
1110
+ props: n,
1111
+ _owner: r
1112
+ }, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
1113
+ enumerable: !1,
1114
+ value: null
1115
+ }) : Object.defineProperty(e, "ref", {
1116
+ enumerable: !1,
1117
+ get: u
1118
+ }), e._store = {}, Object.defineProperty(e._store, "validated", {
1119
+ configurable: !1,
1120
+ enumerable: !1,
1121
+ writable: !0,
1122
+ value: 0
1123
+ }), Object.defineProperty(e, "_debugInfo", {
1124
+ configurable: !1,
1125
+ enumerable: !1,
1126
+ writable: !0,
1127
+ value: null
1128
+ }), Object.defineProperty(e, "_debugStack", {
1129
+ configurable: !1,
1130
+ enumerable: !1,
1131
+ writable: !0,
1132
+ value: i
1133
+ }), Object.defineProperty(e, "_debugTask", {
1134
+ configurable: !1,
1135
+ enumerable: !1,
1136
+ writable: !0,
1137
+ value: a
1138
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
1139
+ }
1140
+ function f(e, n, r, a, s, u) {
1141
+ var f = n.children;
1142
+ if (f !== void 0) if (a) if (j(f)) {
1143
+ for (a = 0; a < f.length; a++) p(f[a]);
1144
+ Object.freeze && Object.freeze(f);
1145
+ } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1146
+ else p(f);
1147
+ if (A.call(n, "key")) {
1148
+ f = t(e);
1149
+ var m = Object.keys(n).filter(function(e) {
1150
+ return e !== "key";
1151
+ });
1152
+ a = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", ae[f + a] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", a, f, m, f), ae[f + a] = !0);
1153
+ }
1154
+ if (f = null, r !== void 0 && (i(r), f = "" + r), c(n) && (i(n.key), f = "" + n.key), "key" in n) for (var h in r = {}, n) h !== "key" && (r[h] = n[h]);
1155
+ else r = n;
1156
+ return f && l(r, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), d(e, f, r, o(), s, u);
1157
+ }
1158
+ function p(e) {
1159
+ m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === D && (e._payload.status === "fulfilled" ? m(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
1160
+ }
1161
+ function m(e) {
1162
+ return typeof e == "object" && !!e && e.$$typeof === g;
1163
+ }
1164
+ var h = r(), g = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), ee = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), k = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, j = Array.isArray, M = console.createTask ? console.createTask : function() {
1165
+ return null;
1166
+ };
1167
+ h = { react_stack_bottom_frame: function(e) {
1168
+ return e();
1169
+ } };
1170
+ var te, ne = {}, re = h.react_stack_bottom_frame.bind(h, s)(), ie = M(a(s)), ae = {};
1171
+ e.Fragment = v, e.jsx = function(e, t, n) {
1172
+ var r = 1e4 > k.recentlyCreatedOwnerStacks++;
1173
+ return f(e, t, n, !1, r ? Error("react-stack-top-frame") : re, r ? M(a(e)) : ie);
1174
+ }, e.jsxs = function(e, t, n) {
1175
+ var r = 1e4 > k.recentlyCreatedOwnerStacks++;
1176
+ return f(e, t, n, !0, r ? Error("react-stack-top-frame") : re, r ? M(a(e)) : ie);
1177
+ };
1178
+ })();
1179
+ })), mr = /* @__PURE__ */ t(((e, t) => {
1180
+ process.env.NODE_ENV === "production" ? t.exports = fr() : t.exports = pr();
1181
+ })), hr = /* @__PURE__ */ e(c()), W = /* @__PURE__ */ e(r()), G = mr(), gr = (0, W.memo)((e) => /* @__PURE__ */ (0, G.jsx)("svg", {
1182
+ xmlns: "http://www.w3.org/2000/svg",
1183
+ width: "14",
1184
+ height: "14",
1185
+ viewBox: "0 0 1024 1024",
1186
+ fill: "currentColor",
1187
+ ...e,
1188
+ children: /* @__PURE__ */ (0, G.jsx)("path", { d: "M724.48 521.728c-1.8432 7.7824-5.7344 14.848-11.3664 20.48l-341.9136 342.016c-16.6912 16.6912-43.7248 16.6912-60.3136 0s-16.6912-43.7248 0-60.3136L622.6944 512 310.8864 200.0896c-16.6912-16.6912-16.6912-43.7248 0-60.3136 16.6912-16.6912 43.7248-16.6912 60.3136 0l341.9136 341.9136c10.8544 10.8544 14.6432 26.112 11.3664 40.0384z" })
1189
+ })), _r = (0, W.memo)((e) => /* @__PURE__ */ (0, G.jsx)("svg", {
1190
+ xmlns: "http://www.w3.org/2000/svg",
1191
+ width: "18",
1192
+ height: "18",
1193
+ viewBox: "0 0 1024 1024",
1194
+ fill: "currentColor",
1195
+ ...e,
1196
+ children: /* @__PURE__ */ (0, G.jsx)("path", { d: "M298.667 256V128a42.667 42.667 0 0 1 42.666-42.667h512A42.667 42.667 0 0 1 896 128v597.333A42.667 42.667 0 0 1 853.333 768h-128v128c0 23.552-19.2 42.667-42.965 42.667H170.965A42.71 42.71 0 0 1 128 896l.128-597.333c0-23.552 19.2-42.667 42.923-42.667h127.616zm-85.248 85.333-.086 512H640v-512H213.419zM384 256h341.333v426.667h85.334v-512H384V256z" })
1197
+ }));
1198
+ //#endregion
1199
+ //#region node_modules/.pnpm/dompurify@3.4.3/node_modules/dompurify/dist/purify.es.mjs
1200
+ function vr(e, t) {
1201
+ (t == null || t > e.length) && (t = e.length);
1202
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
1203
+ return r;
1204
+ }
1205
+ function yr(e) {
1206
+ if (Array.isArray(e)) return e;
1207
+ }
1208
+ function br(e, t) {
1209
+ var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1210
+ if (n != null) {
1211
+ var r, i, a, o, s = [], c = !0, l = !1;
1212
+ try {
1213
+ if (a = (n = n.call(e)).next, t !== 0) for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
1214
+ } catch (e) {
1215
+ l = !0, i = e;
1216
+ } finally {
1217
+ try {
1218
+ if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
1219
+ } finally {
1220
+ if (l) throw i;
1221
+ }
1222
+ }
1223
+ return s;
1224
+ }
1225
+ }
1226
+ function xr() {
1227
+ throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1228
+ }
1229
+ function Sr(e, t) {
1230
+ return yr(e) || br(e, t) || Cr(e, t) || xr();
1231
+ }
1232
+ function Cr(e, t) {
1233
+ if (e) {
1234
+ if (typeof e == "string") return vr(e, t);
1235
+ var n = {}.toString.call(e).slice(8, -1);
1236
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? vr(e, t) : void 0;
1237
+ }
1238
+ }
1239
+ var wr = Object.entries, Tr = Object.setPrototypeOf, Er = Object.isFrozen, Dr = Object.getPrototypeOf, Or = Object.getOwnPropertyDescriptor, K = Object.freeze, q = Object.seal, kr = Object.create, Ar = typeof Reflect < "u" && Reflect, jr = Ar.apply, Mr = Ar.construct;
1240
+ K ||= function(e) {
1241
+ return e;
1242
+ }, q ||= function(e) {
1243
+ return e;
1244
+ }, jr ||= function(e, t) {
1245
+ var n = [...arguments].slice(2);
1246
+ return e.apply(t, n);
1247
+ }, Mr ||= function(e) {
1248
+ return new e(...[...arguments].slice(1));
1249
+ };
1250
+ var Nr = Z(Array.prototype.forEach), Pr = Z(Array.prototype.lastIndexOf), Fr = Z(Array.prototype.pop), Ir = Z(Array.prototype.push), Lr = Z(Array.prototype.splice), J = Array.isArray, Rr = Z(String.prototype.toLowerCase), zr = Z(String.prototype.toString), Br = Z(String.prototype.match), Vr = Z(String.prototype.replace), Hr = Z(String.prototype.indexOf), Ur = Z(String.prototype.trim), Wr = Z(Number.prototype.toString), Gr = Z(Boolean.prototype.toString), Kr = typeof BigInt > "u" ? null : Z(BigInt.prototype.toString), qr = typeof Symbol > "u" ? null : Z(Symbol.prototype.toString), Y = Z(Object.prototype.hasOwnProperty), Jr = Z(Object.prototype.toString), X = Z(RegExp.prototype.test), Yr = Xr(TypeError);
1251
+ function Z(e) {
1252
+ return function(t) {
1253
+ t instanceof RegExp && (t.lastIndex = 0);
1254
+ var n = [...arguments].slice(1);
1255
+ return jr(e, t, n);
1256
+ };
1257
+ }
1258
+ function Xr(e) {
1259
+ return function() {
1260
+ return Mr(e, [...arguments]);
1261
+ };
1262
+ }
1263
+ function Q(e, t) {
1264
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Rr;
1265
+ if (Tr && Tr(e, null), !J(t)) return e;
1266
+ let r = t.length;
1267
+ for (; r--;) {
1268
+ let i = t[r];
1269
+ if (typeof i == "string") {
1270
+ let e = n(i);
1271
+ e !== i && (Er(t) || (t[r] = e), i = e);
1272
+ }
1273
+ e[i] = !0;
1274
+ }
1275
+ return e;
1276
+ }
1277
+ function Zr(e) {
1278
+ for (let t = 0; t < e.length; t++) Y(e, t) || (e[t] = null);
1279
+ return e;
1280
+ }
1281
+ function $(e) {
1282
+ let t = kr(null);
1283
+ for (let r of wr(e)) {
1284
+ var n = Sr(r, 2);
1285
+ let i = n[0], a = n[1];
1286
+ Y(e, i) && (J(a) ? t[i] = Zr(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = $(a) : t[i] = a);
1287
+ }
1288
+ return t;
1289
+ }
1290
+ function Qr(e) {
1291
+ switch (typeof e) {
1292
+ case "string": return e;
1293
+ case "number": return Wr(e);
1294
+ case "boolean": return Gr(e);
1295
+ case "bigint": return Kr ? Kr(e) : "0";
1296
+ case "symbol": return qr ? qr(e) : "Symbol()";
1297
+ case "undefined": return Jr(e);
1298
+ case "function":
1299
+ case "object": {
1300
+ if (e === null) return Jr(e);
1301
+ let t = e, n = $r(t, "toString");
1302
+ if (typeof n == "function") {
1303
+ let e = n(t);
1304
+ return typeof e == "string" ? e : Jr(e);
1305
+ }
1306
+ return Jr(e);
1307
+ }
1308
+ default: return Jr(e);
1309
+ }
1310
+ }
1311
+ function $r(e, t) {
1312
+ for (; e !== null;) {
1313
+ let n = Or(e, t);
1314
+ if (n) {
1315
+ if (n.get) return Z(n.get);
1316
+ if (typeof n.value == "function") return Z(n.value);
1317
+ }
1318
+ e = Dr(e);
1319
+ }
1320
+ function n() {
1321
+ return null;
1322
+ }
1323
+ return n;
1324
+ }
1325
+ function ei(e) {
1326
+ try {
1327
+ return X(e, ""), !0;
1328
+ } catch {
1329
+ return !1;
1330
+ }
1331
+ }
1332
+ var ti = K(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), ni = K(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), ri = K([
1333
+ "feBlend",
1334
+ "feColorMatrix",
1335
+ "feComponentTransfer",
1336
+ "feComposite",
1337
+ "feConvolveMatrix",
1338
+ "feDiffuseLighting",
1339
+ "feDisplacementMap",
1340
+ "feDistantLight",
1341
+ "feDropShadow",
1342
+ "feFlood",
1343
+ "feFuncA",
1344
+ "feFuncB",
1345
+ "feFuncG",
1346
+ "feFuncR",
1347
+ "feGaussianBlur",
1348
+ "feImage",
1349
+ "feMerge",
1350
+ "feMergeNode",
1351
+ "feMorphology",
1352
+ "feOffset",
1353
+ "fePointLight",
1354
+ "feSpecularLighting",
1355
+ "feSpotLight",
1356
+ "feTile",
1357
+ "feTurbulence"
1358
+ ]), ii = K([
1359
+ "animate",
1360
+ "color-profile",
1361
+ "cursor",
1362
+ "discard",
1363
+ "font-face",
1364
+ "font-face-format",
1365
+ "font-face-name",
1366
+ "font-face-src",
1367
+ "font-face-uri",
1368
+ "foreignobject",
1369
+ "hatch",
1370
+ "hatchpath",
1371
+ "mesh",
1372
+ "meshgradient",
1373
+ "meshpatch",
1374
+ "meshrow",
1375
+ "missing-glyph",
1376
+ "script",
1377
+ "set",
1378
+ "solidcolor",
1379
+ "unknown",
1380
+ "use"
1381
+ ]), ai = K(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), oi = K([
1382
+ "maction",
1383
+ "maligngroup",
1384
+ "malignmark",
1385
+ "mlongdiv",
1386
+ "mscarries",
1387
+ "mscarry",
1388
+ "msgroup",
1389
+ "mstack",
1390
+ "msline",
1391
+ "msrow",
1392
+ "semantics",
1393
+ "annotation",
1394
+ "annotation-xml",
1395
+ "mprescripts",
1396
+ "none"
1397
+ ]), si = K(["#text"]), ci = K(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), li = K(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), ui = K(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), di = K([
1398
+ "xlink:href",
1399
+ "xml:id",
1400
+ "xlink:title",
1401
+ "xml:space",
1402
+ "xmlns:xlink"
1403
+ ]), fi = q(/{{[\w\W]*|^[\w\W]*}}/g), pi = q(/<%[\w\W]*|^[\w\W]*%>/g), mi = q(/\${[\w\W]*/g), hi = q(/^data-[\-\w.\u00B7-\uFFFF]+$/), gi = q(/^aria-[\-\w]+$/), _i = q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), vi = q(/^(?:\w+script|data):/i), yi = q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), bi = q(/^html$/i), xi = q(/^[a-z][.\w]*(-[.\w]+)+$/i), Si = {
1404
+ element: 1,
1405
+ text: 3,
1406
+ progressingInstruction: 7,
1407
+ comment: 8,
1408
+ document: 9
1409
+ }, Ci = function() {
1410
+ return typeof window > "u" ? null : window;
1411
+ }, wi = function(e, t) {
1412
+ if (typeof e != "object" || typeof e.createPolicy != "function") return null;
1413
+ let n = null, r = "data-tt-policy-suffix";
1414
+ t && t.hasAttribute(r) && (n = t.getAttribute(r));
1415
+ let i = "dompurify" + (n ? "#" + n : "");
1416
+ try {
1417
+ return e.createPolicy(i, {
1418
+ createHTML(e) {
1419
+ return e;
1420
+ },
1421
+ createScriptURL(e) {
1422
+ return e;
1423
+ }
1424
+ });
1425
+ } catch {
1426
+ return console.warn("TrustedTypes policy " + i + " could not be created."), null;
1427
+ }
1428
+ }, Ti = function() {
1429
+ return {
1430
+ afterSanitizeAttributes: [],
1431
+ afterSanitizeElements: [],
1432
+ afterSanitizeShadowDOM: [],
1433
+ beforeSanitizeAttributes: [],
1434
+ beforeSanitizeElements: [],
1435
+ beforeSanitizeShadowDOM: [],
1436
+ uponSanitizeAttribute: [],
1437
+ uponSanitizeElement: [],
1438
+ uponSanitizeShadowNode: []
1439
+ };
1440
+ };
1441
+ function Ei() {
1442
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ci(), t = (e) => Ei(e);
1443
+ if (t.version = "3.4.3", t.removed = [], !e || !e.document || e.document.nodeType !== Si.document || !e.Element) return t.isSupported = !1, t;
1444
+ let n = e.document, r = n, i = r.currentScript, a = e.DocumentFragment, o = e.HTMLTemplateElement, s = e.Node, c = e.Element, l = e.NodeFilter, u = e.NamedNodeMap, d = u === void 0 ? e.NamedNodeMap || e.MozNamedAttrMap : u, f = e.HTMLFormElement, p = e.DOMParser, m = e.trustedTypes, h = c.prototype, g = $r(h, "cloneNode"), _ = $r(h, "remove"), v = $r(h, "nextSibling"), y = $r(h, "childNodes"), b = $r(h, "parentNode");
1445
+ if (typeof o == "function") {
1446
+ let e = n.createElement("template");
1447
+ e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
1448
+ }
1449
+ let x, S = "", C = n, w = C.implementation, T = C.createNodeIterator, E = C.createDocumentFragment, D = C.getElementsByTagName, ee = r.importNode, O = Ti();
1450
+ t.isSupported = typeof wr == "function" && typeof b == "function" && w && w.createHTMLDocument !== void 0;
1451
+ let k = fi, A = pi, j = mi, M = hi, te = gi, ne = vi, re = yi, ie = xi, ae = _i, N = null, oe = Q({}, [
1452
+ ...ti,
1453
+ ...ni,
1454
+ ...ri,
1455
+ ...ai,
1456
+ ...si
1457
+ ]), P = null, se = Q({}, [
1458
+ ...ci,
1459
+ ...li,
1460
+ ...ui,
1461
+ ...di
1462
+ ]), F = Object.seal(kr(null, {
1463
+ tagNameCheck: {
1464
+ writable: !0,
1465
+ configurable: !1,
1466
+ enumerable: !0,
1467
+ value: null
1468
+ },
1469
+ attributeNameCheck: {
1470
+ writable: !0,
1471
+ configurable: !1,
1472
+ enumerable: !0,
1473
+ value: null
1474
+ },
1475
+ allowCustomizedBuiltInElements: {
1476
+ writable: !0,
1477
+ configurable: !1,
1478
+ enumerable: !0,
1479
+ value: !1
1480
+ }
1481
+ })), ce = null, le = null, ue = Object.seal(kr(null, {
1482
+ tagCheck: {
1483
+ writable: !0,
1484
+ configurable: !1,
1485
+ enumerable: !0,
1486
+ value: null
1487
+ },
1488
+ attributeCheck: {
1489
+ writable: !0,
1490
+ configurable: !1,
1491
+ enumerable: !0,
1492
+ value: null
1493
+ }
1494
+ })), de = !0, fe = !0, pe = !1, me = !0, he = !1, ge = !0, I = !1, _e = !1, ve = !1, ye = !1, be = !1, xe = !1, Se = !0, Ce = !1, we = "user-content-", Te = !0, Ee = !1, De = {}, L = null, Oe = Q({}, [
1495
+ "annotation-xml",
1496
+ "audio",
1497
+ "colgroup",
1498
+ "desc",
1499
+ "foreignobject",
1500
+ "head",
1501
+ "iframe",
1502
+ "math",
1503
+ "mi",
1504
+ "mn",
1505
+ "mo",
1506
+ "ms",
1507
+ "mtext",
1508
+ "noembed",
1509
+ "noframes",
1510
+ "noscript",
1511
+ "plaintext",
1512
+ "script",
1513
+ "style",
1514
+ "svg",
1515
+ "template",
1516
+ "thead",
1517
+ "title",
1518
+ "video",
1519
+ "xmp"
1520
+ ]), ke = null, Ae = Q({}, [
1521
+ "audio",
1522
+ "video",
1523
+ "img",
1524
+ "source",
1525
+ "image",
1526
+ "track"
1527
+ ]), je = null, Me = Q({}, [
1528
+ "alt",
1529
+ "class",
1530
+ "for",
1531
+ "id",
1532
+ "label",
1533
+ "name",
1534
+ "pattern",
1535
+ "placeholder",
1536
+ "role",
1537
+ "summary",
1538
+ "title",
1539
+ "value",
1540
+ "style",
1541
+ "xmlns"
1542
+ ]), Ne = "http://www.w3.org/1998/Math/MathML", Pe = "http://www.w3.org/2000/svg", R = "http://www.w3.org/1999/xhtml", Fe = R, Ie = !1, Le = null, Re = Q({}, [
1543
+ Ne,
1544
+ Pe,
1545
+ R
1546
+ ], zr), ze = Q({}, [
1547
+ "mi",
1548
+ "mo",
1549
+ "mn",
1550
+ "ms",
1551
+ "mtext"
1552
+ ]), Be = Q({}, ["annotation-xml"]), Ve = Q({}, [
1553
+ "title",
1554
+ "style",
1555
+ "font",
1556
+ "a",
1557
+ "script"
1558
+ ]), He = null, Ue = ["application/xhtml+xml", "text/html"], z = null, B = null, We = n.createElement("form"), Ge = function(e) {
1559
+ return e instanceof RegExp || e instanceof Function;
1560
+ }, Ke = function() {
1561
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1562
+ if (B && B === e) return;
1563
+ (!e || typeof e != "object") && (e = {}), e = $(e), He = Ue.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, z = He === "application/xhtml+xml" ? zr : Rr, N = Y(e, "ALLOWED_TAGS") && J(e.ALLOWED_TAGS) ? Q({}, e.ALLOWED_TAGS, z) : oe, P = Y(e, "ALLOWED_ATTR") && J(e.ALLOWED_ATTR) ? Q({}, e.ALLOWED_ATTR, z) : se, Le = Y(e, "ALLOWED_NAMESPACES") && J(e.ALLOWED_NAMESPACES) ? Q({}, e.ALLOWED_NAMESPACES, zr) : Re, je = Y(e, "ADD_URI_SAFE_ATTR") && J(e.ADD_URI_SAFE_ATTR) ? Q($(Me), e.ADD_URI_SAFE_ATTR, z) : Me, ke = Y(e, "ADD_DATA_URI_TAGS") && J(e.ADD_DATA_URI_TAGS) ? Q($(Ae), e.ADD_DATA_URI_TAGS, z) : Ae, L = Y(e, "FORBID_CONTENTS") && J(e.FORBID_CONTENTS) ? Q({}, e.FORBID_CONTENTS, z) : Oe, ce = Y(e, "FORBID_TAGS") && J(e.FORBID_TAGS) ? Q({}, e.FORBID_TAGS, z) : $({}), le = Y(e, "FORBID_ATTR") && J(e.FORBID_ATTR) ? Q({}, e.FORBID_ATTR, z) : $({}), De = Y(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? $(e.USE_PROFILES) : e.USE_PROFILES : !1, de = e.ALLOW_ARIA_ATTR !== !1, fe = e.ALLOW_DATA_ATTR !== !1, pe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, me = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, he = e.SAFE_FOR_TEMPLATES || !1, ge = e.SAFE_FOR_XML !== !1, I = e.WHOLE_DOCUMENT || !1, ye = e.RETURN_DOM || !1, be = e.RETURN_DOM_FRAGMENT || !1, xe = e.RETURN_TRUSTED_TYPE || !1, ve = e.FORCE_BODY || !1, Se = e.SANITIZE_DOM !== !1, Ce = e.SANITIZE_NAMED_PROPS || !1, Te = e.KEEP_CONTENT !== !1, Ee = e.IN_PLACE || !1, ae = ei(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : _i, Fe = typeof e.NAMESPACE == "string" ? e.NAMESPACE : R, ze = Y(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? $(e.MATHML_TEXT_INTEGRATION_POINTS) : Q({}, [
1564
+ "mi",
1565
+ "mo",
1566
+ "mn",
1567
+ "ms",
1568
+ "mtext"
1569
+ ]), Be = Y(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? $(e.HTML_INTEGRATION_POINTS) : Q({}, ["annotation-xml"]);
1570
+ let t = Y(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? $(e.CUSTOM_ELEMENT_HANDLING) : kr(null);
1571
+ if (F = kr(null), Y(t, "tagNameCheck") && Ge(t.tagNameCheck) && (F.tagNameCheck = t.tagNameCheck), Y(t, "attributeNameCheck") && Ge(t.attributeNameCheck) && (F.attributeNameCheck = t.attributeNameCheck), Y(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (F.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), he && (fe = !1), be && (ye = !0), De && (N = Q({}, si), P = kr(null), De.html === !0 && (Q(N, ti), Q(P, ci)), De.svg === !0 && (Q(N, ni), Q(P, li), Q(P, di)), De.svgFilters === !0 && (Q(N, ri), Q(P, li), Q(P, di)), De.mathMl === !0 && (Q(N, ai), Q(P, ui), Q(P, di))), ue.tagCheck = null, ue.attributeCheck = null, Y(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? ue.tagCheck = e.ADD_TAGS : J(e.ADD_TAGS) && (N === oe && (N = $(N)), Q(N, e.ADD_TAGS, z))), Y(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? ue.attributeCheck = e.ADD_ATTR : J(e.ADD_ATTR) && (P === se && (P = $(P)), Q(P, e.ADD_ATTR, z))), Y(e, "ADD_URI_SAFE_ATTR") && J(e.ADD_URI_SAFE_ATTR) && Q(je, e.ADD_URI_SAFE_ATTR, z), Y(e, "FORBID_CONTENTS") && J(e.FORBID_CONTENTS) && (L === Oe && (L = $(L)), Q(L, e.FORBID_CONTENTS, z)), Y(e, "ADD_FORBID_CONTENTS") && J(e.ADD_FORBID_CONTENTS) && (L === Oe && (L = $(L)), Q(L, e.ADD_FORBID_CONTENTS, z)), Te && (N["#text"] = !0), I && Q(N, [
1572
+ "html",
1573
+ "head",
1574
+ "body"
1575
+ ]), N.table && (Q(N, ["tbody"]), delete ce.tbody), e.TRUSTED_TYPES_POLICY) {
1576
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Yr("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1577
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Yr("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1578
+ x = e.TRUSTED_TYPES_POLICY, S = x.createHTML("");
1579
+ } else x === void 0 && (x = wi(m, i)), x !== null && typeof S == "string" && (S = x.createHTML(""));
1580
+ K && K(e), B = e;
1581
+ }, qe = Q({}, [
1582
+ ...ni,
1583
+ ...ri,
1584
+ ...ii
1585
+ ]), Je = Q({}, [...ai, ...oi]), Ye = function(e) {
1586
+ let t = b(e);
1587
+ (!t || !t.tagName) && (t = {
1588
+ namespaceURI: Fe,
1589
+ tagName: "template"
1590
+ });
1591
+ let n = Rr(e.tagName), r = Rr(t.tagName);
1592
+ return Le[e.namespaceURI] ? e.namespaceURI === Pe ? t.namespaceURI === R ? n === "svg" : t.namespaceURI === Ne ? n === "svg" && (r === "annotation-xml" || ze[r]) : !!qe[n] : e.namespaceURI === Ne ? t.namespaceURI === R ? n === "math" : t.namespaceURI === Pe ? n === "math" && Be[r] : !!Je[n] : e.namespaceURI === R ? t.namespaceURI === Pe && !Be[r] || t.namespaceURI === Ne && !ze[r] ? !1 : !Je[n] && (Ve[n] || !qe[n]) : !!(He === "application/xhtml+xml" && Le[e.namespaceURI]) : !1;
1593
+ }, Xe = function(e) {
1594
+ Ir(t.removed, { element: e });
1595
+ try {
1596
+ b(e).removeChild(e);
1597
+ } catch {
1598
+ _(e);
1599
+ }
1600
+ }, V = function(e, n) {
1601
+ try {
1602
+ Ir(t.removed, {
1603
+ attribute: n.getAttributeNode(e),
1604
+ from: n
1605
+ });
1606
+ } catch {
1607
+ Ir(t.removed, {
1608
+ attribute: null,
1609
+ from: n
1610
+ });
1611
+ }
1612
+ if (n.removeAttribute(e), e === "is") if (ye || be) try {
1613
+ Xe(n);
1614
+ } catch {}
1615
+ else try {
1616
+ n.setAttribute(e, "");
1617
+ } catch {}
1618
+ }, Ze = function(e) {
1619
+ let t = null, r = null;
1620
+ if (ve) e = "<remove></remove>" + e;
1621
+ else {
1622
+ let t = Br(e, /^[\r\n\t ]+/);
1623
+ r = t && t[0];
1624
+ }
1625
+ He === "application/xhtml+xml" && Fe === R && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1626
+ let i = x ? x.createHTML(e) : e;
1627
+ if (Fe === R) try {
1628
+ t = new p().parseFromString(i, He);
1629
+ } catch {}
1630
+ if (!t || !t.documentElement) {
1631
+ t = w.createDocument(Fe, "template", null);
1632
+ try {
1633
+ t.documentElement.innerHTML = Ie ? S : i;
1634
+ } catch {}
1635
+ }
1636
+ let a = t.body || t.documentElement;
1637
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Fe === R ? D.call(t, I ? "html" : "body")[0] : I ? t.documentElement : a;
1638
+ }, Qe = function(e) {
1639
+ return T.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
1640
+ }, $e = function(e) {
1641
+ return e instanceof f && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof d) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
1642
+ }, et = function(e) {
1643
+ return typeof s == "function" && e instanceof s;
1644
+ };
1645
+ function H(e, n, r) {
1646
+ Nr(e, (e) => {
1647
+ e.call(t, n, r, B);
1648
+ });
1649
+ }
1650
+ let tt = function(e) {
1651
+ let n = null;
1652
+ if (H(O.beforeSanitizeElements, e, null), $e(e)) return Xe(e), !0;
1653
+ let r = z(e.nodeName);
1654
+ if (H(O.uponSanitizeElement, e, {
1655
+ tagName: r,
1656
+ allowedTags: N
1657
+ }), ge && e.hasChildNodes() && !et(e.firstElementChild) && X(/<[/\w!]/g, e.innerHTML) && X(/<[/\w!]/g, e.textContent) || ge && e.namespaceURI === R && r === "style" && et(e.firstElementChild) || e.nodeType === Si.progressingInstruction || ge && e.nodeType === Si.comment && X(/<[/\w]/g, e.data)) return Xe(e), !0;
1658
+ if (ce[r] || !(ue.tagCheck instanceof Function && ue.tagCheck(r)) && !N[r]) {
1659
+ if (!ce[r] && it(r) && (F.tagNameCheck instanceof RegExp && X(F.tagNameCheck, r) || F.tagNameCheck instanceof Function && F.tagNameCheck(r))) return !1;
1660
+ if (Te && !L[r]) {
1661
+ let t = b(e) || e.parentNode, n = y(e) || e.childNodes;
1662
+ if (n && t) {
1663
+ let r = n.length;
1664
+ for (let i = r - 1; i >= 0; --i) {
1665
+ let r = g(n[i], !0);
1666
+ t.insertBefore(r, v(e));
1667
+ }
1668
+ }
1669
+ }
1670
+ return Xe(e), !0;
1671
+ }
1672
+ return e instanceof c && !Ye(e) || (r === "noscript" || r === "noembed" || r === "noframes") && X(/<\/no(script|embed|frames)/i, e.innerHTML) ? (Xe(e), !0) : (he && e.nodeType === Si.text && (n = e.textContent, Nr([
1673
+ k,
1674
+ A,
1675
+ j
1676
+ ], (e) => {
1677
+ n = Vr(n, e, " ");
1678
+ }), e.textContent !== n && (Ir(t.removed, { element: e.cloneNode() }), e.textContent = n)), H(O.afterSanitizeElements, e, null), !1);
1679
+ }, nt = function(e, t, r) {
1680
+ if (le[t] || Se && (t === "id" || t === "name") && (r in n || r in We)) return !1;
1681
+ let i = P[t] || ue.attributeCheck instanceof Function && ue.attributeCheck(t, e);
1682
+ if (!(fe && !le[t] && X(M, t)) && !(de && X(te, t))) {
1683
+ if (!i || le[t]) {
1684
+ if (!(it(e) && (F.tagNameCheck instanceof RegExp && X(F.tagNameCheck, e) || F.tagNameCheck instanceof Function && F.tagNameCheck(e)) && (F.attributeNameCheck instanceof RegExp && X(F.attributeNameCheck, t) || F.attributeNameCheck instanceof Function && F.attributeNameCheck(t, e)) || t === "is" && F.allowCustomizedBuiltInElements && (F.tagNameCheck instanceof RegExp && X(F.tagNameCheck, r) || F.tagNameCheck instanceof Function && F.tagNameCheck(r)))) return !1;
1685
+ } else if (!je[t] && !X(ae, Vr(r, re, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Hr(r, "data:") === 0 && ke[e]) && !(pe && !X(ne, Vr(r, re, ""))) && r) return !1;
1686
+ }
1687
+ return !0;
1688
+ }, rt = Q({}, [
1689
+ "annotation-xml",
1690
+ "color-profile",
1691
+ "font-face",
1692
+ "font-face-format",
1693
+ "font-face-name",
1694
+ "font-face-src",
1695
+ "font-face-uri",
1696
+ "missing-glyph"
1697
+ ]), it = function(e) {
1698
+ return !rt[Rr(e)] && X(ie, e);
1699
+ }, at = function(e) {
1700
+ H(O.beforeSanitizeAttributes, e, null);
1701
+ let n = e.attributes;
1702
+ if (!n || $e(e)) return;
1703
+ let r = {
1704
+ attrName: "",
1705
+ attrValue: "",
1706
+ keepAttr: !0,
1707
+ allowedAttributes: P,
1708
+ forceKeepAttr: void 0
1709
+ }, i = n.length;
1710
+ for (; i--;) {
1711
+ let a = n[i], o = a.name, s = a.namespaceURI, c = a.value, l = z(o), u = c, d = o === "value" ? u : Ur(u);
1712
+ if (r.attrName = l, r.attrValue = d, r.keepAttr = !0, r.forceKeepAttr = void 0, H(O.uponSanitizeAttribute, e, r), d = r.attrValue, Ce && (l === "id" || l === "name") && Hr(d, we) !== 0 && (V(o, e), d = we + d), ge && X(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
1713
+ V(o, e);
1714
+ continue;
1715
+ }
1716
+ if (l === "attributename" && Br(d, "href")) {
1717
+ V(o, e);
1718
+ continue;
1719
+ }
1720
+ if (r.forceKeepAttr) continue;
1721
+ if (!r.keepAttr) {
1722
+ V(o, e);
1723
+ continue;
1724
+ }
1725
+ if (!me && X(/\/>/i, d)) {
1726
+ V(o, e);
1727
+ continue;
1728
+ }
1729
+ he && Nr([
1730
+ k,
1731
+ A,
1732
+ j
1733
+ ], (e) => {
1734
+ d = Vr(d, e, " ");
1735
+ });
1736
+ let f = z(e.nodeName);
1737
+ if (!nt(f, l, d)) {
1738
+ V(o, e);
1739
+ continue;
1740
+ }
1741
+ if (x && typeof m == "object" && typeof m.getAttributeType == "function" && !s) switch (m.getAttributeType(f, l)) {
1742
+ case "TrustedHTML":
1743
+ d = x.createHTML(d);
1744
+ break;
1745
+ case "TrustedScriptURL":
1746
+ d = x.createScriptURL(d);
1747
+ break;
1748
+ }
1749
+ if (d !== u) try {
1750
+ s ? e.setAttributeNS(s, o, d) : e.setAttribute(o, d), $e(e) ? Xe(e) : Fr(t.removed);
1751
+ } catch {
1752
+ V(o, e);
1753
+ }
1754
+ }
1755
+ H(O.afterSanitizeAttributes, e, null);
1756
+ }, ot = function(e) {
1757
+ let t = null, n = Qe(e);
1758
+ for (H(O.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) H(O.uponSanitizeShadowNode, t, null), tt(t), at(t), t.content instanceof a && ot(t.content);
1759
+ H(O.afterSanitizeShadowDOM, e, null);
1760
+ }, st = function(e) {
1761
+ if (e.nodeType === Si.element && e.shadowRoot instanceof a) {
1762
+ let t = e.shadowRoot;
1763
+ st(t), ot(t);
1764
+ }
1765
+ let t = e.childNodes;
1766
+ if (!t) return;
1767
+ let n = [];
1768
+ Nr(t, (e) => {
1769
+ Ir(n, e);
1770
+ });
1771
+ for (let e of n) st(e);
1772
+ };
1773
+ return t.sanitize = function(e) {
1774
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, o = null, c = null, l = null;
1775
+ if (Ie = !e, Ie && (e = "<!-->"), typeof e != "string" && !et(e) && (e = Qr(e), typeof e != "string")) throw Yr("dirty is not a string, aborting");
1776
+ if (!t.isSupported) return e;
1777
+ if (_e || Ke(n), t.removed = [], typeof e == "string" && (Ee = !1), Ee) {
1778
+ let t = e.nodeName;
1779
+ if (typeof t == "string") {
1780
+ let e = z(t);
1781
+ if (!N[e] || ce[e]) throw Yr("root node is forbidden and cannot be sanitized in-place");
1782
+ }
1783
+ st(e);
1784
+ } else if (e instanceof s) i = Ze("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === Si.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o), st(o);
1785
+ else {
1786
+ if (!ye && !he && !I && e.indexOf("<") === -1) return x && xe ? x.createHTML(e) : e;
1787
+ if (i = Ze(e), !i) return ye ? null : xe ? S : "";
1788
+ }
1789
+ i && ve && Xe(i.firstChild);
1790
+ let u = Qe(Ee ? e : i);
1791
+ for (; c = u.nextNode();) tt(c), at(c), c.content instanceof a && ot(c.content);
1792
+ if (Ee) return e;
1793
+ if (ye) {
1794
+ if (he) {
1795
+ i.normalize();
1796
+ let e = i.innerHTML;
1797
+ Nr([
1798
+ k,
1799
+ A,
1800
+ j
1801
+ ], (t) => {
1802
+ e = Vr(e, t, " ");
1803
+ }), i.innerHTML = e;
1804
+ }
1805
+ if (be) for (l = E.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
1806
+ else l = i;
1807
+ return (P.shadowroot || P.shadowrootmode) && (l = ee.call(r, l, !0)), l;
1808
+ }
1809
+ let d = I ? i.outerHTML : i.innerHTML;
1810
+ return I && N["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && X(bi, i.ownerDocument.doctype.name) && (d = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + d), he && Nr([
1811
+ k,
1812
+ A,
1813
+ j
1814
+ ], (e) => {
1815
+ d = Vr(d, e, " ");
1816
+ }), x && xe ? x.createHTML(d) : d;
1817
+ }, t.setConfig = function() {
1818
+ Ke(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), _e = !0;
1819
+ }, t.clearConfig = function() {
1820
+ B = null, _e = !1;
1821
+ }, t.isValidAttribute = function(e, t, n) {
1822
+ return B || Ke({}), nt(z(e), z(t), n);
1823
+ }, t.addHook = function(e, t) {
1824
+ typeof t == "function" && Ir(O[e], t);
1825
+ }, t.removeHook = function(e, t) {
1826
+ if (t !== void 0) {
1827
+ let n = Pr(O[e], t);
1828
+ return n === -1 ? void 0 : Lr(O[e], n, 1)[0];
1829
+ }
1830
+ return Fr(O[e]);
1831
+ }, t.removeHooks = function(e) {
1832
+ O[e] = [];
1833
+ }, t.removeAllHooks = function() {
1834
+ O = Ti();
1835
+ }, t;
1836
+ }
1837
+ var Di = Ei(), Oi = u().use(d).use(p).use(f, { allowDangerousHtml: !0 }).use(m, { allowDangerousHtml: !0 }), ki = async (e) => {
1838
+ let t = await Oi.process(e), n = String(t);
1839
+ return Di.sanitize(n);
1840
+ }, Ai = (e) => e.role === "assistant", ji = (0, W.forwardRef)(({ message: e }, t) => {
1841
+ let [n, r] = (0, W.useState)(!1), [i, a] = (0, W.useState)(""), [o, c] = (0, W.useState)(""), [l, u] = (0, W.useState)(!0), d = (0, W.useRef)(null);
1842
+ (0, W.useEffect)(() => {
1843
+ e.content ? ki(e.content).then(c) : c("");
1844
+ let t = Ai(e) ? e.reasoning_content : void 0;
1845
+ t ? ki(t).then(a) : a("");
1846
+ }, [e.content, Ai(e) ? e.reasoning_content : void 0]), (0, W.useEffect)(() => () => {
1847
+ d.current && clearTimeout(d.current);
1848
+ }, []);
1849
+ let f = () => {
1850
+ u(!l);
1851
+ }, p = (t) => {
1852
+ t.stopPropagation();
1853
+ let n = e.content;
1854
+ navigator.clipboard.writeText(n).catch((e) => {
1855
+ console.error("Failed to copy text: ", e);
1856
+ }).finally(() => {
1857
+ d.current && clearTimeout(d.current), r(!0), d.current = setTimeout(() => {
1858
+ r(!1);
1859
+ }, 1500);
1860
+ });
1861
+ }, m = !e.content;
1862
+ return /* @__PURE__ */ (0, G.jsxs)("div", {
1863
+ ref: t,
1864
+ className: `message ${e.role} ${m ? "loading" : ""}`,
1865
+ children: [
1866
+ Ai(e) && i && /* @__PURE__ */ (0, G.jsxs)("div", {
1867
+ className: `reasoning-container ${l ? "collapsed" : ""}`,
1868
+ children: [/* @__PURE__ */ (0, G.jsxs)("button", {
1869
+ className: "reasoning-header plain",
1870
+ type: "button",
1871
+ onClick: f,
1872
+ children: [/* @__PURE__ */ (0, G.jsx)(gr, {}), "思考过程"]
1873
+ }), /* @__PURE__ */ (0, G.jsx)("div", {
1874
+ className: "reasoning-content",
1875
+ dangerouslySetInnerHTML: { __html: i }
1876
+ })]
1877
+ }),
1878
+ /* @__PURE__ */ (0, G.jsx)("div", {
1879
+ className: "body-container",
1880
+ children: m ? /* @__PURE__ */ (0, G.jsx)("p", { className: "loading-dots" }) : /* @__PURE__ */ (0, G.jsx)("div", {
1881
+ className: "content-container",
1882
+ dangerouslySetInnerHTML: { __html: o }
1883
+ })
1884
+ }),
1885
+ /* @__PURE__ */ (0, G.jsx)("div", {
1886
+ className: "button-container",
1887
+ children: /* @__PURE__ */ (0, G.jsx)(s, {
1888
+ title: "复制",
1889
+ placement: e.role === "user" ? "bottomRight" : "bottomLeft",
1890
+ children: /* @__PURE__ */ (0, G.jsx)("button", {
1891
+ className: "icon square plain",
1892
+ type: "button",
1893
+ "aria-label": "复制",
1894
+ onClick: p,
1895
+ children: n ? /* @__PURE__ */ (0, G.jsx)("span", { children: "Copied" }) : /* @__PURE__ */ (0, G.jsx)(_r, {})
1896
+ })
1897
+ })
1898
+ })
1899
+ ]
1900
+ });
1901
+ }), Mi = (0, W.memo)(ji), Ni = (0, W.memo)((e) => /* @__PURE__ */ (0, G.jsx)("svg", {
1902
+ xmlns: "http://www.w3.org/2000/svg",
1903
+ width: "18",
1904
+ height: "18",
1905
+ viewBox: "0 0 1024 1024",
1906
+ fill: "currentColor",
1907
+ ...e,
1908
+ children: /* @__PURE__ */ (0, G.jsx)("path", { d: "M597.333 128v85.333H170.667v571.094l75.221-59.094h607.445V426.667h85.334V768A42.667 42.667 0 0 1 896 810.667H275.413L85.333 960V170.667A42.667 42.667 0 0 1 128 128h469.333zm213.334 0V0H896v128h128v85.333H896v128h-85.333v-128h-128V128h128z" })
1909
+ })), Pi = (0, W.memo)((e) => /* @__PURE__ */ (0, G.jsx)("svg", {
1910
+ xmlns: "http://www.w3.org/2000/svg",
1911
+ width: "14",
1912
+ height: "14",
1913
+ fill: "currentColor",
1914
+ ...e,
1915
+ children: /* @__PURE__ */ (0, G.jsx)("path", { d: "M7 8.414L3.293 12.121a1 1 0 0 1-1.414-1.414L5.586 7 1.879 3.293a1 1 0 0 1 1.414-1.414L7 5.586l3.707-3.707a1 1 0 1 1 1.414 1.414L8.414 7l3.707 3.707a1 1 0 0 1-1.414 1.414L7 8.414z" })
1916
+ })), Fi = (0, W.memo)((e) => /* @__PURE__ */ (0, G.jsx)("svg", {
1917
+ xmlns: "http://www.w3.org/2000/svg",
1918
+ width: "20",
1919
+ height: "20",
1920
+ fill: "currentColor",
1921
+ ...e,
1922
+ children: /* @__PURE__ */ (0, G.jsx)("path", { d: "M4.5 5.75c0-.69.56-1.25 1.25-1.25h8.5c.69 0 1.25.56 1.25 1.25v8.5c0 .69-.56 1.25-1.25 1.25h-8.5c-.69 0-1.25-.56-1.25-1.25v-8.5Z" })
1923
+ })), Ii = (0, W.memo)((e) => /* @__PURE__ */ (0, G.jsx)("svg", {
1924
+ xmlns: "http://www.w3.org/2000/svg",
1925
+ width: "20",
1926
+ height: "20",
1927
+ fill: "currentColor",
1928
+ ...e,
1929
+ children: /* @__PURE__ */ (0, G.jsx)("path", { d: "M9 16V6.414L5.707 9.707a1 1 0 1 1-1.414-1.414l5-5 .076-.068a1 1 0 0 1 1.338.068l5 5 .068.076a1 1 0 0 1-1.406 1.406l-.076-.068L11 6.414V16a1 1 0 1 1-2 0Z" })
1930
+ })), Li = (0, W.memo)((e) => /* @__PURE__ */ (0, G.jsx)("svg", {
1931
+ viewBox: "0 0 1024 1024",
1932
+ xmlns: "http://www.w3.org/2000/svg",
1933
+ width: "18",
1934
+ height: "18",
1935
+ fill: "currentColor",
1936
+ ...e,
1937
+ children: /* @__PURE__ */ (0, G.jsx)("path", { d: "M512 938.667c235.648 0 426.667-191.019 426.667-426.667S747.648 85.333 512 85.333 85.333 276.352 85.333 512 276.352 938.667 512 938.667z m0 85.333C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512z m42.667-486.87V298.54C554.667 275.328 535.552 256 512 256c-23.723 0-42.667 19.03-42.667 42.539v256.256a41.984 41.984 0 0 0 12.203 29.866L602.795 705.92a42.368 42.368 0 0 0 60.032-0.299 42.667 42.667 0 0 0 0.298-60.032L554.667 537.131z" })
1938
+ })), Ri = "*{box-sizing:border-box}textarea{padding:0}textarea:focus-visible,select:focus-visible{outline:0}button{cursor:pointer;border:0;outline:0;justify-content:center;align-items:center;display:flex}button.icon{padding:4px}button.text{height:28px;padding:0 12px}button.square{border-radius:6px}button.circle{border-radius:50%}button.primary{background-color:#0000000a}button.plain{background-color:#0000}button.error{color:#fff;background-color:#ff4d4f}button.primary:hover{background-color:#0000000f}button.plain:hover{background-color:#0000000a}button.error:hover{background-color:#ff7875}.loading-dots{margin-left:3px;font-weight:700}.loading-dots:after{content:\"\";animation:1.5s infinite typing}@keyframes typing{0%{content:\".\"}33%{content:\"..\"}66%{content:\"...\"}to{content:\".\"}}.app-container{background:#fff;height:100%}.bottom-container{background:#fff;padding:12px;position:fixed;bottom:0;left:0;right:0}.action-bar{align-items:center;gap:12px;margin-bottom:12px;display:flex}.user-input-container{border:1px solid #72768b29;border-radius:16px;flex-direction:column;padding:12px;display:flex;box-shadow:0 10px 30px #0003}.user-input{resize:none;border:0;width:100%;font-size:14px;line-height:1.5}.button-wrap{justify-content:flex-end;align-items:center;gap:12px;display:flex}.messages-container{height:100%;padding:12px 12px calc(100vh - 12px);overflow:hidden auto}.message{max-width:80%;margin-bottom:12px;font-size:14px;line-height:1.5}.body-container{color:#000;border-radius:8px;padding:0 14px;overflow-x:auto}.message.user{margin-left:auto}.message.user .body-container{background:#e3f2fd}.message.assistant{margin-right:auto}.message.assistant .body-container{background:#f1f1f1}.button-container{margin-top:4px;display:flex}.button-container button{align-items:center;height:26px;display:flex}.message.user .button-container{justify-content:flex-end}.message.assistant .button-container{justify-content:flex-start}.send-icon,.stop-icon{color:#fff;background-color:#000;border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;display:flex}.content-container{word-wrap:break-word}.message.assistant table{border-collapse:collapse;margin-block:1em}.message.assistant table th,.message.assistant table td{border:1px solid #ccc;padding:8px}.message.assistant table th{background-color:#e0e0e0}.message.assistant .reasoning-container{color:#6b7280;background-color:#f9fafb;border-radius:8px;margin-bottom:8px;font-size:12px;overflow-x:auto}.message.assistant .reasoning-container .reasoning-header{padding-top:8px;padding-bottom:8px;justify-content:flex-start;gap:4px;width:100%;padding-inline:14px;display:flex}.message.assistant .reasoning-container .reasoning-header svg{transition:transform .3s;transform:rotate(90deg)}.message.assistant .reasoning-container .reasoning-content{padding:0 14px}.message.assistant .reasoning-container.collapsed .reasoning-header svg{transition:transform .3s;transform:rotate(0)}.message.assistant .reasoning-container.collapsed .reasoning-content{height:0;overflow:hidden}.context-container{background:#f3f4f6;border-radius:8px;align-items:center;gap:8px;margin-bottom:12px;padding:8px 12px;display:flex}.context-text{color:#374151;white-space:nowrap;text-overflow:ellipsis;flex:1;font-size:13px;overflow:hidden}.context-delete{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;padding:4px;transition:background-color .2s;display:flex}.context-delete:hover{color:#374151;background-color:#e5e7eb}.history-list{scrollbar-width:none;-ms-overflow-style:none;max-height:400px;overflow-y:auto}.history-list::-webkit-scrollbar{display:none}.history-items{margin:0;padding:0;list-style:none}.history-item{cursor:pointer;border-radius:8px;margin-top:8px;padding:12px 16px;transition:background-color .2s}.history-item:hover{background-color:#0000000d}.history-item.selected{background-color:#3b82f61a;border:1px solid #3b82f64d}.history-content{color:#333;word-break:break-all;margin-bottom:4px;font-size:14px}.history-time{color:#999;font-size:12px}.history-empty{text-align:center;color:#999;padding:40px 0}", zi = () => crypto.randomUUID(), Bi = (0, W.forwardRef)(({ onReady: e }, t) => {
1939
+ let [n, r] = (0, W.useState)([]), [i, o] = (0, W.useState)(""), [c, u] = (0, W.useState)(!1), [d, f] = (0, W.useState)(""), [p, m] = l.useNotification(), [h, g] = (0, W.useState)([]), [v, y] = (0, W.useState)(!1), [b, x] = (0, W.useState)(""), S = (0, W.useRef)(null), C = (0, W.useRef)(null), w = (0, W.useRef)(!1), T = (0, W.useRef)([]), E = (0, W.useCallback)((e) => {
1940
+ localStorage.setItem("chatHistory", JSON.stringify(e));
1941
+ }, []);
1942
+ (0, W.useEffect)(() => {
1943
+ T.current = h;
1944
+ }, [h]);
1945
+ let D = (0, W.useMemo)(() => rr(() => {
1946
+ E(T.current);
1947
+ }, 500), [E]);
1948
+ (0, W.useEffect)(() => {
1949
+ if (w.current) return;
1950
+ w.current = !0;
1951
+ let t = zi();
1952
+ x(t), e();
1953
+ let n = localStorage.getItem("chatHistory"), r = [];
1954
+ if (n) try {
1955
+ r = JSON.parse(n);
1956
+ } catch {
1957
+ r = [];
1958
+ }
1959
+ let i = {
1960
+ id: t,
1961
+ createdAt: Date.now(),
1962
+ messages: []
1963
+ };
1964
+ g([...r, i]);
1965
+ }, [e]), (0, W.useEffect)(() => {
1966
+ n.length !== 0 && g((e) => e.map((e) => e.id === b ? {
1967
+ ...e,
1968
+ messages: n
1969
+ } : e));
1970
+ }, [n, b]), (0, W.useEffect)(() => {
1971
+ D();
1972
+ }, [h, D]), (0, W.useEffect)(() => () => {
1973
+ D.cancel(), E(T.current);
1974
+ }, [D, E]);
1975
+ let ee = (0, W.useCallback)((e) => {
1976
+ e.id ||= zi(), r((t) => [...t, e]);
1977
+ }, []), O = (0, W.useCallback)((e) => {
1978
+ if (!e.length) return;
1979
+ let t = e.map((e) => ({
1980
+ ...e,
1981
+ id: e.id || zi()
1982
+ }));
1983
+ r((e) => [...e, ...t]);
1984
+ }, []), k = (0, W.useCallback)(() => {
1985
+ let e = {
1986
+ id: zi(),
1987
+ role: "assistant",
1988
+ reasoning_content: "",
1989
+ content: ""
1990
+ };
1991
+ r((t) => [...t, e]);
1992
+ }, []), A = (0, W.useCallback)((e, t) => {
1993
+ (0, W.startTransition)(() => {
1994
+ r((n) => {
1995
+ let r = [...n];
1996
+ if (r.length > 0) {
1997
+ let n = r.at(-1);
1998
+ n?.role === "assistant" && (r[r.length - 1] = {
1999
+ ...n,
2000
+ [e]: t
2001
+ });
2002
+ }
2003
+ return r;
2004
+ });
2005
+ });
2006
+ }, []), j = (0, W.useCallback)((e) => {
2007
+ f(e);
2008
+ }, []), M = (0, W.useCallback)(() => {
2009
+ f("");
2010
+ }, []);
2011
+ (0, W.useImperativeHandle)(t, () => ({
2012
+ pushMessage: ee,
2013
+ pushMessages: O,
2014
+ pushLoadingMessage: k,
2015
+ updateLoadingMessage: A,
2016
+ updateContext: j
2017
+ }), [
2018
+ ee,
2019
+ O,
2020
+ k,
2021
+ A,
2022
+ j
2023
+ ]);
2024
+ let te = (0, W.useCallback)(async () => {
2025
+ let e = i.trim();
2026
+ if (e) try {
2027
+ u(!0), o("");
2028
+ let t = d.trim() ? `${d}\n\n${e}` : e, n = {
2029
+ id: zi(),
2030
+ role: "user",
2031
+ content: t
2032
+ };
2033
+ if (r((e) => [...e, n]), !C.current) return;
2034
+ C.current.scrollTop = C.current.scrollHeight, await _.emit("send", n);
2035
+ } finally {
2036
+ u(!1), S.current?.focus();
2037
+ }
2038
+ }, [i, d]), ne = (0, W.useCallback)(async () => {
2039
+ await _.emit("stop"), u(!1), S.current?.focus(), p.info({
2040
+ title: "已停止",
2041
+ description: "对话已停止",
2042
+ placement: "top",
2043
+ closable: !1
2044
+ });
2045
+ }, [p]), re = (0, W.useCallback)(async () => {
2046
+ let e = zi(), t = {
2047
+ id: e,
2048
+ createdAt: Date.now(),
2049
+ messages: []
2050
+ };
2051
+ g((e) => [...e, t]), x(e), r([]), S.current?.focus(), await _.emit("create"), p.success({
2052
+ title: "已创建",
2053
+ description: "新对话已创建",
2054
+ placement: "top",
2055
+ closable: !1
2056
+ });
2057
+ }, [p]), ie = (0, W.useCallback)((e) => {
2058
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), te());
2059
+ }, [te]), ae = (0, W.useCallback)(() => {
2060
+ y(!0);
2061
+ }, []), N = (0, W.useCallback)(() => {
2062
+ y(!1);
2063
+ }, []), oe = (0, W.useCallback)((e) => {
2064
+ r(e.messages), x(e.id), y(!1);
2065
+ }, []), P = (0, W.useCallback)((e) => {
2066
+ let t = new Date(e);
2067
+ return `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")} ${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}`;
2068
+ }, []), se = (0, W.useMemo)(() => n.map((e) => /* @__PURE__ */ (0, G.jsx)(Mi, { message: e }, e.id)), [n]);
2069
+ return /* @__PURE__ */ (0, G.jsxs)("div", {
2070
+ className: "app-container",
2071
+ children: [
2072
+ /* @__PURE__ */ (0, G.jsx)("style", { children: Ri }),
2073
+ m,
2074
+ /* @__PURE__ */ (0, G.jsx)("div", {
2075
+ className: "messages-container",
2076
+ ref: C,
2077
+ children: se
2078
+ }),
2079
+ /* @__PURE__ */ (0, G.jsxs)("div", {
2080
+ className: "bottom-container",
2081
+ children: [
2082
+ /* @__PURE__ */ (0, G.jsxs)("div", {
2083
+ className: "action-bar",
2084
+ children: [/* @__PURE__ */ (0, G.jsx)(s, {
2085
+ title: "新对话",
2086
+ placement: "bottomLeft",
2087
+ children: /* @__PURE__ */ (0, G.jsx)("button", {
2088
+ className: "icon square plain",
2089
+ type: "button",
2090
+ "aria-label": "新对话",
2091
+ onClick: re,
2092
+ children: /* @__PURE__ */ (0, G.jsx)(Ni, {})
2093
+ })
2094
+ }), /* @__PURE__ */ (0, G.jsx)(s, {
2095
+ title: "历史对话",
2096
+ placement: "bottomLeft",
2097
+ children: /* @__PURE__ */ (0, G.jsx)("button", {
2098
+ className: "icon square plain",
2099
+ type: "button",
2100
+ "aria-label": "历史对话",
2101
+ onClick: ae,
2102
+ children: /* @__PURE__ */ (0, G.jsx)(Li, {})
2103
+ })
2104
+ })]
2105
+ }),
2106
+ d && /* @__PURE__ */ (0, G.jsxs)("div", {
2107
+ className: "context-container",
2108
+ children: [/* @__PURE__ */ (0, G.jsx)("span", {
2109
+ className: "context-text",
2110
+ children: d
2111
+ }), /* @__PURE__ */ (0, G.jsx)(s, {
2112
+ title: "删除上下文",
2113
+ placement: "topLeft",
2114
+ children: /* @__PURE__ */ (0, G.jsx)("button", {
2115
+ className: "context-delete",
2116
+ type: "button",
2117
+ "aria-label": "删除上下文",
2118
+ onClick: M,
2119
+ children: /* @__PURE__ */ (0, G.jsx)(Pi, {})
2120
+ })
2121
+ })]
2122
+ }),
2123
+ /* @__PURE__ */ (0, G.jsxs)("div", {
2124
+ className: "user-input-container",
2125
+ children: [/* @__PURE__ */ (0, G.jsx)("textarea", {
2126
+ className: "user-input",
2127
+ placeholder: "发消息...",
2128
+ value: i,
2129
+ onChange: (e) => o(e.target.value),
2130
+ onKeyDown: ie,
2131
+ ref: S
2132
+ }), /* @__PURE__ */ (0, G.jsx)("div", {
2133
+ className: "button-wrap",
2134
+ children: c ? /* @__PURE__ */ (0, G.jsx)(s, {
2135
+ title: "停止",
2136
+ placement: "topLeft",
2137
+ children: /* @__PURE__ */ (0, G.jsx)("button", {
2138
+ className: "icon square plain",
2139
+ type: "button",
2140
+ "aria-label": "停止",
2141
+ onClick: ne,
2142
+ children: /* @__PURE__ */ (0, G.jsx)("div", {
2143
+ className: "stop-icon",
2144
+ children: /* @__PURE__ */ (0, G.jsx)(Fi, {})
2145
+ })
2146
+ })
2147
+ }) : /* @__PURE__ */ (0, G.jsx)(s, {
2148
+ title: "发送 (↵)",
2149
+ placement: "topLeft",
2150
+ children: /* @__PURE__ */ (0, G.jsx)("button", {
2151
+ className: "icon square plain",
2152
+ type: "button",
2153
+ "aria-label": "发送",
2154
+ onClick: te,
2155
+ children: /* @__PURE__ */ (0, G.jsx)("div", {
2156
+ className: "send-icon",
2157
+ children: /* @__PURE__ */ (0, G.jsx)(Ii, {})
2158
+ })
2159
+ })
2160
+ })
2161
+ })]
2162
+ })
2163
+ ]
2164
+ }),
2165
+ /* @__PURE__ */ (0, G.jsx)(a, {
2166
+ title: "历史对话",
2167
+ open: v,
2168
+ onCancel: N,
2169
+ footer: null,
2170
+ children: /* @__PURE__ */ (0, G.jsx)("div", {
2171
+ className: "history-list",
2172
+ children: h.length === 0 ? /* @__PURE__ */ (0, G.jsx)("div", {
2173
+ className: "history-empty",
2174
+ children: "暂无历史对话"
2175
+ }) : /* @__PURE__ */ (0, G.jsx)("ul", {
2176
+ className: "history-items",
2177
+ children: h.map((e) => /* @__PURE__ */ (0, G.jsxs)("li", {
2178
+ className: `history-item ${b === e.id ? "selected" : ""}`,
2179
+ onClick: () => oe(e),
2180
+ children: [/* @__PURE__ */ (0, G.jsx)("div", {
2181
+ className: "history-content",
2182
+ children: e.messages[0]?.content || ""
2183
+ }), /* @__PURE__ */ (0, G.jsx)("div", {
2184
+ className: "history-time",
2185
+ children: P(e.createdAt)
2186
+ })]
2187
+ }, e.id))
2188
+ })
2189
+ })
2190
+ })
2191
+ ]
2192
+ });
2193
+ }), Vi = ({ domNode: e, onReady: t }) => {
2194
+ let r = o(), a = (0, W.createRef)();
2195
+ return hr.createRoot(e).render(/* @__PURE__ */ (0, G.jsx)(W.StrictMode, { children: /* @__PURE__ */ (0, G.jsx)(n, {
2196
+ cache: r,
2197
+ container: e,
2198
+ children: /* @__PURE__ */ (0, G.jsx)(i, {
2199
+ getPopupContainer: () => e,
2200
+ children: /* @__PURE__ */ (0, G.jsx)(Bi, {
2201
+ ref: a,
2202
+ onReady: t
2203
+ })
2204
+ })
2205
+ }) })), a;
2206
+ }, Hi = /* @__PURE__ */ t(((e, t) => {
2207
+ (function(n, r) {
2208
+ typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_isoWeek = r();
2209
+ })(e, (function() {
2210
+ var e = "day";
2211
+ return function(t, n, r) {
2212
+ var i = function(t) {
2213
+ return t.add(4 - t.isoWeekday(), e);
2214
+ }, a = n.prototype;
2215
+ a.isoWeekYear = function() {
2216
+ return i(this).year();
2217
+ }, a.isoWeek = function(t) {
2218
+ if (!this.$utils().u(t)) return this.add(7 * (t - this.isoWeek()), e);
2219
+ var n, a, o, s, c = i(this), l = (n = this.isoWeekYear(), a = this.$u, o = (a ? r.utc : r)().year(n).startOf("year"), s = 4 - o.isoWeekday(), o.isoWeekday() > 4 && (s += 7), o.add(s, e));
2220
+ return c.diff(l, "week") + 1;
2221
+ }, a.isoWeekday = function(e) {
2222
+ return this.$utils().u(e) ? this.day() || 7 : this.day(this.day() % 7 ? e : e - 7);
2223
+ };
2224
+ var o = a.startOf;
2225
+ a.startOf = function(e, t) {
2226
+ var n = this.$utils(), r = !!n.u(t) || t;
2227
+ return n.p(e) === "isoweek" ? r ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : o.bind(this)(e, t);
2228
+ };
2229
+ };
2230
+ }));
2231
+ })), Ui = /* @__PURE__ */ e(dr()), Wi = /* @__PURE__ */ e(Hi());
2232
+ Ui.default.extend(Wi.default);
2233
+ function Gi() {
2234
+ return (0, Ui.default)().startOf("isoWeek").toDate();
2235
+ }
2236
+ var Ki = /大*后天/g;
2237
+ function qi(e) {
2238
+ if (!Ki.test(e)) return e;
2239
+ let t = (0, Ui.default)();
2240
+ return Ki.lastIndex = 0, e.replace(Ki, (e) => {
2241
+ let n = 2 + (e.length - 2);
2242
+ return t.add(n, "day").format("YYYY年MM月DD日");
2243
+ });
2244
+ }
2245
+ function Ji(e) {
2246
+ let t = qi(e), n = h(t, { instant: /(?:本|这|上|下)?(?:周|星期)/.test(t) ? Gi() : /* @__PURE__ */ new Date() });
2247
+ return n ? (0, Ui.default)(n).format("YYYY-MM-DD HH:mm:ss") : "无法解析,请输入具体时间";
2248
+ }
2249
+ //#endregion
2250
+ //#region src/utils/tools.ts
2251
+ var Yi = { parse_relative_date: {
2252
+ def: {
2253
+ type: "function",
2254
+ function: {
2255
+ name: "parse_relative_date",
2256
+ description: "把相对时间转成绝对时间",
2257
+ parameters: {
2258
+ type: "object",
2259
+ properties: { input: {
2260
+ type: "string",
2261
+ description: "相对时间"
2262
+ } },
2263
+ required: ["input"]
2264
+ }
2265
+ }
2266
+ },
2267
+ handler: (e) => Ji(e.input)
2268
+ } }, Xi = /* @__PURE__ */ e(g()), Zi = class {
2269
+ tools = Object.create(null);
2270
+ ajv = new Xi.default({
2271
+ allErrors: !0,
2272
+ strict: !1,
2273
+ allowUnionTypes: !0
2274
+ });
2275
+ validatorCache = Object.create(null);
2276
+ register(e, t) {
2277
+ if (this.tools[e.function.name]) throw Error(`${e.function.name} 已存在`);
2278
+ this.tools[e.function.name] = {
2279
+ def: e,
2280
+ handler: t
2281
+ };
2282
+ }
2283
+ getDefinition(e) {
2284
+ return this.tools[e]?.def;
2285
+ }
2286
+ getHandler(e) {
2287
+ return this.tools[e]?.handler;
2288
+ }
2289
+ remove(e) {
2290
+ delete this.tools[e], delete this.validatorCache[e];
2291
+ }
2292
+ get definitions() {
2293
+ return Object.values(this.tools).map((e) => e.def);
2294
+ }
2295
+ getDefinitions(e) {
2296
+ return e.length ? e.map((e) => this.getDefinition(e)).filter((e) => !!e) : null;
2297
+ }
2298
+ getValidator(e, t) {
2299
+ return this.validatorCache[e] || (this.validatorCache[e] = this.ajv.compile(t)), this.validatorCache[e];
2300
+ }
2301
+ validate(e, t) {
2302
+ let n = this.tools[e];
2303
+ if (!n) throw Error(`${e} 未注册`);
2304
+ let r = n.def.function.parameters, i = this.getValidator(e, r);
2305
+ if (!i(t)) {
2306
+ let e = this.ajv.errorsText(i.errors, { separator: ", " });
2307
+ throw Error(`参数验证失败: ${e}`);
2308
+ }
2309
+ return !0;
2310
+ }
2311
+ async call(e, t) {
2312
+ this.validate(e, t);
2313
+ let n = this.getHandler(e);
2314
+ if (!n) throw Error(`${e} 没有 handler`);
2315
+ return n(t);
2316
+ }
2317
+ }, Qi = class extends Zi {
2318
+ model = "";
2319
+ url = "";
2320
+ messages = [];
2321
+ maxRounds = 4;
2322
+ defaultParams = {
2323
+ tools: [],
2324
+ roundsLeft: this.maxRounds
2325
+ };
2326
+ controller = null;
2327
+ abort() {
2328
+ this.controller &&= (this.controller.abort(), null);
2329
+ }
2330
+ constructor(e) {
2331
+ super();
2332
+ let { model: t, url: n, systemMessageContent: r, maxRounds: i } = e;
2333
+ this.model = t, this.url = n, typeof i == "number" && (this.maxRounds = i), r && (this.messages[0] = {
2334
+ id: crypto.randomUUID(),
2335
+ role: "system",
2336
+ content: r
2337
+ });
2338
+ }
2339
+ pushMessage(e) {
2340
+ e && (e.id ||= crypto.randomUUID(), this.messages.push(e));
2341
+ }
2342
+ pushMessages(e) {
2343
+ if (e.length) for (let t of e) this.pushMessage(t);
2344
+ }
2345
+ resetMessages() {
2346
+ let e = this.messages.find((e) => e.role === "system");
2347
+ this.messages = e ? [e] : [];
2348
+ }
2349
+ merge(e, t, n = []) {
2350
+ return ur({}, e, t, (e, t, r) => {
2351
+ if (n.includes(r)) return (typeof e == "string" ? e : "") + (typeof t == "string" ? t : "");
2352
+ });
2353
+ }
2354
+ async executeTools(e) {
2355
+ let t = e.map(async (e) => {
2356
+ let { function: { name: t, arguments: n }, id: r } = e, i = await this.call(t, JSON.parse(n));
2357
+ this.messages.push({
2358
+ id: crypto.randomUUID(),
2359
+ content: i,
2360
+ role: "tool",
2361
+ tool_call_id: r
2362
+ });
2363
+ });
2364
+ await Promise.all(t);
2365
+ }
2366
+ async invoke(e = this.defaultParams) {
2367
+ let { tools: t = [], roundsLeft: n = this.maxRounds, panel: r } = e;
2368
+ this.abort(), this.controller = new AbortController();
2369
+ try {
2370
+ let e = await fetch(this.url, {
2371
+ method: "POST",
2372
+ headers: { "Content-Type": "application/json" },
2373
+ body: JSON.stringify({
2374
+ model: this.model,
2375
+ messages: this.messages,
2376
+ tools: this.getDefinitions(t),
2377
+ stream: !1
2378
+ }),
2379
+ signal: this.controller.signal
2380
+ });
2381
+ if (this.controller.signal.aborted) throw new DOMException("对话已停止", "AbortError");
2382
+ let i = (await e.json())?.choices?.[0]?.message;
2383
+ if (!i) return;
2384
+ i.role === null && (i.role = "assistant");
2385
+ let { content: a, role: o, tool_calls: s } = i;
2386
+ if (!s?.length) return i;
2387
+ if (a && r && (await r.pushLoadingMessage(), await r.updateLoadingMessage("content", a)), this.messages.push({
2388
+ id: crypto.randomUUID(),
2389
+ content: a,
2390
+ role: o,
2391
+ tool_calls: s
2392
+ }), await this.executeTools(s), n - 1 > 0) return r && await r.pushLoadingMessage(), await this.invoke({
2393
+ tools: [],
2394
+ roundsLeft: n - 1,
2395
+ panel: r
2396
+ });
2397
+ } finally {
2398
+ this.controller = null;
2399
+ }
2400
+ }
2401
+ async *invokeStream(e = this.defaultParams) {
2402
+ let { tools: t = [], roundsLeft: n = this.maxRounds } = e;
2403
+ this.abort(), this.controller = new AbortController();
2404
+ try {
2405
+ let e = await fetch(this.url, {
2406
+ method: "POST",
2407
+ headers: { "Content-Type": "application/json" },
2408
+ body: JSON.stringify({
2409
+ model: this.model,
2410
+ messages: this.messages,
2411
+ tools: this.getDefinitions(t),
2412
+ stream: !0
2413
+ }),
2414
+ signal: this.controller.signal
2415
+ });
2416
+ if (this.controller.signal.aborted) throw new DOMException("对话已停止", "AbortError");
2417
+ let r = e.body?.getReader();
2418
+ if (!r) throw Error("Failed to get response reader");
2419
+ let i = null, a = new TextDecoder(), o = "";
2420
+ for (;;) {
2421
+ let { done: e, value: t } = await r.read();
2422
+ if (e) break;
2423
+ let n = a.decode(t, { stream: !0 }).split("\n\n").filter((e) => e.trim() !== "");
2424
+ for (let e of n) {
2425
+ if (e === "data: [DONE]") break;
2426
+ let t = e.trim().replace(/^data: /, "");
2427
+ try {
2428
+ let e = JSON.parse(o + t);
2429
+ i = this.merge(i, e, ["content", "arguments"]), yield e, o = "";
2430
+ } catch (e) {
2431
+ console.warn("JSON 解析失败,等待下一个数据块继续拼接", {
2432
+ error: e,
2433
+ jsonStr: t
2434
+ }), o += t;
2435
+ }
2436
+ }
2437
+ }
2438
+ let s = i?.choices?.[0]?.delta;
2439
+ if (!s) return;
2440
+ s.role === null && (s.role = "assistant");
2441
+ let { content: c, role: l, tool_calls: u } = s;
2442
+ if (!u?.length) return s;
2443
+ if (this.messages.push({
2444
+ id: crypto.randomUUID(),
2445
+ content: c,
2446
+ role: l,
2447
+ tool_calls: u
2448
+ }), await this.executeTools(u), n - 1 > 0) return this.invokeStream({
2449
+ tools: [],
2450
+ roundsLeft: n - 1
2451
+ });
2452
+ } finally {
2453
+ this.controller = null;
2454
+ }
2455
+ }
2456
+ }, $i = class extends HTMLElement {
2457
+ appRef = null;
2458
+ promise;
2459
+ resolve = null;
2460
+ constructor() {
2461
+ super(), this.attachShadow({ mode: "open" }), this.promise = new Promise((e) => {
2462
+ this.resolve = e;
2463
+ });
2464
+ }
2465
+ connectedCallback() {
2466
+ this.shadowRoot && (this.appRef = Vi({
2467
+ domNode: this.shadowRoot,
2468
+ onReady: () => this.resolve?.()
2469
+ }));
2470
+ }
2471
+ ready() {
2472
+ return this.promise;
2473
+ }
2474
+ async pushMessage(e) {
2475
+ await this.promise, this.appRef?.current?.pushMessage(e);
2476
+ }
2477
+ async pushMessages(e) {
2478
+ await this.promise, this.appRef?.current?.pushMessages(e);
2479
+ }
2480
+ async pushLoadingMessage() {
2481
+ await this.promise, this.appRef?.current?.pushLoadingMessage();
2482
+ }
2483
+ async updateLoadingMessage(e, t) {
2484
+ await this.promise, this.appRef?.current?.updateLoadingMessage(e, t);
2485
+ }
2486
+ async updateContext(e) {
2487
+ await this.promise, this.appRef?.current?.updateContext(e);
2488
+ }
2489
+ };
2490
+ customElements.define("ai-chat-panel", $i);
2491
+ var ea = class {
2492
+ on = _.on;
2493
+ panelElement;
2494
+ constructor(e) {
2495
+ let { container: t } = e;
2496
+ if (!t) throw Error("未提供有效的 container");
2497
+ this.panelElement = document.createElement("ai-chat-panel"), t.appendChild(this.panelElement);
2498
+ }
2499
+ ready() {
2500
+ return this.panelElement.ready();
2501
+ }
2502
+ pushMessage(e) {
2503
+ return this.panelElement.pushMessage(e);
2504
+ }
2505
+ pushMessages(e) {
2506
+ return this.panelElement.pushMessages(e);
2507
+ }
2508
+ pushLoadingMessage() {
2509
+ return this.panelElement.pushLoadingMessage();
2510
+ }
2511
+ updateLoadingMessage(e, t) {
2512
+ return this.panelElement.updateLoadingMessage(e, t);
2513
+ }
2514
+ updateContext(e) {
2515
+ return this.panelElement.updateContext(e);
2516
+ }
2517
+ };
2518
+ //#endregion
2519
+ export { ea as AIChatPanel, Qi as Agent, Yi as tools };