@pagelines/sdk 1.0.472 → 1.0.473

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,24 +1,24 @@
1
- var In = Object.defineProperty;
2
- var ws = (l, t, e) => t in l ? In(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
- var h = (l, t) => In(l, "name", { value: t, configurable: !0 });
4
- var C = (l, t, e) => ws(l, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as Ie, openBlock as S, createElementBlock as A, createElementVNode as v, normalizeClass as E, ref as Z, watch as rt, computed as H, createCommentVNode as U, renderSlot as Zn, onMounted as Jt, Fragment as _e, renderList as bt, withDirectives as Xn, vModelText as Kn, unref as Zt, toDisplayString as re, nextTick as Ft, createVNode as Ht, createTextVNode as Ye, withModifiers as vs, shallowRef as ys } from "vue";
6
- import { SettingsObject as Ts, Agent as wt, getDefaultAvatarUrl as Qn, createLogger as Ss } from "@pagelines/core";
1
+ var Dn = Object.defineProperty;
2
+ var ws = (l, t, e) => t in l ? Dn(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
+ var u = (l, t) => Dn(l, "name", { value: t, configurable: !0 });
4
+ var D = (l, t, e) => ws(l, typeof t != "symbol" ? t + "" : t, e);
5
+ import { defineComponent as Me, openBlock as T, createElementBlock as S, createElementVNode as v, normalizeClass as A, ref as K, watch as lt, computed as H, createCommentVNode as $, renderSlot as Zn, onMounted as tn, Fragment as ye, renderList as rt, withDirectives as Xn, vModelText as Kn, unref as Kt, toDisplayString as ne, nextTick as Gt, createVNode as Wt, createTextVNode as Xe, withModifiers as vs, shallowRef as ys } from "vue";
6
+ import { SettingsObject as Ts, Agent as Tt, getDefaultAvatarUrl as Qn, createLogger as Ss } from "@pagelines/core";
7
7
  import { P as As } from "./sdkClient.js";
8
8
  const Es = { class: "spinner max-w-sm" }, _s = {
9
9
  class: "ring-circular h-full w-full origin-center",
10
10
  viewBox: "25 25 50 50"
11
- }, Dn = /* @__PURE__ */ Ie({
11
+ }, In = /* @__PURE__ */ Me({
12
12
  __name: "FSpinner",
13
13
  props: {
14
14
  width: { type: String, default: "" },
15
15
  colorMode: { type: String, default: "primary" }
16
16
  },
17
17
  setup(l) {
18
- return (t, e) => (S(), A("div", Es, [
19
- (S(), A("svg", _s, [
18
+ return (t, e) => (T(), S("div", Es, [
19
+ (T(), S("svg", _s, [
20
20
  v("circle", {
21
- class: E([l.colorMode, "ring-path"]),
21
+ class: A([l.colorMode, "ring-path"]),
22
22
  cx: "50",
23
23
  cy: "50",
24
24
  r: "20",
@@ -33,24 +33,24 @@ const Es = { class: "spinner max-w-sm" }, _s = {
33
33
  }), Rs = [
34
34
  { pattern: /\bNO_REP\w*\b/g, label: "NO_REPLY — bot chose not to respond" },
35
35
  { pattern: /\bHEARTBEAT_OK\b/g, label: "HEARTBEAT_OK — scheduled check, nothing to do" }
36
- ], Cs = 9e4, un = class un extends Ts {
36
+ ], Cs = 9e4, pn = class pn extends Ts {
37
37
  constructor(e) {
38
38
  super("AgentChatController", e);
39
- C(this, "isTextMode", !1);
40
- C(this, "lastMessage", { hash: "", time: 0 });
41
- C(this, "isConnecting", !1);
39
+ D(this, "isTextMode", !1);
40
+ D(this, "lastMessage", { hash: "", time: 0 });
41
+ D(this, "isConnecting", !1);
42
42
  // Chat conversation tracking (server-managed persistence)
43
- C(this, "conversationId");
44
- C(this, "textState", Z({
43
+ D(this, "conversationId");
44
+ D(this, "textState", K({
45
45
  isActive: !1,
46
46
  isConnected: !1,
47
47
  isThinking: !1,
48
48
  connectionStatus: "disconnected"
49
49
  }));
50
- C(this, "agentMode", Z("self"));
51
- C(this, "sharedMessages", Z([]));
52
- C(this, "_agent");
53
- this._agent = e.agent instanceof wt ? e.agent : new wt({ config: e.agent }), this.setupModeWatcher();
50
+ D(this, "agentMode", K("self"));
51
+ D(this, "sharedMessages", K([]));
52
+ D(this, "_agent");
53
+ this._agent = e.agent instanceof Tt ? e.agent : new Tt({ config: e.agent }), this.setupModeWatcher();
54
54
  }
55
55
  get chatEnabled() {
56
56
  return this._agent.chatAvailable.value;
@@ -59,10 +59,17 @@ const Es = { class: "spinner max-w-sm" }, _s = {
59
59
  return this._agent.chatUnavailable.value;
60
60
  }
61
61
  mapChatError(e) {
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.";
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." : e.includes("[no-reply]") ? "The reply didn't make it back. Refresh to see if it landed." : e.includes("[stream-open]") || e.includes("[stream-read]") ? "Lost connection mid-reply. Try again." : e.includes("[api]") ? "Couldn't send. Try again." : "Something went wrong. Try again.";
63
63
  }
64
+ /**
65
+ * Errors we treat as recoverable mid-conversation: rate limits, timeouts,
66
+ * transient infra blips, dropped streams. We render an inline system bubble
67
+ * and keep the input enabled so the next attempt can succeed without
68
+ * forcing a manual reload. Hard errors (auth lost, agent missing) still
69
+ * fall through to handleError which marks the conversation dead.
70
+ */
64
71
  isTransientError(e) {
65
- return e.includes("timed out") || e.includes("starting up") || e.includes("503");
72
+ return e.includes("timed out") || e.includes("starting up") || e.includes("503") || e.includes("429") || e.includes("[no-reply]") || e.includes("[stream-open]") || e.includes("[stream-read]") || e.includes("[api]");
66
73
  }
67
74
  isDuplicateMessage(e, n) {
68
75
  const s = `${n}:${e.toLowerCase().trim()}`, r = Date.now(), a = s === this.lastMessage.hash && r - this.lastMessage.time < 500;
@@ -103,14 +110,22 @@ Current User:
103
110
  });
104
111
  }
105
112
  setupModeWatcher() {
106
- rt(this.agentMode, async (e, n) => {
113
+ lt(this.agentMode, async (e, n) => {
107
114
  this.logger.info(`Mode changed from ${n} to ${e}`), this.isTextMode && (n === "talk" || n === "chat") && await this.endConversation();
108
115
  });
109
116
  }
110
- handleError(e) {
111
- const n = e.message;
112
- this.logger.error("Conversation error:", e), this.resetState(), this.updateState(this.textState, {
113
- error: n,
117
+ /**
118
+ * Hard error path. Resets the connection and surfaces an inline bubble so
119
+ * the user actually sees what happened — `connectionStatus: 'error'`
120
+ * alone doesn't render anywhere. The raw error is kept on console.error
121
+ * so devs can tell which pipeline stage failed (the `[api]` /
122
+ * `[stream-open]` / `[stream-read]` / `[no-reply]` tags from
123
+ * agent/client.ts survive into the console line).
124
+ */
125
+ handleError(e, n) {
126
+ const s = e.message;
127
+ this.logger.error("Conversation error:", { message: s, raw: n, error: e }), this.addMessage(s, "system"), this.resetState(), this.updateState(this.textState, {
128
+ error: s,
114
129
  connectionStatus: "error"
115
130
  });
116
131
  }
@@ -157,7 +172,13 @@ Current User:
157
172
  * conversation and the user wants a clean slate after resolving it.
158
173
  */
159
174
  newConversation() {
160
- this.conversationId = void 0, this.sharedMessages.value = [], this.lastMessage = { hash: "", time: 0 }, this.updateState(this.textState, { isThinking: !1, accountGated: !1 });
175
+ this.conversationId = void 0, this.sharedMessages.value = [], this.lastMessage = { hash: "", time: 0 }, this.updateState(this.textState, {
176
+ isThinking: !1,
177
+ accountGated: !1,
178
+ isConnected: this.chatEnabled,
179
+ connectionStatus: this.chatEnabled ? "connected" : "disconnected",
180
+ error: void 0
181
+ });
161
182
  }
162
183
  async sendChatMessage(e, n) {
163
184
  if (!this.isTextMode)
@@ -175,50 +196,50 @@ Current User:
175
196
  this.addMessage(e, "user", n), this.updateState(this.textState, { isThinking: !0 });
176
197
  const a = `stream-${Date.now()}`;
177
198
  let o = !1;
178
- const c = /* @__PURE__ */ h((p) => {
199
+ const c = /* @__PURE__ */ u((f) => {
179
200
  o || (o = !0, this.sharedMessages.value = [
180
201
  ...this.sharedMessages.value,
181
202
  { id: a, text: "", sender: "agent", timestamp: (/* @__PURE__ */ new Date()).toISOString() }
182
203
  ]);
183
- const x = this.sharedMessages.value, T = x[x.length - 1];
184
- T?.id === a && (T.text += p, this.sharedMessages.value = [...x]);
185
- }, "onDelta"), f = /* @__PURE__ */ h((p) => {
204
+ const m = this.sharedMessages.value, w = m[m.length - 1];
205
+ w?.id === a && (w.text += f, this.sharedMessages.value = [...m]);
206
+ }, "onDelta"), p = /* @__PURE__ */ u((f) => {
186
207
  if (!o) {
187
208
  g("empty_stream — assistant returned no content");
188
209
  return;
189
210
  }
190
- const x = this.sharedMessages.value, T = x[x.length - 1];
191
- if (T?.id === a && T.text) {
192
- let _ = T.text;
211
+ const m = this.sharedMessages.value, w = m[m.length - 1];
212
+ if (w?.id === a && w.text) {
213
+ let E = w.text;
193
214
  for (const z of Rs)
194
- z.pattern.test(_) && (console.debug(`[chat] filtered directive: ${z.label}`), _ = _.replace(z.pattern, "").trim(), z.pattern.lastIndex = 0);
195
- _ ? _ !== T.text && (T.text = _, this.sharedMessages.value = [...x]) : this.sharedMessages.value = x.slice(0, -1);
196
- }
197
- p && (this.conversationId = p), this.updateState(this.textState, { isThinking: !1 });
198
- }, "onDone"), g = /* @__PURE__ */ h((p) => {
199
- const x = this.sharedMessages.value, T = x[x.length - 1];
200
- if (T?.id === a && !T.text && (this.sharedMessages.value = x.slice(0, -1)), typeof p == "object" && p.code && p.error) {
201
- const { bucket: te, actionUrl: ae, actionLabel: J, help: P } = p;
202
- if (te !== void 0 || (/* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP", "EMPTY_STREAM", "RATE_LIMIT"])).has(p.code)) {
203
- const ne = te && ae && J ? { code: p.code, bucket: te, actionLabel: J, actionUrl: ae, ...P ? { help: P } : {} } : void 0;
204
- this.addMessage(p.error, "system", void 0, ne), te === "account" ? this.updateState(this.textState, { isThinking: !1, accountGated: !0 }) : this.updateState(this.textState, { isThinking: !1 });
215
+ z.pattern.test(E) && (console.debug(`[chat] filtered directive: ${z.label}`), E = E.replace(z.pattern, "").trim(), z.pattern.lastIndex = 0);
216
+ E ? E !== w.text && (w.text = E, this.sharedMessages.value = [...m]) : this.sharedMessages.value = m.slice(0, -1);
217
+ }
218
+ f && (this.conversationId = f), this.updateState(this.textState, { isThinking: !1 });
219
+ }, "onDone"), g = /* @__PURE__ */ u((f) => {
220
+ const m = this.sharedMessages.value, w = m[m.length - 1];
221
+ if (w?.id === a && !w.text && (this.sharedMessages.value = m.slice(0, -1)), typeof f == "object" && f.code && f.error) {
222
+ const { bucket: U, actionUrl: se, actionLabel: ie, help: O } = f;
223
+ if (U !== void 0 || (/* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP", "EMPTY_STREAM", "RATE_LIMIT"])).has(f.code)) {
224
+ const j = U && se && ie ? { code: f.code, bucket: U, actionLabel: ie, actionUrl: se, ...O ? { help: O } : {} } : void 0;
225
+ this.addMessage(f.error, "system", void 0, j), U === "account" ? this.updateState(this.textState, { isThinking: !1, accountGated: !0 }) : this.updateState(this.textState, { isThinking: !1 });
205
226
  } else
206
- this.handleError(new Error(p.error));
227
+ this.handleError(new Error(f.error));
207
228
  return;
208
229
  }
209
- const _ = typeof p == "string" ? p : p.error, z = this.mapChatError(_);
210
- this.isTransientError(_) ? (this.addMessage(z, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(z));
211
- }, "onError"), d = /* @__PURE__ */ h((p) => {
212
- this.addMessage(p, "system");
230
+ const E = typeof f == "string" ? f : f.error, z = this.mapChatError(E);
231
+ this.isTransientError(E) ? (this.logger.warn("Chat turn failed (transient):", { raw: E, friendly: z }), this.addMessage(z, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(z), E);
232
+ }, "onError"), d = /* @__PURE__ */ u((f) => {
233
+ this.addMessage(f, "system");
213
234
  }, "onStatus");
214
235
  try {
215
- const p = s ? s({
236
+ const f = s ? s({
216
237
  message: e,
217
238
  attachments: n,
218
239
  conversationId: this.conversationId,
219
240
  history: this.buildHistory(),
220
241
  onDelta: c,
221
- onDone: f,
242
+ onDone: p,
222
243
  onError: g,
223
244
  onStatus: d
224
245
  }) : r.chatStream({
@@ -230,16 +251,16 @@ Current User:
230
251
  visitorId: r.generateAnonId(),
231
252
  context: this.getDynamicSettings().context || void 0,
232
253
  onDelta: c,
233
- onDone: f,
254
+ onDone: p,
234
255
  onError: g,
235
256
  onStatus: d
236
257
  });
237
258
  await Promise.race([
238
- p,
239
- new Promise((x, T) => setTimeout(() => T(new Error("timed out")), Cs))
259
+ f,
260
+ new Promise((m, w) => setTimeout(() => w(new Error("timed out")), Cs))
240
261
  ]);
241
- } catch (p) {
242
- g(p.message || "Something went wrong");
262
+ } catch (f) {
263
+ g(f.message || "Something went wrong");
243
264
  }
244
265
  }
245
266
  buildHistory() {
@@ -263,30 +284,30 @@ Current User:
263
284
  await this.endConversation();
264
285
  }
265
286
  };
266
- h(un, "AgentChatController");
267
- let Mn = un;
287
+ u(pn, "AgentChatController");
288
+ let Mn = pn;
268
289
  function Ln(l) {
269
290
  return l ? typeof l == "string" ? l : l.src || "" : "";
270
291
  }
271
- h(Ln, "getImageSrc");
272
- function Di(l) {
292
+ u(Ln, "getImageSrc");
293
+ function Li(l) {
273
294
  return Ln(l.cover) || Ln(l.avatar) || Qn(l.name);
274
295
  }
275
- h(Di, "getAgentAvatarUrl");
296
+ u(Li, "getAgentAvatarUrl");
276
297
  function zn(l) {
277
298
  const t = l.target;
278
299
  t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = Qn());
279
300
  }
280
- h(zn, "handleImageError");
281
- function Mi(l) {
301
+ u(zn, "handleImageError");
302
+ function zi(l) {
282
303
  const { template: t, agent: e } = l;
283
304
  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 || "");
284
305
  }
285
- h(Mi, "parseButtonTemplate");
286
- const Is = {
306
+ u(zi, "parseButtonTemplate");
307
+ const Ds = {
287
308
  key: 0,
288
309
  class: "absolute inset-0 flex items-center justify-center"
289
- }, Li = /* @__PURE__ */ Ie({
310
+ }, Oi = /* @__PURE__ */ Me({
290
311
  __name: "ElAgentButton",
291
312
  props: {
292
313
  theme: { default: "primary" },
@@ -310,28 +331,28 @@ const Is = {
310
331
  md: "size-4",
311
332
  lg: "size-5"
312
333
  })[l.size]);
313
- return (s, r) => (S(), A("button", {
314
- class: E(["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]])
334
+ return (s, r) => (T(), S("button", {
335
+ 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]])
315
336
  }, [
316
- l.loading ? (S(), A("div", Is, [...r[0] || (r[0] = [
337
+ l.loading ? (T(), S("div", Ds, [...r[0] || (r[0] = [
317
338
  v("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
318
- ])])) : U("", !0),
339
+ ])])) : $("", !0),
319
340
  v("span", {
320
- class: E(["flex items-center gap-2 transition-opacity duration-200", l.loading ? "opacity-0" : "opacity-100"])
341
+ class: A(["flex items-center gap-2 transition-opacity duration-200", l.loading ? "opacity-0" : "opacity-100"])
321
342
  }, [
322
- l.icon ? (S(), A("i", {
343
+ l.icon ? (T(), S("i", {
323
344
  key: 0,
324
- class: E([l.icon, n.value])
325
- }, null, 2)) : U("", !0),
345
+ class: A([l.icon, n.value])
346
+ }, null, 2)) : $("", !0),
326
347
  Zn(s.$slots, "default"),
327
- l.iconAfter ? (S(), A("i", {
348
+ l.iconAfter ? (T(), S("i", {
328
349
  key: 1,
329
- class: E([l.iconAfter, n.value])
330
- }, null, 2)) : U("", !0)
350
+ class: A([l.iconAfter, n.value])
351
+ }, null, 2)) : $("", !0)
331
352
  ], 2)
332
353
  ], 2));
333
354
  }
334
- }), Ds = ["value"], zi = /* @__PURE__ */ Ie({
355
+ }), Is = ["value"], Pi = /* @__PURE__ */ Me({
335
356
  __name: "AgentInputEmail",
336
357
  props: {
337
358
  modelValue: { default: "" }
@@ -339,7 +360,7 @@ const Is = {
339
360
  emits: ["update:modelValue"],
340
361
  setup(l, { emit: t }) {
341
362
  const e = t;
342
- return (n, s) => (S(), A("input", {
363
+ return (n, s) => (T(), S("input", {
343
364
  type: "email",
344
365
  autocomplete: "email",
345
366
  placeholder: "Enter Your Email",
@@ -347,9 +368,9 @@ const Is = {
347
368
  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",
348
369
  style: { "font-size": "16px" },
349
370
  onInput: s[0] || (s[0] = (r) => e("update:modelValue", r.target.value))
350
- }, null, 40, Ds));
371
+ }, null, 40, Is));
351
372
  }
352
- }), Ms = { class: "flex gap-1.5 justify-center" }, Ls = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], Oi = /* @__PURE__ */ Ie({
373
+ }), Ms = { class: "flex gap-1.5 justify-center" }, Ls = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], Ni = /* @__PURE__ */ Me({
353
374
  __name: "AgentInputOneTimeCode",
354
375
  props: {
355
376
  modelValue: {},
@@ -358,73 +379,73 @@ const Is = {
358
379
  },
359
380
  emits: ["update:modelValue", "autoSubmit"],
360
381
  setup(l, { emit: t }) {
361
- const e = l, n = t, s = Z([]), r = Z(Array.from({ length: e.length }).fill("")), a = Z(!1);
362
- Jt(() => {
382
+ const e = l, n = t, s = K([]), r = K(Array.from({ length: e.length }).fill("")), a = K(!1);
383
+ tn(() => {
363
384
  e.modelValue && (r.value = e.modelValue.split("").slice(0, e.length)), e.focusFirst && !("ontouchstart" in window) && s.value[0]?.focus();
364
- }), rt(() => e.modelValue, (d) => {
385
+ }), lt(() => e.modelValue, (d) => {
365
386
  r.value = d ? d.split("").slice(0, e.length) : Array.from({ length: e.length }).fill("");
366
- }), rt(r, () => {
387
+ }), lt(r, () => {
367
388
  const d = r.value.filter(Boolean).join("");
368
389
  n("update:modelValue", d), d.length === e.length && n("autoSubmit", d);
369
390
  }, { deep: !0 });
370
- function o(d, p) {
371
- p.preventDefault(), a.value = !0;
372
- const x = (p.clipboardData?.getData("text") || "").replace(/\D/g, "");
373
- if (x.length === e.length)
374
- r.value = x.split(""), setTimeout(() => {
391
+ function o(d, f) {
392
+ f.preventDefault(), a.value = !0;
393
+ const m = (f.clipboardData?.getData("text") || "").replace(/\D/g, "");
394
+ if (m.length === e.length)
395
+ r.value = m.split(""), setTimeout(() => {
375
396
  s.value[e.length - 1]?.focus(), a.value = !1;
376
397
  }, 10);
377
398
  else {
378
- const T = [...r.value];
379
- x.split("").slice(0, e.length - d).forEach((z, te) => {
380
- T[d + te] = z;
381
- }), r.value = T;
382
- const _ = Math.min(d + x.length, e.length - 1);
399
+ const w = [...r.value];
400
+ m.split("").slice(0, e.length - d).forEach((z, U) => {
401
+ w[d + U] = z;
402
+ }), r.value = w;
403
+ const E = Math.min(d + m.length, e.length - 1);
383
404
  setTimeout(() => {
384
- s.value[_]?.focus(), a.value = !1;
405
+ s.value[E]?.focus(), a.value = !1;
385
406
  }, 10);
386
407
  }
387
408
  }
388
- h(o, "onPaste");
389
- function c(d, p) {
390
- const x = p.target.value.slice(-1).replace(/\D/g, "");
391
- r.value[d] = x, x && d < e.length - 1 && s.value[d + 1]?.focus();
409
+ u(o, "onPaste");
410
+ function c(d, f) {
411
+ const m = f.target.value.slice(-1).replace(/\D/g, "");
412
+ r.value[d] = m, m && d < e.length - 1 && s.value[d + 1]?.focus();
392
413
  }
393
- h(c, "onInput");
394
- function f(d, p) {
395
- p.key === "Backspace" ? (p.preventDefault(), r.value[d] = "", d > 0 && s.value[d - 1]?.focus()) : p.key === "ArrowLeft" && d > 0 ? s.value[d - 1]?.focus() : p.key === "ArrowRight" && d < e.length - 1 && s.value[d + 1]?.focus();
414
+ u(c, "onInput");
415
+ function p(d, f) {
416
+ f.key === "Backspace" ? (f.preventDefault(), r.value[d] = "", d > 0 && s.value[d - 1]?.focus()) : f.key === "ArrowLeft" && d > 0 ? s.value[d - 1]?.focus() : f.key === "ArrowRight" && d < e.length - 1 && s.value[d + 1]?.focus();
396
417
  }
397
- h(f, "onKeydown");
418
+ u(p, "onKeydown");
398
419
  function g(d) {
399
420
  if (s.value[d]?.select(), !a.value && r.value[d])
400
- for (let p = d; p < e.length; p++)
401
- r.value[p] = "";
421
+ for (let f = d; f < e.length; f++)
422
+ r.value[f] = "";
402
423
  }
403
- return h(g, "onFocus"), (d, p) => (S(), A("div", Ms, [
404
- (S(!0), A(_e, null, bt(l.length, (x) => Xn((S(), A("input", {
405
- key: x,
424
+ return u(g, "onFocus"), (d, f) => (T(), S("div", Ms, [
425
+ (T(!0), S(ye, null, rt(l.length, (m) => Xn((T(), S("input", {
426
+ key: m,
406
427
  ref_for: !0,
407
- ref: /* @__PURE__ */ h((T) => s.value[x - 1] = T, "ref"),
408
- "onUpdate:modelValue": /* @__PURE__ */ h((T) => r.value[x - 1] = T, "onUpdate:modelValue"),
428
+ ref: /* @__PURE__ */ u((w) => s.value[m - 1] = w, "ref"),
429
+ "onUpdate:modelValue": /* @__PURE__ */ u((w) => r.value[m - 1] = w, "onUpdate:modelValue"),
409
430
  type: "text",
410
431
  inputmode: "numeric",
411
432
  autocomplete: "one-time-code",
412
433
  class: "size-11 text-center font-mono text-theme-900 bg-white border border-white rounded-lg focus:outline-none transition-all",
413
434
  style: { "font-size": "16px" },
414
435
  maxlength: "1",
415
- onInput: /* @__PURE__ */ h((T) => c(x - 1, T), "onInput"),
416
- onKeydown: /* @__PURE__ */ h((T) => f(x - 1, T), "onKeydown"),
417
- onPaste: /* @__PURE__ */ h((T) => o(x - 1, T), "onPaste"),
418
- onFocus: /* @__PURE__ */ h((T) => g(x - 1), "onFocus")
436
+ onInput: /* @__PURE__ */ u((w) => c(m - 1, w), "onInput"),
437
+ onKeydown: /* @__PURE__ */ u((w) => p(m - 1, w), "onKeydown"),
438
+ onPaste: /* @__PURE__ */ u((w) => o(m - 1, w), "onPaste"),
439
+ onFocus: /* @__PURE__ */ u((w) => g(m - 1), "onFocus")
419
440
  }, null, 40, Ls)), [
420
- [Kn, r.value[x - 1]]
441
+ [Kn, r.value[m - 1]]
421
442
  ])), 128))
422
443
  ]));
423
444
  }
424
445
  }), zs = { class: "relative flex-shrink-0" }, Os = ["src", "alt"], Ps = { class: "absolute top-1 right-1" }, Ns = {
425
446
  key: 1,
426
447
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
427
- }, $s = { class: "min-w-0" }, Us = /* @__PURE__ */ Ie({
448
+ }, $s = { class: "min-w-0" }, Us = /* @__PURE__ */ Me({
428
449
  __name: "ElModeHeader",
429
450
  props: {
430
451
  agent: {},
@@ -433,46 +454,46 @@ const Is = {
433
454
  layout: { default: "centered" }
434
455
  },
435
456
  setup(l) {
436
- return (t, e) => (S(), A("div", {
437
- class: E(["flex gap-4", [
457
+ return (t, e) => (T(), S("div", {
458
+ class: A(["flex gap-4", [
438
459
  l.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
439
460
  ]])
440
461
  }, [
441
462
  v("div", zs, [
442
463
  v("div", {
443
- class: E(["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"])
464
+ 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"])
444
465
  }, [
445
466
  v("img", {
446
467
  src: l.agent.avatarUrl.value,
447
468
  alt: l.agent.displayName.value,
448
469
  class: "w-full h-full object-cover",
449
470
  onError: e[0] || (e[0] = //@ts-ignore
450
- (...n) => Zt(zn) && Zt(zn)(...n))
471
+ (...n) => Kt(zn) && Kt(zn)(...n))
451
472
  }, null, 40, Os)
452
473
  ], 2),
453
474
  v("div", Ps, [
454
- l.isOnline ? (S(), A(_e, { key: 0 }, [
475
+ l.isOnline ? (T(), S(ye, { key: 0 }, [
455
476
  e[1] || (e[1] = v("div", {
456
477
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
457
478
  style: { "animation-duration": "3s" }
458
479
  }, null, -1)),
459
480
  e[2] || (e[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
460
- ], 64)) : (S(), A("div", Ns))
481
+ ], 64)) : (T(), S("div", Ns))
461
482
  ])
462
483
  ]),
463
484
  v("div", $s, [
464
485
  v("h1", {
465
- class: E(["font-light text-white mb-1 truncate", [
486
+ class: A(["font-light text-white mb-1 truncate", [
466
487
  l.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
467
488
  l.layout === "horizontal" ? "text-white/95" : ""
468
489
  ]])
469
- }, re(l.agent.displayName.value), 3),
490
+ }, ne(l.agent.displayName.value), 3),
470
491
  v("p", {
471
- class: E(["font-light line-clamp-1", [
492
+ class: A(["font-light line-clamp-1", [
472
493
  l.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
473
494
  l.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
474
495
  ]])
475
- }, re(l.layout === "horizontal" ? l.agent.title.value || "Digital Agent" : l.agent.title.value), 3)
496
+ }, ne(l.layout === "horizontal" ? l.agent.title.value || "Digital Agent" : l.agent.title.value), 3)
476
497
  ])
477
498
  ], 2));
478
499
  }
@@ -485,49 +506,49 @@ const {
485
506
  getOwnPropertyDescriptor: Hs
486
507
  } = Object;
487
508
  let {
488
- freeze: K,
489
- seal: ie,
490
- create: nt
509
+ freeze: J,
510
+ seal: le,
511
+ create: it
491
512
  } = Object, {
492
- apply: Xt,
493
- construct: Kt
513
+ apply: Qt,
514
+ construct: Jt
494
515
  } = typeof Reflect < "u" && Reflect;
495
- K || (K = /* @__PURE__ */ h(function(t) {
516
+ J || (J = /* @__PURE__ */ u(function(t) {
496
517
  return t;
497
518
  }, "freeze"));
498
- ie || (ie = /* @__PURE__ */ h(function(t) {
519
+ le || (le = /* @__PURE__ */ u(function(t) {
499
520
  return t;
500
521
  }, "seal"));
501
- Xt || (Xt = /* @__PURE__ */ h(function(t, e) {
522
+ Qt || (Qt = /* @__PURE__ */ u(function(t, e) {
502
523
  for (var n = arguments.length, s = new Array(n > 2 ? n - 2 : 0), r = 2; r < n; r++)
503
524
  s[r - 2] = arguments[r];
504
525
  return t.apply(e, s);
505
526
  }, "apply"));
506
- Kt || (Kt = /* @__PURE__ */ h(function(t) {
527
+ Jt || (Jt = /* @__PURE__ */ u(function(t) {
507
528
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), s = 1; s < e; s++)
508
529
  n[s - 1] = arguments[s];
509
530
  return new t(...n);
510
531
  }, "construct"));
511
- const Ze = Q(Array.prototype.forEach), Gs = Q(Array.prototype.lastIndexOf), Pn = Q(Array.prototype.pop), Xe = Q(Array.prototype.push), Ws = Q(Array.prototype.splice), kt = Q(String.prototype.toLowerCase), Gt = Q(String.prototype.toString), Wt = Q(String.prototype.match), Ne = Q(String.prototype.replace), js = Q(String.prototype.indexOf), qs = Q(String.prototype.trim), ce = Q(Object.prototype.hasOwnProperty), Y = Q(RegExp.prototype.test), Ke = Vs(TypeError);
512
- function Q(l) {
532
+ const Ke = ee(Array.prototype.forEach), Gs = ee(Array.prototype.lastIndexOf), Pn = ee(Array.prototype.pop), Qe = ee(Array.prototype.push), Ws = ee(Array.prototype.splice), yt = ee(String.prototype.toLowerCase), jt = ee(String.prototype.toString), qt = ee(String.prototype.match), $e = ee(String.prototype.replace), js = ee(String.prototype.indexOf), qs = ee(String.prototype.trim), ue = ee(Object.prototype.hasOwnProperty), X = ee(RegExp.prototype.test), Je = Vs(TypeError);
533
+ function ee(l) {
513
534
  return function(t) {
514
535
  t instanceof RegExp && (t.lastIndex = 0);
515
536
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), s = 1; s < e; s++)
516
537
  n[s - 1] = arguments[s];
517
- return Xt(l, t, n);
538
+ return Qt(l, t, n);
518
539
  };
519
540
  }
520
- h(Q, "unapply");
541
+ u(ee, "unapply");
521
542
  function Vs(l) {
522
543
  return function() {
523
544
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
524
545
  e[n] = arguments[n];
525
- return Kt(l, e);
546
+ return Jt(l, e);
526
547
  };
527
548
  }
528
- h(Vs, "unconstruct");
529
- function R(l, t) {
530
- let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : kt;
549
+ u(Vs, "unconstruct");
550
+ function C(l, t) {
551
+ let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : yt;
531
552
  On && On(l, null);
532
553
  let n = t.length;
533
554
  for (; n--; ) {
@@ -540,44 +561,44 @@ function R(l, t) {
540
561
  }
541
562
  return l;
542
563
  }
543
- h(R, "addToSet");
564
+ u(C, "addToSet");
544
565
  function Ys(l) {
545
566
  for (let t = 0; t < l.length; t++)
546
- ce(l, t) || (l[t] = null);
567
+ ue(l, t) || (l[t] = null);
547
568
  return l;
548
569
  }
549
- h(Ys, "cleanArray");
550
- function fe(l) {
551
- const t = nt(null);
570
+ u(Ys, "cleanArray");
571
+ function me(l) {
572
+ const t = it(null);
552
573
  for (const [e, n] of Jn(l))
553
- ce(l, e) && (Array.isArray(n) ? t[e] = Ys(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = fe(n) : t[e] = n);
574
+ ue(l, e) && (Array.isArray(n) ? t[e] = Ys(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = me(n) : t[e] = n);
554
575
  return t;
555
576
  }
556
- h(fe, "clone");
557
- function Qe(l, t) {
577
+ u(me, "clone");
578
+ function et(l, t) {
558
579
  for (; l !== null; ) {
559
580
  const n = Hs(l, t);
560
581
  if (n) {
561
582
  if (n.get)
562
- return Q(n.get);
583
+ return ee(n.get);
563
584
  if (typeof n.value == "function")
564
- return Q(n.value);
585
+ return ee(n.value);
565
586
  }
566
587
  l = Fs(l);
567
588
  }
568
589
  function e() {
569
590
  return null;
570
591
  }
571
- return h(e, "fallbackValue"), e;
592
+ return u(e, "fallbackValue"), e;
572
593
  }
573
- h(Qe, "lookupGetter");
574
- const Nn = K(["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"]), jt = K(["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"]), qt = K(["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"]), Zs = K(["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"]), Vt = K(["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"]), Xs = K(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), $n = K(["#text"]), Un = K(["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"]), Yt = K(["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"]), Bn = K(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), mt = K(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ks = ie(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Qs = ie(/<%[\w\W]*|[\w\W]*%>/gm), Js = ie(/\$\{[\w\W]*/gm), er = ie(/^data-[\-\w.\u00B7-\uFFFF]+$/), tr = ie(/^aria-[\-\w]+$/), es = ie(
594
+ u(et, "lookupGetter");
595
+ const Nn = J(["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"]), Vt = J(["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"]), Yt = J(["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"]), Zs = J(["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"]), Zt = J(["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"]), Xs = J(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), $n = J(["#text"]), Un = J(["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"]), Xt = J(["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"]), Bn = J(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), wt = J(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ks = le(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Qs = le(/<%[\w\W]*|[\w\W]*%>/gm), Js = le(/\$\{[\w\W]*/gm), er = le(/^data-[\-\w.\u00B7-\uFFFF]+$/), tr = le(/^aria-[\-\w]+$/), es = le(
575
596
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
576
597
  // eslint-disable-line no-useless-escape
577
- ), nr = ie(/^(?:\w+script|data):/i), sr = ie(
598
+ ), nr = le(/^(?:\w+script|data):/i), sr = le(
578
599
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
579
600
  // eslint-disable-line no-control-regex
580
- ), ts = ie(/^html$/i), rr = ie(/^[a-z][.\w]*(-[.\w]+)+$/i);
601
+ ), ts = le(/^html$/i), rr = le(/^[a-z][.\w]*(-[.\w]+)+$/i);
581
602
  var Fn = /* @__PURE__ */ Object.freeze({
582
603
  __proto__: null,
583
604
  ARIA_ATTR: tr,
@@ -591,16 +612,16 @@ var Fn = /* @__PURE__ */ Object.freeze({
591
612
  MUSTACHE_EXPR: Ks,
592
613
  TMPLIT_EXPR: Js
593
614
  });
594
- const Je = {
615
+ const tt = {
595
616
  element: 1,
596
617
  text: 3,
597
618
  // Deprecated
598
619
  progressingInstruction: 7,
599
620
  comment: 8,
600
621
  document: 9
601
- }, ir = /* @__PURE__ */ h(function() {
622
+ }, ir = /* @__PURE__ */ u(function() {
602
623
  return typeof window > "u" ? null : window;
603
- }, "getGlobal"), ar = /* @__PURE__ */ h(function(t, e) {
624
+ }, "getGlobal"), ar = /* @__PURE__ */ u(function(t, e) {
604
625
  if (typeof t != "object" || typeof t.createPolicy != "function")
605
626
  return null;
606
627
  let n = null;
@@ -619,7 +640,7 @@ const Je = {
619
640
  } catch {
620
641
  return console.warn("TrustedTypes policy " + r + " could not be created."), null;
621
642
  }
622
- }, "_createTrustedTypesPolicy"), Hn = /* @__PURE__ */ h(function() {
643
+ }, "_createTrustedTypesPolicy"), Hn = /* @__PURE__ */ u(function() {
623
644
  return {
624
645
  afterSanitizeAttributes: [],
625
646
  afterSanitizeElements: [],
@@ -634,8 +655,8 @@ const Je = {
634
655
  }, "_createHooksMap");
635
656
  function ns() {
636
657
  let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ir();
637
- const t = /* @__PURE__ */ h((y) => ns(y), "DOMPurify");
638
- if (t.version = "3.4.0", t.removed = [], !l || !l.document || l.document.nodeType !== Je.document || !l.Element)
658
+ const t = /* @__PURE__ */ u((y) => ns(y), "DOMPurify");
659
+ if (t.version = "3.4.0", t.removed = [], !l || !l.document || l.document.nodeType !== tt.document || !l.Element)
639
660
  return t.isSupported = !1, t;
640
661
  let {
641
662
  document: e
@@ -645,44 +666,44 @@ function ns() {
645
666
  HTMLTemplateElement: a,
646
667
  Node: o,
647
668
  Element: c,
648
- NodeFilter: f,
669
+ NodeFilter: p,
649
670
  NamedNodeMap: g = l.NamedNodeMap || l.MozNamedAttrMap,
650
671
  HTMLFormElement: d,
651
- DOMParser: p,
652
- trustedTypes: x
653
- } = l, T = c.prototype, _ = Qe(T, "cloneNode"), z = Qe(T, "remove"), te = Qe(T, "nextSibling"), ae = Qe(T, "childNodes"), J = Qe(T, "parentNode");
672
+ DOMParser: f,
673
+ trustedTypes: m
674
+ } = l, w = c.prototype, E = et(w, "cloneNode"), z = et(w, "remove"), U = et(w, "nextSibling"), se = et(w, "childNodes"), ie = et(w, "parentNode");
654
675
  if (typeof a == "function") {
655
676
  const y = e.createElement("template");
656
677
  y.content && y.content.ownerDocument && (e = y.content.ownerDocument);
657
678
  }
658
- let P, W = "";
679
+ let O, ae = "";
659
680
  const {
660
- implementation: le,
661
- createNodeIterator: ne,
662
- createDocumentFragment: Et,
663
- getElementsByTagName: at
681
+ implementation: de,
682
+ createNodeIterator: j,
683
+ createDocumentFragment: ct,
684
+ getElementsByTagName: Ee
664
685
  } = e, {
665
- importNode: I
686
+ importNode: Ct
666
687
  } = n;
667
- let G = Hn();
668
- t.isSupported = typeof Jn == "function" && typeof J == "function" && le && le.createHTMLDocument !== void 0;
688
+ let q = Hn();
689
+ t.isSupported = typeof Jn == "function" && typeof ie == "function" && de && de.createHTMLDocument !== void 0;
669
690
  const {
670
- MUSTACHE_EXPR: xe,
671
- ERB_EXPR: Me,
672
- TMPLIT_EXPR: ye,
673
- DATA_ATTR: _t,
674
- ARIA_ATTR: lt,
675
- IS_SCRIPT_OR_DATA: Rt,
676
- ATTR_WHITESPACE: ot,
677
- CUSTOM_ELEMENT: Ct
691
+ MUSTACHE_EXPR: R,
692
+ ERB_EXPR: _e,
693
+ TMPLIT_EXPR: we,
694
+ DATA_ATTR: Dt,
695
+ ARIA_ATTR: We,
696
+ IS_SCRIPT_OR_DATA: It,
697
+ ATTR_WHITESPACE: ut,
698
+ CUSTOM_ELEMENT: ht
678
699
  } = Fn;
679
700
  let {
680
- IS_ALLOWED_URI: ct
681
- } = Fn, N = null;
682
- const Ge = R({}, [...Nn, ...jt, ...qt, ...Vt, ...$n]);
683
- let w = null;
684
- const k = R({}, [...Un, ...Yt, ...Bn, ...mt]);
685
- let m = Object.seal(nt(null, {
701
+ IS_ALLOWED_URI: pt
702
+ } = Fn, B = null;
703
+ const dt = C({}, [...Nn, ...Vt, ...Yt, ...Zt, ...$n]);
704
+ let G = null;
705
+ const je = C({}, [...Un, ...Xt, ...Bn, ...wt]);
706
+ let P = Object.seal(it(null, {
686
707
  tagNameCheck: {
687
708
  writable: !0,
688
709
  configurable: !1,
@@ -701,8 +722,8 @@ function ns() {
701
722
  enumerable: !0,
702
723
  value: !1
703
724
  }
704
- })), L = null, B = null;
705
- const V = Object.seal(nt(null, {
725
+ })), _ = null, b = null;
726
+ const x = Object.seal(it(null, {
706
727
  tagCheck: {
707
728
  writable: !0,
708
729
  configurable: !1,
@@ -716,170 +737,170 @@ function ns() {
716
737
  value: null
717
738
  }
718
739
  }));
719
- let We = !0, Te = !0, hn = !1, pn = !0, Se = !1, je = !0, Ae = !1, It = !1, Dt = !1, Le = !1, ut = !1, ht = !1, dn = !0, fn = !1;
740
+ let L = !0, V = !0, be = !1, qe = !0, oe = !1, Ve = !0, Re = !1, Mt = !1, Lt = !1, ze = !1, ft = !1, gt = !1, dn = !0, fn = !1;
720
741
  const ds = "user-content-";
721
- let Mt = !0, qe = !1, ze = {}, pe = null;
722
- const Lt = 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"]);
742
+ let zt = !0, Ye = !1, Oe = {}, fe = null;
743
+ const Ot = C({}, ["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"]);
723
744
  let gn = null;
724
- const mn = R({}, ["audio", "video", "img", "source", "image", "track"]);
725
- let zt = null;
726
- const xn = R({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), pt = "http://www.w3.org/1998/Math/MathML", dt = "http://www.w3.org/2000/svg", de = "http://www.w3.org/1999/xhtml";
727
- let Oe = de, Ot = !1, Pt = null;
728
- const fs = R({}, [pt, dt, de], Gt);
729
- let ft = R({}, ["mi", "mo", "mn", "ms", "mtext"]), gt = R({}, ["annotation-xml"]);
730
- const gs = R({}, ["title", "style", "font", "a", "script"]);
731
- let Ve = null;
745
+ const mn = C({}, ["audio", "video", "img", "source", "image", "track"]);
746
+ let Pt = null;
747
+ const xn = C({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), mt = "http://www.w3.org/1998/Math/MathML", xt = "http://www.w3.org/2000/svg", ge = "http://www.w3.org/1999/xhtml";
748
+ let Pe = ge, Nt = !1, $t = null;
749
+ const fs = C({}, [mt, xt, ge], jt);
750
+ let bt = C({}, ["mi", "mo", "mn", "ms", "mtext"]), kt = C({}, ["annotation-xml"]);
751
+ const gs = C({}, ["title", "style", "font", "a", "script"]);
752
+ let Ze = null;
732
753
  const ms = ["application/xhtml+xml", "text/html"], xs = "text/html";
733
- let F = null, Pe = null;
734
- const bs = e.createElement("form"), bn = /* @__PURE__ */ h(function(i) {
754
+ let W = null, Ne = null;
755
+ const bs = e.createElement("form"), bn = /* @__PURE__ */ u(function(i) {
735
756
  return i instanceof RegExp || i instanceof Function;
736
- }, "isRegexOrFunction"), Nt = /* @__PURE__ */ h(function() {
757
+ }, "isRegexOrFunction"), Ut = /* @__PURE__ */ u(function() {
737
758
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
738
- if (!(Pe && Pe === i)) {
739
- if ((!i || typeof i != "object") && (i = {}), i = fe(i), Ve = // eslint-disable-next-line unicorn/prefer-includes
740
- ms.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? xs : i.PARSER_MEDIA_TYPE, F = Ve === "application/xhtml+xml" ? Gt : kt, N = ce(i, "ALLOWED_TAGS") ? R({}, i.ALLOWED_TAGS, F) : Ge, w = ce(i, "ALLOWED_ATTR") ? R({}, i.ALLOWED_ATTR, F) : k, Pt = ce(i, "ALLOWED_NAMESPACES") ? R({}, i.ALLOWED_NAMESPACES, Gt) : fs, zt = ce(i, "ADD_URI_SAFE_ATTR") ? R(fe(xn), i.ADD_URI_SAFE_ATTR, F) : xn, gn = ce(i, "ADD_DATA_URI_TAGS") ? R(fe(mn), i.ADD_DATA_URI_TAGS, F) : mn, pe = ce(i, "FORBID_CONTENTS") ? R({}, i.FORBID_CONTENTS, F) : Lt, L = ce(i, "FORBID_TAGS") ? R({}, i.FORBID_TAGS, F) : fe({}), B = ce(i, "FORBID_ATTR") ? R({}, i.FORBID_ATTR, F) : fe({}), ze = ce(i, "USE_PROFILES") ? i.USE_PROFILES : !1, We = i.ALLOW_ARIA_ATTR !== !1, Te = i.ALLOW_DATA_ATTR !== !1, hn = i.ALLOW_UNKNOWN_PROTOCOLS || !1, pn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Se = i.SAFE_FOR_TEMPLATES || !1, je = i.SAFE_FOR_XML !== !1, Ae = i.WHOLE_DOCUMENT || !1, Le = i.RETURN_DOM || !1, ut = i.RETURN_DOM_FRAGMENT || !1, ht = i.RETURN_TRUSTED_TYPE || !1, Dt = i.FORCE_BODY || !1, dn = i.SANITIZE_DOM !== !1, fn = i.SANITIZE_NAMED_PROPS || !1, Mt = i.KEEP_CONTENT !== !1, qe = i.IN_PLACE || !1, ct = i.ALLOWED_URI_REGEXP || es, Oe = i.NAMESPACE || de, ft = i.MATHML_TEXT_INTEGRATION_POINTS || ft, gt = i.HTML_INTEGRATION_POINTS || gt, m = i.CUSTOM_ELEMENT_HANDLING || nt(null), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (m.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (m.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (m.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Se && (Te = !1), ut && (Le = !0), ze && (N = R({}, $n), w = nt(null), ze.html === !0 && (R(N, Nn), R(w, Un)), ze.svg === !0 && (R(N, jt), R(w, Yt), R(w, mt)), ze.svgFilters === !0 && (R(N, qt), R(w, Yt), R(w, mt)), ze.mathMl === !0 && (R(N, Vt), R(w, Bn), R(w, mt))), V.tagCheck = null, V.attributeCheck = null, i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? V.tagCheck = i.ADD_TAGS : (N === Ge && (N = fe(N)), R(N, i.ADD_TAGS, F))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? V.attributeCheck = i.ADD_ATTR : (w === k && (w = fe(w)), R(w, i.ADD_ATTR, F))), i.ADD_URI_SAFE_ATTR && R(zt, i.ADD_URI_SAFE_ATTR, F), i.FORBID_CONTENTS && (pe === Lt && (pe = fe(pe)), R(pe, i.FORBID_CONTENTS, F)), i.ADD_FORBID_CONTENTS && (pe === Lt && (pe = fe(pe)), R(pe, i.ADD_FORBID_CONTENTS, F)), Mt && (N["#text"] = !0), Ae && R(N, ["html", "head", "body"]), N.table && (R(N, ["tbody"]), delete L.tbody), i.TRUSTED_TYPES_POLICY) {
759
+ if (!(Ne && Ne === i)) {
760
+ if ((!i || typeof i != "object") && (i = {}), i = me(i), Ze = // eslint-disable-next-line unicorn/prefer-includes
761
+ ms.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? xs : i.PARSER_MEDIA_TYPE, W = Ze === "application/xhtml+xml" ? jt : yt, B = ue(i, "ALLOWED_TAGS") ? C({}, i.ALLOWED_TAGS, W) : dt, G = ue(i, "ALLOWED_ATTR") ? C({}, i.ALLOWED_ATTR, W) : je, $t = ue(i, "ALLOWED_NAMESPACES") ? C({}, i.ALLOWED_NAMESPACES, jt) : fs, Pt = ue(i, "ADD_URI_SAFE_ATTR") ? C(me(xn), i.ADD_URI_SAFE_ATTR, W) : xn, gn = ue(i, "ADD_DATA_URI_TAGS") ? C(me(mn), i.ADD_DATA_URI_TAGS, W) : mn, fe = ue(i, "FORBID_CONTENTS") ? C({}, i.FORBID_CONTENTS, W) : Ot, _ = ue(i, "FORBID_TAGS") ? C({}, i.FORBID_TAGS, W) : me({}), b = ue(i, "FORBID_ATTR") ? C({}, i.FORBID_ATTR, W) : me({}), Oe = ue(i, "USE_PROFILES") ? i.USE_PROFILES : !1, L = i.ALLOW_ARIA_ATTR !== !1, V = i.ALLOW_DATA_ATTR !== !1, be = i.ALLOW_UNKNOWN_PROTOCOLS || !1, qe = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, oe = i.SAFE_FOR_TEMPLATES || !1, Ve = i.SAFE_FOR_XML !== !1, Re = i.WHOLE_DOCUMENT || !1, ze = i.RETURN_DOM || !1, ft = i.RETURN_DOM_FRAGMENT || !1, gt = i.RETURN_TRUSTED_TYPE || !1, Lt = i.FORCE_BODY || !1, dn = i.SANITIZE_DOM !== !1, fn = i.SANITIZE_NAMED_PROPS || !1, zt = i.KEEP_CONTENT !== !1, Ye = i.IN_PLACE || !1, pt = i.ALLOWED_URI_REGEXP || es, Pe = i.NAMESPACE || ge, bt = i.MATHML_TEXT_INTEGRATION_POINTS || bt, kt = i.HTML_INTEGRATION_POINTS || kt, P = i.CUSTOM_ELEMENT_HANDLING || it(null), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (P.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && bn(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), oe && (V = !1), ft && (ze = !0), Oe && (B = C({}, $n), G = it(null), Oe.html === !0 && (C(B, Nn), C(G, Un)), Oe.svg === !0 && (C(B, Vt), C(G, Xt), C(G, wt)), Oe.svgFilters === !0 && (C(B, Yt), C(G, Xt), C(G, wt)), Oe.mathMl === !0 && (C(B, Zt), C(G, Bn), C(G, wt))), x.tagCheck = null, x.attributeCheck = null, i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? x.tagCheck = i.ADD_TAGS : (B === dt && (B = me(B)), C(B, i.ADD_TAGS, W))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? x.attributeCheck = i.ADD_ATTR : (G === je && (G = me(G)), C(G, i.ADD_ATTR, W))), i.ADD_URI_SAFE_ATTR && C(Pt, i.ADD_URI_SAFE_ATTR, W), i.FORBID_CONTENTS && (fe === Ot && (fe = me(fe)), C(fe, i.FORBID_CONTENTS, W)), i.ADD_FORBID_CONTENTS && (fe === Ot && (fe = me(fe)), C(fe, i.ADD_FORBID_CONTENTS, W)), zt && (B["#text"] = !0), Re && C(B, ["html", "head", "body"]), B.table && (C(B, ["tbody"]), delete _.tbody), i.TRUSTED_TYPES_POLICY) {
741
762
  if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
742
- throw Ke('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
763
+ throw Je('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
743
764
  if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
744
- throw Ke('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
745
- P = i.TRUSTED_TYPES_POLICY, W = P.createHTML("");
765
+ throw Je('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
766
+ O = i.TRUSTED_TYPES_POLICY, ae = O.createHTML("");
746
767
  } else
747
- P === void 0 && (P = ar(x, s)), P !== null && typeof W == "string" && (W = P.createHTML(""));
748
- K && K(i), Pe = i;
768
+ O === void 0 && (O = ar(m, s)), O !== null && typeof ae == "string" && (ae = O.createHTML(""));
769
+ J && J(i), Ne = i;
749
770
  }
750
- }, "_parseConfig"), kn = R({}, [...jt, ...qt, ...Zs]), wn = R({}, [...Vt, ...Xs]), ks = /* @__PURE__ */ h(function(i) {
751
- let u = J(i);
752
- (!u || !u.tagName) && (u = {
753
- namespaceURI: Oe,
771
+ }, "_parseConfig"), kn = C({}, [...Vt, ...Yt, ...Zs]), wn = C({}, [...Zt, ...Xs]), ks = /* @__PURE__ */ u(function(i) {
772
+ let h = ie(i);
773
+ (!h || !h.tagName) && (h = {
774
+ namespaceURI: Pe,
754
775
  tagName: "template"
755
776
  });
756
- const b = kt(i.tagName), O = kt(u.tagName);
757
- return Pt[i.namespaceURI] ? i.namespaceURI === dt ? u.namespaceURI === de ? b === "svg" : u.namespaceURI === pt ? b === "svg" && (O === "annotation-xml" || ft[O]) : !!kn[b] : i.namespaceURI === pt ? u.namespaceURI === de ? b === "math" : u.namespaceURI === dt ? b === "math" && gt[O] : !!wn[b] : i.namespaceURI === de ? u.namespaceURI === dt && !gt[O] || u.namespaceURI === pt && !ft[O] ? !1 : !wn[b] && (gs[b] || !kn[b]) : !!(Ve === "application/xhtml+xml" && Pt[i.namespaceURI]) : !1;
758
- }, "_checkValidNamespace"), oe = /* @__PURE__ */ h(function(i) {
759
- Xe(t.removed, {
777
+ const k = yt(i.tagName), N = yt(h.tagName);
778
+ return $t[i.namespaceURI] ? i.namespaceURI === xt ? h.namespaceURI === ge ? k === "svg" : h.namespaceURI === mt ? k === "svg" && (N === "annotation-xml" || bt[N]) : !!kn[k] : i.namespaceURI === mt ? h.namespaceURI === ge ? k === "math" : h.namespaceURI === xt ? k === "math" && kt[N] : !!wn[k] : i.namespaceURI === ge ? h.namespaceURI === xt && !kt[N] || h.namespaceURI === mt && !bt[N] ? !1 : !wn[k] && (gs[k] || !kn[k]) : !!(Ze === "application/xhtml+xml" && $t[i.namespaceURI]) : !1;
779
+ }, "_checkValidNamespace"), ce = /* @__PURE__ */ u(function(i) {
780
+ Qe(t.removed, {
760
781
  element: i
761
782
  });
762
783
  try {
763
- J(i).removeChild(i);
784
+ ie(i).removeChild(i);
764
785
  } catch {
765
786
  z(i);
766
787
  }
767
- }, "_forceRemove"), Ee = /* @__PURE__ */ h(function(i, u) {
788
+ }, "_forceRemove"), Ce = /* @__PURE__ */ u(function(i, h) {
768
789
  try {
769
- Xe(t.removed, {
770
- attribute: u.getAttributeNode(i),
771
- from: u
790
+ Qe(t.removed, {
791
+ attribute: h.getAttributeNode(i),
792
+ from: h
772
793
  });
773
794
  } catch {
774
- Xe(t.removed, {
795
+ Qe(t.removed, {
775
796
  attribute: null,
776
- from: u
797
+ from: h
777
798
  });
778
799
  }
779
- if (u.removeAttribute(i), i === "is")
780
- if (Le || ut)
800
+ if (h.removeAttribute(i), i === "is")
801
+ if (ze || ft)
781
802
  try {
782
- oe(u);
803
+ ce(h);
783
804
  } catch {
784
805
  }
785
806
  else
786
807
  try {
787
- u.setAttribute(i, "");
808
+ h.setAttribute(i, "");
788
809
  } catch {
789
810
  }
790
- }, "_removeAttribute"), vn = /* @__PURE__ */ h(function(i) {
791
- let u = null, b = null;
792
- if (Dt)
811
+ }, "_removeAttribute"), vn = /* @__PURE__ */ u(function(i) {
812
+ let h = null, k = null;
813
+ if (Lt)
793
814
  i = "<remove></remove>" + i;
794
815
  else {
795
- const $ = Wt(i, /^[\r\n\t ]+/);
796
- b = $ && $[0];
816
+ const F = qt(i, /^[\r\n\t ]+/);
817
+ k = F && F[0];
797
818
  }
798
- Ve === "application/xhtml+xml" && Oe === de && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
799
- const O = P ? P.createHTML(i) : i;
800
- if (Oe === de)
819
+ Ze === "application/xhtml+xml" && Pe === ge && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
820
+ const N = O ? O.createHTML(i) : i;
821
+ if (Pe === ge)
801
822
  try {
802
- u = new p().parseFromString(O, Ve);
823
+ h = new f().parseFromString(N, Ze);
803
824
  } catch {
804
825
  }
805
- if (!u || !u.documentElement) {
806
- u = le.createDocument(Oe, "template", null);
826
+ if (!h || !h.documentElement) {
827
+ h = de.createDocument(Pe, "template", null);
807
828
  try {
808
- u.documentElement.innerHTML = Ot ? W : O;
829
+ h.documentElement.innerHTML = Nt ? ae : N;
809
830
  } catch {
810
831
  }
811
832
  }
812
- const q = u.body || u.documentElement;
813
- return i && b && q.insertBefore(e.createTextNode(b), q.childNodes[0] || null), Oe === de ? at.call(u, Ae ? "html" : "body")[0] : Ae ? u.documentElement : q;
814
- }, "_initDocument"), yn = /* @__PURE__ */ h(function(i) {
815
- return ne.call(
833
+ const Z = h.body || h.documentElement;
834
+ return i && k && Z.insertBefore(e.createTextNode(k), Z.childNodes[0] || null), Pe === ge ? Ee.call(h, Re ? "html" : "body")[0] : Re ? h.documentElement : Z;
835
+ }, "_initDocument"), yn = /* @__PURE__ */ u(function(i) {
836
+ return j.call(
816
837
  i.ownerDocument || i,
817
838
  i,
818
839
  // eslint-disable-next-line no-bitwise
819
- f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION,
840
+ p.SHOW_ELEMENT | p.SHOW_COMMENT | p.SHOW_TEXT | p.SHOW_PROCESSING_INSTRUCTION | p.SHOW_CDATA_SECTION,
820
841
  null
821
842
  );
822
- }, "_createNodeIterator"), $t = /* @__PURE__ */ h(function(i) {
843
+ }, "_createNodeIterator"), Bt = /* @__PURE__ */ u(function(i) {
823
844
  return i instanceof d && (typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || !(i.attributes instanceof g) || typeof i.removeAttribute != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function");
824
- }, "_isClobbered"), Ut = /* @__PURE__ */ h(function(i) {
845
+ }, "_isClobbered"), Ft = /* @__PURE__ */ u(function(i) {
825
846
  return typeof o == "function" && i instanceof o;
826
847
  }, "_isNode");
827
- function me(y, i, u) {
828
- Ze(y, (b) => {
829
- b.call(t, i, u, Pe);
848
+ function ke(y, i, h) {
849
+ Ke(y, (k) => {
850
+ k.call(t, i, h, Ne);
830
851
  });
831
852
  }
832
- h(me, "_executeHooks");
833
- const Tn = /* @__PURE__ */ h(function(i) {
834
- let u = null;
835
- if (me(G.beforeSanitizeElements, i, null), $t(i))
836
- return oe(i), !0;
837
- const b = F(i.nodeName);
838
- if (me(G.uponSanitizeElement, i, {
839
- tagName: b,
840
- allowedTags: N
841
- }), je && i.hasChildNodes() && !Ut(i.firstElementChild) && Y(/<[/\w!]/g, i.innerHTML) && Y(/<[/\w!]/g, i.textContent) || je && i.namespaceURI === de && b === "style" && Ut(i.firstElementChild) || i.nodeType === Je.progressingInstruction || je && i.nodeType === Je.comment && Y(/<[/\w]/g, i.data))
842
- return oe(i), !0;
843
- if (L[b] || !(V.tagCheck instanceof Function && V.tagCheck(b)) && !N[b]) {
844
- if (!L[b] && An(b) && (m.tagNameCheck instanceof RegExp && Y(m.tagNameCheck, b) || m.tagNameCheck instanceof Function && m.tagNameCheck(b)))
853
+ u(ke, "_executeHooks");
854
+ const Tn = /* @__PURE__ */ u(function(i) {
855
+ let h = null;
856
+ if (ke(q.beforeSanitizeElements, i, null), Bt(i))
857
+ return ce(i), !0;
858
+ const k = W(i.nodeName);
859
+ if (ke(q.uponSanitizeElement, i, {
860
+ tagName: k,
861
+ allowedTags: B
862
+ }), Ve && i.hasChildNodes() && !Ft(i.firstElementChild) && X(/<[/\w!]/g, i.innerHTML) && X(/<[/\w!]/g, i.textContent) || Ve && i.namespaceURI === ge && k === "style" && Ft(i.firstElementChild) || i.nodeType === tt.progressingInstruction || Ve && i.nodeType === tt.comment && X(/<[/\w]/g, i.data))
863
+ return ce(i), !0;
864
+ if (_[k] || !(x.tagCheck instanceof Function && x.tagCheck(k)) && !B[k]) {
865
+ if (!_[k] && An(k) && (P.tagNameCheck instanceof RegExp && X(P.tagNameCheck, k) || P.tagNameCheck instanceof Function && P.tagNameCheck(k)))
845
866
  return !1;
846
- if (Mt && !pe[b]) {
847
- const O = J(i) || i.parentNode, q = ae(i) || i.childNodes;
848
- if (q && O) {
849
- const $ = q.length;
850
- for (let ee = $ - 1; ee >= 0; --ee) {
851
- const se = _(q[ee], !0);
852
- se.__removalCount = (i.__removalCount || 0) + 1, O.insertBefore(se, te(i));
867
+ if (zt && !fe[k]) {
868
+ const N = ie(i) || i.parentNode, Z = se(i) || i.childNodes;
869
+ if (Z && N) {
870
+ const F = Z.length;
871
+ for (let te = F - 1; te >= 0; --te) {
872
+ const re = E(Z[te], !0);
873
+ re.__removalCount = (i.__removalCount || 0) + 1, N.insertBefore(re, U(i));
853
874
  }
854
875
  }
855
876
  }
856
- return oe(i), !0;
877
+ return ce(i), !0;
857
878
  }
858
- return i instanceof c && !ks(i) || (b === "noscript" || b === "noembed" || b === "noframes") && Y(/<\/no(script|embed|frames)/i, i.innerHTML) ? (oe(i), !0) : (Se && i.nodeType === Je.text && (u = i.textContent, Ze([xe, Me, ye], (O) => {
859
- u = Ne(u, O, " ");
860
- }), i.textContent !== u && (Xe(t.removed, {
879
+ return i instanceof c && !ks(i) || (k === "noscript" || k === "noembed" || k === "noframes") && X(/<\/no(script|embed|frames)/i, i.innerHTML) ? (ce(i), !0) : (oe && i.nodeType === tt.text && (h = i.textContent, Ke([R, _e, we], (N) => {
880
+ h = $e(h, N, " ");
881
+ }), i.textContent !== h && (Qe(t.removed, {
861
882
  element: i.cloneNode()
862
- }), i.textContent = u)), me(G.afterSanitizeElements, i, null), !1);
863
- }, "_sanitizeElements"), Sn = /* @__PURE__ */ h(function(i, u, b) {
864
- if (B[u] || dn && (u === "id" || u === "name") && (b in e || b in bs))
883
+ }), i.textContent = h)), ke(q.afterSanitizeElements, i, null), !1);
884
+ }, "_sanitizeElements"), Sn = /* @__PURE__ */ u(function(i, h, k) {
885
+ if (b[h] || dn && (h === "id" || h === "name") && (k in e || k in bs))
865
886
  return !1;
866
- if (!(Te && !B[u] && Y(_t, u))) {
867
- if (!(We && Y(lt, u))) {
868
- if (!(V.attributeCheck instanceof Function && V.attributeCheck(u, i))) {
869
- if (!w[u] || B[u]) {
887
+ if (!(V && !b[h] && X(Dt, h))) {
888
+ if (!(L && X(We, h))) {
889
+ if (!(x.attributeCheck instanceof Function && x.attributeCheck(h, i))) {
890
+ if (!G[h] || b[h]) {
870
891
  if (
871
892
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
872
893
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
873
894
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
874
- !(An(i) && (m.tagNameCheck instanceof RegExp && Y(m.tagNameCheck, i) || m.tagNameCheck instanceof Function && m.tagNameCheck(i)) && (m.attributeNameCheck instanceof RegExp && Y(m.attributeNameCheck, u) || m.attributeNameCheck instanceof Function && m.attributeNameCheck(u, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
895
+ !(An(i) && (P.tagNameCheck instanceof RegExp && X(P.tagNameCheck, i) || P.tagNameCheck instanceof Function && P.tagNameCheck(i)) && (P.attributeNameCheck instanceof RegExp && X(P.attributeNameCheck, h) || P.attributeNameCheck instanceof Function && P.attributeNameCheck(h, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
875
896
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
876
- u === "is" && m.allowCustomizedBuiltInElements && (m.tagNameCheck instanceof RegExp && Y(m.tagNameCheck, b) || m.tagNameCheck instanceof Function && m.tagNameCheck(b)))
897
+ h === "is" && P.allowCustomizedBuiltInElements && (P.tagNameCheck instanceof RegExp && X(P.tagNameCheck, k) || P.tagNameCheck instanceof Function && P.tagNameCheck(k)))
877
898
  ) return !1;
878
- } else if (!zt[u]) {
879
- if (!Y(ct, Ne(b, ot, ""))) {
880
- if (!((u === "src" || u === "xlink:href" || u === "href") && i !== "script" && js(b, "data:") === 0 && gn[i])) {
881
- if (!(hn && !Y(Rt, Ne(b, ot, "")))) {
882
- if (b)
899
+ } else if (!Pt[h]) {
900
+ if (!X(pt, $e(k, ut, ""))) {
901
+ if (!((h === "src" || h === "xlink:href" || h === "href") && i !== "script" && js(k, "data:") === 0 && gn[i])) {
902
+ if (!(be && !X(It, $e(k, ut, "")))) {
903
+ if (k)
883
904
  return !1;
884
905
  }
885
906
  }
@@ -889,213 +910,213 @@ function ns() {
889
910
  }
890
911
  }
891
912
  return !0;
892
- }, "_isValidAttribute"), An = /* @__PURE__ */ h(function(i) {
893
- return i !== "annotation-xml" && Wt(i, Ct);
894
- }, "_isBasicCustomElement"), En = /* @__PURE__ */ h(function(i) {
895
- me(G.beforeSanitizeAttributes, i, null);
913
+ }, "_isValidAttribute"), An = /* @__PURE__ */ u(function(i) {
914
+ return i !== "annotation-xml" && qt(i, ht);
915
+ }, "_isBasicCustomElement"), En = /* @__PURE__ */ u(function(i) {
916
+ ke(q.beforeSanitizeAttributes, i, null);
896
917
  const {
897
- attributes: u
918
+ attributes: h
898
919
  } = i;
899
- if (!u || $t(i))
920
+ if (!h || Bt(i))
900
921
  return;
901
- const b = {
922
+ const k = {
902
923
  attrName: "",
903
924
  attrValue: "",
904
925
  keepAttr: !0,
905
- allowedAttributes: w,
926
+ allowedAttributes: G,
906
927
  forceKeepAttr: void 0
907
928
  };
908
- let O = u.length;
909
- for (; O--; ) {
910
- const q = u[O], {
911
- name: $,
912
- namespaceURI: ee,
913
- value: se
914
- } = q, be = F($), Bt = se;
915
- let j = $ === "value" ? Bt : qs(Bt);
916
- if (b.attrName = be, b.attrValue = j, b.keepAttr = !0, b.forceKeepAttr = void 0, me(G.uponSanitizeAttribute, i, b), j = b.attrValue, fn && (be === "id" || be === "name") && (Ee($, i), j = ds + j), je && Y(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, j)) {
917
- Ee($, i);
929
+ let N = h.length;
930
+ for (; N--; ) {
931
+ const Z = h[N], {
932
+ name: F,
933
+ namespaceURI: te,
934
+ value: re
935
+ } = Z, ve = W(F), Ht = re;
936
+ let Y = F === "value" ? Ht : qs(Ht);
937
+ if (k.attrName = ve, k.attrValue = Y, k.keepAttr = !0, k.forceKeepAttr = void 0, ke(q.uponSanitizeAttribute, i, k), Y = k.attrValue, fn && (ve === "id" || ve === "name") && (Ce(F, i), Y = ds + Y), Ve && X(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Y)) {
938
+ Ce(F, i);
918
939
  continue;
919
940
  }
920
- if (be === "attributename" && Wt(j, "href")) {
921
- Ee($, i);
941
+ if (ve === "attributename" && qt(Y, "href")) {
942
+ Ce(F, i);
922
943
  continue;
923
944
  }
924
- if (b.forceKeepAttr)
945
+ if (k.forceKeepAttr)
925
946
  continue;
926
- if (!b.keepAttr) {
927
- Ee($, i);
947
+ if (!k.keepAttr) {
948
+ Ce(F, i);
928
949
  continue;
929
950
  }
930
- if (!pn && Y(/\/>/i, j)) {
931
- Ee($, i);
951
+ if (!qe && X(/\/>/i, Y)) {
952
+ Ce(F, i);
932
953
  continue;
933
954
  }
934
- Se && Ze([xe, Me, ye], (Cn) => {
935
- j = Ne(j, Cn, " ");
955
+ oe && Ke([R, _e, we], (Cn) => {
956
+ Y = $e(Y, Cn, " ");
936
957
  });
937
- const Rn = F(i.nodeName);
938
- if (!Sn(Rn, be, j)) {
939
- Ee($, i);
958
+ const Rn = W(i.nodeName);
959
+ if (!Sn(Rn, ve, Y)) {
960
+ Ce(F, i);
940
961
  continue;
941
962
  }
942
- if (P && typeof x == "object" && typeof x.getAttributeType == "function" && !ee)
943
- switch (x.getAttributeType(Rn, be)) {
963
+ if (O && typeof m == "object" && typeof m.getAttributeType == "function" && !te)
964
+ switch (m.getAttributeType(Rn, ve)) {
944
965
  case "TrustedHTML": {
945
- j = P.createHTML(j);
966
+ Y = O.createHTML(Y);
946
967
  break;
947
968
  }
948
969
  case "TrustedScriptURL": {
949
- j = P.createScriptURL(j);
970
+ Y = O.createScriptURL(Y);
950
971
  break;
951
972
  }
952
973
  }
953
- if (j !== Bt)
974
+ if (Y !== Ht)
954
975
  try {
955
- ee ? i.setAttributeNS(ee, $, j) : i.setAttribute($, j), $t(i) ? oe(i) : Pn(t.removed);
976
+ te ? i.setAttributeNS(te, F, Y) : i.setAttribute(F, Y), Bt(i) ? ce(i) : Pn(t.removed);
956
977
  } catch {
957
- Ee($, i);
978
+ Ce(F, i);
958
979
  }
959
980
  }
960
- me(G.afterSanitizeAttributes, i, null);
961
- }, "_sanitizeAttributes"), _n = /* @__PURE__ */ h(function(i) {
962
- let u = null;
963
- const b = yn(i);
964
- for (me(G.beforeSanitizeShadowDOM, i, null); u = b.nextNode(); )
965
- me(G.uponSanitizeShadowNode, u, null), Tn(u), En(u), u.content instanceof r && _n(u.content);
966
- me(G.afterSanitizeShadowDOM, i, null);
981
+ ke(q.afterSanitizeAttributes, i, null);
982
+ }, "_sanitizeAttributes"), _n = /* @__PURE__ */ u(function(i) {
983
+ let h = null;
984
+ const k = yn(i);
985
+ for (ke(q.beforeSanitizeShadowDOM, i, null); h = k.nextNode(); )
986
+ ke(q.uponSanitizeShadowNode, h, null), Tn(h), En(h), h.content instanceof r && _n(h.content);
987
+ ke(q.afterSanitizeShadowDOM, i, null);
967
988
  }, "_sanitizeShadowDOM");
968
989
  return t.sanitize = function(y) {
969
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, b = null, O = null, q = null;
970
- if (Ot = !y, Ot && (y = "<!-->"), typeof y != "string" && !Ut(y))
990
+ let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = null, k = null, N = null, Z = null;
991
+ if (Nt = !y, Nt && (y = "<!-->"), typeof y != "string" && !Ft(y))
971
992
  if (typeof y.toString == "function") {
972
993
  if (y = y.toString(), typeof y != "string")
973
- throw Ke("dirty is not a string, aborting");
994
+ throw Je("dirty is not a string, aborting");
974
995
  } else
975
- throw Ke("toString is not a function");
996
+ throw Je("toString is not a function");
976
997
  if (!t.isSupported)
977
998
  return y;
978
- if (It || Nt(i), t.removed = [], typeof y == "string" && (qe = !1), qe) {
999
+ if (Mt || Ut(i), t.removed = [], typeof y == "string" && (Ye = !1), Ye) {
979
1000
  if (y.nodeName) {
980
- const se = F(y.nodeName);
981
- if (!N[se] || L[se])
982
- throw Ke("root node is forbidden and cannot be sanitized in-place");
1001
+ const re = W(y.nodeName);
1002
+ if (!B[re] || _[re])
1003
+ throw Je("root node is forbidden and cannot be sanitized in-place");
983
1004
  }
984
1005
  } else if (y instanceof o)
985
- u = vn("<!---->"), b = u.ownerDocument.importNode(y, !0), b.nodeType === Je.element && b.nodeName === "BODY" || b.nodeName === "HTML" ? u = b : u.appendChild(b);
1006
+ h = vn("<!---->"), k = h.ownerDocument.importNode(y, !0), k.nodeType === tt.element && k.nodeName === "BODY" || k.nodeName === "HTML" ? h = k : h.appendChild(k);
986
1007
  else {
987
- if (!Le && !Se && !Ae && // eslint-disable-next-line unicorn/prefer-includes
1008
+ if (!ze && !oe && !Re && // eslint-disable-next-line unicorn/prefer-includes
988
1009
  y.indexOf("<") === -1)
989
- return P && ht ? P.createHTML(y) : y;
990
- if (u = vn(y), !u)
991
- return Le ? null : ht ? W : "";
992
- }
993
- u && Dt && oe(u.firstChild);
994
- const $ = yn(qe ? y : u);
995
- for (; O = $.nextNode(); )
996
- Tn(O), En(O), O.content instanceof r && _n(O.content);
997
- if (qe)
1010
+ return O && gt ? O.createHTML(y) : y;
1011
+ if (h = vn(y), !h)
1012
+ return ze ? null : gt ? ae : "";
1013
+ }
1014
+ h && Lt && ce(h.firstChild);
1015
+ const F = yn(Ye ? y : h);
1016
+ for (; N = F.nextNode(); )
1017
+ Tn(N), En(N), N.content instanceof r && _n(N.content);
1018
+ if (Ye)
998
1019
  return y;
999
- if (Le) {
1000
- if (Se) {
1001
- u.normalize();
1002
- let se = u.innerHTML;
1003
- Ze([xe, Me, ye], (be) => {
1004
- se = Ne(se, be, " ");
1005
- }), u.innerHTML = se;
1006
- }
1007
- if (ut)
1008
- for (q = Et.call(u.ownerDocument); u.firstChild; )
1009
- q.appendChild(u.firstChild);
1020
+ if (ze) {
1021
+ if (oe) {
1022
+ h.normalize();
1023
+ let re = h.innerHTML;
1024
+ Ke([R, _e, we], (ve) => {
1025
+ re = $e(re, ve, " ");
1026
+ }), h.innerHTML = re;
1027
+ }
1028
+ if (ft)
1029
+ for (Z = ct.call(h.ownerDocument); h.firstChild; )
1030
+ Z.appendChild(h.firstChild);
1010
1031
  else
1011
- q = u;
1012
- return (w.shadowroot || w.shadowrootmode) && (q = I.call(n, q, !0)), q;
1013
- }
1014
- let ee = Ae ? u.outerHTML : u.innerHTML;
1015
- return Ae && N["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && Y(ts, u.ownerDocument.doctype.name) && (ee = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
1016
- ` + ee), Se && Ze([xe, Me, ye], (se) => {
1017
- ee = Ne(ee, se, " ");
1018
- }), P && ht ? P.createHTML(ee) : ee;
1032
+ Z = h;
1033
+ return (G.shadowroot || G.shadowrootmode) && (Z = Ct.call(n, Z, !0)), Z;
1034
+ }
1035
+ let te = Re ? h.outerHTML : h.innerHTML;
1036
+ return Re && B["!doctype"] && h.ownerDocument && h.ownerDocument.doctype && h.ownerDocument.doctype.name && X(ts, h.ownerDocument.doctype.name) && (te = "<!DOCTYPE " + h.ownerDocument.doctype.name + `>
1037
+ ` + te), oe && Ke([R, _e, we], (re) => {
1038
+ te = $e(te, re, " ");
1039
+ }), O && gt ? O.createHTML(te) : te;
1019
1040
  }, t.setConfig = function() {
1020
1041
  let y = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1021
- Nt(y), It = !0;
1042
+ Ut(y), Mt = !0;
1022
1043
  }, t.clearConfig = function() {
1023
- Pe = null, It = !1;
1024
- }, t.isValidAttribute = function(y, i, u) {
1025
- Pe || Nt({});
1026
- const b = F(y), O = F(i);
1027
- return Sn(b, O, u);
1044
+ Ne = null, Mt = !1;
1045
+ }, t.isValidAttribute = function(y, i, h) {
1046
+ Ne || Ut({});
1047
+ const k = W(y), N = W(i);
1048
+ return Sn(k, N, h);
1028
1049
  }, t.addHook = function(y, i) {
1029
- typeof i == "function" && Xe(G[y], i);
1050
+ typeof i == "function" && Qe(q[y], i);
1030
1051
  }, t.removeHook = function(y, i) {
1031
1052
  if (i !== void 0) {
1032
- const u = Gs(G[y], i);
1033
- return u === -1 ? void 0 : Ws(G[y], u, 1)[0];
1053
+ const h = Gs(q[y], i);
1054
+ return h === -1 ? void 0 : Ws(q[y], h, 1)[0];
1034
1055
  }
1035
- return Pn(G[y]);
1056
+ return Pn(q[y]);
1036
1057
  }, t.removeHooks = function(y) {
1037
- G[y] = [];
1058
+ q[y] = [];
1038
1059
  }, t.removeAllHooks = function() {
1039
- G = Hn();
1060
+ q = Hn();
1040
1061
  }, t;
1041
1062
  }
1042
- h(ns, "createDOMPurify");
1063
+ u(ns, "createDOMPurify");
1043
1064
  var lr = ns();
1044
- function en() {
1065
+ function nn() {
1045
1066
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
1046
1067
  }
1047
- h(en, "M");
1048
- var De = en();
1068
+ u(nn, "M");
1069
+ var Le = nn();
1049
1070
  function ss(l) {
1050
- De = l;
1071
+ Le = l;
1051
1072
  }
1052
- h(ss, "G");
1053
- var Re = { exec: /* @__PURE__ */ h(() => null, "exec") };
1054
- function D(l, t = "") {
1055
- let e = typeof l == "string" ? l : l.source, n = { replace: /* @__PURE__ */ h((s, r) => {
1073
+ u(ss, "G");
1074
+ var De = { exec: /* @__PURE__ */ u(() => null, "exec") };
1075
+ function I(l, t = "") {
1076
+ let e = typeof l == "string" ? l : l.source, n = { replace: /* @__PURE__ */ u((s, r) => {
1056
1077
  let a = typeof r == "string" ? r : r.source;
1057
- return a = a.replace(X.caret, "$1"), e = e.replace(s, a), n;
1058
- }, "replace"), getRegex: /* @__PURE__ */ h(() => new RegExp(e, t), "getRegex") };
1078
+ return a = a.replace(Q.caret, "$1"), e = e.replace(s, a), n;
1079
+ }, "replace"), getRegex: /* @__PURE__ */ u(() => new RegExp(e, t), "getRegex") };
1059
1080
  return n;
1060
1081
  }
1061
- h(D, "k");
1082
+ u(I, "k");
1062
1083
  var or = (() => {
1063
1084
  try {
1064
1085
  return !!new RegExp("(?<=1)(?<!1)");
1065
1086
  } catch {
1066
1087
  return !1;
1067
1088
  }
1068
- })(), X = { 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") }, cr = /^(?:[ \t]*(?:\n|$))+/, ur = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, hr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, it = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, pr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, tn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, rs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, is = D(rs).replace(/bull/g, tn).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 = D(rs).replace(/bull/g, tn).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(), nn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, fr = /^[^\n]+/, sn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, gr = D(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", sn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), mr = D(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, tn).getRegex(), St = "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", rn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, xr = D("^ {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", rn).replace("tag", St).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), as = D(nn).replace("hr", it).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", St).getRegex(), br = D(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", as).getRegex(), an = { blockquote: br, code: ur, def: gr, fences: hr, heading: pr, hr: it, html: xr, lheading: is, list: mr, newline: cr, paragraph: as, table: Re, text: fr }, Gn = D("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", it).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", St).getRegex(), kr = { ...an, lheading: dr, table: Gn, paragraph: D(nn).replace("hr", it).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Gn).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", St).getRegex() }, wr = { ...an, html: D(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", rn).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: Re, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: D(nn).replace("hr", it).replace("heading", ` *#{1,6} *[^
1069
- ]`).replace("lheading", is).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, vr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, yr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ls = /^( {2,}|\\)\n(?!\s*$)/, Tr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, He = /[\p{P}\p{S}]/u, At = /[\s\p{P}\p{S}]/u, ln = /[^\s\p{P}\p{S}]/u, Sr = D(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, At).getRegex(), os = /(?!~)[\p{P}\p{S}]/u, Ar = /(?!~)[\s\p{P}\p{S}]/u, Er = /(?:[^\s\p{P}\p{S}]|~)/u, _r = D(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", or ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), cs = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Rr = D(cs, "u").replace(/punct/g, He).getRegex(), Cr = D(cs, "u").replace(/punct/g, os).getRegex(), us = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ir = D(us, "gu").replace(/notPunctSpace/g, ln).replace(/punctSpace/g, At).replace(/punct/g, He).getRegex(), Dr = D(us, "gu").replace(/notPunctSpace/g, Er).replace(/punctSpace/g, Ar).replace(/punct/g, os).getRegex(), Mr = D("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ln).replace(/punctSpace/g, At).replace(/punct/g, He).getRegex(), Lr = D(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, He).getRegex(), zr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Or = D(zr, "gu").replace(/notPunctSpace/g, ln).replace(/punctSpace/g, At).replace(/punct/g, He).getRegex(), Pr = D(/\\(punct)/, "gu").replace(/punct/g, He).getRegex(), Nr = D(/^<(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(), $r = D(rn).replace("(?:-->|$)", "-->").getRegex(), Ur = D("^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", $r).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), vt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Br = D(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", vt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), hs = D(/^!?\[(label)\]\[(ref)\]/).replace("label", vt).replace("ref", sn).getRegex(), ps = D(/^!?\[(ref)\](?:\[\])?/).replace("ref", sn).getRegex(), Fr = D("reflink|nolink(?!\\()", "g").replace("reflink", hs).replace("nolink", ps).getRegex(), Wn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, on = { _backpedal: Re, anyPunctuation: Pr, autolink: Nr, blockSkip: _r, br: ls, code: yr, del: Re, delLDelim: Re, delRDelim: Re, emStrongLDelim: Rr, emStrongRDelimAst: Ir, emStrongRDelimUnd: Mr, escape: vr, link: Br, nolink: ps, punctuation: Sr, reflink: hs, reflinkSearch: Fr, tag: Ur, text: Tr, url: Re }, Hr = { ...on, link: D(/^!?\[(label)\]\((.*?)\)/).replace("label", vt).getRegex(), reflink: D(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", vt).getRegex() }, Qt = { ...on, emStrongRDelimAst: Dr, emStrongLDelim: Cr, delLDelim: Lr, delRDelim: Or, url: D(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Wn).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: D(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Wn).getRegex() }, Gr = { ...Qt, br: D(ls).replace("{2,}", "*").getRegex(), text: D(Qt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, xt = { normal: an, gfm: kr, pedantic: wr }, et = { normal: on, gfm: Qt, breaks: Gr, pedantic: Hr }, Wr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, jn = /* @__PURE__ */ h((l) => Wr[l], "ke");
1070
- function ge(l, t) {
1089
+ })(), Q = { 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") }, cr = /^(?:[ \t]*(?:\n|$))+/, ur = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, hr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ot = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, pr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, sn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, rs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, is = I(rs).replace(/bull/g, sn).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 = I(rs).replace(/bull/g, sn).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(), rn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, fr = /^[^\n]+/, an = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, gr = I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", an).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), mr = I(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, sn).getRegex(), _t = "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", ln = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, xr = I("^ {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", ln).replace("tag", _t).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), as = I(rn).replace("hr", ot).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", _t).getRegex(), br = I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", as).getRegex(), on = { blockquote: br, code: ur, def: gr, fences: hr, heading: pr, hr: ot, html: xr, lheading: is, list: mr, newline: cr, paragraph: as, table: De, text: fr }, Gn = I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ot).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", _t).getRegex(), kr = { ...on, lheading: dr, table: Gn, paragraph: I(rn).replace("hr", ot).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Gn).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", _t).getRegex() }, wr = { ...on, html: I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ln).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: De, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: I(rn).replace("hr", ot).replace("heading", ` *#{1,6} *[^
1090
+ ]`).replace("lheading", is).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, vr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, yr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ls = /^( {2,}|\\)\n(?!\s*$)/, Tr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ge = /[\p{P}\p{S}]/u, Rt = /[\s\p{P}\p{S}]/u, cn = /[^\s\p{P}\p{S}]/u, Sr = I(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Rt).getRegex(), os = /(?!~)[\p{P}\p{S}]/u, Ar = /(?!~)[\s\p{P}\p{S}]/u, Er = /(?:[^\s\p{P}\p{S}]|~)/u, _r = I(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", or ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), cs = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Rr = I(cs, "u").replace(/punct/g, Ge).getRegex(), Cr = I(cs, "u").replace(/punct/g, os).getRegex(), us = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Dr = I(us, "gu").replace(/notPunctSpace/g, cn).replace(/punctSpace/g, Rt).replace(/punct/g, Ge).getRegex(), Ir = I(us, "gu").replace(/notPunctSpace/g, Er).replace(/punctSpace/g, Ar).replace(/punct/g, os).getRegex(), Mr = I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, cn).replace(/punctSpace/g, Rt).replace(/punct/g, Ge).getRegex(), Lr = I(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ge).getRegex(), zr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Or = I(zr, "gu").replace(/notPunctSpace/g, cn).replace(/punctSpace/g, Rt).replace(/punct/g, Ge).getRegex(), Pr = I(/\\(punct)/, "gu").replace(/punct/g, Ge).getRegex(), Nr = I(/^<(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(), $r = I(ln).replace("(?:-->|$)", "-->").getRegex(), Ur = I("^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", $r).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), St = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Br = I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", St).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), hs = I(/^!?\[(label)\]\[(ref)\]/).replace("label", St).replace("ref", an).getRegex(), ps = I(/^!?\[(ref)\](?:\[\])?/).replace("ref", an).getRegex(), Fr = I("reflink|nolink(?!\\()", "g").replace("reflink", hs).replace("nolink", ps).getRegex(), Wn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, un = { _backpedal: De, anyPunctuation: Pr, autolink: Nr, blockSkip: _r, br: ls, code: yr, del: De, delLDelim: De, delRDelim: De, emStrongLDelim: Rr, emStrongRDelimAst: Dr, emStrongRDelimUnd: Mr, escape: vr, link: Br, nolink: ps, punctuation: Sr, reflink: hs, reflinkSearch: Fr, tag: Ur, text: Tr, url: De }, Hr = { ...un, link: I(/^!?\[(label)\]\((.*?)\)/).replace("label", St).getRegex(), reflink: I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", St).getRegex() }, en = { ...un, emStrongRDelimAst: Ir, emStrongLDelim: Cr, delLDelim: Lr, delRDelim: Or, url: I(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Wn).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: I(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Wn).getRegex() }, Gr = { ...en, br: I(ls).replace("{2,}", "*").getRegex(), text: I(en.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, vt = { normal: on, gfm: kr, pedantic: wr }, nt = { normal: un, gfm: en, breaks: Gr, pedantic: Hr }, Wr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, jn = /* @__PURE__ */ u((l) => Wr[l], "ke");
1091
+ function xe(l, t) {
1071
1092
  if (t) {
1072
- if (X.escapeTest.test(l)) return l.replace(X.escapeReplace, jn);
1073
- } else if (X.escapeTestNoEncode.test(l)) return l.replace(X.escapeReplaceNoEncode, jn);
1093
+ if (Q.escapeTest.test(l)) return l.replace(Q.escapeReplace, jn);
1094
+ } else if (Q.escapeTestNoEncode.test(l)) return l.replace(Q.escapeReplaceNoEncode, jn);
1074
1095
  return l;
1075
1096
  }
1076
- h(ge, "T");
1097
+ u(xe, "T");
1077
1098
  function qn(l) {
1078
1099
  try {
1079
- l = encodeURI(l).replace(X.percentDecode, "%");
1100
+ l = encodeURI(l).replace(Q.percentDecode, "%");
1080
1101
  } catch {
1081
1102
  return null;
1082
1103
  }
1083
1104
  return l;
1084
1105
  }
1085
- h(qn, "J");
1106
+ u(qn, "J");
1086
1107
  function Vn(l, t) {
1087
- let e = l.replace(X.findPipe, (r, a, o) => {
1088
- let c = !1, f = a;
1089
- for (; --f >= 0 && o[f] === "\\"; ) c = !c;
1108
+ let e = l.replace(Q.findPipe, (r, a, o) => {
1109
+ let c = !1, p = a;
1110
+ for (; --p >= 0 && o[p] === "\\"; ) c = !c;
1090
1111
  return c ? "|" : " |";
1091
- }), n = e.split(X.splitPipe), s = 0;
1112
+ }), n = e.split(Q.splitPipe), s = 0;
1092
1113
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
1093
1114
  else for (; n.length < t; ) n.push("");
1094
- for (; s < n.length; s++) n[s] = n[s].trim().replace(X.slashPipe, "|");
1115
+ for (; s < n.length; s++) n[s] = n[s].trim().replace(Q.slashPipe, "|");
1095
1116
  return n;
1096
1117
  }
1097
- h(Vn, "V");
1098
- function tt(l, t, e) {
1118
+ u(Vn, "V");
1119
+ function st(l, t, e) {
1099
1120
  let n = l.length;
1100
1121
  if (n === 0) return "";
1101
1122
  let s = 0;
@@ -1103,7 +1124,7 @@ function tt(l, t, e) {
1103
1124
  s++;
1104
1125
  return l.slice(0, n - s);
1105
1126
  }
1106
- h(tt, "I");
1127
+ u(st, "I");
1107
1128
  function jr(l, t) {
1108
1129
  if (l.indexOf(t[1]) === -1) return -1;
1109
1130
  let e = 0;
@@ -1112,7 +1133,7 @@ function jr(l, t) {
1112
1133
  else if (l[n] === t[1] && (e--, e < 0)) return n;
1113
1134
  return e > 0 ? -2 : -1;
1114
1135
  }
1115
- h(jr, "de");
1136
+ u(jr, "de");
1116
1137
  function qr(l, t = 0) {
1117
1138
  let e = t, n = "";
1118
1139
  for (let s of l) if (s === " ") {
@@ -1121,14 +1142,14 @@ function qr(l, t = 0) {
1121
1142
  } else n += s, e++;
1122
1143
  return n;
1123
1144
  }
1124
- h(qr, "ge");
1145
+ u(qr, "ge");
1125
1146
  function Yn(l, t, e, n, s) {
1126
1147
  let r = t.href, a = t.title || null, o = l[1].replace(s.other.outputLinkReplace, "$1");
1127
1148
  n.state.inLink = !0;
1128
1149
  let c = { type: l[0].charAt(0) === "!" ? "image" : "link", raw: e, href: r, title: a, text: o, tokens: n.inlineTokens(o) };
1129
1150
  return n.state.inLink = !1, c;
1130
1151
  }
1131
- h(Yn, "fe");
1152
+ u(Yn, "fe");
1132
1153
  function Vr(l, t, e) {
1133
1154
  let n = l.match(e.other.indentCodeCompensation);
1134
1155
  if (n === null) return t;
@@ -1142,13 +1163,13 @@ function Vr(l, t, e) {
1142
1163
  }).join(`
1143
1164
  `);
1144
1165
  }
1145
- h(Vr, "nt");
1146
- var $e, yt = ($e = class {
1166
+ u(Vr, "nt");
1167
+ var Ue, At = (Ue = class {
1147
1168
  constructor(t) {
1148
- C(this, "options");
1149
- C(this, "rules");
1150
- C(this, "lexer");
1151
- this.options = t || De;
1169
+ D(this, "options");
1170
+ D(this, "rules");
1171
+ D(this, "lexer");
1172
+ this.options = t || Le;
1152
1173
  }
1153
1174
  space(t) {
1154
1175
  let e = this.rules.block.newline.exec(t);
@@ -1158,7 +1179,7 @@ var $e, yt = ($e = class {
1158
1179
  let e = this.rules.block.code.exec(t);
1159
1180
  if (e) {
1160
1181
  let n = e[0].replace(this.rules.other.codeRemoveIndent, "");
1161
- return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : tt(n, `
1182
+ return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : st(n, `
1162
1183
  `) };
1163
1184
  }
1164
1185
  }
@@ -1174,7 +1195,7 @@ var $e, yt = ($e = class {
1174
1195
  if (e) {
1175
1196
  let n = e[2].trim();
1176
1197
  if (this.rules.other.endingHash.test(n)) {
1177
- let s = tt(n, "#");
1198
+ let s = st(n, "#");
1178
1199
  (this.options.pedantic || !s || this.rules.other.endingSpaceChar.test(s)) && (n = s.trim());
1179
1200
  }
1180
1201
  return { type: "heading", raw: e[0], depth: e[1].length, text: n, tokens: this.lexer.inline(n) };
@@ -1182,42 +1203,42 @@ var $e, yt = ($e = class {
1182
1203
  }
1183
1204
  hr(t) {
1184
1205
  let e = this.rules.block.hr.exec(t);
1185
- if (e) return { type: "hr", raw: tt(e[0], `
1206
+ if (e) return { type: "hr", raw: st(e[0], `
1186
1207
  `) };
1187
1208
  }
1188
1209
  blockquote(t) {
1189
1210
  let e = this.rules.block.blockquote.exec(t);
1190
1211
  if (e) {
1191
- let n = tt(e[0], `
1212
+ let n = st(e[0], `
1192
1213
  `).split(`
1193
1214
  `), s = "", r = "", a = [];
1194
1215
  for (; n.length > 0; ) {
1195
- let o = !1, c = [], f;
1196
- for (f = 0; f < n.length; f++) if (this.rules.other.blockquoteStart.test(n[f])) c.push(n[f]), o = !0;
1197
- else if (!o) c.push(n[f]);
1216
+ let o = !1, c = [], p;
1217
+ for (p = 0; p < n.length; p++) if (this.rules.other.blockquoteStart.test(n[p])) c.push(n[p]), o = !0;
1218
+ else if (!o) c.push(n[p]);
1198
1219
  else break;
1199
- n = n.slice(f);
1220
+ n = n.slice(p);
1200
1221
  let g = c.join(`
1201
1222
  `), d = g.replace(this.rules.other.blockquoteSetextReplace, `
1202
1223
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
1203
1224
  s = s ? `${s}
1204
1225
  ${g}` : g, r = r ? `${r}
1205
1226
  ${d}` : d;
1206
- let p = this.lexer.state.top;
1207
- if (this.lexer.state.top = !0, this.lexer.blockTokens(d, a, !0), this.lexer.state.top = p, n.length === 0) break;
1208
- let x = a.at(-1);
1209
- if (x?.type === "code") break;
1210
- if (x?.type === "blockquote") {
1211
- let T = x, _ = T.raw + `
1227
+ let f = this.lexer.state.top;
1228
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(d, a, !0), this.lexer.state.top = f, n.length === 0) break;
1229
+ let m = a.at(-1);
1230
+ if (m?.type === "code") break;
1231
+ if (m?.type === "blockquote") {
1232
+ let w = m, E = w.raw + `
1212
1233
  ` + n.join(`
1213
- `), z = this.blockquote(_);
1214
- a[a.length - 1] = z, s = s.substring(0, s.length - T.raw.length) + z.raw, r = r.substring(0, r.length - T.text.length) + z.text;
1234
+ `), z = this.blockquote(E);
1235
+ a[a.length - 1] = z, s = s.substring(0, s.length - w.raw.length) + z.raw, r = r.substring(0, r.length - w.text.length) + z.text;
1215
1236
  break;
1216
- } else if (x?.type === "list") {
1217
- let T = x, _ = T.raw + `
1237
+ } else if (m?.type === "list") {
1238
+ let w = m, E = w.raw + `
1218
1239
  ` + n.join(`
1219
- `), z = this.list(_);
1220
- a[a.length - 1] = z, s = s.substring(0, s.length - x.raw.length) + z.raw, r = r.substring(0, r.length - T.raw.length) + z.raw, n = _.substring(a.at(-1).raw.length).split(`
1240
+ `), z = this.list(E);
1241
+ a[a.length - 1] = z, s = s.substring(0, s.length - m.raw.length) + z.raw, r = r.substring(0, r.length - w.raw.length) + z.raw, n = E.substring(a.at(-1).raw.length).split(`
1221
1242
  `);
1222
1243
  continue;
1223
1244
  }
@@ -1232,28 +1253,28 @@ ${d}` : d;
1232
1253
  n = s ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = s ? n : "[*+-]");
1233
1254
  let a = this.rules.other.listItemRegex(n), o = !1;
1234
1255
  for (; t; ) {
1235
- let f = !1, g = "", d = "";
1256
+ let p = !1, g = "", d = "";
1236
1257
  if (!(e = a.exec(t)) || this.rules.block.hr.test(t)) break;
1237
1258
  g = e[0], t = t.substring(g.length);
1238
- let p = qr(e[2].split(`
1239
- `, 1)[0], e[1].length), x = t.split(`
1240
- `, 1)[0], T = !p.trim(), _ = 0;
1241
- if (this.options.pedantic ? (_ = 2, d = p.trimStart()) : T ? _ = e[1].length + 1 : (_ = p.search(this.rules.other.nonSpaceChar), _ = _ > 4 ? 1 : _, d = p.slice(_), _ += e[1].length), T && this.rules.other.blankLine.test(x) && (g += x + `
1242
- `, t = t.substring(x.length + 1), f = !0), !f) {
1243
- let z = this.rules.other.nextBulletRegex(_), te = this.rules.other.hrRegex(_), ae = this.rules.other.fencesBeginRegex(_), J = this.rules.other.headingBeginRegex(_), P = this.rules.other.htmlBeginRegex(_), W = this.rules.other.blockquoteBeginRegex(_);
1259
+ let f = qr(e[2].split(`
1260
+ `, 1)[0], e[1].length), m = t.split(`
1261
+ `, 1)[0], w = !f.trim(), E = 0;
1262
+ if (this.options.pedantic ? (E = 2, d = f.trimStart()) : w ? E = e[1].length + 1 : (E = f.search(this.rules.other.nonSpaceChar), E = E > 4 ? 1 : E, d = f.slice(E), E += e[1].length), w && this.rules.other.blankLine.test(m) && (g += m + `
1263
+ `, t = t.substring(m.length + 1), p = !0), !p) {
1264
+ let z = this.rules.other.nextBulletRegex(E), U = this.rules.other.hrRegex(E), se = this.rules.other.fencesBeginRegex(E), ie = this.rules.other.headingBeginRegex(E), O = this.rules.other.htmlBeginRegex(E), ae = this.rules.other.blockquoteBeginRegex(E);
1244
1265
  for (; t; ) {
1245
- let le = t.split(`
1246
- `, 1)[0], ne;
1247
- if (x = le, this.options.pedantic ? (x = x.replace(this.rules.other.listReplaceNesting, " "), ne = x) : ne = x.replace(this.rules.other.tabCharGlobal, " "), ae.test(x) || J.test(x) || P.test(x) || W.test(x) || z.test(x) || te.test(x)) break;
1248
- if (ne.search(this.rules.other.nonSpaceChar) >= _ || !x.trim()) d += `
1249
- ` + ne.slice(_);
1266
+ let de = t.split(`
1267
+ `, 1)[0], j;
1268
+ if (m = de, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), j = m) : j = m.replace(this.rules.other.tabCharGlobal, " "), se.test(m) || ie.test(m) || O.test(m) || ae.test(m) || z.test(m) || U.test(m)) break;
1269
+ if (j.search(this.rules.other.nonSpaceChar) >= E || !m.trim()) d += `
1270
+ ` + j.slice(E);
1250
1271
  else {
1251
- if (T || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ae.test(p) || J.test(p) || te.test(p)) break;
1272
+ if (w || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || se.test(f) || ie.test(f) || U.test(f)) break;
1252
1273
  d += `
1253
- ` + x;
1274
+ ` + m;
1254
1275
  }
1255
- T = !x.trim(), g += le + `
1256
- `, t = t.substring(le.length + 1), p = ne.slice(_);
1276
+ w = !m.trim(), g += de + `
1277
+ `, t = t.substring(de.length + 1), f = j.slice(E);
1257
1278
  }
1258
1279
  }
1259
1280
  r.loose || (o ? r.loose = !0 : this.rules.other.doubleBlankLine.test(g) && (o = !0)), r.items.push({ type: "list_item", raw: g, task: !!this.options.gfm && this.rules.other.listIsTask.test(d), loose: !1, text: d, tokens: [] }), r.raw += g;
@@ -1262,29 +1283,29 @@ ${d}` : d;
1262
1283
  if (c) c.raw = c.raw.trimEnd(), c.text = c.text.trimEnd();
1263
1284
  else return;
1264
1285
  r.raw = r.raw.trimEnd();
1265
- for (let f of r.items) {
1266
- if (this.lexer.state.top = !1, f.tokens = this.lexer.blockTokens(f.text, []), f.task) {
1267
- if (f.text = f.text.replace(this.rules.other.listReplaceTask, ""), f.tokens[0]?.type === "text" || f.tokens[0]?.type === "paragraph") {
1268
- 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, "");
1286
+ for (let p of r.items) {
1287
+ if (this.lexer.state.top = !1, p.tokens = this.lexer.blockTokens(p.text, []), p.task) {
1288
+ if (p.text = p.text.replace(this.rules.other.listReplaceTask, ""), p.tokens[0]?.type === "text" || p.tokens[0]?.type === "paragraph") {
1289
+ p.tokens[0].raw = p.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), p.tokens[0].text = p.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
1269
1290
  for (let d = this.lexer.inlineQueue.length - 1; d >= 0; d--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)) {
1270
1291
  this.lexer.inlineQueue[d].src = this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask, "");
1271
1292
  break;
1272
1293
  }
1273
1294
  }
1274
- let g = this.rules.other.listTaskCheckbox.exec(f.raw);
1295
+ let g = this.rules.other.listTaskCheckbox.exec(p.raw);
1275
1296
  if (g) {
1276
1297
  let d = { type: "checkbox", raw: g[0] + " ", checked: g[0] !== "[ ]" };
1277
- f.checked = d.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 = d.raw + f.tokens[0].raw, f.tokens[0].text = d.raw + f.tokens[0].text, f.tokens[0].tokens.unshift(d)) : f.tokens.unshift({ type: "paragraph", raw: d.raw, text: d.raw, tokens: [d] }) : f.tokens.unshift(d);
1298
+ p.checked = d.checked, r.loose ? p.tokens[0] && ["paragraph", "text"].includes(p.tokens[0].type) && "tokens" in p.tokens[0] && p.tokens[0].tokens ? (p.tokens[0].raw = d.raw + p.tokens[0].raw, p.tokens[0].text = d.raw + p.tokens[0].text, p.tokens[0].tokens.unshift(d)) : p.tokens.unshift({ type: "paragraph", raw: d.raw, text: d.raw, tokens: [d] }) : p.tokens.unshift(d);
1278
1299
  }
1279
1300
  }
1280
1301
  if (!r.loose) {
1281
- let g = f.tokens.filter((p) => p.type === "space"), d = g.length > 0 && g.some((p) => this.rules.other.anyLine.test(p.raw));
1302
+ let g = p.tokens.filter((f) => f.type === "space"), d = g.length > 0 && g.some((f) => this.rules.other.anyLine.test(f.raw));
1282
1303
  r.loose = d;
1283
1304
  }
1284
1305
  }
1285
- if (r.loose) for (let f of r.items) {
1286
- f.loose = !0;
1287
- for (let g of f.tokens) g.type === "text" && (g.type = "paragraph");
1306
+ if (r.loose) for (let p of r.items) {
1307
+ p.loose = !0;
1308
+ for (let g of p.tokens) g.type === "text" && (g.type = "paragraph");
1288
1309
  }
1289
1310
  return r;
1290
1311
  }
@@ -1308,7 +1329,7 @@ ${d}` : d;
1308
1329
  if (n.length === s.length) {
1309
1330
  for (let o of s) this.rules.other.tableAlignRight.test(o) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? a.align.push("left") : a.align.push(null);
1310
1331
  for (let o = 0; o < n.length; o++) a.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: !0, align: a.align[o] });
1311
- for (let o of r) a.rows.push(Vn(o, a.header.length).map((c, f) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: a.align[f] })));
1332
+ for (let o of r) a.rows.push(Vn(o, a.header.length).map((c, p) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: a.align[p] })));
1312
1333
  return a;
1313
1334
  }
1314
1335
  }
@@ -1345,7 +1366,7 @@ ${d}` : d;
1345
1366
  let n = e[2].trim();
1346
1367
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
1347
1368
  if (!this.rules.other.endAngleBracket.test(n)) return;
1348
- let a = tt(n.slice(0, -1), "\\");
1369
+ let a = st(n.slice(0, -1), "\\");
1349
1370
  if ((n.length - a.length) % 2 === 0) return;
1350
1371
  } else {
1351
1372
  let a = jr(e[2], "()");
@@ -1377,25 +1398,25 @@ ${d}` : d;
1377
1398
  emStrong(t, e, n = "") {
1378
1399
  let s = this.rules.inline.emStrongLDelim.exec(t);
1379
1400
  if (!(!s || !s[1] && !s[2] && !s[3] && !s[4] || s[4] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(s[1] || s[3]) || !n || this.rules.inline.punctuation.exec(n))) {
1380
- let r = [...s[0]].length - 1, a, o, c = r, f = 0, g = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1401
+ let r = [...s[0]].length - 1, a, o, c = r, p = 0, g = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1381
1402
  for (g.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = g.exec(e)) !== null; ) {
1382
1403
  if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a) continue;
1383
1404
  if (o = [...a].length, s[3] || s[4]) {
1384
1405
  c += o;
1385
1406
  continue;
1386
1407
  } else if ((s[5] || s[6]) && r % 3 && !((r + o) % 3)) {
1387
- f += o;
1408
+ p += o;
1388
1409
  continue;
1389
1410
  }
1390
1411
  if (c -= o, c > 0) continue;
1391
- o = Math.min(o, o + c + f);
1392
- let d = [...s[0]][0].length, p = t.slice(0, r + s.index + d + o);
1412
+ o = Math.min(o, o + c + p);
1413
+ let d = [...s[0]][0].length, f = t.slice(0, r + s.index + d + o);
1393
1414
  if (Math.min(r, o) % 2) {
1394
- let T = p.slice(1, -1);
1395
- return { type: "em", raw: p, text: T, tokens: this.lexer.inlineTokens(T) };
1415
+ let w = f.slice(1, -1);
1416
+ return { type: "em", raw: f, text: w, tokens: this.lexer.inlineTokens(w) };
1396
1417
  }
1397
- let x = p.slice(2, -2);
1398
- return { type: "strong", raw: p, text: x, tokens: this.lexer.inlineTokens(x) };
1418
+ let m = f.slice(2, -2);
1419
+ return { type: "strong", raw: f, text: m, tokens: this.lexer.inlineTokens(m) };
1399
1420
  }
1400
1421
  }
1401
1422
  }
@@ -1413,8 +1434,8 @@ ${d}` : d;
1413
1434
  del(t, e, n = "") {
1414
1435
  let s = this.rules.inline.delLDelim.exec(t);
1415
1436
  if (s && (!s[1] || !n || this.rules.inline.punctuation.exec(n))) {
1416
- let r = [...s[0]].length - 1, a, o, c = r, f = this.rules.inline.delRDelim;
1417
- for (f.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = f.exec(e)) !== null; ) {
1437
+ let r = [...s[0]].length - 1, a, o, c = r, p = this.rules.inline.delRDelim;
1438
+ for (p.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = p.exec(e)) !== null; ) {
1418
1439
  if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a || (o = [...a].length, o !== r)) continue;
1419
1440
  if (s[3] || s[4]) {
1420
1441
  c += o;
@@ -1422,8 +1443,8 @@ ${d}` : d;
1422
1443
  }
1423
1444
  if (c -= o, c > 0) continue;
1424
1445
  o = Math.min(o, o + c);
1425
- let g = [...s[0]][0].length, d = t.slice(0, r + s.index + g + o), p = d.slice(r, -r);
1426
- return { type: "del", raw: d, text: p, tokens: this.lexer.inlineTokens(p) };
1446
+ let g = [...s[0]][0].length, d = t.slice(0, r + s.index + g + o), f = d.slice(r, -r);
1447
+ return { type: "del", raw: d, text: f, tokens: this.lexer.inlineTokens(f) };
1427
1448
  }
1428
1449
  }
1429
1450
  }
@@ -1456,28 +1477,28 @@ ${d}` : d;
1456
1477
  return { type: "text", raw: e[0], text: e[0], escaped: n };
1457
1478
  }
1458
1479
  }
1459
- }, h($e, "w"), $e), we, ue = (we = class {
1480
+ }, u(Ue, "w"), Ue), Se, he = (Se = class {
1460
1481
  constructor(t) {
1461
- C(this, "tokens");
1462
- C(this, "options");
1463
- C(this, "state");
1464
- C(this, "inlineQueue");
1465
- C(this, "tokenizer");
1466
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || De, this.options.tokenizer = this.options.tokenizer || new yt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1467
- let e = { other: X, block: xt.normal, inline: et.normal };
1468
- this.options.pedantic ? (e.block = xt.pedantic, e.inline = et.pedantic) : this.options.gfm && (e.block = xt.gfm, this.options.breaks ? e.inline = et.breaks : e.inline = et.gfm), this.tokenizer.rules = e;
1482
+ D(this, "tokens");
1483
+ D(this, "options");
1484
+ D(this, "state");
1485
+ D(this, "inlineQueue");
1486
+ D(this, "tokenizer");
1487
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Le, this.options.tokenizer = this.options.tokenizer || new At(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1488
+ let e = { other: Q, block: vt.normal, inline: nt.normal };
1489
+ this.options.pedantic ? (e.block = vt.pedantic, e.inline = nt.pedantic) : this.options.gfm && (e.block = vt.gfm, this.options.breaks ? e.inline = nt.breaks : e.inline = nt.gfm), this.tokenizer.rules = e;
1469
1490
  }
1470
1491
  static get rules() {
1471
- return { block: xt, inline: et };
1492
+ return { block: vt, inline: nt };
1472
1493
  }
1473
1494
  static lex(t, e) {
1474
- return new we(e).lex(t);
1495
+ return new Se(e).lex(t);
1475
1496
  }
1476
1497
  static lexInline(t, e) {
1477
- return new we(e).inlineTokens(t);
1498
+ return new Se(e).inlineTokens(t);
1478
1499
  }
1479
1500
  lex(t) {
1480
- t = t.replace(X.carriageReturn, `
1501
+ t = t.replace(Q.carriageReturn, `
1481
1502
  `), this.blockTokens(t, this.tokens);
1482
1503
  for (let e = 0; e < this.inlineQueue.length; e++) {
1483
1504
  let n = this.inlineQueue[e];
@@ -1486,7 +1507,7 @@ ${d}` : d;
1486
1507
  return this.inlineQueue = [], this.tokens;
1487
1508
  }
1488
1509
  blockTokens(t, e = [], n = !1) {
1489
- for (this.tokenizer.lexer = this, this.options.pedantic && (t = t.replace(X.tabCharGlobal, " ").replace(X.spaceLine, "")); t; ) {
1510
+ for (this.tokenizer.lexer = this, this.options.pedantic && (t = t.replace(Q.tabCharGlobal, " ").replace(Q.spaceLine, "")); t; ) {
1490
1511
  let s;
1491
1512
  if (this.options.extensions?.block?.some((a) => (s = a.call({ lexer: this }, t, e)) ? (t = t.substring(s.raw.length), e.push(s), !0) : !1)) continue;
1492
1513
  if (s = this.tokenizer.space(t)) {
@@ -1549,8 +1570,8 @@ ${d}` : d;
1549
1570
  let r = t;
1550
1571
  if (this.options.extensions?.startBlock) {
1551
1572
  let a = 1 / 0, o = t.slice(1), c;
1552
- this.options.extensions.startBlock.forEach((f) => {
1553
- c = f.call({ lexer: this }, o), typeof c == "number" && c >= 0 && (a = Math.min(a, c));
1573
+ this.options.extensions.startBlock.forEach((p) => {
1574
+ c = p.call({ lexer: this }, o), typeof c == "number" && c >= 0 && (a = Math.min(a, c));
1554
1575
  }), a < 1 / 0 && a >= 0 && (r = t.substring(0, a + 1));
1555
1576
  }
1556
1577
  if (this.state.top && (s = this.tokenizer.paragraph(r))) {
@@ -1641,14 +1662,14 @@ ${d}` : d;
1641
1662
  t = t.substring(c.raw.length), e.push(c);
1642
1663
  continue;
1643
1664
  }
1644
- let f = t;
1665
+ let p = t;
1645
1666
  if (this.options.extensions?.startInline) {
1646
- let g = 1 / 0, d = t.slice(1), p;
1647
- this.options.extensions.startInline.forEach((x) => {
1648
- p = x.call({ lexer: this }, d), typeof p == "number" && p >= 0 && (g = Math.min(g, p));
1649
- }), g < 1 / 0 && g >= 0 && (f = t.substring(0, g + 1));
1667
+ let g = 1 / 0, d = t.slice(1), f;
1668
+ this.options.extensions.startInline.forEach((m) => {
1669
+ f = m.call({ lexer: this }, d), typeof f == "number" && f >= 0 && (g = Math.min(g, f));
1670
+ }), g < 1 / 0 && g >= 0 && (p = t.substring(0, g + 1));
1650
1671
  }
1651
- if (c = this.tokenizer.inlineText(f)) {
1672
+ if (c = this.tokenizer.inlineText(p)) {
1652
1673
  t = t.substring(c.raw.length), c.raw.slice(-1) !== "_" && (o = c.raw.slice(-1)), a = !0;
1653
1674
  let g = e.at(-1);
1654
1675
  g?.type === "text" ? (g.raw += c.raw, g.text += c.text) : e.push(c);
@@ -1664,20 +1685,20 @@ ${d}` : d;
1664
1685
  }
1665
1686
  return e;
1666
1687
  }
1667
- }, h(we, "u"), we), Ue, Tt = (Ue = class {
1688
+ }, u(Se, "u"), Se), Be, Et = (Be = class {
1668
1689
  constructor(t) {
1669
- C(this, "options");
1670
- C(this, "parser");
1671
- this.options = t || De;
1690
+ D(this, "options");
1691
+ D(this, "parser");
1692
+ this.options = t || Le;
1672
1693
  }
1673
1694
  space(t) {
1674
1695
  return "";
1675
1696
  }
1676
1697
  code({ text: t, lang: e, escaped: n }) {
1677
- let s = (e || "").match(X.notSpaceStart)?.[0], r = t.replace(X.endingNewline, "") + `
1698
+ let s = (e || "").match(Q.notSpaceStart)?.[0], r = t.replace(Q.endingNewline, "") + `
1678
1699
  `;
1679
- return s ? '<pre><code class="language-' + ge(s) + '">' + (n ? r : ge(r, !0)) + `</code></pre>
1680
- ` : "<pre><code>" + (n ? r : ge(r, !0)) + `</code></pre>
1700
+ return s ? '<pre><code class="language-' + xe(s) + '">' + (n ? r : xe(r, !0)) + `</code></pre>
1701
+ ` : "<pre><code>" + (n ? r : xe(r, !0)) + `</code></pre>
1681
1702
  `;
1682
1703
  }
1683
1704
  blockquote({ tokens: t }) {
@@ -1755,7 +1776,7 @@ ${t}</tr>
1755
1776
  return `<em>${this.parser.parseInline(t)}</em>`;
1756
1777
  }
1757
1778
  codespan({ text: t }) {
1758
- return `<code>${ge(t, !0)}</code>`;
1779
+ return `<code>${xe(t, !0)}</code>`;
1759
1780
  }
1760
1781
  br(t) {
1761
1782
  return "<br>";
@@ -1768,20 +1789,20 @@ ${t}</tr>
1768
1789
  if (r === null) return s;
1769
1790
  t = r;
1770
1791
  let a = '<a href="' + t + '"';
1771
- return e && (a += ' title="' + ge(e) + '"'), a += ">" + s + "</a>", a;
1792
+ return e && (a += ' title="' + xe(e) + '"'), a += ">" + s + "</a>", a;
1772
1793
  }
1773
1794
  image({ href: t, title: e, text: n, tokens: s }) {
1774
1795
  s && (n = this.parser.parseInline(s, this.parser.textRenderer));
1775
1796
  let r = qn(t);
1776
- if (r === null) return ge(n);
1797
+ if (r === null) return xe(n);
1777
1798
  t = r;
1778
- let a = `<img src="${t}" alt="${ge(n)}"`;
1779
- return e && (a += ` title="${ge(e)}"`), a += ">", a;
1799
+ let a = `<img src="${t}" alt="${xe(n)}"`;
1800
+ return e && (a += ` title="${xe(e)}"`), a += ">", a;
1780
1801
  }
1781
1802
  text(t) {
1782
- return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : ge(t.text);
1803
+ return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : xe(t.text);
1783
1804
  }
1784
- }, h(Ue, "y"), Ue), Be, cn = (Be = class {
1805
+ }, u(Be, "y"), Be), Fe, hn = (Fe = class {
1785
1806
  strong({ text: t }) {
1786
1807
  return t;
1787
1808
  }
@@ -1812,18 +1833,18 @@ ${t}</tr>
1812
1833
  checkbox({ raw: t }) {
1813
1834
  return t;
1814
1835
  }
1815
- }, h(Be, "$"), Be), ve, he = (ve = class {
1836
+ }, u(Fe, "$"), Fe), Ae, pe = (Ae = class {
1816
1837
  constructor(t) {
1817
- C(this, "options");
1818
- C(this, "renderer");
1819
- C(this, "textRenderer");
1820
- this.options = t || De, this.options.renderer = this.options.renderer || new Tt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new cn();
1838
+ D(this, "options");
1839
+ D(this, "renderer");
1840
+ D(this, "textRenderer");
1841
+ this.options = t || Le, this.options.renderer = this.options.renderer || new Et(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new hn();
1821
1842
  }
1822
1843
  static parse(t, e) {
1823
- return new ve(e).parse(t);
1844
+ return new Ae(e).parse(t);
1824
1845
  }
1825
1846
  static parseInline(t, e) {
1826
- return new ve(e).parseInline(t);
1847
+ return new Ae(e).parseInline(t);
1827
1848
  }
1828
1849
  parse(t) {
1829
1850
  this.renderer.parser = this;
@@ -1963,11 +1984,11 @@ ${t}</tr>
1963
1984
  }
1964
1985
  return n;
1965
1986
  }
1966
- }, h(ve, "u"), ve), ke, st = (ke = class {
1987
+ }, u(Ae, "u"), Ae), Te, at = (Te = class {
1967
1988
  constructor(t) {
1968
- C(this, "options");
1969
- C(this, "block");
1970
- this.options = t || De;
1989
+ D(this, "options");
1990
+ D(this, "block");
1991
+ this.options = t || Le;
1971
1992
  }
1972
1993
  preprocess(t) {
1973
1994
  return t;
@@ -1982,23 +2003,23 @@ ${t}</tr>
1982
2003
  return t;
1983
2004
  }
1984
2005
  provideLexer(t = this.block) {
1985
- return t ? ue.lex : ue.lexInline;
2006
+ return t ? he.lex : he.lexInline;
1986
2007
  }
1987
2008
  provideParser(t = this.block) {
1988
- return t ? he.parse : he.parseInline;
2009
+ return t ? pe.parse : pe.parseInline;
1989
2010
  }
1990
- }, h(ke, "P"), C(ke, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), C(ke, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), ke), Fe, Yr = (Fe = class {
2011
+ }, u(Te, "P"), D(Te, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), D(Te, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), Te), He, Yr = (He = class {
1991
2012
  constructor(...t) {
1992
- C(this, "defaults", en());
1993
- C(this, "options", this.setOptions);
1994
- C(this, "parse", this.parseMarkdown(!0));
1995
- C(this, "parseInline", this.parseMarkdown(!1));
1996
- C(this, "Parser", he);
1997
- C(this, "Renderer", Tt);
1998
- C(this, "TextRenderer", cn);
1999
- C(this, "Lexer", ue);
2000
- C(this, "Tokenizer", yt);
2001
- C(this, "Hooks", st);
2013
+ D(this, "defaults", nn());
2014
+ D(this, "options", this.setOptions);
2015
+ D(this, "parse", this.parseMarkdown(!0));
2016
+ D(this, "parseInline", this.parseMarkdown(!1));
2017
+ D(this, "Parser", pe);
2018
+ D(this, "Renderer", Et);
2019
+ D(this, "TextRenderer", hn);
2020
+ D(this, "Lexer", he);
2021
+ D(this, "Tokenizer", At);
2022
+ D(this, "Hooks", at);
2002
2023
  this.use(...t);
2003
2024
  }
2004
2025
  walkTokens(t, e) {
@@ -2045,51 +2066,51 @@ ${t}</tr>
2045
2066
  }
2046
2067
  "childTokens" in r && r.childTokens && (e.childTokens[r.name] = r.childTokens);
2047
2068
  }), s.extensions = e), n.renderer) {
2048
- let r = this.defaults.renderer || new Tt(this.defaults);
2069
+ let r = this.defaults.renderer || new Et(this.defaults);
2049
2070
  for (let a in n.renderer) {
2050
2071
  if (!(a in r)) throw new Error(`renderer '${a}' does not exist`);
2051
2072
  if (["options", "parser"].includes(a)) continue;
2052
- let o = a, c = n.renderer[o], f = r[o];
2073
+ let o = a, c = n.renderer[o], p = r[o];
2053
2074
  r[o] = (...g) => {
2054
2075
  let d = c.apply(r, g);
2055
- return d === !1 && (d = f.apply(r, g)), d || "";
2076
+ return d === !1 && (d = p.apply(r, g)), d || "";
2056
2077
  };
2057
2078
  }
2058
2079
  s.renderer = r;
2059
2080
  }
2060
2081
  if (n.tokenizer) {
2061
- let r = this.defaults.tokenizer || new yt(this.defaults);
2082
+ let r = this.defaults.tokenizer || new At(this.defaults);
2062
2083
  for (let a in n.tokenizer) {
2063
2084
  if (!(a in r)) throw new Error(`tokenizer '${a}' does not exist`);
2064
2085
  if (["options", "rules", "lexer"].includes(a)) continue;
2065
- let o = a, c = n.tokenizer[o], f = r[o];
2086
+ let o = a, c = n.tokenizer[o], p = r[o];
2066
2087
  r[o] = (...g) => {
2067
2088
  let d = c.apply(r, g);
2068
- return d === !1 && (d = f.apply(r, g)), d;
2089
+ return d === !1 && (d = p.apply(r, g)), d;
2069
2090
  };
2070
2091
  }
2071
2092
  s.tokenizer = r;
2072
2093
  }
2073
2094
  if (n.hooks) {
2074
- let r = this.defaults.hooks || new st();
2095
+ let r = this.defaults.hooks || new at();
2075
2096
  for (let a in n.hooks) {
2076
2097
  if (!(a in r)) throw new Error(`hook '${a}' does not exist`);
2077
2098
  if (["options", "block"].includes(a)) continue;
2078
- let o = a, c = n.hooks[o], f = r[o];
2079
- st.passThroughHooks.has(a) ? r[o] = (g) => {
2080
- if (this.defaults.async && st.passThroughHooksRespectAsync.has(a)) return (async () => {
2081
- let p = await c.call(r, g);
2082
- return f.call(r, p);
2099
+ let o = a, c = n.hooks[o], p = r[o];
2100
+ at.passThroughHooks.has(a) ? r[o] = (g) => {
2101
+ if (this.defaults.async && at.passThroughHooksRespectAsync.has(a)) return (async () => {
2102
+ let f = await c.call(r, g);
2103
+ return p.call(r, f);
2083
2104
  })();
2084
2105
  let d = c.call(r, g);
2085
- return f.call(r, d);
2106
+ return p.call(r, d);
2086
2107
  } : r[o] = (...g) => {
2087
2108
  if (this.defaults.async) return (async () => {
2088
- let p = await c.apply(r, g);
2089
- return p === !1 && (p = await f.apply(r, g)), p;
2109
+ let f = await c.apply(r, g);
2110
+ return f === !1 && (f = await p.apply(r, g)), f;
2090
2111
  })();
2091
2112
  let d = c.apply(r, g);
2092
- return d === !1 && (d = f.apply(r, g)), d;
2113
+ return d === !1 && (d = p.apply(r, g)), d;
2093
2114
  };
2094
2115
  }
2095
2116
  s.hooks = r;
@@ -2108,10 +2129,10 @@ ${t}</tr>
2108
2129
  return this.defaults = { ...this.defaults, ...t }, this;
2109
2130
  }
2110
2131
  lexer(t, e) {
2111
- return ue.lex(t, e ?? this.defaults);
2132
+ return he.lex(t, e ?? this.defaults);
2112
2133
  }
2113
2134
  parser(t, e) {
2114
- return he.parse(t, e ?? this.defaults);
2135
+ return pe.parse(t, e ?? this.defaults);
2115
2136
  }
2116
2137
  parseMarkdown(t) {
2117
2138
  return (e, n) => {
@@ -2120,16 +2141,16 @@ ${t}</tr>
2120
2141
  if (typeof e > "u" || e === null) return a(new Error("marked(): input parameter is undefined or null"));
2121
2142
  if (typeof e != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
2122
2143
  if (r.hooks && (r.hooks.options = r, r.hooks.block = t), r.async) return (async () => {
2123
- let o = r.hooks ? await r.hooks.preprocess(e) : e, c = await (r.hooks ? await r.hooks.provideLexer(t) : t ? ue.lex : ue.lexInline)(o, r), f = r.hooks ? await r.hooks.processAllTokens(c) : c;
2124
- r.walkTokens && await Promise.all(this.walkTokens(f, r.walkTokens));
2125
- let g = await (r.hooks ? await r.hooks.provideParser(t) : t ? he.parse : he.parseInline)(f, r);
2144
+ let o = r.hooks ? await r.hooks.preprocess(e) : e, c = await (r.hooks ? await r.hooks.provideLexer(t) : t ? he.lex : he.lexInline)(o, r), p = r.hooks ? await r.hooks.processAllTokens(c) : c;
2145
+ r.walkTokens && await Promise.all(this.walkTokens(p, r.walkTokens));
2146
+ let g = await (r.hooks ? await r.hooks.provideParser(t) : t ? pe.parse : pe.parseInline)(p, r);
2126
2147
  return r.hooks ? await r.hooks.postprocess(g) : g;
2127
2148
  })().catch(a);
2128
2149
  try {
2129
2150
  r.hooks && (e = r.hooks.preprocess(e));
2130
- let o = (r.hooks ? r.hooks.provideLexer(t) : t ? ue.lex : ue.lexInline)(e, r);
2151
+ let o = (r.hooks ? r.hooks.provideLexer(t) : t ? he.lex : he.lexInline)(e, r);
2131
2152
  r.hooks && (o = r.hooks.processAllTokens(o)), r.walkTokens && this.walkTokens(o, r.walkTokens);
2132
- let c = (r.hooks ? r.hooks.provideParser(t) : t ? he.parse : he.parseInline)(o, r);
2153
+ let c = (r.hooks ? r.hooks.provideParser(t) : t ? pe.parse : pe.parseInline)(o, r);
2133
2154
  return r.hooks && (c = r.hooks.postprocess(c)), c;
2134
2155
  } catch (o) {
2135
2156
  return a(o);
@@ -2140,77 +2161,80 @@ ${t}</tr>
2140
2161
  return (n) => {
2141
2162
  if (n.message += `
2142
2163
  Please report this to https://github.com/markedjs/marked.`, t) {
2143
- let s = "<p>An error occurred:</p><pre>" + ge(n.message + "", !0) + "</pre>";
2164
+ let s = "<p>An error occurred:</p><pre>" + xe(n.message + "", !0) + "</pre>";
2144
2165
  return e ? Promise.resolve(s) : s;
2145
2166
  }
2146
2167
  if (e) return Promise.reject(n);
2147
2168
  throw n;
2148
2169
  };
2149
2170
  }
2150
- }, h(Fe, "D"), Fe), Ce = new Yr();
2171
+ }, u(He, "D"), He), Ie = new Yr();
2151
2172
  function M(l, t) {
2152
- return Ce.parse(l, t);
2173
+ return Ie.parse(l, t);
2153
2174
  }
2154
- h(M, "g");
2175
+ u(M, "g");
2155
2176
  M.options = M.setOptions = function(l) {
2156
- return Ce.setOptions(l), M.defaults = Ce.defaults, ss(M.defaults), M;
2177
+ return Ie.setOptions(l), M.defaults = Ie.defaults, ss(M.defaults), M;
2157
2178
  };
2158
- M.getDefaults = en;
2159
- M.defaults = De;
2179
+ M.getDefaults = nn;
2180
+ M.defaults = Le;
2160
2181
  M.use = function(...l) {
2161
- return Ce.use(...l), M.defaults = Ce.defaults, ss(M.defaults), M;
2182
+ return Ie.use(...l), M.defaults = Ie.defaults, ss(M.defaults), M;
2162
2183
  };
2163
2184
  M.walkTokens = function(l, t) {
2164
- return Ce.walkTokens(l, t);
2185
+ return Ie.walkTokens(l, t);
2165
2186
  };
2166
- M.parseInline = Ce.parseInline;
2167
- M.Parser = he;
2168
- M.parser = he.parse;
2169
- M.Renderer = Tt;
2170
- M.TextRenderer = cn;
2171
- M.Lexer = ue;
2172
- M.lexer = ue.lex;
2173
- M.Tokenizer = yt;
2174
- M.Hooks = st;
2187
+ M.parseInline = Ie.parseInline;
2188
+ M.Parser = pe;
2189
+ M.parser = pe.parse;
2190
+ M.Renderer = Et;
2191
+ M.TextRenderer = hn;
2192
+ M.Lexer = he;
2193
+ M.lexer = he.lex;
2194
+ M.Tokenizer = At;
2195
+ M.Hooks = at;
2175
2196
  M.parse = M;
2176
2197
  M.options;
2177
2198
  M.setOptions;
2178
2199
  M.use;
2179
2200
  M.walkTokens;
2180
2201
  M.parseInline;
2181
- he.parse;
2182
- ue.lex;
2202
+ pe.parse;
2203
+ he.lex;
2183
2204
  const Zr = { class: "@container/chat flex flex-col h-full relative" }, Xr = {
2184
2205
  key: 0,
2185
2206
  class: "pb-4"
2186
2207
  }, Kr = {
2187
2208
  key: 0,
2188
2209
  class: "flex flex-col items-center justify-center px-4 min-h-full"
2189
- }, Qr = { class: "relative mb-4 size-20 @sm/chat:size-24" }, Jr = ["src", "alt"], ei = ["title"], ti = {
2210
+ }, Qr = { class: "relative mb-4 size-20 @sm/chat:size-24" }, Jr = ["src", "alt"], ei = {
2211
+ key: 0,
2212
+ class: "mt-5 flex flex-col items-stretch gap-2 w-full max-w-xs"
2213
+ }, ti = ["onClick"], ni = ["title"], si = {
2190
2214
  key: 1,
2191
2215
  class: "flex justify-end px-2 pb-2"
2192
- }, ni = {
2216
+ }, ri = {
2193
2217
  key: 0,
2194
2218
  class: "flex items-center gap-3 py-3 px-2"
2195
- }, si = ["data-issue-code", "data-issue-bucket"], ri = { class: "flex flex-col gap-1 min-w-0" }, ii = ["href"], ai = ["data-test"], li = {
2219
+ }, ii = ["data-issue-code", "data-issue-bucket"], ai = { class: "flex flex-col gap-1 min-w-0" }, li = ["href"], oi = ["data-test"], ci = {
2196
2220
  key: 0,
2197
2221
  class: "flex-shrink-0 size-7 @sm/chat:size-8"
2198
- }, oi = ["src", "alt"], ci = ["src", "alt"], ui = ["src"], hi = ["href"], pi = ["innerHTML"], di = {
2222
+ }, ui = ["src", "alt"], hi = ["src", "alt"], pi = ["src"], di = ["href"], fi = ["innerHTML"], gi = {
2199
2223
  key: 2,
2200
2224
  class: "flex gap-2 justify-start items-center mb-4"
2201
- }, fi = ["src", "alt"], gi = {
2225
+ }, mi = ["src", "alt"], xi = {
2202
2226
  key: 0,
2203
2227
  class: "flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
2204
- }, mi = ["src", "alt"], xi = { class: "max-w-20 truncate" }, bi = ["onClick"], ki = {
2228
+ }, bi = ["src", "alt"], ki = { class: "max-w-20 truncate" }, wi = ["onClick"], vi = {
2205
2229
  key: 0,
2206
2230
  class: "shrink-0 flex items-center justify-center size-14"
2207
- }, wi = ["disabled"], vi = {
2231
+ }, yi = ["disabled"], Ti = {
2208
2232
  key: 0,
2209
2233
  class: "i-svg-spinners-ring-resize size-4"
2210
- }, yi = {
2234
+ }, Si = {
2211
2235
  key: 1,
2212
2236
  class: "i-tabler-paperclip size-5"
2213
- }, Ti = ["placeholder", "disabled"], Si = ["disabled"], Pi = /* @__PURE__ */ Ie({
2237
+ }, Ai = ["placeholder", "disabled"], Ei = ["disabled"], $i = /* @__PURE__ */ Me({
2214
2238
  __name: "ElAgentChat",
2215
2239
  props: {
2216
2240
  chatController: {},
@@ -2220,27 +2244,28 @@ const Zr = { class: "@container/chat flex flex-col h-full relative" }, Xr = {
2220
2244
  scope: { default: "private" },
2221
2245
  scopeName: {},
2222
2246
  setupHint: {},
2223
- emptyStateMessage: {}
2247
+ emptyStateMessage: {},
2248
+ starterPrompts: {}
2224
2249
  },
2225
2250
  setup(l) {
2226
2251
  const t = new M.Renderer();
2227
- t.link = ({ href: w, text: k }) => {
2228
- let m = !1;
2252
+ t.link = ({ href: _, text: b }) => {
2253
+ let x = !1;
2229
2254
  if (typeof window < "u")
2230
2255
  try {
2231
- m = new URL(w, window.location.href).origin === window.location.origin;
2256
+ x = new URL(_, window.location.href).origin === window.location.origin;
2232
2257
  } catch {
2233
- m = !1;
2258
+ x = !1;
2234
2259
  }
2235
- return m ? `<a href="${w}">${k}</a>` : `<a href="${w}" target="_blank" rel="noopener noreferrer">${k}</a>`;
2260
+ return x ? `<a href="${_}">${b}</a>` : `<a href="${_}" target="_blank" rel="noopener noreferrer">${b}</a>`;
2236
2261
  }, M.setOptions({ breaks: !0, gfm: !0, renderer: t });
2237
- function e(w) {
2238
- if (!w)
2262
+ function e(_) {
2263
+ if (!_)
2239
2264
  return "";
2240
- const k = M.parse(w, { async: !1 });
2241
- return lr.sanitize(k, { ADD_ATTR: ["target"], ADD_DATA_URI_TAGS: ["img"] });
2265
+ const b = M.parse(_, { async: !1 });
2266
+ return lr.sanitize(b, { ADD_ATTR: ["target"], ADD_DATA_URI_TAGS: ["img"] });
2242
2267
  }
2243
- h(e, "renderMarkdown");
2268
+ u(e, "renderMarkdown");
2244
2269
  const n = {
2245
2270
  private: "",
2246
2271
  org: "",
@@ -2249,398 +2274,417 @@ const Zr = { class: "@container/chat flex flex-col h-full relative" }, Xr = {
2249
2274
  private: { icon: "i-tabler-lock", label: "Private", tooltip: "Only you can see this conversation" },
2250
2275
  org: { icon: "i-tabler-users", label: "Workspace", tooltip: "Visible to workspace members" },
2251
2276
  public: { icon: "i-tabler-globe", label: "Public", tooltip: "Anyone with the link can see this" }
2252
- }, r = H(() => l.setupHint ?? n[l.scope]), a = H(() => {
2253
- const w = { ...s[l.scope] };
2254
- return l.scope === "org" && l.scopeName && (w.label = l.scopeName, w.tooltip = `Visible to ${l.scopeName} members`), w;
2255
- }), o = Z(""), c = Z(!1), f = Z(), g = Z(), d = Z(), p = Z([]), x = Z(!1);
2256
- function T(w, k) {
2257
- const m = w[k], L = w[k + 1];
2258
- return !L || L.sender !== m.sender;
2259
- }
2260
- h(T, "shouldShowAvatar");
2261
- const _ = H(() => l.chatController?.textState.value), z = H(() => _.value?.isConnected ?? !1), te = H(() => _.value?.isThinking ?? !1), ae = H(() => _.value?.connectionStatus === "disconnected" && !!_.value?.error), J = H(() => _.value?.connectionStatus !== "connected" && !_.value?.error), P = H(() => _.value?.error), W = H(() => l.chatController?.sharedMessages.value ?? []), le = H(() => _.value?.accountGated ?? !1), ne = H(() => !z.value || le.value), Et = H(() => ae.value ? "Agent is offline" : J.value ? "Connecting..." : le.value ? "Resolve the billing issue above to continue" : "Message"), at = H(() => (o.value.trim() || p.value.length > 0) && !ne.value && !x.value), I = H(() => l.variant === "light"), G = H(
2262
- () => I.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2263
- ), xe = H(() => I.value ? "text-theme-300" : "text-white/30");
2264
- Jt(async () => {
2265
- if (l.chatController && !z.value)
2277
+ }, r = [
2278
+ "Brief me on tomorrow",
2279
+ "Triage my inbox",
2280
+ "What's on my plate this week"
2281
+ ], a = H(
2282
+ () => l.starterPrompts ?? r
2283
+ ), o = H(() => l.setupHint ?? n[l.scope]), c = H(() => {
2284
+ const _ = { ...s[l.scope] };
2285
+ return l.scope === "org" && l.scopeName && (_.label = l.scopeName, _.tooltip = `Visible to ${l.scopeName} members`), _;
2286
+ }), p = K(""), g = K(!1), d = K(), f = K(), m = K(), w = K([]), E = K(!1);
2287
+ function z(_, b) {
2288
+ const x = _[b], L = _[b + 1];
2289
+ return !L || L.sender !== x.sender;
2290
+ }
2291
+ u(z, "shouldShowAvatar");
2292
+ const U = H(() => l.chatController?.textState.value), se = H(() => U.value?.isConnected ?? !1), ie = H(() => U.value?.isThinking ?? !1), O = H(() => U.value?.connectionStatus === "disconnected" && !!U.value?.error), ae = H(() => U.value?.connectionStatus !== "connected" && !U.value?.error), de = H(() => U.value?.error), j = H(() => l.chatController?.sharedMessages.value ?? []), ct = H(() => U.value?.accountGated ?? !1), Ee = H(() => !se.value || ct.value), Ct = H(() => O.value ? "Agent is offline" : ae.value ? "Connecting..." : ct.value ? "Resolve the billing issue above to continue" : "Message"), q = H(() => (p.value.trim() || w.value.length > 0) && !Ee.value && !E.value), R = H(() => l.variant === "light"), _e = H(
2293
+ () => R.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2294
+ ), we = H(() => R.value ? "text-theme-300" : "text-white/30");
2295
+ tn(async () => {
2296
+ if (l.chatController && !se.value)
2266
2297
  try {
2267
2298
  await l.chatController.startTextConversation();
2268
- } catch (w) {
2269
- console.error("Failed to start text conversation:", w);
2299
+ } catch (_) {
2300
+ console.error("Failed to start text conversation:", _);
2270
2301
  }
2271
2302
  });
2272
- function Me() {
2303
+ function Dt() {
2273
2304
  l.chatController?.newConversation();
2274
2305
  }
2275
- h(Me, "startNewConversation");
2276
- async function ye() {
2277
- const w = o.value.trim(), k = p.value.length > 0;
2278
- if (!w && !k || !l.chatController || !z.value || x.value)
2306
+ u(Dt, "startNewConversation");
2307
+ async function We() {
2308
+ const _ = p.value.trim(), b = w.value.length > 0;
2309
+ if (!_ && !b || !l.chatController || !se.value || E.value)
2279
2310
  return;
2280
- const m = o.value, L = k ? [...p.value] : void 0;
2281
- o.value = "", p.value = [], g.value && (g.value.style.height = "auto", g.value.focus());
2311
+ const x = p.value, L = b ? [...w.value] : void 0;
2312
+ p.value = "", w.value = [], f.value && (f.value.style.height = "auto", f.value.focus());
2282
2313
  try {
2283
- await l.chatController.sendChatMessage(m, L), lt();
2284
- } catch (B) {
2285
- console.error("Error sending message:", B);
2314
+ await l.chatController.sendChatMessage(x, L), ht();
2315
+ } catch (V) {
2316
+ console.error("Error sending message:", V);
2286
2317
  }
2287
2318
  }
2288
- h(ye, "sendMessage");
2289
- function _t(w) {
2290
- w.key === "Enter" && !w.shiftKey && (w.preventDefault(), ye());
2319
+ u(We, "sendMessage");
2320
+ function It(_) {
2321
+ Ee.value || (p.value = _, We());
2322
+ }
2323
+ u(It, "sendStarterPrompt");
2324
+ function ut(_) {
2325
+ _.key === "Enter" && !_.shiftKey && (_.preventDefault(), We());
2291
2326
  }
2292
- h(_t, "handleKeydown");
2293
- function lt() {
2294
- f.value && Ft(() => {
2295
- f.value.scrollTop = f.value.scrollHeight;
2327
+ u(ut, "handleKeydown");
2328
+ function ht() {
2329
+ d.value && Gt(() => {
2330
+ d.value.scrollTop = d.value.scrollHeight;
2296
2331
  });
2297
2332
  }
2298
- h(lt, "scrollToBottom");
2299
- function Rt() {
2300
- g.value && (g.value.style.height = "auto", g.value.style.height = `${Math.min(g.value.scrollHeight, 150)}px`);
2333
+ u(ht, "scrollToBottom");
2334
+ function pt() {
2335
+ f.value && (f.value.style.height = "auto", f.value.style.height = `${Math.min(f.value.scrollHeight, 150)}px`);
2301
2336
  }
2302
- h(Rt, "adjustTextareaHeight"), rt(o, () => Ft(() => Rt()));
2303
- function ot() {
2304
- d.value?.click();
2337
+ u(pt, "adjustTextareaHeight"), lt(p, () => Gt(() => pt()));
2338
+ function B() {
2339
+ m.value?.click();
2305
2340
  }
2306
- h(ot, "triggerFileInput");
2307
- async function Ct(w) {
2308
- const k = w.target, m = k.files?.[0];
2309
- if (!(!m || !l.uploadFn)) {
2310
- x.value = !0;
2341
+ u(B, "triggerFileInput");
2342
+ async function dt(_) {
2343
+ const b = _.target, x = b.files?.[0];
2344
+ if (!(!x || !l.uploadFn)) {
2345
+ E.value = !0;
2311
2346
  try {
2312
- const L = await l.uploadFn(m);
2313
- p.value = [...p.value, L];
2347
+ const L = await l.uploadFn(x);
2348
+ w.value = [...w.value, L];
2314
2349
  } catch (L) {
2315
2350
  console.error("Upload failed:", L);
2316
2351
  } finally {
2317
- x.value = !1, k.value = "";
2352
+ E.value = !1, b.value = "";
2318
2353
  }
2319
2354
  }
2320
2355
  }
2321
- h(Ct, "handleFileSelect");
2322
- function ct(w) {
2323
- p.value = p.value.filter((k, m) => m !== w);
2356
+ u(dt, "handleFileSelect");
2357
+ function G(_) {
2358
+ w.value = w.value.filter((b, x) => x !== _);
2324
2359
  }
2325
- h(ct, "removeAttachment");
2326
- function N(w, k) {
2327
- if (k === 0) {
2328
- const Te = w[k];
2329
- return Te?.timestamp ? Ge(new Date(Te.timestamp)) : null;
2360
+ u(G, "removeAttachment");
2361
+ function je(_, b) {
2362
+ if (b === 0) {
2363
+ const oe = _[b];
2364
+ return oe?.timestamp ? P(new Date(oe.timestamp)) : null;
2330
2365
  }
2331
- const m = w[k - 1], L = w[k];
2332
- if (!m?.timestamp || !L?.timestamp) return null;
2333
- const B = new Date(m.timestamp).getTime();
2334
- return new Date(L.timestamp).getTime() - B > 36e5 ? Ge(new Date(L.timestamp)) : null;
2366
+ const x = _[b - 1], L = _[b];
2367
+ if (!x?.timestamp || !L?.timestamp) return null;
2368
+ const V = new Date(x.timestamp).getTime();
2369
+ return new Date(L.timestamp).getTime() - V > 36e5 ? P(new Date(L.timestamp)) : null;
2335
2370
  }
2336
- h(N, "shouldShowTimeDivider");
2337
- function Ge(w) {
2338
- const k = /* @__PURE__ */ new Date(), m = w.toDateString() === k.toDateString(), L = new Date(k);
2371
+ u(je, "shouldShowTimeDivider");
2372
+ function P(_) {
2373
+ const b = /* @__PURE__ */ new Date(), x = _.toDateString() === b.toDateString(), L = new Date(b);
2339
2374
  L.setDate(L.getDate() - 1);
2340
- const B = w.toDateString() === L.toDateString(), V = w.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2341
- if (m) return V;
2342
- if (B) return `Yesterday, ${V}`;
2343
- const We = w.getFullYear() === k.getFullYear();
2344
- return `${w.toLocaleDateString("en-US", {
2375
+ const V = _.toDateString() === L.toDateString(), be = _.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2376
+ if (x) return be;
2377
+ if (V) return `Yesterday, ${be}`;
2378
+ const qe = _.getFullYear() === b.getFullYear();
2379
+ return `${_.toLocaleDateString("en-US", {
2345
2380
  weekday: "long",
2346
2381
  month: "short",
2347
2382
  day: "numeric",
2348
- ...We ? {} : { year: "numeric" }
2349
- })}, ${V}`;
2350
- }
2351
- return h(Ge, "formatTimeDivider"), rt(W, (w) => {
2352
- w.length > 0 && Ft(() => lt());
2353
- }, { immediate: !0, deep: !0 }), (w, k) => (S(), A("div", Zr, [
2354
- I.value ? U("", !0) : (S(), A("div", Xr, [
2355
- Ht(Us, {
2383
+ ...qe ? {} : { year: "numeric" }
2384
+ })}, ${be}`;
2385
+ }
2386
+ return u(P, "formatTimeDivider"), lt(j, (_) => {
2387
+ _.length > 0 && Gt(() => ht());
2388
+ }, { immediate: !0, deep: !0 }), (_, b) => (T(), S("div", Zr, [
2389
+ R.value ? $("", !0) : (T(), S("div", Xr, [
2390
+ Wt(Us, {
2356
2391
  agent: l.agent,
2357
- "is-online": z.value
2392
+ "is-online": se.value
2358
2393
  }, null, 8, ["agent", "is-online"])
2359
2394
  ])),
2360
- ae.value ? (S(), A("div", {
2395
+ O.value ? (T(), S("div", {
2361
2396
  key: 1,
2362
- class: E(["py-16 flex flex-col items-center justify-center gap-3 text-sm", I.value ? "text-theme-400" : "text-white/60"])
2397
+ class: A(["py-16 flex flex-col items-center justify-center gap-3 text-sm", R.value ? "text-theme-400" : "text-white/60"])
2363
2398
  }, [
2364
2399
  v("i", {
2365
- class: E(["i-heroicons-cloud-arrow-down size-8", I.value ? "text-theme-300" : "text-white/40"])
2400
+ class: A(["i-heroicons-cloud-arrow-down size-8", R.value ? "text-theme-300" : "text-white/40"])
2366
2401
  }, null, 2),
2367
- v("span", null, re(P.value), 1)
2368
- ], 2)) : J.value ? (S(), A("div", {
2402
+ v("span", null, ne(de.value), 1)
2403
+ ], 2)) : ae.value ? (T(), S("div", {
2369
2404
  key: 2,
2370
- class: E(["py-16 flex flex-col items-center justify-center gap-2 text-sm", I.value ? "text-theme-400" : "text-theme-600"])
2405
+ class: A(["py-16 flex flex-col items-center justify-center gap-2 text-sm", R.value ? "text-theme-400" : "text-theme-600"])
2371
2406
  }, [
2372
- Ht(Dn, { class: "size-4" })
2373
- ], 2)) : r.value ? (S(), A("div", {
2407
+ Wt(In, { class: "size-4" })
2408
+ ], 2)) : o.value ? (T(), S("div", {
2374
2409
  key: 3,
2375
- class: E(["flex items-center justify-center gap-1.5 py-2 text-[11px]", xe.value])
2410
+ class: A(["flex items-center justify-center gap-1.5 py-2 text-[11px]", we.value])
2376
2411
  }, [
2377
- k[6] || (k[6] = v("i", { class: "i-tabler-tool size-3" }, null, -1)),
2378
- v("span", null, re(r.value), 1)
2379
- ], 2)) : U("", !0),
2412
+ b[6] || (b[6] = v("i", { class: "i-tabler-tool size-3" }, null, -1)),
2413
+ v("span", null, ne(o.value), 1)
2414
+ ], 2)) : $("", !0),
2380
2415
  v("div", {
2381
2416
  ref_key: "messagesContainer",
2382
- ref: f,
2417
+ ref: d,
2383
2418
  class: "flex-1 overflow-y-auto overflow-x-hidden pt-4 pb-[120px] px-3 space-y-1 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
2384
2419
  }, [
2385
- W.value.length === 0 && !J.value && !ae.value ? (S(), A("div", Kr, [
2420
+ j.value.length === 0 && !ae.value && !O.value ? (T(), S("div", Kr, [
2386
2421
  v("div", Qr, [
2387
2422
  v("img", {
2388
2423
  src: l.agent.avatarUrl.value,
2389
2424
  alt: l.agent.displayName.value,
2390
- class: E(["size-full rounded-full object-cover ring-1", I.value ? "ring-black/5" : "ring-white/10"])
2425
+ class: A(["size-full rounded-full object-cover ring-1", R.value ? "ring-black/5" : "ring-white/10"])
2391
2426
  }, null, 10, Jr),
2392
- z.value ? (S(), A("span", {
2427
+ se.value ? (T(), S("span", {
2393
2428
  key: 0,
2394
- class: E(["absolute top-[85%] left-[85%] -translate-x-1/2 -translate-y-1/2 size-[18%] min-w-2.5 min-h-2.5 flex items-center justify-center rounded-full", I.value ? "bg-white" : "bg-theme-900"])
2395
- }, [...k[7] || (k[7] = [
2429
+ class: A(["absolute top-[85%] left-[85%] -translate-x-1/2 -translate-y-1/2 size-[18%] min-w-2.5 min-h-2.5 flex items-center justify-center rounded-full", R.value ? "bg-white" : "bg-theme-900"])
2430
+ }, [...b[7] || (b[7] = [
2396
2431
  v("span", { class: "size-[70%] inline-flex rounded-full bg-emerald-500" }, null, -1)
2397
- ])], 2)) : U("", !0)
2432
+ ])], 2)) : $("", !0)
2398
2433
  ]),
2399
2434
  v("div", {
2400
- class: E(["text-base @sm/chat:text-lg font-semibold", I.value ? "text-theme-900" : "text-white"])
2401
- }, re(l.agent.displayName.value), 3),
2435
+ class: A(["text-base @sm/chat:text-lg font-semibold", R.value ? "text-theme-900" : "text-white"])
2436
+ }, ne(l.agent.displayName.value), 3),
2402
2437
  v("p", {
2403
- class: E(["mt-1 text-center text-xs @sm/chat:text-sm", xe.value])
2404
- }, re(l.emptyStateMessage || "Send a message to get started"), 3),
2438
+ class: A(["mt-1 text-center text-xs @sm/chat:text-sm", we.value])
2439
+ }, ne(l.emptyStateMessage || "Tap a prompt to get started, or type your own."), 3),
2440
+ a.value.length > 0 && !Ee.value ? (T(), S("div", ei, [
2441
+ (T(!0), S(ye, null, rt(a.value, (x) => (T(), S("button", {
2442
+ key: x,
2443
+ type: "button",
2444
+ "data-test": "chat-starter-prompt",
2445
+ class: A(["text-left text-sm rounded-2xl px-4 py-2.5 transition-colors cursor-pointer", R.value ? "bg-theme-25 border border-theme-200 text-theme-700 hover:bg-theme-50 hover:border-theme-300" : "bg-white/5 border border-white/10 text-white/80 hover:bg-white/10 hover:border-white/20"]),
2446
+ onClick: /* @__PURE__ */ u((L) => It(x), "onClick")
2447
+ }, ne(x), 11, ti))), 128))
2448
+ ])) : $("", !0),
2405
2449
  v("div", {
2406
- class: E(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", I.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2407
- title: a.value.tooltip
2450
+ class: A(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", R.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2451
+ title: c.value.tooltip
2408
2452
  }, [
2409
2453
  v("i", {
2410
- class: E([a.value.icon, "size-3"])
2454
+ class: A([c.value.icon, "size-3"])
2411
2455
  }, null, 2),
2412
- v("span", null, re(a.value.label), 1)
2413
- ], 10, ei)
2414
- ])) : U("", !0),
2415
- W.value.length > 0 ? (S(), A("div", ti, [
2456
+ v("span", null, ne(c.value.label), 1)
2457
+ ], 10, ni)
2458
+ ])) : $("", !0),
2459
+ j.value.length > 0 ? (T(), S("div", si, [
2416
2460
  v("button", {
2417
2461
  type: "button",
2418
2462
  "data-test": "chat-new-session",
2419
- class: E(["inline-flex items-center gap-1 text-[11px] rounded-full px-2 py-1 transition-colors", I.value ? "text-theme-400 hover:text-theme-700 hover:bg-theme-50" : "text-white/40 hover:text-white hover:bg-white/5"]),
2420
- onClick: Me
2421
- }, [...k[8] || (k[8] = [
2463
+ class: A(["inline-flex items-center gap-1 text-[11px] rounded-full px-2 py-1 transition-colors", R.value ? "text-theme-400 hover:text-theme-700 hover:bg-theme-50" : "text-white/40 hover:text-white hover:bg-white/5"]),
2464
+ onClick: Dt
2465
+ }, [...b[8] || (b[8] = [
2422
2466
  v("i", { class: "i-tabler-refresh size-3" }, null, -1),
2423
2467
  v("span", null, "New chat", -1)
2424
2468
  ])], 2)
2425
- ])) : U("", !0),
2426
- (S(!0), A(_e, null, bt(W.value, (m, L) => (S(), A(_e, {
2427
- key: m.id
2469
+ ])) : $("", !0),
2470
+ (T(!0), S(ye, null, rt(j.value, (x, L) => (T(), S(ye, {
2471
+ key: x.id
2428
2472
  }, [
2429
- N(W.value, L) ? (S(), A("div", ni, [
2473
+ je(j.value, L) ? (T(), S("div", ri, [
2430
2474
  v("div", {
2431
- class: E(["flex-1 h-px", G.value])
2475
+ class: A(["flex-1 h-px", _e.value])
2432
2476
  }, null, 2),
2433
2477
  v("span", {
2434
- class: E(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", xe.value])
2435
- }, re(N(W.value, L)), 3),
2478
+ class: A(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", we.value])
2479
+ }, ne(je(j.value, L)), 3),
2436
2480
  v("div", {
2437
- class: E(["flex-1 h-px", G.value])
2481
+ class: A(["flex-1 h-px", _e.value])
2438
2482
  }, null, 2)
2439
- ])) : U("", !0),
2440
- m.sender === "system" ? (S(), A("div", {
2483
+ ])) : $("", !0),
2484
+ x.sender === "system" ? (T(), S("div", {
2441
2485
  key: 1,
2442
2486
  "data-test": "messaging-system-msg",
2443
- "data-issue-code": m.issue?.code,
2444
- "data-issue-bucket": m.issue?.bucket,
2445
- class: E(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", I.value ? "text-theme-500" : "text-white/70"])
2487
+ "data-issue-code": x.issue?.code,
2488
+ "data-issue-bucket": x.issue?.bucket,
2489
+ class: A(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", R.value ? "text-theme-500" : "text-white/70"])
2446
2490
  }, [
2447
2491
  v("i", {
2448
- class: E(["i-tabler-alert-circle size-4 mt-0.5 shrink-0", m.issue?.bucket === "account" ? I.value ? "text-amber-500" : "text-amber-300" : I.value ? "text-red-500" : "text-red-300"])
2492
+ class: A(["i-tabler-alert-circle size-4 mt-0.5 shrink-0", x.issue?.bucket === "account" ? R.value ? "text-amber-500" : "text-amber-300" : R.value ? "text-red-500" : "text-red-300"])
2449
2493
  }, null, 2),
2450
- v("div", ri, [
2451
- v("span", null, re(m.text), 1),
2452
- m.issue?.help ? (S(), A("span", {
2494
+ v("div", ai, [
2495
+ v("span", null, ne(x.text), 1),
2496
+ x.issue?.help ? (T(), S("span", {
2453
2497
  key: 0,
2454
- class: E(["text-[12px]", I.value ? "text-theme-400" : "text-white/55"])
2455
- }, re(m.issue.help), 3)) : U("", !0),
2456
- m.issue?.actionUrl ? (S(), A("a", {
2498
+ class: A(["text-[12px]", R.value ? "text-theme-400" : "text-white/55"])
2499
+ }, ne(x.issue.help), 3)) : $("", !0),
2500
+ x.issue?.actionUrl ? (T(), S("a", {
2457
2501
  key: 1,
2458
- href: m.issue.actionUrl,
2502
+ href: x.issue.actionUrl,
2459
2503
  "data-test": "messaging-system-msg-action",
2460
- class: E(["text-[12px] font-medium inline-flex items-center gap-1", I.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"])
2504
+ class: A(["text-[12px] font-medium inline-flex items-center gap-1", R.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"])
2461
2505
  }, [
2462
- Ye(re(m.issue.actionLabel) + " ", 1),
2463
- k[9] || (k[9] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))
2464
- ], 10, ii)) : U("", !0)
2506
+ Xe(ne(x.issue.actionLabel) + " ", 1),
2507
+ b[9] || (b[9] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))
2508
+ ], 10, li)) : $("", !0)
2465
2509
  ])
2466
- ], 10, si)) : (S(), A("div", {
2510
+ ], 10, ii)) : (T(), S("div", {
2467
2511
  key: 2,
2468
- "data-test": m.sender === "agent" ? "messaging-assistant-msg" : m.sender === "user" ? "messaging-user-msg" : void 0,
2469
- class: E(["flex gap-2 items-end", {
2470
- "justify-end": m.sender === "user",
2471
- "justify-start": m.sender === "agent",
2472
- "mb-4": T(W.value, L)
2512
+ "data-test": x.sender === "agent" ? "messaging-assistant-msg" : x.sender === "user" ? "messaging-user-msg" : void 0,
2513
+ class: A(["flex gap-2 items-end", {
2514
+ "justify-end": x.sender === "user",
2515
+ "justify-start": x.sender === "agent",
2516
+ "mb-4": z(j.value, L)
2473
2517
  }])
2474
2518
  }, [
2475
- m.sender === "agent" ? (S(), A("div", li, [
2476
- T(W.value, L) ? (S(), A("img", {
2519
+ x.sender === "agent" ? (T(), S("div", ci, [
2520
+ z(j.value, L) ? (T(), S("img", {
2477
2521
  key: 0,
2478
2522
  src: l.agent.avatarUrl.value,
2479
2523
  alt: l.agent.displayName.value,
2480
- class: E(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", I.value ? "ring-1 ring-black/5" : ""])
2481
- }, null, 10, oi)) : U("", !0)
2482
- ])) : U("", !0),
2524
+ class: A(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", R.value ? "ring-1 ring-black/5" : ""])
2525
+ }, null, 10, ui)) : $("", !0)
2526
+ ])) : $("", !0),
2483
2527
  v("div", {
2484
- class: E(m.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2528
+ class: A(x.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2485
2529
  }, [
2486
- m.attachments?.length ? (S(), A("div", {
2530
+ x.attachments?.length ? (T(), S("div", {
2487
2531
  key: 0,
2488
- class: E(["mb-1 space-y-1", m.sender === "user" ? "flex flex-col items-end" : ""])
2532
+ class: A(["mb-1 space-y-1", x.sender === "user" ? "flex flex-col items-end" : ""])
2489
2533
  }, [
2490
- (S(!0), A(_e, null, bt(m.attachments, (B, V) => (S(), A(_e, { key: V }, [
2491
- B.type === "image" ? (S(), A("img", {
2534
+ (T(!0), S(ye, null, rt(x.attachments, (V, be) => (T(), S(ye, { key: be }, [
2535
+ V.type === "image" ? (T(), S("img", {
2492
2536
  key: 0,
2493
- src: B.url,
2494
- alt: B.name,
2537
+ src: V.url,
2538
+ alt: V.name,
2495
2539
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
2496
- }, null, 8, ci)) : B.type === "audio" ? (S(), A("audio", {
2540
+ }, null, 8, hi)) : V.type === "audio" ? (T(), S("audio", {
2497
2541
  key: 1,
2498
- src: B.url,
2542
+ src: V.url,
2499
2543
  controls: "",
2500
2544
  class: "max-w-full"
2501
- }, null, 8, ui)) : (S(), A("a", {
2545
+ }, null, 8, pi)) : (T(), S("a", {
2502
2546
  key: 2,
2503
- href: B.url,
2547
+ href: V.url,
2504
2548
  target: "_blank",
2505
2549
  rel: "noopener",
2506
- class: E(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", I.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2550
+ class: A(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", R.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2507
2551
  }, [
2508
- k[10] || (k[10] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2509
- Ye(" " + re(B.name), 1)
2510
- ], 10, hi))
2552
+ b[10] || (b[10] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2553
+ Xe(" " + ne(V.name), 1)
2554
+ ], 10, di))
2511
2555
  ], 64))), 128))
2512
- ], 2)) : U("", !0),
2513
- m.text ? (S(), A("div", {
2556
+ ], 2)) : $("", !0),
2557
+ x.text ? (T(), S("div", {
2514
2558
  key: 1,
2515
- class: E(["rounded-2xl px-3.5 py-2", [
2516
- m.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : I.value ? "bg-theme-50 text-theme-800 border border-black/[0.02] rounded-bl-[4px]" : "bg-white/15 backdrop-blur-sm text-white/95 rounded-bl-[4px]"
2559
+ class: A(["rounded-2xl px-3.5 py-2", [
2560
+ x.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : R.value ? "bg-theme-50 text-theme-800 border border-black/[0.02] rounded-bl-[4px]" : "bg-white/15 backdrop-blur-sm text-white/95 rounded-bl-[4px]"
2517
2561
  ]])
2518
2562
  }, [
2519
2563
  v("div", {
2520
- class: E(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", m.sender === "user" || !I.value ? "chat-msg-prose-invert" : ""]),
2521
- innerHTML: e(m.text),
2522
- onClick: k[0] || (k[0] = vs(() => {
2564
+ class: A(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", x.sender === "user" || !R.value ? "chat-msg-prose-invert" : ""]),
2565
+ innerHTML: e(x.text),
2566
+ onClick: b[0] || (b[0] = vs(() => {
2523
2567
  }, ["stop"]))
2524
- }, null, 10, pi)
2525
- ], 2)) : U("", !0)
2568
+ }, null, 10, fi)
2569
+ ], 2)) : $("", !0)
2526
2570
  ], 2)
2527
- ], 10, ai))
2571
+ ], 10, oi))
2528
2572
  ], 64))), 128)),
2529
- te.value ? (S(), A("div", di, [
2573
+ ie.value ? (T(), S("div", gi, [
2530
2574
  v("img", {
2531
2575
  src: l.agent.avatarUrl.value,
2532
2576
  alt: l.agent.displayName.value,
2533
- class: E(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", I.value ? "ring-1 ring-black/5" : ""])
2534
- }, null, 10, fi),
2577
+ class: A(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", R.value ? "ring-1 ring-black/5" : ""])
2578
+ }, null, 10, mi),
2535
2579
  v("div", {
2536
- class: E(["rounded-2xl px-3.5 py-2.5 flex items-center", I.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2580
+ class: A(["rounded-2xl px-3.5 py-2.5 flex items-center", R.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2537
2581
  }, [
2538
2582
  v("i", {
2539
- class: E(["i-svg-spinners-3-dots-bounce size-7", I.value ? "text-theme-400" : "text-white/50"])
2583
+ class: A(["i-svg-spinners-3-dots-bounce size-7", R.value ? "text-theme-400" : "text-white/50"])
2540
2584
  }, null, 2)
2541
2585
  ], 2)
2542
- ])) : U("", !0)
2586
+ ])) : $("", !0)
2543
2587
  ], 512),
2544
2588
  v("div", {
2545
- class: E(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", I.value ? "bg-gradient-to-t from-white via-white/95 to-white/70" : "bg-gradient-to-t from-black/80 via-black/70 to-black/40"])
2589
+ class: A(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", R.value ? "bg-gradient-to-t from-white via-white/95 to-white/70" : "bg-gradient-to-t from-black/80 via-black/70 to-black/40"])
2546
2590
  }, [
2547
- p.value.length > 0 ? (S(), A("div", gi, [
2548
- (S(!0), A(_e, null, bt(p.value, (m, L) => (S(), A("div", {
2591
+ w.value.length > 0 ? (T(), S("div", xi, [
2592
+ (T(!0), S(ye, null, rt(w.value, (x, L) => (T(), S("div", {
2549
2593
  key: L,
2550
2594
  class: "relative shrink-0 group"
2551
2595
  }, [
2552
- m.type === "image" ? (S(), A("img", {
2596
+ x.type === "image" ? (T(), S("img", {
2553
2597
  key: 0,
2554
- src: m.url,
2555
- alt: m.name,
2556
- class: E(["size-14 rounded-xl object-cover border", I.value ? "border-black/10" : "border-white/20"])
2557
- }, null, 10, mi)) : (S(), A("div", {
2598
+ src: x.url,
2599
+ alt: x.name,
2600
+ class: A(["size-14 rounded-xl object-cover border", R.value ? "border-black/10" : "border-white/20"])
2601
+ }, null, 10, bi)) : (T(), S("div", {
2558
2602
  key: 1,
2559
- class: E(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", I.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2603
+ class: A(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", R.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2560
2604
  }, [
2561
- k[11] || (k[11] = v("i", { class: "i-tabler-file size-4" }, null, -1)),
2562
- v("span", xi, re(m.name), 1)
2605
+ b[11] || (b[11] = v("i", { class: "i-tabler-file size-4" }, null, -1)),
2606
+ v("span", ki, ne(x.name), 1)
2563
2607
  ], 2)),
2564
2608
  v("button", {
2565
2609
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
2566
- onClick: /* @__PURE__ */ h((B) => ct(L), "onClick")
2567
- }, [...k[12] || (k[12] = [
2610
+ onClick: /* @__PURE__ */ u((V) => G(L), "onClick")
2611
+ }, [...b[12] || (b[12] = [
2568
2612
  v("i", { class: "i-tabler-x size-3" }, null, -1)
2569
- ])], 8, bi)
2613
+ ])], 8, wi)
2570
2614
  ]))), 128)),
2571
- x.value ? (S(), A("div", ki, [
2572
- Ht(Dn, { class: "size-5" })
2573
- ])) : U("", !0)
2574
- ])) : U("", !0),
2575
- l.uploadFn ? (S(), A("input", {
2615
+ E.value ? (T(), S("div", vi, [
2616
+ Wt(In, { class: "size-5" })
2617
+ ])) : $("", !0)
2618
+ ])) : $("", !0),
2619
+ l.uploadFn ? (T(), S("input", {
2576
2620
  key: 1,
2577
2621
  ref_key: "fileInput",
2578
- ref: d,
2622
+ ref: m,
2579
2623
  type: "file",
2580
2624
  accept: "image/*,audio/*,video/*",
2581
2625
  class: "hidden",
2582
- onChange: Ct
2583
- }, null, 544)) : U("", !0),
2626
+ onChange: dt
2627
+ }, null, 544)) : $("", !0),
2584
2628
  v("div", {
2585
- class: E(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-all duration-300", I.value ? c.value ? "bg-white ring-1 ring-black/10 shadow-[0_4px_16px_rgba(0,0,0,0.06)]" : "bg-theme-50 ring-1 ring-transparent hover:ring-black/5" : c.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
2629
+ class: A(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-all duration-300", R.value ? g.value ? "bg-white ring-1 ring-black/10 shadow-[0_4px_16px_rgba(0,0,0,0.06)]" : "bg-theme-50 ring-1 ring-transparent hover:ring-black/5" : g.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
2586
2630
  }, [
2587
2631
  v("button", {
2588
- class: E(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 ml-0.5 size-9 @sm/chat:size-10", [
2632
+ class: A(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 ml-0.5 size-9 @sm/chat:size-10", [
2589
2633
  l.uploadFn ? "cursor-pointer" : "cursor-default",
2590
- I.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
2591
- x.value ? "opacity-50 pointer-events-none" : ""
2634
+ R.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
2635
+ E.value ? "opacity-50 pointer-events-none" : ""
2592
2636
  ]]),
2593
- disabled: ne.value || x.value || !l.uploadFn,
2594
- onClick: k[1] || (k[1] = (m) => l.uploadFn && ot())
2637
+ disabled: Ee.value || E.value || !l.uploadFn,
2638
+ onClick: b[1] || (b[1] = (x) => l.uploadFn && B())
2595
2639
  }, [
2596
- x.value ? (S(), A("i", vi)) : (S(), A("i", yi))
2597
- ], 10, wi),
2640
+ E.value ? (T(), S("i", Ti)) : (T(), S("i", Si))
2641
+ ], 10, yi),
2598
2642
  Xn(v("textarea", {
2599
2643
  ref_key: "textarea",
2600
- ref: g,
2601
- "onUpdate:modelValue": k[2] || (k[2] = (m) => o.value = m),
2644
+ ref: f,
2645
+ "onUpdate:modelValue": b[2] || (b[2] = (x) => p.value = x),
2602
2646
  "data-test": "messaging-input",
2603
2647
  rows: "1",
2604
2648
  enterkeyhint: "send",
2605
- placeholder: Et.value,
2606
- disabled: ne.value,
2649
+ placeholder: Ct.value,
2650
+ disabled: Ee.value,
2607
2651
  style: { fontSize: "16px", resize: "none" },
2608
- class: E(["flex-1 min-w-0 bg-transparent px-1 py-2 focus:outline-none disabled:opacity-50 overflow-y-auto leading-relaxed [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", I.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2609
- onKeydown: _t,
2610
- onFocus: k[3] || (k[3] = (m) => c.value = !0),
2611
- onBlur: k[4] || (k[4] = (m) => c.value = !1)
2612
- }, null, 42, Ti), [
2613
- [Kn, o.value]
2652
+ class: A(["flex-1 min-w-0 bg-transparent px-1 py-2 focus:outline-none disabled:opacity-50 overflow-y-auto leading-relaxed [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", R.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2653
+ onKeydown: ut,
2654
+ onFocus: b[3] || (b[3] = (x) => g.value = !0),
2655
+ onBlur: b[4] || (b[4] = (x) => g.value = !1)
2656
+ }, null, 42, Ai), [
2657
+ [Kn, p.value]
2614
2658
  ]),
2615
2659
  v("button", {
2616
2660
  "data-test": "messaging-send-btn",
2617
- class: E(["shrink-0 flex items-center justify-center rounded-full transition-all duration-300 mb-0.5 mr-0.5 size-9 @sm/chat:size-10", at.value ? "bg-primary-500 text-white shadow-md hover:scale-105 active:scale-95 cursor-pointer" : I.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
2618
- disabled: !at.value,
2619
- onClick: k[5] || (k[5] = (m) => ye())
2620
- }, [...k[13] || (k[13] = [
2661
+ class: A(["shrink-0 flex items-center justify-center rounded-full transition-all duration-300 mb-0.5 mr-0.5 size-9 @sm/chat:size-10", q.value ? "bg-primary-500 text-white shadow-md hover:scale-105 active:scale-95 cursor-pointer" : R.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
2662
+ disabled: !q.value,
2663
+ onClick: b[5] || (b[5] = (x) => We())
2664
+ }, [...b[13] || (b[13] = [
2621
2665
  v("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2622
- ])], 10, Si)
2666
+ ])], 10, Ei)
2623
2667
  ], 2),
2624
2668
  v("div", {
2625
- class: E(["text-[10px] text-center mt-2.5 select-none opacity-70", I.value ? "text-theme-400" : "text-white/50"])
2669
+ class: A(["text-[10px] text-center mt-2.5 select-none opacity-70", R.value ? "text-theme-400" : "text-white/50"])
2626
2670
  }, [
2627
- k[14] || (k[14] = Ye(" Press ", -1)),
2671
+ b[14] || (b[14] = Xe(" Press ", -1)),
2628
2672
  v("kbd", {
2629
- class: E(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", I.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2673
+ class: A(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", R.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2630
2674
  }, "Enter", 2),
2631
- k[15] || (k[15] = Ye(" to send, ", -1)),
2675
+ b[15] || (b[15] = Xe(" to send, ", -1)),
2632
2676
  v("kbd", {
2633
- class: E(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", I.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2677
+ class: A(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", R.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2634
2678
  }, "Shift+Enter", 2),
2635
- k[16] || (k[16] = Ye(" for new line ", -1))
2679
+ b[16] || (b[16] = Xe(" for new line ", -1))
2636
2680
  ], 2)
2637
2681
  ], 2)
2638
2682
  ]));
2639
2683
  }
2640
- }), Ai = { class: "agent-wrap" }, Ei = {
2684
+ }), _i = { class: "agent-wrap" }, Ri = {
2641
2685
  key: 0,
2642
2686
  class: "flex items-center justify-center h-full"
2643
- }, Ni = /* @__PURE__ */ Ie({
2687
+ }, Ui = /* @__PURE__ */ Me({
2644
2688
  __name: "AgentWrap",
2645
2689
  props: {
2646
2690
  sdk: {},
@@ -2657,8 +2701,8 @@ const Zr = { class: "@container/chat flex flex-col h-full relative" }, Xr = {
2657
2701
  const t = Ss("AgentWrap"), e = l, n = e.sdk || As.getInstance({
2658
2702
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
2659
2703
  ...e.apiBase && { apiBase: e.apiBase }
2660
- }), s = Z(!e.agent), r = ys(e.agent ? new wt({ config: e.agent }) : void 0), a = Z();
2661
- return Jt(async () => {
2704
+ }), s = K(!e.agent), r = ys(e.agent ? new Tt({ config: e.agent }) : void 0), a = K();
2705
+ return tn(async () => {
2662
2706
  if (e.agent) {
2663
2707
  t.debug("Agent provided via props, skipping fetch", {
2664
2708
  agentId: e.agent.agentId,
@@ -2684,7 +2728,7 @@ const Zr = { class: "@container/chat flex flex-col h-full relative" }, Xr = {
2684
2728
  try {
2685
2729
  s.value = !0, t.debug("Fetching public agent", { handle: e.handle });
2686
2730
  const o = await n.getPublicAgent({ handle: e.handle });
2687
- o ? (r.value = new wt({ config: o }), t.debug("Successfully fetched public agent", {
2731
+ o ? (r.value = new Tt({ config: o }), t.debug("Successfully fetched public agent", {
2688
2732
  agentId: o.agentId,
2689
2733
  handle: o.handle
2690
2734
  }), o.agentId && n.track({
@@ -2734,33 +2778,33 @@ const Zr = { class: "@container/chat flex flex-col h-full relative" }, Xr = {
2734
2778
  }
2735
2779
  });
2736
2780
  }
2737
- }), (o, c) => (S(), A("div", Ai, [
2738
- s.value ? (S(), A("div", Ei, [...c[0] || (c[0] = [
2781
+ }), (o, c) => (T(), S("div", _i, [
2782
+ s.value ? (T(), S("div", Ri, [...c[0] || (c[0] = [
2739
2783
  v("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2740
2784
  ])])) : r.value ? Zn(o.$slots, "default", {
2741
2785
  key: 1,
2742
- sdk: Zt(n),
2786
+ sdk: Kt(n),
2743
2787
  agent: r.value,
2744
2788
  context: l.context,
2745
2789
  firstMessage: l.firstMessage,
2746
2790
  buttonText: l.buttonText,
2747
2791
  buttonIcon: l.buttonIcon,
2748
2792
  loading: s.value
2749
- }) : U("", !0)
2793
+ }) : $("", !0)
2750
2794
  ]));
2751
2795
  }
2752
2796
  });
2753
2797
  export {
2754
2798
  Mn as A,
2755
- Ni as _,
2756
- Pi as a,
2757
- zi as b,
2758
- Li as c,
2759
- Oi as d,
2760
- Dn as e,
2799
+ Ui as _,
2800
+ $i as a,
2801
+ Pi as b,
2802
+ Oi as c,
2803
+ Ni as d,
2804
+ In as e,
2761
2805
  Us as f,
2762
- Di as g,
2806
+ Li as g,
2763
2807
  zn as h,
2764
- Mi as p
2808
+ zi as p
2765
2809
  };
2766
2810
  //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang.js.map