@pagelines/sdk 1.0.385 → 1.0.387

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.
Files changed (47) hide show
  1. package/dist/{AgentProvider.vue_vue_type_script_setup_true_lang-5V_TRBPP.js → AgentProvider.vue_vue_type_script_setup_true_lang.js} +889 -1027
  2. package/dist/AgentProvider.vue_vue_type_script_setup_true_lang.js.map +1 -0
  3. package/dist/{AgentWidgetInline-DOoug3lh.js → AgentWidgetInline.js} +3 -3
  4. package/dist/AgentWidgetInline.js.map +1 -0
  5. package/dist/{AgentWidgetModal-C-dDlu8w.js → AgentWidgetModal.js} +4 -4
  6. package/dist/AgentWidgetModal.js.map +1 -0
  7. package/dist/AgentWidgetOnboard.js +5 -0
  8. package/dist/AgentWidgetOnboard.js.map +1 -0
  9. package/dist/{AgentWrap.vue_vue_type_script_setup_true_lang-CHgCPDEe.js → AgentWrap.vue_vue_type_script_setup_true_lang.js} +878 -737
  10. package/dist/AgentWrap.vue_vue_type_script_setup_true_lang.js.map +1 -0
  11. package/dist/{FModal.vue_vue_type_script_setup_true_lang-DI6cyWhd.js → FModal.vue_vue_type_script_setup_true_lang.js} +1 -1
  12. package/dist/FModal.vue_vue_type_script_setup_true_lang.js.map +1 -0
  13. package/dist/agent/ui/ElAuthPanel.vue.d.ts +6 -0
  14. package/dist/agent/ui/ElCreateAgent.vue.d.ts +180 -0
  15. package/dist/agent/ui/ElProvisioningStatus.vue.d.ts +13 -0
  16. package/dist/agent.js +5 -5
  17. package/dist/clients/AgentClient.d.ts +24 -0
  18. package/dist/clients/ChatClient.d.ts +22 -0
  19. package/dist/demo/index.d.ts +2 -1
  20. package/dist/index.d.ts +1 -0
  21. package/dist/index.js +766 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/sdk.js +9 -8
  24. package/dist/sdkClient.d.ts +9 -3
  25. package/dist/sdkClient.js +721 -0
  26. package/dist/sdkClient.js.map +1 -0
  27. package/dist/{socialPlatforms-Ck-b3SnQ.js → socialPlatforms.js} +1 -1
  28. package/dist/socialPlatforms.js.map +1 -0
  29. package/dist/test/agent-client.test.d.ts +4 -0
  30. package/dist/test/chat-authenticated.test.d.ts +1 -0
  31. package/dist/test/derive-mode.test.d.ts +1 -0
  32. package/dist/widget/PLWidget.d.ts +1 -1
  33. package/dist/widget/composables/useWidgetState.d.ts +6 -3
  34. package/dist/widget/index.d.ts +1 -0
  35. package/dist/widget/ui/AgentWidgetOnboard.vue.d.ts +7 -0
  36. package/dist/widget.js +4 -3
  37. package/package.json +1 -1
  38. package/dist/AgentProvider.vue_vue_type_script_setup_true_lang-5V_TRBPP.js.map +0 -1
  39. package/dist/AgentWidgetInline-DOoug3lh.js.map +0 -1
  40. package/dist/AgentWidgetModal-C-dDlu8w.js.map +0 -1
  41. package/dist/AgentWrap.vue_vue_type_script_setup_true_lang-CHgCPDEe.js.map +0 -1
  42. package/dist/FModal.vue_vue_type_script_setup_true_lang-DI6cyWhd.js.map +0 -1
  43. package/dist/index-C9cSPVgs.js +0 -379
  44. package/dist/index-C9cSPVgs.js.map +0 -1
  45. package/dist/sdkClient-6j3pmwVP.js +0 -625
  46. package/dist/sdkClient-6j3pmwVP.js.map +0 -1
  47. package/dist/socialPlatforms-Ck-b3SnQ.js.map +0 -1
