@pagelines/sdk 1.0.388 → 1.0.390

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.
@@ -1,8 +1,8 @@
1
1
  var _n = Object.defineProperty;
2
2
  var ws = (l, t, e) => t in l ? _n(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
- var h = (l, t) => _n(l, "name", { value: t, configurable: !0 });
4
- var R = (l, t, e) => ws(l, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as _e, openBlock as v, createElementBlock as y, createElementVNode as w, normalizeClass as T, ref as K, watch as Ke, computed as W, createCommentVNode as H, renderSlot as qn, onMounted as Zt, Fragment as Se, renderList as dt, withDirectives as Vn, vModelText as Yn, unref as jt, toDisplayString as ce, nextTick as Pt, createVNode as $t, createTextVNode as vs, normalizeStyle as ys, shallowRef as Ts } from "vue";
3
+ var u = (l, t) => _n(l, "name", { value: t, configurable: !0 });
4
+ var D = (l, t, e) => ws(l, typeof t != "symbol" ? t + "" : t, e);
5
+ import { defineComponent as _e, openBlock as y, createElementBlock as T, createElementVNode as v, normalizeClass as A, ref as Q, watch as Qe, computed as W, createCommentVNode as H, renderSlot as qn, onMounted as Zt, Fragment as Se, renderList as dt, withDirectives as Vn, vModelText as Yn, unref as jt, toDisplayString as ce, nextTick as Nt, createVNode as $t, createTextVNode as vs, normalizeStyle as ys, shallowRef as Ts } from "vue";
6
6
  import { SettingsObject as Ss, Agent as xt, getDefaultAvatarUrl as Zn, createLogger as As } from "@pagelines/core";
7
7
  import { P as Es } from "./sdkClient.js";
8
8
  const _s = { class: "spinner max-w-sm" }, Rs = {
@@ -15,10 +15,10 @@ const _s = { class: "spinner max-w-sm" }, Rs = {
15
15
  colorMode: { type: String, default: "primary" }
16
16
  },
17
17
  setup(l) {
18
- return (t, e) => (v(), y("div", _s, [
19
- (v(), y("svg", Rs, [
20
- w("circle", {
21
- class: T([l.colorMode, "ring-path"]),
18
+ return (t, e) => (y(), T("div", _s, [
19
+ (y(), T("svg", Rs, [
20
+ v("circle", {
21
+ class: A([l.colorMode, "ring-path"]),
22
22
  cx: "50",
23
23
  cy: "50",
24
24
  r: "20",
@@ -30,23 +30,26 @@ const _s = { class: "spinner max-w-sm" }, Rs = {
30
30
  ]))
31
31
  ]));
32
32
  }
33
- }), an = class an extends Ss {
33
+ }), Ds = [
34
+ { pattern: /\bNO_REP\w*\b/g, label: "NO_REPLY — bot chose not to respond" },
35
+ { pattern: /\bHEARTBEAT_OK\b/g, label: "HEARTBEAT_OK — scheduled check, nothing to do" }
36
+ ], Cs = 9e4, an = class an extends Ss {
34
37
  constructor(e) {
35
38
  super("AgentChatController", e);
36
- R(this, "isTextMode", !1);
37
- R(this, "lastMessage", { hash: "", time: 0 });
38
- R(this, "isConnecting", !1);
39
+ D(this, "isTextMode", !1);
40
+ D(this, "lastMessage", { hash: "", time: 0 });
41
+ D(this, "isConnecting", !1);
39
42
  // Chat conversation tracking (server-managed persistence)
40
- R(this, "conversationId");
41
- R(this, "textState", K({
43
+ D(this, "conversationId");
44
+ D(this, "textState", Q({
42
45
  isActive: !1,
43
46
  isConnected: !1,
44
47
  isThinking: !1,
45
48
  connectionStatus: "disconnected"
46
49
  }));
47
- R(this, "agentMode", K("self"));
48
- R(this, "sharedMessages", K([]));
49
- R(this, "_agent");
50
+ D(this, "agentMode", Q("self"));
51
+ D(this, "sharedMessages", Q([]));
52
+ D(this, "_agent");
50
53
  this._agent = e.agent instanceof xt ? e.agent : new xt({ config: e.agent }), this.setupModeWatcher();
51
54
  }
52
55
  get chatEnabled() {
@@ -56,7 +59,7 @@ const _s = { class: "spinner max-w-sm" }, Rs = {
56
59
  return this._agent.chatUnavailable.value;
57
60
  }
58
61
  mapChatError(e) {
59
- return e.includes("429") || e.includes("Too many") ? "Too many messages. Please wait a moment." : e.includes("503") || e.includes("not available") ? "Agent is currently offline." : e.includes("timed out") || e.includes("starting up") ? "Agent is starting up. Please try again." : e.includes("404") ? "Agent not found." : "Something went wrong. Please try again.";
62
+ return e.includes("429") || e.includes("Too many") ? "Too many messages. Please wait a moment." : e.includes("503") || e.includes("not available") ? "Agent is currently offline." : e.includes("timed out") ? "This request timed out. Try again in a few minutes." : e.includes("starting up") ? "Agent is starting up. Please try again." : e.includes("404") ? "Agent not found." : "Something went wrong. Please try again.";
60
63
  }
61
64
  isTransientError(e) {
62
65
  return e.includes("timed out") || e.includes("starting up") || e.includes("503");
@@ -100,7 +103,7 @@ Current User:
100
103
  });
101
104
  }
102
105
  setupModeWatcher() {
103
- Ke(this.agentMode, async (e, n) => {
106
+ Qe(this.agentMode, async (e, n) => {
104
107
  this.logger.info(`Mode changed from ${n} to ${e}`), this.isTextMode && (n === "talk" || n === "chat") && await this.endConversation();
105
108
  });
106
109
  }
@@ -160,53 +163,61 @@ Current User:
160
163
  return;
161
164
  }
162
165
  this.addMessage(e, "user", n), this.updateState(this.textState, { isThinking: !0 });
163
- const a = `stream-${Date.now()}`, o = /* @__PURE__ */ h((u) => {
164
- this.textState.value.isThinking && (this.updateState(this.textState, { isThinking: !1 }), this.sharedMessages.value = [
166
+ const a = `stream-${Date.now()}`;
167
+ let o = !1;
168
+ const c = /* @__PURE__ */ u((g) => {
169
+ o || (o = !0, this.sharedMessages.value = [
165
170
  ...this.sharedMessages.value,
166
171
  { id: a, text: "", sender: "agent", timestamp: /* @__PURE__ */ new Date() }
167
172
  ]);
168
- const g = this.sharedMessages.value, m = g[g.length - 1];
169
- m?.id === a && (m.text += u, this.sharedMessages.value = [...g]);
170
- }, "onDelta"), c = /* @__PURE__ */ h((u) => {
171
- u && (this.conversationId = u), this.updateState(this.textState, { isThinking: !1 });
172
- }, "onDone"), f = /* @__PURE__ */ h((u) => {
173
- const g = this.sharedMessages.value, m = g[g.length - 1];
174
- m?.id === a && !m.text && (this.sharedMessages.value = g.slice(0, -1));
175
- const S = this.mapChatError(u);
176
- this.isTransientError(u) ? (this.addMessage(S, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(S));
177
- }, "onError"), d = /* @__PURE__ */ h((u) => {
178
- this.addMessage(u, "system");
173
+ const m = this.sharedMessages.value, w = m[m.length - 1];
174
+ w?.id === a && (w.text += g, this.sharedMessages.value = [...m]);
175
+ }, "onDelta"), f = /* @__PURE__ */ u((g) => {
176
+ const m = this.sharedMessages.value, w = m[m.length - 1];
177
+ if (w?.id === a && w.text) {
178
+ let S = w.text;
179
+ for (const O of Ds)
180
+ O.pattern.test(S) && (console.debug(`[chat] filtered directive: ${O.label}`), S = S.replace(O.pattern, "").trim(), O.pattern.lastIndex = 0);
181
+ S ? S !== w.text && (w.text = S, this.sharedMessages.value = [...m]) : this.sharedMessages.value = m.slice(0, -1);
182
+ }
183
+ g && (this.conversationId = g), this.updateState(this.textState, { isThinking: !1 });
184
+ }, "onDone"), d = /* @__PURE__ */ u((g) => {
185
+ const m = this.sharedMessages.value, w = m[m.length - 1];
186
+ w?.id === a && !w.text && (this.sharedMessages.value = m.slice(0, -1));
187
+ const S = this.mapChatError(g);
188
+ this.isTransientError(g) ? (this.addMessage(S, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(S));
189
+ }, "onError"), p = /* @__PURE__ */ u((g) => {
190
+ this.addMessage(g, "system");
179
191
  }, "onStatus");
180
192
  try {
181
- if (s)
182
- await s({
183
- message: e,
184
- attachments: n,
185
- conversationId: this.conversationId,
186
- history: this.buildHistory(),
187
- onDelta: o,
188
- onDone: c,
189
- onError: f,
190
- onStatus: d
191
- });
192
- else {
193
- const { context: u } = this.getDynamicSettings();
194
- await r.chatStream({
195
- handle: this._agent.handle.value,
196
- message: e,
197
- attachments: n,
198
- conversationId: this.conversationId,
199
- history: this.buildHistory(),
200
- visitorId: r.generateAnonId(),
201
- context: u || void 0,
202
- onDelta: o,
203
- onDone: c,
204
- onError: f,
205
- onStatus: d
206
- });
207
- }
208
- } catch (u) {
209
- this.handleError(u);
193
+ const g = s ? s({
194
+ message: e,
195
+ attachments: n,
196
+ conversationId: this.conversationId,
197
+ history: this.buildHistory(),
198
+ onDelta: c,
199
+ onDone: f,
200
+ onError: d,
201
+ onStatus: p
202
+ }) : r.chatStream({
203
+ handle: this._agent.handle.value,
204
+ message: e,
205
+ attachments: n,
206
+ conversationId: this.conversationId,
207
+ history: this.buildHistory(),
208
+ visitorId: r.generateAnonId(),
209
+ context: this.getDynamicSettings().context || void 0,
210
+ onDelta: c,
211
+ onDone: f,
212
+ onError: d,
213
+ onStatus: p
214
+ });
215
+ await Promise.race([
216
+ g,
217
+ new Promise((m, w) => setTimeout(() => w(new Error("timed out")), Cs))
218
+ ]);
219
+ } catch (g) {
220
+ d(g.message || "Something went wrong");
210
221
  }
211
222
  }
212
223
  buildHistory() {
@@ -226,30 +237,30 @@ Current User:
226
237
  await this.endConversation();
227
238
  }
228
239
  };
229
- h(an, "AgentChatController");
240
+ u(an, "AgentChatController");
230
241
  let Dn = an;
231
242
  function Cn(l) {
232
243
  return l ? typeof l == "string" ? l : l.src || "" : "";
233
244
  }
234
- h(Cn, "getImageSrc");
235
- function Ri(l) {
245
+ u(Cn, "getImageSrc");
246
+ function Ci(l) {
236
247
  return Cn(l.cover) || Cn(l.avatar) || Zn(l.name);
237
248
  }
238
- h(Ri, "getAgentAvatarUrl");
249
+ u(Ci, "getAgentAvatarUrl");
239
250
  function In(l) {
240
251
  const t = l.target;
241
252
  t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = Zn());
242
253
  }
243
- h(In, "handleImageError");
244
- function Di(l) {
254
+ u(In, "handleImageError");
255
+ function Ii(l) {
245
256
  const { template: t, agent: e } = l;
246
257
  return t.replace(/{name}/g, e.name || "Digital Agent").replace(/{title}/g, e.title || "").replace(/{handle}/g, e.handle || "").replace(/{orgName}/g, e.org?.name || "");
247
258
  }
248
- h(Di, "parseButtonTemplate");
249
- const Ds = {
259
+ u(Ii, "parseButtonTemplate");
260
+ const Is = {
250
261
  key: 0,
251
262
  class: "absolute inset-0 flex items-center justify-center"
252
- }, Ci = /* @__PURE__ */ _e({
263
+ }, Mi = /* @__PURE__ */ _e({
253
264
  __name: "ElAgentButton",
254
265
  props: {
255
266
  theme: { default: "primary" },
@@ -273,28 +284,28 @@ const Ds = {
273
284
  md: "size-4",
274
285
  lg: "size-5"
275
286
  })[l.size]);
276
- return (s, r) => (v(), y("button", {
277
- class: T(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, e.value]])
287
+ return (s, r) => (y(), T("button", {
288
+ class: A(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, e.value]])
278
289
  }, [
279
- l.loading ? (v(), y("div", Ds, [...r[0] || (r[0] = [
280
- w("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
290
+ l.loading ? (y(), T("div", Is, [...r[0] || (r[0] = [
291
+ v("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
281
292
  ])])) : H("", !0),
282
- w("span", {
283
- class: T(["flex items-center gap-2 transition-opacity duration-200", l.loading ? "opacity-0" : "opacity-100"])
293
+ v("span", {
294
+ class: A(["flex items-center gap-2 transition-opacity duration-200", l.loading ? "opacity-0" : "opacity-100"])
284
295
  }, [
285
- l.icon ? (v(), y("i", {
296
+ l.icon ? (y(), T("i", {
286
297
  key: 0,
287
- class: T([l.icon, n.value])
298
+ class: A([l.icon, n.value])
288
299
  }, null, 2)) : H("", !0),
289
300
  qn(s.$slots, "default"),
290
- l.iconAfter ? (v(), y("i", {
301
+ l.iconAfter ? (y(), T("i", {
291
302
  key: 1,
292
- class: T([l.iconAfter, n.value])
303
+ class: A([l.iconAfter, n.value])
293
304
  }, null, 2)) : H("", !0)
294
305
  ], 2)
295
306
  ], 2));
296
307
  }
297
- }), Cs = ["value"], Ii = /* @__PURE__ */ _e({
308
+ }), Ms = ["value"], Li = /* @__PURE__ */ _e({
298
309
  __name: "AgentInputEmail",
299
310
  props: {
300
311
  modelValue: { default: "" }
@@ -302,7 +313,7 @@ const Ds = {
302
313
  emits: ["update:modelValue"],
303
314
  setup(l, { emit: t }) {
304
315
  const e = t;
305
- return (n, s) => (v(), y("input", {
316
+ return (n, s) => (y(), T("input", {
306
317
  type: "email",
307
318
  autocomplete: "email",
308
319
  placeholder: "Enter Your Email",
@@ -310,9 +321,9 @@ const Ds = {
310
321
  class: "w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-all",
311
322
  style: { "font-size": "16px" },
312
323
  onInput: s[0] || (s[0] = (r) => e("update:modelValue", r.target.value))
313
- }, null, 40, Cs));
324
+ }, null, 40, Ms));
314
325
  }
315
- }), Is = { class: "flex gap-1.5 justify-center" }, Ms = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], Mi = /* @__PURE__ */ _e({
326
+ }), Ls = { class: "flex gap-1.5 justify-center" }, zs = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], zi = /* @__PURE__ */ _e({
316
327
  __name: "AgentInputOneTimeCode",
317
328
  props: {
318
329
  modelValue: {},
@@ -321,16 +332,16 @@ const Ds = {
321
332
  },
322
333
  emits: ["update:modelValue", "autoSubmit"],
323
334
  setup(l, { emit: t }) {
324
- const e = l, n = t, s = K([]), r = K(Array.from({ length: e.length }).fill("")), a = K(!1);
335
+ const e = l, n = t, s = Q([]), r = Q(Array.from({ length: e.length }).fill("")), a = Q(!1);
325
336
  Zt(() => {
326
337
  e.modelValue && (r.value = e.modelValue.split("").slice(0, e.length)), e.focusFirst && !("ontouchstart" in window) && s.value[0]?.focus();
327
- }), Ke(() => e.modelValue, (u) => {
328
- r.value = u ? u.split("").slice(0, e.length) : Array.from({ length: e.length }).fill("");
329
- }), Ke(r, () => {
330
- const u = r.value.filter(Boolean).join("");
331
- n("update:modelValue", u), u.length === e.length && n("autoSubmit", u);
338
+ }), Qe(() => e.modelValue, (p) => {
339
+ r.value = p ? p.split("").slice(0, e.length) : Array.from({ length: e.length }).fill("");
340
+ }), Qe(r, () => {
341
+ const p = r.value.filter(Boolean).join("");
342
+ n("update:modelValue", p), p.length === e.length && n("autoSubmit", p);
332
343
  }, { deep: !0 });
333
- function o(u, g) {
344
+ function o(p, g) {
334
345
  g.preventDefault(), a.value = !0;
335
346
  const m = (g.clipboardData?.getData("text") || "").replace(/\D/g, "");
336
347
  if (m.length === e.length)
@@ -338,56 +349,56 @@ const Ds = {
338
349
  s.value[e.length - 1]?.focus(), a.value = !1;
339
350
  }, 10);
340
351
  else {
341
- const S = [...r.value];
342
- m.split("").slice(0, e.length - u).forEach(($, me) => {
343
- S[u + me] = $;
344
- }), r.value = S;
345
- const D = Math.min(u + m.length, e.length - 1);
352
+ const w = [...r.value];
353
+ m.split("").slice(0, e.length - p).forEach((O, me) => {
354
+ w[p + me] = O;
355
+ }), r.value = w;
356
+ const S = Math.min(p + m.length, e.length - 1);
346
357
  setTimeout(() => {
347
- s.value[D]?.focus(), a.value = !1;
358
+ s.value[S]?.focus(), a.value = !1;
348
359
  }, 10);
349
360
  }
350
361
  }
351
- h(o, "onPaste");
352
- function c(u, g) {
362
+ u(o, "onPaste");
363
+ function c(p, g) {
353
364
  const m = g.target.value.slice(-1).replace(/\D/g, "");
354
- r.value[u] = m, m && u < e.length - 1 && s.value[u + 1]?.focus();
365
+ r.value[p] = m, m && p < e.length - 1 && s.value[p + 1]?.focus();
355
366
  }
356
- h(c, "onInput");
357
- function f(u, g) {
358
- g.key === "Backspace" ? (g.preventDefault(), r.value[u] = "", u > 0 && s.value[u - 1]?.focus()) : g.key === "ArrowLeft" && u > 0 ? s.value[u - 1]?.focus() : g.key === "ArrowRight" && u < e.length - 1 && s.value[u + 1]?.focus();
367
+ u(c, "onInput");
368
+ function f(p, g) {
369
+ g.key === "Backspace" ? (g.preventDefault(), r.value[p] = "", p > 0 && s.value[p - 1]?.focus()) : g.key === "ArrowLeft" && p > 0 ? s.value[p - 1]?.focus() : g.key === "ArrowRight" && p < e.length - 1 && s.value[p + 1]?.focus();
359
370
  }
360
- h(f, "onKeydown");
361
- function d(u) {
362
- if (s.value[u]?.select(), !a.value && r.value[u])
363
- for (let g = u; g < e.length; g++)
371
+ u(f, "onKeydown");
372
+ function d(p) {
373
+ if (s.value[p]?.select(), !a.value && r.value[p])
374
+ for (let g = p; g < e.length; g++)
364
375
  r.value[g] = "";
365
376
  }
366
- return h(d, "onFocus"), (u, g) => (v(), y("div", Is, [
367
- (v(!0), y(Se, null, dt(l.length, (m) => Vn((v(), y("input", {
377
+ return u(d, "onFocus"), (p, g) => (y(), T("div", Ls, [
378
+ (y(!0), T(Se, null, dt(l.length, (m) => Vn((y(), T("input", {
368
379
  key: m,
369
380
  ref_for: !0,
370
- ref: /* @__PURE__ */ h((S) => s.value[m - 1] = S, "ref"),
371
- "onUpdate:modelValue": /* @__PURE__ */ h((S) => r.value[m - 1] = S, "onUpdate:modelValue"),
381
+ ref: /* @__PURE__ */ u((w) => s.value[m - 1] = w, "ref"),
382
+ "onUpdate:modelValue": /* @__PURE__ */ u((w) => r.value[m - 1] = w, "onUpdate:modelValue"),
372
383
  type: "text",
373
384
  inputmode: "numeric",
374
385
  autocomplete: "one-time-code",
375
386
  class: "size-11 text-center font-mono text-theme-900 bg-white border border-white rounded-lg focus:outline-none transition-all",
376
387
  style: { "font-size": "16px" },
377
388
  maxlength: "1",
378
- onInput: /* @__PURE__ */ h((S) => c(m - 1, S), "onInput"),
379
- onKeydown: /* @__PURE__ */ h((S) => f(m - 1, S), "onKeydown"),
380
- onPaste: /* @__PURE__ */ h((S) => o(m - 1, S), "onPaste"),
381
- onFocus: /* @__PURE__ */ h((S) => d(m - 1), "onFocus")
382
- }, null, 40, Ms)), [
389
+ onInput: /* @__PURE__ */ u((w) => c(m - 1, w), "onInput"),
390
+ onKeydown: /* @__PURE__ */ u((w) => f(m - 1, w), "onKeydown"),
391
+ onPaste: /* @__PURE__ */ u((w) => o(m - 1, w), "onPaste"),
392
+ onFocus: /* @__PURE__ */ u((w) => d(m - 1), "onFocus")
393
+ }, null, 40, zs)), [
383
394
  [Yn, r.value[m - 1]]
384
395
  ])), 128))
385
396
  ]));
386
397
  }
387
- }), Ls = { class: "relative flex-shrink-0" }, zs = ["src", "alt"], Os = { class: "absolute top-1 right-1" }, Ns = {
398
+ }), Os = { class: "relative flex-shrink-0" }, Ps = ["src", "alt"], Ns = { class: "absolute top-1 right-1" }, $s = {
388
399
  key: 1,
389
400
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
390
- }, Ps = { class: "min-w-0" }, $s = /* @__PURE__ */ _e({
401
+ }, Us = { class: "min-w-0" }, Bs = /* @__PURE__ */ _e({
391
402
  __name: "ElModeHeader",
392
403
  props: {
393
404
  agent: {},
@@ -396,42 +407,42 @@ const Ds = {
396
407
  layout: { default: "centered" }
397
408
  },
398
409
  setup(l) {
399
- return (t, e) => (v(), y("div", {
400
- class: T(["flex gap-4", [
410
+ return (t, e) => (y(), T("div", {
411
+ class: A(["flex gap-4", [
401
412
  l.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
402
413
  ]])
403
414
  }, [
404
- w("div", Ls, [
405
- w("div", {
406
- class: T(["rounded-full overflow-hidden border-white", l.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
415
+ v("div", Os, [
416
+ v("div", {
417
+ class: A(["rounded-full overflow-hidden border-white", l.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
407
418
  }, [
408
- w("img", {
419
+ v("img", {
409
420
  src: l.agent.avatarUrl.value,
410
421
  alt: l.agent.displayName.value,
411
422
  class: "w-full h-full object-cover",
412
423
  onError: e[0] || (e[0] = //@ts-ignore
413
424
  (...n) => jt(In) && jt(In)(...n))
414
- }, null, 40, zs)
425
+ }, null, 40, Ps)
415
426
  ], 2),
416
- w("div", Os, [
417
- l.isOnline ? (v(), y(Se, { key: 0 }, [
418
- e[1] || (e[1] = w("div", {
427
+ v("div", Ns, [
428
+ l.isOnline ? (y(), T(Se, { key: 0 }, [
429
+ e[1] || (e[1] = v("div", {
419
430
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
420
431
  style: { "animation-duration": "3s" }
421
432
  }, null, -1)),
422
- e[2] || (e[2] = w("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
423
- ], 64)) : (v(), y("div", Ns))
433
+ e[2] || (e[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
434
+ ], 64)) : (y(), T("div", $s))
424
435
  ])
425
436
  ]),
426
- w("div", Ps, [
427
- w("h1", {
428
- class: T(["font-light text-white mb-1 truncate", [
437
+ v("div", Us, [
438
+ v("h1", {
439
+ class: A(["font-light text-white mb-1 truncate", [
429
440
  l.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
430
441
  l.layout === "horizontal" ? "text-white/95" : ""
431
442
  ]])
432
443
  }, ce(l.agent.displayName.value), 3),
433
- w("p", {
434
- class: T(["font-light line-clamp-1", [
444
+ v("p", {
445
+ class: A(["font-light line-clamp-1", [
435
446
  l.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
436
447
  l.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
437
448
  ]])
@@ -443,9 +454,9 @@ const Ds = {
443
454
  const {
444
455
  entries: Xn,
445
456
  setPrototypeOf: Mn,
446
- isFrozen: Us,
447
- getPrototypeOf: Bs,
448
- getOwnPropertyDescriptor: Fs
457
+ isFrozen: Fs,
458
+ getPrototypeOf: Hs,
459
+ getOwnPropertyDescriptor: Gs
449
460
  } = Object;
450
461
  let {
451
462
  freeze: Z,
@@ -455,23 +466,23 @@ let {
455
466
  apply: qt,
456
467
  construct: Vt
457
468
  } = typeof Reflect < "u" && Reflect;
458
- Z || (Z = /* @__PURE__ */ h(function(t) {
469
+ Z || (Z = /* @__PURE__ */ u(function(t) {
459
470
  return t;
460
471
  }, "freeze"));
461
- ee || (ee = /* @__PURE__ */ h(function(t) {
472
+ ee || (ee = /* @__PURE__ */ u(function(t) {
462
473
  return t;
463
474
  }, "seal"));
464
- qt || (qt = /* @__PURE__ */ h(function(t, e) {
475
+ qt || (qt = /* @__PURE__ */ u(function(t, e) {
465
476
  for (var n = arguments.length, s = new Array(n > 2 ? n - 2 : 0), r = 2; r < n; r++)
466
477
  s[r - 2] = arguments[r];
467
478
  return t.apply(e, s);
468
479
  }, "apply"));
469
- Vt || (Vt = /* @__PURE__ */ h(function(t) {
480
+ Vt || (Vt = /* @__PURE__ */ u(function(t) {
470
481
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), s = 1; s < e; s++)
471
482
  n[s - 1] = arguments[s];
472
483
  return new t(...n);
473
484
  }, "construct"));
474
- const ht = X(Array.prototype.forEach), Hs = X(Array.prototype.lastIndexOf), Ln = X(Array.prototype.pop), We = X(Array.prototype.push), Gs = X(Array.prototype.splice), mt = X(String.prototype.toLowerCase), Ut = X(String.prototype.toString), Bt = X(String.prototype.match), je = X(String.prototype.replace), Ws = X(String.prototype.indexOf), js = X(String.prototype.trim), J = X(Object.prototype.hasOwnProperty), V = X(RegExp.prototype.test), qe = qs(TypeError);
485
+ const ht = X(Array.prototype.forEach), Ws = X(Array.prototype.lastIndexOf), Ln = X(Array.prototype.pop), We = X(Array.prototype.push), js = X(Array.prototype.splice), mt = X(String.prototype.toLowerCase), Ut = X(String.prototype.toString), Bt = X(String.prototype.match), je = X(String.prototype.replace), qs = X(String.prototype.indexOf), Vs = X(String.prototype.trim), J = X(Object.prototype.hasOwnProperty), V = X(RegExp.prototype.test), qe = Ys(TypeError);
475
486
  function X(l) {
476
487
  return function(t) {
477
488
  t instanceof RegExp && (t.lastIndex = 0);
@@ -480,16 +491,16 @@ function X(l) {
480
491
  return qt(l, t, n);
481
492
  };
482
493
  }
483
- h(X, "unapply");
484
- function qs(l) {
494
+ u(X, "unapply");
495
+ function Ys(l) {
485
496
  return function() {
486
497
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
487
498
  e[n] = arguments[n];
488
499
  return Vt(l, e);
489
500
  };
490
501
  }
491
- h(qs, "unconstruct");
492
- function _(l, t) {
502
+ u(Ys, "unconstruct");
503
+ function R(l, t) {
493
504
  let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : mt;
494
505
  Mn && Mn(l, null);
495
506
  let n = t.length;
@@ -497,62 +508,62 @@ function _(l, t) {
497
508
  let s = t[n];
498
509
  if (typeof s == "string") {
499
510
  const r = e(s);
500
- r !== s && (Us(t) || (t[n] = r), s = r);
511
+ r !== s && (Fs(t) || (t[n] = r), s = r);
501
512
  }
502
513
  l[s] = !0;
503
514
  }
504
515
  return l;
505
516
  }
506
- h(_, "addToSet");
507
- function Vs(l) {
517
+ u(R, "addToSet");
518
+ function Zs(l) {
508
519
  for (let t = 0; t < l.length; t++)
509
520
  J(l, t) || (l[t] = null);
510
521
  return l;
511
522
  }
512
- h(Vs, "cleanArray");
523
+ u(Zs, "cleanArray");
513
524
  function le(l) {
514
525
  const t = gt(null);
515
526
  for (const [e, n] of Xn(l))
516
- J(l, e) && (Array.isArray(n) ? t[e] = Vs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = le(n) : t[e] = n);
527
+ J(l, e) && (Array.isArray(n) ? t[e] = Zs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = le(n) : t[e] = n);
517
528
  return t;
518
529
  }
519
- h(le, "clone");
530
+ u(le, "clone");
520
531
  function Ve(l, t) {
521
532
  for (; l !== null; ) {
522
- const n = Fs(l, t);
533
+ const n = Gs(l, t);
523
534
  if (n) {
524
535
  if (n.get)
525
536
  return X(n.get);
526
537
  if (typeof n.value == "function")
527
538
  return X(n.value);
528
539
  }
529
- l = Bs(l);
540
+ l = Hs(l);
530
541
  }
531
542
  function e() {
532
543
  return null;
533
544
  }
534
- return h(e, "fallbackValue"), e;
545
+ return u(e, "fallbackValue"), e;
535
546
  }
536
- h(Ve, "lookupGetter");
537
- const zn = Z(["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"]), Ft = Z(["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"]), Ht = Z(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ys = Z(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Gt = Z(["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"]), Zs = Z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), On = Z(["#text"]), Nn = Z(["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", "slot"]), Wt = Z(["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"]), Pn = Z(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "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"]), pt = Z(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Xs = ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Qs = ee(/<%[\w\W]*|[\w\W]*%>/gm), Ks = ee(/\$\{[\w\W]*/gm), Js = ee(/^data-[\-\w.\u00B7-\uFFFF]+$/), er = ee(/^aria-[\-\w]+$/), Qn = ee(
547
+ u(Ve, "lookupGetter");
548
+ const zn = Z(["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"]), Ft = Z(["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"]), Ht = Z(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Xs = Z(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Gt = Z(["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"]), Ks = Z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), On = Z(["#text"]), Pn = Z(["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", "slot"]), Wt = Z(["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"]), Nn = Z(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "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"]), pt = Z(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Qs = ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Js = ee(/<%[\w\W]*|[\w\W]*%>/gm), er = ee(/\$\{[\w\W]*/gm), tr = ee(/^data-[\-\w.\u00B7-\uFFFF]+$/), nr = ee(/^aria-[\-\w]+$/), Kn = ee(
538
549
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
539
550
  // eslint-disable-line no-useless-escape
540
- ), tr = ee(/^(?:\w+script|data):/i), nr = ee(
551
+ ), sr = ee(/^(?:\w+script|data):/i), rr = ee(
541
552
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
542
553
  // eslint-disable-line no-control-regex
543
- ), Kn = ee(/^html$/i), sr = ee(/^[a-z][.\w]*(-[.\w]+)+$/i);
554
+ ), Qn = ee(/^html$/i), ir = ee(/^[a-z][.\w]*(-[.\w]+)+$/i);
544
555
  var $n = /* @__PURE__ */ Object.freeze({
545
556
  __proto__: null,
546
- ARIA_ATTR: er,
547
- ATTR_WHITESPACE: nr,
548
- CUSTOM_ELEMENT: sr,
549
- DATA_ATTR: Js,
550
- DOCTYPE_NAME: Kn,
551
- ERB_EXPR: Qs,
552
- IS_ALLOWED_URI: Qn,
553
- IS_SCRIPT_OR_DATA: tr,
554
- MUSTACHE_EXPR: Xs,
555
- TMPLIT_EXPR: Ks
557
+ ARIA_ATTR: nr,
558
+ ATTR_WHITESPACE: rr,
559
+ CUSTOM_ELEMENT: ir,
560
+ DATA_ATTR: tr,
561
+ DOCTYPE_NAME: Qn,
562
+ ERB_EXPR: Js,
563
+ IS_ALLOWED_URI: Kn,
564
+ IS_SCRIPT_OR_DATA: sr,
565
+ MUSTACHE_EXPR: Qs,
566
+ TMPLIT_EXPR: er
556
567
  });
557
568
  const Ye = {
558
569
  element: 1,
@@ -561,9 +572,9 @@ const Ye = {
561
572
  progressingInstruction: 7,
562
573
  comment: 8,
563
574
  document: 9
564
- }, rr = /* @__PURE__ */ h(function() {
575
+ }, ar = /* @__PURE__ */ u(function() {
565
576
  return typeof window > "u" ? null : window;
566
- }, "getGlobal"), ir = /* @__PURE__ */ h(function(t, e) {
577
+ }, "getGlobal"), lr = /* @__PURE__ */ u(function(t, e) {
567
578
  if (typeof t != "object" || typeof t.createPolicy != "function")
568
579
  return null;
569
580
  let n = null;
@@ -582,7 +593,7 @@ const Ye = {
582
593
  } catch {
583
594
  return console.warn("TrustedTypes policy " + r + " could not be created."), null;
584
595
  }
585
- }, "_createTrustedTypesPolicy"), Un = /* @__PURE__ */ h(function() {
596
+ }, "_createTrustedTypesPolicy"), Un = /* @__PURE__ */ u(function() {
586
597
  return {
587
598
  afterSanitizeAttributes: [],
588
599
  afterSanitizeElements: [],
@@ -596,8 +607,8 @@ const Ye = {
596
607
  };
597
608
  }, "_createHooksMap");
598
609
  function Jn() {
599
- let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : rr();
600
- const t = /* @__PURE__ */ h((k) => Jn(k), "DOMPurify");
610
+ let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ar();
611
+ const t = /* @__PURE__ */ u((k) => Jn(k), "DOMPurify");
601
612
  if (t.version = "3.3.3", t.removed = [], !l || !l.document || l.document.nodeType !== Ye.document || !l.Element)
602
613
  return t.isSupported = !1, t;
603
614
  let {
@@ -610,10 +621,10 @@ function Jn() {
610
621
  Element: c,
611
622
  NodeFilter: f,
612
623
  NamedNodeMap: d = l.NamedNodeMap || l.MozNamedAttrMap,
613
- HTMLFormElement: u,
624
+ HTMLFormElement: p,
614
625
  DOMParser: g,
615
626
  trustedTypes: m
616
- } = l, S = c.prototype, D = Ve(S, "cloneNode"), $ = Ve(S, "remove"), me = Ve(S, "nextSibling"), xe = Ve(S, "childNodes"), te = Ve(S, "parentNode");
627
+ } = l, w = c.prototype, S = Ve(w, "cloneNode"), O = Ve(w, "remove"), me = Ve(w, "nextSibling"), xe = Ve(w, "childNodes"), te = Ve(w, "parentNode");
617
628
  if (typeof a == "function") {
618
629
  const k = e.createElement("template");
619
630
  k.content && k.content.ownerDocument && (e = k.content.ownerDocument);
@@ -637,15 +648,15 @@ function Jn() {
637
648
  ARIA_ATTR: At,
638
649
  IS_SCRIPT_OR_DATA: nt,
639
650
  ATTR_WHITESPACE: Fe,
640
- CUSTOM_ELEMENT: A
651
+ CUSTOM_ELEMENT: E
641
652
  } = $n;
642
653
  let {
643
- IS_ALLOWED_URI: E
654
+ IS_ALLOWED_URI: _
644
655
  } = $n, b = null;
645
- const z = _({}, [...zn, ...Ft, ...Ht, ...Gt, ...On]);
656
+ const z = R({}, [...zn, ...Ft, ...Ht, ...Gt, ...On]);
646
657
  let I = null;
647
- const he = _({}, [...Nn, ...Wt, ...Pn, ...pt]);
648
- let O = Object.seal(gt(null, {
658
+ const he = R({}, [...Pn, ...Wt, ...Nn, ...pt]);
659
+ let P = Object.seal(gt(null, {
649
660
  tagNameCheck: {
650
661
  writable: !0,
651
662
  configurable: !1,
@@ -682,99 +693,99 @@ function Jn() {
682
693
  let ln = !0, Et = !0, on = !1, cn = !0, De = !1, rt = !0, ye = !1, _t = !1, Rt = !1, Ce = !1, it = !1, at = !1, un = !0, hn = !1;
683
694
  const ps = "user-content-";
684
695
  let Dt = !0, He = !1, Ie = {}, ie = null;
685
- const Ct = _({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
696
+ const Ct = R({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
686
697
  let pn = null;
687
- const fn = _({}, ["audio", "video", "img", "source", "image", "track"]);
698
+ const fn = R({}, ["audio", "video", "img", "source", "image", "track"]);
688
699
  let It = null;
689
- const dn = _({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), lt = "http://www.w3.org/1998/Math/MathML", ot = "http://www.w3.org/2000/svg", fe = "http://www.w3.org/1999/xhtml";
700
+ const dn = R({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), lt = "http://www.w3.org/1998/Math/MathML", ot = "http://www.w3.org/2000/svg", fe = "http://www.w3.org/1999/xhtml";
690
701
  let Me = fe, Mt = !1, Lt = null;
691
- const fs = _({}, [lt, ot, fe], Ut);
692
- let ct = _({}, ["mi", "mo", "mn", "ms", "mtext"]), ut = _({}, ["annotation-xml"]);
693
- const ds = _({}, ["title", "style", "font", "a", "script"]);
702
+ const fs = R({}, [lt, ot, fe], Ut);
703
+ let ct = R({}, ["mi", "mo", "mn", "ms", "mtext"]), ut = R({}, ["annotation-xml"]);
704
+ const ds = R({}, ["title", "style", "font", "a", "script"]);
694
705
  let Ge = null;
695
706
  const gs = ["application/xhtml+xml", "text/html"], ms = "text/html";
696
707
  let B = null, Le = null;
697
- const xs = e.createElement("form"), gn = /* @__PURE__ */ h(function(i) {
708
+ const xs = e.createElement("form"), gn = /* @__PURE__ */ u(function(i) {
698
709
  return i instanceof RegExp || i instanceof Function;
699
- }, "isRegexOrFunction"), zt = /* @__PURE__ */ h(function() {
710
+ }, "isRegexOrFunction"), zt = /* @__PURE__ */ u(function() {
700
711
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
701
712
  if (!(Le && Le === i)) {
702
713
  if ((!i || typeof i != "object") && (i = {}), i = le(i), Ge = // eslint-disable-next-line unicorn/prefer-includes
703
- gs.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? ms : i.PARSER_MEDIA_TYPE, B = Ge === "application/xhtml+xml" ? Ut : mt, b = J(i, "ALLOWED_TAGS") ? _({}, i.ALLOWED_TAGS, B) : z, I = J(i, "ALLOWED_ATTR") ? _({}, i.ALLOWED_ATTR, B) : he, Lt = J(i, "ALLOWED_NAMESPACES") ? _({}, i.ALLOWED_NAMESPACES, Ut) : fs, It = J(i, "ADD_URI_SAFE_ATTR") ? _(le(dn), i.ADD_URI_SAFE_ATTR, B) : dn, pn = J(i, "ADD_DATA_URI_TAGS") ? _(le(fn), i.ADD_DATA_URI_TAGS, B) : fn, ie = J(i, "FORBID_CONTENTS") ? _({}, i.FORBID_CONTENTS, B) : Ct, pe = J(i, "FORBID_TAGS") ? _({}, i.FORBID_TAGS, B) : le({}), st = J(i, "FORBID_ATTR") ? _({}, i.FORBID_ATTR, B) : le({}), Ie = J(i, "USE_PROFILES") ? i.USE_PROFILES : !1, ln = i.ALLOW_ARIA_ATTR !== !1, Et = i.ALLOW_DATA_ATTR !== !1, on = i.ALLOW_UNKNOWN_PROTOCOLS || !1, cn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, De = i.SAFE_FOR_TEMPLATES || !1, rt = i.SAFE_FOR_XML !== !1, ye = i.WHOLE_DOCUMENT || !1, Ce = i.RETURN_DOM || !1, it = i.RETURN_DOM_FRAGMENT || !1, at = i.RETURN_TRUSTED_TYPE || !1, Rt = i.FORCE_BODY || !1, un = i.SANITIZE_DOM !== !1, hn = i.SANITIZE_NAMED_PROPS || !1, Dt = i.KEEP_CONTENT !== !1, He = i.IN_PLACE || !1, E = i.ALLOWED_URI_REGEXP || Qn, Me = i.NAMESPACE || fe, ct = i.MATHML_TEXT_INTEGRATION_POINTS || ct, ut = i.HTML_INTEGRATION_POINTS || ut, O = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && gn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (O.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && gn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (O.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (O.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), De && (Et = !1), it && (Ce = !0), Ie && (b = _({}, On), I = gt(null), Ie.html === !0 && (_(b, zn), _(I, Nn)), Ie.svg === !0 && (_(b, Ft), _(I, Wt), _(I, pt)), Ie.svgFilters === !0 && (_(b, Ht), _(I, Wt), _(I, pt)), Ie.mathMl === !0 && (_(b, Gt), _(I, Pn), _(I, pt))), J(i, "ADD_TAGS") || (ke.tagCheck = null), J(i, "ADD_ATTR") || (ke.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ke.tagCheck = i.ADD_TAGS : (b === z && (b = le(b)), _(b, i.ADD_TAGS, B))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ke.attributeCheck = i.ADD_ATTR : (I === he && (I = le(I)), _(I, i.ADD_ATTR, B))), i.ADD_URI_SAFE_ATTR && _(It, i.ADD_URI_SAFE_ATTR, B), i.FORBID_CONTENTS && (ie === Ct && (ie = le(ie)), _(ie, i.FORBID_CONTENTS, B)), i.ADD_FORBID_CONTENTS && (ie === Ct && (ie = le(ie)), _(ie, i.ADD_FORBID_CONTENTS, B)), Dt && (b["#text"] = !0), ye && _(b, ["html", "head", "body"]), b.table && (_(b, ["tbody"]), delete pe.tbody), i.TRUSTED_TYPES_POLICY) {
714
+ gs.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? ms : i.PARSER_MEDIA_TYPE, B = Ge === "application/xhtml+xml" ? Ut : mt, b = J(i, "ALLOWED_TAGS") ? R({}, i.ALLOWED_TAGS, B) : z, I = J(i, "ALLOWED_ATTR") ? R({}, i.ALLOWED_ATTR, B) : he, Lt = J(i, "ALLOWED_NAMESPACES") ? R({}, i.ALLOWED_NAMESPACES, Ut) : fs, It = J(i, "ADD_URI_SAFE_ATTR") ? R(le(dn), i.ADD_URI_SAFE_ATTR, B) : dn, pn = J(i, "ADD_DATA_URI_TAGS") ? R(le(fn), i.ADD_DATA_URI_TAGS, B) : fn, ie = J(i, "FORBID_CONTENTS") ? R({}, i.FORBID_CONTENTS, B) : Ct, pe = J(i, "FORBID_TAGS") ? R({}, i.FORBID_TAGS, B) : le({}), st = J(i, "FORBID_ATTR") ? R({}, i.FORBID_ATTR, B) : le({}), Ie = J(i, "USE_PROFILES") ? i.USE_PROFILES : !1, ln = i.ALLOW_ARIA_ATTR !== !1, Et = i.ALLOW_DATA_ATTR !== !1, on = i.ALLOW_UNKNOWN_PROTOCOLS || !1, cn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, De = i.SAFE_FOR_TEMPLATES || !1, rt = i.SAFE_FOR_XML !== !1, ye = i.WHOLE_DOCUMENT || !1, Ce = i.RETURN_DOM || !1, it = i.RETURN_DOM_FRAGMENT || !1, at = i.RETURN_TRUSTED_TYPE || !1, Rt = i.FORCE_BODY || !1, un = i.SANITIZE_DOM !== !1, hn = i.SANITIZE_NAMED_PROPS || !1, Dt = i.KEEP_CONTENT !== !1, He = i.IN_PLACE || !1, _ = i.ALLOWED_URI_REGEXP || Kn, Me = i.NAMESPACE || fe, ct = i.MATHML_TEXT_INTEGRATION_POINTS || ct, ut = i.HTML_INTEGRATION_POINTS || ut, P = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && gn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (P.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && gn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (P.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (P.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), De && (Et = !1), it && (Ce = !0), Ie && (b = R({}, On), I = gt(null), Ie.html === !0 && (R(b, zn), R(I, Pn)), Ie.svg === !0 && (R(b, Ft), R(I, Wt), R(I, pt)), Ie.svgFilters === !0 && (R(b, Ht), R(I, Wt), R(I, pt)), Ie.mathMl === !0 && (R(b, Gt), R(I, Nn), R(I, pt))), J(i, "ADD_TAGS") || (ke.tagCheck = null), J(i, "ADD_ATTR") || (ke.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ke.tagCheck = i.ADD_TAGS : (b === z && (b = le(b)), R(b, i.ADD_TAGS, B))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ke.attributeCheck = i.ADD_ATTR : (I === he && (I = le(I)), R(I, i.ADD_ATTR, B))), i.ADD_URI_SAFE_ATTR && R(It, i.ADD_URI_SAFE_ATTR, B), i.FORBID_CONTENTS && (ie === Ct && (ie = le(ie)), R(ie, i.FORBID_CONTENTS, B)), i.ADD_FORBID_CONTENTS && (ie === Ct && (ie = le(ie)), R(ie, i.ADD_FORBID_CONTENTS, B)), Dt && (b["#text"] = !0), ye && R(b, ["html", "head", "body"]), b.table && (R(b, ["tbody"]), delete pe.tbody), i.TRUSTED_TYPES_POLICY) {
704
715
  if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
705
716
  throw qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
706
717
  if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
707
718
  throw qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
708
719
  U = i.TRUSTED_TYPES_POLICY, q = U.createHTML("");
709
720
  } else
710
- U === void 0 && (U = ir(m, s)), U !== null && typeof q == "string" && (q = U.createHTML(""));
721
+ U === void 0 && (U = lr(m, s)), U !== null && typeof q == "string" && (q = U.createHTML(""));
711
722
  Z && Z(i), Le = i;
712
723
  }
713
- }, "_parseConfig"), mn = _({}, [...Ft, ...Ht, ...Ys]), xn = _({}, [...Gt, ...Zs]), ks = /* @__PURE__ */ h(function(i) {
714
- let p = te(i);
715
- (!p || !p.tagName) && (p = {
724
+ }, "_parseConfig"), mn = R({}, [...Ft, ...Ht, ...Xs]), xn = R({}, [...Gt, ...Ks]), ks = /* @__PURE__ */ u(function(i) {
725
+ let h = te(i);
726
+ (!h || !h.tagName) && (h = {
716
727
  namespaceURI: Me,
717
728
  tagName: "template"
718
729
  });
719
- const x = mt(i.tagName), N = mt(p.tagName);
720
- return Lt[i.namespaceURI] ? i.namespaceURI === ot ? p.namespaceURI === fe ? x === "svg" : p.namespaceURI === lt ? x === "svg" && (N === "annotation-xml" || ct[N]) : !!mn[x] : i.namespaceURI === lt ? p.namespaceURI === fe ? x === "math" : p.namespaceURI === ot ? x === "math" && ut[N] : !!xn[x] : i.namespaceURI === fe ? p.namespaceURI === ot && !ut[N] || p.namespaceURI === lt && !ct[N] ? !1 : !xn[x] && (ds[x] || !mn[x]) : !!(Ge === "application/xhtml+xml" && Lt[i.namespaceURI]) : !1;
721
- }, "_checkValidNamespace"), ae = /* @__PURE__ */ h(function(i) {
730
+ const x = mt(i.tagName), N = mt(h.tagName);
731
+ return Lt[i.namespaceURI] ? i.namespaceURI === ot ? h.namespaceURI === fe ? x === "svg" : h.namespaceURI === lt ? x === "svg" && (N === "annotation-xml" || ct[N]) : !!mn[x] : i.namespaceURI === lt ? h.namespaceURI === fe ? x === "math" : h.namespaceURI === ot ? x === "math" && ut[N] : !!xn[x] : i.namespaceURI === fe ? h.namespaceURI === ot && !ut[N] || h.namespaceURI === lt && !ct[N] ? !1 : !xn[x] && (ds[x] || !mn[x]) : !!(Ge === "application/xhtml+xml" && Lt[i.namespaceURI]) : !1;
732
+ }, "_checkValidNamespace"), ae = /* @__PURE__ */ u(function(i) {
722
733
  We(t.removed, {
723
734
  element: i
724
735
  });
725
736
  try {
726
737
  te(i).removeChild(i);
727
738
  } catch {
728
- $(i);
739
+ O(i);
729
740
  }
730
- }, "_forceRemove"), Te = /* @__PURE__ */ h(function(i, p) {
741
+ }, "_forceRemove"), Te = /* @__PURE__ */ u(function(i, h) {
731
742
  try {
732
743
  We(t.removed, {
733
- attribute: p.getAttributeNode(i),
734
- from: p
744
+ attribute: h.getAttributeNode(i),
745
+ from: h
735
746
  });
736
747
  } catch {
737
748
  We(t.removed, {
738
749
  attribute: null,
739
- from: p
750
+ from: h
740
751
  });
741
752
  }
742
- if (p.removeAttribute(i), i === "is")
753
+ if (h.removeAttribute(i), i === "is")
743
754
  if (Ce || it)
744
755
  try {
745
- ae(p);
756
+ ae(h);
746
757
  } catch {
747
758
  }
748
759
  else
749
760
  try {
750
- p.setAttribute(i, "");
761
+ h.setAttribute(i, "");
751
762
  } catch {
752
763
  }
753
- }, "_removeAttribute"), kn = /* @__PURE__ */ h(function(i) {
754
- let p = null, x = null;
764
+ }, "_removeAttribute"), kn = /* @__PURE__ */ u(function(i) {
765
+ let h = null, x = null;
755
766
  if (Rt)
756
767
  i = "<remove></remove>" + i;
757
768
  else {
758
- const P = Bt(i, /^[\r\n\t ]+/);
759
- x = P && P[0];
769
+ const $ = Bt(i, /^[\r\n\t ]+/);
770
+ x = $ && $[0];
760
771
  }
761
772
  Ge === "application/xhtml+xml" && Me === fe && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
762
773
  const N = U ? U.createHTML(i) : i;
763
774
  if (Me === fe)
764
775
  try {
765
- p = new g().parseFromString(N, Ge);
776
+ h = new g().parseFromString(N, Ge);
766
777
  } catch {
767
778
  }
768
- if (!p || !p.documentElement) {
769
- p = ne.createDocument(Me, "template", null);
779
+ if (!h || !h.documentElement) {
780
+ h = ne.createDocument(Me, "template", null);
770
781
  try {
771
- p.documentElement.innerHTML = Mt ? q : N;
782
+ h.documentElement.innerHTML = Mt ? q : N;
772
783
  } catch {
773
784
  }
774
785
  }
775
- const j = p.body || p.documentElement;
776
- return i && x && j.insertBefore(e.createTextNode(x), j.childNodes[0] || null), Me === fe ? tt.call(p, ye ? "html" : "body")[0] : ye ? p.documentElement : j;
777
- }, "_initDocument"), bn = /* @__PURE__ */ h(function(i) {
786
+ const j = h.body || h.documentElement;
787
+ return i && x && j.insertBefore(e.createTextNode(x), j.childNodes[0] || null), Me === fe ? tt.call(h, ye ? "html" : "body")[0] : ye ? h.documentElement : j;
788
+ }, "_initDocument"), bn = /* @__PURE__ */ u(function(i) {
778
789
  return ue.call(
779
790
  i.ownerDocument || i,
780
791
  i,
@@ -782,19 +793,19 @@ function Jn() {
782
793
  f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION,
783
794
  null
784
795
  );
785
- }, "_createNodeIterator"), Ot = /* @__PURE__ */ h(function(i) {
786
- return i instanceof u && (typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || !(i.attributes instanceof d) || typeof i.removeAttribute != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function");
787
- }, "_isClobbered"), wn = /* @__PURE__ */ h(function(i) {
796
+ }, "_createNodeIterator"), Ot = /* @__PURE__ */ u(function(i) {
797
+ return i instanceof p && (typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || !(i.attributes instanceof d) || typeof i.removeAttribute != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function");
798
+ }, "_isClobbered"), wn = /* @__PURE__ */ u(function(i) {
788
799
  return typeof o == "function" && i instanceof o;
789
800
  }, "_isNode");
790
- function de(k, i, p) {
801
+ function de(k, i, h) {
791
802
  ht(k, (x) => {
792
- x.call(t, i, p, Le);
803
+ x.call(t, i, h, Le);
793
804
  });
794
805
  }
795
- h(de, "_executeHooks");
796
- const vn = /* @__PURE__ */ h(function(i) {
797
- let p = null;
806
+ u(de, "_executeHooks");
807
+ const vn = /* @__PURE__ */ u(function(i) {
808
+ let h = null;
798
809
  if (de(F.beforeSanitizeElements, i, null), Ot(i))
799
810
  return ae(i), !0;
800
811
  const x = B(i.nodeName);
@@ -804,43 +815,43 @@ function Jn() {
804
815
  }), rt && i.hasChildNodes() && !wn(i.firstElementChild) && V(/<[/\w!]/g, i.innerHTML) && V(/<[/\w!]/g, i.textContent) || i.nodeType === Ye.progressingInstruction || rt && i.nodeType === Ye.comment && V(/<[/\w]/g, i.data))
805
816
  return ae(i), !0;
806
817
  if (!(ke.tagCheck instanceof Function && ke.tagCheck(x)) && (!b[x] || pe[x])) {
807
- if (!pe[x] && Tn(x) && (O.tagNameCheck instanceof RegExp && V(O.tagNameCheck, x) || O.tagNameCheck instanceof Function && O.tagNameCheck(x)))
818
+ if (!pe[x] && Tn(x) && (P.tagNameCheck instanceof RegExp && V(P.tagNameCheck, x) || P.tagNameCheck instanceof Function && P.tagNameCheck(x)))
808
819
  return !1;
809
820
  if (Dt && !ie[x]) {
810
821
  const N = te(i) || i.parentNode, j = xe(i) || i.childNodes;
811
822
  if (j && N) {
812
- const P = j.length;
813
- for (let Q = P - 1; Q >= 0; --Q) {
814
- const ge = D(j[Q], !0);
823
+ const $ = j.length;
824
+ for (let K = $ - 1; K >= 0; --K) {
825
+ const ge = S(j[K], !0);
815
826
  ge.__removalCount = (i.__removalCount || 0) + 1, N.insertBefore(ge, me(i));
816
827
  }
817
828
  }
818
829
  }
819
830
  return ae(i), !0;
820
831
  }
821
- return i instanceof c && !ks(i) || (x === "noscript" || x === "noembed" || x === "noframes") && V(/<\/no(script|embed|frames)/i, i.innerHTML) ? (ae(i), !0) : (De && i.nodeType === Ye.text && (p = i.textContent, ht([Ue, L, Be], (N) => {
822
- p = je(p, N, " ");
823
- }), i.textContent !== p && (We(t.removed, {
832
+ return i instanceof c && !ks(i) || (x === "noscript" || x === "noembed" || x === "noframes") && V(/<\/no(script|embed|frames)/i, i.innerHTML) ? (ae(i), !0) : (De && i.nodeType === Ye.text && (h = i.textContent, ht([Ue, L, Be], (N) => {
833
+ h = je(h, N, " ");
834
+ }), i.textContent !== h && (We(t.removed, {
824
835
  element: i.cloneNode()
825
- }), i.textContent = p)), de(F.afterSanitizeElements, i, null), !1);
826
- }, "_sanitizeElements"), yn = /* @__PURE__ */ h(function(i, p, x) {
827
- if (st[p] || un && (p === "id" || p === "name") && (x in e || x in xs))
836
+ }), i.textContent = h)), de(F.afterSanitizeElements, i, null), !1);
837
+ }, "_sanitizeElements"), yn = /* @__PURE__ */ u(function(i, h, x) {
838
+ if (st[h] || un && (h === "id" || h === "name") && (x in e || x in xs))
828
839
  return !1;
829
- if (!(Et && !st[p] && V(St, p))) {
830
- if (!(ln && V(At, p))) {
831
- if (!(ke.attributeCheck instanceof Function && ke.attributeCheck(p, i))) {
832
- if (!I[p] || st[p]) {
840
+ if (!(Et && !st[h] && V(St, h))) {
841
+ if (!(ln && V(At, h))) {
842
+ if (!(ke.attributeCheck instanceof Function && ke.attributeCheck(h, i))) {
843
+ if (!I[h] || st[h]) {
833
844
  if (
834
845
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
835
846
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
836
847
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
837
- !(Tn(i) && (O.tagNameCheck instanceof RegExp && V(O.tagNameCheck, i) || O.tagNameCheck instanceof Function && O.tagNameCheck(i)) && (O.attributeNameCheck instanceof RegExp && V(O.attributeNameCheck, p) || O.attributeNameCheck instanceof Function && O.attributeNameCheck(p, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
848
+ !(Tn(i) && (P.tagNameCheck instanceof RegExp && V(P.tagNameCheck, i) || P.tagNameCheck instanceof Function && P.tagNameCheck(i)) && (P.attributeNameCheck instanceof RegExp && V(P.attributeNameCheck, h) || P.attributeNameCheck instanceof Function && P.attributeNameCheck(h, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
838
849
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
839
- p === "is" && O.allowCustomizedBuiltInElements && (O.tagNameCheck instanceof RegExp && V(O.tagNameCheck, x) || O.tagNameCheck instanceof Function && O.tagNameCheck(x)))
850
+ h === "is" && P.allowCustomizedBuiltInElements && (P.tagNameCheck instanceof RegExp && V(P.tagNameCheck, x) || P.tagNameCheck instanceof Function && P.tagNameCheck(x)))
840
851
  ) return !1;
841
- } else if (!It[p]) {
842
- if (!V(E, je(x, Fe, ""))) {
843
- if (!((p === "src" || p === "xlink:href" || p === "href") && i !== "script" && Ws(x, "data:") === 0 && pn[i])) {
852
+ } else if (!It[h]) {
853
+ if (!V(_, je(x, Fe, ""))) {
854
+ if (!((h === "src" || h === "xlink:href" || h === "href") && i !== "script" && qs(x, "data:") === 0 && pn[i])) {
844
855
  if (!(on && !V(nt, je(x, Fe, "")))) {
845
856
  if (x)
846
857
  return !1;
@@ -852,14 +863,14 @@ function Jn() {
852
863
  }
853
864
  }
854
865
  return !0;
855
- }, "_isValidAttribute"), Tn = /* @__PURE__ */ h(function(i) {
856
- return i !== "annotation-xml" && Bt(i, A);
857
- }, "_isBasicCustomElement"), Sn = /* @__PURE__ */ h(function(i) {
866
+ }, "_isValidAttribute"), Tn = /* @__PURE__ */ u(function(i) {
867
+ return i !== "annotation-xml" && Bt(i, E);
868
+ }, "_isBasicCustomElement"), Sn = /* @__PURE__ */ u(function(i) {
858
869
  de(F.beforeSanitizeAttributes, i, null);
859
870
  const {
860
- attributes: p
871
+ attributes: h
861
872
  } = i;
862
- if (!p || Ot(i))
873
+ if (!h || Ot(i))
863
874
  return;
864
875
  const x = {
865
876
  attrName: "",
@@ -868,30 +879,30 @@ function Jn() {
868
879
  allowedAttributes: I,
869
880
  forceKeepAttr: void 0
870
881
  };
871
- let N = p.length;
882
+ let N = h.length;
872
883
  for (; N--; ) {
873
- const j = p[N], {
874
- name: P,
875
- namespaceURI: Q,
884
+ const j = h[N], {
885
+ name: $,
886
+ namespaceURI: K,
876
887
  value: ge
877
- } = j, ze = B(P), Nt = ge;
878
- let G = P === "value" ? Nt : js(Nt);
879
- if (x.attrName = ze, x.attrValue = G, x.keepAttr = !0, x.forceKeepAttr = void 0, de(F.uponSanitizeAttribute, i, x), G = x.attrValue, hn && (ze === "id" || ze === "name") && (Te(P, i), G = ps + G), rt && V(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, G)) {
880
- Te(P, i);
888
+ } = j, ze = B($), Pt = ge;
889
+ let G = $ === "value" ? Pt : Vs(Pt);
890
+ if (x.attrName = ze, x.attrValue = G, x.keepAttr = !0, x.forceKeepAttr = void 0, de(F.uponSanitizeAttribute, i, x), G = x.attrValue, hn && (ze === "id" || ze === "name") && (Te($, i), G = ps + G), rt && V(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, G)) {
891
+ Te($, i);
881
892
  continue;
882
893
  }
883
894
  if (ze === "attributename" && Bt(G, "href")) {
884
- Te(P, i);
895
+ Te($, i);
885
896
  continue;
886
897
  }
887
898
  if (x.forceKeepAttr)
888
899
  continue;
889
900
  if (!x.keepAttr) {
890
- Te(P, i);
901
+ Te($, i);
891
902
  continue;
892
903
  }
893
904
  if (!cn && V(/\/>/i, G)) {
894
- Te(P, i);
905
+ Te($, i);
895
906
  continue;
896
907
  }
897
908
  De && ht([Ue, L, Be], (En) => {
@@ -899,10 +910,10 @@ function Jn() {
899
910
  });
900
911
  const An = B(i.nodeName);
901
912
  if (!yn(An, ze, G)) {
902
- Te(P, i);
913
+ Te($, i);
903
914
  continue;
904
915
  }
905
- if (U && typeof m == "object" && typeof m.getAttributeType == "function" && !Q)
916
+ if (U && typeof m == "object" && typeof m.getAttributeType == "function" && !K)
906
917
  switch (m.getAttributeType(An, ze)) {
907
918
  case "TrustedHTML": {
908
919
  G = U.createHTML(G);
@@ -913,23 +924,23 @@ function Jn() {
913
924
  break;
914
925
  }
915
926
  }
916
- if (G !== Nt)
927
+ if (G !== Pt)
917
928
  try {
918
- Q ? i.setAttributeNS(Q, P, G) : i.setAttribute(P, G), Ot(i) ? ae(i) : Ln(t.removed);
929
+ K ? i.setAttributeNS(K, $, G) : i.setAttribute($, G), Ot(i) ? ae(i) : Ln(t.removed);
919
930
  } catch {
920
- Te(P, i);
931
+ Te($, i);
921
932
  }
922
933
  }
923
934
  de(F.afterSanitizeAttributes, i, null);
924
- }, "_sanitizeAttributes"), bs = /* @__PURE__ */ h(function k(i) {
925
- let p = null;
935
+ }, "_sanitizeAttributes"), bs = /* @__PURE__ */ u(function k(i) {
936
+ let h = null;
926
937
  const x = bn(i);
927
- for (de(F.beforeSanitizeShadowDOM, i, null); p = x.nextNode(); )
928
- de(F.uponSanitizeShadowNode, p, null), vn(p), Sn(p), p.content instanceof r && k(p.content);
938
+ for (de(F.beforeSanitizeShadowDOM, i, null); h = x.nextNode(); )
939
+ de(F.uponSanitizeShadowNode, h, null), vn(h), Sn(h), h.content instanceof r && k(h.content);
929
940
  de(F.afterSanitizeShadowDOM, i, null);
930
941
  }, "_sanitizeShadowDOM");
931
942
  return t.sanitize = function(k) {
932
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, p = null, x = null, N = null, j = null;
943
+ let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = null, x = null, N = null, j = null;
933
944
  if (Mt = !k, Mt && (k = "<!-->"), typeof k != "string" && !wn(k))
934
945
  if (typeof k.toString == "function") {
935
946
  if (k = k.toString(), typeof k != "string")
@@ -945,48 +956,48 @@ function Jn() {
945
956
  throw qe("root node is forbidden and cannot be sanitized in-place");
946
957
  }
947
958
  } else if (k instanceof o)
948
- p = kn("<!---->"), x = p.ownerDocument.importNode(k, !0), x.nodeType === Ye.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? p = x : p.appendChild(x);
959
+ h = kn("<!---->"), x = h.ownerDocument.importNode(k, !0), x.nodeType === Ye.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? h = x : h.appendChild(x);
949
960
  else {
950
961
  if (!Ce && !De && !ye && // eslint-disable-next-line unicorn/prefer-includes
951
962
  k.indexOf("<") === -1)
952
963
  return U && at ? U.createHTML(k) : k;
953
- if (p = kn(k), !p)
964
+ if (h = kn(k), !h)
954
965
  return Ce ? null : at ? q : "";
955
966
  }
956
- p && Rt && ae(p.firstChild);
957
- const P = bn(He ? k : p);
958
- for (; N = P.nextNode(); )
967
+ h && Rt && ae(h.firstChild);
968
+ const $ = bn(He ? k : h);
969
+ for (; N = $.nextNode(); )
959
970
  vn(N), Sn(N), N.content instanceof r && bs(N.content);
960
971
  if (He)
961
972
  return k;
962
973
  if (Ce) {
963
974
  if (it)
964
- for (j = et.call(p.ownerDocument); p.firstChild; )
965
- j.appendChild(p.firstChild);
975
+ for (j = et.call(h.ownerDocument); h.firstChild; )
976
+ j.appendChild(h.firstChild);
966
977
  else
967
- j = p;
978
+ j = h;
968
979
  return (I.shadowroot || I.shadowrootmode) && (j = Tt.call(n, j, !0)), j;
969
980
  }
970
- let Q = ye ? p.outerHTML : p.innerHTML;
971
- return ye && b["!doctype"] && p.ownerDocument && p.ownerDocument.doctype && p.ownerDocument.doctype.name && V(Kn, p.ownerDocument.doctype.name) && (Q = "<!DOCTYPE " + p.ownerDocument.doctype.name + `>
972
- ` + Q), De && ht([Ue, L, Be], (ge) => {
973
- Q = je(Q, ge, " ");
974
- }), U && at ? U.createHTML(Q) : Q;
981
+ let K = ye ? h.outerHTML : h.innerHTML;
982
+ return ye && b["!doctype"] && h.ownerDocument && h.ownerDocument.doctype && h.ownerDocument.doctype.name && V(Qn, h.ownerDocument.doctype.name) && (K = "<!DOCTYPE " + h.ownerDocument.doctype.name + `>
983
+ ` + K), De && ht([Ue, L, Be], (ge) => {
984
+ K = je(K, ge, " ");
985
+ }), U && at ? U.createHTML(K) : K;
975
986
  }, t.setConfig = function() {
976
987
  let k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
977
988
  zt(k), _t = !0;
978
989
  }, t.clearConfig = function() {
979
990
  Le = null, _t = !1;
980
- }, t.isValidAttribute = function(k, i, p) {
991
+ }, t.isValidAttribute = function(k, i, h) {
981
992
  Le || zt({});
982
993
  const x = B(k), N = B(i);
983
- return yn(x, N, p);
994
+ return yn(x, N, h);
984
995
  }, t.addHook = function(k, i) {
985
996
  typeof i == "function" && We(F[k], i);
986
997
  }, t.removeHook = function(k, i) {
987
998
  if (i !== void 0) {
988
- const p = Hs(F[k], i);
989
- return p === -1 ? void 0 : Gs(F[k], p, 1)[0];
999
+ const h = Ws(F[k], i);
1000
+ return h === -1 ? void 0 : js(F[k], h, 1)[0];
990
1001
  }
991
1002
  return Ln(F[k]);
992
1003
  }, t.removeHooks = function(k) {
@@ -995,41 +1006,41 @@ function Jn() {
995
1006
  F = Un();
996
1007
  }, t;
997
1008
  }
998
- h(Jn, "createDOMPurify");
999
- var ar = Jn();
1009
+ u(Jn, "createDOMPurify");
1010
+ var or = Jn();
1000
1011
  function Xt() {
1001
1012
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
1002
1013
  }
1003
- h(Xt, "M");
1014
+ u(Xt, "M");
1004
1015
  var Re = Xt();
1005
1016
  function es(l) {
1006
1017
  Re = l;
1007
1018
  }
1008
- h(es, "G");
1009
- var Ae = { exec: /* @__PURE__ */ h(() => null, "exec") };
1019
+ u(es, "G");
1020
+ var Ae = { exec: /* @__PURE__ */ u(() => null, "exec") };
1010
1021
  function C(l, t = "") {
1011
- let e = typeof l == "string" ? l : l.source, n = { replace: /* @__PURE__ */ h((s, r) => {
1022
+ let e = typeof l == "string" ? l : l.source, n = { replace: /* @__PURE__ */ u((s, r) => {
1012
1023
  let a = typeof r == "string" ? r : r.source;
1013
1024
  return a = a.replace(Y.caret, "$1"), e = e.replace(s, a), n;
1014
- }, "replace"), getRegex: /* @__PURE__ */ h(() => new RegExp(e, t), "getRegex") };
1025
+ }, "replace"), getRegex: /* @__PURE__ */ u(() => new RegExp(e, t), "getRegex") };
1015
1026
  return n;
1016
1027
  }
1017
- h(C, "k");
1018
- var lr = (() => {
1028
+ u(C, "k");
1029
+ var cr = (() => {
1019
1030
  try {
1020
1031
  return !!new RegExp("(?<=1)(?<!1)");
1021
1032
  } catch {
1022
1033
  return !1;
1023
1034
  }
1024
- })(), Y = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ h((l) => new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}>`), "blockquoteBeginRegex") }, or = /^(?:[ \t]*(?:\n|$))+/, cr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ur = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Je = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, hr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Qt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ts = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ns = C(ts).replace(/bull/g, Qt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), pr = C(ts).replace(/bull/g, Qt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Kt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, fr = /^[^\n]+/, Jt = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, dr = C(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Jt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), gr = C(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Qt).getRegex(), vt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", en = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, mr = C("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", en).replace("tag", vt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ss = C(Kt).replace("hr", Je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex(), xr = C(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ss).getRegex(), tn = { blockquote: xr, code: cr, def: dr, fences: ur, heading: hr, hr: Je, html: mr, lheading: ns, list: gr, newline: or, paragraph: ss, table: Ae, text: fr }, Bn = C("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex(), kr = { ...tn, lheading: pr, table: Bn, paragraph: C(Kt).replace("hr", Je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Bn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex() }, br = { ...tn, html: C(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", en).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Ae, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: C(Kt).replace("hr", Je).replace("heading", ` *#{1,6} *[^
1025
- ]`).replace("lheading", ns).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, wr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, vr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, rs = /^( {2,}|\\)\n(?!\s*$)/, yr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, yt = /[\p{P}\p{S}]/u, nn = /[\s\p{P}\p{S}]/u, is = /[^\s\p{P}\p{S}]/u, Tr = C(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, nn).getRegex(), as = /(?!~)[\p{P}\p{S}]/u, Sr = /(?!~)[\s\p{P}\p{S}]/u, Ar = /(?:[^\s\p{P}\p{S}]|~)/u, ls = /(?![*_])[\p{P}\p{S}]/u, Er = /(?![*_])[\s\p{P}\p{S}]/u, _r = /(?:[^\s\p{P}\p{S}]|[*_])/u, Rr = C(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", lr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), os = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Dr = C(os, "u").replace(/punct/g, yt).getRegex(), Cr = C(os, "u").replace(/punct/g, as).getRegex(), cs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ir = C(cs, "gu").replace(/notPunctSpace/g, is).replace(/punctSpace/g, nn).replace(/punct/g, yt).getRegex(), Mr = C(cs, "gu").replace(/notPunctSpace/g, Ar).replace(/punctSpace/g, Sr).replace(/punct/g, as).getRegex(), Lr = C("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, is).replace(/punctSpace/g, nn).replace(/punct/g, yt).getRegex(), zr = C(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, ls).getRegex(), Or = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Nr = C(Or, "gu").replace(/notPunctSpace/g, _r).replace(/punctSpace/g, Er).replace(/punct/g, ls).getRegex(), Pr = C(/\\(punct)/, "gu").replace(/punct/g, yt).getRegex(), $r = C(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Ur = C(en).replace("(?:-->|$)", "-->").getRegex(), Br = C("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ur).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), kt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Fr = C(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", kt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), us = C(/^!?\[(label)\]\[(ref)\]/).replace("label", kt).replace("ref", Jt).getRegex(), hs = C(/^!?\[(ref)\](?:\[\])?/).replace("ref", Jt).getRegex(), Hr = C("reflink|nolink(?!\\()", "g").replace("reflink", us).replace("nolink", hs).getRegex(), Fn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, sn = { _backpedal: Ae, anyPunctuation: Pr, autolink: $r, blockSkip: Rr, br: rs, code: vr, del: Ae, delLDelim: Ae, delRDelim: Ae, emStrongLDelim: Dr, emStrongRDelimAst: Ir, emStrongRDelimUnd: Lr, escape: wr, link: Fr, nolink: hs, punctuation: Tr, reflink: us, reflinkSearch: Hr, tag: Br, text: yr, url: Ae }, Gr = { ...sn, link: C(/^!?\[(label)\]\((.*?)\)/).replace("label", kt).getRegex(), reflink: C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", kt).getRegex() }, Yt = { ...sn, emStrongRDelimAst: Mr, emStrongLDelim: Cr, delLDelim: zr, delRDelim: Nr, url: C(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Fn).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: C(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Fn).getRegex() }, Wr = { ...Yt, br: C(rs).replace("{2,}", "*").getRegex(), text: C(Yt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ft = { normal: tn, gfm: kr, pedantic: br }, Ze = { normal: sn, gfm: Yt, breaks: Wr, pedantic: Gr }, jr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Hn = /* @__PURE__ */ h((l) => jr[l], "de");
1035
+ })(), Y = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ u((l) => new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}>`), "blockquoteBeginRegex") }, ur = /^(?:[ \t]*(?:\n|$))+/, hr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, pr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Je = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, fr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Kt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ts = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ns = C(ts).replace(/bull/g, Kt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), dr = C(ts).replace(/bull/g, Kt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Qt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, gr = /^[^\n]+/, Jt = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, mr = C(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Jt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), xr = C(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Kt).getRegex(), vt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", en = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, kr = C("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", en).replace("tag", vt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ss = C(Qt).replace("hr", Je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex(), br = C(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ss).getRegex(), tn = { blockquote: br, code: hr, def: mr, fences: pr, heading: fr, hr: Je, html: kr, lheading: ns, list: xr, newline: ur, paragraph: ss, table: Ae, text: gr }, Bn = C("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex(), wr = { ...tn, lheading: dr, table: Bn, paragraph: C(Qt).replace("hr", Je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Bn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex() }, vr = { ...tn, html: C(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", en).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Ae, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: C(Qt).replace("hr", Je).replace("heading", ` *#{1,6} *[^
1036
+ ]`).replace("lheading", ns).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, yr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Tr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, rs = /^( {2,}|\\)\n(?!\s*$)/, Sr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, yt = /[\p{P}\p{S}]/u, nn = /[\s\p{P}\p{S}]/u, is = /[^\s\p{P}\p{S}]/u, Ar = C(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, nn).getRegex(), as = /(?!~)[\p{P}\p{S}]/u, Er = /(?!~)[\s\p{P}\p{S}]/u, _r = /(?:[^\s\p{P}\p{S}]|~)/u, ls = /(?![*_])[\p{P}\p{S}]/u, Rr = /(?![*_])[\s\p{P}\p{S}]/u, Dr = /(?:[^\s\p{P}\p{S}]|[*_])/u, Cr = C(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", cr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), os = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ir = C(os, "u").replace(/punct/g, yt).getRegex(), Mr = C(os, "u").replace(/punct/g, as).getRegex(), cs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Lr = C(cs, "gu").replace(/notPunctSpace/g, is).replace(/punctSpace/g, nn).replace(/punct/g, yt).getRegex(), zr = C(cs, "gu").replace(/notPunctSpace/g, _r).replace(/punctSpace/g, Er).replace(/punct/g, as).getRegex(), Or = C("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, is).replace(/punctSpace/g, nn).replace(/punct/g, yt).getRegex(), Pr = C(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, ls).getRegex(), Nr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", $r = C(Nr, "gu").replace(/notPunctSpace/g, Dr).replace(/punctSpace/g, Rr).replace(/punct/g, ls).getRegex(), Ur = C(/\\(punct)/, "gu").replace(/punct/g, yt).getRegex(), Br = C(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Fr = C(en).replace("(?:-->|$)", "-->").getRegex(), Hr = C("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Fr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), kt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Gr = C(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", kt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), us = C(/^!?\[(label)\]\[(ref)\]/).replace("label", kt).replace("ref", Jt).getRegex(), hs = C(/^!?\[(ref)\](?:\[\])?/).replace("ref", Jt).getRegex(), Wr = C("reflink|nolink(?!\\()", "g").replace("reflink", us).replace("nolink", hs).getRegex(), Fn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, sn = { _backpedal: Ae, anyPunctuation: Ur, autolink: Br, blockSkip: Cr, br: rs, code: Tr, del: Ae, delLDelim: Ae, delRDelim: Ae, emStrongLDelim: Ir, emStrongRDelimAst: Lr, emStrongRDelimUnd: Or, escape: yr, link: Gr, nolink: hs, punctuation: Ar, reflink: us, reflinkSearch: Wr, tag: Hr, text: Sr, url: Ae }, jr = { ...sn, link: C(/^!?\[(label)\]\((.*?)\)/).replace("label", kt).getRegex(), reflink: C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", kt).getRegex() }, Yt = { ...sn, emStrongRDelimAst: zr, emStrongLDelim: Mr, delLDelim: Pr, delRDelim: $r, url: C(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Fn).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: C(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Fn).getRegex() }, qr = { ...Yt, br: C(rs).replace("{2,}", "*").getRegex(), text: C(Yt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ft = { normal: tn, gfm: wr, pedantic: vr }, Ze = { normal: sn, gfm: Yt, breaks: qr, pedantic: jr }, Vr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Hn = /* @__PURE__ */ u((l) => Vr[l], "de");
1026
1037
  function oe(l, t) {
1027
1038
  if (t) {
1028
1039
  if (Y.escapeTest.test(l)) return l.replace(Y.escapeReplace, Hn);
1029
1040
  } else if (Y.escapeTestNoEncode.test(l)) return l.replace(Y.escapeReplaceNoEncode, Hn);
1030
1041
  return l;
1031
1042
  }
1032
- h(oe, "O");
1043
+ u(oe, "O");
1033
1044
  function Gn(l) {
1034
1045
  try {
1035
1046
  l = encodeURI(l).replace(Y.percentDecode, "%");
@@ -1038,7 +1049,7 @@ function Gn(l) {
1038
1049
  }
1039
1050
  return l;
1040
1051
  }
1041
- h(Gn, "X");
1052
+ u(Gn, "X");
1042
1053
  function Wn(l, t) {
1043
1054
  let e = l.replace(Y.findPipe, (r, a, o) => {
1044
1055
  let c = !1, f = a;
@@ -1050,7 +1061,7 @@ function Wn(l, t) {
1050
1061
  for (; s < n.length; s++) n[s] = n[s].trim().replace(Y.slashPipe, "|");
1051
1062
  return n;
1052
1063
  }
1053
- h(Wn, "J");
1064
+ u(Wn, "J");
1054
1065
  function Xe(l, t, e) {
1055
1066
  let n = l.length;
1056
1067
  if (n === 0) return "";
@@ -1059,8 +1070,8 @@ function Xe(l, t, e) {
1059
1070
  s++;
1060
1071
  return l.slice(0, n - s);
1061
1072
  }
1062
- h(Xe, "E");
1063
- function qr(l, t) {
1073
+ u(Xe, "E");
1074
+ function Yr(l, t) {
1064
1075
  if (l.indexOf(t[1]) === -1) return -1;
1065
1076
  let e = 0;
1066
1077
  for (let n = 0; n < l.length; n++) if (l[n] === "\\") n++;
@@ -1068,8 +1079,8 @@ function qr(l, t) {
1068
1079
  else if (l[n] === t[1] && (e--, e < 0)) return n;
1069
1080
  return e > 0 ? -2 : -1;
1070
1081
  }
1071
- h(qr, "ge");
1072
- function Vr(l, t = 0) {
1082
+ u(Yr, "ge");
1083
+ function Zr(l, t = 0) {
1073
1084
  let e = t, n = "";
1074
1085
  for (let s of l) if (s === " ") {
1075
1086
  let r = 4 - e % 4;
@@ -1077,15 +1088,15 @@ function Vr(l, t = 0) {
1077
1088
  } else n += s, e++;
1078
1089
  return n;
1079
1090
  }
1080
- h(Vr, "fe");
1091
+ u(Zr, "fe");
1081
1092
  function jn(l, t, e, n, s) {
1082
1093
  let r = t.href, a = t.title || null, o = l[1].replace(s.other.outputLinkReplace, "$1");
1083
1094
  n.state.inLink = !0;
1084
1095
  let c = { type: l[0].charAt(0) === "!" ? "image" : "link", raw: e, href: r, title: a, text: o, tokens: n.inlineTokens(o) };
1085
1096
  return n.state.inLink = !1, c;
1086
1097
  }
1087
- h(jn, "me");
1088
- function Yr(l, t, e) {
1098
+ u(jn, "me");
1099
+ function Xr(l, t, e) {
1089
1100
  let n = l.match(e.other.indentCodeCompensation);
1090
1101
  if (n === null) return t;
1091
1102
  let s = n[1];
@@ -1098,12 +1109,12 @@ function Yr(l, t, e) {
1098
1109
  }).join(`
1099
1110
  `);
1100
1111
  }
1101
- h(Yr, "it");
1112
+ u(Xr, "it");
1102
1113
  var Oe, bt = (Oe = class {
1103
1114
  constructor(t) {
1104
- R(this, "options");
1105
- R(this, "rules");
1106
- R(this, "lexer");
1115
+ D(this, "options");
1116
+ D(this, "rules");
1117
+ D(this, "lexer");
1107
1118
  this.options = t || Re;
1108
1119
  }
1109
1120
  space(t) {
@@ -1121,7 +1132,7 @@ var Oe, bt = (Oe = class {
1121
1132
  fences(t) {
1122
1133
  let e = this.rules.block.fences.exec(t);
1123
1134
  if (e) {
1124
- let n = e[0], s = Yr(n, e[3] || "", this.rules);
1135
+ let n = e[0], s = Xr(n, e[3] || "", this.rules);
1125
1136
  return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: s };
1126
1137
  }
1127
1138
  }
@@ -1154,26 +1165,26 @@ var Oe, bt = (Oe = class {
1154
1165
  else break;
1155
1166
  n = n.slice(f);
1156
1167
  let d = c.join(`
1157
- `), u = d.replace(this.rules.other.blockquoteSetextReplace, `
1168
+ `), p = d.replace(this.rules.other.blockquoteSetextReplace, `
1158
1169
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
1159
1170
  s = s ? `${s}
1160
1171
  ${d}` : d, r = r ? `${r}
1161
- ${u}` : u;
1172
+ ${p}` : p;
1162
1173
  let g = this.lexer.state.top;
1163
- if (this.lexer.state.top = !0, this.lexer.blockTokens(u, a, !0), this.lexer.state.top = g, n.length === 0) break;
1174
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(p, a, !0), this.lexer.state.top = g, n.length === 0) break;
1164
1175
  let m = a.at(-1);
1165
1176
  if (m?.type === "code") break;
1166
1177
  if (m?.type === "blockquote") {
1167
- let S = m, D = S.raw + `
1178
+ let w = m, S = w.raw + `
1168
1179
  ` + n.join(`
1169
- `), $ = this.blockquote(D);
1170
- a[a.length - 1] = $, s = s.substring(0, s.length - S.raw.length) + $.raw, r = r.substring(0, r.length - S.text.length) + $.text;
1180
+ `), O = this.blockquote(S);
1181
+ a[a.length - 1] = O, s = s.substring(0, s.length - w.raw.length) + O.raw, r = r.substring(0, r.length - w.text.length) + O.text;
1171
1182
  break;
1172
1183
  } else if (m?.type === "list") {
1173
- let S = m, D = S.raw + `
1184
+ let w = m, S = w.raw + `
1174
1185
  ` + n.join(`
1175
- `), $ = this.list(D);
1176
- a[a.length - 1] = $, s = s.substring(0, s.length - m.raw.length) + $.raw, r = r.substring(0, r.length - S.raw.length) + $.raw, n = D.substring(a.at(-1).raw.length).split(`
1186
+ `), O = this.list(S);
1187
+ a[a.length - 1] = O, s = s.substring(0, s.length - m.raw.length) + O.raw, r = r.substring(0, r.length - w.raw.length) + O.raw, n = S.substring(a.at(-1).raw.length).split(`
1177
1188
  `);
1178
1189
  continue;
1179
1190
  }
@@ -1188,31 +1199,31 @@ ${u}` : u;
1188
1199
  n = s ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = s ? n : "[*+-]");
1189
1200
  let a = this.rules.other.listItemRegex(n), o = !1;
1190
1201
  for (; t; ) {
1191
- let f = !1, d = "", u = "";
1202
+ let f = !1, d = "", p = "";
1192
1203
  if (!(e = a.exec(t)) || this.rules.block.hr.test(t)) break;
1193
1204
  d = e[0], t = t.substring(d.length);
1194
- let g = Vr(e[2].split(`
1205
+ let g = Zr(e[2].split(`
1195
1206
  `, 1)[0], e[1].length), m = t.split(`
1196
- `, 1)[0], S = !g.trim(), D = 0;
1197
- if (this.options.pedantic ? (D = 2, u = g.trimStart()) : S ? D = e[1].length + 1 : (D = g.search(this.rules.other.nonSpaceChar), D = D > 4 ? 1 : D, u = g.slice(D), D += e[1].length), S && this.rules.other.blankLine.test(m) && (d += m + `
1207
+ `, 1)[0], w = !g.trim(), S = 0;
1208
+ if (this.options.pedantic ? (S = 2, p = g.trimStart()) : w ? S = e[1].length + 1 : (S = g.search(this.rules.other.nonSpaceChar), S = S > 4 ? 1 : S, p = g.slice(S), S += e[1].length), w && this.rules.other.blankLine.test(m) && (d += m + `
1198
1209
  `, t = t.substring(m.length + 1), f = !0), !f) {
1199
- let $ = this.rules.other.nextBulletRegex(D), me = this.rules.other.hrRegex(D), xe = this.rules.other.fencesBeginRegex(D), te = this.rules.other.headingBeginRegex(D), U = this.rules.other.htmlBeginRegex(D), q = this.rules.other.blockquoteBeginRegex(D);
1210
+ let O = this.rules.other.nextBulletRegex(S), me = this.rules.other.hrRegex(S), xe = this.rules.other.fencesBeginRegex(S), te = this.rules.other.headingBeginRegex(S), U = this.rules.other.htmlBeginRegex(S), q = this.rules.other.blockquoteBeginRegex(S);
1200
1211
  for (; t; ) {
1201
1212
  let ne = t.split(`
1202
1213
  `, 1)[0], ue;
1203
- if (m = ne, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), ue = m) : ue = m.replace(this.rules.other.tabCharGlobal, " "), xe.test(m) || te.test(m) || U.test(m) || q.test(m) || $.test(m) || me.test(m)) break;
1204
- if (ue.search(this.rules.other.nonSpaceChar) >= D || !m.trim()) u += `
1205
- ` + ue.slice(D);
1214
+ if (m = ne, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), ue = m) : ue = m.replace(this.rules.other.tabCharGlobal, " "), xe.test(m) || te.test(m) || U.test(m) || q.test(m) || O.test(m) || me.test(m)) break;
1215
+ if (ue.search(this.rules.other.nonSpaceChar) >= S || !m.trim()) p += `
1216
+ ` + ue.slice(S);
1206
1217
  else {
1207
- if (S || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || xe.test(g) || te.test(g) || me.test(g)) break;
1208
- u += `
1218
+ if (w || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || xe.test(g) || te.test(g) || me.test(g)) break;
1219
+ p += `
1209
1220
  ` + m;
1210
1221
  }
1211
- S = !m.trim(), d += ne + `
1212
- `, t = t.substring(ne.length + 1), g = ue.slice(D);
1222
+ w = !m.trim(), d += ne + `
1223
+ `, t = t.substring(ne.length + 1), g = ue.slice(S);
1213
1224
  }
1214
1225
  }
1215
- r.loose || (o ? r.loose = !0 : this.rules.other.doubleBlankLine.test(d) && (o = !0)), r.items.push({ type: "list_item", raw: d, task: !!this.options.gfm && this.rules.other.listIsTask.test(u), loose: !1, text: u, tokens: [] }), r.raw += d;
1226
+ r.loose || (o ? r.loose = !0 : this.rules.other.doubleBlankLine.test(d) && (o = !0)), r.items.push({ type: "list_item", raw: d, task: !!this.options.gfm && this.rules.other.listIsTask.test(p), loose: !1, text: p, tokens: [] }), r.raw += d;
1216
1227
  }
1217
1228
  let c = r.items.at(-1);
1218
1229
  if (c) c.raw = c.raw.trimEnd(), c.text = c.text.trimEnd();
@@ -1222,20 +1233,20 @@ ${u}` : u;
1222
1233
  if (this.lexer.state.top = !1, f.tokens = this.lexer.blockTokens(f.text, []), f.task) {
1223
1234
  if (f.text = f.text.replace(this.rules.other.listReplaceTask, ""), f.tokens[0]?.type === "text" || f.tokens[0]?.type === "paragraph") {
1224
1235
  f.tokens[0].raw = f.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), f.tokens[0].text = f.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
1225
- for (let u = this.lexer.inlineQueue.length - 1; u >= 0; u--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)) {
1226
- this.lexer.inlineQueue[u].src = this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask, "");
1236
+ for (let p = this.lexer.inlineQueue.length - 1; p >= 0; p--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)) {
1237
+ this.lexer.inlineQueue[p].src = this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask, "");
1227
1238
  break;
1228
1239
  }
1229
1240
  }
1230
1241
  let d = this.rules.other.listTaskCheckbox.exec(f.raw);
1231
1242
  if (d) {
1232
- let u = { type: "checkbox", raw: d[0] + " ", checked: d[0] !== "[ ]" };
1233
- f.checked = u.checked, r.loose ? f.tokens[0] && ["paragraph", "text"].includes(f.tokens[0].type) && "tokens" in f.tokens[0] && f.tokens[0].tokens ? (f.tokens[0].raw = u.raw + f.tokens[0].raw, f.tokens[0].text = u.raw + f.tokens[0].text, f.tokens[0].tokens.unshift(u)) : f.tokens.unshift({ type: "paragraph", raw: u.raw, text: u.raw, tokens: [u] }) : f.tokens.unshift(u);
1243
+ let p = { type: "checkbox", raw: d[0] + " ", checked: d[0] !== "[ ]" };
1244
+ f.checked = p.checked, r.loose ? f.tokens[0] && ["paragraph", "text"].includes(f.tokens[0].type) && "tokens" in f.tokens[0] && f.tokens[0].tokens ? (f.tokens[0].raw = p.raw + f.tokens[0].raw, f.tokens[0].text = p.raw + f.tokens[0].text, f.tokens[0].tokens.unshift(p)) : f.tokens.unshift({ type: "paragraph", raw: p.raw, text: p.raw, tokens: [p] }) : f.tokens.unshift(p);
1234
1245
  }
1235
1246
  }
1236
1247
  if (!r.loose) {
1237
- let d = f.tokens.filter((g) => g.type === "space"), u = d.length > 0 && d.some((g) => this.rules.other.anyLine.test(g.raw));
1238
- r.loose = u;
1248
+ let d = f.tokens.filter((g) => g.type === "space"), p = d.length > 0 && d.some((g) => this.rules.other.anyLine.test(g.raw));
1249
+ r.loose = p;
1239
1250
  }
1240
1251
  }
1241
1252
  if (r.loose) for (let f of r.items) {
@@ -1301,7 +1312,7 @@ ${u}` : u;
1301
1312
  let a = Xe(n.slice(0, -1), "\\");
1302
1313
  if ((n.length - a.length) % 2 === 0) return;
1303
1314
  } else {
1304
- let a = qr(e[2], "()");
1315
+ let a = Yr(e[2], "()");
1305
1316
  if (a === -2) return;
1306
1317
  if (a > -1) {
1307
1318
  let o = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + a;
@@ -1342,10 +1353,10 @@ ${u}` : u;
1342
1353
  }
1343
1354
  if (c -= o, c > 0) continue;
1344
1355
  o = Math.min(o, o + c + f);
1345
- let u = [...s[0]][0].length, g = t.slice(0, r + s.index + u + o);
1356
+ let p = [...s[0]][0].length, g = t.slice(0, r + s.index + p + o);
1346
1357
  if (Math.min(r, o) % 2) {
1347
- let S = g.slice(1, -1);
1348
- return { type: "em", raw: g, text: S, tokens: this.lexer.inlineTokens(S) };
1358
+ let w = g.slice(1, -1);
1359
+ return { type: "em", raw: g, text: w, tokens: this.lexer.inlineTokens(w) };
1349
1360
  }
1350
1361
  let m = g.slice(2, -2);
1351
1362
  return { type: "strong", raw: g, text: m, tokens: this.lexer.inlineTokens(m) };
@@ -1375,8 +1386,8 @@ ${u}` : u;
1375
1386
  }
1376
1387
  if (c -= o, c > 0) continue;
1377
1388
  o = Math.min(o, o + c);
1378
- let d = [...s[0]][0].length, u = t.slice(0, r + s.index + d + o), g = u.slice(r, -r);
1379
- return { type: "del", raw: u, text: g, tokens: this.lexer.inlineTokens(g) };
1389
+ let d = [...s[0]][0].length, p = t.slice(0, r + s.index + d + o), g = p.slice(r, -r);
1390
+ return { type: "del", raw: p, text: g, tokens: this.lexer.inlineTokens(g) };
1380
1391
  }
1381
1392
  }
1382
1393
  }
@@ -1409,13 +1420,13 @@ ${u}` : u;
1409
1420
  return { type: "text", raw: e[0], text: e[0], escaped: n };
1410
1421
  }
1411
1422
  }
1412
- }, h(Oe, "w"), Oe), we, se = (we = class {
1423
+ }, u(Oe, "w"), Oe), we, se = (we = class {
1413
1424
  constructor(t) {
1414
- R(this, "tokens");
1415
- R(this, "options");
1416
- R(this, "state");
1417
- R(this, "inlineQueue");
1418
- R(this, "tokenizer");
1425
+ D(this, "tokens");
1426
+ D(this, "options");
1427
+ D(this, "state");
1428
+ D(this, "inlineQueue");
1429
+ D(this, "tokenizer");
1419
1430
  this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Re, this.options.tokenizer = this.options.tokenizer || new bt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1420
1431
  let e = { other: Y, block: ft.normal, inline: Ze.normal };
1421
1432
  this.options.pedantic ? (e.block = ft.pedantic, e.inline = Ze.pedantic) : this.options.gfm && (e.block = ft.gfm, this.options.breaks ? e.inline = Ze.breaks : e.inline = Ze.gfm), this.tokenizer.rules = e;
@@ -1595,9 +1606,9 @@ ${u}` : u;
1595
1606
  }
1596
1607
  let f = t;
1597
1608
  if (this.options.extensions?.startInline) {
1598
- let d = 1 / 0, u = t.slice(1), g;
1609
+ let d = 1 / 0, p = t.slice(1), g;
1599
1610
  this.options.extensions.startInline.forEach((m) => {
1600
- g = m.call({ lexer: this }, u), typeof g == "number" && g >= 0 && (d = Math.min(d, g));
1611
+ g = m.call({ lexer: this }, p), typeof g == "number" && g >= 0 && (d = Math.min(d, g));
1601
1612
  }), d < 1 / 0 && d >= 0 && (f = t.substring(0, d + 1));
1602
1613
  }
1603
1614
  if (c = this.tokenizer.inlineText(f)) {
@@ -1616,10 +1627,10 @@ ${u}` : u;
1616
1627
  }
1617
1628
  return e;
1618
1629
  }
1619
- }, h(we, "u"), we), Ne, wt = (Ne = class {
1630
+ }, u(we, "u"), we), Pe, wt = (Pe = class {
1620
1631
  constructor(t) {
1621
- R(this, "options");
1622
- R(this, "parser");
1632
+ D(this, "options");
1633
+ D(this, "parser");
1623
1634
  this.options = t || Re;
1624
1635
  }
1625
1636
  space(t) {
@@ -1733,7 +1744,7 @@ ${t}</tr>
1733
1744
  text(t) {
1734
1745
  return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : oe(t.text);
1735
1746
  }
1736
- }, h(Ne, "y"), Ne), Pe, rn = (Pe = class {
1747
+ }, u(Pe, "y"), Pe), Ne, rn = (Ne = class {
1737
1748
  strong({ text: t }) {
1738
1749
  return t;
1739
1750
  }
@@ -1764,11 +1775,11 @@ ${t}</tr>
1764
1775
  checkbox({ raw: t }) {
1765
1776
  return t;
1766
1777
  }
1767
- }, h(Pe, "$"), Pe), ve, re = (ve = class {
1778
+ }, u(Ne, "$"), Ne), ve, re = (ve = class {
1768
1779
  constructor(t) {
1769
- R(this, "options");
1770
- R(this, "renderer");
1771
- R(this, "textRenderer");
1780
+ D(this, "options");
1781
+ D(this, "renderer");
1782
+ D(this, "textRenderer");
1772
1783
  this.options = t || Re, this.options.renderer = this.options.renderer || new wt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new rn();
1773
1784
  }
1774
1785
  static parse(t, e) {
@@ -1913,10 +1924,10 @@ ${t}</tr>
1913
1924
  }
1914
1925
  return n;
1915
1926
  }
1916
- }, h(ve, "u"), ve), be, Qe = (be = class {
1927
+ }, u(ve, "u"), ve), be, Ke = (be = class {
1917
1928
  constructor(t) {
1918
- R(this, "options");
1919
- R(this, "block");
1929
+ D(this, "options");
1930
+ D(this, "block");
1920
1931
  this.options = t || Re;
1921
1932
  }
1922
1933
  preprocess(t) {
@@ -1937,18 +1948,18 @@ ${t}</tr>
1937
1948
  provideParser() {
1938
1949
  return this.block ? re.parse : re.parseInline;
1939
1950
  }
1940
- }, h(be, "P"), R(be, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), R(be, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), be), $e, Zr = ($e = class {
1951
+ }, u(be, "P"), D(be, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), D(be, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), be), $e, Kr = ($e = class {
1941
1952
  constructor(...t) {
1942
- R(this, "defaults", Xt());
1943
- R(this, "options", this.setOptions);
1944
- R(this, "parse", this.parseMarkdown(!0));
1945
- R(this, "parseInline", this.parseMarkdown(!1));
1946
- R(this, "Parser", re);
1947
- R(this, "Renderer", wt);
1948
- R(this, "TextRenderer", rn);
1949
- R(this, "Lexer", se);
1950
- R(this, "Tokenizer", bt);
1951
- R(this, "Hooks", Qe);
1953
+ D(this, "defaults", Xt());
1954
+ D(this, "options", this.setOptions);
1955
+ D(this, "parse", this.parseMarkdown(!0));
1956
+ D(this, "parseInline", this.parseMarkdown(!1));
1957
+ D(this, "Parser", re);
1958
+ D(this, "Renderer", wt);
1959
+ D(this, "TextRenderer", rn);
1960
+ D(this, "Lexer", se);
1961
+ D(this, "Tokenizer", bt);
1962
+ D(this, "Hooks", Ke);
1952
1963
  this.use(...t);
1953
1964
  }
1954
1965
  walkTokens(t, e) {
@@ -2001,8 +2012,8 @@ ${t}</tr>
2001
2012
  if (["options", "parser"].includes(a)) continue;
2002
2013
  let o = a, c = n.renderer[o], f = r[o];
2003
2014
  r[o] = (...d) => {
2004
- let u = c.apply(r, d);
2005
- return u === !1 && (u = f.apply(r, d)), u || "";
2015
+ let p = c.apply(r, d);
2016
+ return p === !1 && (p = f.apply(r, d)), p || "";
2006
2017
  };
2007
2018
  }
2008
2019
  s.renderer = r;
@@ -2014,32 +2025,32 @@ ${t}</tr>
2014
2025
  if (["options", "rules", "lexer"].includes(a)) continue;
2015
2026
  let o = a, c = n.tokenizer[o], f = r[o];
2016
2027
  r[o] = (...d) => {
2017
- let u = c.apply(r, d);
2018
- return u === !1 && (u = f.apply(r, d)), u;
2028
+ let p = c.apply(r, d);
2029
+ return p === !1 && (p = f.apply(r, d)), p;
2019
2030
  };
2020
2031
  }
2021
2032
  s.tokenizer = r;
2022
2033
  }
2023
2034
  if (n.hooks) {
2024
- let r = this.defaults.hooks || new Qe();
2035
+ let r = this.defaults.hooks || new Ke();
2025
2036
  for (let a in n.hooks) {
2026
2037
  if (!(a in r)) throw new Error(`hook '${a}' does not exist`);
2027
2038
  if (["options", "block"].includes(a)) continue;
2028
2039
  let o = a, c = n.hooks[o], f = r[o];
2029
- Qe.passThroughHooks.has(a) ? r[o] = (d) => {
2030
- if (this.defaults.async && Qe.passThroughHooksRespectAsync.has(a)) return (async () => {
2040
+ Ke.passThroughHooks.has(a) ? r[o] = (d) => {
2041
+ if (this.defaults.async && Ke.passThroughHooksRespectAsync.has(a)) return (async () => {
2031
2042
  let g = await c.call(r, d);
2032
2043
  return f.call(r, g);
2033
2044
  })();
2034
- let u = c.call(r, d);
2035
- return f.call(r, u);
2045
+ let p = c.call(r, d);
2046
+ return f.call(r, p);
2036
2047
  } : r[o] = (...d) => {
2037
2048
  if (this.defaults.async) return (async () => {
2038
2049
  let g = await c.apply(r, d);
2039
2050
  return g === !1 && (g = await f.apply(r, d)), g;
2040
2051
  })();
2041
- let u = c.apply(r, d);
2042
- return u === !1 && (u = f.apply(r, d)), u;
2052
+ let p = c.apply(r, d);
2053
+ return p === !1 && (p = f.apply(r, d)), p;
2043
2054
  };
2044
2055
  }
2045
2056
  s.hooks = r;
@@ -2097,11 +2108,11 @@ Please report this to https://github.com/markedjs/marked.`, t) {
2097
2108
  throw n;
2098
2109
  };
2099
2110
  }
2100
- }, h($e, "B"), $e), Ee = new Zr();
2111
+ }, u($e, "B"), $e), Ee = new Kr();
2101
2112
  function M(l, t) {
2102
2113
  return Ee.parse(l, t);
2103
2114
  }
2104
- h(M, "g");
2115
+ u(M, "g");
2105
2116
  M.options = M.setOptions = function(l) {
2106
2117
  return Ee.setOptions(l), M.defaults = Ee.defaults, es(M.defaults), M;
2107
2118
  };
@@ -2121,7 +2132,7 @@ M.TextRenderer = rn;
2121
2132
  M.Lexer = se;
2122
2133
  M.lexer = se.lex;
2123
2134
  M.Tokenizer = bt;
2124
- M.Hooks = Qe;
2135
+ M.Hooks = Ke;
2125
2136
  M.parse = M;
2126
2137
  M.options;
2127
2138
  M.setOptions;
@@ -2130,31 +2141,31 @@ M.walkTokens;
2130
2141
  M.parseInline;
2131
2142
  re.parse;
2132
2143
  se.lex;
2133
- const Xr = { class: "flex flex-col h-full relative" }, Qr = {
2144
+ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2134
2145
  key: 0,
2135
2146
  class: "pb-4"
2136
- }, Kr = {
2147
+ }, ei = {
2137
2148
  key: 0,
2138
2149
  class: "flex flex-col items-center justify-center pt-12 pb-6 px-4"
2139
- }, Jr = { class: "relative mb-3" }, ei = ["src", "alt"], ti = ["title"], ni = {
2150
+ }, ti = { class: "relative mb-3" }, ni = ["src", "alt"], si = ["title"], ri = {
2140
2151
  key: 0,
2141
2152
  class: "flex items-center gap-3 py-3 px-2"
2142
- }, si = ["src", "alt"], ri = ["src", "alt"], ii = ["src"], ai = ["href"], li = ["innerHTML"], oi = {
2153
+ }, ii = ["src", "alt"], ai = ["src", "alt"], li = ["src"], oi = ["href"], ci = ["innerHTML"], ui = {
2143
2154
  key: 1,
2144
2155
  class: "flex gap-2 justify-start items-end mb-4"
2145
- }, ci = { class: "flex-shrink-0" }, ui = ["src", "alt"], hi = { class: "flex-shrink-0 pt-4 pb-2 px-3" }, pi = {
2156
+ }, hi = { class: "flex-shrink-0" }, pi = ["src", "alt"], fi = { class: "flex-shrink-0 pt-4 pb-2 px-3" }, di = {
2146
2157
  key: 0,
2147
2158
  class: "flex items-center gap-2 px-3 pb-2 overflow-x-auto"
2148
- }, fi = ["src", "alt"], di = { class: "max-w-20 truncate" }, gi = ["onClick"], mi = {
2159
+ }, gi = ["src", "alt"], mi = { class: "max-w-20 truncate" }, xi = ["onClick"], ki = {
2149
2160
  key: 0,
2150
2161
  class: "shrink-0 flex items-center justify-center size-14"
2151
- }, xi = ["disabled"], ki = {
2162
+ }, bi = ["disabled"], wi = {
2152
2163
  key: 0,
2153
2164
  class: "i-svg-spinners-ring-resize size-4"
2154
- }, bi = {
2165
+ }, vi = {
2155
2166
  key: 1,
2156
2167
  class: "i-tabler-paperclip size-5"
2157
- }, wi = ["placeholder", "disabled"], vi = ["disabled"], Li = /* @__PURE__ */ _e({
2168
+ }, yi = ["placeholder", "disabled"], Ti = ["disabled"], Oi = /* @__PURE__ */ _e({
2158
2169
  __name: "ElAgentChat",
2159
2170
  props: {
2160
2171
  chatController: {},
@@ -2169,14 +2180,14 @@ const Xr = { class: "flex flex-col h-full relative" }, Qr = {
2169
2180
  },
2170
2181
  setup(l) {
2171
2182
  const t = new M.Renderer();
2172
- t.link = ({ href: A, text: E }) => `<a href="${A}" target="_blank" rel="noopener noreferrer">${E}</a>`, M.setOptions({ breaks: !0, gfm: !0, renderer: t });
2173
- function e(A) {
2174
- if (!A)
2183
+ t.link = ({ href: E, text: _ }) => `<a href="${E}" target="_blank" rel="noopener noreferrer">${_}</a>`, M.setOptions({ breaks: !0, gfm: !0, renderer: t });
2184
+ function e(E) {
2185
+ if (!E)
2175
2186
  return "";
2176
- const E = M.parse(A, { async: !1 });
2177
- return ar.sanitize(E, { ADD_ATTR: ["target"] });
2187
+ const _ = M.parse(E, { async: !1 });
2188
+ return or.sanitize(_, { ADD_ATTR: ["target"] });
2178
2189
  }
2179
- h(e, "renderMarkdown");
2190
+ u(e, "renderMarkdown");
2180
2191
  const n = {
2181
2192
  private: "",
2182
2193
  org: "",
@@ -2186,28 +2197,28 @@ const Xr = { class: "flex flex-col h-full relative" }, Qr = {
2186
2197
  org: { icon: "i-tabler-users", label: "Workspace", tooltip: "Visible to workspace members" },
2187
2198
  public: { icon: "i-tabler-globe", label: "Public", tooltip: "Anyone with the link can see this" }
2188
2199
  }, r = W(() => l.setupHint ?? n[l.scope]), a = W(() => {
2189
- const A = { ...s[l.scope] };
2190
- return l.scope === "org" && l.scopeName && (A.label = l.scopeName, A.tooltip = `Visible to ${l.scopeName} members`), A;
2191
- }), o = W(() => l.scale === "lg"), c = K(""), f = K(), d = K(), u = K(), g = K([]), m = K(!1);
2192
- function S(A, E) {
2193
- const b = A[E], z = A[E + 1];
2200
+ const E = { ...s[l.scope] };
2201
+ return l.scope === "org" && l.scopeName && (E.label = l.scopeName, E.tooltip = `Visible to ${l.scopeName} members`), E;
2202
+ }), o = W(() => l.scale === "lg"), c = Q(""), f = Q(), d = Q(), p = Q(), g = Q([]), m = Q(!1);
2203
+ function w(E, _) {
2204
+ const b = E[_], z = E[_ + 1];
2194
2205
  return !z || z.sender !== b.sender;
2195
2206
  }
2196
- h(S, "shouldShowAvatar");
2197
- const D = W(() => l.chatController?.textState.value), $ = W(() => D.value?.isConnected ?? !1), me = W(() => D.value?.isThinking ?? !1), xe = W(() => D.value?.connectionStatus === "disconnected" && !!D.value?.error), te = W(() => D.value?.connectionStatus !== "connected" && !D.value?.error), U = W(() => D.value?.error), q = W(() => l.chatController?.sharedMessages.value?.filter((A) => A.sender !== "system") ?? []), ne = W(() => !$.value), ue = W(() => xe.value ? "Agent is offline" : te.value ? "Connecting..." : "Message"), et = W(() => (c.value.trim() || g.value.length > 0) && !ne.value && !m.value);
2207
+ u(w, "shouldShowAvatar");
2208
+ const S = W(() => l.chatController?.textState.value), O = W(() => S.value?.isConnected ?? !1), me = W(() => S.value?.isThinking ?? !1), xe = W(() => S.value?.connectionStatus === "disconnected" && !!S.value?.error), te = W(() => S.value?.connectionStatus !== "connected" && !S.value?.error), U = W(() => S.value?.error), q = W(() => l.chatController?.sharedMessages.value?.filter((E) => E.sender !== "system") ?? []), ne = W(() => !O.value), ue = W(() => xe.value ? "Agent is offline" : te.value ? "Connecting..." : "Message"), et = W(() => (c.value.trim() || g.value.length > 0) && !ne.value && !m.value);
2198
2209
  Zt(async () => {
2199
- if (l.chatController && !$.value)
2210
+ if (l.chatController && !O.value)
2200
2211
  try {
2201
2212
  await l.chatController.startTextConversation();
2202
- } catch (A) {
2203
- console.error("Failed to start text conversation:", A);
2213
+ } catch (E) {
2214
+ console.error("Failed to start text conversation:", E);
2204
2215
  }
2205
2216
  });
2206
2217
  async function tt() {
2207
- const A = c.value.trim(), E = g.value.length > 0;
2208
- if (!A && !E || !l.chatController || !$.value || m.value)
2218
+ const E = c.value.trim(), _ = g.value.length > 0;
2219
+ if (!E && !_ || !l.chatController || !O.value || m.value)
2209
2220
  return;
2210
- const b = c.value, z = E ? [...g.value] : void 0;
2221
+ const b = c.value, z = _ ? [...g.value] : void 0;
2211
2222
  c.value = "", g.value = [], d.value && (d.value.style.height = "auto", d.value.focus());
2212
2223
  try {
2213
2224
  await l.chatController.sendChatMessage(b, z), F();
@@ -2215,28 +2226,28 @@ const Xr = { class: "flex flex-col h-full relative" }, Qr = {
2215
2226
  console.error("Error sending message:", I);
2216
2227
  }
2217
2228
  }
2218
- h(tt, "sendMessage");
2219
- function Tt(A) {
2220
- A.key === "Enter" && !A.shiftKey && (A.preventDefault(), tt());
2229
+ u(tt, "sendMessage");
2230
+ function Tt(E) {
2231
+ E.key === "Enter" && !E.shiftKey && (E.preventDefault(), tt());
2221
2232
  }
2222
- h(Tt, "handleKeydown");
2233
+ u(Tt, "handleKeydown");
2223
2234
  function F() {
2224
- f.value && Pt(() => {
2235
+ f.value && Nt(() => {
2225
2236
  f.value.scrollTop = f.value.scrollHeight;
2226
2237
  });
2227
2238
  }
2228
- h(F, "scrollToBottom");
2239
+ u(F, "scrollToBottom");
2229
2240
  function Ue() {
2230
2241
  d.value && (d.value.style.height = "auto", d.value.style.height = `${Math.min(d.value.scrollHeight, 150)}px`);
2231
2242
  }
2232
- h(Ue, "adjustTextareaHeight"), Ke(c, () => Pt(() => Ue()));
2243
+ u(Ue, "adjustTextareaHeight"), Qe(c, () => Nt(() => Ue()));
2233
2244
  const L = W(() => l.variant === "light");
2234
2245
  function Be() {
2235
- u.value?.click();
2246
+ p.value?.click();
2236
2247
  }
2237
- h(Be, "triggerFileInput");
2238
- async function St(A) {
2239
- const E = A.target, b = E.files?.[0];
2248
+ u(Be, "triggerFileInput");
2249
+ async function St(E) {
2250
+ const _ = E.target, b = _.files?.[0];
2240
2251
  if (!(!b || !l.uploadFn)) {
2241
2252
  m.value = !0;
2242
2253
  try {
@@ -2245,251 +2256,251 @@ const Xr = { class: "flex flex-col h-full relative" }, Qr = {
2245
2256
  } catch (z) {
2246
2257
  console.error("Upload failed:", z);
2247
2258
  } finally {
2248
- m.value = !1, E.value = "";
2259
+ m.value = !1, _.value = "";
2249
2260
  }
2250
2261
  }
2251
2262
  }
2252
- h(St, "handleFileSelect");
2253
- function At(A) {
2254
- g.value = g.value.filter((E, b) => b !== A);
2263
+ u(St, "handleFileSelect");
2264
+ function At(E) {
2265
+ g.value = g.value.filter((_, b) => b !== E);
2255
2266
  }
2256
- h(At, "removeAttachment");
2257
- function nt(A, E) {
2258
- if (E === 0) {
2259
- const pe = A[E];
2267
+ u(At, "removeAttachment");
2268
+ function nt(E, _) {
2269
+ if (_ === 0) {
2270
+ const pe = E[_];
2260
2271
  return pe?.timestamp ? Fe(new Date(pe.timestamp)) : null;
2261
2272
  }
2262
- const b = A[E - 1], z = A[E];
2273
+ const b = E[_ - 1], z = E[_];
2263
2274
  if (!b?.timestamp || !z?.timestamp) return null;
2264
2275
  const I = new Date(b.timestamp).getTime();
2265
2276
  return new Date(z.timestamp).getTime() - I > 36e5 ? Fe(new Date(z.timestamp)) : null;
2266
2277
  }
2267
- h(nt, "shouldShowTimeDivider");
2268
- function Fe(A) {
2269
- const E = /* @__PURE__ */ new Date(), b = A.toDateString() === E.toDateString(), z = new Date(E);
2278
+ u(nt, "shouldShowTimeDivider");
2279
+ function Fe(E) {
2280
+ const _ = /* @__PURE__ */ new Date(), b = E.toDateString() === _.toDateString(), z = new Date(_);
2270
2281
  z.setDate(z.getDate() - 1);
2271
- const I = A.toDateString() === z.toDateString(), he = A.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2282
+ const I = E.toDateString() === z.toDateString(), he = E.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2272
2283
  if (b) return he;
2273
2284
  if (I) return `Yesterday, ${he}`;
2274
- const O = A.getFullYear() === E.getFullYear();
2275
- return `${A.toLocaleDateString("en-US", {
2285
+ const P = E.getFullYear() === _.getFullYear();
2286
+ return `${E.toLocaleDateString("en-US", {
2276
2287
  weekday: "long",
2277
2288
  month: "short",
2278
2289
  day: "numeric",
2279
- ...O ? {} : { year: "numeric" }
2290
+ ...P ? {} : { year: "numeric" }
2280
2291
  })}, ${he}`;
2281
2292
  }
2282
- return h(Fe, "formatTimeDivider"), Ke(q, (A) => {
2283
- A.length > 0 && Pt(() => F());
2284
- }, { immediate: !0, deep: !0 }), (A, E) => (v(), y("div", Xr, [
2285
- L.value ? H("", !0) : (v(), y("div", Qr, [
2286
- $t($s, {
2293
+ return u(Fe, "formatTimeDivider"), Qe(q, (E) => {
2294
+ E.length > 0 && Nt(() => F());
2295
+ }, { immediate: !0, deep: !0 }), (E, _) => (y(), T("div", Qr, [
2296
+ L.value ? H("", !0) : (y(), T("div", Jr, [
2297
+ $t(Bs, {
2287
2298
  agent: l.agent,
2288
- "is-online": $.value
2299
+ "is-online": O.value
2289
2300
  }, null, 8, ["agent", "is-online"])
2290
2301
  ])),
2291
- xe.value ? (v(), y("div", {
2302
+ xe.value ? (y(), T("div", {
2292
2303
  key: 1,
2293
- class: T(["py-16 flex flex-col items-center justify-center gap-3 text-sm", L.value ? "text-theme-400" : "text-white/60"])
2304
+ class: A(["py-16 flex flex-col items-center justify-center gap-3 text-sm", L.value ? "text-theme-400" : "text-white/60"])
2294
2305
  }, [
2295
- w("i", {
2296
- class: T(["i-heroicons-cloud-arrow-down size-8", L.value ? "text-theme-300" : "text-white/40"])
2306
+ v("i", {
2307
+ class: A(["i-heroicons-cloud-arrow-down size-8", L.value ? "text-theme-300" : "text-white/40"])
2297
2308
  }, null, 2),
2298
- w("span", null, ce(U.value), 1)
2299
- ], 2)) : te.value ? (v(), y("div", {
2309
+ v("span", null, ce(U.value), 1)
2310
+ ], 2)) : te.value ? (y(), T("div", {
2300
2311
  key: 2,
2301
- class: T(["py-16 flex flex-col items-center justify-center gap-2 text-sm", L.value ? "text-theme-400" : "text-theme-600"])
2312
+ class: A(["py-16 flex flex-col items-center justify-center gap-2 text-sm", L.value ? "text-theme-400" : "text-theme-600"])
2302
2313
  }, [
2303
2314
  $t(Rn, { class: "size-4" })
2304
- ], 2)) : r.value ? (v(), y("div", {
2315
+ ], 2)) : r.value ? (y(), T("div", {
2305
2316
  key: 3,
2306
- class: T(["flex items-center justify-center gap-1.5 py-2 text-[11px]", L.value ? "text-theme-300" : "text-white/30"])
2317
+ class: A(["flex items-center justify-center gap-1.5 py-2 text-[11px]", L.value ? "text-theme-300" : "text-white/30"])
2307
2318
  }, [
2308
- E[2] || (E[2] = w("i", { class: "i-tabler-tool size-3" }, null, -1)),
2309
- w("span", null, ce(r.value), 1)
2319
+ _[2] || (_[2] = v("i", { class: "i-tabler-tool size-3" }, null, -1)),
2320
+ v("span", null, ce(r.value), 1)
2310
2321
  ], 2)) : H("", !0),
2311
- w("div", {
2322
+ v("div", {
2312
2323
  ref_key: "messagesContainer",
2313
2324
  ref: f,
2314
2325
  class: "flex-1 overflow-y-auto overflow-x-hidden py-4 px-3 space-y-1 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
2315
2326
  }, [
2316
- q.value.length === 0 && !te.value && !xe.value ? (v(), y("div", Kr, [
2317
- w("div", Jr, [
2318
- w("img", {
2327
+ q.value.length === 0 && !te.value && !xe.value ? (y(), T("div", ei, [
2328
+ v("div", ti, [
2329
+ v("img", {
2319
2330
  src: l.agent.avatarUrl.value,
2320
2331
  alt: l.agent.displayName.value,
2321
- class: T(["rounded-full object-cover", o.value ? "size-28" : "size-20"])
2322
- }, null, 10, ei),
2323
- $.value ? (v(), y("span", {
2332
+ class: A(["rounded-full object-cover", o.value ? "size-28" : "size-20"])
2333
+ }, null, 10, ni),
2334
+ O.value ? (y(), T("span", {
2324
2335
  key: 0,
2325
- class: T(["absolute bottom-0.5 right-0.5 flex items-center justify-center", o.value ? "size-6" : "size-5"])
2336
+ class: A(["absolute bottom-0.5 right-0.5 flex items-center justify-center", o.value ? "size-6" : "size-5"])
2326
2337
  }, [
2327
- w("span", {
2328
- class: T(["absolute inline-flex rounded-full bg-emerald-400/40 animate-ping", o.value ? "size-4" : "size-3"]),
2338
+ v("span", {
2339
+ class: A(["absolute inline-flex rounded-full bg-emerald-400/40 animate-ping", o.value ? "size-4" : "size-3"]),
2329
2340
  style: { "animation-duration": "2.5s" }
2330
2341
  }, null, 2),
2331
- w("span", {
2332
- class: T(["relative inline-flex rounded-full bg-emerald-500 ring-2", [
2342
+ v("span", {
2343
+ class: A(["relative inline-flex rounded-full bg-emerald-500 ring-2", [
2333
2344
  o.value ? "size-3" : "size-2.5",
2334
2345
  L.value ? "ring-white" : "ring-theme-900"
2335
2346
  ]])
2336
2347
  }, null, 2)
2337
2348
  ], 2)) : H("", !0)
2338
2349
  ]),
2339
- w("div", {
2340
- class: T(["font-semibold", [L.value ? "text-theme-900" : "text-white", o.value ? "text-lg" : "text-base"]])
2350
+ v("div", {
2351
+ class: A(["font-semibold", [L.value ? "text-theme-900" : "text-white", o.value ? "text-lg" : "text-base"]])
2341
2352
  }, ce(l.agent.displayName.value), 3),
2342
- w("p", {
2343
- class: T(["mt-1 text-center", [L.value ? "text-theme-300" : "text-white/30", o.value ? "text-sm" : "text-xs"]])
2353
+ v("p", {
2354
+ class: A(["mt-1 text-center", [L.value ? "text-theme-300" : "text-white/30", o.value ? "text-sm" : "text-xs"]])
2344
2355
  }, ce(l.emptyStateMessage || "Send a message to get started"), 3),
2345
- w("div", {
2346
- class: T(["inline-flex items-center gap-1.5 mt-6 px-2.5 py-1 rounded-full text-[11px]", L.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2356
+ v("div", {
2357
+ class: A(["inline-flex items-center gap-1.5 mt-6 px-2.5 py-1 rounded-full text-[11px]", L.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2347
2358
  title: a.value.tooltip
2348
2359
  }, [
2349
- w("i", {
2350
- class: T([a.value.icon, "size-3"])
2360
+ v("i", {
2361
+ class: A([a.value.icon, "size-3"])
2351
2362
  }, null, 2),
2352
- w("span", null, ce(a.value.label), 1)
2353
- ], 10, ti)
2363
+ v("span", null, ce(a.value.label), 1)
2364
+ ], 10, si)
2354
2365
  ])) : H("", !0),
2355
- (v(!0), y(Se, null, dt(q.value, (b, z) => (v(), y(Se, {
2366
+ (y(!0), T(Se, null, dt(q.value, (b, z) => (y(), T(Se, {
2356
2367
  key: b.id
2357
2368
  }, [
2358
- nt(q.value, z) ? (v(), y("div", ni, [
2359
- w("div", {
2360
- class: T(["flex-1 h-px", L.value ? "bg-theme-200" : "bg-white/10"])
2369
+ nt(q.value, z) ? (y(), T("div", ri, [
2370
+ v("div", {
2371
+ class: A(["flex-1 h-px", L.value ? "bg-theme-200" : "bg-white/10"])
2361
2372
  }, null, 2),
2362
- w("span", {
2363
- class: T(["font-medium shrink-0", [L.value ? "text-theme-400" : "text-white/40", o.value ? "text-xs" : "text-[11px]"]])
2373
+ v("span", {
2374
+ class: A(["font-medium shrink-0", [L.value ? "text-theme-400" : "text-white/40", o.value ? "text-xs" : "text-[11px]"]])
2364
2375
  }, ce(nt(q.value, z)), 3),
2365
- w("div", {
2366
- class: T(["flex-1 h-px", L.value ? "bg-theme-200" : "bg-white/10"])
2376
+ v("div", {
2377
+ class: A(["flex-1 h-px", L.value ? "bg-theme-200" : "bg-white/10"])
2367
2378
  }, null, 2)
2368
2379
  ])) : H("", !0),
2369
- w("div", {
2370
- class: T(["flex gap-2 items-end", {
2380
+ v("div", {
2381
+ class: A(["flex gap-2 items-end", {
2371
2382
  "justify-end": b.sender === "user",
2372
2383
  "justify-start": b.sender === "agent",
2373
- "mb-4": S(q.value, z)
2384
+ "mb-4": w(q.value, z)
2374
2385
  }])
2375
2386
  }, [
2376
- b.sender === "agent" ? (v(), y("div", {
2387
+ b.sender === "agent" ? (y(), T("div", {
2377
2388
  key: 0,
2378
- class: T(["flex-shrink-0", o.value ? "size-10" : "size-8"])
2389
+ class: A(["flex-shrink-0", o.value ? "size-10" : "size-8"])
2379
2390
  }, [
2380
- S(q.value, z) ? (v(), y("img", {
2391
+ w(q.value, z) ? (y(), T("img", {
2381
2392
  key: 0,
2382
2393
  src: l.agent.avatarUrl.value,
2383
2394
  alt: l.agent.displayName.value,
2384
- class: T(["rounded-full object-cover", o.value ? "size-10" : "size-7"])
2385
- }, null, 10, si)) : H("", !0)
2395
+ class: A(["rounded-full object-cover", o.value ? "size-10" : "size-7"])
2396
+ }, null, 10, ii)) : H("", !0)
2386
2397
  ], 2)) : H("", !0),
2387
- w("div", {
2388
- class: T(b.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2398
+ v("div", {
2399
+ class: A(b.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2389
2400
  }, [
2390
- b.attachments?.length ? (v(), y("div", {
2401
+ b.attachments?.length ? (y(), T("div", {
2391
2402
  key: 0,
2392
- class: T(["mb-1 space-y-1", b.sender === "user" ? "flex flex-col items-end" : ""])
2403
+ class: A(["mb-1 space-y-1", b.sender === "user" ? "flex flex-col items-end" : ""])
2393
2404
  }, [
2394
- (v(!0), y(Se, null, dt(b.attachments, (I, he) => (v(), y(Se, { key: he }, [
2395
- I.type === "image" ? (v(), y("img", {
2405
+ (y(!0), T(Se, null, dt(b.attachments, (I, he) => (y(), T(Se, { key: he }, [
2406
+ I.type === "image" ? (y(), T("img", {
2396
2407
  key: 0,
2397
2408
  src: I.url,
2398
2409
  alt: I.name,
2399
- class: T(["rounded-xl object-cover max-h-48", o.value ? "max-w-[320px]" : "max-w-[240px]"])
2400
- }, null, 10, ri)) : I.type === "audio" ? (v(), y("audio", {
2410
+ class: A(["rounded-xl object-cover max-h-48", o.value ? "max-w-[320px]" : "max-w-[240px]"])
2411
+ }, null, 10, ai)) : I.type === "audio" ? (y(), T("audio", {
2401
2412
  key: 1,
2402
2413
  src: I.url,
2403
2414
  controls: "",
2404
2415
  class: "max-w-full"
2405
- }, null, 8, ii)) : (v(), y("a", {
2416
+ }, null, 8, li)) : (y(), T("a", {
2406
2417
  key: 2,
2407
2418
  href: I.url,
2408
2419
  target: "_blank",
2409
2420
  rel: "noopener",
2410
- class: T(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", L.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2421
+ class: A(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", L.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2411
2422
  }, [
2412
- E[3] || (E[3] = w("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2423
+ _[3] || (_[3] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2413
2424
  vs(" " + ce(I.name), 1)
2414
- ], 10, ai))
2425
+ ], 10, oi))
2415
2426
  ], 64))), 128))
2416
2427
  ], 2)) : H("", !0),
2417
- b.text ? (v(), y("div", {
2428
+ b.text ? (y(), T("div", {
2418
2429
  key: 1,
2419
- class: T(["rounded-2xl px-3.5 py-2", b.sender === "user" ? "bg-primary-500 text-white" : L.value ? "bg-theme-100 text-theme-800" : "bg-white/15 backdrop-blur-sm text-white/95"])
2430
+ class: A(["rounded-2xl px-3.5 py-2", b.sender === "user" ? "bg-primary-500 text-white" : L.value ? "bg-theme-100 text-theme-800" : "bg-white/15 backdrop-blur-sm text-white/95"])
2420
2431
  }, [
2421
- w("div", {
2422
- class: T(["chat-msg-prose break-words", [
2432
+ v("div", {
2433
+ class: A(["chat-msg-prose break-words", [
2423
2434
  o.value ? "text-[15px] leading-[1.6]" : "text-[13px] leading-[1.55]",
2424
2435
  b.sender === "user" || !L.value ? "chat-msg-prose-invert" : ""
2425
2436
  ]]),
2426
2437
  innerHTML: e(b.text)
2427
- }, null, 10, li)
2438
+ }, null, 10, ci)
2428
2439
  ], 2)) : H("", !0)
2429
2440
  ], 2)
2430
2441
  ], 2)
2431
2442
  ], 64))), 128)),
2432
- me.value ? (v(), y("div", oi, [
2433
- w("div", ci, [
2434
- w("img", {
2443
+ me.value ? (y(), T("div", ui, [
2444
+ v("div", hi, [
2445
+ v("img", {
2435
2446
  src: l.agent.avatarUrl.value,
2436
2447
  alt: l.agent.displayName.value,
2437
- class: T(["rounded-full object-cover", o.value ? "size-10" : "size-8"])
2438
- }, null, 10, ui)
2448
+ class: A(["rounded-full object-cover", o.value ? "size-10" : "size-8"])
2449
+ }, null, 10, pi)
2439
2450
  ]),
2440
- w("div", {
2441
- class: T(["rounded-2xl px-4 py-2.5 flex items-center", L.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2451
+ v("div", {
2452
+ class: A(["rounded-2xl px-4 py-2.5 flex items-center", L.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2442
2453
  }, [
2443
- w("i", {
2444
- class: T(["i-svg-spinners-3-dots-fade size-6", L.value ? "text-theme-400" : "text-white/70"])
2454
+ v("i", {
2455
+ class: A(["i-svg-spinners-3-dots-fade size-6", L.value ? "text-theme-400" : "text-white/70"])
2445
2456
  }, null, 2)
2446
2457
  ], 2)
2447
2458
  ])) : H("", !0)
2448
2459
  ], 512),
2449
- w("div", hi, [
2450
- g.value.length > 0 ? (v(), y("div", pi, [
2451
- (v(!0), y(Se, null, dt(g.value, (b, z) => (v(), y("div", {
2460
+ v("div", fi, [
2461
+ g.value.length > 0 ? (y(), T("div", di, [
2462
+ (y(!0), T(Se, null, dt(g.value, (b, z) => (y(), T("div", {
2452
2463
  key: z,
2453
2464
  class: "relative shrink-0 group"
2454
2465
  }, [
2455
- b.type === "image" ? (v(), y("img", {
2466
+ b.type === "image" ? (y(), T("img", {
2456
2467
  key: 0,
2457
2468
  src: b.url,
2458
2469
  alt: b.name,
2459
- class: T(["size-14 rounded-lg object-cover border", L.value ? "border-theme-200" : "border-white/20"])
2460
- }, null, 10, fi)) : (v(), y("div", {
2470
+ class: A(["size-14 rounded-lg object-cover border", L.value ? "border-theme-200" : "border-white/20"])
2471
+ }, null, 10, gi)) : (y(), T("div", {
2461
2472
  key: 1,
2462
- class: T(["h-14 px-3 rounded-lg flex items-center gap-1.5 text-xs border", L.value ? "border-theme-200 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2473
+ class: A(["h-14 px-3 rounded-lg flex items-center gap-1.5 text-xs border", L.value ? "border-theme-200 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2463
2474
  }, [
2464
- E[4] || (E[4] = w("i", { class: "i-tabler-file size-4" }, null, -1)),
2465
- w("span", di, ce(b.name), 1)
2475
+ _[4] || (_[4] = v("i", { class: "i-tabler-file size-4" }, null, -1)),
2476
+ v("span", mi, ce(b.name), 1)
2466
2477
  ], 2)),
2467
- w("button", {
2478
+ v("button", {
2468
2479
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-600 text-white text-xs opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",
2469
- onClick: /* @__PURE__ */ h((I) => At(z), "onClick")
2470
- }, [...E[5] || (E[5] = [
2471
- w("i", { class: "i-tabler-x size-3" }, null, -1)
2472
- ])], 8, gi)
2480
+ onClick: /* @__PURE__ */ u((I) => At(z), "onClick")
2481
+ }, [..._[5] || (_[5] = [
2482
+ v("i", { class: "i-tabler-x size-3" }, null, -1)
2483
+ ])], 8, xi)
2473
2484
  ]))), 128)),
2474
- m.value ? (v(), y("div", mi, [
2485
+ m.value ? (y(), T("div", ki, [
2475
2486
  $t(Rn, { class: "size-5" })
2476
2487
  ])) : H("", !0)
2477
2488
  ])) : H("", !0),
2478
- l.uploadFn ? (v(), y("input", {
2489
+ l.uploadFn ? (y(), T("input", {
2479
2490
  key: 1,
2480
2491
  ref_key: "fileInput",
2481
- ref: u,
2492
+ ref: p,
2482
2493
  type: "file",
2483
2494
  accept: "image/*,audio/*,video/*",
2484
2495
  class: "hidden",
2485
2496
  onChange: St
2486
2497
  }, null, 544)) : H("", !0),
2487
- w("div", {
2488
- class: T(["flex items-end gap-1 w-full rounded-3xl px-3 py-1.5", L.value ? "bg-theme-50 border border-theme-200 focus-within:border-theme-300" : "bg-white/10 backdrop-blur-sm border border-white/20 focus-within:border-white/40"])
2498
+ v("div", {
2499
+ class: A(["flex items-end gap-1 w-full rounded-3xl px-3 py-1.5", L.value ? "bg-theme-50 border border-theme-200 focus-within:border-theme-300" : "bg-white/10 backdrop-blur-sm border border-white/20 focus-within:border-white/40"])
2489
2500
  }, [
2490
- l.uploadFn ? (v(), y("button", {
2501
+ l.uploadFn ? (y(), T("button", {
2491
2502
  key: 0,
2492
- class: T(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 cursor-pointer", [
2503
+ class: A(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 cursor-pointer", [
2493
2504
  o.value ? "size-10" : "size-9",
2494
2505
  L.value ? "text-theme-400 hover:text-theme-600" : "text-white/50 hover:text-white/80",
2495
2506
  m.value ? "opacity-50 pointer-events-none" : ""
@@ -2497,43 +2508,43 @@ const Xr = { class: "flex flex-col h-full relative" }, Qr = {
2497
2508
  disabled: ne.value || m.value,
2498
2509
  onClick: Be
2499
2510
  }, [
2500
- m.value ? (v(), y("i", ki)) : (v(), y("i", bi))
2501
- ], 10, xi)) : H("", !0),
2502
- Vn(w("textarea", {
2511
+ m.value ? (y(), T("i", wi)) : (y(), T("i", vi))
2512
+ ], 10, bi)) : H("", !0),
2513
+ Vn(v("textarea", {
2503
2514
  ref_key: "textarea",
2504
2515
  ref: d,
2505
- "onUpdate:modelValue": E[0] || (E[0] = (b) => c.value = b),
2516
+ "onUpdate:modelValue": _[0] || (_[0] = (b) => c.value = b),
2506
2517
  rows: "1",
2507
2518
  enterkeyhint: "send",
2508
2519
  placeholder: ue.value,
2509
2520
  disabled: ne.value,
2510
2521
  style: ys({ fontSize: (o.value, "16px"), resize: "none" }),
2511
- class: T(["flex-1 min-w-0 bg-transparent px-2 py-1.5 focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", L.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2522
+ class: A(["flex-1 min-w-0 bg-transparent px-2 py-1.5 focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", L.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2512
2523
  onKeydown: Tt
2513
- }, null, 46, wi), [
2524
+ }, null, 46, yi), [
2514
2525
  [Yn, c.value]
2515
2526
  ]),
2516
- w("button", {
2517
- class: T(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5", [
2527
+ v("button", {
2528
+ class: A(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5", [
2518
2529
  o.value ? "size-10" : "size-9",
2519
2530
  et.value ? "bg-primary-500 text-white hover:bg-primary-600 cursor-pointer" : L.value ? "bg-theme-100 text-theme-300" : "bg-white/10 text-white/30"
2520
2531
  ]]),
2521
2532
  disabled: !et.value,
2522
- onClick: E[1] || (E[1] = (b) => tt())
2523
- }, [...E[6] || (E[6] = [
2524
- w("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2525
- ])], 10, vi)
2533
+ onClick: _[1] || (_[1] = (b) => tt())
2534
+ }, [..._[6] || (_[6] = [
2535
+ v("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2536
+ ])], 10, Ti)
2526
2537
  ], 2),
2527
- w("div", {
2528
- class: T(["text-[10px] text-center mt-2 select-none", L.value ? "text-theme-300" : "text-white/40"])
2538
+ v("div", {
2539
+ class: A(["text-[10px] text-center mt-2 select-none", L.value ? "text-theme-300" : "text-white/40"])
2529
2540
  }, " Press Enter to send, Shift+Enter for new line ", 2)
2530
2541
  ])
2531
2542
  ]));
2532
2543
  }
2533
- }), yi = { class: "agent-wrap" }, Ti = {
2544
+ }), Si = { class: "agent-wrap" }, Ai = {
2534
2545
  key: 0,
2535
2546
  class: "flex items-center justify-center h-full"
2536
- }, zi = /* @__PURE__ */ _e({
2547
+ }, Pi = /* @__PURE__ */ _e({
2537
2548
  __name: "AgentWrap",
2538
2549
  props: {
2539
2550
  sdk: {},
@@ -2550,7 +2561,7 @@ const Xr = { class: "flex flex-col h-full relative" }, Qr = {
2550
2561
  const t = As("AgentWrap"), e = l, n = e.sdk || Es.getInstance({
2551
2562
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
2552
2563
  ...e.apiBase && { apiBase: e.apiBase }
2553
- }), s = K(!e.agent), r = Ts(e.agent ? new xt({ config: e.agent }) : void 0), a = K();
2564
+ }), s = Q(!e.agent), r = Ts(e.agent ? new xt({ config: e.agent }) : void 0), a = Q();
2554
2565
  return Zt(async () => {
2555
2566
  if (e.agent) {
2556
2567
  t.debug("Agent provided via props, skipping fetch", {
@@ -2627,9 +2638,9 @@ const Xr = { class: "flex flex-col h-full relative" }, Qr = {
2627
2638
  }
2628
2639
  });
2629
2640
  }
2630
- }), (o, c) => (v(), y("div", yi, [
2631
- s.value ? (v(), y("div", Ti, [...c[0] || (c[0] = [
2632
- w("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2641
+ }), (o, c) => (y(), T("div", Si, [
2642
+ s.value ? (y(), T("div", Ai, [...c[0] || (c[0] = [
2643
+ v("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2633
2644
  ])])) : r.value ? qn(o.$slots, "default", {
2634
2645
  key: 1,
2635
2646
  sdk: jt(n),
@@ -2645,15 +2656,15 @@ const Xr = { class: "flex flex-col h-full relative" }, Qr = {
2645
2656
  });
2646
2657
  export {
2647
2658
  Dn as A,
2648
- zi as _,
2649
- Li as a,
2650
- Ii as b,
2651
- Ci as c,
2652
- Mi as d,
2659
+ Pi as _,
2660
+ Oi as a,
2661
+ Li as b,
2662
+ Mi as c,
2663
+ zi as d,
2653
2664
  Rn as e,
2654
- $s as f,
2655
- Ri as g,
2665
+ Bs as f,
2666
+ Ci as g,
2656
2667
  In as h,
2657
- Di as p
2668
+ Ii as p
2658
2669
  };
2659
2670
  //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang.js.map