@@ -1,22 +1,22 @@
1
- var En = Object.defineProperty;
2
- var ks = (l, t, e) => t in l ? En(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
- var h = (l, t) => En(l, "name", { value: t, configurable: !0 });
4
- var _ = (l, t, e) => ks(l, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as xt, openBlock as A, createElementBlock as E, createElementVNode as w, normalizeClass as T, ref as ne, watch as Wt, unref as jt, Fragment as Le, toDisplayString as ce, computed as Q, onMounted as jn, nextTick as zt, createVNode as Nt, createCommentVNode as q, renderList as Pt, createTextVNode as xs, withDirectives as bs, normalizeStyle as ws, vModelText as ys, shallowRef as vs, renderSlot as Ts } from "vue";
6
- import { SettingsObject as Ss, Agent as dt, getDefaultAvatarUrl as qn, createLogger as As } from "@pagelines/core";
7
- import { P as Es } from "./sdkClient-6j3pmwVP.js";
1
+ var _n = Object.defineProperty;
2
+ var ws = (l, t, e) => t in l ? _n(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
+ var h = (l, t) => _n(l, "name", { value: t, configurable: !0 });
4
+ var R = (l, t, e) => ws(l, typeof t != "symbol" ? t + "" : t, e);
5
+ import { defineComponent as _e, openBlock as v, createElementBlock as y, createElementVNode as w, normalizeClass as T, ref as K, watch as Ke, computed as W, createCommentVNode as H, renderSlot as qn, onMounted as Zt, Fragment as Se, renderList as dt, withDirectives as Vn, vModelText as Yn, unref as jt, toDisplayString as ce, nextTick as Pt, createVNode as $t, createTextVNode as vs, normalizeStyle as ys, shallowRef as Ts } from "vue";
6
+ import { SettingsObject as Ss, Agent as xt, getDefaultAvatarUrl as Zn, createLogger as As } from "@pagelines/core";
7
+ import { P as Es } from "./sdkClient.js";
8
8
  const _s = { class: "spinner max-w-sm" }, Rs = {
9
9
  class: "ring-circular h-full w-full origin-center",
10
10
  viewBox: "25 25 50 50"
11
- }, _n = /* @__PURE__ */ xt({
11
+ }, Rn = /* @__PURE__ */ _e({
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) => (A(), E("div", _s, [
19
- (A(), E("svg", Rs, [
18
+ return (t, e) => (v(), y("div", _s, [
19
+ (v(), y("svg", Rs, [
20
20
  w("circle", {
21
21
  class: T([l.colorMode, "ring-path"]),
22
22
  cx: "50",
@@ -30,24 +30,24 @@ const _s = { class: "spinner max-w-sm" }, Rs = {
30
30
  ]))
31
31
  ]));
32
32
  }
33
- }), rn = class rn extends Ss {
33
+ }), an = class an extends Ss {
34
34
  constructor(e) {
35
35
  super("AgentChatController", e);
36
- _(this, "isTextMode", !1);
37
- _(this, "lastMessage", { hash: "", time: 0 });
38
- _(this, "isConnecting", !1);
36
+ R(this, "isTextMode", !1);
37
+ R(this, "lastMessage", { hash: "", time: 0 });
38
+ R(this, "isConnecting", !1);
39
39
  // Chat conversation tracking (server-managed persistence)
40
- _(this, "conversationId");
41
- _(this, "textState", ne({
40
+ R(this, "conversationId");
41
+ R(this, "textState", K({
42
42
  isActive: !1,
43
43
  isConnected: !1,
44
44
  isThinking: !1,
45
45
  connectionStatus: "disconnected"
46
46
  }));
47
- _(this, "agentMode", ne("self"));
48
- _(this, "sharedMessages", ne([]));
49
- _(this, "_agent");
50
- this._agent = e.agent instanceof dt ? e.agent : new dt({ config: e.agent }), this.setupModeWatcher();
47
+ R(this, "agentMode", K("self"));
48
+ R(this, "sharedMessages", K([]));
49
+ R(this, "_agent");
50
+ this._agent = e.agent instanceof xt ? e.agent : new xt({ config: e.agent }), this.setupModeWatcher();
51
51
  }
52
52
  get chatEnabled() {
53
53
  return this._agent.chatAvailable.value;
@@ -100,7 +100,7 @@ Current User:
100
100
  });
101
101
  }
102
102
  setupModeWatcher() {
103
- Wt(this.agentMode, async (e, n) => {
103
+ Ke(this.agentMode, async (e, n) => {
104
104
  this.logger.info(`Mode changed from ${n} to ${e}`), this.isTextMode && (n === "talk" || n === "chat") && await this.endConversation();
105
105
  });
106
106
  }
@@ -160,22 +160,22 @@ Current User:
160
160
  return;
161
161
  }
162
162
  this.addMessage(e, "user", n), this.updateState(this.textState, { isThinking: !0 });
163
- const a = `stream-${Date.now()}`, o = /* @__PURE__ */ h((d) => {
163
+ const a = `stream-${Date.now()}`, o = /* @__PURE__ */ h((u) => {
164
164
  this.textState.value.isThinking && (this.updateState(this.textState, { isThinking: !1 }), this.sharedMessages.value = [
165
165
  ...this.sharedMessages.value,
166
166
  { id: a, text: "", sender: "agent", timestamp: /* @__PURE__ */ new Date() }
167
167
  ]);
168
- const m = this.sharedMessages.value, b = m[m.length - 1];
169
- b?.id === a && (b.text += d, this.sharedMessages.value = [...m]);
170
- }, "onDelta"), c = /* @__PURE__ */ h((d) => {
171
- d && (this.conversationId = d), this.updateState(this.textState, { isThinking: !1 });
172
- }, "onDone"), p = /* @__PURE__ */ h((d) => {
173
- const m = this.sharedMessages.value, b = m[m.length - 1];
174
- b?.id === a && !b.text && (this.sharedMessages.value = m.slice(0, -1));
175
- const O = this.mapChatError(d);
176
- this.isTransientError(d) ? (this.addMessage(O, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(O));
177
- }, "onError"), f = /* @__PURE__ */ h((d) => {
178
- this.addMessage(d, "system");
168
+ const g = this.sharedMessages.value, m = g[g.length - 1];
169
+ m?.id === a && (m.text += u, this.sharedMessages.value = [...g]);
170
+ }, "onDelta"), c = /* @__PURE__ */ h((u) => {
171
+ u && (this.conversationId = u), this.updateState(this.textState, { isThinking: !1 });
172
+ }, "onDone"), f = /* @__PURE__ */ h((u) => {
173
+ const g = this.sharedMessages.value, m = g[g.length - 1];
174
+ m?.id === a && !m.text && (this.sharedMessages.value = g.slice(0, -1));
175
+ const S = this.mapChatError(u);
176
+ this.isTransientError(u) ? (this.addMessage(S, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(S));
177
+ }, "onError"), d = /* @__PURE__ */ h((u) => {
178
+ this.addMessage(u, "system");
179
179
  }, "onStatus");
180
180
  try {
181
181
  if (s)
@@ -186,11 +186,11 @@ Current User:
186
186
  history: this.buildHistory(),
187
187
  onDelta: o,
188
188
  onDone: c,
189
- onError: p,
190
- onStatus: f
189
+ onError: f,
190
+ onStatus: d
191
191
  });
192
192
  else {
193
- const { context: d } = this.getDynamicSettings();
193
+ const { context: u } = this.getDynamicSettings();
194
194
  await r.chatStream({
195
195
  handle: this._agent.handle.value,
196
196
  message: e,
@@ -198,15 +198,15 @@ Current User:
198
198
  conversationId: this.conversationId,
199
199
  history: this.buildHistory(),
200
200
  visitorId: r.generateAnonId(),
201
- context: d || void 0,
201
+ context: u || void 0,
202
202
  onDelta: o,
203
203
  onDone: c,
204
- onError: p,
205
- onStatus: f
204
+ onError: f,
205
+ onStatus: d
206
206
  });
207
207
  }
208
- } catch (d) {
209
- this.handleError(d);
208
+ } catch (u) {
209
+ this.handleError(u);
210
210
  }
211
211
  }
212
212
  buildHistory() {
@@ -226,30 +226,168 @@ Current User:
226
226
  await this.endConversation();
227
227
  }
228
228
  };
229
- h(rn, "AgentChatController");
230
- let Rn = rn;
231
- function Dn(l) {
229
+ h(an, "AgentChatController");
230
+ let Dn = an;
231
+ function Cn(l) {
232
232
  return l ? typeof l == "string" ? l : l.src || "" : "";
233
233
  }
234
- h(Dn, "getImageSrc");
235
- function Si(l) {
236
- return Dn(l.cover) || Dn(l.avatar) || qn(l.name);
234
+ h(Cn, "getImageSrc");
235
+ function Ri(l) {
236
+ return Cn(l.cover) || Cn(l.avatar) || Zn(l.name);
237
237
  }
238
- h(Si, "getAgentAvatarUrl");
239
- function Cn(l) {
238
+ h(Ri, "getAgentAvatarUrl");
239
+ function In(l) {
240
240
  const t = l.target;
241
- t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = qn());
241
+ t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = Zn());
242
242
  }
243
- h(Cn, "handleImageError");
244
- function Ai(l) {
243
+ h(In, "handleImageError");
244
+ function Di(l) {
245
245
  const { template: t, agent: e } = l;
246
246
  return t.replace(/{name}/g, e.name || "Digital Agent").replace(/{title}/g, e.title || "").replace(/{handle}/g, e.handle || "").replace(/{orgName}/g, e.org?.name || "");
247
247
  }
248
- h(Ai, "parseButtonTemplate");
249
- const Ds = { class: "relative flex-shrink-0" }, Cs = ["src", "alt"], Ms = { class: "absolute top-1 right-1" }, Is = {
248
+ h(Di, "parseButtonTemplate");
249
+ const Ds = {
250
+ key: 0,
251
+ class: "absolute inset-0 flex items-center justify-center"
252
+ }, Ci = /* @__PURE__ */ _e({
253
+ __name: "ElAgentButton",
254
+ props: {
255
+ theme: { default: "primary" },
256
+ size: { default: "lg" },
257
+ loading: { type: Boolean, default: !1 },
258
+ icon: {},
259
+ iconAfter: {}
260
+ },
261
+ setup(l) {
262
+ const t = W(() => ({
263
+ primary: "bg-primary-600 border-primary-400 hover:border-primary-300 hover:bg-primary-500",
264
+ green: "bg-green-600 border-green-400 hover:border-green-300 hover:bg-green-500",
265
+ red: "bg-red-600 border-red-400 hover:border-red-300 hover:bg-red-500",
266
+ default: "bg-white/10 border-white/20 hover:border-white/40 hover:bg-white/20"
267
+ })[l.theme]), e = W(() => ({
268
+ sm: "px-4 py-2 text-sm",
269
+ md: "px-6 py-3 text-base",
270
+ lg: "px-8 py-4 text-base"
271
+ })[l.size]), n = W(() => ({
272
+ sm: "size-4",
273
+ md: "size-4",
274
+ lg: "size-5"
275
+ })[l.size]);
276
+ return (s, r) => (v(), y("button", {
277
+ class: T(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, e.value]])
278
+ }, [
279
+ l.loading ? (v(), y("div", Ds, [...r[0] || (r[0] = [
280
+ w("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
281
+ ])])) : H("", !0),
282
+ w("span", {
283
+ class: T(["flex items-center gap-2 transition-opacity duration-200", l.loading ? "opacity-0" : "opacity-100"])
284
+ }, [
285
+ l.icon ? (v(), y("i", {
286
+ key: 0,
287
+ class: T([l.icon, n.value])
288
+ }, null, 2)) : H("", !0),
289
+ qn(s.$slots, "default"),
290
+ l.iconAfter ? (v(), y("i", {
291
+ key: 1,
292
+ class: T([l.iconAfter, n.value])
293
+ }, null, 2)) : H("", !0)
294
+ ], 2)
295
+ ], 2));
296
+ }
297
+ }), Cs = ["value"], Ii = /* @__PURE__ */ _e({
298
+ __name: "AgentInputEmail",
299
+ props: {
300
+ modelValue: { default: "" }
301
+ },
302
+ emits: ["update:modelValue"],
303
+ setup(l, { emit: t }) {
304
+ const e = t;
305
+ return (n, s) => (v(), y("input", {
306
+ type: "email",
307
+ autocomplete: "email",
308
+ placeholder: "Enter Your Email",
309
+ value: l.modelValue,
310
+ class: "w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-all",
311
+ style: { "font-size": "16px" },
312
+ onInput: s[0] || (s[0] = (r) => e("update:modelValue", r.target.value))
313
+ }, null, 40, Cs));
314
+ }
315
+ }), Is = { class: "flex gap-1.5 justify-center" }, Ms = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], Mi = /* @__PURE__ */ _e({
316
+ __name: "AgentInputOneTimeCode",
317
+ props: {
318
+ modelValue: {},
319
+ length: {},
320
+ focusFirst: { type: Boolean }
321
+ },
322
+ emits: ["update:modelValue", "autoSubmit"],
323
+ setup(l, { emit: t }) {
324
+ const e = l, n = t, s = K([]), r = K(Array.from({ length: e.length }).fill("")), a = K(!1);
325
+ Zt(() => {
326
+ e.modelValue && (r.value = e.modelValue.split("").slice(0, e.length)), e.focusFirst && !("ontouchstart" in window) && s.value[0]?.focus();
327
+ }), Ke(() => e.modelValue, (u) => {
328
+ r.value = u ? u.split("").slice(0, e.length) : Array.from({ length: e.length }).fill("");
329
+ }), Ke(r, () => {
330
+ const u = r.value.filter(Boolean).join("");
331
+ n("update:modelValue", u), u.length === e.length && n("autoSubmit", u);
332
+ }, { deep: !0 });
333
+ function o(u, g) {
334
+ g.preventDefault(), a.value = !0;
335
+ const m = (g.clipboardData?.getData("text") || "").replace(/\D/g, "");
336
+ if (m.length === e.length)
337
+ r.value = m.split(""), setTimeout(() => {
338
+ s.value[e.length - 1]?.focus(), a.value = !1;
339
+ }, 10);
340
+ else {
341
+ const S = [...r.value];
342
+ m.split("").slice(0, e.length - u).forEach(($, me) => {
343
+ S[u + me] = $;
344
+ }), r.value = S;
345
+ const D = Math.min(u + m.length, e.length - 1);
346
+ setTimeout(() => {
347
+ s.value[D]?.focus(), a.value = !1;
348
+ }, 10);
349
+ }
350
+ }
351
+ h(o, "onPaste");
352
+ function c(u, g) {
353
+ const m = g.target.value.slice(-1).replace(/\D/g, "");
354
+ r.value[u] = m, m && u < e.length - 1 && s.value[u + 1]?.focus();
355
+ }
356
+ h(c, "onInput");
357
+ function f(u, g) {
358
+ g.key === "Backspace" ? (g.preventDefault(), r.value[u] = "", u > 0 && s.value[u - 1]?.focus()) : g.key === "ArrowLeft" && u > 0 ? s.value[u - 1]?.focus() : g.key === "ArrowRight" && u < e.length - 1 && s.value[u + 1]?.focus();
359
+ }
360
+ h(f, "onKeydown");
361
+ function d(u) {
362
+ if (s.value[u]?.select(), !a.value && r.value[u])
363
+ for (let g = u; g < e.length; g++)
364
+ r.value[g] = "";
365
+ }
366
+ return h(d, "onFocus"), (u, g) => (v(), y("div", Is, [
367
+ (v(!0), y(Se, null, dt(l.length, (m) => Vn((v(), y("input", {
368
+ key: m,
369
+ ref_for: !0,
370
+ ref: /* @__PURE__ */ h((S) => s.value[m - 1] = S, "ref"),
371
+ "onUpdate:modelValue": /* @__PURE__ */ h((S) => r.value[m - 1] = S, "onUpdate:modelValue"),
372
+ type: "text",
373
+ inputmode: "numeric",
374
+ autocomplete: "one-time-code",
375
+ class: "size-11 text-center font-mono text-theme-900 bg-white border border-white rounded-lg focus:outline-none transition-all",
376
+ style: { "font-size": "16px" },
377
+ maxlength: "1",
378
+ onInput: /* @__PURE__ */ h((S) => c(m - 1, S), "onInput"),
379
+ onKeydown: /* @__PURE__ */ h((S) => f(m - 1, S), "onKeydown"),
380
+ onPaste: /* @__PURE__ */ h((S) => o(m - 1, S), "onPaste"),
381
+ onFocus: /* @__PURE__ */ h((S) => d(m - 1), "onFocus")
382
+ }, null, 40, Ms)), [
383
+ [Yn, r.value[m - 1]]
384
+ ])), 128))
385
+ ]));
386
+ }
387
+ }), Ls = { class: "relative flex-shrink-0" }, zs = ["src", "alt"], Os = { class: "absolute top-1 right-1" }, Ns = {
250
388
  key: 1,
251
389
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
252
- }, Ls = { class: "min-w-0" }, Os = /* @__PURE__ */ xt({
390
+ }, Ps = { class: "min-w-0" }, $s = /* @__PURE__ */ _e({
253
391
  __name: "ElModeHeader",
254
392
  props: {
255
393
  agent: {},
@@ -258,12 +396,12 @@ const Ds = { class: "relative flex-shrink-0" }, Cs = ["src", "alt"], Ms = { clas
258
396
  layout: { default: "centered" }
259
397
  },
260
398
  setup(l) {
261
- return (t, e) => (A(), E("div", {
399
+ return (t, e) => (v(), y("div", {
262
400
  class: T(["flex gap-4", [
263
401
  l.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
264
402
  ]])
265
403
  }, [
266
- w("div", Ds, [
404
+ w("div", Ls, [
267
405
  w("div", {
268
406
  class: T(["rounded-full overflow-hidden border-white", l.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
269
407
  }, [
@@ -272,20 +410,20 @@ const Ds = { class: "relative flex-shrink-0" }, Cs = ["src", "alt"], Ms = { clas
272
410
  alt: l.agent.displayName.value,
273
411
  class: "w-full h-full object-cover",
274
412
  onError: e[0] || (e[0] = //@ts-ignore
275
- (...n) => jt(Cn) && jt(Cn)(...n))
276
- }, null, 40, Cs)
413
+ (...n) => jt(In) && jt(In)(...n))
414
+ }, null, 40, zs)
277
415
  ], 2),
278
- w("div", Ms, [
279
- l.isOnline ? (A(), E(Le, { key: 0 }, [
416
+ w("div", Os, [
417
+ l.isOnline ? (v(), y(Se, { key: 0 }, [
280
418
  e[1] || (e[1] = w("div", {
281
419
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
282
420
  style: { "animation-duration": "3s" }
283
421
  }, null, -1)),
284
422
  e[2] || (e[2] = w("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
285
- ], 64)) : (A(), E("div", Is))
423
+ ], 64)) : (v(), y("div", Ns))
286
424
  ])
287
425
  ]),
288
- w("div", Ls, [
426
+ w("div", Ps, [
289
427
  w("h1", {
290
428
  class: T(["font-light text-white mb-1 truncate", [
291
429
  l.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
@@ -303,24 +441,24 @@ const Ds = { class: "relative flex-shrink-0" }, Cs = ["src", "alt"], Ms = { clas
303
441
  }
304
442
  });
305
443
  const {
306
- entries: Yn,
444
+ entries: Xn,
307
445
  setPrototypeOf: Mn,
308
- isFrozen: zs,
309
- getPrototypeOf: Ns,
310
- getOwnPropertyDescriptor: Ps
446
+ isFrozen: Us,
447
+ getPrototypeOf: Bs,
448
+ getOwnPropertyDescriptor: Fs
311
449
  } = Object;
312
450
  let {
313
451
  freeze: Z,
314
- seal: J,
315
- create: pt
452
+ seal: ee,
453
+ create: gt
316
454
  } = Object, {
317
455
  apply: qt,
318
- construct: Yt
456
+ construct: Vt
319
457
  } = typeof Reflect < "u" && Reflect;
320
458
  Z || (Z = /* @__PURE__ */ h(function(t) {
321
459
  return t;
322
460
  }, "freeze"));
323
- J || (J = /* @__PURE__ */ h(function(t) {
461
+ ee || (ee = /* @__PURE__ */ h(function(t) {
324
462
  return t;
325
463
  }, "seal"));
326
464
  qt || (qt = /* @__PURE__ */ h(function(t, e) {
@@ -328,12 +466,12 @@ qt || (qt = /* @__PURE__ */ h(function(t, e) {
328
466
  s[r - 2] = arguments[r];
329
467
  return t.apply(e, s);
330
468
  }, "apply"));
331
- Yt || (Yt = /* @__PURE__ */ h(function(t) {
469
+ Vt || (Vt = /* @__PURE__ */ h(function(t) {
332
470
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), s = 1; s < e; s++)
333
471
  n[s - 1] = arguments[s];
334
472
  return new t(...n);
335
473
  }, "construct"));
336
- const ct = X(Array.prototype.forEach), $s = X(Array.prototype.lastIndexOf), In = X(Array.prototype.pop), Ge = X(Array.prototype.push), Us = X(Array.prototype.splice), ft = X(String.prototype.toLowerCase), $t = X(String.prototype.toString), Ut = X(String.prototype.match), We = X(String.prototype.replace), Bs = X(String.prototype.indexOf), Fs = X(String.prototype.trim), K = X(Object.prototype.hasOwnProperty), j = X(RegExp.prototype.test), je = Hs(TypeError);
474
+ const ht = X(Array.prototype.forEach), Hs = X(Array.prototype.lastIndexOf), Ln = X(Array.prototype.pop), We = X(Array.prototype.push), Gs = X(Array.prototype.splice), mt = X(String.prototype.toLowerCase), Ut = X(String.prototype.toString), Bt = X(String.prototype.match), je = X(String.prototype.replace), Ws = X(String.prototype.indexOf), js = X(String.prototype.trim), J = X(Object.prototype.hasOwnProperty), V = X(RegExp.prototype.test), qe = qs(TypeError);
337
475
  function X(l) {
338
476
  return function(t) {
339
477
  t instanceof RegExp && (t.lastIndex = 0);
@@ -343,78 +481,78 @@ function X(l) {
343
481
  };
344
482
  }
345
483
  h(X, "unapply");
346
- function Hs(l) {
484
+ function qs(l) {
347
485
  return function() {
348
486
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
349
487
  e[n] = arguments[n];
350
- return Yt(l, e);
488
+ return Vt(l, e);
351
489
  };
352
490
  }
353
- h(Hs, "unconstruct");
354
- function S(l, t) {
355
- let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ft;
491
+ h(qs, "unconstruct");
492
+ function _(l, t) {
493
+ let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : mt;
356
494
  Mn && Mn(l, null);
357
495
  let n = t.length;
358
496
  for (; n--; ) {
359
497
  let s = t[n];
360
498
  if (typeof s == "string") {
361
499
  const r = e(s);
362
- r !== s && (zs(t) || (t[n] = r), s = r);
500
+ r !== s && (Us(t) || (t[n] = r), s = r);
363
501
  }
364
502
  l[s] = !0;
365
503
  }
366
504
  return l;
367
505
  }
368
- h(S, "addToSet");
369
- function Gs(l) {
506
+ h(_, "addToSet");
507
+ function Vs(l) {
370
508
  for (let t = 0; t < l.length; t++)
371
- K(l, t) || (l[t] = null);
509
+ J(l, t) || (l[t] = null);
372
510
  return l;
373
511
  }
374
- h(Gs, "cleanArray");
512
+ h(Vs, "cleanArray");
375
513
  function le(l) {
376
- const t = pt(null);
377
- for (const [e, n] of Yn(l))
378
- K(l, e) && (Array.isArray(n) ? t[e] = Gs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = le(n) : t[e] = n);
514
+ const t = gt(null);
515
+ for (const [e, n] of Xn(l))
516
+ J(l, e) && (Array.isArray(n) ? t[e] = Vs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = le(n) : t[e] = n);
379
517
  return t;
380
518
  }
381
519
  h(le, "clone");
382
- function qe(l, t) {
520
+ function Ve(l, t) {
383
521
  for (; l !== null; ) {
384
- const n = Ps(l, t);
522
+ const n = Fs(l, t);
385
523
  if (n) {
386
524
  if (n.get)
387
525
  return X(n.get);
388
526
  if (typeof n.value == "function")
389
527
  return X(n.value);
390
528
  }
391
- l = Ns(l);
529
+ l = Bs(l);
392
530
  }
393
531
  function e() {
394
532
  return null;
395
533
  }
396
534
  return h(e, "fallbackValue"), e;
397
535
  }
398
- h(qe, "lookupGetter");
399
- const Ln = Z(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Bt = Z(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ft = Z(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ws = Z(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Ht = Z(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), js = Z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), On = Z(["#text"]), zn = Z(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Gt = Z(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Nn = Z(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), ut = Z(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), qs = J(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ys = J(/<%[\w\W]*|[\w\W]*%>/gm), Zs = J(/\$\{[\w\W]*/gm), Xs = J(/^data-[\-\w.\u00B7-\uFFFF]+$/), Vs = J(/^aria-[\-\w]+$/), Zn = J(
536
+ h(Ve, "lookupGetter");
537
+ const zn = Z(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Ft = Z(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ht = Z(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ys = Z(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Gt = Z(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Zs = Z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), On = Z(["#text"]), Nn = Z(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Wt = Z(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Pn = Z(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), pt = Z(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Xs = ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Qs = ee(/<%[\w\W]*|[\w\W]*%>/gm), Ks = ee(/\$\{[\w\W]*/gm), Js = ee(/^data-[\-\w.\u00B7-\uFFFF]+$/), er = ee(/^aria-[\-\w]+$/), Qn = ee(
400
538
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
401
539
  // eslint-disable-line no-useless-escape
402
- ), Qs = J(/^(?:\w+script|data):/i), Ks = J(
540
+ ), tr = ee(/^(?:\w+script|data):/i), nr = ee(
403
541
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
404
542
  // eslint-disable-line no-control-regex
405
- ), Xn = J(/^html$/i), Js = J(/^[a-z][.\w]*(-[.\w]+)+$/i);
406
- var Pn = /* @__PURE__ */ Object.freeze({
543
+ ), Kn = ee(/^html$/i), sr = ee(/^[a-z][.\w]*(-[.\w]+)+$/i);
544
+ var $n = /* @__PURE__ */ Object.freeze({
407
545
  __proto__: null,
408
- ARIA_ATTR: Vs,
409
- ATTR_WHITESPACE: Ks,
410
- CUSTOM_ELEMENT: Js,
411
- DATA_ATTR: Xs,
412
- DOCTYPE_NAME: Xn,
413
- ERB_EXPR: Ys,
414
- IS_ALLOWED_URI: Zn,
415
- IS_SCRIPT_OR_DATA: Qs,
416
- MUSTACHE_EXPR: qs,
417
- TMPLIT_EXPR: Zs
546
+ ARIA_ATTR: er,
547
+ ATTR_WHITESPACE: nr,
548
+ CUSTOM_ELEMENT: sr,
549
+ DATA_ATTR: Js,
550
+ DOCTYPE_NAME: Kn,
551
+ ERB_EXPR: Qs,
552
+ IS_ALLOWED_URI: Qn,
553
+ IS_SCRIPT_OR_DATA: tr,
554
+ MUSTACHE_EXPR: Xs,
555
+ TMPLIT_EXPR: Ks
418
556
  });
419
557
  const Ye = {
420
558
  element: 1,
@@ -423,9 +561,9 @@ const Ye = {
423
561
  progressingInstruction: 7,
424
562
  comment: 8,
425
563
  document: 9
426
- }, er = /* @__PURE__ */ h(function() {
564
+ }, rr = /* @__PURE__ */ h(function() {
427
565
  return typeof window > "u" ? null : window;
428
- }, "getGlobal"), tr = /* @__PURE__ */ h(function(t, e) {
566
+ }, "getGlobal"), ir = /* @__PURE__ */ h(function(t, e) {
429
567
  if (typeof t != "object" || typeof t.createPolicy != "function")
430
568
  return null;
431
569
  let n = null;
@@ -444,7 +582,7 @@ const Ye = {
444
582
  } catch {
445
583
  return console.warn("TrustedTypes policy " + r + " could not be created."), null;
446
584
  }
447
- }, "_createTrustedTypesPolicy"), $n = /* @__PURE__ */ h(function() {
585
+ }, "_createTrustedTypesPolicy"), Un = /* @__PURE__ */ h(function() {
448
586
  return {
449
587
  afterSanitizeAttributes: [],
450
588
  afterSanitizeElements: [],
@@ -457,9 +595,9 @@ const Ye = {
457
595
  uponSanitizeShadowNode: []
458
596
  };
459
597
  }, "_createHooksMap");
460
- function Vn() {
461
- let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : er();
462
- const t = /* @__PURE__ */ h((k) => Vn(k), "DOMPurify");
598
+ function Jn() {
599
+ let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : rr();
600
+ const t = /* @__PURE__ */ h((k) => Jn(k), "DOMPurify");
463
601
  if (t.version = "3.3.3", t.removed = [], !l || !l.document || l.document.nodeType !== Ye.document || !l.Element)
464
602
  return t.isSupported = !1, t;
465
603
  let {
@@ -470,44 +608,44 @@ function Vn() {
470
608
  HTMLTemplateElement: a,
471
609
  Node: o,
472
610
  Element: c,
473
- NodeFilter: p,
474
- NamedNodeMap: f = l.NamedNodeMap || l.MozNamedAttrMap,
475
- HTMLFormElement: d,
476
- DOMParser: m,
477
- trustedTypes: b
478
- } = l, O = c.prototype, D = qe(O, "cloneNode"), F = qe(O, "remove"), Ee = qe(O, "nextSibling"), me = qe(O, "childNodes"), ee = qe(O, "parentNode");
611
+ NodeFilter: f,
612
+ NamedNodeMap: d = l.NamedNodeMap || l.MozNamedAttrMap,
613
+ HTMLFormElement: u,
614
+ DOMParser: g,
615
+ trustedTypes: m
616
+ } = l, S = c.prototype, D = Ve(S, "cloneNode"), $ = Ve(S, "remove"), me = Ve(S, "nextSibling"), xe = Ve(S, "childNodes"), te = Ve(S, "parentNode");
479
617
  if (typeof a == "function") {
480
618
  const k = e.createElement("template");
481
619
  k.content && k.content.ownerDocument && (e = k.content.ownerDocument);
482
620
  }
483
- let $, W = "";
621
+ let U, q = "";
484
622
  const {
485
- implementation: te,
623
+ implementation: ne,
486
624
  createNodeIterator: ue,
487
- createDocumentFragment: Ke,
488
- getElementsByTagName: Je
625
+ createDocumentFragment: et,
626
+ getElementsByTagName: tt
489
627
  } = e, {
490
- importNode: yt
628
+ importNode: Tt
491
629
  } = n;
492
- let B = $n();
493
- t.isSupported = typeof Yn == "function" && typeof ee == "function" && te && te.createHTMLDocument !== void 0;
630
+ let F = Un();
631
+ t.isSupported = typeof Xn == "function" && typeof te == "function" && ne && ne.createHTMLDocument !== void 0;
494
632
  const {
495
- MUSTACHE_EXPR: $e,
496
- ERB_EXPR: I,
497
- TMPLIT_EXPR: Ue,
498
- DATA_ATTR: vt,
499
- ARIA_ATTR: Tt,
500
- IS_SCRIPT_OR_DATA: et,
501
- ATTR_WHITESPACE: Be,
502
- CUSTOM_ELEMENT: y
503
- } = Pn;
633
+ MUSTACHE_EXPR: Ue,
634
+ ERB_EXPR: L,
635
+ TMPLIT_EXPR: Be,
636
+ DATA_ATTR: St,
637
+ ARIA_ATTR: At,
638
+ IS_SCRIPT_OR_DATA: nt,
639
+ ATTR_WHITESPACE: Fe,
640
+ CUSTOM_ELEMENT: A
641
+ } = $n;
504
642
  let {
505
- IS_ALLOWED_URI: v
506
- } = Pn, x = null;
507
- const L = S({}, [...Ln, ...Bt, ...Ft, ...Ht, ...On]);
508
- let C = null;
509
- const he = S({}, [...zn, ...Gt, ...Nn, ...ut]);
510
- let z = Object.seal(pt(null, {
643
+ IS_ALLOWED_URI: E
644
+ } = $n, b = null;
645
+ const z = _({}, [...zn, ...Ft, ...Ht, ...Gt, ...On]);
646
+ let I = null;
647
+ const he = _({}, [...Nn, ...Wt, ...Pn, ...pt]);
648
+ let O = Object.seal(gt(null, {
511
649
  tagNameCheck: {
512
650
  writable: !0,
513
651
  configurable: !1,
@@ -526,8 +664,8 @@ function Vn() {
526
664
  enumerable: !0,
527
665
  value: !1
528
666
  }
529
- })), pe = null, tt = null;
530
- const ke = Object.seal(pt(null, {
667
+ })), pe = null, st = null;
668
+ const ke = Object.seal(gt(null, {
531
669
  tagCheck: {
532
670
  writable: !0,
533
671
  configurable: !1,
@@ -541,170 +679,170 @@ function Vn() {
541
679
  value: null
542
680
  }
543
681
  }));
544
- let an = !0, St = !0, ln = !1, on = !0, _e = !1, nt = !0, ye = !1, At = !1, Et = !1, Re = !1, st = !1, rt = !1, cn = !0, un = !1;
545
- const cs = "user-content-";
546
- let _t = !0, Fe = !1, De = {}, ie = null;
547
- const Rt = S({}, ["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"]);
548
- let hn = null;
549
- const pn = S({}, ["audio", "video", "img", "source", "image", "track"]);
550
- let Dt = null;
551
- const fn = S({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), it = "http://www.w3.org/1998/Math/MathML", at = "http://www.w3.org/2000/svg", fe = "http://www.w3.org/1999/xhtml";
552
- let Ce = fe, Ct = !1, Mt = null;
553
- const us = S({}, [it, at, fe], $t);
554
- let lt = S({}, ["mi", "mo", "mn", "ms", "mtext"]), ot = S({}, ["annotation-xml"]);
555
- const hs = S({}, ["title", "style", "font", "a", "script"]);
556
- let He = null;
557
- const ps = ["application/xhtml+xml", "text/html"], fs = "text/html";
558
- let U = null, Me = null;
559
- const ds = e.createElement("form"), dn = /* @__PURE__ */ h(function(i) {
682
+ let ln = !0, Et = !0, on = !1, cn = !0, De = !1, rt = !0, ye = !1, _t = !1, Rt = !1, Ce = !1, it = !1, at = !1, un = !0, hn = !1;
683
+ const ps = "user-content-";
684
+ let Dt = !0, He = !1, Ie = {}, ie = null;
685
+ const Ct = _({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
686
+ let pn = null;
687
+ const fn = _({}, ["audio", "video", "img", "source", "image", "track"]);
688
+ let It = null;
689
+ const dn = _({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), lt = "http://www.w3.org/1998/Math/MathML", ot = "http://www.w3.org/2000/svg", fe = "http://www.w3.org/1999/xhtml";
690
+ let Me = fe, Mt = !1, Lt = null;
691
+ const fs = _({}, [lt, ot, fe], Ut);
692
+ let ct = _({}, ["mi", "mo", "mn", "ms", "mtext"]), ut = _({}, ["annotation-xml"]);
693
+ const ds = _({}, ["title", "style", "font", "a", "script"]);
694
+ let Ge = null;
695
+ const gs = ["application/xhtml+xml", "text/html"], ms = "text/html";
696
+ let B = null, Le = null;
697
+ const xs = e.createElement("form"), gn = /* @__PURE__ */ h(function(i) {
560
698
  return i instanceof RegExp || i instanceof Function;
561
- }, "isRegexOrFunction"), It = /* @__PURE__ */ h(function() {
699
+ }, "isRegexOrFunction"), zt = /* @__PURE__ */ h(function() {
562
700
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
563
- if (!(Me && Me === i)) {
564
- if ((!i || typeof i != "object") && (i = {}), i = le(i), He = // eslint-disable-next-line unicorn/prefer-includes
565
- ps.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? fs : i.PARSER_MEDIA_TYPE, U = He === "application/xhtml+xml" ? $t : ft, x = K(i, "ALLOWED_TAGS") ? S({}, i.ALLOWED_TAGS, U) : L, C = K(i, "ALLOWED_ATTR") ? S({}, i.ALLOWED_ATTR, U) : he, Mt = K(i, "ALLOWED_NAMESPACES") ? S({}, i.ALLOWED_NAMESPACES, $t) : us, Dt = K(i, "ADD_URI_SAFE_ATTR") ? S(le(fn), i.ADD_URI_SAFE_ATTR, U) : fn, hn = K(i, "ADD_DATA_URI_TAGS") ? S(le(pn), i.ADD_DATA_URI_TAGS, U) : pn, ie = K(i, "FORBID_CONTENTS") ? S({}, i.FORBID_CONTENTS, U) : Rt, pe = K(i, "FORBID_TAGS") ? S({}, i.FORBID_TAGS, U) : le({}), tt = K(i, "FORBID_ATTR") ? S({}, i.FORBID_ATTR, U) : le({}), De = K(i, "USE_PROFILES") ? i.USE_PROFILES : !1, an = i.ALLOW_ARIA_ATTR !== !1, St = i.ALLOW_DATA_ATTR !== !1, ln = i.ALLOW_UNKNOWN_PROTOCOLS || !1, on = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, _e = i.SAFE_FOR_TEMPLATES || !1, nt = i.SAFE_FOR_XML !== !1, ye = i.WHOLE_DOCUMENT || !1, Re = i.RETURN_DOM || !1, st = i.RETURN_DOM_FRAGMENT || !1, rt = i.RETURN_TRUSTED_TYPE || !1, Et = i.FORCE_BODY || !1, cn = i.SANITIZE_DOM !== !1, un = i.SANITIZE_NAMED_PROPS || !1, _t = i.KEEP_CONTENT !== !1, Fe = i.IN_PLACE || !1, v = i.ALLOWED_URI_REGEXP || Zn, Ce = i.NAMESPACE || fe, lt = i.MATHML_TEXT_INTEGRATION_POINTS || lt, ot = i.HTML_INTEGRATION_POINTS || ot, z = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && dn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (z.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && dn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (z.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), _e && (St = !1), st && (Re = !0), De && (x = S({}, On), C = pt(null), De.html === !0 && (S(x, Ln), S(C, zn)), De.svg === !0 && (S(x, Bt), S(C, Gt), S(C, ut)), De.svgFilters === !0 && (S(x, Ft), S(C, Gt), S(C, ut)), De.mathMl === !0 && (S(x, Ht), S(C, Nn), S(C, ut))), K(i, "ADD_TAGS") || (ke.tagCheck = null), K(i, "ADD_ATTR") || (ke.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ke.tagCheck = i.ADD_TAGS : (x === L && (x = le(x)), S(x, i.ADD_TAGS, U))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ke.attributeCheck = i.ADD_ATTR : (C === he && (C = le(C)), S(C, i.ADD_ATTR, U))), i.ADD_URI_SAFE_ATTR && S(Dt, i.ADD_URI_SAFE_ATTR, U), i.FORBID_CONTENTS && (ie === Rt && (ie = le(ie)), S(ie, i.FORBID_CONTENTS, U)), i.ADD_FORBID_CONTENTS && (ie === Rt && (ie = le(ie)), S(ie, i.ADD_FORBID_CONTENTS, U)), _t && (x["#text"] = !0), ye && S(x, ["html", "head", "body"]), x.table && (S(x, ["tbody"]), delete pe.tbody), i.TRUSTED_TYPES_POLICY) {
701
+ if (!(Le && Le === i)) {
702
+ if ((!i || typeof i != "object") && (i = {}), i = le(i), Ge = // eslint-disable-next-line unicorn/prefer-includes
703
+ gs.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? ms : i.PARSER_MEDIA_TYPE, B = Ge === "application/xhtml+xml" ? Ut : mt, b = J(i, "ALLOWED_TAGS") ? _({}, i.ALLOWED_TAGS, B) : z, I = J(i, "ALLOWED_ATTR") ? _({}, i.ALLOWED_ATTR, B) : he, Lt = J(i, "ALLOWED_NAMESPACES") ? _({}, i.ALLOWED_NAMESPACES, Ut) : fs, It = J(i, "ADD_URI_SAFE_ATTR") ? _(le(dn), i.ADD_URI_SAFE_ATTR, B) : dn, pn = J(i, "ADD_DATA_URI_TAGS") ? _(le(fn), i.ADD_DATA_URI_TAGS, B) : fn, ie = J(i, "FORBID_CONTENTS") ? _({}, i.FORBID_CONTENTS, B) : Ct, pe = J(i, "FORBID_TAGS") ? _({}, i.FORBID_TAGS, B) : le({}), st = J(i, "FORBID_ATTR") ? _({}, i.FORBID_ATTR, B) : le({}), Ie = J(i, "USE_PROFILES") ? i.USE_PROFILES : !1, ln = i.ALLOW_ARIA_ATTR !== !1, Et = i.ALLOW_DATA_ATTR !== !1, on = i.ALLOW_UNKNOWN_PROTOCOLS || !1, cn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, De = i.SAFE_FOR_TEMPLATES || !1, rt = i.SAFE_FOR_XML !== !1, ye = i.WHOLE_DOCUMENT || !1, Ce = i.RETURN_DOM || !1, it = i.RETURN_DOM_FRAGMENT || !1, at = i.RETURN_TRUSTED_TYPE || !1, Rt = i.FORCE_BODY || !1, un = i.SANITIZE_DOM !== !1, hn = i.SANITIZE_NAMED_PROPS || !1, Dt = i.KEEP_CONTENT !== !1, He = i.IN_PLACE || !1, E = i.ALLOWED_URI_REGEXP || Qn, Me = i.NAMESPACE || fe, ct = i.MATHML_TEXT_INTEGRATION_POINTS || ct, ut = i.HTML_INTEGRATION_POINTS || ut, O = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && gn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (O.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && gn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (O.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (O.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), De && (Et = !1), it && (Ce = !0), Ie && (b = _({}, On), I = gt(null), Ie.html === !0 && (_(b, zn), _(I, Nn)), Ie.svg === !0 && (_(b, Ft), _(I, Wt), _(I, pt)), Ie.svgFilters === !0 && (_(b, Ht), _(I, Wt), _(I, pt)), Ie.mathMl === !0 && (_(b, Gt), _(I, Pn), _(I, pt))), J(i, "ADD_TAGS") || (ke.tagCheck = null), J(i, "ADD_ATTR") || (ke.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ke.tagCheck = i.ADD_TAGS : (b === z && (b = le(b)), _(b, i.ADD_TAGS, B))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ke.attributeCheck = i.ADD_ATTR : (I === he && (I = le(I)), _(I, i.ADD_ATTR, B))), i.ADD_URI_SAFE_ATTR && _(It, i.ADD_URI_SAFE_ATTR, B), i.FORBID_CONTENTS && (ie === Ct && (ie = le(ie)), _(ie, i.FORBID_CONTENTS, B)), i.ADD_FORBID_CONTENTS && (ie === Ct && (ie = le(ie)), _(ie, i.ADD_FORBID_CONTENTS, B)), Dt && (b["#text"] = !0), ye && _(b, ["html", "head", "body"]), b.table && (_(b, ["tbody"]), delete pe.tbody), i.TRUSTED_TYPES_POLICY) {
566
704
  if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
567
- throw je('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
705
+ throw qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
568
706
  if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
569
- throw je('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
570
- $ = i.TRUSTED_TYPES_POLICY, W = $.createHTML("");
707
+ throw qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
708
+ U = i.TRUSTED_TYPES_POLICY, q = U.createHTML("");
571
709
  } else
572
- $ === void 0 && ($ = tr(b, s)), $ !== null && typeof W == "string" && (W = $.createHTML(""));
573
- Z && Z(i), Me = i;
710
+ U === void 0 && (U = ir(m, s)), U !== null && typeof q == "string" && (q = U.createHTML(""));
711
+ Z && Z(i), Le = i;
574
712
  }
575
- }, "_parseConfig"), gn = S({}, [...Bt, ...Ft, ...Ws]), mn = S({}, [...Ht, ...js]), gs = /* @__PURE__ */ h(function(i) {
576
- let u = ee(i);
577
- (!u || !u.tagName) && (u = {
578
- namespaceURI: Ce,
713
+ }, "_parseConfig"), mn = _({}, [...Ft, ...Ht, ...Ys]), xn = _({}, [...Gt, ...Zs]), ks = /* @__PURE__ */ h(function(i) {
714
+ let p = te(i);
715
+ (!p || !p.tagName) && (p = {
716
+ namespaceURI: Me,
579
717
  tagName: "template"
580
718
  });
581
- const g = ft(i.tagName), N = ft(u.tagName);
582
- return Mt[i.namespaceURI] ? i.namespaceURI === at ? u.namespaceURI === fe ? g === "svg" : u.namespaceURI === it ? g === "svg" && (N === "annotation-xml" || lt[N]) : !!gn[g] : i.namespaceURI === it ? u.namespaceURI === fe ? g === "math" : u.namespaceURI === at ? g === "math" && ot[N] : !!mn[g] : i.namespaceURI === fe ? u.namespaceURI === at && !ot[N] || u.namespaceURI === it && !lt[N] ? !1 : !mn[g] && (hs[g] || !gn[g]) : !!(He === "application/xhtml+xml" && Mt[i.namespaceURI]) : !1;
719
+ const x = mt(i.tagName), N = mt(p.tagName);
720
+ return Lt[i.namespaceURI] ? i.namespaceURI === ot ? p.namespaceURI === fe ? x === "svg" : p.namespaceURI === lt ? x === "svg" && (N === "annotation-xml" || ct[N]) : !!mn[x] : i.namespaceURI === lt ? p.namespaceURI === fe ? x === "math" : p.namespaceURI === ot ? x === "math" && ut[N] : !!xn[x] : i.namespaceURI === fe ? p.namespaceURI === ot && !ut[N] || p.namespaceURI === lt && !ct[N] ? !1 : !xn[x] && (ds[x] || !mn[x]) : !!(Ge === "application/xhtml+xml" && Lt[i.namespaceURI]) : !1;
583
721
  }, "_checkValidNamespace"), ae = /* @__PURE__ */ h(function(i) {
584
- Ge(t.removed, {
722
+ We(t.removed, {
585
723
  element: i
586
724
  });
587
725
  try {
588
- ee(i).removeChild(i);
726
+ te(i).removeChild(i);
589
727
  } catch {
590
- F(i);
728
+ $(i);
591
729
  }
592
- }, "_forceRemove"), ve = /* @__PURE__ */ h(function(i, u) {
730
+ }, "_forceRemove"), Te = /* @__PURE__ */ h(function(i, p) {
593
731
  try {
594
- Ge(t.removed, {
595
- attribute: u.getAttributeNode(i),
596
- from: u
732
+ We(t.removed, {
733
+ attribute: p.getAttributeNode(i),
734
+ from: p
597
735
  });
598
736
  } catch {
599
- Ge(t.removed, {
737
+ We(t.removed, {
600
738
  attribute: null,
601
- from: u
739
+ from: p
602
740
  });
603
741
  }
604
- if (u.removeAttribute(i), i === "is")
605
- if (Re || st)
742
+ if (p.removeAttribute(i), i === "is")
743
+ if (Ce || it)
606
744
  try {
607
- ae(u);
745
+ ae(p);
608
746
  } catch {
609
747
  }
610
748
  else
611
749
  try {
612
- u.setAttribute(i, "");
750
+ p.setAttribute(i, "");
613
751
  } catch {
614
752
  }
615
753
  }, "_removeAttribute"), kn = /* @__PURE__ */ h(function(i) {
616
- let u = null, g = null;
617
- if (Et)
754
+ let p = null, x = null;
755
+ if (Rt)
618
756
  i = "<remove></remove>" + i;
619
757
  else {
620
- const P = Ut(i, /^[\r\n\t ]+/);
621
- g = P && P[0];
758
+ const P = Bt(i, /^[\r\n\t ]+/);
759
+ x = P && P[0];
622
760
  }
623
- He === "application/xhtml+xml" && Ce === fe && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
624
- const N = $ ? $.createHTML(i) : i;
625
- if (Ce === fe)
761
+ Ge === "application/xhtml+xml" && Me === fe && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
762
+ const N = U ? U.createHTML(i) : i;
763
+ if (Me === fe)
626
764
  try {
627
- u = new m().parseFromString(N, He);
765
+ p = new g().parseFromString(N, Ge);
628
766
  } catch {
629
767
  }
630
- if (!u || !u.documentElement) {
631
- u = te.createDocument(Ce, "template", null);
768
+ if (!p || !p.documentElement) {
769
+ p = ne.createDocument(Me, "template", null);
632
770
  try {
633
- u.documentElement.innerHTML = Ct ? W : N;
771
+ p.documentElement.innerHTML = Mt ? q : N;
634
772
  } catch {
635
773
  }
636
774
  }
637
- const G = u.body || u.documentElement;
638
- return i && g && G.insertBefore(e.createTextNode(g), G.childNodes[0] || null), Ce === fe ? Je.call(u, ye ? "html" : "body")[0] : ye ? u.documentElement : G;
639
- }, "_initDocument"), xn = /* @__PURE__ */ h(function(i) {
775
+ const j = p.body || p.documentElement;
776
+ return i && x && j.insertBefore(e.createTextNode(x), j.childNodes[0] || null), Me === fe ? tt.call(p, ye ? "html" : "body")[0] : ye ? p.documentElement : j;
777
+ }, "_initDocument"), bn = /* @__PURE__ */ h(function(i) {
640
778
  return ue.call(
641
779
  i.ownerDocument || i,
642
780
  i,
643
781
  // eslint-disable-next-line no-bitwise
644
- p.SHOW_ELEMENT | p.SHOW_COMMENT | p.SHOW_TEXT | p.SHOW_PROCESSING_INSTRUCTION | p.SHOW_CDATA_SECTION,
782
+ f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION,
645
783
  null
646
784
  );
647
- }, "_createNodeIterator"), Lt = /* @__PURE__ */ h(function(i) {
648
- return i instanceof d && (typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || !(i.attributes instanceof f) || typeof i.removeAttribute != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function");
649
- }, "_isClobbered"), bn = /* @__PURE__ */ h(function(i) {
785
+ }, "_createNodeIterator"), Ot = /* @__PURE__ */ h(function(i) {
786
+ return i instanceof u && (typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || !(i.attributes instanceof d) || typeof i.removeAttribute != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function");
787
+ }, "_isClobbered"), wn = /* @__PURE__ */ h(function(i) {
650
788
  return typeof o == "function" && i instanceof o;
651
789
  }, "_isNode");
652
- function de(k, i, u) {
653
- ct(k, (g) => {
654
- g.call(t, i, u, Me);
790
+ function de(k, i, p) {
791
+ ht(k, (x) => {
792
+ x.call(t, i, p, Le);
655
793
  });
656
794
  }
657
795
  h(de, "_executeHooks");
658
- const wn = /* @__PURE__ */ h(function(i) {
659
- let u = null;
660
- if (de(B.beforeSanitizeElements, i, null), Lt(i))
796
+ const vn = /* @__PURE__ */ h(function(i) {
797
+ let p = null;
798
+ if (de(F.beforeSanitizeElements, i, null), Ot(i))
661
799
  return ae(i), !0;
662
- const g = U(i.nodeName);
663
- if (de(B.uponSanitizeElement, i, {
664
- tagName: g,
665
- allowedTags: x
666
- }), nt && i.hasChildNodes() && !bn(i.firstElementChild) && j(/<[/\w!]/g, i.innerHTML) && j(/<[/\w!]/g, i.textContent) || i.nodeType === Ye.progressingInstruction || nt && i.nodeType === Ye.comment && j(/<[/\w]/g, i.data))
800
+ const x = B(i.nodeName);
801
+ if (de(F.uponSanitizeElement, i, {
802
+ tagName: x,
803
+ allowedTags: b
804
+ }), rt && i.hasChildNodes() && !wn(i.firstElementChild) && V(/<[/\w!]/g, i.innerHTML) && V(/<[/\w!]/g, i.textContent) || i.nodeType === Ye.progressingInstruction || rt && i.nodeType === Ye.comment && V(/<[/\w]/g, i.data))
667
805
  return ae(i), !0;
668
- if (!(ke.tagCheck instanceof Function && ke.tagCheck(g)) && (!x[g] || pe[g])) {
669
- if (!pe[g] && vn(g) && (z.tagNameCheck instanceof RegExp && j(z.tagNameCheck, g) || z.tagNameCheck instanceof Function && z.tagNameCheck(g)))
806
+ if (!(ke.tagCheck instanceof Function && ke.tagCheck(x)) && (!b[x] || pe[x])) {
807
+ if (!pe[x] && Tn(x) && (O.tagNameCheck instanceof RegExp && V(O.tagNameCheck, x) || O.tagNameCheck instanceof Function && O.tagNameCheck(x)))
670
808
  return !1;
671
- if (_t && !ie[g]) {
672
- const N = ee(i) || i.parentNode, G = me(i) || i.childNodes;
673
- if (G && N) {
674
- const P = G.length;
675
- for (let V = P - 1; V >= 0; --V) {
676
- const ge = D(G[V], !0);
677
- ge.__removalCount = (i.__removalCount || 0) + 1, N.insertBefore(ge, Ee(i));
809
+ if (Dt && !ie[x]) {
810
+ const N = te(i) || i.parentNode, j = xe(i) || i.childNodes;
811
+ if (j && N) {
812
+ const P = j.length;
813
+ for (let Q = P - 1; Q >= 0; --Q) {
814
+ const ge = D(j[Q], !0);
815
+ ge.__removalCount = (i.__removalCount || 0) + 1, N.insertBefore(ge, me(i));
678
816
  }
679
817
  }
680
818
  }
681
819
  return ae(i), !0;
682
820
  }
683
- return i instanceof c && !gs(i) || (g === "noscript" || g === "noembed" || g === "noframes") && j(/<\/no(script|embed|frames)/i, i.innerHTML) ? (ae(i), !0) : (_e && i.nodeType === Ye.text && (u = i.textContent, ct([$e, I, Ue], (N) => {
684
- u = We(u, N, " ");
685
- }), i.textContent !== u && (Ge(t.removed, {
821
+ return i instanceof c && !ks(i) || (x === "noscript" || x === "noembed" || x === "noframes") && V(/<\/no(script|embed|frames)/i, i.innerHTML) ? (ae(i), !0) : (De && i.nodeType === Ye.text && (p = i.textContent, ht([Ue, L, Be], (N) => {
822
+ p = je(p, N, " ");
823
+ }), i.textContent !== p && (We(t.removed, {
686
824
  element: i.cloneNode()
687
- }), i.textContent = u)), de(B.afterSanitizeElements, i, null), !1);
688
- }, "_sanitizeElements"), yn = /* @__PURE__ */ h(function(i, u, g) {
689
- if (tt[u] || cn && (u === "id" || u === "name") && (g in e || g in ds))
825
+ }), i.textContent = p)), de(F.afterSanitizeElements, i, null), !1);
826
+ }, "_sanitizeElements"), yn = /* @__PURE__ */ h(function(i, p, x) {
827
+ if (st[p] || un && (p === "id" || p === "name") && (x in e || x in xs))
690
828
  return !1;
691
- if (!(St && !tt[u] && j(vt, u))) {
692
- if (!(an && j(Tt, u))) {
693
- if (!(ke.attributeCheck instanceof Function && ke.attributeCheck(u, i))) {
694
- if (!C[u] || tt[u]) {
829
+ if (!(Et && !st[p] && V(St, p))) {
830
+ if (!(ln && V(At, p))) {
831
+ if (!(ke.attributeCheck instanceof Function && ke.attributeCheck(p, i))) {
832
+ if (!I[p] || st[p]) {
695
833
  if (
696
834
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
697
835
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
698
836
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
699
- !(vn(i) && (z.tagNameCheck instanceof RegExp && j(z.tagNameCheck, i) || z.tagNameCheck instanceof Function && z.tagNameCheck(i)) && (z.attributeNameCheck instanceof RegExp && j(z.attributeNameCheck, u) || z.attributeNameCheck instanceof Function && z.attributeNameCheck(u, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
837
+ !(Tn(i) && (O.tagNameCheck instanceof RegExp && V(O.tagNameCheck, i) || O.tagNameCheck instanceof Function && O.tagNameCheck(i)) && (O.attributeNameCheck instanceof RegExp && V(O.attributeNameCheck, p) || O.attributeNameCheck instanceof Function && O.attributeNameCheck(p, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
700
838
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
701
- u === "is" && z.allowCustomizedBuiltInElements && (z.tagNameCheck instanceof RegExp && j(z.tagNameCheck, g) || z.tagNameCheck instanceof Function && z.tagNameCheck(g)))
839
+ p === "is" && O.allowCustomizedBuiltInElements && (O.tagNameCheck instanceof RegExp && V(O.tagNameCheck, x) || O.tagNameCheck instanceof Function && O.tagNameCheck(x)))
702
840
  ) return !1;
703
- } else if (!Dt[u]) {
704
- if (!j(v, We(g, Be, ""))) {
705
- if (!((u === "src" || u === "xlink:href" || u === "href") && i !== "script" && Bs(g, "data:") === 0 && hn[i])) {
706
- if (!(ln && !j(et, We(g, Be, "")))) {
707
- if (g)
841
+ } else if (!It[p]) {
842
+ if (!V(E, je(x, Fe, ""))) {
843
+ if (!((p === "src" || p === "xlink:href" || p === "href") && i !== "script" && Ws(x, "data:") === 0 && pn[i])) {
844
+ if (!(on && !V(nt, je(x, Fe, "")))) {
845
+ if (x)
708
846
  return !1;
709
847
  }
710
848
  }
@@ -714,185 +852,185 @@ function Vn() {
714
852
  }
715
853
  }
716
854
  return !0;
717
- }, "_isValidAttribute"), vn = /* @__PURE__ */ h(function(i) {
718
- return i !== "annotation-xml" && Ut(i, y);
719
- }, "_isBasicCustomElement"), Tn = /* @__PURE__ */ h(function(i) {
720
- de(B.beforeSanitizeAttributes, i, null);
855
+ }, "_isValidAttribute"), Tn = /* @__PURE__ */ h(function(i) {
856
+ return i !== "annotation-xml" && Bt(i, A);
857
+ }, "_isBasicCustomElement"), Sn = /* @__PURE__ */ h(function(i) {
858
+ de(F.beforeSanitizeAttributes, i, null);
721
859
  const {
722
- attributes: u
860
+ attributes: p
723
861
  } = i;
724
- if (!u || Lt(i))
862
+ if (!p || Ot(i))
725
863
  return;
726
- const g = {
864
+ const x = {
727
865
  attrName: "",
728
866
  attrValue: "",
729
867
  keepAttr: !0,
730
- allowedAttributes: C,
868
+ allowedAttributes: I,
731
869
  forceKeepAttr: void 0
732
870
  };
733
- let N = u.length;
871
+ let N = p.length;
734
872
  for (; N--; ) {
735
- const G = u[N], {
873
+ const j = p[N], {
736
874
  name: P,
737
- namespaceURI: V,
875
+ namespaceURI: Q,
738
876
  value: ge
739
- } = G, Ie = U(P), Ot = ge;
740
- let H = P === "value" ? Ot : Fs(Ot);
741
- if (g.attrName = Ie, g.attrValue = H, g.keepAttr = !0, g.forceKeepAttr = void 0, de(B.uponSanitizeAttribute, i, g), H = g.attrValue, un && (Ie === "id" || Ie === "name") && (ve(P, i), H = cs + H), nt && j(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, H)) {
742
- ve(P, i);
877
+ } = j, ze = B(P), Nt = ge;
878
+ let G = P === "value" ? Nt : js(Nt);
879
+ if (x.attrName = ze, x.attrValue = G, x.keepAttr = !0, x.forceKeepAttr = void 0, de(F.uponSanitizeAttribute, i, x), G = x.attrValue, hn && (ze === "id" || ze === "name") && (Te(P, i), G = ps + G), rt && V(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, G)) {
880
+ Te(P, i);
743
881
  continue;
744
882
  }
745
- if (Ie === "attributename" && Ut(H, "href")) {
746
- ve(P, i);
883
+ if (ze === "attributename" && Bt(G, "href")) {
884
+ Te(P, i);
747
885
  continue;
748
886
  }
749
- if (g.forceKeepAttr)
887
+ if (x.forceKeepAttr)
750
888
  continue;
751
- if (!g.keepAttr) {
752
- ve(P, i);
889
+ if (!x.keepAttr) {
890
+ Te(P, i);
753
891
  continue;
754
892
  }
755
- if (!on && j(/\/>/i, H)) {
756
- ve(P, i);
893
+ if (!cn && V(/\/>/i, G)) {
894
+ Te(P, i);
757
895
  continue;
758
896
  }
759
- _e && ct([$e, I, Ue], (An) => {
760
- H = We(H, An, " ");
897
+ De && ht([Ue, L, Be], (En) => {
898
+ G = je(G, En, " ");
761
899
  });
762
- const Sn = U(i.nodeName);
763
- if (!yn(Sn, Ie, H)) {
764
- ve(P, i);
900
+ const An = B(i.nodeName);
901
+ if (!yn(An, ze, G)) {
902
+ Te(P, i);
765
903
  continue;
766
904
  }
767
- if ($ && typeof b == "object" && typeof b.getAttributeType == "function" && !V)
768
- switch (b.getAttributeType(Sn, Ie)) {
905
+ if (U && typeof m == "object" && typeof m.getAttributeType == "function" && !Q)
906
+ switch (m.getAttributeType(An, ze)) {
769
907
  case "TrustedHTML": {
770
- H = $.createHTML(H);
908
+ G = U.createHTML(G);
771
909
  break;
772
910
  }
773
911
  case "TrustedScriptURL": {
774
- H = $.createScriptURL(H);
912
+ G = U.createScriptURL(G);
775
913
  break;
776
914
  }
777
915
  }
778
- if (H !== Ot)
916
+ if (G !== Nt)
779
917
  try {
780
- V ? i.setAttributeNS(V, P, H) : i.setAttribute(P, H), Lt(i) ? ae(i) : In(t.removed);
918
+ Q ? i.setAttributeNS(Q, P, G) : i.setAttribute(P, G), Ot(i) ? ae(i) : Ln(t.removed);
781
919
  } catch {
782
- ve(P, i);
920
+ Te(P, i);
783
921
  }
784
922
  }
785
- de(B.afterSanitizeAttributes, i, null);
786
- }, "_sanitizeAttributes"), ms = /* @__PURE__ */ h(function k(i) {
787
- let u = null;
788
- const g = xn(i);
789
- for (de(B.beforeSanitizeShadowDOM, i, null); u = g.nextNode(); )
790
- de(B.uponSanitizeShadowNode, u, null), wn(u), Tn(u), u.content instanceof r && k(u.content);
791
- de(B.afterSanitizeShadowDOM, i, null);
923
+ de(F.afterSanitizeAttributes, i, null);
924
+ }, "_sanitizeAttributes"), bs = /* @__PURE__ */ h(function k(i) {
925
+ let p = null;
926
+ const x = bn(i);
927
+ for (de(F.beforeSanitizeShadowDOM, i, null); p = x.nextNode(); )
928
+ de(F.uponSanitizeShadowNode, p, null), vn(p), Sn(p), p.content instanceof r && k(p.content);
929
+ de(F.afterSanitizeShadowDOM, i, null);
792
930
  }, "_sanitizeShadowDOM");
793
931
  return t.sanitize = function(k) {
794
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, g = null, N = null, G = null;
795
- if (Ct = !k, Ct && (k = "<!-->"), typeof k != "string" && !bn(k))
932
+ let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, p = null, x = null, N = null, j = null;
933
+ if (Mt = !k, Mt && (k = "<!-->"), typeof k != "string" && !wn(k))
796
934
  if (typeof k.toString == "function") {
797
935
  if (k = k.toString(), typeof k != "string")
798
- throw je("dirty is not a string, aborting");
936
+ throw qe("dirty is not a string, aborting");
799
937
  } else
800
- throw je("toString is not a function");
938
+ throw qe("toString is not a function");
801
939
  if (!t.isSupported)
802
940
  return k;
803
- if (At || It(i), t.removed = [], typeof k == "string" && (Fe = !1), Fe) {
941
+ if (_t || zt(i), t.removed = [], typeof k == "string" && (He = !1), He) {
804
942
  if (k.nodeName) {
805
- const ge = U(k.nodeName);
806
- if (!x[ge] || pe[ge])
807
- throw je("root node is forbidden and cannot be sanitized in-place");
943
+ const ge = B(k.nodeName);
944
+ if (!b[ge] || pe[ge])
945
+ throw qe("root node is forbidden and cannot be sanitized in-place");
808
946
  }
809
947
  } else if (k instanceof o)
810
- u = kn("<!---->"), g = u.ownerDocument.importNode(k, !0), g.nodeType === Ye.element && g.nodeName === "BODY" || g.nodeName === "HTML" ? u = g : u.appendChild(g);
948
+ p = kn("<!---->"), x = p.ownerDocument.importNode(k, !0), x.nodeType === Ye.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? p = x : p.appendChild(x);
811
949
  else {
812
- if (!Re && !_e && !ye && // eslint-disable-next-line unicorn/prefer-includes
950
+ if (!Ce && !De && !ye && // eslint-disable-next-line unicorn/prefer-includes
813
951
  k.indexOf("<") === -1)
814
- return $ && rt ? $.createHTML(k) : k;
815
- if (u = kn(k), !u)
816
- return Re ? null : rt ? W : "";
952
+ return U && at ? U.createHTML(k) : k;
953
+ if (p = kn(k), !p)
954
+ return Ce ? null : at ? q : "";
817
955
  }
818
- u && Et && ae(u.firstChild);
819
- const P = xn(Fe ? k : u);
956
+ p && Rt && ae(p.firstChild);
957
+ const P = bn(He ? k : p);
820
958
  for (; N = P.nextNode(); )
821
- wn(N), Tn(N), N.content instanceof r && ms(N.content);
822
- if (Fe)
959
+ vn(N), Sn(N), N.content instanceof r && bs(N.content);
960
+ if (He)
823
961
  return k;
824
- if (Re) {
825
- if (st)
826
- for (G = Ke.call(u.ownerDocument); u.firstChild; )
827
- G.appendChild(u.firstChild);
962
+ if (Ce) {
963
+ if (it)
964
+ for (j = et.call(p.ownerDocument); p.firstChild; )
965
+ j.appendChild(p.firstChild);
828
966
  else
829
- G = u;
830
- return (C.shadowroot || C.shadowrootmode) && (G = yt.call(n, G, !0)), G;
967
+ j = p;
968
+ return (I.shadowroot || I.shadowrootmode) && (j = Tt.call(n, j, !0)), j;
831
969
  }
832
- let V = ye ? u.outerHTML : u.innerHTML;
833
- return ye && x["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && j(Xn, u.ownerDocument.doctype.name) && (V = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
834
- ` + V), _e && ct([$e, I, Ue], (ge) => {
835
- V = We(V, ge, " ");
836
- }), $ && rt ? $.createHTML(V) : V;
970
+ let Q = ye ? p.outerHTML : p.innerHTML;
971
+ return ye && b["!doctype"] && p.ownerDocument && p.ownerDocument.doctype && p.ownerDocument.doctype.name && V(Kn, p.ownerDocument.doctype.name) && (Q = "<!DOCTYPE " + p.ownerDocument.doctype.name + `>
972
+ ` + Q), De && ht([Ue, L, Be], (ge) => {
973
+ Q = je(Q, ge, " ");
974
+ }), U && at ? U.createHTML(Q) : Q;
837
975
  }, t.setConfig = function() {
838
976
  let k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
839
- It(k), At = !0;
977
+ zt(k), _t = !0;
840
978
  }, t.clearConfig = function() {
841
- Me = null, At = !1;
842
- }, t.isValidAttribute = function(k, i, u) {
843
- Me || It({});
844
- const g = U(k), N = U(i);
845
- return yn(g, N, u);
979
+ Le = null, _t = !1;
980
+ }, t.isValidAttribute = function(k, i, p) {
981
+ Le || zt({});
982
+ const x = B(k), N = B(i);
983
+ return yn(x, N, p);
846
984
  }, t.addHook = function(k, i) {
847
- typeof i == "function" && Ge(B[k], i);
985
+ typeof i == "function" && We(F[k], i);
848
986
  }, t.removeHook = function(k, i) {
849
987
  if (i !== void 0) {
850
- const u = $s(B[k], i);
851
- return u === -1 ? void 0 : Us(B[k], u, 1)[0];
988
+ const p = Hs(F[k], i);
989
+ return p === -1 ? void 0 : Gs(F[k], p, 1)[0];
852
990
  }
853
- return In(B[k]);
991
+ return Ln(F[k]);
854
992
  }, t.removeHooks = function(k) {
855
- B[k] = [];
993
+ F[k] = [];
856
994
  }, t.removeAllHooks = function() {
857
- B = $n();
995
+ F = Un();
858
996
  }, t;
859
997
  }
860
- h(Vn, "createDOMPurify");
861
- var nr = Vn();
998
+ h(Jn, "createDOMPurify");
999
+ var ar = Jn();
862
1000
  function Xt() {
863
1001
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
864
1002
  }
865
1003
  h(Xt, "M");
866
- var Ae = Xt();
867
- function Qn(l) {
868
- Ae = l;
1004
+ var Re = Xt();
1005
+ function es(l) {
1006
+ Re = l;
869
1007
  }
870
- h(Qn, "G");
871
- var Te = { exec: /* @__PURE__ */ h(() => null, "exec") };
872
- function R(l, t = "") {
1008
+ h(es, "G");
1009
+ var Ae = { exec: /* @__PURE__ */ h(() => null, "exec") };
1010
+ function C(l, t = "") {
873
1011
  let e = typeof l == "string" ? l : l.source, n = { replace: /* @__PURE__ */ h((s, r) => {
874
1012
  let a = typeof r == "string" ? r : r.source;
875
1013
  return a = a.replace(Y.caret, "$1"), e = e.replace(s, a), n;
876
1014
  }, "replace"), getRegex: /* @__PURE__ */ h(() => new RegExp(e, t), "getRegex") };
877
1015
  return n;
878
1016
  }
879
- h(R, "k");
880
- var sr = (() => {
1017
+ h(C, "k");
1018
+ var lr = (() => {
881
1019
  try {
882
1020
  return !!new RegExp("(?<=1)(?<!1)");
883
1021
  } catch {
884
1022
  return !1;
885
1023
  }
886
- })(), Y = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ h((l) => new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}>`), "blockquoteBeginRegex") }, rr = /^(?:[ \t]*(?:\n|$))+/, ir = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ar = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Qe = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, lr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Vt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Kn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Jn = R(Kn).replace(/bull/g, Vt).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(), or = R(Kn).replace(/bull/g, Vt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Qt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, cr = /^[^\n]+/, Kt = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ur = R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Kt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), hr = R(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Vt).getRegex(), bt = "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", Jt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, pr = R("^ {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", Jt).replace("tag", bt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), es = R(Qt).replace("hr", Qe).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", bt).getRegex(), fr = R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", es).getRegex(), en = { blockquote: fr, code: ir, def: ur, fences: ar, heading: lr, hr: Qe, html: pr, lheading: Jn, list: hr, newline: rr, paragraph: es, table: Te, text: cr }, Un = R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Qe).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", bt).getRegex(), dr = { ...en, lheading: or, table: Un, paragraph: R(Qt).replace("hr", Qe).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Un).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", bt).getRegex() }, gr = { ...en, html: R(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Jt).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: Te, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: R(Qt).replace("hr", Qe).replace("heading", ` *#{1,6} *[^
887
- ]`).replace("lheading", Jn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, mr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, kr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ts = /^( {2,}|\\)\n(?!\s*$)/, xr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, wt = /[\p{P}\p{S}]/u, tn = /[\s\p{P}\p{S}]/u, ns = /[^\s\p{P}\p{S}]/u, br = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, tn).getRegex(), ss = /(?!~)[\p{P}\p{S}]/u, wr = /(?!~)[\s\p{P}\p{S}]/u, yr = /(?:[^\s\p{P}\p{S}]|~)/u, rs = /(?![*_])[\p{P}\p{S}]/u, vr = /(?![*_])[\s\p{P}\p{S}]/u, Tr = /(?:[^\s\p{P}\p{S}]|[*_])/u, Sr = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", sr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), is = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ar = R(is, "u").replace(/punct/g, wt).getRegex(), Er = R(is, "u").replace(/punct/g, ss).getRegex(), as = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", _r = R(as, "gu").replace(/notPunctSpace/g, ns).replace(/punctSpace/g, tn).replace(/punct/g, wt).getRegex(), Rr = R(as, "gu").replace(/notPunctSpace/g, yr).replace(/punctSpace/g, wr).replace(/punct/g, ss).getRegex(), Dr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ns).replace(/punctSpace/g, tn).replace(/punct/g, wt).getRegex(), Cr = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, rs).getRegex(), Mr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Ir = R(Mr, "gu").replace(/notPunctSpace/g, Tr).replace(/punctSpace/g, vr).replace(/punct/g, rs).getRegex(), Lr = R(/\\(punct)/, "gu").replace(/punct/g, wt).getRegex(), Or = R(/^<(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(), zr = R(Jt).replace("(?:-->|$)", "-->").getRegex(), Nr = R("^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", zr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), gt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Pr = R(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", gt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ls = R(/^!?\[(label)\]\[(ref)\]/).replace("label", gt).replace("ref", Kt).getRegex(), os = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", Kt).getRegex(), $r = R("reflink|nolink(?!\\()", "g").replace("reflink", ls).replace("nolink", os).getRegex(), Bn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, nn = { _backpedal: Te, anyPunctuation: Lr, autolink: Or, blockSkip: Sr, br: ts, code: kr, del: Te, delLDelim: Te, delRDelim: Te, emStrongLDelim: Ar, emStrongRDelimAst: _r, emStrongRDelimUnd: Dr, escape: mr, link: Pr, nolink: os, punctuation: br, reflink: ls, reflinkSearch: $r, tag: Nr, text: xr, url: Te }, Ur = { ...nn, link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", gt).getRegex(), reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", gt).getRegex() }, Zt = { ...nn, emStrongRDelimAst: Rr, emStrongLDelim: Er, delLDelim: Cr, delRDelim: Ir, url: R(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Bn).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: R(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Bn).getRegex() }, Br = { ...Zt, br: R(ts).replace("{2,}", "*").getRegex(), text: R(Zt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ht = { normal: en, gfm: dr, pedantic: gr }, Ze = { normal: nn, gfm: Zt, breaks: Br, pedantic: Ur }, Fr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Fn = /* @__PURE__ */ h((l) => Fr[l], "de");
1024
+ })(), Y = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ h((l) => new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}>`), "blockquoteBeginRegex") }, or = /^(?:[ \t]*(?:\n|$))+/, cr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ur = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Je = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, hr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Qt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ts = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ns = C(ts).replace(/bull/g, Qt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), pr = C(ts).replace(/bull/g, Qt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Kt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, fr = /^[^\n]+/, Jt = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, dr = C(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Jt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), gr = C(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Qt).getRegex(), vt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", en = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, mr = C("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", en).replace("tag", vt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ss = C(Kt).replace("hr", Je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex(), xr = C(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ss).getRegex(), tn = { blockquote: xr, code: cr, def: dr, fences: ur, heading: hr, hr: Je, html: mr, lheading: ns, list: gr, newline: or, paragraph: ss, table: Ae, text: fr }, Bn = C("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex(), kr = { ...tn, lheading: pr, table: Bn, paragraph: C(Kt).replace("hr", Je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Bn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex() }, br = { ...tn, html: C(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", en).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Ae, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: C(Kt).replace("hr", Je).replace("heading", ` *#{1,6} *[^
1025
+ ]`).replace("lheading", ns).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, wr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, vr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, rs = /^( {2,}|\\)\n(?!\s*$)/, yr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, yt = /[\p{P}\p{S}]/u, nn = /[\s\p{P}\p{S}]/u, is = /[^\s\p{P}\p{S}]/u, Tr = C(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, nn).getRegex(), as = /(?!~)[\p{P}\p{S}]/u, Sr = /(?!~)[\s\p{P}\p{S}]/u, Ar = /(?:[^\s\p{P}\p{S}]|~)/u, ls = /(?![*_])[\p{P}\p{S}]/u, Er = /(?![*_])[\s\p{P}\p{S}]/u, _r = /(?:[^\s\p{P}\p{S}]|[*_])/u, Rr = C(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", lr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), os = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Dr = C(os, "u").replace(/punct/g, yt).getRegex(), Cr = C(os, "u").replace(/punct/g, as).getRegex(), cs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ir = C(cs, "gu").replace(/notPunctSpace/g, is).replace(/punctSpace/g, nn).replace(/punct/g, yt).getRegex(), Mr = C(cs, "gu").replace(/notPunctSpace/g, Ar).replace(/punctSpace/g, Sr).replace(/punct/g, as).getRegex(), Lr = C("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, is).replace(/punctSpace/g, nn).replace(/punct/g, yt).getRegex(), zr = C(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, ls).getRegex(), Or = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Nr = C(Or, "gu").replace(/notPunctSpace/g, _r).replace(/punctSpace/g, Er).replace(/punct/g, ls).getRegex(), Pr = C(/\\(punct)/, "gu").replace(/punct/g, yt).getRegex(), $r = C(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Ur = C(en).replace("(?:-->|$)", "-->").getRegex(), Br = C("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ur).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), kt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Fr = C(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", kt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), us = C(/^!?\[(label)\]\[(ref)\]/).replace("label", kt).replace("ref", Jt).getRegex(), hs = C(/^!?\[(ref)\](?:\[\])?/).replace("ref", Jt).getRegex(), Hr = C("reflink|nolink(?!\\()", "g").replace("reflink", us).replace("nolink", hs).getRegex(), Fn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, sn = { _backpedal: Ae, anyPunctuation: Pr, autolink: $r, blockSkip: Rr, br: rs, code: vr, del: Ae, delLDelim: Ae, delRDelim: Ae, emStrongLDelim: Dr, emStrongRDelimAst: Ir, emStrongRDelimUnd: Lr, escape: wr, link: Fr, nolink: hs, punctuation: Tr, reflink: us, reflinkSearch: Hr, tag: Br, text: yr, url: Ae }, Gr = { ...sn, link: C(/^!?\[(label)\]\((.*?)\)/).replace("label", kt).getRegex(), reflink: C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", kt).getRegex() }, Yt = { ...sn, emStrongRDelimAst: Mr, emStrongLDelim: Cr, delLDelim: zr, delRDelim: Nr, url: C(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Fn).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: C(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Fn).getRegex() }, Wr = { ...Yt, br: C(rs).replace("{2,}", "*").getRegex(), text: C(Yt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ft = { normal: tn, gfm: kr, pedantic: br }, Ze = { normal: sn, gfm: Yt, breaks: Wr, pedantic: Gr }, jr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Hn = /* @__PURE__ */ h((l) => jr[l], "de");
888
1026
  function oe(l, t) {
889
1027
  if (t) {
890
- if (Y.escapeTest.test(l)) return l.replace(Y.escapeReplace, Fn);
891
- } else if (Y.escapeTestNoEncode.test(l)) return l.replace(Y.escapeReplaceNoEncode, Fn);
1028
+ if (Y.escapeTest.test(l)) return l.replace(Y.escapeReplace, Hn);
1029
+ } else if (Y.escapeTestNoEncode.test(l)) return l.replace(Y.escapeReplaceNoEncode, Hn);
892
1030
  return l;
893
1031
  }
894
1032
  h(oe, "O");
895
- function Hn(l) {
1033
+ function Gn(l) {
896
1034
  try {
897
1035
  l = encodeURI(l).replace(Y.percentDecode, "%");
898
1036
  } catch {
@@ -900,11 +1038,11 @@ function Hn(l) {
900
1038
  }
901
1039
  return l;
902
1040
  }
903
- h(Hn, "X");
904
- function Gn(l, t) {
1041
+ h(Gn, "X");
1042
+ function Wn(l, t) {
905
1043
  let e = l.replace(Y.findPipe, (r, a, o) => {
906
- let c = !1, p = a;
907
- for (; --p >= 0 && o[p] === "\\"; ) c = !c;
1044
+ let c = !1, f = a;
1045
+ for (; --f >= 0 && o[f] === "\\"; ) c = !c;
908
1046
  return c ? "|" : " |";
909
1047
  }), n = e.split(Y.splitPipe), s = 0;
910
1048
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
@@ -912,7 +1050,7 @@ function Gn(l, t) {
912
1050
  for (; s < n.length; s++) n[s] = n[s].trim().replace(Y.slashPipe, "|");
913
1051
  return n;
914
1052
  }
915
- h(Gn, "J");
1053
+ h(Wn, "J");
916
1054
  function Xe(l, t, e) {
917
1055
  let n = l.length;
918
1056
  if (n === 0) return "";
@@ -922,7 +1060,7 @@ function Xe(l, t, e) {
922
1060
  return l.slice(0, n - s);
923
1061
  }
924
1062
  h(Xe, "E");
925
- function Hr(l, t) {
1063
+ function qr(l, t) {
926
1064
  if (l.indexOf(t[1]) === -1) return -1;
927
1065
  let e = 0;
928
1066
  for (let n = 0; n < l.length; n++) if (l[n] === "\\") n++;
@@ -930,8 +1068,8 @@ function Hr(l, t) {
930
1068
  else if (l[n] === t[1] && (e--, e < 0)) return n;
931
1069
  return e > 0 ? -2 : -1;
932
1070
  }
933
- h(Hr, "ge");
934
- function Gr(l, t = 0) {
1071
+ h(qr, "ge");
1072
+ function Vr(l, t = 0) {
935
1073
  let e = t, n = "";
936
1074
  for (let s of l) if (s === " ") {
937
1075
  let r = 4 - e % 4;
@@ -939,15 +1077,15 @@ function Gr(l, t = 0) {
939
1077
  } else n += s, e++;
940
1078
  return n;
941
1079
  }
942
- h(Gr, "fe");
943
- function Wn(l, t, e, n, s) {
1080
+ h(Vr, "fe");
1081
+ function jn(l, t, e, n, s) {
944
1082
  let r = t.href, a = t.title || null, o = l[1].replace(s.other.outputLinkReplace, "$1");
945
1083
  n.state.inLink = !0;
946
1084
  let c = { type: l[0].charAt(0) === "!" ? "image" : "link", raw: e, href: r, title: a, text: o, tokens: n.inlineTokens(o) };
947
1085
  return n.state.inLink = !1, c;
948
1086
  }
949
- h(Wn, "me");
950
- function Wr(l, t, e) {
1087
+ h(jn, "me");
1088
+ function Yr(l, t, e) {
951
1089
  let n = l.match(e.other.indentCodeCompensation);
952
1090
  if (n === null) return t;
953
1091
  let s = n[1];
@@ -960,13 +1098,13 @@ function Wr(l, t, e) {
960
1098
  }).join(`
961
1099
  `);
962
1100
  }
963
- h(Wr, "it");
964
- var Oe, mt = (Oe = class {
1101
+ h(Yr, "it");
1102
+ var Oe, bt = (Oe = class {
965
1103
  constructor(t) {
966
- _(this, "options");
967
- _(this, "rules");
968
- _(this, "lexer");
969
- this.options = t || Ae;
1104
+ R(this, "options");
1105
+ R(this, "rules");
1106
+ R(this, "lexer");
1107
+ this.options = t || Re;
970
1108
  }
971
1109
  space(t) {
972
1110
  let e = this.rules.block.newline.exec(t);
@@ -983,7 +1121,7 @@ var Oe, mt = (Oe = class {
983
1121
  fences(t) {
984
1122
  let e = this.rules.block.fences.exec(t);
985
1123
  if (e) {
986
- let n = e[0], s = Wr(n, e[3] || "", this.rules);
1124
+ let n = e[0], s = Yr(n, e[3] || "", this.rules);
987
1125
  return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: s };
988
1126
  }
989
1127
  }
@@ -1010,32 +1148,32 @@ var Oe, mt = (Oe = class {
1010
1148
  `).split(`
1011
1149
  `), s = "", r = "", a = [];
1012
1150
  for (; n.length > 0; ) {
1013
- let o = !1, c = [], p;
1014
- for (p = 0; p < n.length; p++) if (this.rules.other.blockquoteStart.test(n[p])) c.push(n[p]), o = !0;
1015
- else if (!o) c.push(n[p]);
1151
+ let o = !1, c = [], f;
1152
+ for (f = 0; f < n.length; f++) if (this.rules.other.blockquoteStart.test(n[f])) c.push(n[f]), o = !0;
1153
+ else if (!o) c.push(n[f]);
1016
1154
  else break;
1017
- n = n.slice(p);
1018
- let f = c.join(`
1019
- `), d = f.replace(this.rules.other.blockquoteSetextReplace, `
1155
+ n = n.slice(f);
1156
+ let d = c.join(`
1157
+ `), u = d.replace(this.rules.other.blockquoteSetextReplace, `
1020
1158
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
1021
1159
  s = s ? `${s}
1022
- ${f}` : f, r = r ? `${r}
1023
- ${d}` : d;
1024
- let m = this.lexer.state.top;
1025
- if (this.lexer.state.top = !0, this.lexer.blockTokens(d, a, !0), this.lexer.state.top = m, n.length === 0) break;
1026
- let b = a.at(-1);
1027
- if (b?.type === "code") break;
1028
- if (b?.type === "blockquote") {
1029
- let O = b, D = O.raw + `
1160
+ ${d}` : d, r = r ? `${r}
1161
+ ${u}` : u;
1162
+ let g = this.lexer.state.top;
1163
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(u, a, !0), this.lexer.state.top = g, n.length === 0) break;
1164
+ let m = a.at(-1);
1165
+ if (m?.type === "code") break;
1166
+ if (m?.type === "blockquote") {
1167
+ let S = m, D = S.raw + `
1030
1168
  ` + n.join(`
1031
- `), F = this.blockquote(D);
1032
- a[a.length - 1] = F, s = s.substring(0, s.length - O.raw.length) + F.raw, r = r.substring(0, r.length - O.text.length) + F.text;
1169
+ `), $ = this.blockquote(D);
1170
+ a[a.length - 1] = $, s = s.substring(0, s.length - S.raw.length) + $.raw, r = r.substring(0, r.length - S.text.length) + $.text;
1033
1171
  break;
1034
- } else if (b?.type === "list") {
1035
- let O = b, D = O.raw + `
1172
+ } else if (m?.type === "list") {
1173
+ let S = m, D = S.raw + `
1036
1174
  ` + n.join(`
1037
- `), F = this.list(D);
1038
- a[a.length - 1] = F, s = s.substring(0, s.length - b.raw.length) + F.raw, r = r.substring(0, r.length - O.raw.length) + F.raw, n = D.substring(a.at(-1).raw.length).split(`
1175
+ `), $ = this.list(D);
1176
+ a[a.length - 1] = $, s = s.substring(0, s.length - m.raw.length) + $.raw, r = r.substring(0, r.length - S.raw.length) + $.raw, n = D.substring(a.at(-1).raw.length).split(`
1039
1177
  `);
1040
1178
  continue;
1041
1179
  }
@@ -1050,59 +1188,59 @@ ${d}` : d;
1050
1188
  n = s ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = s ? n : "[*+-]");
1051
1189
  let a = this.rules.other.listItemRegex(n), o = !1;
1052
1190
  for (; t; ) {
1053
- let p = !1, f = "", d = "";
1191
+ let f = !1, d = "", u = "";
1054
1192
  if (!(e = a.exec(t)) || this.rules.block.hr.test(t)) break;
1055
- f = e[0], t = t.substring(f.length);
1056
- let m = Gr(e[2].split(`
1057
- `, 1)[0], e[1].length), b = t.split(`
1058
- `, 1)[0], O = !m.trim(), D = 0;
1059
- if (this.options.pedantic ? (D = 2, d = m.trimStart()) : O ? D = e[1].length + 1 : (D = m.search(this.rules.other.nonSpaceChar), D = D > 4 ? 1 : D, d = m.slice(D), D += e[1].length), O && this.rules.other.blankLine.test(b) && (f += b + `
1060
- `, t = t.substring(b.length + 1), p = !0), !p) {
1061
- let F = this.rules.other.nextBulletRegex(D), Ee = this.rules.other.hrRegex(D), me = this.rules.other.fencesBeginRegex(D), ee = this.rules.other.headingBeginRegex(D), $ = this.rules.other.htmlBeginRegex(D), W = this.rules.other.blockquoteBeginRegex(D);
1193
+ d = e[0], t = t.substring(d.length);
1194
+ let g = Vr(e[2].split(`
1195
+ `, 1)[0], e[1].length), m = t.split(`
1196
+ `, 1)[0], S = !g.trim(), D = 0;
1197
+ if (this.options.pedantic ? (D = 2, u = g.trimStart()) : S ? D = e[1].length + 1 : (D = g.search(this.rules.other.nonSpaceChar), D = D > 4 ? 1 : D, u = g.slice(D), D += e[1].length), S && this.rules.other.blankLine.test(m) && (d += m + `
1198
+ `, t = t.substring(m.length + 1), f = !0), !f) {
1199
+ let $ = this.rules.other.nextBulletRegex(D), me = this.rules.other.hrRegex(D), xe = this.rules.other.fencesBeginRegex(D), te = this.rules.other.headingBeginRegex(D), U = this.rules.other.htmlBeginRegex(D), q = this.rules.other.blockquoteBeginRegex(D);
1062
1200
  for (; t; ) {
1063
- let te = t.split(`
1201
+ let ne = t.split(`
1064
1202
  `, 1)[0], ue;
1065
- if (b = te, this.options.pedantic ? (b = b.replace(this.rules.other.listReplaceNesting, " "), ue = b) : ue = b.replace(this.rules.other.tabCharGlobal, " "), me.test(b) || ee.test(b) || $.test(b) || W.test(b) || F.test(b) || Ee.test(b)) break;
1066
- if (ue.search(this.rules.other.nonSpaceChar) >= D || !b.trim()) d += `
1203
+ if (m = ne, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), ue = m) : ue = m.replace(this.rules.other.tabCharGlobal, " "), xe.test(m) || te.test(m) || U.test(m) || q.test(m) || $.test(m) || me.test(m)) break;
1204
+ if (ue.search(this.rules.other.nonSpaceChar) >= D || !m.trim()) u += `
1067
1205
  ` + ue.slice(D);
1068
1206
  else {
1069
- if (O || m.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || me.test(m) || ee.test(m) || Ee.test(m)) break;
1070
- d += `
1071
- ` + b;
1207
+ if (S || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || xe.test(g) || te.test(g) || me.test(g)) break;
1208
+ u += `
1209
+ ` + m;
1072
1210
  }
1073
- O = !b.trim(), f += te + `
1074
- `, t = t.substring(te.length + 1), m = ue.slice(D);
1211
+ S = !m.trim(), d += ne + `
1212
+ `, t = t.substring(ne.length + 1), g = ue.slice(D);
1075
1213
  }
1076
1214
  }
1077
- r.loose || (o ? r.loose = !0 : this.rules.other.doubleBlankLine.test(f) && (o = !0)), r.items.push({ type: "list_item", raw: f, task: !!this.options.gfm && this.rules.other.listIsTask.test(d), loose: !1, text: d, tokens: [] }), r.raw += f;
1215
+ r.loose || (o ? r.loose = !0 : this.rules.other.doubleBlankLine.test(d) && (o = !0)), r.items.push({ type: "list_item", raw: d, task: !!this.options.gfm && this.rules.other.listIsTask.test(u), loose: !1, text: u, tokens: [] }), r.raw += d;
1078
1216
  }
1079
1217
  let c = r.items.at(-1);
1080
1218
  if (c) c.raw = c.raw.trimEnd(), c.text = c.text.trimEnd();
1081
1219
  else return;
1082
1220
  r.raw = r.raw.trimEnd();
1083
- for (let p of r.items) {
1084
- if (this.lexer.state.top = !1, p.tokens = this.lexer.blockTokens(p.text, []), p.task) {
1085
- if (p.text = p.text.replace(this.rules.other.listReplaceTask, ""), p.tokens[0]?.type === "text" || p.tokens[0]?.type === "paragraph") {
1086
- 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, "");
1087
- for (let d = this.lexer.inlineQueue.length - 1; d >= 0; d--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)) {
1088
- this.lexer.inlineQueue[d].src = this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask, "");
1221
+ for (let f of r.items) {
1222
+ if (this.lexer.state.top = !1, f.tokens = this.lexer.blockTokens(f.text, []), f.task) {
1223
+ if (f.text = f.text.replace(this.rules.other.listReplaceTask, ""), f.tokens[0]?.type === "text" || f.tokens[0]?.type === "paragraph") {
1224
+ f.tokens[0].raw = f.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), f.tokens[0].text = f.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
1225
+ for (let u = this.lexer.inlineQueue.length - 1; u >= 0; u--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)) {
1226
+ this.lexer.inlineQueue[u].src = this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask, "");
1089
1227
  break;
1090
1228
  }
1091
1229
  }
1092
- let f = this.rules.other.listTaskCheckbox.exec(p.raw);
1093
- if (f) {
1094
- let d = { type: "checkbox", raw: f[0] + " ", checked: f[0] !== "[ ]" };
1095
- 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);
1230
+ let d = this.rules.other.listTaskCheckbox.exec(f.raw);
1231
+ if (d) {
1232
+ let u = { type: "checkbox", raw: d[0] + " ", checked: d[0] !== "[ ]" };
1233
+ f.checked = u.checked, r.loose ? f.tokens[0] && ["paragraph", "text"].includes(f.tokens[0].type) && "tokens" in f.tokens[0] && f.tokens[0].tokens ? (f.tokens[0].raw = u.raw + f.tokens[0].raw, f.tokens[0].text = u.raw + f.tokens[0].text, f.tokens[0].tokens.unshift(u)) : f.tokens.unshift({ type: "paragraph", raw: u.raw, text: u.raw, tokens: [u] }) : f.tokens.unshift(u);
1096
1234
  }
1097
1235
  }
1098
1236
  if (!r.loose) {
1099
- let f = p.tokens.filter((m) => m.type === "space"), d = f.length > 0 && f.some((m) => this.rules.other.anyLine.test(m.raw));
1100
- r.loose = d;
1237
+ let d = f.tokens.filter((g) => g.type === "space"), u = d.length > 0 && d.some((g) => this.rules.other.anyLine.test(g.raw));
1238
+ r.loose = u;
1101
1239
  }
1102
1240
  }
1103
- if (r.loose) for (let p of r.items) {
1104
- p.loose = !0;
1105
- for (let f of p.tokens) f.type === "text" && (f.type = "paragraph");
1241
+ if (r.loose) for (let f of r.items) {
1242
+ f.loose = !0;
1243
+ for (let d of f.tokens) d.type === "text" && (d.type = "paragraph");
1106
1244
  }
1107
1245
  return r;
1108
1246
  }
@@ -1121,12 +1259,12 @@ ${d}` : d;
1121
1259
  table(t) {
1122
1260
  let e = this.rules.block.table.exec(t);
1123
1261
  if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
1124
- let n = Gn(e[1]), s = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), r = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
1262
+ let n = Wn(e[1]), s = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), r = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
1125
1263
  `) : [], a = { type: "table", raw: e[0], header: [], align: [], rows: [] };
1126
1264
  if (n.length === s.length) {
1127
1265
  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);
1128
1266
  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] });
1129
- for (let o of r) a.rows.push(Gn(o, a.header.length).map((c, p) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: a.align[p] })));
1267
+ for (let o of r) a.rows.push(Wn(o, a.header.length).map((c, f) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: a.align[f] })));
1130
1268
  return a;
1131
1269
  }
1132
1270
  }
@@ -1163,7 +1301,7 @@ ${d}` : d;
1163
1301
  let a = Xe(n.slice(0, -1), "\\");
1164
1302
  if ((n.length - a.length) % 2 === 0) return;
1165
1303
  } else {
1166
- let a = Hr(e[2], "()");
1304
+ let a = qr(e[2], "()");
1167
1305
  if (a === -2) return;
1168
1306
  if (a > -1) {
1169
1307
  let o = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + a;
@@ -1175,7 +1313,7 @@ ${d}` : d;
1175
1313
  let a = this.rules.other.pedanticHrefTitle.exec(s);
1176
1314
  a && (s = a[1], r = a[3]);
1177
1315
  } else r = e[3] ? e[3].slice(1, -1) : "";
1178
- return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), Wn(e, { href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), title: r && r.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
1316
+ return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), jn(e, { href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), title: r && r.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
1179
1317
  }
1180
1318
  }
1181
1319
  reflink(t, e) {
@@ -1186,31 +1324,31 @@ ${d}` : d;
1186
1324
  let a = n[0].charAt(0);
1187
1325
  return { type: "text", raw: a, text: a };
1188
1326
  }
1189
- return Wn(n, r, n[0], this.lexer, this.rules);
1327
+ return jn(n, r, n[0], this.lexer, this.rules);
1190
1328
  }
1191
1329
  }
1192
1330
  emStrong(t, e, n = "") {
1193
1331
  let s = this.rules.inline.emStrongLDelim.exec(t);
1194
1332
  if (!(!s || s[3] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(s[1] || s[2]) || !n || this.rules.inline.punctuation.exec(n))) {
1195
- let r = [...s[0]].length - 1, a, o, c = r, p = 0, f = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1196
- for (f.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = f.exec(e)) != null; ) {
1333
+ let r = [...s[0]].length - 1, a, o, c = r, f = 0, d = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1334
+ for (d.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = d.exec(e)) != null; ) {
1197
1335
  if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a) continue;
1198
1336
  if (o = [...a].length, s[3] || s[4]) {
1199
1337
  c += o;
1200
1338
  continue;
1201
1339
  } else if ((s[5] || s[6]) && r % 3 && !((r + o) % 3)) {
1202
- p += o;
1340
+ f += o;
1203
1341
  continue;
1204
1342
  }
1205
1343
  if (c -= o, c > 0) continue;
1206
- o = Math.min(o, o + c + p);
1207
- let d = [...s[0]][0].length, m = t.slice(0, r + s.index + d + o);
1344
+ o = Math.min(o, o + c + f);
1345
+ let u = [...s[0]][0].length, g = t.slice(0, r + s.index + u + o);
1208
1346
  if (Math.min(r, o) % 2) {
1209
- let O = m.slice(1, -1);
1210
- return { type: "em", raw: m, text: O, tokens: this.lexer.inlineTokens(O) };
1347
+ let S = g.slice(1, -1);
1348
+ return { type: "em", raw: g, text: S, tokens: this.lexer.inlineTokens(S) };
1211
1349
  }
1212
- let b = m.slice(2, -2);
1213
- return { type: "strong", raw: m, text: b, tokens: this.lexer.inlineTokens(b) };
1350
+ let m = g.slice(2, -2);
1351
+ return { type: "strong", raw: g, text: m, tokens: this.lexer.inlineTokens(m) };
1214
1352
  }
1215
1353
  }
1216
1354
  }
@@ -1228,8 +1366,8 @@ ${d}` : d;
1228
1366
  del(t, e, n = "") {
1229
1367
  let s = this.rules.inline.delLDelim.exec(t);
1230
1368
  if (s && (!s[1] || !n || this.rules.inline.punctuation.exec(n))) {
1231
- let r = [...s[0]].length - 1, a, o, c = r, p = this.rules.inline.delRDelim;
1232
- for (p.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = p.exec(e)) != null; ) {
1369
+ let r = [...s[0]].length - 1, a, o, c = r, f = this.rules.inline.delRDelim;
1370
+ for (f.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = f.exec(e)) != null; ) {
1233
1371
  if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a || (o = [...a].length, o !== r)) continue;
1234
1372
  if (s[3] || s[4]) {
1235
1373
  c += o;
@@ -1237,8 +1375,8 @@ ${d}` : d;
1237
1375
  }
1238
1376
  if (c -= o, c > 0) continue;
1239
1377
  o = Math.min(o, o + c);
1240
- let f = [...s[0]][0].length, d = t.slice(0, r + s.index + f + o), m = d.slice(r, -r);
1241
- return { type: "del", raw: d, text: m, tokens: this.lexer.inlineTokens(m) };
1378
+ let d = [...s[0]][0].length, u = t.slice(0, r + s.index + d + o), g = u.slice(r, -r);
1379
+ return { type: "del", raw: u, text: g, tokens: this.lexer.inlineTokens(g) };
1242
1380
  }
1243
1381
  }
1244
1382
  }
@@ -1271,25 +1409,25 @@ ${d}` : d;
1271
1409
  return { type: "text", raw: e[0], text: e[0], escaped: n };
1272
1410
  }
1273
1411
  }
1274
- }, h(Oe, "w"), Oe), be, se = (be = class {
1412
+ }, h(Oe, "w"), Oe), we, se = (we = class {
1275
1413
  constructor(t) {
1276
- _(this, "tokens");
1277
- _(this, "options");
1278
- _(this, "state");
1279
- _(this, "inlineQueue");
1280
- _(this, "tokenizer");
1281
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Ae, this.options.tokenizer = this.options.tokenizer || new mt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1282
- let e = { other: Y, block: ht.normal, inline: Ze.normal };
1283
- this.options.pedantic ? (e.block = ht.pedantic, e.inline = Ze.pedantic) : this.options.gfm && (e.block = ht.gfm, this.options.breaks ? e.inline = Ze.breaks : e.inline = Ze.gfm), this.tokenizer.rules = e;
1414
+ R(this, "tokens");
1415
+ R(this, "options");
1416
+ R(this, "state");
1417
+ R(this, "inlineQueue");
1418
+ R(this, "tokenizer");
1419
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Re, this.options.tokenizer = this.options.tokenizer || new bt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1420
+ let e = { other: Y, block: ft.normal, inline: Ze.normal };
1421
+ this.options.pedantic ? (e.block = ft.pedantic, e.inline = Ze.pedantic) : this.options.gfm && (e.block = ft.gfm, this.options.breaks ? e.inline = Ze.breaks : e.inline = Ze.gfm), this.tokenizer.rules = e;
1284
1422
  }
1285
1423
  static get rules() {
1286
- return { block: ht, inline: Ze };
1424
+ return { block: ft, inline: Ze };
1287
1425
  }
1288
1426
  static lex(t, e) {
1289
- return new be(e).lex(t);
1427
+ return new we(e).lex(t);
1290
1428
  }
1291
1429
  static lexInline(t, e) {
1292
- return new be(e).inlineTokens(t);
1430
+ return new we(e).inlineTokens(t);
1293
1431
  }
1294
1432
  lex(t) {
1295
1433
  t = t.replace(Y.carriageReturn, `
@@ -1364,8 +1502,8 @@ ${d}` : d;
1364
1502
  let r = t;
1365
1503
  if (this.options.extensions?.startBlock) {
1366
1504
  let a = 1 / 0, o = t.slice(1), c;
1367
- this.options.extensions.startBlock.forEach((p) => {
1368
- c = p.call({ lexer: this }, o), typeof c == "number" && c >= 0 && (a = Math.min(a, c));
1505
+ this.options.extensions.startBlock.forEach((f) => {
1506
+ c = f.call({ lexer: this }, o), typeof c == "number" && c >= 0 && (a = Math.min(a, c));
1369
1507
  }), a < 1 / 0 && a >= 0 && (r = t.substring(0, a + 1));
1370
1508
  }
1371
1509
  if (this.state.top && (s = this.tokenizer.paragraph(r))) {
@@ -1412,7 +1550,7 @@ ${d}` : d;
1412
1550
  for (; t; ) {
1413
1551
  a || (o = ""), a = !1;
1414
1552
  let c;
1415
- if (this.options.extensions?.inline?.some((f) => (c = f.call({ lexer: this }, t, e)) ? (t = t.substring(c.raw.length), e.push(c), !0) : !1)) continue;
1553
+ if (this.options.extensions?.inline?.some((d) => (c = d.call({ lexer: this }, t, e)) ? (t = t.substring(c.raw.length), e.push(c), !0) : !1)) continue;
1416
1554
  if (c = this.tokenizer.escape(t)) {
1417
1555
  t = t.substring(c.raw.length), e.push(c);
1418
1556
  continue;
@@ -1427,8 +1565,8 @@ ${d}` : d;
1427
1565
  }
1428
1566
  if (c = this.tokenizer.reflink(t, this.tokens.links)) {
1429
1567
  t = t.substring(c.raw.length);
1430
- let f = e.at(-1);
1431
- c.type === "text" && f?.type === "text" ? (f.raw += c.raw, f.text += c.text) : e.push(c);
1568
+ let d = e.at(-1);
1569
+ c.type === "text" && d?.type === "text" ? (d.raw += c.raw, d.text += c.text) : e.push(c);
1432
1570
  continue;
1433
1571
  }
1434
1572
  if (c = this.tokenizer.emStrong(t, n, o)) {
@@ -1455,34 +1593,34 @@ ${d}` : d;
1455
1593
  t = t.substring(c.raw.length), e.push(c);
1456
1594
  continue;
1457
1595
  }
1458
- let p = t;
1596
+ let f = t;
1459
1597
  if (this.options.extensions?.startInline) {
1460
- let f = 1 / 0, d = t.slice(1), m;
1461
- this.options.extensions.startInline.forEach((b) => {
1462
- m = b.call({ lexer: this }, d), typeof m == "number" && m >= 0 && (f = Math.min(f, m));
1463
- }), f < 1 / 0 && f >= 0 && (p = t.substring(0, f + 1));
1598
+ let d = 1 / 0, u = t.slice(1), g;
1599
+ this.options.extensions.startInline.forEach((m) => {
1600
+ g = m.call({ lexer: this }, u), typeof g == "number" && g >= 0 && (d = Math.min(d, g));
1601
+ }), d < 1 / 0 && d >= 0 && (f = t.substring(0, d + 1));
1464
1602
  }
1465
- if (c = this.tokenizer.inlineText(p)) {
1603
+ if (c = this.tokenizer.inlineText(f)) {
1466
1604
  t = t.substring(c.raw.length), c.raw.slice(-1) !== "_" && (o = c.raw.slice(-1)), a = !0;
1467
- let f = e.at(-1);
1468
- f?.type === "text" ? (f.raw += c.raw, f.text += c.text) : e.push(c);
1605
+ let d = e.at(-1);
1606
+ d?.type === "text" ? (d.raw += c.raw, d.text += c.text) : e.push(c);
1469
1607
  continue;
1470
1608
  }
1471
1609
  if (t) {
1472
- let f = "Infinite loop on byte: " + t.charCodeAt(0);
1610
+ let d = "Infinite loop on byte: " + t.charCodeAt(0);
1473
1611
  if (this.options.silent) {
1474
- console.error(f);
1612
+ console.error(d);
1475
1613
  break;
1476
- } else throw new Error(f);
1614
+ } else throw new Error(d);
1477
1615
  }
1478
1616
  }
1479
1617
  return e;
1480
1618
  }
1481
- }, h(be, "u"), be), ze, kt = (ze = class {
1619
+ }, h(we, "u"), we), Ne, wt = (Ne = class {
1482
1620
  constructor(t) {
1483
- _(this, "options");
1484
- _(this, "parser");
1485
- this.options = t || Ae;
1621
+ R(this, "options");
1622
+ R(this, "parser");
1623
+ this.options = t || Re;
1486
1624
  }
1487
1625
  space(t) {
1488
1626
  return "";
@@ -1578,7 +1716,7 @@ ${t}</tr>
1578
1716
  return `<del>${this.parser.parseInline(t)}</del>`;
1579
1717
  }
1580
1718
  link({ href: t, title: e, tokens: n }) {
1581
- let s = this.parser.parseInline(n), r = Hn(t);
1719
+ let s = this.parser.parseInline(n), r = Gn(t);
1582
1720
  if (r === null) return s;
1583
1721
  t = r;
1584
1722
  let a = '<a href="' + t + '"';
@@ -1586,7 +1724,7 @@ ${t}</tr>
1586
1724
  }
1587
1725
  image({ href: t, title: e, text: n, tokens: s }) {
1588
1726
  s && (n = this.parser.parseInline(s, this.parser.textRenderer));
1589
- let r = Hn(t);
1727
+ let r = Gn(t);
1590
1728
  if (r === null) return oe(n);
1591
1729
  t = r;
1592
1730
  let a = `<img src="${t}" alt="${oe(n)}"`;
@@ -1595,7 +1733,7 @@ ${t}</tr>
1595
1733
  text(t) {
1596
1734
  return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : oe(t.text);
1597
1735
  }
1598
- }, h(ze, "y"), ze), Ne, sn = (Ne = class {
1736
+ }, h(Ne, "y"), Ne), Pe, rn = (Pe = class {
1599
1737
  strong({ text: t }) {
1600
1738
  return t;
1601
1739
  }
@@ -1626,18 +1764,18 @@ ${t}</tr>
1626
1764
  checkbox({ raw: t }) {
1627
1765
  return t;
1628
1766
  }
1629
- }, h(Ne, "$"), Ne), we, re = (we = class {
1767
+ }, h(Pe, "$"), Pe), ve, re = (ve = class {
1630
1768
  constructor(t) {
1631
- _(this, "options");
1632
- _(this, "renderer");
1633
- _(this, "textRenderer");
1634
- this.options = t || Ae, this.options.renderer = this.options.renderer || new kt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new sn();
1769
+ R(this, "options");
1770
+ R(this, "renderer");
1771
+ R(this, "textRenderer");
1772
+ this.options = t || Re, this.options.renderer = this.options.renderer || new wt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new rn();
1635
1773
  }
1636
1774
  static parse(t, e) {
1637
- return new we(e).parse(t);
1775
+ return new ve(e).parse(t);
1638
1776
  }
1639
1777
  static parseInline(t, e) {
1640
- return new we(e).parseInline(t);
1778
+ return new ve(e).parseInline(t);
1641
1779
  }
1642
1780
  parse(t) {
1643
1781
  let e = "";
@@ -1775,11 +1913,11 @@ ${t}</tr>
1775
1913
  }
1776
1914
  return n;
1777
1915
  }
1778
- }, h(we, "u"), we), xe, Ve = (xe = class {
1916
+ }, h(ve, "u"), ve), be, Qe = (be = class {
1779
1917
  constructor(t) {
1780
- _(this, "options");
1781
- _(this, "block");
1782
- this.options = t || Ae;
1918
+ R(this, "options");
1919
+ R(this, "block");
1920
+ this.options = t || Re;
1783
1921
  }
1784
1922
  preprocess(t) {
1785
1923
  return t;
@@ -1799,18 +1937,18 @@ ${t}</tr>
1799
1937
  provideParser() {
1800
1938
  return this.block ? re.parse : re.parseInline;
1801
1939
  }
1802
- }, h(xe, "P"), _(xe, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), _(xe, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), xe), Pe, jr = (Pe = class {
1940
+ }, h(be, "P"), R(be, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), R(be, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), be), $e, Zr = ($e = class {
1803
1941
  constructor(...t) {
1804
- _(this, "defaults", Xt());
1805
- _(this, "options", this.setOptions);
1806
- _(this, "parse", this.parseMarkdown(!0));
1807
- _(this, "parseInline", this.parseMarkdown(!1));
1808
- _(this, "Parser", re);
1809
- _(this, "Renderer", kt);
1810
- _(this, "TextRenderer", sn);
1811
- _(this, "Lexer", se);
1812
- _(this, "Tokenizer", mt);
1813
- _(this, "Hooks", Ve);
1942
+ R(this, "defaults", Xt());
1943
+ R(this, "options", this.setOptions);
1944
+ R(this, "parse", this.parseMarkdown(!0));
1945
+ R(this, "parseInline", this.parseMarkdown(!1));
1946
+ R(this, "Parser", re);
1947
+ R(this, "Renderer", wt);
1948
+ R(this, "TextRenderer", rn);
1949
+ R(this, "Lexer", se);
1950
+ R(this, "Tokenizer", bt);
1951
+ R(this, "Hooks", Qe);
1814
1952
  this.use(...t);
1815
1953
  }
1816
1954
  walkTokens(t, e) {
@@ -1857,51 +1995,51 @@ ${t}</tr>
1857
1995
  }
1858
1996
  "childTokens" in r && r.childTokens && (e.childTokens[r.name] = r.childTokens);
1859
1997
  }), s.extensions = e), n.renderer) {
1860
- let r = this.defaults.renderer || new kt(this.defaults);
1998
+ let r = this.defaults.renderer || new wt(this.defaults);
1861
1999
  for (let a in n.renderer) {
1862
2000
  if (!(a in r)) throw new Error(`renderer '${a}' does not exist`);
1863
2001
  if (["options", "parser"].includes(a)) continue;
1864
- let o = a, c = n.renderer[o], p = r[o];
1865
- r[o] = (...f) => {
1866
- let d = c.apply(r, f);
1867
- return d === !1 && (d = p.apply(r, f)), d || "";
2002
+ let o = a, c = n.renderer[o], f = r[o];
2003
+ r[o] = (...d) => {
2004
+ let u = c.apply(r, d);
2005
+ return u === !1 && (u = f.apply(r, d)), u || "";
1868
2006
  };
1869
2007
  }
1870
2008
  s.renderer = r;
1871
2009
  }
1872
2010
  if (n.tokenizer) {
1873
- let r = this.defaults.tokenizer || new mt(this.defaults);
2011
+ let r = this.defaults.tokenizer || new bt(this.defaults);
1874
2012
  for (let a in n.tokenizer) {
1875
2013
  if (!(a in r)) throw new Error(`tokenizer '${a}' does not exist`);
1876
2014
  if (["options", "rules", "lexer"].includes(a)) continue;
1877
- let o = a, c = n.tokenizer[o], p = r[o];
1878
- r[o] = (...f) => {
1879
- let d = c.apply(r, f);
1880
- return d === !1 && (d = p.apply(r, f)), d;
2015
+ let o = a, c = n.tokenizer[o], f = r[o];
2016
+ r[o] = (...d) => {
2017
+ let u = c.apply(r, d);
2018
+ return u === !1 && (u = f.apply(r, d)), u;
1881
2019
  };
1882
2020
  }
1883
2021
  s.tokenizer = r;
1884
2022
  }
1885
2023
  if (n.hooks) {
1886
- let r = this.defaults.hooks || new Ve();
2024
+ let r = this.defaults.hooks || new Qe();
1887
2025
  for (let a in n.hooks) {
1888
2026
  if (!(a in r)) throw new Error(`hook '${a}' does not exist`);
1889
2027
  if (["options", "block"].includes(a)) continue;
1890
- let o = a, c = n.hooks[o], p = r[o];
1891
- Ve.passThroughHooks.has(a) ? r[o] = (f) => {
1892
- if (this.defaults.async && Ve.passThroughHooksRespectAsync.has(a)) return (async () => {
1893
- let m = await c.call(r, f);
1894
- return p.call(r, m);
2028
+ let o = a, c = n.hooks[o], f = r[o];
2029
+ Qe.passThroughHooks.has(a) ? r[o] = (d) => {
2030
+ if (this.defaults.async && Qe.passThroughHooksRespectAsync.has(a)) return (async () => {
2031
+ let g = await c.call(r, d);
2032
+ return f.call(r, g);
1895
2033
  })();
1896
- let d = c.call(r, f);
1897
- return p.call(r, d);
1898
- } : r[o] = (...f) => {
2034
+ let u = c.call(r, d);
2035
+ return f.call(r, u);
2036
+ } : r[o] = (...d) => {
1899
2037
  if (this.defaults.async) return (async () => {
1900
- let m = await c.apply(r, f);
1901
- return m === !1 && (m = await p.apply(r, f)), m;
2038
+ let g = await c.apply(r, d);
2039
+ return g === !1 && (g = await f.apply(r, d)), g;
1902
2040
  })();
1903
- let d = c.apply(r, f);
1904
- return d === !1 && (d = p.apply(r, f)), d;
2041
+ let u = c.apply(r, d);
2042
+ return u === !1 && (u = f.apply(r, d)), u;
1905
2043
  };
1906
2044
  }
1907
2045
  s.hooks = r;
@@ -1932,10 +2070,10 @@ ${t}</tr>
1932
2070
  if (typeof e > "u" || e === null) return a(new Error("marked(): input parameter is undefined or null"));
1933
2071
  if (typeof e != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
1934
2072
  if (r.hooks && (r.hooks.options = r, r.hooks.block = t), r.async) return (async () => {
1935
- let o = r.hooks ? await r.hooks.preprocess(e) : e, c = await (r.hooks ? await r.hooks.provideLexer() : t ? se.lex : se.lexInline)(o, r), p = r.hooks ? await r.hooks.processAllTokens(c) : c;
1936
- r.walkTokens && await Promise.all(this.walkTokens(p, r.walkTokens));
1937
- let f = await (r.hooks ? await r.hooks.provideParser() : t ? re.parse : re.parseInline)(p, r);
1938
- return r.hooks ? await r.hooks.postprocess(f) : f;
2073
+ let o = r.hooks ? await r.hooks.preprocess(e) : e, c = await (r.hooks ? await r.hooks.provideLexer() : t ? se.lex : se.lexInline)(o, r), f = r.hooks ? await r.hooks.processAllTokens(c) : c;
2074
+ r.walkTokens && await Promise.all(this.walkTokens(f, r.walkTokens));
2075
+ let d = await (r.hooks ? await r.hooks.provideParser() : t ? re.parse : re.parseInline)(f, r);
2076
+ return r.hooks ? await r.hooks.postprocess(d) : d;
1939
2077
  })().catch(a);
1940
2078
  try {
1941
2079
  r.hooks && (e = r.hooks.preprocess(e));
@@ -1959,31 +2097,31 @@ Please report this to https://github.com/markedjs/marked.`, t) {
1959
2097
  throw n;
1960
2098
  };
1961
2099
  }
1962
- }, h(Pe, "B"), Pe), Se = new jr();
2100
+ }, h($e, "B"), $e), Ee = new Zr();
1963
2101
  function M(l, t) {
1964
- return Se.parse(l, t);
2102
+ return Ee.parse(l, t);
1965
2103
  }
1966
2104
  h(M, "g");
1967
2105
  M.options = M.setOptions = function(l) {
1968
- return Se.setOptions(l), M.defaults = Se.defaults, Qn(M.defaults), M;
2106
+ return Ee.setOptions(l), M.defaults = Ee.defaults, es(M.defaults), M;
1969
2107
  };
1970
2108
  M.getDefaults = Xt;
1971
- M.defaults = Ae;
2109
+ M.defaults = Re;
1972
2110
  M.use = function(...l) {
1973
- return Se.use(...l), M.defaults = Se.defaults, Qn(M.defaults), M;
2111
+ return Ee.use(...l), M.defaults = Ee.defaults, es(M.defaults), M;
1974
2112
  };
1975
2113
  M.walkTokens = function(l, t) {
1976
- return Se.walkTokens(l, t);
2114
+ return Ee.walkTokens(l, t);
1977
2115
  };
1978
- M.parseInline = Se.parseInline;
2116
+ M.parseInline = Ee.parseInline;
1979
2117
  M.Parser = re;
1980
2118
  M.parser = re.parse;
1981
- M.Renderer = kt;
1982
- M.TextRenderer = sn;
2119
+ M.Renderer = wt;
2120
+ M.TextRenderer = rn;
1983
2121
  M.Lexer = se;
1984
2122
  M.lexer = se.lex;
1985
- M.Tokenizer = mt;
1986
- M.Hooks = Ve;
2123
+ M.Tokenizer = bt;
2124
+ M.Hooks = Qe;
1987
2125
  M.parse = M;
1988
2126
  M.options;
1989
2127
  M.setOptions;
@@ -1992,31 +2130,31 @@ M.walkTokens;
1992
2130
  M.parseInline;
1993
2131
  re.parse;
1994
2132
  se.lex;
1995
- const qr = { class: "flex flex-col h-full relative" }, Yr = {
2133
+ const Xr = { class: "flex flex-col h-full relative" }, Qr = {
1996
2134
  key: 0,
1997
2135
  class: "pb-4"
1998
- }, Zr = {
2136
+ }, Kr = {
1999
2137
  key: 0,
2000
2138
  class: "flex flex-col items-center justify-center pt-12 pb-6 px-4"
2001
- }, Xr = { class: "relative mb-3" }, Vr = ["src", "alt"], Qr = ["title"], Kr = {
2139
+ }, Jr = { class: "relative mb-3" }, ei = ["src", "alt"], ti = ["title"], ni = {
2002
2140
  key: 0,
2003
2141
  class: "flex items-center gap-3 py-3 px-2"
2004
- }, Jr = ["src", "alt"], ei = ["src", "alt"], ti = ["src"], ni = ["href"], si = ["innerHTML"], ri = {
2142
+ }, si = ["src", "alt"], ri = ["src", "alt"], ii = ["src"], ai = ["href"], li = ["innerHTML"], oi = {
2005
2143
  key: 1,
2006
2144
  class: "flex gap-2 justify-start items-end mb-4"
2007
- }, ii = { class: "flex-shrink-0" }, ai = ["src", "alt"], li = { class: "flex-shrink-0 pt-4 pb-2 px-3" }, oi = {
2145
+ }, ci = { class: "flex-shrink-0" }, ui = ["src", "alt"], hi = { class: "flex-shrink-0 pt-4 pb-2 px-3" }, pi = {
2008
2146
  key: 0,
2009
2147
  class: "flex items-center gap-2 px-3 pb-2 overflow-x-auto"
2010
- }, ci = ["src", "alt"], ui = { class: "max-w-20 truncate" }, hi = ["onClick"], pi = {
2148
+ }, fi = ["src", "alt"], di = { class: "max-w-20 truncate" }, gi = ["onClick"], mi = {
2011
2149
  key: 0,
2012
2150
  class: "shrink-0 flex items-center justify-center size-14"
2013
- }, fi = ["disabled"], di = {
2151
+ }, xi = ["disabled"], ki = {
2014
2152
  key: 0,
2015
2153
  class: "i-svg-spinners-ring-resize size-4"
2016
- }, gi = {
2154
+ }, bi = {
2017
2155
  key: 1,
2018
2156
  class: "i-tabler-paperclip size-5"
2019
- }, mi = ["placeholder", "disabled"], ki = ["disabled"], Ei = /* @__PURE__ */ xt({
2157
+ }, wi = ["placeholder", "disabled"], vi = ["disabled"], Li = /* @__PURE__ */ _e({
2020
2158
  __name: "ElAgentChat",
2021
2159
  props: {
2022
2160
  chatController: {},
@@ -2031,12 +2169,12 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2031
2169
  },
2032
2170
  setup(l) {
2033
2171
  const t = new M.Renderer();
2034
- t.link = ({ href: y, text: v }) => `<a href="${y}" target="_blank" rel="noopener noreferrer">${v}</a>`, M.setOptions({ breaks: !0, gfm: !0, renderer: t });
2035
- function e(y) {
2036
- if (!y)
2172
+ t.link = ({ href: A, text: E }) => `<a href="${A}" target="_blank" rel="noopener noreferrer">${E}</a>`, M.setOptions({ breaks: !0, gfm: !0, renderer: t });
2173
+ function e(A) {
2174
+ if (!A)
2037
2175
  return "";
2038
- const v = M.parse(y, { async: !1 });
2039
- return nr.sanitize(v, { ADD_ATTR: ["target"] });
2176
+ const E = M.parse(A, { async: !1 });
2177
+ return ar.sanitize(E, { ADD_ATTR: ["target"] });
2040
2178
  }
2041
2179
  h(e, "renderMarkdown");
2042
2180
  const n = {
@@ -2047,142 +2185,142 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2047
2185
  private: { icon: "i-tabler-lock", label: "Private", tooltip: "Only you can see this conversation" },
2048
2186
  org: { icon: "i-tabler-users", label: "Workspace", tooltip: "Visible to workspace members" },
2049
2187
  public: { icon: "i-tabler-globe", label: "Public", tooltip: "Anyone with the link can see this" }
2050
- }, r = Q(() => l.setupHint ?? n[l.scope]), a = Q(() => {
2051
- const y = { ...s[l.scope] };
2052
- return l.scope === "org" && l.scopeName && (y.label = l.scopeName, y.tooltip = `Visible to ${l.scopeName} members`), y;
2053
- }), o = Q(() => l.scale === "lg"), c = ne(""), p = ne(), f = ne(), d = ne(), m = ne([]), b = ne(!1);
2054
- function O(y, v) {
2055
- const x = y[v], L = y[v + 1];
2056
- return !L || L.sender !== x.sender;
2188
+ }, r = W(() => l.setupHint ?? n[l.scope]), a = W(() => {
2189
+ const A = { ...s[l.scope] };
2190
+ return l.scope === "org" && l.scopeName && (A.label = l.scopeName, A.tooltip = `Visible to ${l.scopeName} members`), A;
2191
+ }), o = W(() => l.scale === "lg"), c = K(""), f = K(), d = K(), u = K(), g = K([]), m = K(!1);
2192
+ function S(A, E) {
2193
+ const b = A[E], z = A[E + 1];
2194
+ return !z || z.sender !== b.sender;
2057
2195
  }
2058
- h(O, "shouldShowAvatar");
2059
- const D = Q(() => l.chatController?.textState.value), F = Q(() => D.value?.isConnected ?? !1), Ee = Q(() => D.value?.isThinking ?? !1), me = Q(() => D.value?.connectionStatus === "disconnected" && !!D.value?.error), ee = Q(() => D.value?.connectionStatus !== "connected" && !D.value?.error), $ = Q(() => D.value?.error), W = Q(() => l.chatController?.sharedMessages.value?.filter((y) => y.sender !== "system") ?? []), te = Q(() => !F.value), ue = Q(() => me.value ? "Agent is offline" : ee.value ? "Connecting..." : "Message"), Ke = Q(() => (c.value.trim() || m.value.length > 0) && !te.value && !b.value);
2060
- jn(async () => {
2061
- if (l.chatController && !F.value)
2196
+ h(S, "shouldShowAvatar");
2197
+ const D = W(() => l.chatController?.textState.value), $ = W(() => D.value?.isConnected ?? !1), me = W(() => D.value?.isThinking ?? !1), xe = W(() => D.value?.connectionStatus === "disconnected" && !!D.value?.error), te = W(() => D.value?.connectionStatus !== "connected" && !D.value?.error), U = W(() => D.value?.error), q = W(() => l.chatController?.sharedMessages.value?.filter((A) => A.sender !== "system") ?? []), ne = W(() => !$.value), ue = W(() => xe.value ? "Agent is offline" : te.value ? "Connecting..." : "Message"), et = W(() => (c.value.trim() || g.value.length > 0) && !ne.value && !m.value);
2198
+ Zt(async () => {
2199
+ if (l.chatController && !$.value)
2062
2200
  try {
2063
2201
  await l.chatController.startTextConversation();
2064
- } catch (y) {
2065
- console.error("Failed to start text conversation:", y);
2202
+ } catch (A) {
2203
+ console.error("Failed to start text conversation:", A);
2066
2204
  }
2067
2205
  });
2068
- async function Je() {
2069
- const y = c.value.trim(), v = m.value.length > 0;
2070
- if (!y && !v || !l.chatController || !F.value || b.value)
2206
+ async function tt() {
2207
+ const A = c.value.trim(), E = g.value.length > 0;
2208
+ if (!A && !E || !l.chatController || !$.value || m.value)
2071
2209
  return;
2072
- const x = c.value, L = v ? [...m.value] : void 0;
2073
- c.value = "", m.value = [], f.value && (f.value.style.height = "auto", f.value.focus());
2210
+ const b = c.value, z = E ? [...g.value] : void 0;
2211
+ c.value = "", g.value = [], d.value && (d.value.style.height = "auto", d.value.focus());
2074
2212
  try {
2075
- await l.chatController.sendChatMessage(x, L), B();
2076
- } catch (C) {
2077
- console.error("Error sending message:", C);
2213
+ await l.chatController.sendChatMessage(b, z), F();
2214
+ } catch (I) {
2215
+ console.error("Error sending message:", I);
2078
2216
  }
2079
2217
  }
2080
- h(Je, "sendMessage");
2081
- function yt(y) {
2082
- y.key === "Enter" && !y.shiftKey && (y.preventDefault(), Je());
2218
+ h(tt, "sendMessage");
2219
+ function Tt(A) {
2220
+ A.key === "Enter" && !A.shiftKey && (A.preventDefault(), tt());
2083
2221
  }
2084
- h(yt, "handleKeydown");
2085
- function B() {
2086
- p.value && zt(() => {
2087
- p.value.scrollTop = p.value.scrollHeight;
2222
+ h(Tt, "handleKeydown");
2223
+ function F() {
2224
+ f.value && Pt(() => {
2225
+ f.value.scrollTop = f.value.scrollHeight;
2088
2226
  });
2089
2227
  }
2090
- h(B, "scrollToBottom");
2091
- function $e() {
2092
- f.value && (f.value.style.height = "auto", f.value.style.height = `${Math.min(f.value.scrollHeight, 150)}px`);
2093
- }
2094
- h($e, "adjustTextareaHeight"), Wt(c, () => zt(() => $e()));
2095
- const I = Q(() => l.variant === "light");
2228
+ h(F, "scrollToBottom");
2096
2229
  function Ue() {
2097
- d.value?.click();
2230
+ d.value && (d.value.style.height = "auto", d.value.style.height = `${Math.min(d.value.scrollHeight, 150)}px`);
2231
+ }
2232
+ h(Ue, "adjustTextareaHeight"), Ke(c, () => Pt(() => Ue()));
2233
+ const L = W(() => l.variant === "light");
2234
+ function Be() {
2235
+ u.value?.click();
2098
2236
  }
2099
- h(Ue, "triggerFileInput");
2100
- async function vt(y) {
2101
- const v = y.target, x = v.files?.[0];
2102
- if (!(!x || !l.uploadFn)) {
2103
- b.value = !0;
2237
+ h(Be, "triggerFileInput");
2238
+ async function St(A) {
2239
+ const E = A.target, b = E.files?.[0];
2240
+ if (!(!b || !l.uploadFn)) {
2241
+ m.value = !0;
2104
2242
  try {
2105
- const L = await l.uploadFn(x);
2106
- m.value = [...m.value, L];
2107
- } catch (L) {
2108
- console.error("Upload failed:", L);
2243
+ const z = await l.uploadFn(b);
2244
+ g.value = [...g.value, z];
2245
+ } catch (z) {
2246
+ console.error("Upload failed:", z);
2109
2247
  } finally {
2110
- b.value = !1, v.value = "";
2248
+ m.value = !1, E.value = "";
2111
2249
  }
2112
2250
  }
2113
2251
  }
2114
- h(vt, "handleFileSelect");
2115
- function Tt(y) {
2116
- m.value = m.value.filter((v, x) => x !== y);
2252
+ h(St, "handleFileSelect");
2253
+ function At(A) {
2254
+ g.value = g.value.filter((E, b) => b !== A);
2117
2255
  }
2118
- h(Tt, "removeAttachment");
2119
- function et(y, v) {
2120
- if (v === 0) {
2121
- const pe = y[v];
2122
- return pe?.timestamp ? Be(new Date(pe.timestamp)) : null;
2123
- }
2124
- const x = y[v - 1], L = y[v];
2125
- if (!x?.timestamp || !L?.timestamp) return null;
2126
- const C = new Date(x.timestamp).getTime();
2127
- return new Date(L.timestamp).getTime() - C > 36e5 ? Be(new Date(L.timestamp)) : null;
2256
+ h(At, "removeAttachment");
2257
+ function nt(A, E) {
2258
+ if (E === 0) {
2259
+ const pe = A[E];
2260
+ return pe?.timestamp ? Fe(new Date(pe.timestamp)) : null;
2261
+ }
2262
+ const b = A[E - 1], z = A[E];
2263
+ if (!b?.timestamp || !z?.timestamp) return null;
2264
+ const I = new Date(b.timestamp).getTime();
2265
+ return new Date(z.timestamp).getTime() - I > 36e5 ? Fe(new Date(z.timestamp)) : null;
2128
2266
  }
2129
- h(et, "shouldShowTimeDivider");
2130
- function Be(y) {
2131
- const v = /* @__PURE__ */ new Date(), x = y.toDateString() === v.toDateString(), L = new Date(v);
2132
- L.setDate(L.getDate() - 1);
2133
- const C = y.toDateString() === L.toDateString(), he = y.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2134
- if (x) return he;
2135
- if (C) return `Yesterday, ${he}`;
2136
- const z = y.getFullYear() === v.getFullYear();
2137
- return `${y.toLocaleDateString("en-US", {
2267
+ h(nt, "shouldShowTimeDivider");
2268
+ function Fe(A) {
2269
+ const E = /* @__PURE__ */ new Date(), b = A.toDateString() === E.toDateString(), z = new Date(E);
2270
+ z.setDate(z.getDate() - 1);
2271
+ const I = A.toDateString() === z.toDateString(), he = A.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2272
+ if (b) return he;
2273
+ if (I) return `Yesterday, ${he}`;
2274
+ const O = A.getFullYear() === E.getFullYear();
2275
+ return `${A.toLocaleDateString("en-US", {
2138
2276
  weekday: "long",
2139
2277
  month: "short",
2140
2278
  day: "numeric",
2141
- ...z ? {} : { year: "numeric" }
2279
+ ...O ? {} : { year: "numeric" }
2142
2280
  })}, ${he}`;
2143
2281
  }
2144
- return h(Be, "formatTimeDivider"), Wt(W, (y) => {
2145
- y.length > 0 && zt(() => B());
2146
- }, { immediate: !0, deep: !0 }), (y, v) => (A(), E("div", qr, [
2147
- I.value ? q("", !0) : (A(), E("div", Yr, [
2148
- Nt(Os, {
2282
+ return h(Fe, "formatTimeDivider"), Ke(q, (A) => {
2283
+ A.length > 0 && Pt(() => F());
2284
+ }, { immediate: !0, deep: !0 }), (A, E) => (v(), y("div", Xr, [
2285
+ L.value ? H("", !0) : (v(), y("div", Qr, [
2286
+ $t($s, {
2149
2287
  agent: l.agent,
2150
- "is-online": F.value
2288
+ "is-online": $.value
2151
2289
  }, null, 8, ["agent", "is-online"])
2152
2290
  ])),
2153
- me.value ? (A(), E("div", {
2291
+ xe.value ? (v(), y("div", {
2154
2292
  key: 1,
2155
- class: T(["py-16 flex flex-col items-center justify-center gap-3 text-sm", I.value ? "text-theme-400" : "text-white/60"])
2293
+ class: T(["py-16 flex flex-col items-center justify-center gap-3 text-sm", L.value ? "text-theme-400" : "text-white/60"])
2156
2294
  }, [
2157
2295
  w("i", {
2158
- class: T(["i-heroicons-cloud-arrow-down size-8", I.value ? "text-theme-300" : "text-white/40"])
2296
+ class: T(["i-heroicons-cloud-arrow-down size-8", L.value ? "text-theme-300" : "text-white/40"])
2159
2297
  }, null, 2),
2160
- w("span", null, ce($.value), 1)
2161
- ], 2)) : ee.value ? (A(), E("div", {
2298
+ w("span", null, ce(U.value), 1)
2299
+ ], 2)) : te.value ? (v(), y("div", {
2162
2300
  key: 2,
2163
- class: T(["py-16 flex flex-col items-center justify-center gap-2 text-sm", I.value ? "text-theme-400" : "text-theme-600"])
2301
+ class: T(["py-16 flex flex-col items-center justify-center gap-2 text-sm", L.value ? "text-theme-400" : "text-theme-600"])
2164
2302
  }, [
2165
- Nt(_n, { class: "size-4" })
2166
- ], 2)) : r.value ? (A(), E("div", {
2303
+ $t(Rn, { class: "size-4" })
2304
+ ], 2)) : r.value ? (v(), y("div", {
2167
2305
  key: 3,
2168
- class: T(["flex items-center justify-center gap-1.5 py-2 text-[11px]", I.value ? "text-theme-300" : "text-white/30"])
2306
+ class: T(["flex items-center justify-center gap-1.5 py-2 text-[11px]", L.value ? "text-theme-300" : "text-white/30"])
2169
2307
  }, [
2170
- v[2] || (v[2] = w("i", { class: "i-tabler-tool size-3" }, null, -1)),
2308
+ E[2] || (E[2] = w("i", { class: "i-tabler-tool size-3" }, null, -1)),
2171
2309
  w("span", null, ce(r.value), 1)
2172
- ], 2)) : q("", !0),
2310
+ ], 2)) : H("", !0),
2173
2311
  w("div", {
2174
2312
  ref_key: "messagesContainer",
2175
- ref: p,
2313
+ ref: f,
2176
2314
  class: "flex-1 overflow-y-auto overflow-x-hidden py-4 px-3 space-y-1 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
2177
2315
  }, [
2178
- W.value.length === 0 && !ee.value && !me.value ? (A(), E("div", Zr, [
2179
- w("div", Xr, [
2316
+ q.value.length === 0 && !te.value && !xe.value ? (v(), y("div", Kr, [
2317
+ w("div", Jr, [
2180
2318
  w("img", {
2181
2319
  src: l.agent.avatarUrl.value,
2182
2320
  alt: l.agent.displayName.value,
2183
2321
  class: T(["rounded-full object-cover", o.value ? "size-28" : "size-20"])
2184
- }, null, 10, Vr),
2185
- F.value ? (A(), E("span", {
2322
+ }, null, 10, ei),
2323
+ $.value ? (v(), y("span", {
2186
2324
  key: 0,
2187
2325
  class: T(["absolute bottom-0.5 right-0.5 flex items-center justify-center", o.value ? "size-6" : "size-5"])
2188
2326
  }, [
@@ -2193,209 +2331,209 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2193
2331
  w("span", {
2194
2332
  class: T(["relative inline-flex rounded-full bg-emerald-500 ring-2", [
2195
2333
  o.value ? "size-3" : "size-2.5",
2196
- I.value ? "ring-white" : "ring-theme-900"
2334
+ L.value ? "ring-white" : "ring-theme-900"
2197
2335
  ]])
2198
2336
  }, null, 2)
2199
- ], 2)) : q("", !0)
2337
+ ], 2)) : H("", !0)
2200
2338
  ]),
2201
2339
  w("div", {
2202
- class: T(["font-semibold", [I.value ? "text-theme-900" : "text-white", o.value ? "text-lg" : "text-base"]])
2340
+ class: T(["font-semibold", [L.value ? "text-theme-900" : "text-white", o.value ? "text-lg" : "text-base"]])
2203
2341
  }, ce(l.agent.displayName.value), 3),
2204
2342
  w("p", {
2205
- class: T(["mt-1 text-center", [I.value ? "text-theme-300" : "text-white/30", o.value ? "text-sm" : "text-xs"]])
2343
+ class: T(["mt-1 text-center", [L.value ? "text-theme-300" : "text-white/30", o.value ? "text-sm" : "text-xs"]])
2206
2344
  }, ce(l.emptyStateMessage || "Send a message to get started"), 3),
2207
2345
  w("div", {
2208
- class: T(["inline-flex items-center gap-1.5 mt-6 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"]),
2346
+ class: T(["inline-flex items-center gap-1.5 mt-6 px-2.5 py-1 rounded-full text-[11px]", L.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2209
2347
  title: a.value.tooltip
2210
2348
  }, [
2211
2349
  w("i", {
2212
2350
  class: T([a.value.icon, "size-3"])
2213
2351
  }, null, 2),
2214
2352
  w("span", null, ce(a.value.label), 1)
2215
- ], 10, Qr)
2216
- ])) : q("", !0),
2217
- (A(!0), E(Le, null, Pt(W.value, (x, L) => (A(), E(Le, {
2218
- key: x.id
2353
+ ], 10, ti)
2354
+ ])) : H("", !0),
2355
+ (v(!0), y(Se, null, dt(q.value, (b, z) => (v(), y(Se, {
2356
+ key: b.id
2219
2357
  }, [
2220
- et(W.value, L) ? (A(), E("div", Kr, [
2358
+ nt(q.value, z) ? (v(), y("div", ni, [
2221
2359
  w("div", {
2222
- class: T(["flex-1 h-px", I.value ? "bg-theme-200" : "bg-white/10"])
2360
+ class: T(["flex-1 h-px", L.value ? "bg-theme-200" : "bg-white/10"])
2223
2361
  }, null, 2),
2224
2362
  w("span", {
2225
- class: T(["font-medium shrink-0", [I.value ? "text-theme-400" : "text-white/40", o.value ? "text-xs" : "text-[11px]"]])
2226
- }, ce(et(W.value, L)), 3),
2363
+ class: T(["font-medium shrink-0", [L.value ? "text-theme-400" : "text-white/40", o.value ? "text-xs" : "text-[11px]"]])
2364
+ }, ce(nt(q.value, z)), 3),
2227
2365
  w("div", {
2228
- class: T(["flex-1 h-px", I.value ? "bg-theme-200" : "bg-white/10"])
2366
+ class: T(["flex-1 h-px", L.value ? "bg-theme-200" : "bg-white/10"])
2229
2367
  }, null, 2)
2230
- ])) : q("", !0),
2368
+ ])) : H("", !0),
2231
2369
  w("div", {
2232
2370
  class: T(["flex gap-2 items-end", {
2233
- "justify-end": x.sender === "user",
2234
- "justify-start": x.sender === "agent",
2235
- "mb-4": O(W.value, L)
2371
+ "justify-end": b.sender === "user",
2372
+ "justify-start": b.sender === "agent",
2373
+ "mb-4": S(q.value, z)
2236
2374
  }])
2237
2375
  }, [
2238
- x.sender === "agent" ? (A(), E("div", {
2376
+ b.sender === "agent" ? (v(), y("div", {
2239
2377
  key: 0,
2240
2378
  class: T(["flex-shrink-0", o.value ? "size-10" : "size-8"])
2241
2379
  }, [
2242
- O(W.value, L) ? (A(), E("img", {
2380
+ S(q.value, z) ? (v(), y("img", {
2243
2381
  key: 0,
2244
2382
  src: l.agent.avatarUrl.value,
2245
2383
  alt: l.agent.displayName.value,
2246
2384
  class: T(["rounded-full object-cover", o.value ? "size-10" : "size-7"])
2247
- }, null, 10, Jr)) : q("", !0)
2248
- ], 2)) : q("", !0),
2385
+ }, null, 10, si)) : H("", !0)
2386
+ ], 2)) : H("", !0),
2249
2387
  w("div", {
2250
- class: T(x.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2388
+ class: T(b.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2251
2389
  }, [
2252
- x.attachments?.length ? (A(), E("div", {
2390
+ b.attachments?.length ? (v(), y("div", {
2253
2391
  key: 0,
2254
- class: T(["mb-1 space-y-1", x.sender === "user" ? "flex flex-col items-end" : ""])
2392
+ class: T(["mb-1 space-y-1", b.sender === "user" ? "flex flex-col items-end" : ""])
2255
2393
  }, [
2256
- (A(!0), E(Le, null, Pt(x.attachments, (C, he) => (A(), E(Le, { key: he }, [
2257
- C.type === "image" ? (A(), E("img", {
2394
+ (v(!0), y(Se, null, dt(b.attachments, (I, he) => (v(), y(Se, { key: he }, [
2395
+ I.type === "image" ? (v(), y("img", {
2258
2396
  key: 0,
2259
- src: C.url,
2260
- alt: C.name,
2397
+ src: I.url,
2398
+ alt: I.name,
2261
2399
  class: T(["rounded-xl object-cover max-h-48", o.value ? "max-w-[320px]" : "max-w-[240px]"])
2262
- }, null, 10, ei)) : C.type === "audio" ? (A(), E("audio", {
2400
+ }, null, 10, ri)) : I.type === "audio" ? (v(), y("audio", {
2263
2401
  key: 1,
2264
- src: C.url,
2402
+ src: I.url,
2265
2403
  controls: "",
2266
2404
  class: "max-w-full"
2267
- }, null, 8, ti)) : (A(), E("a", {
2405
+ }, null, 8, ii)) : (v(), y("a", {
2268
2406
  key: 2,
2269
- href: C.url,
2407
+ href: I.url,
2270
2408
  target: "_blank",
2271
2409
  rel: "noopener",
2272
- class: T(["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"])
2410
+ class: T(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", L.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2273
2411
  }, [
2274
- v[3] || (v[3] = w("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2275
- xs(" " + ce(C.name), 1)
2276
- ], 10, ni))
2412
+ E[3] || (E[3] = w("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2413
+ vs(" " + ce(I.name), 1)
2414
+ ], 10, ai))
2277
2415
  ], 64))), 128))
2278
- ], 2)) : q("", !0),
2279
- x.text ? (A(), E("div", {
2416
+ ], 2)) : H("", !0),
2417
+ b.text ? (v(), y("div", {
2280
2418
  key: 1,
2281
- class: T(["rounded-2xl px-3.5 py-2", x.sender === "user" ? "bg-primary-500 text-white" : I.value ? "bg-theme-100 text-theme-800" : "bg-white/15 backdrop-blur-sm text-white/95"])
2419
+ class: T(["rounded-2xl px-3.5 py-2", b.sender === "user" ? "bg-primary-500 text-white" : L.value ? "bg-theme-100 text-theme-800" : "bg-white/15 backdrop-blur-sm text-white/95"])
2282
2420
  }, [
2283
2421
  w("div", {
2284
2422
  class: T(["chat-msg-prose break-words", [
2285
2423
  o.value ? "text-[15px] leading-[1.6]" : "text-[13px] leading-[1.55]",
2286
- x.sender === "user" || !I.value ? "chat-msg-prose-invert" : ""
2424
+ b.sender === "user" || !L.value ? "chat-msg-prose-invert" : ""
2287
2425
  ]]),
2288
- innerHTML: e(x.text)
2289
- }, null, 10, si)
2290
- ], 2)) : q("", !0)
2426
+ innerHTML: e(b.text)
2427
+ }, null, 10, li)
2428
+ ], 2)) : H("", !0)
2291
2429
  ], 2)
2292
2430
  ], 2)
2293
2431
  ], 64))), 128)),
2294
- Ee.value ? (A(), E("div", ri, [
2295
- w("div", ii, [
2432
+ me.value ? (v(), y("div", oi, [
2433
+ w("div", ci, [
2296
2434
  w("img", {
2297
2435
  src: l.agent.avatarUrl.value,
2298
2436
  alt: l.agent.displayName.value,
2299
2437
  class: T(["rounded-full object-cover", o.value ? "size-10" : "size-8"])
2300
- }, null, 10, ai)
2438
+ }, null, 10, ui)
2301
2439
  ]),
2302
2440
  w("div", {
2303
- class: T(["rounded-2xl px-4 py-2.5 flex items-center", I.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2441
+ class: T(["rounded-2xl px-4 py-2.5 flex items-center", L.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2304
2442
  }, [
2305
2443
  w("i", {
2306
- class: T(["i-svg-spinners-3-dots-fade size-6", I.value ? "text-theme-400" : "text-white/70"])
2444
+ class: T(["i-svg-spinners-3-dots-fade size-6", L.value ? "text-theme-400" : "text-white/70"])
2307
2445
  }, null, 2)
2308
2446
  ], 2)
2309
- ])) : q("", !0)
2447
+ ])) : H("", !0)
2310
2448
  ], 512),
2311
- w("div", li, [
2312
- m.value.length > 0 ? (A(), E("div", oi, [
2313
- (A(!0), E(Le, null, Pt(m.value, (x, L) => (A(), E("div", {
2314
- key: L,
2449
+ w("div", hi, [
2450
+ g.value.length > 0 ? (v(), y("div", pi, [
2451
+ (v(!0), y(Se, null, dt(g.value, (b, z) => (v(), y("div", {
2452
+ key: z,
2315
2453
  class: "relative shrink-0 group"
2316
2454
  }, [
2317
- x.type === "image" ? (A(), E("img", {
2455
+ b.type === "image" ? (v(), y("img", {
2318
2456
  key: 0,
2319
- src: x.url,
2320
- alt: x.name,
2321
- class: T(["size-14 rounded-lg object-cover border", I.value ? "border-theme-200" : "border-white/20"])
2322
- }, null, 10, ci)) : (A(), E("div", {
2457
+ src: b.url,
2458
+ alt: b.name,
2459
+ class: T(["size-14 rounded-lg object-cover border", L.value ? "border-theme-200" : "border-white/20"])
2460
+ }, null, 10, fi)) : (v(), y("div", {
2323
2461
  key: 1,
2324
- class: T(["h-14 px-3 rounded-lg flex items-center gap-1.5 text-xs border", I.value ? "border-theme-200 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2462
+ class: T(["h-14 px-3 rounded-lg flex items-center gap-1.5 text-xs border", L.value ? "border-theme-200 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2325
2463
  }, [
2326
- v[4] || (v[4] = w("i", { class: "i-tabler-file size-4" }, null, -1)),
2327
- w("span", ui, ce(x.name), 1)
2464
+ E[4] || (E[4] = w("i", { class: "i-tabler-file size-4" }, null, -1)),
2465
+ w("span", di, ce(b.name), 1)
2328
2466
  ], 2)),
2329
2467
  w("button", {
2330
2468
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-600 text-white text-xs opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",
2331
- onClick: /* @__PURE__ */ h((C) => Tt(L), "onClick")
2332
- }, [...v[5] || (v[5] = [
2469
+ onClick: /* @__PURE__ */ h((I) => At(z), "onClick")
2470
+ }, [...E[5] || (E[5] = [
2333
2471
  w("i", { class: "i-tabler-x size-3" }, null, -1)
2334
- ])], 8, hi)
2472
+ ])], 8, gi)
2335
2473
  ]))), 128)),
2336
- b.value ? (A(), E("div", pi, [
2337
- Nt(_n, { class: "size-5" })
2338
- ])) : q("", !0)
2339
- ])) : q("", !0),
2340
- l.uploadFn ? (A(), E("input", {
2474
+ m.value ? (v(), y("div", mi, [
2475
+ $t(Rn, { class: "size-5" })
2476
+ ])) : H("", !0)
2477
+ ])) : H("", !0),
2478
+ l.uploadFn ? (v(), y("input", {
2341
2479
  key: 1,
2342
2480
  ref_key: "fileInput",
2343
- ref: d,
2481
+ ref: u,
2344
2482
  type: "file",
2345
2483
  accept: "image/*,audio/*,video/*",
2346
2484
  class: "hidden",
2347
- onChange: vt
2348
- }, null, 544)) : q("", !0),
2485
+ onChange: St
2486
+ }, null, 544)) : H("", !0),
2349
2487
  w("div", {
2350
- class: T(["flex items-end gap-1 w-full rounded-3xl px-3 py-1.5", I.value ? "bg-theme-50 border border-theme-200 focus-within:border-theme-300" : "bg-white/10 backdrop-blur-sm border border-white/20 focus-within:border-white/40"])
2488
+ class: T(["flex items-end gap-1 w-full rounded-3xl px-3 py-1.5", L.value ? "bg-theme-50 border border-theme-200 focus-within:border-theme-300" : "bg-white/10 backdrop-blur-sm border border-white/20 focus-within:border-white/40"])
2351
2489
  }, [
2352
- l.uploadFn ? (A(), E("button", {
2490
+ l.uploadFn ? (v(), y("button", {
2353
2491
  key: 0,
2354
2492
  class: T(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 cursor-pointer", [
2355
2493
  o.value ? "size-10" : "size-9",
2356
- I.value ? "text-theme-400 hover:text-theme-600" : "text-white/50 hover:text-white/80",
2357
- b.value ? "opacity-50 pointer-events-none" : ""
2494
+ L.value ? "text-theme-400 hover:text-theme-600" : "text-white/50 hover:text-white/80",
2495
+ m.value ? "opacity-50 pointer-events-none" : ""
2358
2496
  ]]),
2359
- disabled: te.value || b.value,
2360
- onClick: Ue
2497
+ disabled: ne.value || m.value,
2498
+ onClick: Be
2361
2499
  }, [
2362
- b.value ? (A(), E("i", di)) : (A(), E("i", gi))
2363
- ], 10, fi)) : q("", !0),
2364
- bs(w("textarea", {
2500
+ m.value ? (v(), y("i", ki)) : (v(), y("i", bi))
2501
+ ], 10, xi)) : H("", !0),
2502
+ Vn(w("textarea", {
2365
2503
  ref_key: "textarea",
2366
- ref: f,
2367
- "onUpdate:modelValue": v[0] || (v[0] = (x) => c.value = x),
2504
+ ref: d,
2505
+ "onUpdate:modelValue": E[0] || (E[0] = (b) => c.value = b),
2368
2506
  rows: "1",
2369
2507
  enterkeyhint: "send",
2370
2508
  placeholder: ue.value,
2371
- disabled: te.value,
2372
- style: ws({ fontSize: (o.value, "16px"), resize: "none" }),
2373
- class: T(["flex-1 min-w-0 bg-transparent px-2 py-1.5 focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", I.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2374
- onKeydown: yt
2375
- }, null, 46, mi), [
2376
- [ys, c.value]
2509
+ disabled: ne.value,
2510
+ style: ys({ fontSize: (o.value, "16px"), resize: "none" }),
2511
+ class: T(["flex-1 min-w-0 bg-transparent px-2 py-1.5 focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", L.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2512
+ onKeydown: Tt
2513
+ }, null, 46, wi), [
2514
+ [Yn, c.value]
2377
2515
  ]),
2378
2516
  w("button", {
2379
2517
  class: T(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5", [
2380
2518
  o.value ? "size-10" : "size-9",
2381
- Ke.value ? "bg-primary-500 text-white hover:bg-primary-600 cursor-pointer" : I.value ? "bg-theme-100 text-theme-300" : "bg-white/10 text-white/30"
2519
+ et.value ? "bg-primary-500 text-white hover:bg-primary-600 cursor-pointer" : L.value ? "bg-theme-100 text-theme-300" : "bg-white/10 text-white/30"
2382
2520
  ]]),
2383
- disabled: !Ke.value,
2384
- onClick: v[1] || (v[1] = (x) => Je())
2385
- }, [...v[6] || (v[6] = [
2521
+ disabled: !et.value,
2522
+ onClick: E[1] || (E[1] = (b) => tt())
2523
+ }, [...E[6] || (E[6] = [
2386
2524
  w("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2387
- ])], 10, ki)
2525
+ ])], 10, vi)
2388
2526
  ], 2),
2389
2527
  w("div", {
2390
- class: T(["text-[10px] text-center mt-2", I.value ? "text-theme-300" : "text-white/40"])
2528
+ class: T(["text-[10px] text-center mt-2 select-none", L.value ? "text-theme-300" : "text-white/40"])
2391
2529
  }, " Press Enter to send, Shift+Enter for new line ", 2)
2392
2530
  ])
2393
2531
  ]));
2394
2532
  }
2395
- }), xi = { class: "agent-wrap" }, bi = {
2533
+ }), yi = { class: "agent-wrap" }, Ti = {
2396
2534
  key: 0,
2397
2535
  class: "flex items-center justify-center h-full"
2398
- }, _i = /* @__PURE__ */ xt({
2536
+ }, zi = /* @__PURE__ */ _e({
2399
2537
  __name: "AgentWrap",
2400
2538
  props: {
2401
2539
  sdk: {},
@@ -2412,8 +2550,8 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2412
2550
  const t = As("AgentWrap"), e = l, n = e.sdk || Es.getInstance({
2413
2551
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
2414
2552
  ...e.apiBase && { apiBase: e.apiBase }
2415
- }), s = ne(!e.agent), r = vs(e.agent ? new dt({ config: e.agent }) : void 0), a = ne();
2416
- return jn(async () => {
2553
+ }), s = K(!e.agent), r = Ts(e.agent ? new xt({ config: e.agent }) : void 0), a = K();
2554
+ return Zt(async () => {
2417
2555
  if (e.agent) {
2418
2556
  t.debug("Agent provided via props, skipping fetch", {
2419
2557
  agentId: e.agent.agentId,
@@ -2439,7 +2577,7 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2439
2577
  try {
2440
2578
  s.value = !0, t.debug("Fetching public agent", { handle: e.handle });
2441
2579
  const o = await n.getPublicAgent({ handle: e.handle });
2442
- o ? (r.value = new dt({ config: o }), t.debug("Successfully fetched public agent", {
2580
+ o ? (r.value = new xt({ config: o }), t.debug("Successfully fetched public agent", {
2443
2581
  agentId: o.agentId,
2444
2582
  handle: o.handle
2445
2583
  }), o.agentId && n.track({
@@ -2489,10 +2627,10 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2489
2627
  }
2490
2628
  });
2491
2629
  }
2492
- }), (o, c) => (A(), E("div", xi, [
2493
- s.value ? (A(), E("div", bi, [...c[0] || (c[0] = [
2630
+ }), (o, c) => (v(), y("div", yi, [
2631
+ s.value ? (v(), y("div", Ti, [...c[0] || (c[0] = [
2494
2632
  w("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2495
- ])])) : r.value ? Ts(o.$slots, "default", {
2633
+ ])])) : r.value ? qn(o.$slots, "default", {
2496
2634
  key: 1,
2497
2635
  sdk: jt(n),
2498
2636
  agent: r.value,
@@ -2501,18 +2639,21 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2501
2639
  buttonText: l.buttonText,
2502
2640
  buttonIcon: l.buttonIcon,
2503
2641
  loading: s.value
2504
- }) : q("", !0)
2642
+ }) : H("", !0)
2505
2643
  ]));
2506
2644
  }
2507
2645
  });
2508
2646
  export {
2509
- Rn as A,
2510
- _i as _,
2511
- Ei as a,
2512
- _n as b,
2513
- Os as c,
2514
- Si as g,
2515
- Cn as h,
2516
- Ai as p
2647
+ Dn as A,
2648
+ zi as _,
2649
+ Li as a,
2650
+ Ii as b,
2651
+ Ci as c,
2652
+ Mi as d,
2653
+ Rn as e,
2654
+ $s as f,
2655
+ Ri as g,
2656
+ In as h,
2657
+ Di as p
2517
2658
  };
2518
- //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang-CHgCPDEe.js.map
2659
+ //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang.js.map